@zapier/zapier-sdk-cli 0.73.0 → 0.74.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,17 @@
1
1
  # @zapier/zapier-sdk-cli
2
2
 
3
+ ## 0.74.0
4
+
5
+ ### Minor Changes
6
+
7
+ - abbeb60: Added a `manual` option (experimental) to `publishWorkflowDraft` and `updateWorkflowDraft`, exposed in the CLI as `--manual` on `publish-workflow-draft` and `update-workflow-draft`. Pass `manual: true` to declare a draft (or its publish) on-demand and triggerless; pass `trigger` for a triggered one. The two are mutually exclusive — sending both is rejected with a 400. This extends the `manual` flag `publishWorkflowVersion` already supports (see the previous release) to the draft path.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [abbeb60]
12
+ - @zapier/zapier-sdk@0.97.0
13
+ - @zapier/zapier-sdk-mcp@0.20.1
14
+
3
15
  ## 0.73.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -847,17 +847,18 @@ Publish an open draft as a new immutable workflow version. Advances the workflow
847
847
 
848
848
  **Options:**
849
849
 
850
- | Option | Type | Required | Default | Possible Values | Description |
851
- | -------------------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
852
- | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
853
- | `<draft>` | `string` | ✅ | — | — | Workflow draft ID |
854
- | `--enabled` / `--disabled` | `boolean` | ❌ | — | — | Set the workflow's enabled state as part of the publish. If omitted, the current enabled state is preserved. |
855
- | `--draft-revision` | `number` | ❌ | — | — | Expected draft revision for optimistic concurrency. Pass the revision from the last read; the server rejects the publish with a conflict if the draft has changed since. Omit to skip the check. |
850
+ | Option | Type | Required | Default | Possible Values | Description |
851
+ | -------------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
852
+ | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
853
+ | `<draft>` | `string` | ✅ | — | — | Workflow draft ID |
854
+ | `--enabled` / `--disabled` | `boolean` | ❌ | — | — | Set the workflow's enabled state as part of the publish. If omitted, the current enabled state is preserved. |
855
+ | `--draft-revision` | `number` | ❌ | — | — | Expected draft revision for optimistic concurrency. Pass the revision from the last read; the server rejects the publish with a conflict if the draft has changed since. Omit to skip the check. |
856
+ | `--manual` | `boolean` | ❌ | — | — | Declare this publish on-demand and triggerless, overriding the draft's stored intent for this publish only. Pass `manual: true` only when the draft has no trigger configured; the API rejects a draft with a trigger published as `manual: true` as a contradiction (400). |
856
857
 
857
858
  **Usage:**
858
859
 
859
860
  ```bash
860
- npx zapier-sdk publish-workflow-draft <workflow> <draft> [--enabled] [--draft-revision]
861
+ npx zapier-sdk publish-workflow-draft <workflow> <draft> [--enabled] [--draft-revision] [--manual]
861
862
  ```
862
863
 
863
864
  #### `publish-workflow-version` 🧪 _experimental_
@@ -953,22 +954,23 @@ Update (autosave) an open workflow draft
953
954
 
954
955
  **Options:**
955
956
 
956
- | Option | Type | Required | Default | Possible Values | Description |
957
- | -------------------------- | -------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
958
- | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
959
- | `<draft>` | `string` | ✅ | — | — | Workflow draft ID |
960
- | `<source-files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
961
- | `--zapier-durable-version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Leaves the stored pin unchanged if omitted. |
962
- | `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
963
- | `--draft-revision` | `number` | ❌ | — | — | Expected draft revision for optimistic concurrency. Pass the revision from the last read; the server rejects the save with a conflict if the draft has changed since. Omit to skip the check. |
964
- | `--trigger` | `object` | ❌ | — | — | Trigger configuration. Omit to leave the stored trigger unchanged, pass null to clear it, or pass an object to replace it. |
965
- | `--connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
966
- | `--app-versions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
957
+ | Option | Type | Required | Default | Possible Values | Description |
958
+ | -------------------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
959
+ | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
960
+ | `<draft>` | `string` | ✅ | — | — | Workflow draft ID |
961
+ | `<source-files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
962
+ | `--zapier-durable-version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Leaves the stored pin unchanged if omitted. |
963
+ | `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
964
+ | `--draft-revision` | `number` | ❌ | — | — | Expected draft revision for optimistic concurrency. Pass the revision from the last read; the server rejects the save with a conflict if the draft has changed since. Omit to skip the check. |
965
+ | `--trigger` | `object` | ❌ | — | — | Trigger configuration. Omit to leave the stored trigger unchanged, pass null to clear it, or pass an object to replace it; for an on-demand, triggerless workflow, clear this and pass `manual: true` instead. |
966
+ | `--connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
967
+ | `--app-versions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
968
+ | `--manual` | `boolean` | ❌ | — | — | Declare this draft on-demand and triggerless. Pass `manual: true` only when omitting `trigger` (or clearing it with `trigger: null`); passing both is a contradiction the API rejects with a 400. Setting a `trigger` later clears a previously stored `manual: true`. |
967
969
 
