@zapier/zapier-sdk 0.102.1 → 0.102.3

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
2
2
 
3
+ ## 0.102.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 4a51b07: Added `editor_url` to the experimental create, get, list, update, and import workflow responses in the SDK and CLI.
8
+
9
+ ## 0.102.2
10
+
11
+ ### Patch Changes
12
+
13
+ - b6dfdf9: `runDurable`, `publishWorkflowVersion` and `updateWorkflowDraft` document that `"latest"` is accepted for the durable runtime version and, in `dependencies`, for `@zapier/zapier-durable` and `@zapier/zapier-sdk`. The server resolves those to the newest release old enough to install — not npm's `"latest"` tag, which can point at a release too new to install. A `"latest"` on any other package is passed to the install unchanged. On a draft the value is stored verbatim and resolved when the draft is published.
14
+
3
15
  ## 0.102.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -1250,6 +1250,7 @@ Create a durable workflow container. Starts disabled with no version; publish a
1250
1250
  | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
1251
1251
  | ​ ↳ `description` | `string` | ✅ | — | Workflow description (null if unset) |
1252
1252
  | ​ ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
1253
+ | ​ ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
1253
1254
  | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers. Always false on a new workflow until enabled. |
1254
1255
  | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
1255
1256
  | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
@@ -1520,6 +1521,7 @@ Get a durable workflow with its current version details and trigger claim status
1520
1521
  | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
1521
1522
  | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
1522
1523
  | ​ ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
1524
+ | ​ ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
1523
1525
  | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1524
1526
  | ​ ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed` | Why the workflow is off, when system-disabled. Null when not system-disabled. Independent of per-trigger claim status: an enabled workflow can still have a failed trigger. |
1525
1527
  | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
@@ -1695,6 +1697,7 @@ Convert an existing Zap into a durable workflow. Transforms the Zap's latest pub
1695
1697
  | ​   ↳ `name` | `string` | ✅ | — | Workflow name |
1696
1698
  | ​   ↳ `description` | `string` | ❌ | — | Optional workflow description (null if unset) |
1697
1699
  | ​   ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
1700
+ | ​   ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
1698
1701
  | ​   ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow accepts triggers. An import always lands disabled. |
1699
1702
  | ​   ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed` | Why the workflow is off, when system-disabled. |
1700
1703
  | ​   ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
@@ -1988,6 +1991,7 @@ List all active durable workflows for the authenticated account
1988
1991
  | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
1989
1992
  | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
1990
1993
  | ​ ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
1994
+ | ​ ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
1991
1995
  | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1992
