import { KyselyDB, KyselyTransaction } from '../../types/kysely.types';
import { InsertableWorkspace, UpdatableWorkspace, Workspace } from "../../types/entity.types";
import { ExpressionBuilder } from 'kysely';
import { DB, Workspaces } from '@docmost/db/types/db';
export declare class WorkspaceRepo {
    private readonly db;
    baseFields: Array<keyof Workspaces>;
    constructor(db: KyselyDB);
    findById(workspaceId: string, opts?: {
        withLock?: boolean;
        withMemberCount?: boolean;
        withLicenseKey?: boolean;
        trx?: KyselyTransaction;
    }): Promise<Workspace>;
    findLicenseKeyById(workspaceId: string): Promise<string | undefined>;
    findFirst(): Promise<Workspace>;
    findByHostname(hostname: string): Promise<Workspace>;
    hostnameExists(hostname: string, trx?: KyselyTransaction): Promise<boolean>;
    updateWorkspace(updatableWorkspace: UpdatableWorkspace, workspaceId: string, trx?: KyselyTransaction): Promise<Workspace>;
    insertWorkspace(insertableWorkspace: InsertableWorkspace, trx?: KyselyTransaction): Promise<Workspace>;
    count(): Promise<number>;
    withMemberCount(eb: ExpressionBuilder<DB, 'workspaces'>): import("kysely").AliasedSelectQueryBuilder<{
        count: string | number | bigint;
    }, "memberCount">;
    getActiveUserCount(workspaceId: string): Promise<number>;
    updateApiSettings(workspaceId: string, prefKey: string, prefValue: string | boolean, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
    updateAiSettings(workspaceId: string, prefKey: string, prefValue: string | boolean, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
    updateAiEmbeddingFingerprint(workspaceId: string, fingerprint: {
        driver: string;
        model: string;
        dimensions: number;
    }, trx?: KyselyTransaction): Promise<import("kysely").UpdateResult[]>;
    updateSharingSettings(workspaceId: string, prefKey: string, prefValue: string | boolean, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
    updateExportSettings(workspaceId: string, prefKey: string, prefValue: string | boolean, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
    updatePublicSpacesSettings(workspaceId: string, prefKey: string, prefValue: string | boolean, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
    updateTemplateSettings(workspaceId: string, prefKey: string, prefValue: string | boolean, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
    updateSpaceSettings(workspaceId: string, prefKey: string, prefValue: string | boolean, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
    updateDefaultPageEditMode(workspaceId: string, pageEditMode: string, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
    updateDefaultLocale(workspaceId: string, locale: string, trx?: KyselyTransaction): Promise<{
        hostname: string;
        description: string;
        id: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date;
        auditRetentionDays: number;
        trashRetentionDays: number;
        billingEmail: string;
        customDomain: string;
        defaultRole: string;
        defaultSpaceId: string;
        emailDomains: string[];
        enforceMfa: boolean;
        enforceSso: boolean;
        isScimEnabled: boolean;
        licenseKey: string;
        logo: string;
        name: string;
        plan: string;
        settings: import("@docmost/db/types/db").JsonValue;
        status: string;
        stripeCustomerId: string;
        trialEndAt: Date;
    }>;
}
