Skip to content

Commit 159d84d

Browse files
committed
docs(spec): regenerate the analytics API reference for data.object
Generated by `pnpm --filter @objectstack/spec gen:docs`, the one artifact `check:generated` named stale after the response schema gained `object`. Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4ffdc26 commit 159d84d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎content/docs/references/api/analytics.mdx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const result = AnalyticsEndpoint.parse(data);
122122
| **success** | `boolean` | ✅ | Operation success status |
123123
| **error** | `{ code: Enum<'VALIDATION_ERROR' \| 'INVALID_FIELD' \| 'MISSING_REQUIRED_FIELD' \| …>; declaredCode?: string; message: string; userMessage?: string; … }` | optional | Error details if success is false |
124124
| **meta** | `{ timestamp: string; duration?: integer; requestId?: string; traceId?: string }` | optional | Response metadata |
125-
| **data** | `{ rows: Record<string, any>[]; fields: object[]; sql?: string; totals?: object[] }` | ✅ | |
125+
| **data** | `{ rows: Record<string, any>[]; fields: object[]; sql?: string; totals?: object[]; … }` | ✅ | |
126126

127127
### Nested Shape: `AnalyticsResultResponse.error`
128128

@@ -155,6 +155,7 @@ const result = AnalyticsEndpoint.parse(data);
155155
| **fields** | `{ name: string; type: string; label?: string; format?: string; … }[]` | ✅ | Column metadata |
156156
| **sql** | `string` | optional | Executed SQL (if debug enabled) |
157157
| **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. |
158+
| **object** | `string` | optional | The base object of the dataset the answer was computed from: the dataset's `object`, by machine name. Every dataset answer (`POST /analytics/dataset/query`) must carry it, whatever dimensions are selected and whether or not rows came back, so a consumer can refresh on that object's record changes and drill into its records. Absent on a cube query answer, which has no dataset behind it. |
158159

159160

160161
---

0 commit comments

Comments
 (0)