import type { AxiosInstance, AxiosRequestConfig } from "axios"; import type { StorageDataType } from "./cloudinary"; export declare enum OrderType { ASC = 1, DESC = -1 } type ListParams> = { limit?: number; offset?: number; search?: string; order?: OrderType; orderBy?: keyof T | "_id" | "_nid" | "created_on" | "updated_on"; fields?: (keyof T)[] | keyof T | string[]; }; type AllParams> = ListParams & { [K in keyof T]?: string; } & { [key: string]: unknown; }; export declare class Collection> { private endpoint; private name; private segment; constructor(endpoint: AxiosInstance, name: string); list(options?: AxiosRequestConfig & { params: ListParams; }): Promise<{ results: T[]; count: number; }>; create(data: T, options?: AxiosRequestConfig): Promise<{ _id: string; }>; retrieve(id: string, options?: AxiosRequestConfig): Promise; update(id: string, data: Partial, options?: AxiosRequestConfig): Promise<{ _id: string; }>; remove(id: string, options?: AxiosRequestConfig): Promise; all(options?: AxiosRequestConfig & { params: AllParams; }): Promise; reference(options?: AxiosRequestConfig & { params: ListParams; }): Promise<{ results: { title: string; _ref: string; text?: string; extra?: string[]; image?: StorageDataType; }[]; count: number; }>; } export declare function collection>(endpoint: AxiosInstance, name: string): Collection; export {}; //# sourceMappingURL=collection.d.ts.map