@zapier/zapier-sdk-cli 0.81.3 โ†’ 0.82.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
@@ -1,5 +1,33 @@
1
1
  # @zapier/zapier-sdk-cli
2
2
 
3
+ ## 0.82.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f8637ed: Added `runWorkflowDraft` (experimental), exposed in the CLI as `run-workflow-draft`. Launches a draft test run: executes a workflow draft's current source without publishing it.
8
+ - Pass `workflow`, `draft`, and `draftRevision` (from the last read of the draft). The run is rejected with a conflict error if the draft changed since. In interactive CLI use, `draftRevision` resolves via a picker that reads the draft's current revision, so it never has to be typed by hand.
9
+ - Optionally pass `input` for workflows that take input.
10
+ - Draft runs are free (not task-charged) and rate limited per user.
11
+ - The run is accepted asynchronously and returned with `kind: "draft"` and status `initialized`; follow it with `getWorkflowRun`, or list draft runs via `listWorkflowRuns` with `kind: "draft"`.
12
+
13
+ - f8637ed: Workflow runs now carry a `kind` discriminator (`"live"` or `"draft"`), and `listWorkflowRuns` (CLI: `list-workflow-runs`) accepts a `kind` filter โ€” omit it for both kinds interleaved by recency. The `getWorkflowRun` and `listWorkflowRuns` response schemas are discriminated unions on `kind`, so TypeScript narrows kind-specific fields after a `run.kind === "draft"` check, and each kind carries only its own fields:
14
+
15
+ | Kind | Fields |
16
+ | ------- | ----------------------------------------------------------- |
17
+ | `live` | `trigger_id`, `workflow_version_id` (absent on draft runs) |
18
+ | `draft` | `workflow_draft_id`, `draft_revision` (absent on live runs) |
19
+
20
+ This also fixes `listWorkflowRuns` rejecting responses for workflows that have draft runs: draft rows omit the live-only fields, which the previous response schema treated as required.
21
+
22
+ `getWorkflowRun` responses now also include `workflow_id` (always returned by the API, previously stripped by the SDK's response schema).
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [f8637ed]
27
+ - Updated dependencies [f8637ed]
28
+ - @zapier/zapier-sdk@0.110.0
29
+ - @zapier/zapier-sdk-mcp@0.24.0
30
+
3
31
  ## 0.81.3
4
32
 
5
33
  ### Patch Changes
package/README.md CHANGED
@@ -55,6 +55,7 @@
55
55
  - [`publish-workflow-draft`](#publish-workflow-draft--experimental)
56
56
  - [`publish-workflow-version`](#publish-workflow-version--experimental)
57
57
  - [`run-durable`](#run-durable--experimental)
58
+ - [`run-workflow-draft`](#run-workflow-draft--experimental)
58
59
  - [`trigger-workflow`](#trigger-workflow--experimental)
59
60
  - [`update-agentic-management-config`](#update-agentic-management-config--experimental)
60
61
  - [`update-agentic-management-intent`](#update-agentic-management-intent--experimental)
@@ -801,7 +802,7 @@ npx zapier-sdk get-workflow-draft <workflow> <draft>
801
802
 
802
803
  #### `get-workflow-run` ๐Ÿงช _experimental_
803
804
 
804
- Get the current state of a workflow run (a triggered execution of a deployed workflow)
805
+ Get the current state of a workflow run โ€” a live run of a published workflow version, or a draft run launched via `runWorkflowDraft` (the `kind` field says which)
805
806
 
806
807
  **Options:**
807
808
 
@@ -892,21 +893,22 @@ npx zapier-sdk list-workflow-drafts <workflow> [--status] [--slug] [--page-size]
892
893
 
893
894
  #### `list-workflow-runs` ๐Ÿงช _experimental_
894
895
 
895
- List workflow runs (triggered executions) for a specific deployed workflow, newest first
896
+ List workflow runs for a specific workflow, newest first. Live runs (of published versions) and draft runs share the one list; pass `kind` to narrow it to one.
896
897
 
897
898
  **Options:**
898
899
 
899
- | Option | Type | Required | Default | Possible Values | Description |
900
- | ------------- | -------- | -------- | ------- | --------------- | --------------------------------------------- |
901
- | `<workflow>` | `string` | โœ… | โ€” | โ€” | Durable workflow ID |
902
- | `--page-size` | `number` | โŒ | โ€” | โ€” | Number of runs per page (max 100) |
903
- | `--cursor` | `string` | โŒ | โ€” | โ€” | Pagination cursor |
904
- | `--max-items` | `number` | โŒ | โ€” | โ€” | Maximum total runs to return across all pages |
900
+ | Option | Type | Required | Default | Possible Values | Description |
901
+ | ------------- | -------- | -------- | ------- | --------------- | --------------------------------------------------------------------- |
902
+ | `<workflow>` | `string` | โœ… | โ€” | โ€” | Durable workflow ID |
903
+ | `--page-size` | `number` | โŒ | โ€” | โ€” | Number of runs per page (max 100) |
904
+ | `--kind` | `string` | โŒ | โ€” | `live`, `draft` | Return only runs of this kind. Omit for both, interleaved by recency. |
905
+ | `--cursor` | `string` | โŒ | โ€” | โ€” | Pagination cursor |
906
+ | `--max-items` | `number` | โŒ | โ€” | โ€” | Maximum total runs to return across all pages |
905
907
 
906
908
  **Usage:**
907
909
 
908
910
  ```bash
909
- npx zapier-sdk list-workflow-runs <workflow> [--page-size] [--cursor] [--max-items]
911
+ npx zapier-sdk list-workflow-runs <workflow> [--page-size] [--kind] [--cursor] [--max-items]
910
912
  ```
911
913
 
912
914
  #### `list-workflow-versions` ๐Ÿงช _experimental_
@@ -1018,6 +1020,25 @@ Run a workflow source file as a run-once durable run on code-substrate-runner (n
1018
1020
  npx zapier-sdk run-durable <source-files> [--input] [--dependencies] [--zapier-durable-version] [--connections] [--app-versions] [--private] [--notifications]
1019
1021
  ```
1020
1022
 
1023
+ #### `run-workflow-draft` ๐Ÿงช _experimental_
1024
+
1025
+ Launch a draft test run: execute the draft's current source without publishing it. The draft's payload is snapshotted onto the run at creation, so later edits (or discarding the draft) never change what the run executed. Draft runs are free (not task-charged) and rate limited per user. The run is accepted asynchronously โ€” it comes back `initialized`; follow it with `getWorkflowRun`, or list it via `listWorkflowRuns` with `kind: "draft"`.
1026
+
1027
+ **Options:**
1028
+
1029
+ | Option | Type | Required | Default | Possible Values | Description |
1030
+ | ------------------ | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1031
+ | `<workflow>` | `string` | โœ… | โ€” | โ€” | Durable workflow ID |
1032
+ | `<draft>` | `string` | โœ… | โ€” | โ€” | Workflow draft ID |
1033
+ | `<draft-revision>` | `number` | โœ… | โ€” | โ€” | The draft revision you intend to run, from the last read of the draft. The server rejects the run with a conflict if the draft has changed since. The upstream API treats this check as optional; the SDK requires it so a test run can never silently execute source the caller has already replaced. |
1034
+ | `--input` | `unknown` | โŒ | โ€” | โ€” | Input data passed to the workflow. Accepts any JSON value, or its JSON-string encoding. Omit for a workflow that takes no input. |
1035
+
1036
+ **Usage:**
1037
+
1038
+ ```bash
1039
+ npx zapier-sdk run-workflow-draft <workflow> <draft> <draft-revision> [--input]
1040
+ ```
1041
+
1021
1042
  #### `trigger-workflow` ๐Ÿงช _experimental_
1022
1043
 
1023
1044
  Look up a workflow's trigger URL and fire it manually, as the authenticated account.
package/dist/cli.cjs CHANGED
@@ -602,7 +602,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
602
602
 
603
603
  // package.json
604
604
  var package_default = {
605
- version: "0.81.3"};
605
+ version: "0.82.0"};
606
606
  var PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
607
607
  var LOCKFILES = [
608
608
  ["pnpm-lock.yaml", "pnpm"],
@@ -8699,7 +8699,7 @@ function buildBoxLines(message) {
8699
8699
  // package.json with { type: 'json' }
8700
8700
  var package_default2 = {
8701
8701
  name: "@zapier/zapier-sdk-cli",
8702
- version: "0.81.3"};
8702
+ version: "0.82.0"};
8703
8703
 
8704
8704
  // src/sdk.ts
8705
8705
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
package/dist/cli.mjs CHANGED
@@ -558,7 +558,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
558
558
 
559
559
  // package.json
560
560
  var package_default = {
561
- version: "0.81.3"};
561
+ version: "0.82.0"};
562
562
  var PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
563
563
  var LOCKFILES = [
564
564
  ["pnpm-lock.yaml", "pnpm"],
@@ -8655,7 +8655,7 @@ function buildBoxLines(message) {
8655
8655
  // package.json with { type: 'json' }
8656
8656
  var package_default2 = {
8657
8657
  name: "@zapier/zapier-sdk-cli",
8658
- version: "0.81.3"};
8658
+ version: "0.82.0"};
8659
8659
 
8660
8660
  // src/sdk.ts
8661
8661
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -7192,7 +7192,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
7192
7192
  // package.json with { type: 'json' }
7193
7193
  var package_default = {
7194
7194
  name: "@zapier/zapier-sdk-cli",
7195
- version: "0.81.3"};
7195
+ version: "0.82.0"};
7196
7196
 
7197
7197
  // src/sdk.ts
7198
7198
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -7151,7 +7151,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
7151
7151
  // package.json with { type: 'json' }
7152
7152
  var package_default = {
7153
7153
  name: "@zapier/zapier-sdk-cli",
7154
- version: "0.81.3"};
7154
+ version: "0.82.0"};
7155
7155
 
7156
7156
  // src/sdk.ts
7157
7157
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
package/dist/index.cjs CHANGED
@@ -7193,7 +7193,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
7193
7193
  // package.json with { type: 'json' }
7194
7194
  var package_default = {
7195
7195
  name: "@zapier/zapier-sdk-cli",
7196
- version: "0.81.3"};
7196
+ version: "0.82.0"};
7197
7197
 
7198
7198
  // src/sdk.ts
7199
7199
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -7277,7 +7277,7 @@ function createZapierCliSdk(options = {}) {
7277
7277
 
7278
7278
  // package.json
7279
7279
  var package_default2 = {
7280
- version: "0.81.3"};
7280
+ version: "0.82.0"};
7281
7281
 
7282
7282
  // src/telemetry/builders.ts
7283
7283
  function createCliBaseEvent(context = {}) {
package/dist/index.mjs CHANGED
@@ -7152,7 +7152,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
7152
7152
  // package.json with { type: 'json' }
7153
7153
  var package_default = {
7154
7154
  name: "@zapier/zapier-sdk-cli",
7155
- version: "0.81.3"};
7155
+ version: "0.82.0"};
7156
7156
 
7157
7157
  // src/sdk.ts
7158
7158
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -7236,7 +7236,7 @@ function createZapierCliSdk(options = {}) {
7236
7236
 
7237
7237
  // package.json
7238
7238
  var package_default2 = {
7239
- version: "0.81.3"};
7239
+ version: "0.82.0"};
7240
7240
 
7241
7241
  // src/telemetry/builders.ts
7242
7242
  function createCliBaseEvent(context = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-cli",
3
- "version": "0.81.3",
3
+ "version": "0.82.0",
4
4
  "description": "Command line interface for Zapier SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -95,9 +95,9 @@
95
95
  "typescript": "^5.8.3",
96
96
  "wrap-ansi": "^10.0.0",
97
97
  "zod": "4.3.6",
98
- "@zapier/kitcore": "0.20.0",
99
- "@zapier/zapier-sdk-mcp": "0.23.3",
100
- "@zapier/zapier-sdk": "0.109.1"
98
+ "@zapier/zapier-sdk": "0.110.0",
99
+ "@zapier/zapier-sdk-mcp": "0.24.0",
100
+ "@zapier/kitcore": "0.20.0"
101
101
  },
102
102
  "devDependencies": {
103
103
  "@types/cross-spawn": "^6.0.6",