@zapier/zapier-sdk 0.60.0 → 0.61.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +147 -1
  3. package/dist/experimental.cjs +188 -10
  4. package/dist/experimental.d.mts +86 -0
  5. package/dist/experimental.d.ts +86 -0
  6. package/dist/experimental.d.ts.map +1 -1
  7. package/dist/experimental.js +10 -0
  8. package/dist/experimental.mjs +188 -10
  9. package/dist/index.cjs +3 -9
  10. package/dist/index.mjs +3 -9
  11. package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +45 -0
  12. package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -0
  13. package/dist/plugins/codeSubstrate/createWorkflow/index.js +19 -0
  14. package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts +16 -0
  15. package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts.map +1 -0
  16. package/dist/plugins/codeSubstrate/createWorkflow/schemas.js +25 -0
  17. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +39 -0
  18. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -0
  19. package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +27 -0
  20. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +6 -0
  21. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +1 -0
  22. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +6 -0
  23. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +40 -0
  24. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -0
  25. package/dist/plugins/codeSubstrate/disableWorkflow/index.js +20 -0
  26. package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts +11 -0
  27. package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts.map +1 -0
  28. package/dist/plugins/codeSubstrate/disableWorkflow/schemas.js +12 -0
  29. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +40 -0
  30. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -0
  31. package/dist/plugins/codeSubstrate/enableWorkflow/index.js +20 -0
  32. package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts +11 -0
  33. package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts.map +1 -0
  34. package/dist/plugins/codeSubstrate/enableWorkflow/schemas.js +12 -0
  35. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +47 -0
  36. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -0
  37. package/dist/plugins/codeSubstrate/updateWorkflow/index.js +27 -0
  38. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts +18 -0
  39. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts.map +1 -0
  40. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.js +30 -0
  41. package/dist/plugins/deleteClientCredentials/index.d.ts.map +1 -1
  42. package/dist/plugins/deleteClientCredentials/index.js +1 -4
  43. package/dist/resolvers/clientId.d.ts.map +1 -1
  44. package/dist/resolvers/clientId.js +2 -4
  45. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.61.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4827ffe: Add the workflow-write experimental code-substrate plugins: `createWorkflow`, `updateWorkflow`, `enableWorkflow`, `disableWorkflow`, `deleteWorkflow`. All five are registered only in `@zapier/zapier-sdk/experimental`; the stable subpath does not expose them. The four ID-based ops (update, enable, disable, delete) reuse `workflowIdResolver` so callers get an interactive picker via `sdk.listWorkflows()`. `deleteWorkflow` is marked `confirm: "delete"` for an explicit confirmation prompt before the destructive call. Input field naming follows the in-tree convention (`workflow` rather than the fork's `workflowId`, matching `tableIdResolver`'s shape) and is validated as a UUID at the input boundary so non-UUID strings fail with a clear schema error instead of an opaque 500 from the backend's `::uuid` cast. Response shapes match what the durableworkflowzaps handlers actually emit — no fabricated `is_private` / `created_by_user_id` / `triggers` fields. Handlers pass API responses through verbatim (no client-side `.parse()` re-emission) so callers see any richer fields the server adds later without an SDK release.
8
+
9
+ ### Patch Changes
10
+
11
+ - 104daa3: Fix login/logout reliability bugs.
12
+
13
+ **Bug fixes:**
14
+ - `logout` now warns and still clears local keychain/registry state when the server returns 401 during revocation (404 is still silently swallowed; 401 is surfaced as a console warning so users know to verify or revoke the credential manually if needed)
15
+ - Re-login no longer fails with "already exists" when a locally-orphaned registry entry has the same name as the desired new credential
16
+ - `logout` no longer prompts for confirmation before deleting credentials; it always proceeds immediately, which also fixes hangs in non-TTY/CI environments
17
+
18
+ **Deprecations:**
19
+ - `--skip-prompts` on `login` and `init` is deprecated in favour of `--non-interactive`. The old flag continues to work with a deprecation warning.
20
+
3
21
  ## 0.60.0
4
22
 
5
23
  ### Minor Changes
