import type Database from 'better-sqlite3';
import type { RequestContext } from '../middleware/auth';
export interface WorkspacePolicyInput {
    quotaPolicy?: Record<string, unknown> | null;
    retentionPolicy?: Record<string, unknown> | null;
}
export interface WorkspaceUpsertInput extends WorkspacePolicyInput {
    workspaceId?: string;
    name?: string;
}
export interface MemberUpsertInput {
    email?: string;
    displayName?: string;
    idpSubject?: string;
    role?: string;
}
export declare class EnterpriseAdminControlPlaneError extends Error {
    readonly status: number;
    constructor(status: number, message: string);
}
export declare function getEnterpriseAdminControlPlaneSummary(db: Database.Database, context: RequestContext): {
    success: boolean;
    tenant: {
        id: string;
        name: string;
        status: string;
        plan: string | null;
        createdAt: number;
        updatedAt: number;
    } | null;
    workspaces: {
        id: string;
        tenantId: string;
        name: string;
        retentionPolicy: Record<string, unknown> | null;
        quotaPolicy: Record<string, unknown> | null;
        createdAt: number;
        updatedAt: number;
        memberCount: number;
        traceCount: number;
        providerCount: number;
    }[];
    counts: {
        workspaces: number;
        users: number;
        memberships: number;
        providers: number;
    };
    providerManagement: {
        workspaceEndpointTemplate: string;
        legacyEndpoint: string;
    };
};
export declare function listEnterpriseWorkspaces(db: Database.Database, context: RequestContext): {
    success: boolean;
    workspaces: {
        id: string;
        tenantId: string;
        name: string;
        retentionPolicy: Record<string, unknown> | null;
        quotaPolicy: Record<string, unknown> | null;
        createdAt: number;
        updatedAt: number;
        memberCount: number;
        traceCount: number;
        providerCount: number;
    }[];
};
export declare function createEnterpriseWorkspace(db: Database.Database, context: RequestContext, input: WorkspaceUpsertInput, now?: number): {
    success: boolean;
    workspace: {
        id: string;
        tenantId: string;
        name: string;
        retentionPolicy: Record<string, unknown> | null;
        quotaPolicy: Record<string, unknown> | null;
        createdAt: number;
        updatedAt: number;
        memberCount: number;
        traceCount: number;
        providerCount: number;
    };
};
export declare function updateEnterpriseWorkspace(db: Database.Database, context: RequestContext, workspaceIdInput: string, input: WorkspaceUpsertInput, now?: number, action?: string): {
    success: boolean;
    workspace: {
        id: string;
        tenantId: string;
        name: string;
        retentionPolicy: Record<string, unknown> | null;
        quotaPolicy: Record<string, unknown> | null;
        createdAt: number;
        updatedAt: number;
        memberCount: number;
        traceCount: number;
        providerCount: number;
    };
};
export declare function listEnterpriseWorkspaceMembers(db: Database.Database, context: RequestContext, workspaceIdInput: string): {
    success: boolean;
    members: {
        userId: string;
        email: string;
        displayName: string | null;
        idpSubject: string | null;
        role: string;
        createdAt: number;
    }[];
};
export declare function upsertEnterpriseWorkspaceMember(db: Database.Database, context: RequestContext, workspaceIdInput: string, userIdInput: string, input: MemberUpsertInput, now?: number): {
    success: boolean;
    member: {
        userId: string;
        email: string;
        displayName: string | null;
        idpSubject: string | null;
        role: string;
        createdAt: number;
    } | undefined;
};
export declare function deleteEnterpriseWorkspaceMember(db: Database.Database, context: RequestContext, workspaceIdInput: string, userIdInput: string): {
    success: boolean;
};
//# sourceMappingURL=enterpriseAdminControlPlaneService.d.ts.map