@zapier/zapier-sdk 0.91.0 → 0.92.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 +24 -0
- package/README.md +16 -15
- package/dist/{chunk-RO34ZWKR.cjs → chunk-F5I2GDLO.cjs} +274 -26
- package/dist/{chunk-SZBWDVX3.mjs → chunk-G52V3IGZ.mjs} +274 -26
- package/dist/experimental.cjs +476 -374
- package/dist/experimental.d.mts +140 -3
- package/dist/experimental.d.ts +140 -3
- package/dist/experimental.mjs +105 -3
- package/dist/{index-BBBkZ80x.d.mts → index-ixzNJW7G.d.mts} +211 -4
- package/dist/{index-BBBkZ80x.d.ts → index-ixzNJW7G.d.ts} +211 -4
- package/dist/index.cjs +272 -272
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.92.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
|
+
- 87e634f: Methods that return a single record now type their result as `{ data, meta? }`, where the optional `meta` is a framework sidecar. This matches the shape list methods' pages already had. Nothing populates `meta` in this release, so no runtime behavior changes and no caller code needs to react.
|
|
14
|
+
|
|
15
|
+
## 0.91.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 4886b5b: `runAction` failures now carry the action's structured errors on the thrown
|
|
20
|
+
`ZapierActionError`. `error.errors` (and its `actionErrors` alias) previously
|
|
21
|
+
stayed `undefined` for a failed action run, because the API reports that failure
|
|
22
|
+
in the body of a `200` response rather than as an HTTP error. Each entry now
|
|
23
|
+
exposes the machine-readable `code` — for example `authentication_error` when a
|
|
24
|
+
connection has expired — so callers can branch on the failure instead of
|
|
25
|
+
matching against the message text.
|
|
26
|
+
|
|
3
27
|
## 0.91.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1932,21 +1932,22 @@ Publish a new version of a durable workflow. Enables the workflow by default.
|
|
|
1932
1932
|
|
|
1933
1933
|
**Parameters:**
|
|
1934
1934
|
|
|
1935
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
1936
|
-
| -------------------------- | --------- | -------- | ------- | --------------- |
|
|
1937
|
-
| `options` | `object` | ✅ | — | — |
|
|
1938
|
-
| ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID
|
|
1939
|
-
| ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents
|
|
1940
|
-
| ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies
|
|
1941
|
-
| ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted.
|
|
1942
|
-
| ↳ `enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true; pass false to publish without enabling.
|
|
1943
|
-
| ↳ `
|
|
1944
|
-
| ↳ `
|
|
1945
|
-
| ↳ `
|
|
1946
|
-
|
|
|
1947
|
-
| ↳ `
|
|
1948
|
-
| ↳ `
|
|
1949
|
-
| ↳ `
|
|
1935
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1936
|
+
| -------------------------- | --------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1937
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1938
|
+
| ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
|
|
1939
|
+
| ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents |
|
|
1940
|
+
| ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
|
|
1941
|
+
| ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
|
|
1942
|
+
| ↳ `enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true; pass false to publish without enabling. |
|
|
1943
|
+
| ↳ `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. |
|
|
1944
|
+
| ↳ `connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
|
|
1945
|
+
| ↳ `appVersions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
|
|
1946
|
+
| ↳ `trigger` | `object` | ❌ | — | — | Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows. |
|
|
1947
|
+
| ↳ `selectedApi` | `string` | ❌ | — | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI'). Required when a trigger is configured. |
|
|
1948
|
+
| ↳ `action` | `string` | ✅ | — | — | Trigger action key (e.g. 'new_row') |
|
|
1949
|
+
| ↳ `authenticationId` | `string` | ❌ | — | — | Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier). |
|
|
1950
|
+
| ↳ `params` | `object` | ❌ | — | — | Trigger parameters as a JSON object |
|
|
1950
1951
|
|
|
1951
1952
|
**Returns:** `Promise<WorkflowVersionItem>`
|
|
1952
1953
|
|