@zapier/zapier-sdk 0.70.2 → 0.70.4

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +115 -80
  3. package/dist/experimental.cjs +163 -37
  4. package/dist/experimental.d.mts +160 -4
  5. package/dist/experimental.d.ts +158 -2
  6. package/dist/experimental.d.ts.map +1 -1
  7. package/dist/experimental.mjs +162 -38
  8. package/dist/{index-DjLMJ3w8.d.mts → index-BNaiNmM-.d.mts} +133 -3
  9. package/dist/{index-DjLMJ3w8.d.ts → index-BNaiNmM-.d.ts} +133 -3
  10. package/dist/index.cjs +51 -2
  11. package/dist/index.d.mts +1 -1
  12. package/dist/index.mjs +50 -3
  13. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +9 -0
  14. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -1
  15. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +9 -0
  16. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -1
  17. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +9 -0
  18. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -1
  19. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +1 -1
  20. package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +5 -5
  21. package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts.map +1 -1
  22. package/dist/plugins/codeSubstrate/getDurableRun/schemas.js +2 -1
  23. package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts +1 -1
  24. package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts +31 -0
  25. package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts.map +1 -1
  26. package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts +42 -0
  27. package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts.map +1 -1
  28. package/dist/plugins/codeSubstrate/getWorkflow/schemas.js +20 -0
  29. package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts +9 -0
  30. package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts.map +1 -1
  31. package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts +1 -1
  32. package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts +35 -0
  33. package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts.map +1 -1
  34. package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts +13 -0
  35. package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts.map +1 -1
  36. package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.js +10 -0
  37. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts +3 -3
  38. package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts +9 -0
  39. package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts.map +1 -1
  40. package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts +3 -3
  41. package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts +22 -0
  42. package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts.map +1 -1
  43. package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts +26 -0
  44. package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts.map +1 -1
  45. package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.js +10 -0
  46. package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts +9 -0
  47. package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts.map +1 -1
  48. package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts +32 -0
  49. package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts.map +1 -1
  50. package/dist/plugins/codeSubstrate/listWorkflows/schemas.js +11 -0
  51. package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +22 -0
  52. package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +1 -1
  53. package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts +14 -1
  54. package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts.map +1 -1
  55. package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.js +11 -44
  56. package/dist/plugins/codeSubstrate/runDurable/index.d.ts +6 -0
  57. package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +1 -1
  58. package/dist/plugins/codeSubstrate/runDurable/index.js +3 -0
  59. package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts +12 -0
  60. package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts.map +1 -1
  61. package/dist/plugins/codeSubstrate/runDurable/schemas.js +33 -0
  62. package/dist/plugins/codeSubstrate/shared-schemas.d.ts +37 -0
  63. package/dist/plugins/codeSubstrate/shared-schemas.d.ts.map +1 -0
  64. package/dist/plugins/codeSubstrate/shared-schemas.js +69 -0
  65. package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts +9 -0
  66. package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts.map +1 -1
  67. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +11 -0
  68. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -1
  69. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts +2 -0
  70. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts.map +1 -1
  71. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.js +7 -0
  72. package/dist/plugins/eventEmission/builders.d.ts.map +1 -1
  73. package/dist/plugins/eventEmission/builders.js +7 -2
  74. package/dist/plugins/eventEmission/utils.d.ts +54 -0
  75. package/dist/plugins/eventEmission/utils.d.ts.map +1 -1
  76. package/dist/plugins/eventEmission/utils.js +97 -0
  77. package/dist/types/telemetry-events.d.ts +7 -0
  78. package/dist/types/telemetry-events.d.ts.map +1 -1
  79. package/dist/types/telemetry-events.js +2 -0
  80. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.70.4
4
+
5
+ ### Patch Changes
6
+
7
+ - a790695: Response-field parity audit for the experimental code-substrate
8
+ plugins. Restores fields the backend returns that were silently
9
+ stripped by the SDK's Zod schemas after the port from
10
+ `@zapier/zapier-sdk-code-substrate`.
11
+ - `updateWorkflow`, `getWorkflow`, `listWorkflows` responses now
12
+ include `is_private`, `created_by_user_id`, and (where applicable)
13
+ `triggers` with live claim status.
14
+ - `publishWorkflowVersion`, `getWorkflowVersion`, `listWorkflowVersions`
15
+ responses now include `trigger`, `connections`, and `app_versions`.
16
+ - `runDurable` input accepts `notifications` (webhook subscribers for
17
+ run lifecycle events).
18
+
19
+ Shared schemas (`ConnectionBindingSchema`, `AppVersionBindingSchema`,
20
+ `WorkflowVersionTriggerConfigSchema`, `WorkflowTriggerSchema`) live in
21
+ a new `shared-schemas.ts` for reuse across the workflow plugins.
22
+
23
+ ## 0.70.3
24
+
25
+ ### Patch Changes
26
+
27
+ - b83f0b6: Add TTY and agent caller context to SDK telemetry events
28
+ - 3fa4bbe: Fix `get-durable-run` schema to accept a null `last_error`. The durable execution summary's `last_error` was `.optional()` but not `.nullable()`, so parsing threw on successful runs where the API returns `last_error: null`.
29
+
3
30
  ## 0.70.2
