@naturali/cli 0.206.11 → 0.207.1

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.
Files changed (2) hide show
  1. package/dist/index.mjs +113 -1
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
17
17
  };
18
18
  //#endregion
19
19
  //#region package.json
20
- var version = "0.206.11";
20
+ var version = "0.207.1";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -6463,6 +6463,32 @@ var Workflows = class {
6463
6463
  }
6464
6464
  });
6465
6465
  }
6466
+ /**
6467
+ * Migrate a workflow's open tasks to one of its versions
6468
+ *
6469
+ * Moves every open task of the workflow that runs on an older version, or on none, onto `to_version`. Each task is migrated as migrate-task migrates one and needs `tasks:MigrateTask` on it; a task it would refuse is reported as `refused` with the error, and the run goes on. The tasks and the caller's permission on each are fixed when the run is recorded. A `state_map` target the version lacks, or a terminal one, refuses the request before any task moves. Runs in the background by default (`status: queued`); `wait: true` answers once every task has settled. See [Migrating every open task](/docs/modules/workflows#migrating-every-open-task).
6470
+ */
6471
+ static createWorkflowMigration(options) {
6472
+ return (options.client ?? client).post({
6473
+ url: "/v1/projects/{project_id}/workflows/{workflow_id}/migrations",
6474
+ ...options,
6475
+ headers: {
6476
+ "Content-Type": "application/json",
6477
+ ...options.headers
6478
+ }
6479
+ });
6480
+ }
6481
+ /**
6482
+ * Get a workflow migration
6483
+ *
6484
+ * Returns a workflow migration with the outcome of each task.
6485
+ */
6486
+ static getWorkflowMigration(options) {
6487
+ return (options.client ?? client).get({
6488
+ url: "/v1/projects/{project_id}/workflows/{workflow_id}/migrations/{migration_id}",
6489
+ ...options
6490
+ });
6491
+ }
6466
6492
  };
6467
6493
  //#endregion
6468
6494
  //#region ../sdk/src/naturaliClient.ts
@@ -24554,6 +24580,92 @@ const routes = {
24554
24580
  "in": "body"
24555
24581
  }
24556
24582
  ]
24583
+ },
24584
+ "create-workflow-migration": {
24585
+ serviceClass: "Workflows",
24586
+ operationId: "createWorkflowMigration",
24587
+ description: "Moves every open task of the workflow that runs on an older version, or on none, onto `to_version`. Each task is migrated as migrate-task migrates one and needs `tasks:MigrateTask` on it; a task it would refuse is reported as `refused` with the error, and the run goes on. The tasks and the caller's permission on each are fixed when the run is recorded. A `state_map` target the version lacks, or a terminal one, refuses the request before any task moves. Runs in the background by default (`status: queued`); `wait: true` answers once every task has settled. See [Migrating every open task](/docs/modules/workflows#migrating-every-open-task).",
24588
+ moduleDocsUrl: "https://naturali.ai/docs/modules/workflows",
24589
+ httpMethod: "post",
24590
+ pathParams: ["project_id", "workflow_id"],
24591
+ queryParams: [],
24592
+ headerParams: [],
24593
+ cookieParams: [],
24594
+ flags: [
24595
+ {
24596
+ "name": "project_id",
24597
+ "description": "Project public ID (proj_ prefix).",
24598
+ "required": true,
24599
+ "type": "string",
24600
+ "in": "path"
24601
+ },
24602
+ {
24603
+ "name": "workflow_id",
24604
+ "description": "The workflow whose tasks migrate.",
24605
+ "required": true,
24606
+ "type": "string",
24607
+ "in": "path"
24608
+ },
24609
+ {
24610
+ "name": "to_version",
24611
+ "description": "The workflow version to move the open tasks onto.",
24612
+ "required": true,
24613
+ "type": "integer",
24614
+ "in": "body"
24615
+ },
24616
+ {
24617
+ "name": "state_map",
24618
+ "description": "Current state name to a state the target version declares, applied to every task as migrate-task applies it to one.",
24619
+ "required": false,
24620
+ "type": "object",
24621
+ "in": "body"
24622
+ },
24623
+ {
24624
+ "name": "wait",
24625
+ "description": "When omitted or `false` (default), the run is answered `queued` and settles in the background; poll get-workflow-migration. Pass `true` to answer once every task has settled.",
24626
+ "required": false,
24627
+ "type": "boolean",
24628
+ "in": "body"
24629
+ }
24630
+ ]
24631
+ },
24632
+ "get-workflow-migration": {
24633
+ serviceClass: "Workflows",
24634
+ operationId: "getWorkflowMigration",
24635
+ description: "Returns a workflow migration with the outcome of each task.",
24636
+ moduleDocsUrl: "https://naturali.ai/docs/modules/workflows",
24637
+ httpMethod: "get",
24638
+ pathParams: [
24639
+ "project_id",
24640
+ "workflow_id",
24641
+ "migration_id"
24642
+ ],
24643
+ queryParams: [],
24644
+ headerParams: [],
24645
+ cookieParams: [],
24646
+ flags: [
24647
+ {
24648
+ "name": "project_id",
24649
+ "description": "Project public ID (proj_ prefix).",
24650
+ "required": true,
24651
+ "type": "string",
24652
+ "in": "path"
24653
+ },
24654
+ {
24655
+ "name": "workflow_id",
24656
+ "description": "The workflow whose tasks migrate.",
24657
+ "required": true,
24658
+ "type": "string",
24659
+ "in": "path"
24660
+ },
24661
+ {
24662
+ "name": "migration_id",
24663
+ "description": "The workflow migration to read.",
24664
+ "required": true,
24665
+ "type": "string",
24666
+ "in": "path"
24667
+ }
24668
+ ]
24557
24669
  }
24558
24670
  };
24559
24671
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.206.11",
3
+ "version": "0.207.1",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -31,7 +31,7 @@
31
31
  "yaml": "^2.9.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@naturali/sdk": "0.206.11",
34
+ "@naturali/sdk": "0.207.1",
35
35
  "@ttoss/openapi-codegen": "^0.5.0",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",