@zapier/zapier-sdk 0.119.0 → 0.119.2

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.119.2
4
+
5
+ ### Patch Changes
6
+
7
+ - cad023f: `getWorkflow`, `listWorkflows` and `importWorkflow` no longer fail on a trigger status or disabled reason the SDK doesn't recognize. They also recognize two new values: the `initializing` trigger status, for a trigger Zapier is still setting up, and the `owner_transferred` disabled reason, for a workflow switched off by an ownership transfer until its new owner publishes it.
8
+
9
+ ## 0.119.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 81e09a5: The example workflow source for `validateWorkflow` now uses the object form of `defineDurable`.
14
+
3
15
  ## 0.119.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -2042,39 +2042,39 @@ Get a durable workflow with its current version details and trigger claim status
2042
2042
 
2043
2043
  **Returns:** `Promise<WorkflowItem>`
2044
2044
 
2045
- | Name | Type | Required | Possible Values | Description |
2046
- | ------------------------------ | ---------- | -------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2047
- | `data` | `object` | ✅ | — | |
2048
- | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
2049
- | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
2050
- | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
2051
- | ​ ↳ `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. |
2052
- | ​ ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
2053
- | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
2054
- | ​ ↳ `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. |
2055
- | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
2056
- | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
2057
- | ​ ↳ `current_version` | `object` | ❌ | — | The currently published version, if any. Absent for workflows with no version published yet. |
2058
- | ​   ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
2059
- | ​   ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID |
2060
- | ​   ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
2061
- | ​   ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
2062
- | ​   ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
2063
- | ​   ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
2064
- | ​   ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
2065
- | ​   ↳ `trigger` | `object` | ✅ | — | Trigger configuration persisted on this version, or null for webhook-only workflows. |
2066
- | ​   ↳ `connections` | `object` | ✅ | — | Connection aliases bound on this version (or null). |
2067
- | ​   ↳ `app_versions` | `object` | ✅ | — | App-version pins bound on this version (or null). |
2068
- | ​ ↳ `triggers[]` | `object[]` | ✅ | — | Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers. |
2069
- | ​   ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
2070
- | ​   ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
2071
- | ​   ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
2072
- | ​   ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
2073
- | ​   ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
2074
- | ​   ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'. |
2075
- | ​   ↳ `details` | `object` | ❌ | — | Trigger-type-specific metadata; shape varies by trigger type (e.g. `webhook_url` on catch-hook triggers). Null or absent when none applies. |
2076
- | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
2077
- | ​ ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
2045
+ | Name | Type | Required | Possible Values | Description |
2046
+ | ------------------------------ | ---------- | -------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2047
+ | `data` | `object` | ✅ | — | |
2048
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
2049
+ | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
2050
+ | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
2051
+ | ​ ↳ `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. |
2052
+ | ​ ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
2053
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
2054
+ | ​ ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed`, `owner_transferred` | 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. |
2055
+ | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
2056
+ | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
2057
+ | ​ ↳ `current_version` | `object` | ❌ | — | The currently published version, if any. Absent for workflows with no version published yet. |
2058
+ | ​   ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
2059
+ | ​   ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID |
2060
+ | ​   ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
2061
+ | ​   ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
2062
+ | ​   ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
2063
+ | ​   ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
2064
+ | ​   ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
2065
+ | ​   ↳ `trigger` | `object` | ✅ | — | Trigger configuration persisted on this version, or null for webhook-only workflows. |
2066
+ | ​   ↳ `connections` | `object` | ✅ | — | Connection aliases bound on this version (or null). |
2067
+ | ​   ↳ `app_versions` | `object` | ✅ | — | App-version pins bound on this version (or null). |
2068
+ | ​ ↳ `triggers[]` | `object[]` | ✅ | — | Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers. |
2069
+ | ​   ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
2070
+ | ​   ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
2071
+ | ​   ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
2072
+ | ​   ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
2073
+ | ​   ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `initializing`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
2074
+ | ​   ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'. |
2075
+ | ​   ↳ `details` | `object` | ❌ | — | Trigger-type-specific metadata; shape varies by trigger type (e.g. `webhook_url` on catch-hook triggers). Null or absent when none applies. |
2076
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
2077
+ | ​ ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
2078
2078
 
2079
2079
  **Example:**
2080
2080
 
@@ -2242,58 +2242,58 @@ Convert an existing Zap into a durable workflow. Transforms the Zap's latest pub
2242
2242
 
2243
2243
  **Returns:** `Promise<ImportWorkflowResponse>`
2244
2244
 
