import { MappedDataSource } from "./MappedDataSource"; import { MappedSingleSourceQueryOperation } from "./MappedSingleSourceQueryOperation"; import { MappedSingleSourceInsertionOperation } from "./MappedSingleSourceInsertionOperation"; import { MappedSingleSourceUpdateOperation } from "./MappedSingleSourceUpdateOperation"; import { MappedSingleSourceDeletionOperation } from "./MappedSingleSourceDeletionOperation"; import { Interceptor } from "./utils/util-types"; /** * Default type of arguments expected by query operation preset * @api-category ConfigType */ export interface PresetQueryParams { where: Partial; } /** * Default type of arguments expected by update operation preset * @api-category ConfigType */ export interface PresetUpdateParams extends PresetQueryParams { update: Partial; } /** * Default type of arguments expected by deletion operation preset * @api-category ConfigType */ export interface PresetDeletionParams extends PresetQueryParams { } /** * Default type of arguments expected by singular insertion preset * @api-category ConfigType */ export interface PresetSingleInsertionParams { entity: TSrc["ShallowEntityType"]; } /** * Default type of arguments expected by multi-insertion preset * @api-category ConfigType */ export interface PresetMultiInsertionParams { entities: TSrc["ShallowEntityType"][]; } export declare function isPresetSingleInsertionParams(params: any): params is PresetSingleInsertionParams; export declare function isPresetMultiInsertionParams(params: any): params is PresetMultiInsertionParams; /** * Default type of arguments expected by insertion preset * @api-category ConfigType */ export declare type PresetInsertionParams = PresetSingleInsertionParams | PresetMultiInsertionParams; export declare function isPresentInsertionParams(params: any): params is PresetInsertionParams; export declare function isPresetQueryParams(t: any): t is PresetQueryParams; export declare function isPresetUpdateParams(t: any): t is PresetUpdateParams; /** * @name operationPresets.query.findOneOperation * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function findOneOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceQueryOperation>; /** * @name operationPresets.query.findManyOperation * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function findManyOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceQueryOperation>; /** * @name operationPresets.query.findManyOperation * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function paginatedFindManyOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceQueryOperation>; /** * @name operationPresets.mutation.insertOneOpeeration * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function insertOneOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceInsertionOperation>; /** * @name operationPresets.mutation.insertManyOperation * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function insertManyOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceInsertionOperation>; /** * @name operationPresets.mutations.updateManyOperation * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function updateOneOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceUpdateOperation>; /** * @name operationPresets.mutations.updateManyOperation * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function updateManyOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceUpdateOperation>; /** * Operation preset to delete a single entity matching some query criteria * * @name operationPresets.mutations.deleteOneOperation * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function deleteOneOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceDeletionOperation>; /** * Operation preset to delete multiple entities matching specified query criteria * * @name operationPresets.mutations.deleteManyOperation * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function deleteManyOperation(rootSource: TSrc, interceptMapping?: Interceptor>["mapping"]>): MappedSingleSourceDeletionOperation>; export declare const query: { findOneOperation: typeof findOneOperation; findManyOperation: typeof findManyOperation; defaults: (rootSource: MappedDataSource) => MappedSingleSourceQueryOperation, PresetQueryParams>>[]; }; export declare const mutation: { insertOneOperation: typeof insertOneOperation; insertManyOperation: typeof insertManyOperation; updateOneOperation: typeof updateOneOperation; updateManyOperation: typeof updateManyOperation; deleteOneOperation: typeof deleteOneOperation; deleteManyOperation: typeof deleteManyOperation; defaults: (rootSource: MappedDataSource) => (MappedSingleSourceInsertionOperation, PresetSingleInsertionParams>> | MappedSingleSourceInsertionOperation, PresetMultiInsertionParams>> | MappedSingleSourceUpdateOperation, PresetUpdateParams>> | MappedSingleSourceDeletionOperation, PresetDeletionParams>>)[]; }; /** * Get list of all available presets applied to specified data source * * @name operationPresets.all * @api-category PrimaryAPI * @param rootSource The data source on which the operation is to be performed */ export declare function defaults(rootSource: MappedDataSource): (MappedSingleSourceQueryOperation, PresetQueryParams>> | MappedSingleSourceInsertionOperation, PresetSingleInsertionParams>> | MappedSingleSourceInsertionOperation, PresetMultiInsertionParams>> | MappedSingleSourceUpdateOperation, PresetUpdateParams>> | MappedSingleSourceDeletionOperation, PresetDeletionParams>>)[];