4
31
 
5
32
  ### Patch Changes
package/README.md CHANGED
@@ -1326,24 +1326,35 @@ Get a durable workflow with its current version details and trigger claim status
1326
1326
 
1327
1327
  **Returns:** `Promise<WorkflowItem>`
1328
1328
 
1329
- | Name | Type | Required | Possible Values | Description |
1330
- | ------------------------------ | --------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------- |
1331
- | `data` | `object` | ✅ | — | |
1332
- | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1333
- | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
1334
- | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
1335
- | ​ ↳ `trigger_url` | `string` | ✅ | — | Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive. |
1336
- | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1337
- | ​ ↳ `current_version` | `object` | | — | The currently published version, if any. Absent for workflows with no version published yet. |
1338
- | ​   ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
1339
- | ​   ↳ `workflow_id` | `string` | | — | Parent workflow ID |
1340
- | ​   ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
1341
- | ​   ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
1342
- | ​   ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
1343
- | ​   ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
1344
- | ​   ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
1345
- | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
1346
- | ​ ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
1329
+ | Name | Type | Required | Possible Values | Description |
1330
+ | ------------------------------ | ---------- | -------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
1331
+ | `data` | `object` | ✅ | — | |
1332
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1333
+ | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
1334
+ | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
1335
+ | ​ ↳ `trigger_url` | `string` | ✅ | — | Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive. |
1336
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1337
+ | ​ ↳ `is_private` | `boolean` | | — | Whether the workflow is private to the creating user. False means account-visible. |
1338
+ | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
1339
+ | ​ ↳ `current_version` | `object` | | — | The currently published version, if any. Absent for workflows with no version published yet. |
1340
+ | ​   ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
1341
+ | ​   ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID |
1342
+ | ​   ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename contents |
1343
+ | ​   ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
1344
+ | ​   ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
1345
+ | ​   ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
1346
+ | ​   ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
1347
+ | ​   ↳ `trigger` | `object` | ✅ | — | Trigger configuration persisted on this version, or null for webhook-only workflows. |
1348
+ | ​   ↳ `connections` | `object` | ✅ | — | Connection aliases bound on this version (or null). |
1349
+ | ​   ↳ `app_versions` | `object` | ✅ | — | App-version pins bound on this version (or null). |
1350
+ | ​ ↳ `triggers[]` | `object[]` | ✅ | — | Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers. |
1351
+ | ​   ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
1352
+ | ​   ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
1353
+ | ​   ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
1354
+ | ​   ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
1355
+ | ​   ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
1356
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
1357
+ | ​ ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
1347
1358
 
1348
1359
  **Example:**
1349
1360
 
@@ -1403,16 +1414,19 @@ Get full details of a workflow version including source files
1403
1414
 
1404
1415
  **Returns:** `Promise<WorkflowVersionItem>`
1405
1416
 
1406
- | Name | Type | Required | Possible Values | Description |
1407
- | ---------------------------- | -------- | -------- | --------------- | ------------------------------------------------------------------- |
1408
- | `data` | `object` | ✅ | — | |
1409
- | ​ ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
1410
- | ​ ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
1411
- | ​ ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
1412
- | ​ ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
1413
- | ​ ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
1414
- | ​ ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
1415
- | ​ ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
1417
+ | Name | Type | Required | Possible Values | Description |
1418
+ | ---------------------------- | -------- | -------- | --------------- | ------------------------------------------------------------------------------------ |
1419
+ | `data` | `object` | ✅ | — | |
1420
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
1421
+ | ​ ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
1422
+ | ​ ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
1423
+ | ​ ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
1424
+ | ​ ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
1425
+ | ​ ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
1426
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
1427
+ | ​ ↳ `trigger` | `object` | ✅ | — | Trigger configuration persisted on this version, or null for webhook-only workflows. |
1428
+ | ​ ↳ `connections` | `object` | ✅ | — | Connection aliases bound on this version (or null). |
1429
+ | ​ ↳ `app_versions` | `object` | ✅ | — | App-version pins bound on this version (or null). |
1416
1430
 
