import { ApiEndpointSchema, ApiMappingSchema } from '@objectstack/spec/api';import type { ApiEndpoint, ApiMapping } from '@objectstack/spec/api';// Validate dataconst result = ApiEndpointSchema.parse(data);
URL Path — must be inside this stack's endpoint carve-out: /api/v1/apps/<manifest.namespace>/<subpath> with a non-empty subpath (ADR-0121 D1), e.g. /api/v1/apps/crm/leads for a stack whose manifest.namespace is crm. Only the subpath is yours to name; the namespace segment is derived from manifest.namespace (ADR-0121 D2), never authored here. A path outside the carve-out is rejected at publish and would match NOTHING at runtime.
Implementation type — only 'object_operation' and 'flow' EXECUTE in 17.x. 'script' and 'proxy' stay in the frozen vocabulary and are rejected at publish, not parsed and ignored: express script logic as a flow whose script node runs your registered function, and an outbound call as a flow using a declared connector
target
string
optional
Target Flow ID, per type — REQUIRED at publish for type: 'flow' (the gate refuses a flow endpoint that names no target flow) and UNREAD for type: 'object_operation', so do not write it there: that endpoint is addressed by objectParams.object / .operation, and a target beside them is a dead string nothing checks against objectParams.object (made the key optional for exactly that reason). The vocabulary's other spellings — a Script Name or Proxy URL — stay unreachable in 17.x, since publish rejects type: 'script' and type: 'proxy'
Transformation function name — NOT EXECUTED in 17.x, and publish REJECTS the key: there is no transformation-function registry anywhere in the platform, so it stays in the frozen vocabulary and is refused rather than parsed and ignored (E7). A mapping entry moves and renames fields by dot path and nothing more — shape the value where it is produced instead (a flow endpoint whose flow computes it, or a formula field on the object)
Transformation function name — NOT EXECUTED in 17.x, and publish REJECTS the key: there is no transformation-function registry anywhere in the platform, so it stays in the frozen vocabulary and is refused rather than parsed and ignored (E7). A mapping entry moves and renames fields by dot path and nothing more — shape the value where it is produced instead (a flow endpoint whose flow computes it, or a formula field on the object)
Transformation function name — NOT EXECUTED in 17.x, and publish REJECTS the key: there is no transformation-function registry anywhere in the platform, so it stays in the frozen vocabulary and is refused rather than parsed and ignored (E7). A mapping entry moves and renames fields by dot path and nothing more — shape the value where it is produced instead (a flow endpoint whose flow computes it, or a formula field on the object)