import { z } from 'zod';
import * as Generator from '@postxl/generator';
import { ModelContextResult } from './repositories.generator';
export type ModelRepository = ModelRepository_NoRepo | ModelRepository_WithRepo;
type ModelRepository_NoRepo = {
    kind: 'NoRepository';
};
export type ModelRepository_WithRepo = ModelRepository_Database | ModelRepository_InMemory;
export type ModelRepository_Database = ModelRepository_DatabaseDirect | ModelRepository_DatabaseCached;
export type ModelRepository_DatabaseDirect = ModelRepository_Database_Shared & {
    kind: 'DatabaseDirect';
};
export type ModelRepository_DatabaseCached = ModelRepository_Database_Shared & {
    kind: 'DatabaseCached';
};
type ModelRepository_Database_Shared = ModelRepository_WithRepo_Shared & {
    /**
     * The name how the model is provided by the Prisma client
     */
    prismaClientName: Generator.FunctionName;
    /**
     * For every database repo, we also generate the inMemory repo for testing and development
     */
    inMemoryVersion: ModelRepository_InMemory;
};
export type ModelRepository_InMemory = ModelRepository_WithRepo_Shared & {
    kind: 'InMemory';
};
export type ModelRepository_WithRepo_Shared = Generator.ImportableClass & {
    /**
     * Name of the repository service instance as exposed by the data service
     */
    dataServiceVariable: Generator.VariableName;
    /**
     * Name of the item in the bulk mutation type
     */
    bulkMutationEntry: Generator.VariableName;
};
export type ModelWithRepository<Model extends Generator.ModelContext, RepoType extends ModelRepository = ModelRepository> = Model & {
    repository: RepoType;
};
/**
 * Model context for models that generate a repository.
 */
export type ModelWithRepository_WithRepo = ModelWithRepository<ModelContextResult, ModelRepository_WithRepo>;
export type ModelWithRepository_Database = ModelWithRepository<ModelContextResult, ModelRepository_Database>;
export type ModelWithRepository_DatabaseDirect = ModelWithRepository<ModelContextResult, ModelRepository_DatabaseDirect>;
export type ModelWithRepository_DatabaseCached = ModelWithRepository<ModelContextResult, ModelRepository_DatabaseCached>;
export type ModelWithRepository_InMemory = ModelWithRepository<ModelContextResult, ModelRepository_InMemory>;
declare const zRepositoryType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
    NoRepository: "NoRepository";
    DatabaseDirect: "DatabaseDirect";
    DatabaseCached: "DatabaseCached";
    InMemory: "InMemory";
}>>>;
export declare const zRepository: z.ZodObject<{
    repository: z.ZodDefault<z.ZodOptional<z.ZodObject<{
        type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
            NoRepository: "NoRepository";
            DatabaseDirect: "DatabaseDirect";
            DatabaseCached: "DatabaseCached";
            InMemory: "InMemory";
        }>>>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
export type RepositoryType = z.infer<typeof zRepositoryType>;
export {};
