import { ZodTypeAny } from "zod"; import { AuthConfigs } from "../types/auth"; import { RouteHook } from "../exports"; import { PrismaQueryOptions } from "../types"; import { ServiceHook } from "../modules/base/utils/service-hooks-manager"; import { UserArkosConfig } from "./define-config"; type AppModuleComponent = Awaited>; /** This was a workaround when testing and also when cjs was generated while `prismaModelsModules` was exported there where some problems */ export declare function setModuleComponents(modelName: string, modules: AppModuleComponent): void; export declare function getModuleComponents(modelName: string): ImportModuleComponentsReturnType; /** * To be reused on other part of code for correct typing * * @param key * @param fileName * @param result */ export type ValidationFileMappingKey = keyof ReturnType["dtos"]; export declare function getFileModuleComponentsFileStructure(modelName: string): { core: { hooks: string; interceptors: string; authConfigs: string; prismaQueryOptions: string; router: string; }; dtos: { login: string; signup: string; getMe: string; updateMe: string; updatePassword: string; model?: undefined; create?: undefined; createOne?: undefined; createMany?: undefined; update?: undefined; updateOne?: undefined; updateMany?: undefined; query?: undefined; findOne?: undefined; findMany?: undefined; } | { model: string; create: string; createOne: string; createMany: string; update: string; updateOne: string; updateMany: string; query: string; findOne: string; findMany: string; login?: undefined; signup?: undefined; getMe?: undefined; updateMe?: undefined; updatePassword?: undefined; }; schemas: { login: string; signup: string; getMe: string; updateMe: string; updatePassword: string; model?: undefined; create?: undefined; createOne?: undefined; createMany?: undefined; update?: undefined; updateOne?: undefined; updateMany?: undefined; query?: undefined; findOne?: undefined; findMany?: undefined; } | { model: string; create: string; createOne: string; createMany: string; update: string; updateOne: string; updateMany: string; query: string; findOne: string; findMany: string; login?: undefined; signup?: undefined; getMe?: undefined; updateMe?: undefined; updatePassword?: undefined; }; }; export declare function isClass(value: any): boolean; export declare function isZodSchema(value: any): value is ZodTypeAny; export declare function processSubdir(modelName: string, type: "dtos" | "schemas"): Promise>; export type ModuleComponents = ImportModuleComponentsReturnType; type ImportModuleComponentsReturnType = { hooks?: Record; interceptors?: Record; authConfigs?: AuthConfigs; prismaQueryOptions?: PrismaQueryOptions; router?: { config?: RouteHook; hook?: RouteHook; default: any; }; dtos?: { create?: any; createOne?: any; update?: any; updateOne?: any; signup?: any; login?: any; updatePassword?: any; updateMe?: any; }; schemas?: { create?: any; createOne?: any; update?: any; updateOne?: any; signup?: any; login?: any; updatePassword?: any; updateMe?: any; }; }; /** * Processes and assigns module to the result object based on the key * @param {string} key - The file key being processed * @param {any} module - The imported module * @param {ImportModuleComponentsReturnType} result - The result object to modify */ export declare function assignModuleToResult(appModule: string, key: keyof ModuleComponents, module: any, result: ImportModuleComponentsReturnType, arkosConfig: UserArkosConfig): void; /** * Dynamically imports model-specific modules for a given model with optimized file handling. * Includes special handling for the Auth module. * * @param {string} modelName - The name of the model (e.g., "User", "Post", "Auth"). * @returns {Promise} An object containing the imported modules */ export declare function importModuleComponents(modelName: string, arkosConfig: UserArkosConfig, moduleDirExists?: boolean): Promise; export declare const appModules: string[]; /** * Allows to asynchronously load all app modules components at once to speed up app start time. */ export declare function loadAllModuleComponents(): Promise; export declare function warnDeprecatedModuleComponents(modulesComponents: { moduleName: string; components: ImportModuleComponentsReturnType; }[]): void; export {};