@cube-dev/platform-client 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  <!-- Curate public-facing entries here before the next release. -->
11
11
 
12
+ ## [0.23.0] - 2026-10-22
13
+
14
+ ### Added
15
+
16
+ - `outputPath` and `namePrefix` on `StartDbtSyncInput` (`POST /api/v1/deployments/{deploymentId}/dbt-sync`) override the deployment's saved Output path and Name prefix for one sync, so several dbt projects can sync into one deployment, each into its own folder with its own prefix.
17
+
18
+ ### Changed
19
+
20
+ - A dbt sync that commits to a branch now deletes stale cube files only directly inside the folder it writes its cubes into, and leaves that folder's subfolders alone, so another project's folder nested under it survives the sync. An output path written with a trailing slash, such as `/model/cubes/dbt/`, no longer skips that cleanup: files there that no longer match a dbt model are now deleted.
21
+ - `POST /api/v1/deployments/{deploymentId}/dashboard-exports` now requires **read** access to the dashboard's workbook and the **download data** permission on the deployment, instead of **manage** access to the workbook. **Manage** access to the workbook still passes, so callers that were allowed before keep working.
22
+
23
+ ## [0.22.0] - 2026-10-20
24
+ ### Added
25
+
26
+ - `template` on `CreateDeploymentInput` (`POST /build/api/v1/deployments`) sets the deployment type at creation: `single` (Shared, the default), `simpleCluster` (Dedicated) or `multiCluster`, so a Dedicated deployment is created in one call. `simpleCluster` needs a paid plan. New schema: `CreateDeploymentInputTemplate`.
27
+
12
28
  ## [0.21.0] - 2026-10-17
13
29
  ### Added
14
30
 
