Skip to content

Commit 9ae9960

Browse files
committed
chore(spec): regenerate reference docs, strictness ledger and import-surface baseline
Tooling output of the schema widening, not hand-written: - `gen:docs` re-renders the analytics/automation-api reference pages with the newly declared members and the now-importable `AnalyticsResultResponse`. - `gen:strictness-ledger` moves the `api/` unknown-key site count 444 -> 448. - `--update-import-baseline` discharges the shrink-only ratchet entry `api/AnalyticsResultResponse — no type export`: the gap the card names is closed, and a stale line would stay available to excuse the next one.
1 parent 4f6cb1d commit 9ae9960

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

content/docs/references/api/analytics.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Provides endpoints for executing analytical queries and discovering metadata.
1818

1919
```typescript
2020
import { AnalyticsEndpoint, AnalyticsMetadataResponseSchema, AnalyticsQueryRequestSchema, AnalyticsResultResponseSchema, AnalyticsSqlResponseSchema, GetAnalyticsMetaRequestSchema } from '@objectstack/spec/api';
21-
import type { AnalyticsEndpoint, AnalyticsMetadataResponse, AnalyticsQueryRequest, AnalyticsSqlResponse, GetAnalyticsMetaRequest } from '@objectstack/spec/api';
21+
import type { AnalyticsEndpoint, AnalyticsMetadataResponse, AnalyticsQueryRequest, AnalyticsResultResponse, AnalyticsSqlResponse, GetAnalyticsMetaRequest } from '@objectstack/spec/api';
2222

2323
// Validate data
2424
const result = AnalyticsEndpoint.parse(data);
@@ -103,7 +103,7 @@ const result = AnalyticsEndpoint.parse(data);
103103
| **success** | `boolean` || Operation success status |
104104
| **error** | `{ code: Enum<'VALIDATION_ERROR' \| 'INVALID_FIELD' \| 'MISSING_REQUIRED_FIELD' \| …>; declaredCode?: string; message: string; userMessage?: string; … }` | optional | Error details if success is false |
105105
| **meta** | `{ timestamp: string; duration?: number; requestId?: string; traceId?: string }` | optional | Response metadata |
106-
| **data** | `{ rows: Record<string, any>[]; fields: object[]; sql?: string }` || |
106+
| **data** | `{ rows: Record<string, any>[]; fields: object[]; sql?: string; totals?: object[] }` || |
107107

108108
### Nested Shape: `AnalyticsResultResponse.error`
109109

@@ -123,8 +123,9 @@ const result = AnalyticsEndpoint.parse(data);
123123
| Property | Type | Required | Description |
124124
| :--- | :--- | :--- | :--- |
125125
| **rows** | `Record<string, any>[]` || Result rows |
126-
| **fields** | `{ name: string; type: string }[]` || Column metadata |
126+
| **fields** | `{ name: string; type: string; label?: string; format?: string; … }[]` || Column metadata |
127127
| **sql** | `string` | optional | Executed SQL (if debug enabled) |
128+
| **totals** | `{ dimensions: string[]; rows: Record<string, any>[] }[]` | optional | Marginal aggregates - one entry per requested totals grouping, in request order, each computed with the measure's true aggregate over the underlying data (never re-derived from bucketed values). The grand-total grouping yields a single dimensionless row. |
128129

129130

130131
---

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ const result = AutomationApiErrorCode.parse(data);
583583
| **success** | `boolean` || Operation success status |
584584
| **error** | `{ code: Enum<'VALIDATION_ERROR' \| 'INVALID_FIELD' \| 'MISSING_REQUIRED_FIELD' \| …>; declaredCode?: string; message: string; userMessage?: string; … }` | optional | Error details if success is false |
585585
| **meta** | `{ timestamp: string; duration?: number; requestId?: string; traceId?: string }` | optional | Response metadata |
586-
| **data** | `{ success: boolean; output?: any; error?: string; durationMs?: number }` || |
586+
| **data** | `{ success: boolean; output?: any; error?: string; durationMs?: number; … }` || |
587587

588588
### Nested Shape: `TriggerFlowResponse.error`
589589

@@ -606,6 +606,13 @@ const result = AutomationApiErrorCode.parse(data);
606606
| **output** | `any` | optional | Output data from the automation |
607607
| **error** | `string` | optional | Error message if execution failed |
608608
| **durationMs** | `number` | optional | Execution duration in milliseconds |
609+
| **code** | `Enum<'PERMISSION_DENIED' \| 'INVALID_SIGNAL' \| 'RUN_NOT_FOUND' \| 'STORE_UNAVAILABLE' \| …>` | optional | Machine-readable failure classification, set alongside `error` when the caller must distinguish WHY it failed. A closed union - the members and their transport mappings are documented on the contract (`AutomationResult.code`, contracts/automation-service.ts). |
610+
| **status** | `Enum<'completed' \| 'paused' \| 'failed'>` | optional | Lifecycle status. `paused` means the run suspended at a node and can be continued with the resume route. Absent or `completed`/`failed` means the run reached a terminal state. |
611+
| **runId** | `string` | optional | Run id - set when `status` is `paused`, so callers can resume it |
612+
| **screen** | `{ nodeId: string; title?: string; description?: string; fields: object[]; … }` | optional | The screen to render - set when the run paused at a `screen` node awaiting user input. The client collects values for `screen.fields` and resumes the run with them. |
613+
| **successMessage** | `string` | optional | Friendly terminal message copied from the flow definition on terminal success, so a screen-flow runner can show a meaningful toast |
614+
| **errorMessage** | `string` | optional | Friendly terminal message copied from the flow definition on failure |
615+
| **summary** | `{ selected: integer; acted: integer; skipped: integer; unmeasured?: integer; … }` | optional | What the run did - records selected / acted on, gate skips, per-node status. Set on a TERMINAL result (a paused run has not finished doing it yet). |
609616

610617

611618
---

docs/audits/2026-07-unknown-key-strictness-ledger.counts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ directory rather than per file.
257257
| Dir | Sites |
258258
|---|---|
259259
| `ai/` | 77 |
260-
| `api/` | 444 |
260+
| `api/` | 448 |
261261
| `cloud/` | 83 |
262262
| `identity/` | 32 |
263263
| `integration/` | 10 |

packages/spec/docs-import-surface.baseline.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"ai/AIModelConfig — no type export",
55
"ai/CodeContent — no type export",
66
"ai/ImageContent — no type export",
7-
"api/AnalyticsResultResponse — no type export",
87
"api/Discovery — no type export",
98
"api/HttpFindQueryParams — no type export",
109
"api/MetadataExportRequest — no type export",

0 commit comments

Comments
 (0)