import * as valibot from 'valibot'; import { InferOutput } from 'valibot'; import { FilesystemOptions } from './core/filesystem/types.js'; interface DestroyOptions extends InferOutput { } declare const schema$4: valibot.ObjectSchema<{ readonly where: valibot.OptionalSchema]>, undefined>; readonly limit: valibot.OptionalSchema, undefined>; }, undefined>; declare function destroy(provider: DataProvider, payload: DestroyOptions): Promise<{ count: number; }>; interface FindOptions extends InferOutput { } declare const schema$3: valibot.ObjectWithRestSchema<{ readonly where: valibot.OptionalSchema]>, undefined>; readonly include: valibot.OptionalSchema, valibot.ArraySchema, undefined>]>, undefined>; readonly exclude: valibot.OptionalSchema, valibot.ArraySchema, undefined>]>, undefined>; }, valibot.AnySchema, undefined>; declare function find(provider: DataProvider, payload: FindOptions): Promise; interface UpdateOptions extends InferOutput { } declare const schema$2: valibot.ObjectWithRestSchema<{ readonly data: valibot.SchemaWithPipe<[valibot.RecordSchema, valibot.AnySchema, undefined>, valibot.TransformAction<{ [x: string]: any; }, Record>]>; readonly where: valibot.OptionalSchema]>, undefined>; readonly limit: valibot.OptionalSchema, undefined>; }, valibot.AnySchema, undefined>; declare function update(provider: DataProvider, payload: UpdateOptions): Promise<{ count: number; }>; interface ListOptions extends InferOutput { } declare const schema$1: valibot.ObjectWithRestSchema<{ readonly where: valibot.OptionalSchema]>, undefined>; readonly limit: valibot.OptionalSchema, undefined>; readonly page: valibot.OptionalSchema, undefined>; readonly cursor: valibot.OptionalSchema, undefined>; readonly include: valibot.OptionalSchema, valibot.ArraySchema, undefined>]>, undefined>; readonly exclude: valibot.OptionalSchema, valibot.ArraySchema, undefined>]>, undefined>; readonly sortBy: valibot.OptionalSchema, undefined>, valibot.StringSchema], undefined>, valibot.TransformAction, valibot.ArraySchema, undefined>]>, undefined>; readonly sortDesc: valibot.OptionalSchema, undefined>, valibot.BooleanSchema], undefined>, valibot.TransformAction, valibot.ArraySchema, undefined>]>, undefined>; }, valibot.AnySchema, undefined>; declare function list(provider: DataProvider, payload: ListOptions): Promise; interface WhereCondition { field: string; operator?: string; value: any; } interface WhereGroup { or?: WhereCondition[]; and?: WhereCondition[]; } interface Where { [key: string]: any; and?: Where[]; or?: Where[]; } interface Field { exclude?: string[]; include?: string[]; } interface Sort { sortBy: string | string[]; sortDesc?: boolean | boolean[]; } interface DataItem { [key: string]: any; } interface ListResponse { meta: any; data: DataItem[]; } interface DataProvider { list: (options?: ListOptions) => Promise; find: (options?: FindOptions) => Promise; create: (options: CreateOptions) => Promise; update: (options: UpdateOptions) => Promise<{ count: number; }>; destroy: (options: DestroyOptions) => Promise<{ count: number; }>; } interface DataProviderInstanceOptions { root: string; fs?: FilesystemOptions['fs']; path?: FilesystemOptions['path']; } interface MountDataProvider { (config: any, instanceConfig: DataProviderInstanceOptions): Partial; } interface CreateOptions extends InferOutput { } declare const schema: valibot.ObjectWithRestSchema<{ readonly data: valibot.SchemaWithPipe<[valibot.RecordSchema, valibot.AnySchema, undefined>, valibot.TransformAction<{ [x: string]: any; }, Record>]>; }, valibot.AnySchema, undefined>; declare function create(provider: DataProvider, payload: CreateOptions): Promise; export { type CreateOptions as C, type DestroyOptions as D, type FindOptions as F, type ListOptions as L, type MountDataProvider as M, type Sort as S, type UpdateOptions as U, type WhereCondition as W, type ListResponse as a, type DataItem as b, type Where as c, type DataProviderInstanceOptions as d, type WhereGroup as e, type Field as f, type DataProvider as g, destroy as h, find as i, create as j, list as l, update as u };