import type { MoteurClient } from '../client.js'; import type { Entry } from '@moteurio/types'; /** A field and languages, e.g. `{ field: 'title', locales: ['fr', 'en'] }`. */ export type FieldLocales = { field: string; locales: string[]; }; export type EntryListParams = { /** Comma-separated statuses, e.g. `draft,in_review`. */ status?: string; /** Page size; 0 returns only the total and counts. */ limit?: number; offset?: number | string; /** * `id`, `createdAt`, `updatedAt`, `publishedAt` or `data.` (a field's text); * prefix `-` for descending. */ sort?: string; /** Language to read a localized field in for a `data.` sort. */ sortLocale?: string; /** Words to find in the id and short text fields (case and accents ignored). */ q?: string; /** * Field or virtual key → values (any of them matches). Virtual keys: `$workflow` (status, * plus `edits` for unpublished changes), `$editor`, `$creator`. */ filters?: Record; /** Entries missing at least one of these languages in the field. */ missing?: FieldLocales; /** Rows grouped by this key, groups in `order` first. */ group?: { key: string; order?: string[]; }; /** Keys to count matching entries for, per value (each ignoring its own filter). */ facets?: string[]; /** Count matching entries missing each language (ignoring `missing`). */ missingCounts?: FieldLocales; /** Data fields to return, for list rows. */ fields?: string[]; }; export type EntryListResult = { entries: Entry[]; total: number; facets?: Record>; missingCounts?: Record; }; /** Query-string parameters for GET …/entries. */ export declare function entryListQuery(params?: EntryListParams): Record; export declare function entriesApi(client: MoteurClient): { list(projectId: string, modelId: string, params?: EntryListParams): Promise; get(projectId: string, modelId: string, entryId: string): Promise<{ entry: Entry; }>; create(projectId: string, modelId: string, body: Record): Promise<{ entry: Entry; }>; update(projectId: string, modelId: string, entryId: string, body: Record): Promise<{ entry: Entry; }>; delete(projectId: string, modelId: string, entryId: string): Promise; status(projectId: string, modelId: string, entryId: string, status: string): Promise<{ entry: Record; }>; submitReview(projectId: string, modelId: string, entryId: string): Promise<{ entry: Record; }>; }; //# sourceMappingURL=entries.d.ts.map