import type { DeepPartial } from 'ts-essentials'; import type { BulkOperationResult, Config, PaginatedDocs, Where } from './payload-types'; type MakeOptional = Omit & Pick, K>; export type PayloadClientOptions = { url: string; fetcher?: typeof fetch; }; declare class PayloadApiClient { private url; private fetcher; constructor({ url, fetcher }: PayloadClientOptions); private createReqiest; create({ collection, data, file, ...toQs }: { collection: T; data: MakeOptional; depth?: number; draft?: boolean; fallbackLocale?: C['locale']; file?: File; locale?: C['locale']; }): Promise; delete({ collection, ...toQs }: { collection: T; depth?: number; draft?: boolean; fallbackLocale?: C['locale']; locale?: C['locale']; where: Where; }): Promise>; deleteById({ collection, id, ...toQs }: { collection: T; depth?: number; draft?: boolean; fallbackLocale?: C['locale']; id: C['collections'][T]['id']; locale?: C['locale']; }): Promise; find({ collection, ...toQs }: { collection: T; depth?: number; draft?: boolean; fallbackLocale?: C['locale']; limit?: number; locale?: 'all' | C['locale']; page?: number; select?: K; sort?: `-${Exclude}` | keyof C['collections'][T]; where?: Where; }): Promise>>; findById({ collection, id, ...toQs }: { collection: T; depth?: number; draft?: boolean; fallbackLocale?: C['locale']; id: C['collections'][T]['id']; locale?: 'all' | C['locale']; select?: K; }): Promise>; findGlobal({ slug, ...toQs }: { depth?: number; fallbackLocale?: C['locale']; locale?: 'all' | C['locale']; select?: K; slug: T; }): Promise>; geturl(): string; getFetcher(): typeof fetch; update({ collection, data, ...toQs }: { collection: T; data: DeepPartial; depth?: number; draft?: boolean; fallbackLocale?: C['locale']; id: C['collections'][T]['id']; locale?: C['locale']; where: Where; }): Promise>; updateById({ collection, data, file, ...toQs }: { collection: T; data: DeepPartial; depth?: number; draft?: boolean; fallbackLocale?: C['locale']; file?: File; locale?: C['locale']; }): Promise; updateGlobal({ data, slug, ...toQs }: { data: DeepPartial; depth?: number; fallbackLocale?: C['locale']; locale?: C['locale']; slug: T; }): Promise; } export declare const buildQueryString: (args: Record | undefined) => string; export declare const initPayloadClient: (options: PayloadClientOptions) => PayloadApiClient; export {}; //# sourceMappingURL=client.d.ts.map