2245
- | Name | Type | Required | Possible Values | Description |
2246
- | ------------------------------ | ---------- | -------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2247
- | `data` | `object` | ✅ | — | |
2248
- | ​ ↳ `workflow` | `object` | ✅ | — | The created workflow. Disabled, with no published version, and source_zap_id set to the imported Zap. |
2249
- | ​   ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
2250
- | ​   ↳ `name` | `string` | ✅ | — | Workflow name |
2251
- | ​   ↳ `description` | `string` | ❌ | — | Optional workflow description (null if unset) |
2252
- | ​   ↳ `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. |
2253
- | ​   ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
2254
- | ​   ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow accepts triggers. An import always lands disabled. |
2255
- | ​   ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed` | Why the workflow is off, when system-disabled. |
2256
- | ​   ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
2257
- | ​   ↳ `source_zap_id` | `string` | ❌ | — | The Zap this workflow was imported from. |
2258
- | ​   ↳ `created_by_user_id` | `string` | ✅ | — | |
2259
- | ​   ↳ `updated_by_user_id` | `string` | ❌ | — | |
2260
- | ​   ↳ `current_version_id` | `string` | ❌ | — | Null on a fresh import, which has no published version yet. |
2261
- | ​   ↳ `triggers[]` | `object[]` | ✅ | — | Empty on a fresh import, which has no published version yet. |
2262
- | ​     ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
2263
- | ​     ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
2264
- | ​     ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
2265
- | ​     ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
2266
- | ​     ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
2267
- | ​     ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'. |
2268
- | ​     ↳ `details` | `object` | ❌ | — | Trigger-type-specific metadata; shape varies by trigger type (e.g. `webhook_url` on catch-hook triggers). Null or absent when none applies. |
2269
- | ​   ↳ `created_at` | `string` | ✅ | — | |
2270
- | ​   ↳ `updated_at` | `string` | ❌ | — | |
2271
- | ​ ↳ `draft` | `object` | ✅ | — | The open draft holding the transformed source. |
2272
- | ​   ↳ `id` | `string` | ✅ | — | Workflow draft ID (UUID) |
2273
- | ​   ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
2274
- | ​   ↳ `slug` | `string` | ✅ | — | Human-friendly display name, not an identifier: two open drafts of a workflow may share one |
2275
- | ​   ↳ `base_version_id` | `string` | ✅ | — | The version this draft was forked from (the live version at draft creation), or null when the workflow had no published version yet |
2276
- | ​   ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
2277
- | ​   ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this draft |
2278
- | ​   ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this draft (or null) |
2279
- | ​   ↳ `draft_revision` | `number` | ✅ | — | Monotonic revision counter for optimistic concurrency. Echo it back on draft updates to detect concurrent edits. |
2280
- | ​   ↳ `status` | `string` | ✅ | `open`, `discarded` | Lifecycle status of a workflow draft. |
2281
- | ​   ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who created (forked) this draft |
2282
- | ​   ↳ `last_edited_by_user_id` | `string` | ✅ | — | ID of the user who last saved this draft (or null) |
2283
- | ​   ↳ `last_edited_at` | `string` | ✅ | — | When the draft was last edited (ISO-8601, or null) |
2284
- | ​   ↳ `discarded_at` | `string` | ✅ | — | When the draft was discarded (ISO-8601), or null while open |
2285
- | ​   ↳ `created_at` | `string` | ✅ | — | When the draft was created (ISO-8601) |
2286
- | ​   ↳ `updated_at` | `string` | ✅ | — | When the draft row was last updated (ISO-8601) |
2287
- | ​   ↳ `trigger` | `object` | ✅ | — | Trigger configuration held on this draft, or null for webhook-only workflows. |
2288
- | ​   ↳ `connections` | `object` | ✅ | — | Connection aliases bound on this draft (or null). |
2289
- | ​   ↳ `app_versions` | `object` | ✅ | — | App-version pins bound on this draft (or null). |
2290
- | ​ ↳ `issues[]` | `object[]` | ✅ | — | Blocking and non-blocking translation issues from the transform, passed through unchanged. Blocking issues do not prevent draft creation; they must be resolved before the draft will publish. |
2291
- | ​   ↳ `line` | `number` | ✅ | — | 1-based line in the generated source the issue relates to, or 0 when not line-specific. |
2292
- | ​   ↳ `column` | `number` | ✅ | — | 1-based column, or 0 when not column-specific. |
2293
- | ​   ↳ `node_kind` | `string` | ✅ | — | Category of the issue, used to group and message them, e.g. "invalid-connection-id", "DelayStep", "app-version-conflict". |
2294
- | ​   ↳ `step_name` | `string` | ❌ | — | ZDL step id or name the issue originated from, when known. |
2295
- | ​   ↳ `message` | `string` | ✅ | — | Human-readable description of the issue. |
2296
- | ​   ↳ `blocking` | `boolean` | ✅ | — | Whether the issue must be resolved before the draft can be published. Computed server-side, so callers do not re-derive it. A blocking issue does not prevent the draft being created. |
2245
+ | Name | Type | Required | Possible Values | Description |
2246
+ | ------------------------------ | ---------- | -------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2247
+ | `data` | `object` | ✅ | — | |
2248
+ | ​ ↳ `workflow` | `object` | ✅ | — | The created workflow. Disabled, with no published version, and source_zap_id set to the imported Zap. |
2249
+ | ​   ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
2250
+ | ​   ↳ `name` | `string` | ✅ | — | Workflow name |
2251
+ | ​   ↳ `description` | `string` | ❌ | — | Optional workflow description (null if unset) |
2252
+ | ​   ↳ `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. |
2253
+ | ​   ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
2254
+ | ​   ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow accepts triggers. An import always lands disabled. |
2255
+ | ​   ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed`, `owner_transferred` | Why the workflow is off, when system-disabled. |
2256
+ | ​   ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
2257
+ | ​   ↳ `source_zap_id` | `string` | ❌ | — | The Zap this workflow was imported from. |
2258
+ | ​   ↳ `created_by_user_id` | `string` | ✅ | — | |
2259
+ | ​   ↳ `updated_by_user_id` | `string` | ❌ | — | |
2260
+ | ​   ↳ `current_version_id` | `string` | ❌ | — | Null on a fresh import, which has no published version yet. |
2261
+ | ​   ↳ `triggers[]` | `object[]` | ✅ | — | Empty on a fresh import, which has no published version yet. |
2262
+ | ​     ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
2263
+ | ​     ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
2264
+ | ​     ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
2265
+ | ​     ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
2266
+ | ​     ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `initializing`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
2267
+ | ​     ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'. |
2268
+ | ​     ↳ `details` | `object` | ❌ | — | Trigger-type-specific metadata; shape varies by trigger type (e.g. `webhook_url` on catch-hook triggers). Null or absent when none applies. |
2269
+ | ​   ↳ `created_at` | `string` | ✅ | — | |
2270
+ | ​   ↳ `updated_at` | `string` | ❌ | — | |
2271
+ | ​ ↳ `draft` | `object` | ✅ | — | The open draft holding the transformed source. |
2272
+ | ​   ↳ `id` | `string` | ✅ | — | Workflow draft ID (UUID) |
2273
+ | ​   ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
2274
+ | ​   ↳ `slug` | `string` | ✅ | — | Human-friendly display name, not an identifier: two open drafts of a workflow may share one |
2275
+ | ​   ↳ `base_version_id` | `string` | ✅ | — | The version this draft was forked from (the live version at draft creation), or null when the workflow had no published version yet |
2276
+ | ​   ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
2277
+ | ​   ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this draft |
2278
+ | ​   ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this draft (or null) |
2279
+ | ​   ↳ `draft_revision` | `number` | ✅ | — | Monotonic revision counter for optimistic concurrency. Echo it back on draft updates to detect concurrent edits. |
2280
+ | ​   ↳ `status` | `string` | ✅ | `open`, `discarded` | Lifecycle status of a workflow draft. |
2281
+ | ​   ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who created (forked) this draft |
2282
+ | ​   ↳ `last_edited_by_user_id` | `string` | ✅ | — | ID of the user who last saved this draft (or null) |
2283
+ | ​   ↳ `last_edited_at` | `string` | ✅ | — | When the draft was last edited (ISO-8601, or null) |
2284
+ | ​   ↳ `discarded_at` | `string` | ✅ | — | When the draft was discarded (ISO-8601), or null while open |
2285
+ | ​   ↳ `created_at` | `string` | ✅ | — | When the draft was created (ISO-8601) |
2286
+ | ​   ↳ `updated_at` | `string` | ✅ | — | When the draft row was last updated (ISO-8601) |
2287
+ | ​   ↳ `trigger` | `object` | ✅ | — | Trigger configuration held on this draft, or null for webhook-only workflows. |
2288
+ | ​   ↳ `connections` | `object` | ✅ | — | Connection aliases bound on this draft (or null). |
2289
+ | ​   ↳ `app_versions` | `object` | ✅ | — | App-version pins bound on this draft (or null). |
2290
+ | ​ ↳ `issues[]` | `object[]` | ✅ | — | Blocking and non-blocking translation issues from the transform, passed through unchanged. Blocking issues do not prevent draft creation; they must be resolved before the draft will publish. |
2291
+ | ​   ↳ `line` | `number` | ✅ | — | 1-based line in the generated source the issue relates to, or 0 when not line-specific. |
2292
+ | ​   ↳ `column` | `number` | ✅ | — | 1-based column, or 0 when not column-specific. |
2293
+ | ​   ↳ `node_kind` | `string` | ✅ | — | Category of the issue, used to group and message them, e.g. "invalid-connection-id", "DelayStep", "app-version-conflict". |
2294
+ | ​   ↳ `step_name` | `string` | ❌ | — | ZDL step id or name the issue originated from, when known. |
2295
+ | ​   ↳ `message` | `string` | ✅ | — | Human-readable description of the issue. |
2296
+ | ​   ↳ `blocking` | `boolean` | ✅ | — | Whether the issue must be resolved before the draft can be published. Computed server-side, so callers do not re-derive it. A blocking issue does not prevent the draft being created. |
2297
2297
 