package/README.md CHANGED
@@ -27,8 +27,13 @@
27
27
  - [`deleteClientCredentials`](#deleteclientcredentials)
28
28
  - [`listClientCredentials`](#listclientcredentials)
29
29
  - [Code Workflows (Experimental)](#code-workflows-experimental)
30
+ - [`createWorkflow`](#createworkflow--experimental)
31
+ - [`deleteWorkflow`](#deleteworkflow--experimental)
32
+ - [`disableWorkflow`](#disableworkflow--experimental)
33
+ - [`enableWorkflow`](#enableworkflow--experimental)
30
34
  - [`getWorkflow`](#getworkflow--experimental)
31
35
  - [`listWorkflows`](#listworkflows--experimental)
36
+ - [`updateWorkflow`](#updateworkflow--experimental)
32
37
  - [Connections](#connections)
33
38
  - [`findFirstConnection`](#findfirstconnection)
34
39
  - [`findUniqueConnection`](#finduniqueconnection)
@@ -88,7 +93,7 @@ The following will create a new project from scratch, set up the SDK and the SDK
88
93
  npx @zapier/zapier-sdk-cli init my-zapier-app
89
94
 
90
95
  # Or skip the interactive prompts and accept all defaults.
91
- npx @zapier/zapier-sdk-cli init my-zapier-app --skip-prompts
96
+ npx @zapier/zapier-sdk-cli init my-zapier-app --non-interactive
92
97
  ```
93
98
 
94
99
  ## Installation
@@ -1087,6 +1092,113 @@ for await (const clientCredentials of zapier.listClientCredentials().items()) {
1087
1092
 
1088
1093
  > ℹ️ **Experimental.** Import from `"@zapier/zapier-sdk/experimental"` to use these methods. Methods and behavior may change.
1089
1094
 
1095
+ #### `createWorkflow` 🧪 _experimental_
1096
+
1097
+ Create a durable workflow container. Starts disabled with no version; publish a version to add code.
1098
+
1099
+ **Parameters:**
1100
+
1101
+ | Name | Type | Required | Default | Possible Values | Description |
1102
+ | ----------------- | -------- | -------- | ------- | --------------- | ------------------------------------- |
1103
+ | `options` | `object` | ✅ | — | — | |
1104
+ | ​ ↳ `name` | `string` | ✅ | — | — | Workflow name |
1105
+ | ​ ↳ `description` | `string` | ❌ | — | — | Optional description for the workflow |
1106
+
1107
+ **Returns:** `Promise<WorkflowItem>`
1108
+
1109
+ | Name | Type | Required | Possible Values | Description |
1110
+ | ----------------- | --------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------- |
1111
+ | `data` | `object` | ✅ | — | |
1112
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1113
+ | ​ ↳ `name` | `string` | ✅ | — | Workflow name |
1114
+ | ​ ↳ `description` | `string` | ✅ | — | Workflow description (null if unset) |
1115
+ | ​ ↳ `trigger_url` | `string` | ✅ | — | Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive. |
1116
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers. Always false on a new workflow until enabled. |
1117
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
1118
+
1119
+ **Example:**
1120
+
1121
+ ```typescript
1122
+ const result = await zapier.createWorkflow({
1123
+ name: "example-name",
1124
+ });
1125
+ ```
1126
+
1127
+ #### `deleteWorkflow` 🧪 _experimental_
1128
+
1129
+ Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves.
1130
+
1131
+ **Parameters:**
1132
+
1133
+ | Name | Type | Required | Default | Possible Values | Description |
1134
+ | -------------- | -------- | -------- | ------- | --------------- | ------------------- |
1135
+ | `options` | `object` | ✅ | — | — | |
1136
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
1137
+
1138
+ **Returns:** `Promise<{ success: boolean }>`
1139
+
1140
+ **Example:**
1141
+
1142
+ ```typescript
1143
+ const result = await zapier.deleteWorkflow({
1144
+ workflow: "example-workflow",
1145
+ });
1146
+ ```
1147
+
1148
+ #### `disableWorkflow` 🧪 _experimental_
1149
+
1150
+ Disable a durable workflow so it stops accepting triggers
1151
+
1152
+ **Parameters:**
1153
+
1154
+ | Name | Type | Required | Default | Possible Values | Description |
1155
+ | -------------- | -------- | -------- | ------- | --------------- | ------------------- |
1156
+ | `options` | `object` | ✅ | — | — | |
1157
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
1158
+
1159
+ **Returns:** `Promise<WorkflowItem>`
1160
+
1161
+ | Name | Type | Required | Possible Values | Description |
1162
+ | ------------- | --------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
1163
+ | `data` | `object` | ✅ | — | |
1164
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1165
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Workflow's enabled state after the operation. Typically false; mirrors the row's true state in case a concurrent enable raced with this call. |
1166
+
1167
+ **Example:**
1168
+
1169
+ ```typescript
1170
+ const result = await zapier.disableWorkflow({
1171
+ workflow: "example-workflow",
1172
+ });
1173
+ ```
1174
+
1175
+ #### `enableWorkflow` 🧪 _experimental_
1176
+
1177
+ Enable a durable workflow so it accepts triggers
1178
+
1179
+ **Parameters:**
1180
+
1181
+ | Name | Type | Required | Default | Possible Values | Description |
1182
+ | -------------- | -------- | -------- | ------- | --------------- | ------------------- |
1183
+ | `options` | `object` | ✅ | — | — | |
1184
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
1185
+
1186
+ **Returns:** `Promise<WorkflowItem>`
1187
+
1188
+ | Name | Type | Required | Possible Values | Description |
1189
+ | ------------- | --------- | -------- | --------------- | ---------------------------------------------------------- |
1190
+ | `data` | `object` | ✅ | — | |
1191
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1192
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Workflow's enabled state after the operation (always true) |
1193
+
1194
+ **Example:**
1195
+
1196
+ ```typescript
1197
+ const result = await zapier.enableWorkflow({
1198
+ workflow: "example-workflow",
1199
+ });
1200
+ ```
1201
+
1090
1202
  #### `getWorkflow` 🧪 _experimental_
1091
1203
 
1092
1204
  Get a durable workflow with its current version details and trigger claim status
@@ -1172,6 +1284,40 @@ for await (const workflow of zapier.listWorkflows().items()) {
1172
1284
  }
1173
1285
  ```
1174
1286
 
1287
+ #### `updateWorkflow` 🧪 _experimental_
1288
+
1289
+ Update a durable workflow's name and/or description
1290
+
1291
+ **Parameters:**
1292
+
1293
+ | Name | Type | Required | Default | Possible Values | Description |
1294
+ | ----------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------- |
1295
+ | `options` | `object` | ✅ | — | — | |
1296
+ | ​ ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
1297
+ | ​ ↳ `name` | `string` | ❌ | — | — | New name for the workflow |
1298
+ | ​ ↳ `description` | `string` | ❌ | — | — | New description for the workflow (pass null to clear) |
1299
+
1300
+ **Returns:** `Promise<WorkflowItem>`
1301
+
1302
+ | Name | Type | Required | Possible Values | Description |
1303
+ | ----------------- | --------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------- |
1304
+ | `data` | `object` | ✅ | — | |
1305
+ | ​ ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
1306
+ | ​ ↳ `name` | `string` | ✅ | — | Workflow name (post-update) |
1307
+ | ​ ↳ `description` | `string` | ✅ | — | Workflow description, post-update (null if unset) |
1308
+ | ​ ↳ `trigger_url` | `string` | ✅ | — | Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive. |
1309
+ | ​ ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
1310
+ | ​ ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
1311
+ | ​ ↳ `updated_at` | `string` | ✅ | — | When this update was applied (ISO-8601) |
1312
+
1313
+ **Example:**
1314
+
1315
+ ```typescript
1316
+ const result = await zapier.updateWorkflow({
1317
+ workflow: "example-workflow",
1318
+ });
1319
+ ```
1320
+
1175
1321
  ### Connections
1176
1322
 
1177
1323
  #### `findFirstConnection`
@@ -2889,7 +2889,7 @@ async function invalidateCredentialsToken(options) {
2889
2889
  }
2890
2890
 
2891
2891
  // src/sdk-version.ts
2892
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.60.0" : void 0) || "unknown";
2892
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.61.0" : void 0) || "unknown";
2893
2893
 
2894
2894
  // src/utils/open-url.ts
2895
2895
  var nodePrefix = "node:";
@@ -4208,10 +4208,7 @@ var clientCredentialsNameResolver = {
4208
4208
  // src/resolvers/clientId.ts
4209
4209
  var clientIdResolver = {
4210
4210
  type: "dynamic",
4211
- fetch: async (sdk) => {
4212
- const result = await sdk.listClientCredentials({ maxItems: 100 });
4213
- return result.data;
4214
- },
4211
+ fetch: async (sdk) => toIterable(sdk.listClientCredentials({})),
4215
4212
  prompt: (credentials) => ({
4216
4213
  type: "list",
4217
4214
  name: "clientId",
@@ -6151,10 +6148,7 @@ var deleteClientCredentialsPlugin = definePlugin(
6151
6148
  {
6152
6149
  authRequired: true,
6153
6150
  requiredScopes: ["credentials"],
6154
- resource: {
6155
- type: "client-credential",
6156
- id: options.clientId
6157
- }
6151
+ resource: { type: "client-credential", id: options.clientId }
6158
6152
  }
6159
6153
  );
6160
6154
  return { success: true };
@@ -10646,6 +10640,190 @@ var getWorkflowPlugin = definePlugin(
10646
10640
  }
10647
10641
  })
10648
10642
  );
10643
+ var CreateWorkflowOptionsSchema = zod.z.object({
10644
+ name: zod.z.string().min(1).describe("Workflow name"),
10645
+ description: zod.z.string().optional().describe("Optional description for the workflow")
10646
+ }).describe(
10647
+ "Create a durable workflow container. Starts disabled with no version; publish a version to add code."
10648
+ );
10649
+ var CreateWorkflowResponseSchema = zod.z.object({
10650
+ id: zod.z.string().describe("Workflow ID (UUID)"),
10651
+ name: zod.z.string().describe("Workflow name"),
10652
+ description: zod.z.string().nullable().describe("Workflow description (null if unset)"),
10653
+ trigger_url: zod.z.string().describe(
10654
+ "Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path \u2014 treat as sensitive."
10655
+ ),
10656
+ enabled: zod.z.boolean().describe(
10657
+ "Whether the workflow currently accepts triggers. Always false on a new workflow until enabled."
10658
+ ),
10659
+ created_at: zod.z.string().describe("When the workflow was created (ISO-8601)")
10660
+ });
10661
+
10662
+ // src/plugins/codeSubstrate/createWorkflow/index.ts
10663
+ var createWorkflowPlugin = definePlugin(
10664
+ (sdk) => createPluginMethod(sdk, {
10665
+ ...codeSubstrateDefaults,
10666
+ name: "createWorkflow",
10667
+ type: "create",
10668
+ itemType: "Workflow",
10669
+ inputSchema: CreateWorkflowOptionsSchema,
10670
+ outputSchema: CreateWorkflowResponseSchema,
10671
+ handler: async ({ sdk: sdk2, options }) => {
10672
+ const body = { name: options.name };
10673
+ if (options.description !== void 0) {
10674
+ body.description = options.description;
10675
+ }
10676
+ const data = await sdk2.context.api.post(
10677
+ "/durableworkflowzaps/api/v0/workflows",
10678
+ body,
10679
+ { authRequired: true }
10680
+ );
10681
+ return { data };
10682
+ }
10683
+ })
10684
+ );
10685
+ var UpdateWorkflowOptionsSchema = zod.z.object({
10686
+ workflow: zod.z.string().uuid().describe("Durable workflow ID"),
10687
+ name: zod.z.string().min(1).optional().describe("New name for the workflow"),
10688
+ description: zod.z.string().nullish().describe("New description for the workflow (pass null to clear)")
10689
+ }).refine((data) => data.name !== void 0 || data.description !== void 0, {
10690
+ message: "Provide name or description (at least one is required)"
10691
+ }).describe("Update a durable workflow's name and/or description");
10692
+ var UpdateWorkflowResponseSchema = zod.z.object({
10693
+ id: zod.z.string().describe("Workflow ID (UUID)"),
10694
+ name: zod.z.string().describe("Workflow name (post-update)"),
10695
+ description: zod.z.string().nullable().describe("Workflow description, post-update (null if unset)"),
10696
+ trigger_url: zod.z.string().describe(
10697
+ "Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path \u2014 treat as sensitive."
10698
+ ),
10699
+ enabled: zod.z.boolean().describe("Whether the workflow currently accepts triggers"),
10700
+ created_at: zod.z.string().describe("When the workflow was created (ISO-8601)"),
10701
+ updated_at: zod.z.string().describe("When this update was applied (ISO-8601)")
10702
+ });
10703
+
10704
+ // src/plugins/codeSubstrate/updateWorkflow/index.ts
10705
+ var updateWorkflowPlugin = definePlugin(
10706
+ (sdk) => createPluginMethod(sdk, {
10707
+ ...codeSubstrateDefaults,
10708
+ name: "updateWorkflow",
10709
+ type: "update",
10710
+ itemType: "Workflow",
10711
+ inputSchema: UpdateWorkflowOptionsSchema,
10712
+ outputSchema: UpdateWorkflowResponseSchema,
10713
+ resolvers: { workflow: workflowIdResolver },
10714
+ handler: async ({ sdk: sdk2, options }) => {
10715
+ const body = {};
10716
+ if (options.name !== void 0) {
10717
+ body.name = options.name;
10718
+ }
10719
+ if (options.description !== void 0) {
10720
+ body.description = options.description;
10721
+ }
10722
+ const data = await sdk2.context.api.patch(
10723
+ `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
10724
+ body,
10725
+ {
10726
+ authRequired: true,
10727
+ resource: { type: "workflow", id: options.workflow }
10728
+ }
10729
+ );
10730
+ return { data };
10731
+ }
10732
+ })
10733
+ );
10734
+ var EnableWorkflowOptionsSchema = zod.z.object({
10735
+ workflow: zod.z.string().uuid().describe("Durable workflow ID")
10736
+ }).describe("Enable a durable workflow so it accepts triggers");
10737
+ var EnableWorkflowResponseSchema = zod.z.object({
10738
+ id: zod.z.string().describe("Workflow ID (UUID)"),
10739
+ enabled: zod.z.boolean().describe("Workflow's enabled state after the operation (always true)")
10740
+ });
10741
+
10742
+ // src/plugins/codeSubstrate/enableWorkflow/index.ts
10743
+ var enableWorkflowPlugin = definePlugin(
10744
+ (sdk) => createPluginMethod(sdk, {
10745
+ ...codeSubstrateDefaults,
10746
+ name: "enableWorkflow",
10747
+ type: "update",
10748
+ itemType: "Workflow",
10749
+ inputSchema: EnableWorkflowOptionsSchema,
10750
+ outputSchema: EnableWorkflowResponseSchema,
10751
+ resolvers: { workflow: workflowIdResolver },
10752
+ handler: async ({ sdk: sdk2, options }) => {
10753
+ const data = await sdk2.context.api.post(
10754
+ `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`,
10755
+ void 0,
10756
+ {
10757
+ authRequired: true,
10758
+ resource: { type: "workflow", id: options.workflow }
10759
+ }
10760
+ );
10761
+ return { data };
10762
+ }
10763
+ })
10764
+ );
10765
+ var DisableWorkflowOptionsSchema = zod.z.object({
10766
+ workflow: zod.z.string().uuid().describe("Durable workflow ID")
10767
+ }).describe("Disable a durable workflow so it stops accepting triggers");
10768
+ var DisableWorkflowResponseSchema = zod.z.object({
10769
+ id: zod.z.string().describe("Workflow ID (UUID)"),
10770
+ enabled: zod.z.boolean().describe(
10771
+ "Workflow's enabled state after the operation. Typically false; mirrors the row's true state in case a concurrent enable raced with this call."
10772
+ )
10773
+ });
10774
+
10775
+ // src/plugins/codeSubstrate/disableWorkflow/index.ts
10776
+ var disableWorkflowPlugin = definePlugin(
10777
+ (sdk) => createPluginMethod(sdk, {
10778
+ ...codeSubstrateDefaults,
10779
+ name: "disableWorkflow",
10780
+ type: "update",
10781
+ itemType: "Workflow",
10782
+ inputSchema: DisableWorkflowOptionsSchema,
10783
+ outputSchema: DisableWorkflowResponseSchema,
10784
+ resolvers: { workflow: workflowIdResolver },
10785
+ handler: async ({ sdk: sdk2, options }) => {
10786
+ const data = await sdk2.context.api.post(
10787
+ `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`,
10788
+ void 0,
10789
+ {
10790
+ authRequired: true,
10791
+ resource: { type: "workflow", id: options.workflow }
10792
+ }
10793
+ );
10794
+ return { data };
10795
+ }
10796
+ })
10797
+ );
10798
+ var DeleteWorkflowOptionsSchema = zod.z.object({
10799
+ workflow: zod.z.string().uuid().describe("Durable workflow ID")
10800
+ }).describe(
10801
+ "Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves."
10802
+ );
10803
+
10804
+ // src/plugins/codeSubstrate/deleteWorkflow/index.ts
10805
+ var deleteWorkflowPlugin = definePlugin(
10806
+ (sdk) => createPluginMethod(sdk, {
10807
+ ...codeSubstrateDefaults,
10808
+ name: "deleteWorkflow",
10809
+ type: "delete",
10810
+ itemType: "Workflow",
10811
+ confirm: "delete",
10812
+ inputSchema: DeleteWorkflowOptionsSchema,
10813
+ resolvers: { workflow: workflowIdResolver },
10814
+ handler: async ({ sdk: sdk2, options }) => {
10815
+ await sdk2.context.api.delete(
10816
+ `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
10817
+ void 0,
10818
+ {
10819
+ authRequired: true,
10820
+ resource: { type: "workflow", id: options.workflow }
10821
+ }
10822
+ );
10823
+ return { data: { id: options.workflow } };
10824
+ }
10825
+ })
10826
+ );
10649
10827
 
10650
10828
  // src/utils/batch-utils.ts
10651
10829
  var DEFAULT_CONCURRENCY = 10;
@@ -10805,7 +10983,7 @@ var registryPlugin = definePlugin((_sdk) => {
10805
10983
 
10806
10984
  // src/experimental.ts
10807
10985
  function createZapierSdk2(options = {}) {
10808
- return createSdk().addPlugin(createOptionsPlugin(options)).addPlugin(eventEmissionPlugin).addPlugin(apiPlugin).addPlugin(manifestPlugin).addPlugin(capabilitiesPlugin).addPlugin(connectionsPlugin).addPlugin(listAppsPlugin).addPlugin(getAppPlugin).addPlugin(listActionsPlugin).addPlugin(getActionPlugin).addPlugin(listActionInputFieldsPlugin).addPlugin(getActionInputFieldsSchemaPlugin).addPlugin(listActionInputFieldChoicesPlugin).addPlugin(listInputFieldsDeprecatedPlugin).addPlugin(getInputFieldsSchemaDeprecatedPlugin).addPlugin(listInputFieldChoicesDeprecatedPlugin).addPlugin(runActionPlugin).addPlugin(listConnectionsPlugin).addPlugin(getConnectionPlugin).addPlugin(findFirstConnectionPlugin).addPlugin(findUniqueConnectionPlugin).addPlugin(listAuthenticationsPlugin).addPlugin(getAuthenticationPlugin).addPlugin(findFirstAuthenticationPlugin).addPlugin(findUniqueAuthenticationPlugin).addPlugin(listClientCredentialsPlugin).addPlugin(createClientCredentialsPlugin).addPlugin(deleteClientCredentialsPlugin).addPlugin(fetchPlugin).addPlugin(requestPlugin).addPlugin(createTriggerInboxPlugin).addPlugin(ensureTriggerInboxPlugin).addPlugin(listTriggerInboxesPlugin).addPlugin(getTriggerInboxPlugin).addPlugin(updateTriggerInboxPlugin).addPlugin(deleteTriggerInboxPlugin).addPlugin(pauseTriggerInboxPlugin).addPlugin(resumeTriggerInboxPlugin).addPlugin(listTriggerInboxMessagesPlugin).addPlugin(leaseTriggerInboxMessagesPlugin).addPlugin(ackTriggerInboxMessagesPlugin).addPlugin(releaseTriggerInboxMessagesPlugin).addPlugin(drainTriggerInboxPlugin).addPlugin(watchTriggerInboxPlugin).addPlugin(listTriggersPlugin).addPlugin(listTriggerInputFieldsPlugin).addPlugin(listTriggerInputFieldChoicesPlugin).addPlugin(getTriggerInputFieldsSchemaPlugin).addPlugin(listTablesPlugin).addPlugin(getTablePlugin).addPlugin(deleteTablePlugin).addPlugin(createTablePlugin).addPlugin(listTableFieldsPlugin).addPlugin(createTableFieldsPlugin).addPlugin(deleteTableFieldsPlugin).addPlugin(getTableRecordPlugin).addPlugin(listTableRecordsPlugin).addPlugin(createTableRecordsPlugin).addPlugin(deleteTableRecordsPlugin).addPlugin(updateTableRecordsPlugin).addPlugin(listWorkflowsPlugin).addPlugin(getWorkflowPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
10986
+ return createSdk().addPlugin(createOptionsPlugin(options)).addPlugin(eventEmissionPlugin).addPlugin(apiPlugin).addPlugin(manifestPlugin).addPlugin(capabilitiesPlugin).addPlugin(connectionsPlugin).addPlugin(listAppsPlugin).addPlugin(getAppPlugin).addPlugin(listActionsPlugin).addPlugin(getActionPlugin).addPlugin(listActionInputFieldsPlugin).addPlugin(getActionInputFieldsSchemaPlugin).addPlugin(listActionInputFieldChoicesPlugin).addPlugin(listInputFieldsDeprecatedPlugin).addPlugin(getInputFieldsSchemaDeprecatedPlugin).addPlugin(listInputFieldChoicesDeprecatedPlugin).addPlugin(runActionPlugin).addPlugin(listConnectionsPlugin).addPlugin(getConnectionPlugin).addPlugin(findFirstConnectionPlugin).addPlugin(findUniqueConnectionPlugin).addPlugin(listAuthenticationsPlugin).addPlugin(getAuthenticationPlugin).addPlugin(findFirstAuthenticationPlugin).addPlugin(findUniqueAuthenticationPlugin).addPlugin(listClientCredentialsPlugin).addPlugin(createClientCredentialsPlugin).addPlugin(deleteClientCredentialsPlugin).addPlugin(fetchPlugin).addPlugin(requestPlugin).addPlugin(createTriggerInboxPlugin).addPlugin(ensureTriggerInboxPlugin).addPlugin(listTriggerInboxesPlugin).addPlugin(getTriggerInboxPlugin).addPlugin(updateTriggerInboxPlugin).addPlugin(deleteTriggerInboxPlugin).addPlugin(pauseTriggerInboxPlugin).addPlugin(resumeTriggerInboxPlugin).addPlugin(listTriggerInboxMessagesPlugin).addPlugin(leaseTriggerInboxMessagesPlugin).addPlugin(ackTriggerInboxMessagesPlugin).addPlugin(releaseTriggerInboxMessagesPlugin).addPlugin(drainTriggerInboxPlugin).addPlugin(watchTriggerInboxPlugin).addPlugin(listTriggersPlugin).addPlugin(listTriggerInputFieldsPlugin).addPlugin(listTriggerInputFieldChoicesPlugin).addPlugin(getTriggerInputFieldsSchemaPlugin).addPlugin(listTablesPlugin).addPlugin(getTablePlugin).addPlugin(deleteTablePlugin).addPlugin(createTablePlugin).addPlugin(listTableFieldsPlugin).addPlugin(createTableFieldsPlugin).addPlugin(deleteTableFieldsPlugin).addPlugin(getTableRecordPlugin).addPlugin(listTableRecordsPlugin).addPlugin(createTableRecordsPlugin).addPlugin(deleteTableRecordsPlugin).addPlugin(updateTableRecordsPlugin).addPlugin(listWorkflowsPlugin).addPlugin(getWorkflowPlugin).addPlugin(createWorkflowPlugin).addPlugin(updateWorkflowPlugin).addPlugin(enableWorkflowPlugin).addPlugin(disableWorkflowPlugin).addPlugin(deleteWorkflowPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
10809
10987
  }
10810
10988
 
10811
10989
  exports.ActionKeyPropertySchema = ActionKeyPropertySchema;
@@ -2331,6 +2331,92 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<{
2331
2331
  getWorkflow: PluginMeta;
2332
2332
  };
2333
2333
  };
2334
+ } & {
2335
+ createWorkflow: (options?: {
2336
+ name: string;
2337
+ description?: string | undefined;
2338
+ } | undefined) => Promise<{
2339
+ data: {
2340
+ id: string;
2341
+ name: string;
2342
+ description: string | null;
2343
+ trigger_url: string;
2344
+ enabled: boolean;
2345
+ created_at: string;
2346
+ };
2347
+ }>;
2348
+ } & {
2349
+ context: {
2350
+ meta: {
2351
+ createWorkflow: PluginMeta;
2352
+ };
2353
+ };
2354
+ } & {
2355
+ updateWorkflow: (options?: {
2356
+ workflow: string;
2357
+ name?: string | undefined;
2358
+ description?: string | null | undefined;
2359
+ } | undefined) => Promise<{
2360
+ data: {
2361
+ id: string;
2362
+ name: string;
2363
+ description: string | null;
2364
+ trigger_url: string;
2365
+ enabled: boolean;
2366
+ created_at: string;
2367
+ updated_at: string;
2368
+ };
2369
+ }>;
2370
+ } & {
2371
+ context: {
2372
+ meta: {
2373
+ updateWorkflow: PluginMeta;
2374
+ };
2375
+ };
2376
+ } & {
2377
+ enableWorkflow: (options?: {
2378
+ workflow: string;
2379
+ } | undefined) => Promise<{
2380
+ data: {
2381
+ id: string;
2382
+ enabled: boolean;
2383
+ };
2384
+ }>;
2385
+ } & {
2386
+ context: {
2387
+ meta: {
2388
+ enableWorkflow: PluginMeta;
2389
+ };
2390
+ };
2391
+ } & {
2392
+ disableWorkflow: (options?: {
2393
+ workflow: string;
2394
+ } | undefined) => Promise<{
2395
+ data: {
2396
+ id: string;
2397
+ enabled: boolean;
2398
+ };
2399
+ }>;
2400
+ } & {
2401
+ context: {
2402
+ meta: {
2403
+ disableWorkflow: PluginMeta;
2404
+ };
2405
+ };
2406
+ } & {
2407
+ deleteWorkflow: (options?: {
2408
+ workflow: string;
2409
+ } | undefined) => Promise<{
2410
+ data: {
2411
+ id: string;
2412
+ };
2413
+ }>;
2414
+ } & {
2415
+ context: {
2416
+ meta: {
2417
+ deleteWorkflow: PluginMeta;
2418
+ };
2419
+ };
2334
2420
  } & {
2335
2421
  apps: ActionProxy & ZapierSdkApps;
2336
2422
  context: {
@@ -2346,6 +2346,92 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("./i
2346
2346
  getWorkflow: PluginMeta;
2347
2347
  };
2348
2348
  };
2349
+ } & {
2350
+ createWorkflow: (options?: {
2351
+ name: string;
2352
+ description?: string | undefined;
2353
+ } | undefined) => Promise<{
2354
+ data: {
2355
+ id: string;
2356
+ name: string;
2357
+ description: string | null;
2358
+ trigger_url: string;
2359
+ enabled: boolean;
2360
+ created_at: string;
2361
+ };
2362
+ }>;
2363
+ } & {
2364
+ context: {
2365
+ meta: {
2366
+ createWorkflow: PluginMeta;
2367
+ };
2368
+ };
2369
+ } & {
2370
+ updateWorkflow: (options?: {
2371
+ workflow: string;
2372
+ name?: string | undefined;
2373
+ description?: string | null | undefined;
2374
+ } | undefined) => Promise<{
2375
+ data: {
2376
+ id: string;
2377
+ name: string;
2378
+ description: string | null;
2379
+ trigger_url: string;
2380
+ enabled: boolean;
2381
+ created_at: string;
2382
+ updated_at: string;
2383
+ };
2384
+ }>;
2385
+ } & {
2386
+ context: {
2387
+ meta: {
2388
+ updateWorkflow: PluginMeta;
2389
+ };
2390
+ };
2391
+ } & {
2392
+ enableWorkflow: (options?: {
2393
+ workflow: string;
2394
+ } | undefined) => Promise<{
2395
+ data: {
2396
+ id: string;
2397
+ enabled: boolean;
2398
+ };
2399
+ }>;
2400
+ } & {
2401
+ context: {
2402
+ meta: {
2403
+ enableWorkflow: PluginMeta;
2404
+ };
2405
+ };
2406
+ } & {
2407
+ disableWorkflow: (options?: {
2408
+ workflow: string;
2409
+ } | undefined) => Promise<{
2410
+ data: {
2411
+ id: string;
2412
+ enabled: boolean;
2413
+ };
2414
+ }>;
2415
+ } & {
2416
+ context: {
2417
+ meta: {
2418
+ disableWorkflow: PluginMeta;
2419
+ };
2420
+ };
2421
+ } & {
2422
+ deleteWorkflow: (options?: {
2423
+ workflow: string;
2424
+ } | undefined) => Promise<{
2425
+ data: {
2426
+ id: string;
2427
+ };
2428
+ }>;
2429
+ } & {
2430
+ context: {
2431
+ meta: {
2432
+ deleteWorkflow: PluginMeta;
2433
+ };
2434
+ };
2349
2435
  } & {
2350
2436
  apps: import("./plugins/apps/schemas").ActionProxy & import("./index").ZapierSdkApps;
2351
2437
  context: {
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AA0EjD,cAAc,SAAS,CAAC;AAExB,MAAM,WAAW,gBAAiB,SAAQ,cAAc;CAAG;AAE3D,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAmG6sK,CAAC;;;;sB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GATtkK;AAED,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAM3D,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -78,6 +78,11 @@ import { connectionsPlugin } from "./plugins/connections";
78
78
  import { eventEmissionPlugin } from "./plugins/eventEmission";
79
79
  import { listWorkflowsPlugin } from "./plugins/codeSubstrate/listWorkflows";
80
80
  import { getWorkflowPlugin } from "./plugins/codeSubstrate/getWorkflow";
81
+ import { createWorkflowPlugin } from "./plugins/codeSubstrate/createWorkflow";
82
+ import { updateWorkflowPlugin } from "./plugins/codeSubstrate/updateWorkflow";
83
+ import { enableWorkflowPlugin } from "./plugins/codeSubstrate/enableWorkflow";
84
+ import { disableWorkflowPlugin } from "./plugins/codeSubstrate/disableWorkflow";
85
+ import { deleteWorkflowPlugin } from "./plugins/codeSubstrate/deleteWorkflow";
81
86
  // Re-export everything from the stable index so callers importing from
82
87
  // the experimental subpath get the full API surface (types, helpers,
83
88
  // errors) without having to import from two paths.
@@ -155,6 +160,11 @@ export function createZapierSdk(options = {}) {
155
160
  // Code substrate (experimental)
156
161
  .addPlugin(listWorkflowsPlugin)
157
162
  .addPlugin(getWorkflowPlugin)
163
+ .addPlugin(createWorkflowPlugin)
164
+ .addPlugin(updateWorkflowPlugin)
165
+ .addPlugin(enableWorkflowPlugin)
166
+ .addPlugin(disableWorkflowPlugin)
167
+ .addPlugin(deleteWorkflowPlugin)
158
168
  // Magic apps plugin
159
169
  .addPlugin(appsPlugin)
160
170
  // Profile