1417
1431
  **Example:**
1418
1432
 
@@ -1541,16 +1555,19 @@ List published versions for a workflow, newest first
1541
1555
 
1542
1556
  **Returns:** `Promise<PaginatedResult<WorkflowVersionItem>>`
1543
1557
 
1544
- | Name | Type | Required | Possible Values | Description |
1545
- | ---------------------------- | ---------- | -------- | --------------- | ------------------------------------------------------------------- |
1546
- | `data[]` | `object[]` | ✅ | — | |
1547
- | ​ ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
1548
- | ​ ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
1549
- | ​ ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
1550
- | ​ ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
1551
- | ​ ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
1552
- | ​ ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
1553
- | `nextCursor` | `string` | | — | Cursor for the next page; omitted when there are no more pages |
1558
+ | Name | Type | Required | Possible Values | Description |
1559
+ | ---------------------------- | ---------- | -------- | --------------- | ------------------------------------------------------------------------------------ |
1560
+ | `data[]` | `object[]` | ✅ | — | |
1561
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
1562
+ | ​ ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
1563
+ | ​ ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
1564
+ | ​ ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
1565
+ | ​ ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
1566
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
1567
+ | ​ ↳ `trigger` | `object` | | — | Trigger configuration persisted on this version, or null for webhook-only workflows. |
1568
+ | ​ ↳ `connections` | `object` | ✅ | — | Connection aliases bound on this version (or null). |
1569
+ | ​ ↳ `app_versions` | `object` | ✅ | — | App-version pins bound on this version (or null). |
1570
+ | `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
1554
1571
 
1555
1572
  **Example:**
1556
1573
 
@@ -1593,18 +1610,26 @@ List all active durable workflows for the authenticated account
1593
1610
 
1594
1611
  **Returns:** `Promise<PaginatedResult<WorkflowItem>>`
1595
1612
 
1596
- | Name | Type | Required | Possible Values | Description |
1597
- | ------------------------ | ---------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------- |
1598
- | `data[]` | `object[]` | ✅ | — | |
1599
- | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1600
- | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
1601
- | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
1602
- | ​ ↳ `trigger_url` | `string` | ✅ | — | Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive. |
1603
- | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1604
- | ​ ↳ `current_version_id` | `string` | ✅ | — | ID of the workflow version that runs handle. Null until a version is published. |
1605
- | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
1606
- | ​ ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
1607
- | `nextCursor` | `string` | | — | Cursor for the next page; omitted when there are no more pages |
1613
+ | Name | Type | Required | Possible Values | Description |
1614
+ | ------------------------- | ---------- | -------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
1615
+ | `data[]` | `object[]` | ✅ | — | |
1616
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1617
+ | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
1618
+ | ​ ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
1619
+ | ​ ↳ `trigger_url` | `string` | ✅ | — | Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive. |
1620
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1621
+ | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
1622
+ | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
1623
+ | ​ ↳ `current_version_id` | `string` | ✅ | — | ID of the workflow version that runs handle. Null until a version is published. |
1624
+ | ​ ↳ `triggers[]` | `object[]` | | — | Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers. |
1625
+ | ​   ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
1626
+ | ​   ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
1627
+ | ​   ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
1628
+ | ​   ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
1629
+ | ​   ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
1630
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
1631
+ | ​ ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
1632
+ | `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
1608
1633
 
1609
1634
  **Example:**
1610
1635
 
@@ -1647,16 +1672,19 @@ Publish a new version of a durable workflow. Enables the workflow by default.
1647
1672
 
1648
1673
  **Returns:** `Promise<WorkflowVersionItem>`
1649
1674
 
1650
- | Name | Type | Required | Possible Values | Description |
1651
- | ---------------------------- | -------- | -------- | --------------- | ------------------------------------------------------------------- |
1652
- | `data` | `object` | ✅ | — | |
1653
- | ​ ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
1654
- | ​ ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
1655
- | ​ ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
1656
- | ​ ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
1657
- | ​ ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
1658
- | ​ ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
1659
- | ​ ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
1675
+ | Name | Type | Required | Possible Values | Description |
1676
+ | ---------------------------- | -------- | -------- | --------------- | ------------------------------------------------------------------------------------ |
1677
+ | `data` | `object` | ✅ | — | |
1678
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
1679
+ | ​ ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
1680
+ | ​ ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
1681
+ | ​ ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
1682
+ | ​ ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
1683
+ | ​ ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
1684
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
1685
+ | ​ ↳ `trigger` | `object` | ✅ | — | Trigger configuration persisted on this version, or null for webhook-only workflows. |
1686
+ | ​ ↳ `connections` | `object` | ✅ | — | Connection aliases bound on this version (or null). |
1687
+ | ​ ↳ `app_versions` | `object` | ✅ | — | App-version pins bound on this version (or null). |
1660
1688
 
