@zapier/zapier-sdk-cli 0.67.5 → 0.68.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,28 @@
1
1
  # @zapier/zapier-sdk-cli
2
2
 
3
+ ## 0.68.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 56f0789: Added an `ignoreOpenDrafts` option (experimental) to `publishWorkflowVersion`, exposed in the CLI as `--ignore-open-drafts` on `publish-workflow-version`. Publishing a version directly is rejected with a 409 conflict while the workflow has open draft(s), since publishing a draft later would ship its stale content over the new version; set this option to publish anyway.
8
+
9
+ Every 409 from `publishWorkflowVersion` now surfaces as a `ZapierConflictError` (matching `publishWorkflowDraft`) instead of a generic API error. The open-draft 409 additionally lists the blocking drafts (id, slug, last edited) and the remediations — publish the draft (`publishWorkflowDraft`), discard it (`discardWorkflowDraft`), or force with `ignoreOpenDrafts`. The structured draft list rides on the error's `meta.open_drafts` (typed via the new `OpenDraftRef` export on `@zapier/zapier-sdk/experimental`), and the CLI's `--json` error envelope includes it, so agents can resolve the conflict without parsing the message.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [87e634f]
14
+ - Updated dependencies [56f0789]
15
+ - @zapier/zapier-sdk@0.92.0
16
+ - @zapier/zapier-sdk-mcp@0.18.21
17
+
18
+ ## 0.67.6
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [4886b5b]
23
+ - @zapier/zapier-sdk@0.91.1
24
+ - @zapier/zapier-sdk-mcp@0.18.20
25
+
3
26
  ## 0.67.5
4
27
 
5
28
  ### Patch Changes
package/README.md CHANGED
@@ -815,25 +815,26 @@ Publish a new version of a durable workflow. Enables the workflow by default.
815
815
 
816
816
  **Options:**
817
817
 
