/** * Canonical `canon.card.v1` action-field type vocabulary. The runtime array is * the single source of truth and the type is derived from it, so a value and a * type cannot drift. * * ORDER IS LOAD-BEARING: scripts/generate-skill-bundles.mjs renders this list * verbatim (via @canonmsg/rich-cards) into two committed SKILL.md files, and * `npm run check:skill-bundles` fails on a byte change. */ export declare const RUNTIME_CARD_FIELD_TYPES: readonly ["text", "textarea", "select", "multiSelect", "boolean", "date", "number", "currency", "searchSelect", "lineItems"]; export type RuntimeCardFieldType = (typeof RUNTIME_CARD_FIELD_TYPES)[number]; /** * Caps shared across runtime-card normalizers, response validation, and * authoring tools. Keep these backend-safe so Functions can import them. */ export declare const RUNTIME_CARD_LIMITS: { readonly detailsRows: 32; readonly lineItemRows: 50; readonly lineItemColumns: 8; readonly searchSelectChoices: 100; }; export interface RuntimeCardFieldChoice { label: string; value?: string; description?: string; preview?: string; } /** Column cell types allowed inside a `lineItems` field. */ export declare const RUNTIME_CARD_LINE_ITEM_COLUMN_TYPES: readonly ["text", "number", "currency", "date", "select"]; export type RuntimeCardLineItemColumnType = (typeof RUNTIME_CARD_LINE_ITEM_COLUMN_TYPES)[number]; export interface RuntimeCardLineItemColumn { id: string; label: string; type: RuntimeCardLineItemColumnType; required?: boolean; choices?: RuntimeCardFieldChoice[]; min?: number; max?: number; step?: number; precision?: number; currencyCode?: string; allowOther?: boolean; } export interface RuntimeCardField { id: string; label: string; type: RuntimeCardFieldType; required?: boolean; placeholder?: string; choices?: RuntimeCardFieldChoice[]; allowOther?: boolean; sensitive?: boolean; min?: number | string; max?: number | string; step?: number; precision?: number; currencyCode?: string; columns?: RuntimeCardLineItemColumn[]; minRows?: number; maxRows?: number; } export declare function validateRuntimeCardFieldValues(input: { actionId: string | undefined; actionFields: ReadonlyArray | undefined; values: Record | undefined; }): string | null;