1661
1689
  **Example:**
1662
1690
 
@@ -1673,16 +1701,21 @@ Run a workflow source file as a run-once durable run on sdkdurableapi (no deploy
1673
1701
 
1674
1702
  **Parameters:**
1675
1703
 
1676
- | Name | Type | Required | Default | Possible Values | Description |
1677
- | ---------------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------- |
1678
- | `options` | `object` | ✅ | — | — | |
1679
- | ​ ↳ `source_files` | `object` | ✅ | — | — | Source files keyed by filename → contents |
1680
- | ​ ↳ `input` | `unknown` | ❌ | — | — | Input data passed to the run |
1681
- | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
1682
- | ​ ↳ `zapier_durable_version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
1683
- | ​ ↳ `connections` | `object` | ❌ | — | — | Named connection aliases. Maps alias names to Zapier connection IDs. |
1684
- | ​ ↳ `app_versions` | `object` | ❌ | — | — | Pinned app versions. Maps app keys (slugs) to implementation names and versions. |
1685
- | ​ ↳ `private` | `boolean` | ❌ | — | — | Only the creating user can see the run (default false) |
1704
+ | Name | Type | Required | Default | Possible Values | Description |
1705
+ | ---------------------------- | ---------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------- |
1706
+ | `options` | `object` | ✅ | — | — | |
1707
+ | ​ ↳ `source_files` | `object` | ✅ | — | — | Source files keyed by filename → contents |
1708
+ | ​ ↳ `input` | `unknown` | ❌ | — | — | Input data passed to the run |
1709
+ | ​ ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
1710
+ | ​ ↳ `zapier_durable_version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
1711
+ | ​ ↳ `connections` | `object` | ❌ | — | — | Named connection aliases. Maps alias names to Zapier connection IDs. |
1712
+ | ​ ↳ `app_versions` | `object` | ❌ | — | — | Pinned app versions. Maps app keys (slugs) to implementation names and versions. |
1713
+ | ​ ↳ `private` | `boolean` | ❌ | — | — | Only the creating user can see the run (default false) |
1714
+ | ​ ↳ `notifications[]` | `object[]` | ❌ | — | — | Webhook subscribers for run lifecycle events. Each entry specifies a URL and the events it subscribes to. |
1715
+ | ​   ↳ `type` | `string` | ❌ | — | `webhook` | Notification transport. Webhook is the only supported type. |
1716
+ | ​   ↳ `url` | `string` | ✅ | — | — | URL to POST event notifications to. Payload is `{run_id, event}`. |
1717
+ | ​   ↳ `max_retries` | `number` | ❌ | — | — | Max delivery attempts with exponential backoff. Defaults to 3 server-side. |
1718
+ | ​   ↳ `events` | `array` | ✅ | — | — | One or more lifecycle events to subscribe this URL to. |
1686
1719
 
1687
1720
  **Returns:** `Promise<DurableRunItem>`
1688
1721
 
@@ -1746,16 +1779,18 @@ Update a durable workflow's name and/or description
1746
1779
 
1747
1780
  **Returns:** `Promise<WorkflowItem>`
1748
1781
 
1749
- | Name | Type | Required | Possible Values | Description |
1750
- | ----------------- | --------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------- |
1751
- | `data` | `object` | ✅ | — | |
1752
- | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1753
- | ​ ↳ `name` | `string` | ✅ | — | Workflow name (post-update) |
1754
- | ​ ↳ `description` | `string` | ✅ | — | Workflow description, post-update (null if unset) |
1755
- | ​ ↳ `trigger_url` | `string` | ✅ | — | Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive. |
1756
- | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1757
- | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
1758
- | ​ ↳ `updated_at` | `string` | ✅ | — | When this update was applied (ISO-8601) |
1782
+ | Name | Type | Required | Possible Values | Description |
1783
+ | ------------------------ | --------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------- |
1784
+ | `data` | `object` | ✅ | — | |
1785
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1786
+ | ​ ↳ `name` | `string` | ✅ | — | Workflow name (post-update) |
1787
+ | ​ ↳ `description` | `string` | ✅ | — | Workflow description, post-update (null if unset) |
1788
+ | ​ ↳ `trigger_url` | `string` | ✅ | — | Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive. |
1789
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1790
+ | ​ ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
1791
+ | ​ ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
1792
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
1793
+ | ​ ↳ `updated_at` | `string` | ✅ | — | When this update was applied (ISO-8601) |
1759
1794
 
1760
1795
  **Example:**
1761
1796