2298
2298
  **Example:**
2299
2299
 
@@ -2559,30 +2559,30 @@ List all active durable workflows for the authenticated account
2559
2559
 
2560
2560
  **Returns:** `Promise<PaginatedResult<WorkflowItem>>`
2561
2561
 
2562
- | Name | Type | Required | Possible Values | Description |
2563
- | ------------------------- | ---------- | -------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2564
- | `data[]` | `object[]` | ✅ | — | |
2565
- | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
2566
- | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
2567
- | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
2568
- | ​ ↳ `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. |
2569
- | ​ ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
2570
- | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
2571
- | ​ ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed` | Why the workflow is off, when system-disabled. Null when not system-disabled. |
2572
- | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
2573
- | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
2574
- | ​ ↳ `current_version_id` | `string` | ✅ | — | ID of the workflow version that runs handle. Null until a version is published. |
2575
- | ​ ↳ `triggers[]` | `object[]` | ✅ | — | Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers. |
2576
- | ​   ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
2577
- | ​   ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
2578
- | ​   ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
2579
- | ​   ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
2580
- | ​   ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
2581
- | ​   ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'. |
2582
- | ​   ↳ `details` | `object` | ❌ | — | Trigger-type-specific metadata; shape varies by trigger type (e.g. `webhook_url` on catch-hook triggers). Null or absent when none applies. |
2583
- | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
2584
- | ​ ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
2585
- | `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
2562
+ | Name | Type | Required | Possible Values | Description |
2563
+ | ------------------------- | ---------- | -------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2564
+ | `data[]` | `object[]` | ✅ | — | |
2565
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
2566
+ | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
2567
+ | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
2568
+ | ​ ↳ `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. |
2569
+ | ​ ↳ `editor_url` | `string` | ✅ | — | URL to the Zapier workflow editor for this workflow |
2570
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
2571
+ | ​ ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed`, `owner_transferred` | Why the workflow is off, when system-disabled. Null when not system-disabled. |
2572
+ | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
2573
+ | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
2574
+ | ​ ↳ `current_version_id` | `string` | ✅ | — | ID of the workflow version that runs handle. Null until a version is published. |
2575
+ | ​ ↳ `triggers[]` | `object[]` | ✅ | — | Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers. |
2576
+ | ​   ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
2577
+ | ​   ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
2578
+ | ​   ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
2579
+ | ​   ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
2580
+ | ​   ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `initializing`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
2581
+ | ​   ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'. |
2582
+ | ​   ↳ `details` | `object` | ❌ | — | Trigger-type-specific metadata; shape varies by trigger type (e.g. `webhook_url` on catch-hook triggers). Null or absent when none applies. |
2583
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
2584
+ | ​ ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
2585
+ | `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
2586
2586
 
2587
2587
  **Example:**
2588
2588
 
@@ -2987,7 +2987,7 @@ Validate durable workflow source without publishing it. Returns source diagnosti
2987
2987
  const { data: workflowValidation } = await zapier.validateWorkflow({
2988
2988
  sourceFiles: {
2989
2989
  "/workflow.ts":
2990
- 'import { defineDurable } from "@zapier/zapier-durable"; export default defineDurable("hello-world", async (ctx, input) => { return ctx.step("greet", async () => "Hello, world!"); });',
2990
+ 'import { defineDurable } from "@zapier/zapier-durable"; export default defineDurable({ name: "hello-world", run: async (ctx) => { return ctx.step("greet", async () => "Hello, world!"); } });',
2991
2991
  },
2992
2992
  });
2993
2993
  ```