968
970
  **Usage:**
969
971
 
970
972
  ```bash
971
- npx zapier-sdk update-workflow-draft <workflow> <draft> <source-files> [--zapier-durable-version] [--dependencies] [--draft-revision] [--trigger] [--connections] [--app-versions]
973
+ npx zapier-sdk update-workflow-draft <workflow> <draft> <source-files> [--zapier-durable-version] [--dependencies] [--draft-revision] [--trigger] [--connections] [--app-versions] [--manual]
972
974
  ```
973
975
 
974
976
  ### Connections
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.73.0"};
605
+ version: "0.74.0"};
606
606
  var PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
607
607
  var LOCKFILES = [
608
608
  ["pnpm-lock.yaml", "pnpm"],
@@ -1324,6 +1324,7 @@ function analyzeZodField(name, schema) {
1324
1324
  let defaultValue = void 0;
1325
1325
  let isDeprecated = false;
1326
1326
  let deprecationMessage;
1327
+ let nullable = false;
1327
1328
  while (true) {
1328
1329
  const meta = baseSchema.meta?.();
1329
1330
  if (meta?.deprecated) {
@@ -1343,6 +1344,7 @@ function analyzeZodField(name, schema) {
1343
1344
  } else {
1344
1345
  const zodDef = baseSchema._zod?.def;
1345
1346
  if (zodDef?.type === "nullable" && zodDef.innerType) {
1347
+ nullable = true;
1346
1348
  baseSchema = zodDef.innerType;
1347
1349
  continue;
1348
1350
  }
@@ -1389,7 +1391,8 @@ function analyzeZodField(name, schema) {
1389
1391
  elementType,
1390
1392
  deprecationMessage,
1391
1393
  isDeprecated,
1392
- negatable: zapierSdk.getNegatable(schema)
1394
+ negatable: zapierSdk.getNegatable(schema),
1395
+ nullable
1393
1396
  };
1394
1397
  }
1395
1398
  function positionalProjection(schema, positional) {
@@ -1983,7 +1986,8 @@ function convertCliArgsToSdkParams(parameters, positionalArgs, options) {
1983
1986
  positionalValue,
1984
1987
  param.type,
1985
1988
  param.elementType,
1986
- param.name
1989
+ param.name,
1990
+ param.nullable
1987
1991
  );
1988
1992
  }
1989
1993
  });
@@ -2010,7 +2014,8 @@ function convertCliArgsToSdkParams(parameters, positionalArgs, options) {
2010
2014
  value,
2011
2015
  param.type,
2012
2016
  param.elementType,
2013
- param.name
2017
+ param.name,
2018
+ param.nullable
2014
2019
  );
2015
2020
  }
2016
2021
  });
