@zapier/zapier-sdk 0.91.1 → 0.92.1

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,23 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.92.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 67db455: Documented the guided `zapier-sdk setup` command in the SDK quick start.
8
+
9
+ ## 0.92.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 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.
14
+
15
+ 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.
16
+
17
+ ### Patch Changes
18
+
19
+ - 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.
20
+
3
21
  ## 0.91.1
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -120,6 +120,12 @@ npx @zapier/zapier-sdk-cli init my-zapier-app --non-interactive
120
120
 
121
121
  _For existing projects._
122
122
 
123
+ Run the guided setup to add undeclared Zapier SDK dependencies, authenticate, and inspect your connected apps:
124
+
125
+ ```bash
126
+ npx @zapier/zapier-sdk-cli setup
127
+ ```
128
+
123
129
  If you already have a project and want to start integrating apps through Zapier using the SDK:
124
130
 
125
131
  ```bash
@@ -1932,21 +1938,22 @@ Publish a new version of a durable workflow. Enables the workflow by default.
1932
1938
 
1933
1939
  **Parameters:**
1934
1940
 
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
- | ​ ↳ `connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
1944
- | ​ ↳ `appVersions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
1945
- | ​ ↳ `trigger` | `object` | ❌ | — | — | Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows. |
1946
- | ​   ↳ `selectedApi` | `string` | ❌ | — | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI'). Required when a trigger is configured. |
1947
- | ​   ↳ `action` | `string` | | — | — | Trigger action key (e.g. 'new_row') |
1948
- | ​   ↳ `authenticationId` | `string` | | — | — | Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier). |
1949
- | ​   ↳ `params` | `object` | ❌ | — | — | Trigger parameters as a JSON object |
1941
+ | Name | Type | Required | Default | Possible Values | Description |
1942
+ | -------------------------- | --------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1943
+ | `options` | `object` | ✅ | — | — | |
1944
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
1945
+ | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Source files keyed by filename → contents |
1946
+ | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
1947
+ | ​ ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
1948
+ | ​ ↳ `enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true; pass false to publish without enabling. |
1949
+ | ​ ↳ `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. |
1950
+ | ​ ↳ `connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
1951
+ | ​ ↳ `appVersions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
1952
+ | ​ ↳ `trigger` | `object` | ❌ | — | — | Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows. |
1953
+ | ​   ↳ `selectedApi` | `string` | | — | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI'). Required when a trigger is configured. |
1954
+ | ​   ↳ `action` | `string` | | — | — | Trigger action key (e.g. 'new_row') |
1955
+ | ​   ↳ `authenticationId` | `string` | ❌ | — | — | Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier). |
1956
+ | ​   ↳ `params` | `object` | ❌ | — | — | Trigger parameters as a JSON object |
1950
1957
 
1951
1958
  **Returns:** `Promise<WorkflowVersionItem>`
1952
1959