818
- | Option | Type | Required | Default | Possible Values | Description |
819
- | -------------------------- | --------- | -------- | ------- | --------------- | -------------------------------------------------------------------------------------------------------------------- |
820
- | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
821
- | `<source-files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
822
- | `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
823
- | `--zapier-durable-version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
824
- | `--enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true; pass false to publish without enabling. |
825
- | `--connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
826
- | `--app-versions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
827
- | `--trigger` | `object` | ❌ | — | — | Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows. |
828
- | ​ ↳ `selectedApi` | `string` | ❌ | — | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI'). Required when a trigger is configured. |
829
- | ​ ↳ `action` | `string` | | — | — | Trigger action key (e.g. 'new_row') |
830
- | ​ ↳ `authenticationId` | `string` | | — | — | Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier). |
831
- | ​ ↳ `params` | `object` | ❌ | — | — | Trigger parameters as a JSON object |
832
-
833
- **Usage:**
834
-
835
- ```bash
836
- npx zapier-sdk publish-workflow-version <workflow> <source-files> [--dependencies] [--zapier-durable-version] [--enabled] [--connections] [--app-versions] [--trigger]
818
+ | Option | Type | Required | Default | Possible Values | Description |
819
+ | -------------------------- | --------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
820
+ | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
821
+ | `<source-files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
822
+ | `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
823
+ | `--zapier-durable-version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
824
+ | `--enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true; pass false to publish without enabling. |
825
+ | `--ignore-open-drafts` | `boolean` | ❌ | — | — | Publish even though the workflow has open draft(s). Without this, the API rejects a direct publish with a 409 while any draft is open, since publishing the draft later would ship its stale content over this version. |
826
+ | `--connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
827
+ | `--app-versions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
828
+ | `--trigger` | `object` | ❌ | — | — | Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows. |
829
+ | ​ ↳ `selectedApi` | `string` | | — | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI'). Required when a trigger is configured. |
830
+ | ​ ↳ `action` | `string` | | — | — | Trigger action key (e.g. 'new_row') |
831
+ | ​ ↳ `authenticationId` | `string` | ❌ | — | — | Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier). |
832
+ | ​ ↳ `params` | `object` | ❌ | — | — | Trigger parameters as a JSON object |
833
+
834
+ **Usage:**
835
+
836
+ ```bash
837
+ npx zapier-sdk publish-workflow-version <workflow> <source-files> [--dependencies] [--zapier-durable-version] [--enabled] [--ignore-open-drafts] [--connections] [--app-versions] [--trigger]
837
838
  ```
838
839
 
839
840
  #### `run-durable` 🧪 _experimental_
package/dist/cli.cjs CHANGED
@@ -536,7 +536,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
536
536
 
537
537
  // package.json
538
538
  var package_default = {
539
- version: "0.67.5"};
539
+ version: "0.68.0"};
540
540
 
541
541
  // src/telemetry/builders.ts
542
542
  function createCliBaseEvent(context = {}) {
@@ -740,11 +740,13 @@ function buildJsonErrors(error) {
740
740
  const code = zapierSdk.isZapierError(error) ? error.code : "UNKNOWN_ERROR";
741
741
  const message = error instanceof Error ? error.message : String(error);
742
742
  const reason = getApprovalReason(error);
743
+ const meta = zapierSdk.isZapierConflictError(error) ? error.meta : void 0;
743
744
  return [
744
745
  {
745
746
  code,
746
747
  message,
747
- ...reason ? { reason } : {}
748
+ ...reason ? { reason } : {},
749
+ ...meta ? { meta } : {}
748
750
  }
749
751
  ];
750
752
  }
@@ -6758,7 +6760,7 @@ function buildBoxLines(message) {
6758
6760
  // package.json with { type: 'json' }
6759
6761
  var package_default2 = {
6760
6762
  name: "@zapier/zapier-sdk-cli",
6761
- version: "0.67.5"};
6763
+ version: "0.68.0"};
6762
6764
 
6763
6765
  // src/sdk.ts
6764
6766
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command, CommanderError, Option } from 'commander';
3
- import { getConnectionPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineMethodOverride, zapierCoreOptions, injectCliLogin, definePlugin, omitExports, zapierSdkPlugin, BaseSdkOptionsSchema, disposeSdk, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk as createSdk$1, CORE_OPTIONS_ID as CORE_OPTIONS_ID$1, SDK_OPTIONS_ID as SDK_OPTIONS_ID$1, addPlugin as addPlugin$1, getOrCreateApiClient, isCredentialsObject, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, DEPRECATION_NOTICE_EVENT, runWithCallerContext, isPositional, createController, isCoreCancelledSignal, resolvePlugin, isZapierError, formatErrorMessage, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, getReleaseId, getCurrentTimestamp, generateEventId, isZapierApprovalError, ZapierAuthenticationError } from '@zapier/zapier-sdk';
3
+ import { getConnectionPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineMethodOverride, zapierCoreOptions, injectCliLogin, definePlugin, omitExports, zapierSdkPlugin, BaseSdkOptionsSchema, disposeSdk, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk as createSdk$1, CORE_OPTIONS_ID as CORE_OPTIONS_ID$1, SDK_OPTIONS_ID as SDK_OPTIONS_ID$1, addPlugin as addPlugin$1, getOrCreateApiClient, isCredentialsObject, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, DEPRECATION_NOTICE_EVENT, runWithCallerContext, isPositional, createController, isCoreCancelledSignal, resolvePlugin, isZapierError, formatErrorMessage, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, isZapierConflictError, getReleaseId, getCurrentTimestamp, generateEventId, isZapierApprovalError, ZapierAuthenticationError } from '@zapier/zapier-sdk';
4
4
  import { z } from 'zod';
5
5
  import inquirer from 'inquirer';
6
6
  import chalk8 from 'chalk';
@@ -494,7 +494,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
494
494
 
495
495
  // package.json
496
496
  var package_default = {
497
- version: "0.67.5"};
497
+ version: "0.68.0"};
498
498
 
499
499
  // src/telemetry/builders.ts
500
500
  function createCliBaseEvent(context = {}) {
@@ -698,11 +698,13 @@ function buildJsonErrors(error) {
698
698
  const code = isZapierError(error) ? error.code : "UNKNOWN_ERROR";
699
699
  const message = error instanceof Error ? error.message : String(error);
700
700
  const reason = getApprovalReason(error);
701
+ const meta = isZapierConflictError(error) ? error.meta : void 0;
701
702
  return [
702
703
  {
703
704
  code,
704
705
  message,
705
- ...reason ? { reason } : {}
706
+ ...reason ? { reason } : {},
707
+ ...meta ? { meta } : {}
706
708
  }
707
709
  ];
708
710
  }
@@ -6716,7 +6718,7 @@ function buildBoxLines(message) {
6716
6718
  // package.json with { type: 'json' }
6717
6719
  var package_default2 = {
6718
6720
  name: "@zapier/zapier-sdk-cli",
6719
- version: "0.67.5"};
6721
+ version: "0.68.0"};
6720
6722
 
6721
6723
  // src/sdk.ts
6722
6724
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -5100,7 +5100,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
5100
5100
  // package.json with { type: 'json' }
5101
5101
  var package_default = {
5102
5102
  name: "@zapier/zapier-sdk-cli",
5103
- version: "0.67.5"};
5103
+ version: "0.68.0"};
5104
5104
 
5105
5105
  // src/sdk.ts
5106
5106
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -5064,7 +5064,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
5064
5064
  // package.json with { type: 'json' }
5065
5065
  var package_default = {
5066
5066
  name: "@zapier/zapier-sdk-cli",
5067
- version: "0.67.5"};
5067
+ version: "0.68.0"};
5068
5068
 
5069
5069
  // src/sdk.ts
5070
5070
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
package/dist/index.cjs CHANGED
@@ -5100,7 +5100,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
5100
5100
  // package.json with { type: 'json' }
5101
5101
  var package_default = {
5102
5102
  name: "@zapier/zapier-sdk-cli",
5103
- version: "0.67.5"};
5103
+ version: "0.68.0"};
5104
5104
 
5105
5105
  // src/sdk.ts
5106
5106
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -5183,7 +5183,7 @@ function createZapierCliSdk(options = {}) {
5183
5183
 
5184
5184
  // package.json
5185
5185
  var package_default2 = {
5186
- version: "0.67.5"};
5186
+ version: "0.68.0"};
5187
5187
 
5188
5188
  // src/telemetry/builders.ts
5189
5189
  function createCliBaseEvent(context = {}) {
package/dist/index.mjs CHANGED
@@ -5064,7 +5064,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
5064
5064
  // package.json with { type: 'json' }
5065
5065
  var package_default = {
5066
5066
  name: "@zapier/zapier-sdk-cli",
5067
- version: "0.67.5"};
5067
+ version: "0.68.0"};
5068
5068
 
5069
5069
  // src/sdk.ts
5070
5070
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -5147,7 +5147,7 @@ function createZapierCliSdk(options = {}) {
5147
5147
 
5148
5148
  // package.json
5149
5149
  var package_default2 = {
5150
- version: "0.67.5"};
5150
+ version: "0.68.0"};
5151
5151
 
5152
5152
  // src/telemetry/builders.ts
5153
5153
  function createCliBaseEvent(context = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-cli",
3
- "version": "0.67.5",
3
+ "version": "0.68.0",
4
4
  "description": "Command line interface for Zapier SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -94,8 +94,8 @@
94
94
  "typescript": "^5.8.3",
95
95
  "wrap-ansi": "^10.0.0",
96
96
  "zod": "4.3.6",
97
- "@zapier/zapier-sdk-mcp": "0.18.19",
98
- "@zapier/zapier-sdk": "0.91.0"
97
+ "@zapier/zapier-sdk": "0.92.0",
98
+ "@zapier/zapier-sdk-mcp": "0.18.21"
99
99
  },
100
100
  "devDependencies": {
101
101
  "@types/express": "^5.0.3",