1996
  | ​ ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed` | Why the workflow is off, when system-disabled. Null when not system-disabled. |
1993
1997
  | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
@@ -2088,23 +2092,23 @@ Publish a new version of a durable workflow. Enables the workflow by default.
2088
2092
 
2089
2093
  **Parameters:**
2090
2094
 
2091
- | Name | Type | Required | Default | Possible Values | Description |
2092
- | -------------------------- | --------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2093
- | `options` | `object` | ✅ | — | — | |
2094
- | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
2095
- | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents |
2096
- | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
2097
- | ​ ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
2098
- | ​ ↳ `enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true if omitted; pass false to publish without enabling. |
2099
- | ​ ↳ `ignoreOpenDrafts` | `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. |
2100
- | ​ ↳ `connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
2101
- | ​ ↳ `appVersions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
2102
- | ​ ↳ `trigger` | `object` | ❌ | — | — | Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; for an on-demand, triggerless workflow, omit this and pass `manual: true` instead. |
2103
- | ​   ↳ `selectedApi` | `string` | ❌ | — | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI'). Required when a trigger is configured. |
2104
- | ​   ↳ `action` | `string` | ✅ | — | — | Trigger action key (e.g. 'new_row') |
2105
- | ​   ↳ `authenticationId` | `string` | ❌ | — | — | Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier). |
2106
- | ​   ↳ `params` | `object` | ❌ | — | — | Trigger parameters as a JSON object |
2107
- | ​ ↳ `manual` | `boolean` | ❌ | — | — | Declare this an on-demand, triggerless workflow version. Pass `manual: true` only when omitting `trigger`; passing both is a contradiction the API rejects with a 400. |
2095
+ | Name | Type | Required | Default | Possible Values | Description |
2096
+ | -------------------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
2097
+ | `options` | `object` | ✅ | — | — | |
2098
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
2099
+ | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents |
2100
+ | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies. A version of "latest" is resolved by the server for @zapier/zapier-durable and @zapier/zapier-sdk only; every other value, including a "latest" on any other package, is passed to the install as written. |
2101
+ | ​ ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"), or "latest". Defaults to the server-configured version if omitted. "latest" is resolved by the server to the newest release old enough to clear the sandbox install age gate (24h) -- this is not npm's "latest" tag, which can point at a release too new to install. Ranges (^1.2.3, ~1.2) are rejected. |
2102
+ | ​ ↳ `enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true if omitted; pass false to publish without enabling. |
2103
+ | ​ ↳ `ignoreOpenDrafts` | `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. |
2104
+ | ​ ↳ `connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
2105
+ | ​ ↳ `appVersions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
2106
+ | ​ ↳ `trigger` | `object` | ❌ | — | — | Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; for an on-demand, triggerless workflow, omit this and pass `manual: true` instead. |
2107
+ | ​   ↳ `selectedApi` | `string` | ❌ | — | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI'). Required when a trigger is configured. |
2108
+ | ​   ↳ `action` | `string` | ✅ | — | — | Trigger action key (e.g. 'new_row') |
2109
+ | ​   ↳ `authenticationId` | `string` | ❌ | — | — | Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier). |
2110
+ | ​   ↳ `params` | `object` | ❌ | — | — | Trigger parameters as a JSON object |
2111
+ | ​ ↳ `manual` | `boolean` | ❌ | — | — | Declare this an on-demand, triggerless workflow version. Pass `manual: true` only when omitting `trigger`; passing both is a contradiction the API rejects with a 400. |
2108
2112
 
2109
2113
  **Returns:** `Promise<WorkflowVersionItem>`
2110
2114
 
@@ -2137,21 +2141,21 @@ Run a workflow source file as a run-once durable run on code-substrate-runner (n
2137
2141
 
2138
2142
  **Parameters:**
2139
2143
 
2140
- | Name | Type | Required | Default | Possible Values | Description |
2141
- | -------------------------- | ---------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
2142
- | `options` | `object` | ✅ | — | — | |
2143
- | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents |
2144
- | ​ ↳ `input` | `unknown` | ❌ | — | — | Input data passed to the run. Accepts any JSON value, or its JSON-string encoding. |
2145
- | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
2146
- | ​ ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
2147
- | ​ ↳ `connections` | `object` | ❌ | — | — | Named connection aliases. Maps each alias to an object holding its Zapier connection ID, e.g. `{ "slack": { "connectionId": "123" } }`. |
2148
- | ​ ↳ `appVersions` | `object` | ❌ | — | — | Pinned app versions. Maps app keys (slugs) to implementation names and versions. |
2149
- | ​ ↳ `private` | `boolean` | ❌ | — | — | Only the creating user can see the run (default false) |
2150
- | ​ ↳ `notifications[]` | `object[]` | ❌ | — | — | Webhook subscribers for run lifecycle events. Each entry specifies a URL and the events it subscribes to. |
2151
- | ​   ↳ `type` | `string` | ❌ | — | `webhook` | Notification transport. Webhook is the only supported type. |
2152
- | ​   ↳ `url` | `string` | ✅ | — | — | URL to POST event notifications to. Payload is `{run_id, event}`. |
2153
- | ​   ↳ `max_retries` | `number` | ❌ | — | — | Max delivery attempts with exponential backoff. Defaults to 3 server-side. |
2154
- | ​   ↳ `events` | `array` | ✅ | — | — | One or more lifecycle events to subscribe this URL to. |
2144
+ | Name | Type | Required | Default | Possible Values | Description |
2145
+ | -------------------------- | ---------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
2146
+ | `options` | `object` | ✅ | — | — | |
2147
+ | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents |
2148
+ | ​ ↳ `input` | `unknown` | ❌ | — | — | Input data passed to the run. Accepts any JSON value, or its JSON-string encoding. |
2149
+ | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies. A version of "latest" is resolved by the server for @zapier/zapier-durable and @zapier/zapier-sdk only; every other value, including a "latest" on any other package, is passed to the install as written. |
2150
+ | ​ ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"), or "latest". Defaults to the server-configured version if omitted. "latest" is resolved by the server to the newest release old enough to clear the sandbox install age gate (24h) -- this is not npm's "latest" tag, which can point at a release too new to install. Ranges (^1.2.3, ~1.2) are rejected. |
2151
+ | ​ ↳ `connections` | `object` | ❌ | — | — | Named connection aliases. Maps each alias to an object holding its Zapier connection ID, e.g. `{ "slack": { "connectionId": "123" } }`. |
2152
+ | ​ ↳ `appVersions` | `object` | ❌ | — | — | Pinned app versions. Maps app keys (slugs) to implementation names and versions. |
2153
+ | ​ ↳ `private` | `boolean` | ❌ | — | — | Only the creating user can see the run (default false) |
2154
+ | ​ ↳ `notifications[]` | `object[]` | ❌ | — | — | Webhook subscribers for run lifecycle events. Each entry specifies a URL and the events it subscribes to. |
2155
+ | ​   ↳ `type` | `string` | ❌ | — | `webhook` | Notification transport. Webhook is the only supported type. |
2156
+ | ​   ↳ `url` | `string` | ✅ | — | — | URL to POST event notifications to. Payload is `{run_id, event}`. |
2157
+ | ​   ↳ `max_retries` | `number` | ❌ | — | — | Max delivery attempts with exponential backoff. Defaults to 3 server-side. |
2158
+ | ​   ↳ `events` | `array` | ✅ | — | — | One or more lifecycle events to subscribe this URL to. |
2155
2159
 
2156
2160
  **Returns:** `Promise<DurableRunItem>`
2157
2161
 
@@ -2222,6 +2226,7 @@ Update a durable workflow's name and/or description
2222
2226
  | ​ ↳ `name` | `string` | ✅ | — | Workflow name (post-update) |
2223
2227
  | ​ ↳ `description` | `string` | ✅ | — | Workflow description, post-update (null if unset) |
2224
2228
  | ​ ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
2229
+ | ​ ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
2225
2230
  | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
2226
2231
  | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
2227
2232
  | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
@@ -2242,19 +2247,19 @@ Update (autosave) an open workflow draft
2242
2247
 
2243
2248
  **Parameters:**
2244
2249
 
2245
- | Name | Type | Required | Default | Possible Values | Description |
2246
- | -------------------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2247
- | `options` | `object` | ✅ | — | — | |
2248
- | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
2249
- | ​ ↳ `draft` | `string` | ✅ | — | — | Workflow draft ID |
2250
- | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents |
2251
- | ​ ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Leaves the stored pin unchanged if omitted. |
2252
- | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
2253
- | ​ ↳ `draftRevision` | `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. |
2254
- | ​ ↳ `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. |
2255
- | ​ ↳ `connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
2256
- | ​ ↳ `appVersions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
2257
- | ​ ↳ `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`. |
2250
+ | Name | Type | Required | Default | Possible Values | Description |
2251
+ | -------------------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2252
+ | `options` | `object` | ✅ | — | — | |
2253
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
2254
+ | ​ ↳ `draft` | `string` | ✅ | — | — | Workflow draft ID |
2255
+ | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents |
2256
+ | ​ ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"), or "latest". Leaves the stored pin unchanged if omitted. A draft stores what you pass verbatim, so "latest" is recorded as-is and resolved to an exact version when the draft is published -- reading the draft back shows "latest", not a version. Ranges (^1.2.3, ~1.2) are rejected at publish. |
2257
+ | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies. A version of "latest" is resolved by the server for @zapier/zapier-durable and @zapier/zapier-sdk only; every other value, including a "latest" on any other package, is passed to the install as written. |
2258
+ | ​ ↳ `draftRevision` | `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. |
2259
+ | ​ ↳ `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. |
2260
+ | ​ ↳ `connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
2261
+ | ​ ↳ `appVersions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
2262
+ | ​ ↳ `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`. |
2258
2263
 
2259
2264
  **Returns:** `Promise<WorkflowDraftItem>`
2260
2265
 
@@ -1987,7 +1987,7 @@ function parseDeprecationDate(value) {
1987
1987
  }
1988
1988
 
1989
1989
  // src/sdk-version.ts
1990
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.102.1" : void 0) || "unknown";
1990
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.102.3" : void 0) || "unknown";
1991
1991
 
1992
1992
  // src/utils/open-url.ts
1993
1993
  var nodePrefix = "node:";
@@ -1988,7 +1988,7 @@ function parseDeprecationDate(value) {
1988
1988
  }
1989
1989
 
1990
1990
  // src/sdk-version.ts
1991
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.102.1" : void 0) || "unknown";
1991
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.102.3" : void 0) || "unknown";
1992
1992
 
1993
1993
  // src/utils/open-url.ts
1994
1994
  var nodePrefix = "node:";