Skip to content

Commit f734a5f

Browse files
committed
docs(spec): regenerate automation-api reference for the #12206 contract text
Claude-Session: https://claude.ai/code/session_01KX8wnyjStaZcuMyAMNsy3N
1 parent 7e4d980 commit f734a5f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

content/docs/references/api/automation-api.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const result = AutomationApiErrorCode.parse(data);
180180
| **success** | `boolean` || Operation success status |
181181
| **error** | `{ code: Enum<'VALIDATION_ERROR' \| 'INVALID_FIELD' \| 'MISSING_REQUIRED_FIELD' \| …>; declaredCode?: string; message: string; userMessage?: string; … }` | optional | Error details if success is false |
182182
| **meta** | `{ timestamp: string; duration?: number; requestId?: string; traceId?: string }` | optional | Response metadata |
183-
| **data** | `{ name: string; label: string; description?: string; successMessage?: string; … }` || The created flow definition |
183+
| **data** | `{ name: string; label: string; description?: string; successMessage?: string; … }` || The created flow, canonicalized — the parsed shape the engine stored, identical to what a subsequent GET answers |
184184

185185
### Nested Shape: `CreateFlowResponse.error`
186186

@@ -624,24 +624,24 @@ const result = AutomationApiErrorCode.parse(data);
624624
| Property | Type | Required | Description |
625625
| :--- | :--- | :--- | :--- |
626626
| **name** | `string` || Flow machine name (snake_case) |
627-
| **definition** | `{ name?: string; label?: string; description?: string; successMessage?: string; … }` || Partial flow definition to update |
627+
| **definition** | `{ name: string; label: string; description?: string; successMessage?: string; … }` || Complete flow definition to store — the engine requires a full flow; partial update is not implemented |
628628

629629
### Nested Shape: `UpdateFlowRequest.definition`
630630

631631
| Property | Type | Required | Description |
632632
| :--- | :--- | :--- | :--- |
633-
| **name** | `string` | optional | Machine name |
634-
| **label** | `string` | optional | Flow label |
633+
| **name** | `string` | | Machine name |
634+
| **label** | `string` | | Flow label |
635635
| **description** | `string` | optional | |
636636
| **successMessage** | `string` | optional | Message carried on AutomationResult for every terminal run (not only screen flows); the screen-flow UI shows it as a toast instead of a generic "Done". |
637637
| **errorMessage** | `string` | optional | Message carried on AutomationResult for every terminal run (not only screen flows); the screen-flow UI shows it as a toast instead of the raw error. |
638638
| **version** | `integer` | optional (default: `1`) | Version number |
639639
| **status** | `Enum<'draft' \| 'active' \| 'obsolete' \| 'invalid'>` | optional (default: `"draft"`) | Deployment status |
640640
| **template** | `never` | optional | [REMOVED] `flow.template` was removed in @objectstack/spec 17.0.0 (audit close-out) — no designer or engine path ever read it, so flagging a flow as a template/subflow did nothing. Delete the key. Shared logic is invoked via a subflow NODE referencing the flow by name. Run `os migrate meta --from 16` to list the mechanical edits for existing sources; apply them by hand. |
641-
| **type** | `Enum<'autolaunched' \| 'record_change' \| 'schedule' \| 'screen' \| 'api'>` | optional | Flow type |
641+
| **type** | `Enum<'autolaunched' \| 'record_change' \| 'schedule' \| 'screen' \| 'api'>` | | Flow type |
642642
| **variables** | `{ name: string; type: string; isInput?: boolean; isOutput?: boolean; … }[]` | optional | Flow variables |
643-
| **nodes** | `{ id: string; type: string; label: string; config?: Record<string, any>; … }[]` | optional | Flow nodes |
644-
| **edges** | `{ id: string; source: string; target: string; condition?: string \| object; … }[]` | optional | Flow connections |
643+
| **nodes** | `{ id: string; type: string; label: string; config?: Record<string, any>; … }[]` | | Flow nodes |
644+
| **edges** | `{ id: string; source: string; target: string; condition?: string \| object; … }[]` | | Flow connections |
645645
| **active** | `never` | optional | [REMOVED] `flow.active` was removed in @objectstack/spec 17.0.0 (audit close-out) — it never had an effect: the engine arms flows from `status`, and `active: false` did NOT stop a flow (worse, the default read as disabled while the engine treated unset as enabled). Delete the key. Use `status: 'obsolete'` (or 'invalid') to unbind and disable a flow, `status: 'active'` to arm it. Run `os migrate meta --from 16` to list the mechanical edits for existing sources; apply them by hand. |
646646
| **runAs** | `Enum<'system' \| 'user'>` | optional (default: `"user"`) | Execution identity for the run: system = elevated (bypasses RLS), user = the triggering user (RLS-respecting). A run with no trigger user has no identity to scope to, so under user its data operations are REFUSED — declare system to make the elevation explicit. This covers schedule/time-relative/api triggers AND any record-change flow fired by a write that carried no user. |
647647
| **errorHandling** | `{ strategy?: Enum<'fail' \| 'retry' \| 'continue'>; maxRetries?: integer; backoffMs?: integer; backoffMultiplier?: number; … }` | optional | Flow-level error handling configuration. A durable pause ends the retry-governed segment: strategy: 'retry' describes one synchronous dispatch, so a run that parks on an approval/screen/wait node and later resumes gets one attempt for anything that fails after the pause. Protect the post-pause half with its own failure handling in the flow — a try_catch node's retry around the post-resume work, or fault edges to a handler node. |
@@ -666,7 +666,7 @@ const result = AutomationApiErrorCode.parse(data);
666666
| **success** | `boolean` || Operation success status |
667667
| **error** | `{ code: Enum<'VALIDATION_ERROR' \| 'INVALID_FIELD' \| 'MISSING_REQUIRED_FIELD' \| …>; declaredCode?: string; message: string; userMessage?: string; … }` | optional | Error details if success is false |
668668
| **meta** | `{ timestamp: string; duration?: number; requestId?: string; traceId?: string }` | optional | Response metadata |
669-
| **data** | `{ name: string; label: string; description?: string; successMessage?: string; … }` || The updated flow definition |
669+
| **data** | `{ name: string; label: string; description?: string; successMessage?: string; … }` || The updated flow, canonicalized — the parsed shape the engine stored, identical to what a subsequent GET answers |
670670

671671
### Nested Shape: `UpdateFlowResponse.error`
672672

0 commit comments

Comments
 (0)