import { InferContract } from '@spfn/core'; import { saveValuesContract, getValuesContract } from './lib/contracts/values.js'; import { getPublishedCacheContract, upsertPublishedCacheContract } from './lib/contracts/published-cache.js'; import { getLabelVersionsContract, getAdminLabelContract, publishLabelContract, getLabelByKeyContract, getLabelsContract, createLabelContract, getLabelContract, updateLabelContract, deleteLabelContract } from './lib/contracts/labels.js'; export { client } from '@spfn/core/client'; import '@sinclair/typebox'; /** * Auto-generated API Client * * Generated by @spfn/core codegen * DO NOT EDIT MANUALLY * * @generated 2025-11-03T13:40:07.039Z */ type SaveValuesResponse = InferContract['response']; type SaveValuesParams = InferContract['params']; type SaveValuesBody = InferContract['body']; type GetValuesResponse = InferContract['response']; type GetValuesQuery = InferContract['query']; type GetValuesParams = InferContract['params']; /** * Auto-generated API Client * * Generated by @spfn/core codegen * DO NOT EDIT MANUALLY * * @generated 2025-11-03T13:40:07.038Z */ type GetPublishedCacheResponse = InferContract['response']; type GetPublishedCacheQuery = InferContract['query']; type UpsertPublishedCacheResponse = InferContract['response']; type UpsertPublishedCacheBody = InferContract['body']; /** * Auto-generated API Client * * Generated by @spfn/core codegen * DO NOT EDIT MANUALLY * * @generated 2025-11-03T13:40:07.038Z */ type GetLabelVersionsResponse = InferContract['response']; type GetLabelVersionsParams = InferContract['params']; /** * Auto-generated API Client * * Generated by @spfn/core codegen * DO NOT EDIT MANUALLY * * @generated 2025-11-03T13:40:07.038Z */ type GetAdminLabelResponse = InferContract['response']; type GetAdminLabelParams = InferContract['params']; /** * Auto-generated API Client * * Generated by @spfn/core codegen * DO NOT EDIT MANUALLY * * @generated 2025-11-03T13:40:07.037Z */ type PublishLabelResponse = InferContract['response']; type PublishLabelParams = InferContract['params']; type PublishLabelBody = InferContract['body']; /** * Auto-generated API Client * * Generated by @spfn/core codegen * DO NOT EDIT MANUALLY * * @generated 2025-11-03T13:40:07.037Z */ type GetLabelByKeyResponse = InferContract['response']; type GetLabelByKeyParams = InferContract['params']; /** * Auto-generated API Client * * Generated by @spfn/core codegen * DO NOT EDIT MANUALLY * * @generated 2025-11-03T13:40:07.036Z */ type GetLabelsResponse = InferContract['response']; type GetLabelsQuery = InferContract['query']; type CreateLabelResponse = InferContract['response']; type CreateLabelBody = InferContract['body']; type GetLabelResponse = InferContract['response']; type GetLabelParams = InferContract['params']; type UpdateLabelResponse = InferContract['response']; type UpdateLabelParams = InferContract['params']; type UpdateLabelBody = InferContract['body']; type DeleteLabelResponse = InferContract['response']; type DeleteLabelParams = InferContract['params']; /** * Type-safe API client */ declare const cmsApi: { readonly getLabels: (options: { query?: GetLabelsQuery; }) => Promise<{ labels: { defaultValue?: any; section: string; description: string | null; id: number; key: string; type: string; publishedVersion: number | null; createdBy: string | null; createdAt: string; updatedAt: string; }[]; total: number; }>; readonly createLabel: (options: { body: CreateLabelBody; }) => Promise<{ section: string; id: number; key: string; type: string; publishedVersion: number | null; createdBy: string | null; createdAt: string; updatedAt: string; } | { key?: string | undefined; error: string; }>; readonly getLabel: (options: { params: GetLabelParams; }) => Promise<{ section: string; description: string | null; id: number; key: string; type: string; publishedVersion: number | null; createdBy: string | null; createdAt: string; updatedAt: string; } | { error: string; }>; readonly updateLabel: (options: { params: UpdateLabelParams; body: UpdateLabelBody; }) => Promise<{ section: string; description: string | null; id: number; key: string; type: string; publishedVersion: number | null; createdBy: string | null; createdAt: string; updatedAt: string; } | { error: string; }>; readonly deleteLabel: (options: { params: DeleteLabelParams; }) => Promise<{ id: number; success: boolean; } | { error: string; }>; readonly getLabelByKey: (options: { params: GetLabelByKeyParams; }) => Promise<{ section: string; description: string | null; id: number; key: string; type: string; publishedVersion: number | null; createdBy: string | null; createdAt: string; updatedAt: string; } | { key?: string | undefined; error: string; }>; readonly publishLabel: (options: { params: PublishLabelParams; body: PublishLabelBody; }) => Promise<{ version: number; id: number; success: boolean; message: string; } | { error: string; }>; readonly getAdminLabel: (options: { params: GetAdminLabelParams; }) => Promise<{ label: { section: string; description: string | null; id: number; key: string; type: string; publishedVersion: number | null; createdBy: string | null; createdAt: string; updatedAt: string; }; draft: { locale: string; version: null; id: number; value: any; createdAt: string; labelId: number; breakpoint: string | null; }[]; published: { locale: string; version: number; id: number; value: any; createdAt: string; labelId: number; breakpoint: string | null; }[]; status: "published" | "default-only" | "unpublished" | "modified"; } | { error: string; }>; readonly getLabelVersions: (options: { params: GetLabelVersionsParams; }) => Promise<{ versions: { version: number; publishedAt: string; publishedBy: string | null; values: { locale: string; id: number; value: any; createdAt: string; breakpoint: string | null; }[]; notes: string | null; }[]; } | { error: string; }>; readonly getPublishedCache: (options: { query?: GetPublishedCacheQuery; }) => Promise<{ section: string; locale: string; content: { [x: string]: any; }; version: number; publishedAt: string | null; }[] | { error: string; }>; readonly upsertPublishedCache: (options: { body: UpsertPublishedCacheBody; }) => Promise<{ section: string; locale: string; content: { [x: string]: any; }; version: number; publishedAt: string | null; } | { error: string; }>; readonly saveValues: (options: { params: SaveValuesParams; body: SaveValuesBody; }) => Promise<{ version: number | null; success: boolean; saved: number; } | { error: string; }>; readonly getValues: (options: { params: GetValuesParams; query?: GetValuesQuery; }) => Promise<{ version: number; labelId: number; values: { locale: string; id: number; value: any; createdAt: string; breakpoint: string | null; }[]; } | { error: string; }>; }; export { type CreateLabelBody, type CreateLabelResponse, type DeleteLabelParams, type DeleteLabelResponse, type GetAdminLabelParams, type GetAdminLabelResponse, type GetLabelByKeyParams, type GetLabelByKeyResponse, type GetLabelParams, type GetLabelResponse, type GetLabelVersionsParams, type GetLabelVersionsResponse, type GetLabelsQuery, type GetLabelsResponse, type GetPublishedCacheQuery, type GetPublishedCacheResponse, type GetValuesParams, type GetValuesQuery, type GetValuesResponse, type PublishLabelBody, type PublishLabelParams, type PublishLabelResponse, type SaveValuesBody, type SaveValuesParams, type SaveValuesResponse, type UpdateLabelBody, type UpdateLabelParams, type UpdateLabelResponse, type UpsertPublishedCacheBody, type UpsertPublishedCacheResponse, cmsApi };