import { PrismaCoreService } from '../../prisma-core.service';
import { GraphQLUnifiedBuilder } from './graphql-unified-builder';
import { IGenQLClient } from '../../collections/graphql/graphql-queryable';
export interface GraphQLRepositoryConfig {
    queryOperationName: string;
    mutationOperationNames: {
        create: string;
        createMany?: string;
        update: string;
        updateMany?: string;
        upsert?: string;
        delete: string;
        deleteMany?: string;
    };
    subscriptionOperationNames?: {
        [key: string]: string;
    };
}
export declare class GraphQLRepository {
    protected readonly coreService: PrismaCoreService;
    private operationCache;
    private operationConfigs;
    constructor(coreService: PrismaCoreService);
    operation<TModel = any>(operationName: string): GraphQLUnifiedBuilder<TModel>;
    model<TModel = any>(modelName: string): GraphQLUnifiedBuilder<TModel>;
    registerOperation(operationName: string, config: GraphQLRepositoryConfig): void;
    registerOperations(operations: Record<string, GraphQLRepositoryConfig>): void;
    registerCrudOperations(modelName: string, options?: {
        queryOperationName?: string;
        pluralName?: string;
        subscriptions?: string[];
    }): void;
    private getOrCreateOperationConfig;
    private inferOperationConfig;
    private createCrudConfig;
    getOperationNames(): string[];
    getOperationConfig(operationName: string): GraphQLRepositoryConfig | undefined;
    clearCache(): void;
    clearAll(): void;
    get client(): IGenQLClient;
    get isInitialized(): boolean;
}
export declare abstract class TypedGraphQLRepository<TModel = unknown, TSelect = TModel, TWhereInput = any, TOrderByInput = any, TInclude = any, TSelectInput = any, TCreateInput = any, TUpdateInput = any, TWhereUniqueInput = any> {
    protected readonly genqlClient: IGenQLClient;
    protected readonly config: GraphQLRepositoryConfig;
    constructor(genqlClient: IGenQLClient, config: GraphQLRepositoryConfig);
    constructor(genqlClient: IGenQLClient, queryOperationName: string, mutationOperationNames: {
        create: string;
        createMany?: string;
        update: string;
        updateMany?: string;
        upsert?: string;
        delete: string;
        deleteMany?: string;
    });
    protected get queryOperationName(): string;
    protected get mutationOperationNames(): {
        create: string;
        createMany?: string;
        update: string;
        updateMany?: string;
        upsert?: string;
        delete: string;
        deleteMany?: string;
    };
    protected get subscriptionOperationNames(): {
        [key: string]: string;
    };
    protected createBuilder(): GraphQLUnifiedBuilder<TModel, TSelect, TWhereInput, TOrderByInput, TInclude, TSelectInput, TCreateInput, TUpdateInput, TWhereUniqueInput>;
    protected createSubscriptionBuilder(subscriptionOperationName: string): GraphQLUnifiedBuilder<TModel, TSelect, TWhereInput, TOrderByInput, TInclude, TSelectInput, TCreateInput, TUpdateInput, TWhereUniqueInput>;
    get Query(): GraphQLUnifiedBuilder<TModel, TSelect, TWhereInput, TOrderByInput, TInclude, TSelectInput, TCreateInput, TUpdateInput, TWhereUniqueInput>;
    executeCustom(operationName: string, args: any, selection?: any): Promise<any>;
    subscribe(subscriptionOperationName: string, where?: TWhereInput): AsyncIterable<TSelect>;
    protected abstract getDefaultSelection(): TSelectInput;
    protected createBuilderWithDefaults(): GraphQLUnifiedBuilder<TModel, TSelect, TWhereInput, TOrderByInput, TInclude, TSelectInput, TCreateInput, TUpdateInput, TWhereUniqueInput>;
}
export declare namespace GraphQLRepositoryFactory {
    function createUniversal(coreService: PrismaCoreService): GraphQLRepository;
    function createTyped<T extends TypedGraphQLRepository<any>>(repositoryClass: new (client: IGenQLClient, config: GraphQLRepositoryConfig) => T, client: IGenQLClient, config: GraphQLRepositoryConfig): T;
    function createCrudConfig(modelName: string, options?: {
        queryOperationName?: string;
        pluralName?: string;
        subscriptions?: string[];
    }): GraphQLRepositoryConfig;
}
