import { $Fetch } from 'ofetch'; import { ActionInvokePayload, ActionResponse, ContentAction, ContentCreatePayload, ContentItem, ContentListResponse, ContentQuery, ContentUpdatePayload } from './content.type'; export interface IContentServiceOptions { /** The CMS `$Fetch` instance (one of `sdk.apis`). */ api: $Fetch; /** Lazy flag — when true, the service returns fake data. */ mock: () => boolean; } export interface IContentService { list>(query?: ContentQuery): Promise>>; detail>(uuid: string): Promise>; create>(payload: ContentCreatePayload): Promise>; update>(uuid: string, payload: ContentUpdatePayload): Promise>; remove(uuid: string): Promise; listActions(uuid: string): Promise; invokeAction(uuid: string, actionName: string, payload?: ActionInvokePayload): Promise; } /** * Generic CMS content service. CRUD over the **singular** `/api/v1/content` * namespace; type-specific reads use `query: { type }`. Returns `ContentItem`. * * Endpoint contract (`eaera_cms/core/content/routes.py`): * GET /api/v1/content → ContentListResponse * GET /api/v1/content/{uuid} → single ContentResponse * POST /api/v1/content → create * PUT /api/v1/content/{uuid} → update (data/slug) * DELETE /api/v1/content/{uuid} → soft-delete * GET /api/v1/content/{uuid}/actions → AvailableActionsResponse * POST /api/v1/content/{uuid}/actions/{actionName} → ActionResponse * * While `mock()` returns true, all methods resolve against the local fake * dataset and never touch `api`. */ export declare function createContentService(opts: IContentServiceOptions): IContentService; //# sourceMappingURL=index.d.ts.map