package/dist/schema.d.ts CHANGED
@@ -354,7 +354,7 @@ export interface paths {
354
354
  *
355
355
  * Every user's AI chat threads in the deployment, most recently updated first, for analyzing how people use the agent. Filters combine with AND; a filter given several values matches any of them.
356
356
  *
357
- * Set `includeTurns=true` to get each thread's turns in the same response. A turn is one prompt and everything the agent did to answer it: the final answer, the tools it called, and each query it ran with its SQL, status, row count and any thumbs-up/down feedback. Query result rows are never included. A prompt, answer or SQL longer than 20,000 characters, or an error longer than 2,000, is cut and ends in `…`. A page holds up to 200 threads, or 50 with turns; a larger `first` is lowered to that.
357
+ * Set `includeTurns=true` to get each thread's turns in the same response. A turn is one prompt and everything the agent did to answer it: the final answer, the tools it called, and each query it ran with its SQL, status, row count and any thumbs-up/down feedback. A prompt, answer or SQL longer than 20,000 characters, or an error longer than 2,000, is cut and ends in `…`. Each turn's steps and each query's result rows come only with a single thread. A page holds up to 200 threads, or 50 with turns; a larger `first` is lowered to that.
358
358
  *
359
359
  * For an incremental export, keep the newest `updatedAt` you have seen and pass it as `updatedAfter` next time.
360
360
  *
@@ -380,7 +380,7 @@ export interface paths {
380
380
  * Get a chat thread
381
381
  * @description **🔒 Admin only.** Requires administrator privileges — the authenticated principal (API key, embed JWT, or any bearer token) must belong to a user with the admin role.
382
382
  *
383
- * One chat thread with all of its turns, oldest first. A turn is one prompt and everything the agent did to answer it: the final answer, the tools it called, and each query it ran with its SQL, status, row count and any thumbs-up/down feedback. Query result rows are never included. A prompt, answer or SQL longer than 20,000 characters, or an error longer than 2,000, is cut and ends in `…`.
383
+ * One chat thread with all of its turns, oldest first. A turn is one prompt and everything the agent did to answer it: the final answer, the tools it called, and each query it ran with its SQL, status, row count and any thumbs-up/down feedback. A prompt, answer or SQL longer than 20,000 characters, or an error longer than 2,000, is cut and ends in `…`. Each turn also lists its `steps`: every reply the agent wrote, with its reasoning, and every tool it called, with its input, in the order they began; their texts are cut the same way. Each query carries up to 100 of its result `rows`.
384
384
  *
385
385
  * Chat history export is in preview: when it is not enabled for the account, `404` is returned.
386
386
  */
@@ -446,7 +446,7 @@ export interface paths {
446
446
  *
447
447
  * Pass `layout: print` with `format: pdf` for the paginated A4 document the dashboard's "Download print version" menu item produces — one column, every table row, the filter state as a summary line — instead of the default `screenshot` of the board. `print` with `format: png` returns `400`.
448
448
  *
449
- * By default the dashboard renders under the calling user's own security context, so the file shows what that user would see. Requires **manage** access to the dashboard's workbook — the same permission the console's own "Download as PNG / PDF" actions require, because a whole-dashboard render is a bulk data export.
449
+ * By default the dashboard renders under the calling user's own security context, so the file shows what that user would see. Requires **read** access to the dashboard's workbook and the **download data** permission on the deployment — the same rule the console's own "Download as PNG / PDF" actions follow. **Manage** access to the workbook also passes, as it did before the download data permission was required.
450
450
  *
451
451
  * To export on someone else's behalf, pass `renderAs`: the queries behind the image then run under that user's security context instead of yours. **Requires the caller to be a tenant administrator.** Name a console user by `userId` or `email` (`type: USER`), or an embed user by `embedTenantName` + `externalId` (`type: EMBED_USER`). A deactivated console user is not a valid subject and returns `404`; an email is matched case-insensitively.
452
452
  *
@@ -855,7 +855,11 @@ export interface paths {
855
855
  path?: never;
856
856
  cookie?: never;
857
857
  };
858
- get?: never;
858
+ /**
859
+ * List evaluation runs
860
+ * @description Returns the eval runs of the deployment, newest first. Use a run id with GET /evaluations/{evaluationId} and /results. This capability is currently in preview — reach out to the Cube support team to activate it for your account.
861
+ */
862
+ get: operations["EvaluationsPublicController.listEvaluations"];
859
863
  put?: never;
860
864
  /**
861
865
  * Start an evaluation run
@@ -4281,6 +4285,8 @@ export interface components {
4281
4285
  /** @enum {string} */
4282
4286
  BulkUserActionResponseAction: "DEACTIVATE" | "ACTIVATE" | "DELETE";
4283
4287
  ChatHistoryQuery: {
4288
+ /** @description The column name of each `rows` cell. Returned only when reading a single thread. Null when `rows` is. */
4289
+ columns?: string[] | null;
4284
4290
  /** @description The data source a `runSql` query ran on. */
4285
4291
  dataSource?: string | null;
4286
4292
  error?: string | null;
@@ -4288,8 +4294,10 @@ export interface components {
4288
4294
  feedback?: components["schemas"]["ChatHistoryQueryFeedback"] | null;
4289
4295
  /** @description The tool-call message id. */
4290
4296
  messageId: string;
4291
- /** @description Rows the query returned. The rows themselves are never included. */
4297
+ /** @description How many rows the query returned. */
4292
4298
  rowCount?: number | null;
4299
+ /** @description The result rows the agent saw, at most 100; `rowCount` says how many the query returned. Returned only when reading a single thread. Null when the query returned no result, as when it failed or was stopped. */
4300
+ rows?: any[][] | null;
4293
4301
  /** @description The SQL the agent generated. */
4294
4302
  sql?: string | null;
4295
4303
  /** @description `incomplete` when the query never returned: the turn was stopped or failed. */
@@ -4306,6 +4314,28 @@ export interface components {
4306
4314
  };
4307
4315
  /** @enum {string} */
4308
4316
  ChatHistoryQueryStatus: "success" | "error" | "incomplete";
4317
+ ChatHistoryStep: {
4318
+ /** @description Tool steps: the arguments the agent passed, as JSON. */
4319
+ input?: string | null;
4320
+ /** @description The message id; a query's step shares its `messageId`. */
4321
+ messageId: string;
4322
+ /** @description Model steps: the model's reasoning, as the model reported it; some models report only a summary, and a stopped step may hold only its start. Null when it reported none. */
4323
+ reasoning?: string | null;
4324
+ /** @description When the step began. Null for steps recorded before Cube stored step times. */
4325
+ startedAt?: string | null;
4326
+ /** @description Tool steps: `incomplete` when the tool never returned. */
4327
+ status?: components["schemas"]["ChatHistoryStepStatus"] | null;
4328
+ /** @description Model steps: what the agent wrote, such as a note before calling tools or its answer. */
4329
+ text?: string | null;
4330
+ /** @description Tool steps: the tool the agent called. */
4331
+ tool?: string | null;
4332
+ /** @description `model` for a reply the agent wrote, `tool` for a tool it called. */
4333
+ type: components["schemas"]["ChatHistoryStepType"];
4334
+ };
4335
+ /** @enum {string} */
4336
+ ChatHistoryStepStatus: "success" | "error" | "incomplete";
4337
+ /** @enum {string} */
4338
+ ChatHistoryStepType: "model" | "tool";
4309
4339
  ChatHistoryThread: {
4310
4340
  /** @description Null for the Auto agent. */
4311
4341
  agentId?: number | null;
@@ -4351,6 +4381,8 @@ export interface components {
4351
4381
  queries: components["schemas"]["ChatHistoryQuery"][];
4352
4382
  /** @description When the user sent the prompt. Null for turns recorded before Cube stored turn times. */
4353
4383
  startedAt?: string | null;
4384
+ /** @description Everything the agent did in the turn, in the order it began: each reply with its reasoning, and each tool call. When any step has no `startedAt`, the steps are in the order they last changed instead. Returned only when reading a single thread. */
4385
+ steps?: components["schemas"]["ChatHistoryStep"][] | null;
4354
4386
  /** @description Every tool the agent called in the turn, in first-call order. */
4355
4387
  tools: string[];
4356
4388
  };
@@ -4456,6 +4488,8 @@ export interface components {
4456
4488
  name: string;
4457
4489
  region: string;
4458
4490
  targetPlatform: string;
4491
+ /** @description Deployment type: `single` (Shared, the default), `simpleCluster` (Dedicated) or `multiCluster`. `simpleCluster` needs a paid plan. */
4492
+ template?: components["schemas"]["CreateDeploymentInputTemplate"] | null;
4459
4493
  };
4460
4494
  /** @enum {string} */
4461
4495
  CreateDeploymentInputCloudProvider: "cubecloud" | "aws" | "gcp";
@@ -4463,6 +4497,8 @@ export interface components {
4463
4497
  CreateDeploymentInputCreationMethod: "upload" | "cubecloud" | "github" | "ssh";
4464
4498
  /** @enum {string} */
4465
4499
  CreateDeploymentInputDeployMode: "git" | "cli";
4500
+ /** @enum {string} */
4501
+ CreateDeploymentInputTemplate: "single" | "simpleCluster" | "multiCluster";
4466
4502
  CreateDeploymentTokenInput: {
4467
4503
  /** @description Token lifetime in seconds, between 60 and 86400. Omit to keep the historical default of 24 hours (86400). Callers that hold the token outside a browser session — scripts, BI tools, scheduled jobs — should request a short lifetime and re-issue tokens instead. */
4468
4504
  expiresIn?: number | null;
@@ -5781,6 +5817,10 @@ export interface components {
5781
5817
  status: string;
5782
5818
  updatedAt: string;
5783
5819
  };
5820
+ EvaluationRunsListResponse: {
5821
+ items: components["schemas"]["EvaluationRunResponse"][];
5822
+ pageInfo: components["schemas"]["PageInfo"];
5823
+ };
5784
5824
  ExportSubjectInput: {
5785
5825
  /** @description Main user email (for type=USER; provide this OR userId). For type=EMBED_USER it is the email recorded on the provisioned embed user, and the externalId is used when it is omitted. */
5786
5826
  email?: string | null;
@@ -7144,8 +7184,12 @@ export interface components {
7144
7184
  manifest?: {
7145
7185
  [key: string]: any;
7146
7186
  } | null;
7187
+ /** @description Prefix for this sync’s cube names and file names, e.g. `sales_`. Overrides the Name prefix saved in the deployment’s dbt settings for this sync only; an empty string means no prefix. Cube names must be unique across the data model, so give each dbt project its own prefix when two projects can share a model name. */
7188
+ namePrefix?: string | null;
7147
7189
  /** @description What to do with the generated cubes. `branch` (the default) commits them to a new Cube branch for review. `files` commits nothing and creates no branch — the files are returned from `GET /dbt-sync/{syncJobId}/generated-files` instead, so your own CI can commit them to your repository through its normal review. Independent of `source`. */
7148
7190
  output?: components["schemas"]["StartDbtSyncInputOutput"] | null;
7191
+ /** @description Repository folder for this sync’s generated cube files, e.g. `model/cubes/dbt/sales` (a leading `/` is optional). Overrides the Output path saved in the deployment’s dbt settings for this sync only. A sync replaces the files directly inside this folder and leaves its subfolders alone, so syncing several dbt projects into one deployment works when each gets its own folder and its own `namePrefix`. */
7192
+ outputPath?: string | null;
7149
7193
  /** @description Git ref in the dbt repository to sync from — a branch or a tag, NOT a commit SHA. Overrides the branch saved on the deployment’s dbt git integration for this sync only, so CI can sync the ref under review (e.g. a pull request’s head branch) instead of the tracked branch. The generated Cube branch is named after it. */
7150
7194
  ref?: string | null;
7151
7195
  /** @description Where the dbt metadata comes from. `git` (the default) clones the deployment’s dbt repository and runs dbt to produce a manifest. `manifest` converts a manifest you supply in `manifest` below, so Cube never needs access to the dbt repository — and the sync takes seconds rather than minutes, because no sandbox is provisioned and no dbt command runs. */
@@ -9342,6 +9386,30 @@ export interface operations {
9342
9386
  };
9343
9387
  };
9344
9388
  };
9389
+ "EvaluationsPublicController.listEvaluations": {
9390
+ parameters: {
9391
+ query?: {
9392
+ after?: string | null;
9393
+ first?: number | null;
9394
+ };
9395
+ header?: never;
9396
+ path: {
9397
+ deploymentId: number;
9398
+ };
9399
+ cookie?: never;
9400
+ };
9401
+ requestBody?: never;
9402
+ responses: {
9403
+ 200: {
9404
+ headers: {
9405
+ [name: string]: any;
9406
+ };
9407
+ content: {
9408
+ "application/json": components["schemas"]["EvaluationRunsListResponse"];
9409
+ };
9410
+ };
9411
+ };
9412
+ };
9345
9413
  "EvaluationsPublicController.startEvaluation": {
9346
9414
  parameters: {
9347
9415
  query?: never;