/** * Payload CMS API Client * * Centralized client for all Payload CMS REST API calls. * Handles URL resolution, error handling, and consistent data fetching. * * Copyright (c) 2025 QwickApps.com. All rights reserved. */ export interface QueryOptions { where?: Record; limit?: number; page?: number; sort?: string; depth?: number; draft?: boolean; } export interface PayloadResponse { docs: T[]; totalDocs: number; limit: number; totalPages: number; page: number; pagingCounter: number; hasPrevPage: boolean; hasNextPage: boolean; prevPage: number | null; nextPage: number | null; } export declare class PayloadAPIClient { private baseURL; constructor(baseURL?: string); /** * Build query string from options */ private buildQueryString; /** * Fetch from a collection */ find(collection: string, options?: QueryOptions): Promise>; /** * Fetch a single document by ID */ findById(collection: string, id: string | number): Promise; /** * Fetch a global */ findGlobal(slug: string): Promise; /** * Create a document in a collection */ create(collection: string, data: Record): Promise; /** * Update a document by ID */ update(collection: string, id: string | number, data: Record): Promise; /** * Delete a document by ID */ delete(collection: string, id: string | number): Promise; } /** * Get or create a PayloadAPIClient instance */ export declare function getPayloadAPIClient(baseURL?: string): PayloadAPIClient; //# sourceMappingURL=PayloadAPIClient.d.ts.map