@@ -2029,7 +2034,7 @@ function parseCliBoolean(value) {
2029
2034
  function looksLikeFilePath(value) {
2030
2035
  return /[/\\]/.test(value) || /\.(ts|js|tsx|jsx|json)$/i.test(value);
2031
2036
  }
2032
- function parseJsonParameter(value, paramName) {
2037
+ function parseJsonParameter(value, paramName, allowNull = false) {
2033
2038
  let parsed;
2034
2039
  try {
2035
2040
  parsed = JSON.parse(value);
@@ -2040,6 +2045,9 @@ function parseJsonParameter(value, paramName) {
2040
2045
  `Parameter "${paramName}" expects JSON, but the value could not be parsed: ${parseErrorMessage}.${pathHint}`
2041
2046
  );
2042
2047
  }
2048
+ if (parsed === null && allowNull) {
2049
+ return null;
2050
+ }
2043
2051
  if (typeof parsed !== "object" || parsed === null) {
2044
2052
  throw new commander.InvalidArgumentError(
2045
2053
  `Parameter "${paramName}" expects a JSON object, but got: ${value}.`
@@ -2047,7 +2055,7 @@ function parseJsonParameter(value, paramName) {
2047
2055
  }
2048
2056
  return parsed;
2049
2057
  }
2050
- function convertValue(value, type, elementType, paramName) {
2058
+ function convertValue(value, type, elementType, paramName, nullable) {
2051
2059
  if (value === void 0) {
2052
2060
  return void 0;
2053
2061
  }
@@ -2070,7 +2078,7 @@ function convertValue(value, type, elementType, paramName) {
2070
2078
  return value;
2071
2079
  case "object":
2072
2080
  if (typeof value === "string") {
2073
- return parseJsonParameter(value, paramName ?? "value");
2081
+ return parseJsonParameter(value, paramName ?? "value", nullable);
2074
2082
  }
2075
2083
  return value;
2076
2084
  default:
@@ -8360,7 +8368,7 @@ function buildBoxLines(message) {
8360
8368
  // package.json with { type: 'json' }
8361
8369
  var package_default2 = {
8362
8370
  name: "@zapier/zapier-sdk-cli",
8363
- version: "0.73.0"};
8371
+ version: "0.74.0"};
8364
8372
 
8365
8373
  // src/sdk.ts
8366
8374
  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.73.0"};
561
+ version: "0.74.0"};
562
562
  var PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
563
563
  var LOCKFILES = [
564
564
  ["pnpm-lock.yaml", "pnpm"],
@@ -1280,6 +1280,7 @@ function analyzeZodField(name, schema) {
1280
1280
  let defaultValue = void 0;
1281
1281
  let isDeprecated = false;
1282
1282
  let deprecationMessage;
1283
+ let nullable = false;
1283
1284
  while (true) {
1284
1285
  const meta = baseSchema.meta?.();
1285
1286
  if (meta?.deprecated) {
@@ -1299,6 +1300,7 @@ function analyzeZodField(name, schema) {
1299
1300
  } else {
1300
1301
  const zodDef = baseSchema._zod?.def;
1301
1302
  if (zodDef?.type === "nullable" && zodDef.innerType) {
1303
+ nullable = true;
1302
1304
  baseSchema = zodDef.innerType;
1303
1305
  continue;
1304
1306
  }
@@ -1345,7 +1347,8 @@ function analyzeZodField(name, schema) {
1345
1347
  elementType,
1346
1348
  deprecationMessage,
1347
1349
  isDeprecated,
1348
- negatable: getNegatable(schema)
1350
+ negatable: getNegatable(schema),
1351
+ nullable
1349
1352
  };
1350
1353
  }
1351
1354
  function positionalProjection(schema, positional) {
@@ -1939,7 +1942,8 @@ function convertCliArgsToSdkParams(parameters, positionalArgs, options) {
1939
1942
  positionalValue,
1940
1943
  param.type,
1941
1944
  param.elementType,
1942
- param.name
1945
+ param.name,
1946
+ param.nullable
1943
1947
  );
1944
1948
  }
1945
1949
  });
@@ -1966,7 +1970,8 @@ function convertCliArgsToSdkParams(parameters, positionalArgs, options) {
1966
1970
  value,
1967
1971
  param.type,
1968
1972
  param.elementType,
1969
- param.name
1973
+ param.name,
1974
+ param.nullable
1970
1975
  );
1971
1976
  }
1972
1977
  });
@@ -1985,7 +1990,7 @@ function parseCliBoolean(value) {
1985
1990
  function looksLikeFilePath(value) {
1986
1991
  return /[/\\]/.test(value) || /\.(ts|js|tsx|jsx|json)$/i.test(value);
1987
1992
  }
1988
- function parseJsonParameter(value, paramName) {
1993
+ function parseJsonParameter(value, paramName, allowNull = false) {
1989
1994
  let parsed;
1990
1995
  try {
1991
1996
  parsed = JSON.parse(value);
@@ -1996,6 +2001,9 @@ function parseJsonParameter(value, paramName) {
1996
2001
  `Parameter "${paramName}" expects JSON, but the value could not be parsed: ${parseErrorMessage}.${pathHint}`
1997
2002
  );
1998
2003
  }
2004
+ if (parsed === null && allowNull) {
2005
+ return null;
2006
+ }
1999
2007
  if (typeof parsed !== "object" || parsed === null) {
2000
2008
  throw new InvalidArgumentError(
2001
2009
  `Parameter "${paramName}" expects a JSON object, but got: ${value}.`
@@ -2003,7 +2011,7 @@ function parseJsonParameter(value, paramName) {
2003
2011
  }
2004
2012
  return parsed;
2005
2013
  }
2006
- function convertValue(value, type, elementType, paramName) {
2014
+ function convertValue(value, type, elementType, paramName, nullable) {
2007
2015
  if (value === void 0) {
2008
2016
  return void 0;
2009
2017
  }
@@ -2026,7 +2034,7 @@ function convertValue(value, type, elementType, paramName) {
2026
2034
  return value;
2027
2035
  case "object":
2028
2036
  if (typeof value === "string") {
2029
- return parseJsonParameter(value, paramName ?? "value");
2037
+ return parseJsonParameter(value, paramName ?? "value", nullable);
2030
2038
  }
2031
2039
  return value;
2032
2040
  default:
@@ -8316,7 +8324,7 @@ function buildBoxLines(message) {
8316
8324
  // package.json with { type: 'json' }
8317
8325
  var package_default2 = {
8318
8326
  name: "@zapier/zapier-sdk-cli",
8319
- version: "0.73.0"};
8327
+ version: "0.74.0"};
8320
8328
 
8321
8329
  // src/sdk.ts
8322
8330
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -6861,7 +6861,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
6861
6861
  // package.json with { type: 'json' }
6862
6862
  var package_default = {
6863
6863
  name: "@zapier/zapier-sdk-cli",
6864
- version: "0.73.0"};
6864
+ version: "0.74.0"};
6865
6865
 
6866
6866
  // src/sdk.ts
6867
6867
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -6820,7 +6820,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
6820
6820
  // package.json with { type: 'json' }
6821
6821
  var package_default = {
6822
6822
  name: "@zapier/zapier-sdk-cli",
6823
- version: "0.73.0"};
6823
+ version: "0.74.0"};
6824
6824
 
6825
6825
  // src/sdk.ts
6826
6826
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
package/dist/index.cjs CHANGED
@@ -6862,7 +6862,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
6862
6862
  // package.json with { type: 'json' }
6863
6863
  var package_default = {
6864
6864
  name: "@zapier/zapier-sdk-cli",
6865
- version: "0.73.0"};
6865
+ version: "0.74.0"};
6866
6866
 
6867
6867
  // src/sdk.ts
6868
6868
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -6946,7 +6946,7 @@ function createZapierCliSdk(options = {}) {
6946
6946
 
6947
6947
  // package.json
6948
6948
  var package_default2 = {
6949
- version: "0.73.0"};
6949
+ version: "0.74.0"};
6950
6950
 
6951
6951
  // src/telemetry/builders.ts
6952
6952
  function createCliBaseEvent(context = {}) {
package/dist/index.mjs CHANGED
@@ -6821,7 +6821,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
6821
6821
  // package.json with { type: 'json' }
6822
6822
  var package_default = {
6823
6823
  name: "@zapier/zapier-sdk-cli",
6824
- version: "0.73.0"};
6824
+ version: "0.74.0"};
6825
6825
 
6826
6826
  // src/sdk.ts
6827
6827
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -6905,7 +6905,7 @@ function createZapierCliSdk(options = {}) {
6905
6905
 
6906
6906
  // package.json
6907
6907
  var package_default2 = {
6908
- version: "0.73.0"};
6908
+ version: "0.74.0"};
6909
6909
 
6910
6910
  // src/telemetry/builders.ts
6911
6911
  function createCliBaseEvent(context = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-cli",
3
- "version": "0.73.0",
3
+ "version": "0.74.0",
4
4
  "description": "Command line interface for Zapier SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -95,8 +95,8 @@
95
95
  "typescript": "^5.8.3",
96
96
  "wrap-ansi": "^10.0.0",
97
97
  "zod": "4.3.6",
98
- "@zapier/zapier-sdk": "0.96.0",
99
- "@zapier/zapier-sdk-mcp": "0.20.0"
98
+ "@zapier/zapier-sdk": "0.97.0",
99
+ "@zapier/zapier-sdk-mcp": "0.20.1"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@types/cross-spawn": "^6.0.6",