/** * Content-types domain — wire types. * * Source of truth: engine `GET /api/v1/content-types` + `/content-types/name/{name}` * (`eaera_cms/core/types/routes.py`; People api_references §7.1). * * Wire convention (SDK default `responseCasing: 'camel'`): envelope keys are * camelCase at rest — `schemaDef`, `stateField`, `initialState`, `packId`, * `contentCount`. The `schemaDef` blob itself mirrors the pack YAML verbatim * (fields / state_machine / actions per the CT registry) — its inner keys * follow the engine's response casing for nested JSON, so read known blocks * defensively. */ /** Query for `GET /api/v1/content-types`. Wire keys are sent snake_case * (`per_page`, `pack_id`) because this route documents no camelCase alias. */ export interface ContentTypeListQuery { /** Filter by CT category — `pack` lists pack-registered CTs (incl. People's 27). */ category?: string; /** 1-based page. */ page?: number; /** Page size (engine default 100). */ perPage?: number; /** Filter by owning pack slug or uuid (api_references §7.1). */ packId?: string | null; } /** * The `schema_def` blob a CT row carries — mirrors the pack's * `pack/cts/.yaml`. Kept loose on purpose: field keys are CT-specific * (snake_case per the YAML), and the engine augments blocks at install. */ export interface ContentTypeSchemaDef { /** Declared fields — `{ : { type, required?, default?, enum?, … } }`. */ fields?: Record; /** Declarative state machine map (`{ states, transitions }` — E11d shape). */ state_machine?: unknown; /** Declared actions (`[{ name, label, scope, system_only? }]`). */ actions?: unknown[]; [key: string]: unknown; } /** One content-type metadata row (engine `ContentTypeResponse`). */ export interface ContentTypeResponse { id: number | string; /** Wire CT name — the `type` value for content queries (e.g. `legal_entity`). */ name: string; label?: string | null; description?: string | null; /** `pack` | `core` | pack-declared category. */ category?: string | null; /** Schema blob from the owning pack YAML — fields / state machine / actions. */ schemaDef?: ContentTypeSchemaDef | null; /** Which `data` field is the lifecycle state (drives status badges). */ stateField?: string | null; /** Initial lifecycle state — the state new rows start from. */ initialState?: string | null; singleton?: boolean; isActive?: boolean; version?: number | string | null; /** Owning pack slug (e.g. `eaera-people`) — pairs with `PEOPLE_PACK_ID`. */ packId?: string | null; /** Row count for this CT (install/admin surface). */ contentCount?: number; createdAt?: string; updatedAt?: string; } /** List envelope — `{ items[], total, page, per_page }` (camelCase at rest). */ export interface ContentTypeListResponse { items: ContentTypeResponse[]; total: number; page: number; perPage: number; } //# sourceMappingURL=content-types.type.d.ts.map