@zapier/zapier-sdk 0.48.1 → 0.49.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 (207) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +818 -70
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/client.js +10 -1
  5. package/dist/api/polling.d.ts +7 -0
  6. package/dist/api/polling.d.ts.map +1 -1
  7. package/dist/api/polling.js +29 -4
  8. package/dist/api/types.d.ts +7 -0
  9. package/dist/api/types.d.ts.map +1 -1
  10. package/dist/experimental.cjs +10389 -0
  11. package/dist/experimental.d.mts +2292 -0
  12. package/dist/experimental.d.ts +2308 -0
  13. package/dist/experimental.d.ts.map +1 -0
  14. package/dist/experimental.js +155 -0
  15. package/dist/experimental.mjs +10207 -0
  16. package/dist/index-C2vsvjgN.d.mts +9539 -0
  17. package/dist/index-C2vsvjgN.d.ts +9539 -0
  18. package/dist/index.cjs +813 -602
  19. package/dist/index.d.mts +6 -8562
  20. package/dist/index.d.ts +7 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +5 -1
  23. package/dist/index.mjs +801 -602
  24. package/dist/plugins/apps/index.d.ts +1 -1
  25. package/dist/plugins/deprecated/inputFields.d.ts +468 -0
  26. package/dist/plugins/deprecated/inputFields.d.ts.map +1 -0
  27. package/dist/plugins/deprecated/inputFields.js +73 -0
  28. package/dist/plugins/fetch/index.d.ts +1 -1
  29. package/dist/plugins/fetch/schemas.d.ts +1 -1
  30. package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/index.d.ts +4 -4
  31. package/dist/plugins/getActionInputFieldsSchema/index.d.ts.map +1 -0
  32. package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/index.js +4 -4
  33. package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/schemas.d.ts +8 -8
  34. package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts.map +1 -0
  35. package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/schemas.js +13 -10
  36. package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/index.d.ts +4 -4
  37. package/dist/plugins/listActionInputFieldChoices/index.d.ts.map +1 -0
  38. package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/index.js +4 -4
  39. package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/schemas.d.ts +10 -10
  40. package/dist/plugins/listActionInputFieldChoices/schemas.d.ts.map +1 -0
  41. package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/schemas.js +13 -10
  42. package/dist/plugins/{listInputFields → listActionInputFields}/index.d.ts +4 -4
  43. package/dist/plugins/listActionInputFields/index.d.ts.map +1 -0
  44. package/dist/plugins/{listInputFields → listActionInputFields}/index.js +4 -4
  45. package/dist/plugins/{listInputFields → listActionInputFields}/schemas.d.ts +9 -9
  46. package/dist/plugins/listActionInputFields/schemas.d.ts.map +1 -0
  47. package/dist/plugins/{listInputFields → listActionInputFields}/schemas.js +7 -7
  48. package/dist/plugins/request/index.d.ts +2 -2
  49. package/dist/plugins/request/schemas.d.ts +2 -2
  50. package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts +51 -0
  51. package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts.map +1 -0
  52. package/dist/plugins/triggers/ackTriggerInboxMessages/index.js +35 -0
  53. package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts +34 -0
  54. package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts.map +1 -0
  55. package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.js +17 -0
  56. package/dist/plugins/triggers/createTriggerInbox/index.d.ts +62 -0
  57. package/dist/plugins/triggers/createTriggerInbox/index.d.ts.map +1 -0
  58. package/dist/plugins/triggers/createTriggerInbox/index.js +54 -0
  59. package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts +20 -0
  60. package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts.map +1 -0
  61. package/dist/plugins/triggers/createTriggerInbox/schemas.js +20 -0
  62. package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts +50 -0
  63. package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts.map +1 -0
  64. package/dist/plugins/triggers/deleteTriggerInbox/index.js +27 -0
  65. package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts +14 -0
  66. package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts.map +1 -0
  67. package/dist/plugins/triggers/deleteTriggerInbox/schemas.js +9 -0
  68. package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +213 -0
  69. package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +1 -0
  70. package/dist/plugins/triggers/drainTriggerInbox/index.js +227 -0
  71. package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts +56 -0
  72. package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts.map +1 -0
  73. package/dist/plugins/triggers/drainTriggerInbox/pipeline.js +225 -0
  74. package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts +104 -0
  75. package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts.map +1 -0
  76. package/dist/plugins/triggers/drainTriggerInbox/schemas.js +102 -0
  77. package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts +63 -0
  78. package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts.map +1 -0
  79. package/dist/plugins/triggers/ensureTriggerInbox/index.js +77 -0
  80. package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts +21 -0
  81. package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts.map +1 -0
  82. package/dist/plugins/triggers/ensureTriggerInbox/schemas.js +21 -0
  83. package/dist/plugins/triggers/getTriggerInbox/index.d.ts +50 -0
  84. package/dist/plugins/triggers/getTriggerInbox/index.d.ts.map +1 -0
  85. package/dist/plugins/triggers/getTriggerInbox/index.js +26 -0
  86. package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts +14 -0
  87. package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts.map +1 -0
  88. package/dist/plugins/triggers/getTriggerInbox/schemas.js +9 -0
  89. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +48 -0
  90. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts.map +1 -0
  91. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.js +23 -0
  92. package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts +13 -0
  93. package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts.map +1 -0
  94. package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.js +10 -0
  95. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts +58 -0
  96. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts.map +1 -0
  97. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.js +70 -0
  98. package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts +57 -0
  99. package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts.map +1 -0
  100. package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.js +25 -0
  101. package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts +51 -0
  102. package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts.map +1 -0
  103. package/dist/plugins/triggers/listTriggerInboxMessages/index.js +48 -0
  104. package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts +37 -0
  105. package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts.map +1 -0
  106. package/dist/plugins/triggers/listTriggerInboxMessages/schemas.js +27 -0
  107. package/dist/plugins/triggers/listTriggerInboxes/index.d.ts +56 -0
  108. package/dist/plugins/triggers/listTriggerInboxes/index.d.ts.map +1 -0
  109. package/dist/plugins/triggers/listTriggerInboxes/index.js +51 -0
  110. package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts +58 -0
  111. package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts.map +1 -0
  112. package/dist/plugins/triggers/listTriggerInboxes/schemas.js +35 -0
  113. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +77 -0
  114. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts.map +1 -0
  115. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.js +30 -0
  116. package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts +20 -0
  117. package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts.map +1 -0
  118. package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.js +28 -0
  119. package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +101 -0
  120. package/dist/plugins/triggers/listTriggerInputFields/index.d.ts.map +1 -0
  121. package/dist/plugins/triggers/listTriggerInputFields/index.js +33 -0
  122. package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts +16 -0
  123. package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts.map +1 -0
  124. package/dist/plugins/triggers/listTriggerInputFields/schemas.js +21 -0
  125. package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts +50 -0
  126. package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts.map +1 -0
  127. package/dist/plugins/triggers/pauseTriggerInbox/index.js +26 -0
  128. package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts +14 -0
  129. package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts.map +1 -0
  130. package/dist/plugins/triggers/pauseTriggerInbox/schemas.js +9 -0
  131. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts +51 -0
  132. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts.map +1 -0
  133. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.js +37 -0
  134. package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts +34 -0
  135. package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts.map +1 -0
  136. package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.js +17 -0
  137. package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts +50 -0
  138. package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts.map +1 -0
  139. package/dist/plugins/triggers/resumeTriggerInbox/index.js +26 -0
  140. package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts +14 -0
  141. package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts.map +1 -0
  142. package/dist/plugins/triggers/resumeTriggerInbox/schemas.js +9 -0
  143. package/dist/plugins/triggers/shared.d.ts +17 -0
  144. package/dist/plugins/triggers/shared.d.ts.map +1 -0
  145. package/dist/plugins/triggers/shared.js +16 -0
  146. package/dist/plugins/triggers/updateTriggerInbox/index.d.ts +51 -0
  147. package/dist/plugins/triggers/updateTriggerInbox/index.d.ts.map +1 -0
  148. package/dist/plugins/triggers/updateTriggerInbox/index.js +30 -0
  149. package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts +15 -0
  150. package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts.map +1 -0
  151. package/dist/plugins/triggers/updateTriggerInbox/schemas.js +15 -0
  152. package/dist/plugins/triggers/utils.d.ts +17 -0
  153. package/dist/plugins/triggers/utils.d.ts.map +1 -0
  154. package/dist/plugins/triggers/utils.js +28 -0
  155. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +163 -0
  156. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -0
  157. package/dist/plugins/triggers/watchTriggerInbox/index.js +111 -0
  158. package/dist/registry.d.ts.map +1 -1
  159. package/dist/registry.js +2 -0
  160. package/dist/resolvers/actionKey.d.ts +1 -0
  161. package/dist/resolvers/actionKey.d.ts.map +1 -1
  162. package/dist/resolvers/actionKey.js +1 -1
  163. package/dist/resolvers/index.d.ts +2 -2
  164. package/dist/resolvers/index.d.ts.map +1 -1
  165. package/dist/resolvers/index.js +2 -2
  166. package/dist/resolvers/triggerInbox.d.ts +4 -0
  167. package/dist/resolvers/triggerInbox.d.ts.map +1 -0
  168. package/dist/resolvers/triggerInbox.js +18 -0
  169. package/dist/schemas/TriggerInbox.d.ts +59 -0
  170. package/dist/schemas/TriggerInbox.d.ts.map +1 -0
  171. package/dist/schemas/TriggerInbox.js +81 -0
  172. package/dist/schemas/TriggerMessage.d.ts +48 -0
  173. package/dist/schemas/TriggerMessage.d.ts.map +1 -0
  174. package/dist/schemas/TriggerMessage.js +79 -0
  175. package/dist/sdk.d.ts +621 -17
  176. package/dist/sdk.d.ts.map +1 -1
  177. package/dist/sdk.js +26 -9
  178. package/dist/types/errors.d.ts +13 -0
  179. package/dist/types/errors.d.ts.map +1 -1
  180. package/dist/types/errors.js +16 -0
  181. package/dist/types/plugin.d.ts +12 -1
  182. package/dist/types/plugin.d.ts.map +1 -1
  183. package/dist/types/properties.d.ts +12 -0
  184. package/dist/types/properties.d.ts.map +1 -1
  185. package/dist/types/properties.js +25 -0
  186. package/dist/types/registry.d.ts +5 -0
  187. package/dist/types/registry.d.ts.map +1 -1
  188. package/dist/types/sdk.d.ts +2 -2
  189. package/dist/types/sdk.d.ts.map +1 -1
  190. package/dist/types/signals.d.ts +20 -0
  191. package/dist/types/signals.d.ts.map +1 -0
  192. package/dist/types/signals.js +21 -0
  193. package/dist/utils/abort-utils.d.ts +13 -0
  194. package/dist/utils/abort-utils.d.ts.map +1 -1
  195. package/dist/utils/abort-utils.js +15 -0
  196. package/dist/utils/retry-utils.d.ts +6 -2
  197. package/dist/utils/retry-utils.d.ts.map +1 -1
  198. package/dist/utils/retry-utils.js +22 -3
  199. package/dist/utils/schema-utils.d.ts +19 -1
  200. package/dist/utils/schema-utils.d.ts.map +1 -1
  201. package/package.json +12 -1
  202. package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
  203. package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
  204. package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
  205. package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
  206. package/dist/plugins/listInputFields/index.d.ts.map +0 -1
  207. package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
package/dist/index.cjs CHANGED
@@ -129,6 +129,19 @@ var FieldsPropertySchema = zod.z.array(zod.z.union([zod.z.string(), zod.z.number
129
129
  var AppsPropertySchema = zod.z.array(zod.z.string()).describe("Filter by app keys (e.g., 'SlackCLIAPI' or slug like 'github')");
130
130
  var TablesPropertySchema = zod.z.array(zod.z.string()).describe("Filter by specific table IDs");
131
131
  var ConnectionsPropertySchema = zod.z.array(zod.z.string()).describe("List of connection IDs to filter by");
132
+ var TriggerInboxPropertySchema = withPositional(
133
+ zod.z.string().min(1).describe(
134
+ "Trigger inbox identifier \u2014 UUID or name. Non-UUID values are resolved by name via the inbox list endpoint."
135
+ )
136
+ );
137
+ var TriggerInboxNamePropertySchema = zod.z.string().min(1).max(100).describe(
138
+ "Inbox name; unique per (user, account). Enables get-or-create on createTriggerInbox."
139
+ );
140
+ var LeasePropertySchema = zod.z.string().min(1).describe("Lease ID returned from leaseTriggerInboxMessages");
141
+ var LeaseSecondsPropertySchema = zod.z.number().int().min(1).max(3600).describe(
142
+ "Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes)."
143
+ );
144
+ var LeaseLimitPropertySchema = zod.z.number().int().min(1).max(100).describe("Maximum messages to lease in a single batch (1-100)");
132
145
 
133
146
  // src/types/errors.ts
134
147
  var ZapierError = class extends Error {
@@ -232,6 +245,14 @@ var ZapierActionError = class extends ZapierError {
232
245
  return this.errors;
233
246
  }
234
247
  };
248
+ var ZapierConflictError = class extends ZapierError {
249
+ constructor(message, options = {}) {
250
+ super(message, options);
251
+ this.name = "ZapierConflictError";
252
+ this.code = "ZAPIER_CONFLICT_ERROR";
253
+ this.resourceType = options.resourceType;
254
+ }
255
+ };
235
256
  var ZapierRateLimitError = class extends ZapierError {
236
257
  constructor(message, options = {}) {
237
258
  super(message, options);
@@ -285,6 +306,10 @@ ${context.join(", ")}`;
285
306
  if (error.resourceId) context.push(`ID: ${error.resourceId}`);
286
307
  message += `
287
308
  ${context.join(", ")}`;
309
+ }
310
+ if (error instanceof ZapierConflictError && error.resourceType) {
311
+ message += `
312
+ Type: ${error.resourceType}`;
288
313
  }
289
314
  if (error instanceof ZapierTimeoutError && (error.attempts || error.maxAttempts)) {
290
315
  const context = [];
@@ -336,6 +361,67 @@ function formatDuration(ms) {
336
361
  const days = Math.round(hours / 24);
337
362
  return `${days}d`;
338
363
  }
364
+
365
+ // src/types/signals.ts
366
+ var ZapierSignal = class extends Error {
367
+ constructor(message) {
368
+ super(message);
369
+ Object.setPrototypeOf(this, new.target.prototype);
370
+ }
371
+ };
372
+ var ZapierReleaseTriggerMessageSignal = class extends ZapierSignal {
373
+ constructor() {
374
+ super(...arguments);
375
+ this.name = "ZapierReleaseTriggerMessageSignal";
376
+ this.code = "ZAPIER_RELEASE_TRIGGER_MESSAGE_SIGNAL";
377
+ }
378
+ };
379
+ var ZapierAbortDrainSignal = class extends ZapierSignal {
380
+ constructor() {
381
+ super(...arguments);
382
+ this.name = "ZapierAbortDrainSignal";
383
+ this.code = "ZAPIER_ABORT_DRAIN_SIGNAL";
384
+ }
385
+ };
386
+ var TriggerInboxCommandBaseSchema = zod.z.object({
387
+ inbox: TriggerInboxPropertySchema,
388
+ onMessage: zod.z.function().optional().meta({ exampleRequired: true }).describe(
389
+ "Per-message handler. Resolves to ack; rejects to release-or-leave per `releaseOnError`. Throw `ZapierReleaseTriggerMessageSignal` to release explicitly, or `ZapierAbortDrainSignal` to stop after the current batch."
390
+ ),
391
+ concurrency: zod.z.number().int().min(1).optional().describe(
392
+ "Per-message handler workers running in parallel. Defaults to `leaseLimit`, or 1 if neither is set."
393
+ ),
394
+ leaseLimit: zod.z.number().int().min(1).max(100).optional().describe(
395
+ "Per-lease HTTP batch size. Defaults to `concurrency`, or 1 if neither is set."
396
+ ),
397
+ leaseSeconds: LeaseSecondsPropertySchema.optional(),
398
+ releaseOnError: zod.z.boolean().optional().describe(
399
+ "If true, errors immediately release the message. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless."
400
+ ),
401
+ continueOnError: zod.z.boolean().optional().describe(
402
+ "If false (default, fail-fast), the first handler error rejects and stops the drain. If true, handler errors are observed via `onError` and the drain continues. SDK-level errors (lease / ack / release) reject regardless."
403
+ ),
404
+ onError: zod.z.function().optional().describe(
405
+ "Per-message error observer for `continueOnError: true`. Called with the failure and the message; control-flow signals are filtered out. Throws from `onError` are swallowed."
406
+ ),
407
+ signal: zod.z.custom((v) => v instanceof AbortSignal).optional().describe(
408
+ "Abort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject."
409
+ )
410
+ });
411
+ TriggerInboxCommandBaseSchema.extend({
412
+ maxMessages: zod.z.number().int().min(1).optional().describe(
413
+ "Cap total messages drained. Defaults to draining the inbox until empty."
414
+ )
415
+ }).describe(
416
+ "Drain an existing trigger inbox: lease currently-available messages and process them via onMessage. Returns when the inbox is empty, maxMessages is reached, the abort signal fires, or a fatal error rejects."
417
+ );
418
+ TriggerInboxCommandBaseSchema.extend({
419
+ maxDrainIntervalSeconds: zod.z.number().int().min(1).optional().describe(
420
+ "Maximum seconds between empty-inbox poll attempts (default: 60). Caps the back-off cadence."
421
+ )
422
+ }).describe(
423
+ "Continuously consume a trigger inbox: drain currently-available messages, then poll with backoff for new arrivals, until aborted. Stop via the `signal` AbortSignal or by throwing `ZapierAbortDrainSignal` from a handler. Resolves cleanly on abort; rejects on a fatal error or a fail-fast handler error."
424
+ );
339
425
  var ActionExecutionInputSchema = zod.z.object({
340
426
  inputs: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
341
427
  /** @deprecated Use `connection` instead. */
@@ -1424,6 +1510,9 @@ function getAbortSignalApi() {
1424
1510
  const api = AbortSignal;
1425
1511
  return { any: api.any };
1426
1512
  }
1513
+ function isAbortError(err) {
1514
+ return err instanceof Error && err.name === "AbortError";
1515
+ }
1427
1516
  function createTimeoutError(timeoutMs) {
1428
1517
  if (typeof DOMException !== "undefined") {
1429
1518
  return new DOMException(
@@ -2212,7 +2301,7 @@ var actionKeyResolver = {
2212
2301
  app: resolvedParams.app
2213
2302
  });
2214
2303
  return actionsResponse.data.filter(
2215
- (action) => action.action_type === resolvedParams.actionType
2304
+ (action) => action.action_type === resolvedParams.actionType && !action.is_hidden
2216
2305
  );
2217
2306
  },
2218
2307
  prompt: (actions) => ({
@@ -2423,6 +2512,23 @@ var tableIdResolver = {
2423
2512
  }))
2424
2513
  })
2425
2514
  };
2515
+
2516
+ // src/resolvers/triggerInbox.ts
2517
+ var triggerInboxResolver = {
2518
+ type: "dynamic",
2519
+ fetch: async (sdk) => toIterable(sdk.listTriggerInboxes()),
2520
+ prompt: (inboxes) => ({
2521
+ type: "list",
2522
+ name: "inbox",
2523
+ message: "Select a trigger inbox:",
2524
+ // `deleting` inboxes are on their way out — no operation against them
2525
+ // is useful (delete is a no-op, pause/resume/update are rejected).
2526
+ choices: inboxes.filter((inbox) => inbox.status !== "deleting").map((inbox) => ({
2527
+ name: `${inbox.name ?? inbox.id} (${inbox.subscription.app_key} / ${inbox.subscription.action_key}, ${inbox.status})`,
2528
+ value: inbox.id
2529
+ }))
2530
+ })
2531
+ };
2426
2532
  function formatFieldValue(v) {
2427
2533
  if (v == null) return "";
2428
2534
  if (typeof v === "object") {
@@ -3097,7 +3203,7 @@ var listActionsPlugin = definePlugin(
3097
3203
  })
3098
3204
  );
3099
3205
  var ListInputFieldsDescription = "Get the input fields required for a specific action";
3100
- var ListInputFieldsBaseSchema = zod.z.object({
3206
+ var ListActionInputFieldsBaseSchema = zod.z.object({
3101
3207
  connection: ConnectionPropertySchema.optional().describe(
3102
3208
  "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
3103
3209
  ),
@@ -3113,11 +3219,11 @@ var ListInputFieldsBaseSchema = zod.z.object({
3113
3219
  maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
3114
3220
  cursor: zod.z.string().optional().describe("Cursor to start from")
3115
3221
  });
3116
- var ListInputFieldsSchema = zod.z.object({
3222
+ var ListActionInputFieldsSchema = zod.z.object({
3117
3223
  app: AppPropertySchema,
3118
3224
  actionType: ActionTypePropertySchema,
3119
3225
  action: ActionPropertySchema
3120
- }).merge(ListInputFieldsBaseSchema).describe(ListInputFieldsDescription).meta({
3226
+ }).merge(ListActionInputFieldsBaseSchema).describe(ListInputFieldsDescription).meta({
3121
3227
  aliases: {
3122
3228
  appKey: "app",
3123
3229
  actionKey: "action",
@@ -3125,12 +3231,12 @@ var ListInputFieldsSchema = zod.z.object({
3125
3231
  authenticationId: "connection"
3126
3232
  }
3127
3233
  });
3128
- var ListInputFieldsSchemaDeprecated = zod.z.object({
3234
+ var ListActionInputFieldsSchemaDeprecated = zod.z.object({
3129
3235
  appKey: AppKeyPropertySchema,
3130
3236
  actionType: ActionTypePropertySchema,
3131
3237
  actionKey: ActionKeyPropertySchema
3132
- }).merge(ListInputFieldsBaseSchema);
3133
- var ListInputFieldsInputSchema = zod.z.union([ListInputFieldsSchema, ListInputFieldsSchemaDeprecated]).describe(ListInputFieldsDescription);
3238
+ }).merge(ListActionInputFieldsBaseSchema);
3239
+ var ListActionInputFieldsInputSchema = zod.z.union([ListActionInputFieldsSchema, ListActionInputFieldsSchemaDeprecated]).describe(ListInputFieldsDescription);
3134
3240
  var BaseFieldItemSchema = zod.z.object({
3135
3241
  type: zod.z.string(),
3136
3242
  // "input_field", "info_field", or "fieldset"
@@ -3307,7 +3413,7 @@ async function fetchImplementationChoices({
3307
3413
  return response;
3308
3414
  }
3309
3415
 
3310
- // src/plugins/listInputFields/index.ts
3416
+ // src/plugins/listActionInputFields/index.ts
3311
3417
  function getInputFieldTypeFromNeed(need) {
3312
3418
  if (need.list) {
3313
3419
  return "ARRAY" /* ARRAY */;
@@ -3406,13 +3512,13 @@ function transformNeedsToFields(needs) {
3406
3512
  }
3407
3513
  return rootFields;
3408
3514
  }
3409
- var listInputFieldsPlugin = definePlugin(
3515
+ var listActionInputFieldsPlugin = definePlugin(
3410
3516
  (sdk) => createPaginatedPluginMethod(sdk, {
3411
- name: "listInputFields",
3517
+ name: "listActionInputFields",
3412
3518
  categories: ["action"],
3413
3519
  type: "list",
3414
3520
  itemType: "RootField",
3415
- inputSchema: ListInputFieldsInputSchema,
3521
+ inputSchema: ListActionInputFieldsInputSchema,
3416
3522
  outputSchema: RootFieldItemSchema,
3417
3523
  defaultPageSize: DEFAULT_PAGE_SIZE,
3418
3524
  resolvers: {
@@ -3473,271 +3579,566 @@ var listInputFieldsPlugin = definePlugin(
3473
3579
  }
3474
3580
  })
3475
3581
  );
3476
- var ListConnectionsQuerySchema = connections.ListConnectionsQuerySchema.omit({
3477
- offset: true,
3478
- // Omit snake_case fields, we'll add camelCase versions
3479
- app_key: true,
3480
- connection_ids: true,
3481
- account_id: true,
3482
- is_expired: true,
3483
- page_size: true
3484
- }).extend({
3485
- // New name for appKey
3486
- app: AppPropertySchema.optional().describe(
3487
- "App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github')"
3488
- ),
3489
- /** @deprecated Use `app` instead. */
3490
- appKey: AppKeyPropertySchema.optional().describe(
3491
- "App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github')"
3492
- ).meta({ deprecated: true }),
3493
- // New name for connectionIds
3494
- connections: ConnectionsPropertySchema.optional().describe(
3495
- "List of connection IDs to filter by"
3496
- ),
3497
- /** @deprecated Use `connections` instead. */
3498
- connectionIds: zod.z.array(zod.z.string()).optional().describe("List of connection IDs to filter by").meta({ deprecated: true }),
3499
- /** @deprecated Use `connections` instead. */
3500
- authenticationIds: zod.z.array(zod.z.string()).optional().describe(
3501
- "List of authentication IDs to filter by (deprecated, use connections)"
3502
- ).meta({ deprecated: true }),
3503
- account: zod.z.string().optional().describe("Account to filter by"),
3504
- /** @deprecated Use `account` instead. */
3505
- accountId: zod.z.string().optional().describe("Account ID to filter by").meta({ deprecated: true }),
3506
- // Include shared connections (overrides default owner=me filter)
3507
- includeShared: zod.z.boolean().optional().describe(
3508
- "Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections."
3509
- ),
3510
- /** @deprecated Use `expired` instead */
3511
- isExpired: zod.z.boolean().optional().describe("Filter by expired status").meta({
3512
- deprecated: true,
3513
- deprecationMessage: "Use --expired instead to show only expired connections."
3514
- }),
3515
- expired: zod.z.boolean().optional().describe(
3516
- "Show only expired connections (default: only non-expired connections are returned)"
3517
- ),
3518
- // Override pageSize to make optional
3519
- pageSize: zod.z.number().min(1).optional().describe("Number of connections per page"),
3520
- // SDK specific property for pagination/iterable helpers
3521
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
3522
- // SDK specific property for pagination/iterable helpers
3523
- cursor: zod.z.string().optional().describe("Cursor to start from")
3524
- }).describe("List available connections with optional filtering");
3525
- var ConnectionItemSchema = withFormatter(connections.ConnectionItemSchema, {
3582
+ var InputFieldChoiceItemSchema = withFormatter(NeedChoicesSchema, {
3526
3583
  format: (item) => {
3584
+ const title = item.label || item.key || "Choice";
3527
3585
  const details = [];
3528
- if (item.identifier) {
3529
- details.push({
3530
- text: `Identifier: ${item.identifier}`,
3531
- style: "accent"
3532
- });
3586
+ if (item.label && item.key && item.label !== item.key) {
3587
+ details.push({ text: `Key: ${item.key}`, style: "dim" });
3533
3588
  }
3534
- details.push({
3535
- text: `Account: ${item.account_id} | Private: ${item.is_private} | Shared: ${item.shared_with_all}`,
3536
- style: "dim"
3537
- });
3538
- if (item.marked_stale_at) {
3539
- details.push({
3540
- text: `Warning: Marked stale: ${new Date(item.marked_stale_at).toLocaleDateString()}`,
3541
- style: "warning"
3542
- });
3589
+ if (item.sample && item.sample !== item.key) {
3590
+ details.push({ text: `Sample: ${item.sample}`, style: "dim" });
3591
+ }
3592
+ if (item.value && item.value !== item.key) {
3593
+ details.push({ text: `Value: ${item.value}`, style: "normal" });
3543
3594
  }
3544
3595
  return {
3545
- title: item.title || `Connection ${item.id}`,
3546
- id: item.id?.toString(),
3596
+ title,
3597
+ key: item.key,
3547
3598
  details
3548
3599
  };
3549
3600
  }
3550
3601
  });
3602
+ var ListActionInputFieldChoicesDescription = "Get the available choices for a dynamic dropdown input field";
3603
+ var ListActionInputFieldChoicesBaseSchema = zod.z.object({
3604
+ connection: ConnectionPropertySchema.optional().describe(
3605
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
3606
+ ),
3607
+ connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
3608
+ "Connection ID to use when listing available field choices. Required if the action needs a connection to populate dynamic dropdown options."
3609
+ ).meta({ deprecated: true }),
3610
+ /** @deprecated Use connection instead */
3611
+ authenticationId: AuthenticationIdPropertySchema.nullable().optional().meta({ deprecated: true }),
3612
+ inputs: InputsPropertySchema.optional().describe(
3613
+ "Current input values that may affect available choices"
3614
+ ),
3615
+ page: zod.z.number().int().min(0).optional().describe("Page number for paginated results"),
3616
+ pageSize: zod.z.number().min(1).optional().describe("Number of choices per page"),
3617
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
3618
+ cursor: zod.z.string().optional().describe("Cursor to start from")
3619
+ });
3620
+ var ListActionInputFieldChoicesSchema = zod.z.object({
3621
+ app: AppPropertySchema,
3622
+ actionType: ActionTypePropertySchema,
3623
+ action: ActionPropertySchema,
3624
+ inputField: InputFieldPropertySchema
3625
+ }).merge(ListActionInputFieldChoicesBaseSchema).describe(ListActionInputFieldChoicesDescription).meta({
3626
+ aliases: {
3627
+ appKey: "app",
3628
+ actionKey: "action",
3629
+ inputFieldKey: "inputField",
3630
+ connectionId: "connection",
3631
+ authenticationId: "connection"
3632
+ }
3633
+ });
3634
+ var ListActionInputFieldChoicesSchemaDeprecated = zod.z.object({
3635
+ appKey: AppKeyPropertySchema,
3636
+ actionType: ActionTypePropertySchema,
3637
+ actionKey: ActionKeyPropertySchema,
3638
+ inputFieldKey: zod.z.string().min(1).describe("Input field key to get choices for.")
3639
+ }).merge(ListActionInputFieldChoicesBaseSchema);
3640
+ var ListActionInputFieldChoicesInputSchema = zod.z.union([
3641
+ ListActionInputFieldChoicesSchema,
3642
+ ListActionInputFieldChoicesSchemaDeprecated
3643
+ ]).describe(ListActionInputFieldChoicesDescription);
3551
3644
 
3552
- // src/plugins/listConnections/index.ts
3553
- var listConnectionsPlugin = definePlugin(
3645
+ // src/plugins/listActionInputFieldChoices/index.ts
3646
+ function transformNeedChoicesToInputFieldChoiceItem(choice) {
3647
+ return {
3648
+ key: choice.key,
3649
+ label: choice.label,
3650
+ sample: choice.sample,
3651
+ value: choice.value
3652
+ };
3653
+ }
3654
+ var listActionInputFieldChoicesPlugin = definePlugin(
3554
3655
  (sdk) => createPaginatedPluginMethod(sdk, {
3555
- name: "listConnections",
3556
- categories: ["connection"],
3656
+ name: "listActionInputFieldChoices",
3657
+ categories: ["action"],
3557
3658
  type: "list",
3558
- itemType: "Connection",
3559
- inputSchema: ListConnectionsQuerySchema,
3560
- outputSchema: ConnectionItemSchema,
3659
+ itemType: "InputFieldChoice",
3660
+ inputSchema: ListActionInputFieldChoicesInputSchema,
3661
+ outputSchema: InputFieldChoiceItemSchema,
3561
3662
  defaultPageSize: DEFAULT_PAGE_SIZE,
3562
- resolvers: { app: appKeyResolver },
3563
- handler: async ({ sdk: sdk2, options }) => {
3564
- if (options.includeShared) {
3565
- await sdk2.context.checkCapability("canIncludeSharedConnections");
3566
- }
3663
+ resolvers: {
3664
+ app: appKeyResolver,
3665
+ actionType: actionTypeResolver,
3666
+ action: actionKeyResolver,
3667
+ connection: connectionIdResolver,
3668
+ inputField: inputFieldKeyResolver,
3669
+ inputs: inputsAllOptionalResolver
3670
+ },
3671
+ handler: async ({
3672
+ sdk: sdk2,
3673
+ options
3674
+ }) => {
3567
3675
  const { api, getVersionedImplementationId } = sdk2.context;
3568
- const searchParams = {};
3569
- if (options.pageSize !== void 0) {
3570
- searchParams.page_size = options.pageSize.toString();
3571
- }
3572
- const appKey = options.app ?? options.appKey;
3573
- if (appKey) {
3574
- const implementationId = await getVersionedImplementationId(appKey);
3575
- if (implementationId) {
3576
- setMethodMetadata({ selectedApi: implementationId });
3577
- const [versionlessSelectedApi] = splitVersionedKey(implementationId);
3578
- searchParams.app_key = versionlessSelectedApi;
3579
- } else {
3580
- searchParams.app_key = appKey;
3581
- }
3582
- }
3583
- const connectionRefs = options.connections;
3584
- const legacyConnectionIds = options.connectionIds ?? options.authenticationIds;
3585
- if (connectionRefs && connectionRefs.length > 0) {
3586
- const resolvedIds = await Promise.all(
3587
- connectionRefs.map(
3588
- (ref) => resolveConnectionId({
3589
- connection: ref,
3590
- resolveConnection: sdk2.context.resolveConnection
3591
- })
3592
- )
3593
- );
3594
- searchParams.connection_ids = resolvedIds.filter((id) => id != null).join(",");
3595
- } else if (legacyConnectionIds && legacyConnectionIds.length > 0) {
3596
- searchParams.connection_ids = legacyConnectionIds.join(",");
3597
- }
3598
- if (options.search) {
3599
- searchParams.search = options.search;
3600
- }
3601
- if (options.title) {
3602
- searchParams.title = options.title;
3603
- }
3604
- const accountId = options.account ?? options.accountId;
3605
- if (accountId) {
3606
- searchParams.account_id = accountId;
3607
- }
3608
- if (options.owner && options.owner !== "me" && !options.includeShared) {
3609
- throw new ZapierValidationError(
3610
- 'The "owner" option requires "includeShared" to be true. Without includeShared, only your own connections are returned.'
3676
+ const appKey = "app" in options ? options.app : options.appKey;
3677
+ const actionKey = "action" in options ? options.action : options.actionKey;
3678
+ const inputFieldKey = "inputField" in options ? options.inputField : options.inputFieldKey;
3679
+ const {
3680
+ actionType,
3681
+ connection,
3682
+ connectionId,
3683
+ authenticationId,
3684
+ inputs,
3685
+ page,
3686
+ cursor
3687
+ } = options;
3688
+ const resolvedConnectionId = await resolveConnectionId({
3689
+ connection,
3690
+ connectionId,
3691
+ authenticationId,
3692
+ resolveConnection: sdk2.context.resolveConnection
3693
+ });
3694
+ const selectedApi = await getVersionedImplementationId(appKey);
3695
+ if (!selectedApi) {
3696
+ throw new ZapierConfigurationError(
3697
+ "No current_implementation_id found for app",
3698
+ { configType: "current_implementation_id" }
3611
3699
  );
3612
3700
  }
3613
- const owner = options.includeShared ? options.owner : "me";
3614
- if (owner) {
3615
- searchParams.owner = owner;
3616
- }
3617
- if (options.isExpired !== void 0) {
3618
- searchParams.is_expired = options.isExpired.toString();
3619
- } else {
3620
- searchParams.is_expired = (options.expired ?? false).toString();
3701
+ setMethodMetadata({
3702
+ selectedApi,
3703
+ operationType: actionType,
3704
+ operationKey: actionKey
3705
+ });
3706
+ const { data: action } = await sdk2.getAction({
3707
+ app: appKey,
3708
+ actionType,
3709
+ action: actionKey
3710
+ });
3711
+ const needsData = await fetchImplementationNeeds({
3712
+ api,
3713
+ selectedApi,
3714
+ action: action.key,
3715
+ actionType,
3716
+ connectionId: resolvedConnectionId ?? null,
3717
+ inputs
3718
+ });
3719
+ const targetNeed = needsData.needs?.find(
3720
+ (need) => need.key === inputFieldKey
3721
+ );
3722
+ if (targetNeed?.choices && targetNeed.choices.length > 0) {
3723
+ return {
3724
+ data: targetNeed.choices.map(
3725
+ transformNeedChoicesToInputFieldChoiceItem
3726
+ )
3727
+ };
3621
3728
  }
3622
- if (options.cursor) {
3623
- searchParams.offset = options.cursor;
3729
+ if (!action.id) {
3730
+ throw new ZapierApiError(
3731
+ `Action ${actionKey} does not have an ID - cannot retrieve input field choices`
3732
+ );
3624
3733
  }
3625
- const response = await api.get(
3626
- "/api/v0/connections",
3627
- { searchParams, authRequired: true }
3734
+ const requestPage = cursor ? parseInt(cursor, 10) : page ?? 0;
3735
+ const choicesData = await fetchImplementationChoices({
3736
+ api,
3737
+ actionId: action.id,
3738
+ inputFieldId: inputFieldKey,
3739
+ connectionId: resolvedConnectionId ?? null,
3740
+ inputs,
3741
+ page: requestPage
3742
+ });
3743
+ const choices = (choicesData.choices || []).map(
3744
+ transformNeedChoicesToInputFieldChoiceItem
3628
3745
  );
3629
- return {
3630
- ...response,
3631
- data: response.data.map(transformConnectionItem)
3632
- };
3633
- },
3634
- extractCursor: (response) => extractCursor(response.links)
3635
- })
3636
- );
3637
- var ListClientCredentialsQuerySchema = clientCredentials.ListClientCredentialsQuerySchema.omit({
3638
- offset: true,
3639
- page_size: true
3640
- }).extend({
3641
- // Override pageSize to make optional
3642
- pageSize: zod.z.number().min(1).optional().describe("Number of credentials per page"),
3643
- // SDK specific property for pagination/iterable helpers
3644
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
3645
- // SDK specific property for pagination/iterable helpers
3646
- cursor: zod.z.string().optional().describe("Cursor to start from")
3647
- }).describe("List client credentials for the authenticated user");
3648
- var ClientCredentialsItemSchema = withFormatter(
3649
- clientCredentials.ClientCredentialsItemSchema,
3650
- {
3651
- format: (item) => {
3652
- const details = [];
3653
- if (item.allowed_scopes && item.allowed_scopes.length > 0) {
3654
- details.push({
3655
- text: `Scopes: ${item.allowed_scopes.join(", ")}`,
3656
- style: "accent"
3657
- });
3658
- }
3659
- if (item.created_at) {
3660
- details.push({
3661
- text: `Created: ${new Date(item.created_at).toLocaleDateString()}`,
3662
- style: "dim"
3663
- });
3746
+ let nextCursor;
3747
+ if (choicesData.next_page != null) {
3748
+ nextCursor = choicesData.next_page.toString();
3749
+ } else if (choicesData.links?.next) {
3750
+ try {
3751
+ const nextUrl = new URL(choicesData.links.next);
3752
+ const nextPage = nextUrl.searchParams.get("page");
3753
+ if (nextPage) {
3754
+ nextCursor = nextPage;
3755
+ }
3756
+ } catch {
3757
+ }
3664
3758
  }
3665
- return {
3666
- title: item.name,
3667
- id: item.client_id,
3668
- details
3669
- };
3759
+ return { data: choices, nextCursor };
3670
3760
  }
3671
- }
3761
+ })
3672
3762
  );
3673
- var ClientCredentialsCreatedItemSchema = withFormatter(
3674
- clientCredentials.ClientCredentialsCreatedItemSchema,
3675
- {
3676
- format: (item) => {
3677
- return {
3678
- title: item.name,
3679
- id: item.client_id,
3680
- details: [
3681
- {
3682
- text: `Client Secret: ${item.client_secret}`,
3683
- style: "accent"
3684
- }
3685
- ]
3686
- };
3687
- }
3763
+ var GetActionInputFieldsSchemaDescription = "Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.";
3764
+ var GetActionInputFieldsSchemaBaseSchema = zod.z.object({
3765
+ connection: ConnectionPropertySchema.optional().describe(
3766
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
3767
+ ),
3768
+ connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
3769
+ "Connection ID to use when fetching the schema. Required if the action needs a connection to determine available fields."
3770
+ ).meta({ deprecated: true }),
3771
+ /** @deprecated Use connection instead */
3772
+ authenticationId: AuthenticationIdPropertySchema.nullable().optional().describe(
3773
+ "Authentication ID to use when fetching the schema. Required if the action needs a connection to determine available fields."
3774
+ ).meta({ deprecated: true }),
3775
+ inputs: InputsPropertySchema.optional().describe(
3776
+ "Current input values that may affect the schema (e.g., when fields depend on other field values)"
3777
+ )
3778
+ });
3779
+ var GetActionInputFieldsSchemaSchema = zod.z.object({
3780
+ app: AppPropertySchema.describe(
3781
+ "App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"
3782
+ ),
3783
+ actionType: ActionTypePropertySchema.describe(
3784
+ "Action type that matches the action's defined type"
3785
+ ),
3786
+ action: ActionPropertySchema.describe(
3787
+ "Action key to get the input schema for"
3788
+ )
3789
+ }).merge(GetActionInputFieldsSchemaBaseSchema).describe(GetActionInputFieldsSchemaDescription).meta({
3790
+ aliases: {
3791
+ appKey: "app",
3792
+ actionKey: "action",
3793
+ connectionId: "connection",
3794
+ authenticationId: "connection"
3688
3795
  }
3689
- );
3796
+ });
3797
+ var GetActionInputFieldsSchemaSchemaDeprecated = zod.z.object({
3798
+ appKey: AppKeyPropertySchema.describe(
3799
+ "App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"
3800
+ ),
3801
+ actionType: ActionTypePropertySchema.describe(
3802
+ "Action type that matches the action's defined type"
3803
+ ),
3804
+ actionKey: ActionKeyPropertySchema.describe(
3805
+ "Action key to get the input schema for"
3806
+ )
3807
+ }).merge(GetActionInputFieldsSchemaBaseSchema);
3808
+ var GetActionInputFieldsSchemaInputSchema = zod.z.union([
3809
+ GetActionInputFieldsSchemaSchema,
3810
+ GetActionInputFieldsSchemaSchemaDeprecated
3811
+ ]).describe(GetActionInputFieldsSchemaDescription);
3690
3812
 
3691
- // src/plugins/listClientCredentials/index.ts
3692
- var listClientCredentialsPlugin = definePlugin(
3693
- (sdk) => createPaginatedPluginMethod(sdk, {
3694
- name: "listClientCredentials",
3695
- categories: ["client-credentials"],
3696
- type: "list",
3697
- itemType: "ClientCredentials",
3698
- inputSchema: ListClientCredentialsQuerySchema,
3699
- outputSchema: ClientCredentialsItemSchema,
3700
- defaultPageSize: DEFAULT_PAGE_SIZE,
3813
+ // src/plugins/getActionInputFieldsSchema/index.ts
3814
+ var getActionInputFieldsSchemaPlugin = definePlugin(
3815
+ (sdk) => createPluginMethod(sdk, {
3816
+ name: "getActionInputFieldsSchema",
3817
+ categories: ["action"],
3818
+ type: "item",
3819
+ itemType: "InputSchema",
3820
+ inputSchema: GetActionInputFieldsSchemaInputSchema,
3821
+ resolvers: {
3822
+ app: appKeyResolver,
3823
+ actionType: actionTypeResolver,
3824
+ action: actionKeyResolver,
3825
+ connection: connectionIdResolver,
3826
+ inputs: inputsAllOptionalResolver
3827
+ },
3701
3828
  handler: async ({
3702
3829
  sdk: sdk2,
3703
3830
  options
3704
3831
  }) => {
3705
- const searchParams = {};
3706
- if (options.pageSize !== void 0) {
3707
- searchParams.page_size = options.pageSize.toString();
3708
- }
3709
- if (options.cursor) {
3710
- searchParams.offset = options.cursor;
3832
+ const { api, getVersionedImplementationId } = sdk2.context;
3833
+ const appKey = "app" in options ? options.app : options.appKey;
3834
+ const actionKey = "action" in options ? options.action : options.actionKey;
3835
+ const {
3836
+ actionType,
3837
+ connection,
3838
+ connectionId,
3839
+ authenticationId,
3840
+ inputs
3841
+ } = options;
3842
+ const resolvedConnectionId = await resolveConnectionId({
3843
+ connection,
3844
+ connectionId,
3845
+ authenticationId,
3846
+ resolveConnection: sdk2.context.resolveConnection
3847
+ });
3848
+ const selectedApi = await getVersionedImplementationId(appKey);
3849
+ if (!selectedApi) {
3850
+ throw new ZapierConfigurationError(
3851
+ "No current_implementation_id found for app",
3852
+ { configType: "current_implementation_id" }
3853
+ );
3711
3854
  }
3712
- return sdk2.context.api.get(
3713
- "/api/v0/client-credentials",
3714
- {
3715
- searchParams,
3716
- authRequired: true,
3717
- requiredScopes: ["credentials"]
3718
- }
3719
- );
3720
- },
3721
- extractCursor: (response) => extractCursor(response.links)
3855
+ setMethodMetadata({
3856
+ selectedApi,
3857
+ operationType: actionType,
3858
+ operationKey: actionKey
3859
+ });
3860
+ const { data: action } = await sdk2.getAction({
3861
+ app: appKey,
3862
+ actionType,
3863
+ action: actionKey
3864
+ });
3865
+ const needsData = await fetchImplementationNeeds({
3866
+ api,
3867
+ selectedApi,
3868
+ action: action.key,
3869
+ actionType,
3870
+ connectionId: resolvedConnectionId ?? null,
3871
+ inputs
3872
+ });
3873
+ return { data: needsData.schema || {} };
3874
+ }
3722
3875
  })
3723
3876
  );
3724
- var CreateClientCredentialsSchema = clientCredentials.CreateClientCredentialsRequestSchema.omit({ allowed_scopes: true }).extend({
3725
- allowedScopes: zod.z.array(zod.z.enum(["credentials", "external"])).default(["external"]).describe("Scopes to allow for these credentials"),
3726
- // Temporarily hidden while we finalise work to make approvals/policies customer-facing.
3727
- policy: zod.z.record(zod.z.string(), zod.z.unknown()).optional().describe("Policy document (JSON) to attach to the credentials").meta({ deprecated: true })
3728
- }).describe("Create new client credentials for the authenticated user");
3729
-
3730
- // src/plugins/createClientCredentials/index.ts
3731
- var createClientCredentialsPlugin = definePlugin(
3732
- (sdk) => createPluginMethod(sdk, {
3733
- name: "createClientCredentials",
3734
- categories: ["client-credentials"],
3735
- type: "create",
3736
- itemType: "ClientCredentials",
3737
- inputSchema: CreateClientCredentialsSchema,
3738
- outputSchema: ClientCredentialsCreatedItemSchema,
3739
- confirm: "create-secret",
3740
- resolvers: { name: clientCredentialsNameResolver },
3877
+ var ListConnectionsQuerySchema = connections.ListConnectionsQuerySchema.omit({
3878
+ offset: true,
3879
+ // Omit snake_case fields, we'll add camelCase versions
3880
+ app_key: true,
3881
+ connection_ids: true,
3882
+ account_id: true,
3883
+ is_expired: true,
3884
+ page_size: true
3885
+ }).extend({
3886
+ // New name for appKey
3887
+ app: AppPropertySchema.optional().describe(
3888
+ "App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github')"
3889
+ ),
3890
+ /** @deprecated Use `app` instead. */
3891
+ appKey: AppKeyPropertySchema.optional().describe(
3892
+ "App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github')"
3893
+ ).meta({ deprecated: true }),
3894
+ // New name for connectionIds
3895
+ connections: ConnectionsPropertySchema.optional().describe(
3896
+ "List of connection IDs to filter by"
3897
+ ),
3898
+ /** @deprecated Use `connections` instead. */
3899
+ connectionIds: zod.z.array(zod.z.string()).optional().describe("List of connection IDs to filter by").meta({ deprecated: true }),
3900
+ /** @deprecated Use `connections` instead. */
3901
+ authenticationIds: zod.z.array(zod.z.string()).optional().describe(
3902
+ "List of authentication IDs to filter by (deprecated, use connections)"
3903
+ ).meta({ deprecated: true }),
3904
+ account: zod.z.string().optional().describe("Account to filter by"),
3905
+ /** @deprecated Use `account` instead. */
3906
+ accountId: zod.z.string().optional().describe("Account ID to filter by").meta({ deprecated: true }),
3907
+ // Include shared connections (overrides default owner=me filter)
3908
+ includeShared: zod.z.boolean().optional().describe(
3909
+ "Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections."
3910
+ ),
3911
+ /** @deprecated Use `expired` instead */
3912
+ isExpired: zod.z.boolean().optional().describe("Filter by expired status").meta({
3913
+ deprecated: true,
3914
+ deprecationMessage: "Use --expired instead to show only expired connections."
3915
+ }),
3916
+ expired: zod.z.boolean().optional().describe(
3917
+ "Show only expired connections (default: only non-expired connections are returned)"
3918
+ ),
3919
+ // Override pageSize to make optional
3920
+ pageSize: zod.z.number().min(1).optional().describe("Number of connections per page"),
3921
+ // SDK specific property for pagination/iterable helpers
3922
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
3923
+ // SDK specific property for pagination/iterable helpers
3924
+ cursor: zod.z.string().optional().describe("Cursor to start from")
3925
+ }).describe("List available connections with optional filtering");
3926
+ var ConnectionItemSchema = withFormatter(connections.ConnectionItemSchema, {
3927
+ format: (item) => {
3928
+ const details = [];
3929
+ if (item.identifier) {
3930
+ details.push({
3931
+ text: `Identifier: ${item.identifier}`,
3932
+ style: "accent"
3933
+ });
3934
+ }
3935
+ details.push({
3936
+ text: `Account: ${item.account_id} | Private: ${item.is_private} | Shared: ${item.shared_with_all}`,
3937
+ style: "dim"
3938
+ });
3939
+ if (item.marked_stale_at) {
3940
+ details.push({
3941
+ text: `Warning: Marked stale: ${new Date(item.marked_stale_at).toLocaleDateString()}`,
3942
+ style: "warning"
3943
+ });
3944
+ }
3945
+ return {
3946
+ title: item.title || `Connection ${item.id}`,
3947
+ id: item.id?.toString(),
3948
+ details
3949
+ };
3950
+ }
3951
+ });
3952
+
3953
+ // src/plugins/listConnections/index.ts
3954
+ var listConnectionsPlugin = definePlugin(
3955
+ (sdk) => createPaginatedPluginMethod(sdk, {
3956
+ name: "listConnections",
3957
+ categories: ["connection"],
3958
+ type: "list",
3959
+ itemType: "Connection",
3960
+ inputSchema: ListConnectionsQuerySchema,
3961
+ outputSchema: ConnectionItemSchema,
3962
+ defaultPageSize: DEFAULT_PAGE_SIZE,
3963
+ resolvers: { app: appKeyResolver },
3964
+ handler: async ({ sdk: sdk2, options }) => {
3965
+ if (options.includeShared) {
3966
+ await sdk2.context.checkCapability("canIncludeSharedConnections");
3967
+ }
3968
+ const { api, getVersionedImplementationId } = sdk2.context;
3969
+ const searchParams = {};
3970
+ if (options.pageSize !== void 0) {
3971
+ searchParams.page_size = options.pageSize.toString();
3972
+ }
3973
+ const appKey = options.app ?? options.appKey;
3974
+ if (appKey) {
3975
+ const implementationId = await getVersionedImplementationId(appKey);
3976
+ if (implementationId) {
3977
+ setMethodMetadata({ selectedApi: implementationId });
3978
+ const [versionlessSelectedApi] = splitVersionedKey(implementationId);
3979
+ searchParams.app_key = versionlessSelectedApi;
3980
+ } else {
3981
+ searchParams.app_key = appKey;
3982
+ }
3983
+ }
3984
+ const connectionRefs = options.connections;
3985
+ const legacyConnectionIds = options.connectionIds ?? options.authenticationIds;
3986
+ if (connectionRefs && connectionRefs.length > 0) {
3987
+ const resolvedIds = await Promise.all(
3988
+ connectionRefs.map(
3989
+ (ref) => resolveConnectionId({
3990
+ connection: ref,
3991
+ resolveConnection: sdk2.context.resolveConnection
3992
+ })
3993
+ )
3994
+ );
3995
+ searchParams.connection_ids = resolvedIds.filter((id) => id != null).join(",");
3996
+ } else if (legacyConnectionIds && legacyConnectionIds.length > 0) {
3997
+ searchParams.connection_ids = legacyConnectionIds.join(",");
3998
+ }
3999
+ if (options.search) {
4000
+ searchParams.search = options.search;
4001
+ }
4002
+ if (options.title) {
4003
+ searchParams.title = options.title;
4004
+ }
4005
+ const accountId = options.account ?? options.accountId;
4006
+ if (accountId) {
4007
+ searchParams.account_id = accountId;
4008
+ }
4009
+ if (options.owner && options.owner !== "me" && !options.includeShared) {
4010
+ throw new ZapierValidationError(
4011
+ 'The "owner" option requires "includeShared" to be true. Without includeShared, only your own connections are returned.'
4012
+ );
4013
+ }
4014
+ const owner = options.includeShared ? options.owner : "me";
4015
+ if (owner) {
4016
+ searchParams.owner = owner;
4017
+ }
4018
+ if (options.isExpired !== void 0) {
4019
+ searchParams.is_expired = options.isExpired.toString();
4020
+ } else {
4021
+ searchParams.is_expired = (options.expired ?? false).toString();
4022
+ }
4023
+ if (options.cursor) {
4024
+ searchParams.offset = options.cursor;
4025
+ }
4026
+ const response = await api.get(
4027
+ "/api/v0/connections",
4028
+ { searchParams, authRequired: true }
4029
+ );
4030
+ return {
4031
+ ...response,
4032
+ data: response.data.map(transformConnectionItem)
4033
+ };
4034
+ },
4035
+ extractCursor: (response) => extractCursor(response.links)
4036
+ })
4037
+ );
4038
+ var ListClientCredentialsQuerySchema = clientCredentials.ListClientCredentialsQuerySchema.omit({
4039
+ offset: true,
4040
+ page_size: true
4041
+ }).extend({
4042
+ // Override pageSize to make optional
4043
+ pageSize: zod.z.number().min(1).optional().describe("Number of credentials per page"),
4044
+ // SDK specific property for pagination/iterable helpers
4045
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
4046
+ // SDK specific property for pagination/iterable helpers
4047
+ cursor: zod.z.string().optional().describe("Cursor to start from")
4048
+ }).describe("List client credentials for the authenticated user");
4049
+ var ClientCredentialsItemSchema = withFormatter(
4050
+ clientCredentials.ClientCredentialsItemSchema,
4051
+ {
4052
+ format: (item) => {
4053
+ const details = [];
4054
+ if (item.allowed_scopes && item.allowed_scopes.length > 0) {
4055
+ details.push({
4056
+ text: `Scopes: ${item.allowed_scopes.join(", ")}`,
4057
+ style: "accent"
4058
+ });
4059
+ }
4060
+ if (item.created_at) {
4061
+ details.push({
4062
+ text: `Created: ${new Date(item.created_at).toLocaleDateString()}`,
4063
+ style: "dim"
4064
+ });
4065
+ }
4066
+ return {
4067
+ title: item.name,
4068
+ id: item.client_id,
4069
+ details
4070
+ };
4071
+ }
4072
+ }
4073
+ );
4074
+ var ClientCredentialsCreatedItemSchema = withFormatter(
4075
+ clientCredentials.ClientCredentialsCreatedItemSchema,
4076
+ {
4077
+ format: (item) => {
4078
+ return {
4079
+ title: item.name,
4080
+ id: item.client_id,
4081
+ details: [
4082
+ {
4083
+ text: `Client Secret: ${item.client_secret}`,
4084
+ style: "accent"
4085
+ }
4086
+ ]
4087
+ };
4088
+ }
4089
+ }
4090
+ );
4091
+
4092
+ // src/plugins/listClientCredentials/index.ts
4093
+ var listClientCredentialsPlugin = definePlugin(
4094
+ (sdk) => createPaginatedPluginMethod(sdk, {
4095
+ name: "listClientCredentials",
4096
+ categories: ["client-credentials"],
4097
+ type: "list",
4098
+ itemType: "ClientCredentials",
4099
+ inputSchema: ListClientCredentialsQuerySchema,
4100
+ outputSchema: ClientCredentialsItemSchema,
4101
+ defaultPageSize: DEFAULT_PAGE_SIZE,
4102
+ handler: async ({
4103
+ sdk: sdk2,
4104
+ options
4105
+ }) => {
4106
+ const searchParams = {};
4107
+ if (options.pageSize !== void 0) {
4108
+ searchParams.page_size = options.pageSize.toString();
4109
+ }
4110
+ if (options.cursor) {
4111
+ searchParams.offset = options.cursor;
4112
+ }
4113
+ return sdk2.context.api.get(
4114
+ "/api/v0/client-credentials",
4115
+ {
4116
+ searchParams,
4117
+ authRequired: true,
4118
+ requiredScopes: ["credentials"]
4119
+ }
4120
+ );
4121
+ },
4122
+ extractCursor: (response) => extractCursor(response.links)
4123
+ })
4124
+ );
4125
+ var CreateClientCredentialsSchema = clientCredentials.CreateClientCredentialsRequestSchema.omit({ allowed_scopes: true }).extend({
4126
+ allowedScopes: zod.z.array(zod.z.enum(["credentials", "external"])).default(["external"]).describe("Scopes to allow for these credentials"),
4127
+ // Temporarily hidden while we finalise work to make approvals/policies customer-facing.
4128
+ policy: zod.z.record(zod.z.string(), zod.z.unknown()).optional().describe("Policy document (JSON) to attach to the credentials").meta({ deprecated: true })
4129
+ }).describe("Create new client credentials for the authenticated user");
4130
+
4131
+ // src/plugins/createClientCredentials/index.ts
4132
+ var createClientCredentialsPlugin = definePlugin(
4133
+ (sdk) => createPluginMethod(sdk, {
4134
+ name: "createClientCredentials",
4135
+ categories: ["client-credentials"],
4136
+ type: "create",
4137
+ itemType: "ClientCredentials",
4138
+ inputSchema: CreateClientCredentialsSchema,
4139
+ outputSchema: ClientCredentialsCreatedItemSchema,
4140
+ confirm: "create-secret",
4141
+ resolvers: { name: clientCredentialsNameResolver },
3741
4142
  handler: async ({ sdk: sdk2, options }) => {
3742
4143
  const { api } = sdk2.context;
3743
4144
  const response = await api.post(
@@ -4987,8 +5388,22 @@ function calculateExponentialBackoffMs(attempt, baseDelayMs = BASE_EXPONENTIAL_B
4987
5388
  const jitter = Math.random() * JITTER_FACTOR * baseDelay;
4988
5389
  return Math.floor(baseDelay + jitter);
4989
5390
  }
4990
- function sleep(ms) {
4991
- return new Promise((resolve2) => setTimeout(resolve2, ms));
5391
+ function sleep(ms, signal) {
5392
+ if (!signal) {
5393
+ return new Promise((resolve2) => setTimeout(resolve2, ms));
5394
+ }
5395
+ if (signal.aborted) return Promise.resolve();
5396
+ return new Promise((resolve2) => {
5397
+ const timer = setTimeout(() => {
5398
+ signal.removeEventListener("abort", onAbort);
5399
+ resolve2();
5400
+ }, ms);
5401
+ const onAbort = () => {
5402
+ clearTimeout(timer);
5403
+ resolve2();
5404
+ };
5405
+ signal.addEventListener("abort", onAbort, { once: true });
5406
+ });
4992
5407
  }
4993
5408
 
4994
5409
  // src/api/polling.ts
@@ -5018,6 +5433,14 @@ function getPollingInterval(elapsedMs) {
5018
5433
  const stage = POLLING_STAGES.find(([threshold]) => elapsedMs < threshold);
5019
5434
  return stage ? stage[1] : DEFAULT_MAX_POLLING_INTERVAL_MS;
5020
5435
  }
5436
+ function makeAbortError() {
5437
+ if (typeof DOMException !== "undefined") {
5438
+ return new DOMException("Polling was aborted", "AbortError");
5439
+ }
5440
+ const err = new Error("Polling was aborted");
5441
+ err.name = "AbortError";
5442
+ return err;
5443
+ }
5021
5444
  var processResponse = async (response, successStatus, pendingStatus, isPending, resultExtractor, errorCount) => {
5022
5445
  if (!response.ok) {
5023
5446
  return {
@@ -5071,7 +5494,8 @@ async function pollUntilComplete(options) {
5071
5494
  successStatus = DEFAULT_SUCCESS_STATUS,
5072
5495
  pendingStatus = DEFAULT_PENDING_STATUS,
5073
5496
  isPending,
5074
- resultExtractor = (response) => response
5497
+ resultExtractor = (response) => response,
5498
+ signal
5075
5499
  } = options;
5076
5500
  if (timeoutMs <= 0) {
5077
5501
  throw new ZapierValidationError("Timeout must be greater than 0", {
@@ -5083,13 +5507,16 @@ async function pollUntilComplete(options) {
5083
5507
  details: { initialDelay }
5084
5508
  });
5085
5509
  }
5510
+ if (signal?.aborted) throw makeAbortError();
5086
5511
  const startTime = Date.now();
5087
5512
  let attempts = 0;
5088
5513
  let errorCount = 0;
5089
5514
  if (initialDelay > 0) {
5090
- await sleep(initialDelay);
5515
+ await sleep(initialDelay, signal);
5516
+ if (signal?.aborted) throw makeAbortError();
5091
5517
  }
5092
5518
  while (true) {
5519
+ if (signal?.aborted) throw makeAbortError();
5093
5520
  const elapsedTime = Date.now() - startTime;
5094
5521
  if (elapsedTime >= timeoutMs) {
5095
5522
  throw new ZapierTimeoutError(
@@ -5102,7 +5529,8 @@ async function pollUntilComplete(options) {
5102
5529
  if (attempts > 0) {
5103
5530
  const interval = getPollingInterval(elapsedTime);
5104
5531
  const waitTime = calculateErrorBackoffMs(interval, errorCount);
5105
- await sleep(waitTime);
5532
+ await sleep(waitTime, signal);
5533
+ if (signal?.aborted) throw makeAbortError();
5106
5534
  }
5107
5535
  attempts++;
5108
5536
  try {
@@ -5130,6 +5558,7 @@ async function pollUntilComplete(options) {
5130
5558
  );
5131
5559
  }
5132
5560
  } catch (error) {
5561
+ if (isAbortError(error)) throw error;
5133
5562
  errorCount++;
5134
5563
  if (errorCount >= MAX_CONSECUTIVE_ERRORS) {
5135
5564
  throw new ZapierApiError(
@@ -5631,7 +6060,7 @@ async function invalidateCredentialsToken(options) {
5631
6060
  }
5632
6061
 
5633
6062
  // src/sdk-version.ts
5634
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.48.1" : void 0) || "unknown";
6063
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.49.0" : void 0) || "unknown";
5635
6064
 
5636
6065
  // src/utils/open-url.ts
5637
6066
  var nodePrefix = "node:";
@@ -5771,6 +6200,11 @@ var pathConfig = {
5771
6200
  "/tables": {
5772
6201
  authHeader: "Authorization",
5773
6202
  pathPrefix: "/api/v0/sdk/tables"
6203
+ },
6204
+ // e.g. /trigger-inbox -> https://sdkapi.zapier.com/api/v0/sdk/trigger-inbox/...
6205
+ "/trigger-inbox": {
6206
+ authHeader: "Authorization",
6207
+ pathPrefix: "/api/v0/sdk/trigger-inbox"
5774
6208
  }
5775
6209
  };
5776
6210
  var ZapierApiClient = class {
@@ -5833,7 +6267,7 @@ var ZapierApiClient = class {
5833
6267
  method: init?.method ?? "GET",
5834
6268
  rateLimit: rateLimitInfo
5835
6269
  });
5836
- await sleep(delayMs);
6270
+ await sleep(delayMs, init?.signal ?? void 0);
5837
6271
  }
5838
6272
  };
5839
6273
  /**
@@ -5941,14 +6375,16 @@ var ZapierApiClient = class {
5941
6375
  fetchPoll: () => this.fetch(path, {
5942
6376
  method: "GET",
5943
6377
  searchParams: options.searchParams,
5944
- authRequired: options.authRequired
6378
+ authRequired: options.authRequired,
6379
+ signal: options.signal
5945
6380
  }),
5946
6381
  initialDelay: options.initialDelay,
5947
6382
  timeoutMs: options.timeoutMs,
5948
6383
  successStatus: options.successStatus,
5949
6384
  pendingStatus: options.pendingStatus,
5950
6385
  isPending: options.isPending,
5951
- resultExtractor: options.resultExtractor
6386
+ resultExtractor: options.resultExtractor,
6387
+ signal: options.signal
5952
6388
  });
5953
6389
  };
5954
6390
  this.maxNetworkRetries = options.maxNetworkRetries ?? ZAPIER_MAX_NETWORK_RETRIES;
@@ -7416,6 +7852,7 @@ var categoryDefinitions = {
7416
7852
  titlePlural: "Client Credentials"
7417
7853
  },
7418
7854
  table: { title: "Table" },
7855
+ trigger: { title: "Trigger" },
7419
7856
  http: { title: "HTTP Request" },
7420
7857
  utility: { title: "Utility", titlePlural: "Utilities" },
7421
7858
  other: { title: "Other" }
@@ -7446,6 +7883,7 @@ function buildRegistry({
7446
7883
  categories: m.categories || [],
7447
7884
  resolvers: m.resolvers,
7448
7885
  formatter: m.formatter,
7886
+ experimental: m.experimental,
7449
7887
  packages: m.packages,
7450
7888
  confirm: m.confirm ?? (m.type === "delete" ? "delete" : void 0),
7451
7889
  deprecation: m.deprecation,
@@ -7475,361 +7913,122 @@ function buildRegistry({
7475
7913
  return { functions: filteredFunctions, categories: filteredCategories };
7476
7914
  }
7477
7915
 
7478
- // src/plugins/deprecated/authentications.ts
7479
- var listAuthenticationsPlugin = definePlugin(
7480
- (sdk) => ({
7481
- listAuthentications: sdk.listConnections,
7482
- context: {
7483
- meta: {
7484
- listAuthentications: {
7485
- packages: ["cli", "mcp"],
7486
- categories: ["connection", "deprecated"],
7487
- type: "list",
7488
- itemType: "Connection",
7489
- inputSchema: ListConnectionsQuerySchema,
7490
- outputSchema: ConnectionItemSchema
7491
- }
7492
- }
7493
- }
7494
- })
7495
- );
7496
- var getAuthenticationPlugin = definePlugin(
7497
- (sdk) => ({
7498
- getAuthentication: sdk.getConnection,
7499
- context: {
7500
- meta: {
7501
- getAuthentication: {
7502
- packages: ["cli", "mcp"],
7503
- categories: ["connection", "deprecated"],
7504
- type: "item",
7505
- itemType: "Connection",
7506
- inputSchema: GetConnectionParamSchema,
7507
- outputSchema: ConnectionItemSchema
7508
- }
7509
- }
7510
- }
7511
- })
7512
- );
7513
- var findFirstAuthenticationPlugin = definePlugin(
7514
- (sdk) => ({
7515
- findFirstAuthentication: sdk.findFirstConnection,
7516
- context: {
7517
- meta: {
7518
- findFirstAuthentication: {
7519
- packages: ["cli", "mcp"],
7520
- categories: ["connection", "deprecated"],
7521
- type: "item",
7522
- itemType: "Connection",
7523
- inputSchema: FindFirstConnectionSchema,
7524
- outputSchema: ConnectionItemSchema
7525
- }
7526
- }
7527
- }
7528
- })
7529
- );
7530
- var findUniqueAuthenticationPlugin = definePlugin(
7531
- (sdk) => ({
7532
- findUniqueAuthentication: sdk.findUniqueConnection,
7533
- context: {
7534
- meta: {
7535
- findUniqueAuthentication: {
7536
- packages: ["cli", "mcp"],
7537
- categories: ["connection", "deprecated"],
7538
- type: "item",
7539
- itemType: "Connection",
7540
- inputSchema: FindUniqueConnectionSchema,
7541
- outputSchema: ConnectionItemSchema
7542
- }
7543
- }
7544
- }
7545
- })
7546
- );
7547
- var GetInputFieldsSchemaDescription = "Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.";
7548
- var GetInputFieldsSchemaBaseSchema = zod.z.object({
7549
- connection: ConnectionPropertySchema.optional().describe(
7550
- "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
7551
- ),
7552
- connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
7553
- "Connection ID to use when fetching the schema. Required if the action needs a connection to determine available fields."
7554
- ).meta({ deprecated: true }),
7555
- /** @deprecated Use connection instead */
7556
- authenticationId: AuthenticationIdPropertySchema.nullable().optional().describe(
7557
- "Authentication ID to use when fetching the schema. Required if the action needs a connection to determine available fields."
7558
- ).meta({ deprecated: true }),
7559
- inputs: InputsPropertySchema.optional().describe(
7560
- "Current input values that may affect the schema (e.g., when fields depend on other field values)"
7561
- )
7562
- });
7563
- var GetInputFieldsSchemaSchema = zod.z.object({
7564
- app: AppPropertySchema.describe(
7565
- "App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"
7566
- ),
7567
- actionType: ActionTypePropertySchema.describe(
7568
- "Action type that matches the action's defined type"
7569
- ),
7570
- action: ActionPropertySchema.describe(
7571
- "Action key to get the input schema for"
7572
- )
7573
- }).merge(GetInputFieldsSchemaBaseSchema).describe(GetInputFieldsSchemaDescription).meta({
7574
- aliases: {
7575
- appKey: "app",
7576
- actionKey: "action",
7577
- connectionId: "connection",
7578
- authenticationId: "connection"
7579
- }
7580
- });
7581
- var GetInputFieldsSchemaSchemaDeprecated = zod.z.object({
7582
- appKey: AppKeyPropertySchema.describe(
7583
- "App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"
7584
- ),
7585
- actionType: ActionTypePropertySchema.describe(
7586
- "Action type that matches the action's defined type"
7587
- ),
7588
- actionKey: ActionKeyPropertySchema.describe(
7589
- "Action key to get the input schema for"
7590
- )
7591
- }).merge(GetInputFieldsSchemaBaseSchema);
7592
- var GetInputFieldsSchemaInputSchema = zod.z.union([GetInputFieldsSchemaSchema, GetInputFieldsSchemaSchemaDeprecated]).describe(GetInputFieldsSchemaDescription);
7593
-
7594
- // src/plugins/getInputFieldsSchema/index.ts
7595
- var getInputFieldsSchemaPlugin = definePlugin(
7596
- (sdk) => createPluginMethod(sdk, {
7597
- name: "getInputFieldsSchema",
7598
- categories: ["action"],
7599
- type: "item",
7600
- itemType: "InputSchema",
7601
- inputSchema: GetInputFieldsSchemaInputSchema,
7602
- resolvers: {
7603
- app: appKeyResolver,
7604
- actionType: actionTypeResolver,
7605
- action: actionKeyResolver,
7606
- connection: connectionIdResolver,
7607
- inputs: inputsAllOptionalResolver
7608
- },
7609
- handler: async ({
7610
- sdk: sdk2,
7611
- options
7612
- }) => {
7613
- const { api, getVersionedImplementationId } = sdk2.context;
7614
- const appKey = "app" in options ? options.app : options.appKey;
7615
- const actionKey = "action" in options ? options.action : options.actionKey;
7616
- const {
7617
- actionType,
7618
- connection,
7619
- connectionId,
7620
- authenticationId,
7621
- inputs
7622
- } = options;
7623
- const resolvedConnectionId = await resolveConnectionId({
7624
- connection,
7625
- connectionId,
7626
- authenticationId,
7627
- resolveConnection: sdk2.context.resolveConnection
7628
- });
7629
- const selectedApi = await getVersionedImplementationId(appKey);
7630
- if (!selectedApi) {
7631
- throw new ZapierConfigurationError(
7632
- "No current_implementation_id found for app",
7633
- { configType: "current_implementation_id" }
7634
- );
7916
+ // src/plugins/deprecated/authentications.ts
7917
+ var listAuthenticationsPlugin = definePlugin(
7918
+ (sdk) => ({
7919
+ listAuthentications: sdk.listConnections,
7920
+ context: {
7921
+ meta: {
7922
+ listAuthentications: {
7923
+ packages: ["cli", "mcp"],
7924
+ categories: ["connection", "deprecated"],
7925
+ type: "list",
7926
+ itemType: "Connection",
7927
+ inputSchema: ListConnectionsQuerySchema,
7928
+ outputSchema: ConnectionItemSchema
7929
+ }
7635
7930
  }
7636
- setMethodMetadata({
7637
- selectedApi,
7638
- operationType: actionType,
7639
- operationKey: actionKey
7640
- });
7641
- const { data: action } = await sdk2.getAction({
7642
- app: appKey,
7643
- actionType,
7644
- action: actionKey
7645
- });
7646
- const needsData = await fetchImplementationNeeds({
7647
- api,
7648
- selectedApi,
7649
- action: action.key,
7650
- actionType,
7651
- connectionId: resolvedConnectionId ?? null,
7652
- inputs
7653
- });
7654
- return { data: needsData.schema || {} };
7655
7931
  }
7656
7932
  })
7657
7933
  );
7658
- var InputFieldChoiceItemSchema = withFormatter(NeedChoicesSchema, {
7659
- format: (item) => {
7660
- const title = item.label || item.key || "Choice";
7661
- const details = [];
7662
- if (item.label && item.key && item.label !== item.key) {
7663
- details.push({ text: `Key: ${item.key}`, style: "dim" });
7934
+ var getAuthenticationPlugin = definePlugin(
7935
+ (sdk) => ({
7936
+ getAuthentication: sdk.getConnection,
7937
+ context: {
7938
+ meta: {
7939
+ getAuthentication: {
7940
+ packages: ["cli", "mcp"],
7941
+ categories: ["connection", "deprecated"],
7942
+ type: "item",
7943
+ itemType: "Connection",
7944
+ inputSchema: GetConnectionParamSchema,
7945
+ outputSchema: ConnectionItemSchema
7946
+ }
7947
+ }
7664
7948
  }
7665
- if (item.sample && item.sample !== item.key) {
7666
- details.push({ text: `Sample: ${item.sample}`, style: "dim" });
7949
+ })
7950
+ );
7951
+ var findFirstAuthenticationPlugin = definePlugin(
7952
+ (sdk) => ({
7953
+ findFirstAuthentication: sdk.findFirstConnection,
7954
+ context: {
7955
+ meta: {
7956
+ findFirstAuthentication: {
7957
+ packages: ["cli", "mcp"],
7958
+ categories: ["connection", "deprecated"],
7959
+ type: "item",
7960
+ itemType: "Connection",
7961
+ inputSchema: FindFirstConnectionSchema,
7962
+ outputSchema: ConnectionItemSchema
7963
+ }
7964
+ }
7667
7965
  }
7668
- if (item.value && item.value !== item.key) {
7669
- details.push({ text: `Value: ${item.value}`, style: "normal" });
7966
+ })
7967
+ );
7968
+ var findUniqueAuthenticationPlugin = definePlugin(
7969
+ (sdk) => ({
7970
+ findUniqueAuthentication: sdk.findUniqueConnection,
7971
+ context: {
7972
+ meta: {
7973
+ findUniqueAuthentication: {
7974
+ packages: ["cli", "mcp"],
7975
+ categories: ["connection", "deprecated"],
7976
+ type: "item",
7977
+ itemType: "Connection",
7978
+ inputSchema: FindUniqueConnectionSchema,
7979
+ outputSchema: ConnectionItemSchema
7980
+ }
7981
+ }
7670
7982
  }
7671
- return {
7672
- title,
7673
- key: item.key,
7674
- details
7675
- };
7676
- }
7677
- });
7678
- var ListInputFieldChoicesDescription = "Get the available choices for a dynamic dropdown input field";
7679
- var ListInputFieldChoicesBaseSchema = zod.z.object({
7680
- connection: ConnectionPropertySchema.optional().describe(
7681
- "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
7682
- ),
7683
- connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
7684
- "Connection ID to use when listing available field choices. Required if the action needs a connection to populate dynamic dropdown options."
7685
- ).meta({ deprecated: true }),
7686
- /** @deprecated Use connection instead */
7687
- authenticationId: AuthenticationIdPropertySchema.nullable().optional().meta({ deprecated: true }),
7688
- inputs: InputsPropertySchema.optional().describe(
7689
- "Current input values that may affect available choices"
7690
- ),
7691
- page: zod.z.number().int().min(0).optional().describe("Page number for paginated results"),
7692
- pageSize: zod.z.number().min(1).optional().describe("Number of choices per page"),
7693
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
7694
- cursor: zod.z.string().optional().describe("Cursor to start from")
7695
- });
7696
- var ListInputFieldChoicesSchema = zod.z.object({
7697
- app: AppPropertySchema,
7698
- actionType: ActionTypePropertySchema,
7699
- action: ActionPropertySchema,
7700
- inputField: InputFieldPropertySchema
7701
- }).merge(ListInputFieldChoicesBaseSchema).describe(ListInputFieldChoicesDescription).meta({
7702
- aliases: {
7703
- appKey: "app",
7704
- actionKey: "action",
7705
- inputFieldKey: "inputField",
7706
- connectionId: "connection",
7707
- authenticationId: "connection"
7708
- }
7709
- });
7710
- var ListInputFieldChoicesSchemaDeprecated = zod.z.object({
7711
- appKey: AppKeyPropertySchema,
7712
- actionType: ActionTypePropertySchema,
7713
- actionKey: ActionKeyPropertySchema,
7714
- inputFieldKey: zod.z.string().min(1).describe("Input field key to get choices for.")
7715
- }).merge(ListInputFieldChoicesBaseSchema);
7716
- var ListInputFieldChoicesInputSchema = zod.z.union([ListInputFieldChoicesSchema, ListInputFieldChoicesSchemaDeprecated]).describe(ListInputFieldChoicesDescription);
7983
+ })
7984
+ );
7717
7985
 
7718
- // src/plugins/listInputFieldChoices/index.ts
7719
- function transformNeedChoicesToInputFieldChoiceItem(choice) {
7720
- return {
7721
- key: choice.key,
7722
- label: choice.label,
7723
- sample: choice.sample,
7724
- value: choice.value
7725
- };
7726
- }
7727
- var listInputFieldChoicesPlugin = definePlugin(
7728
- (sdk) => createPaginatedPluginMethod(sdk, {
7729
- name: "listInputFieldChoices",
7730
- categories: ["action"],
7731
- type: "list",
7732
- itemType: "InputFieldChoice",
7733
- inputSchema: ListInputFieldChoicesInputSchema,
7734
- outputSchema: InputFieldChoiceItemSchema,
7735
- defaultPageSize: DEFAULT_PAGE_SIZE,
7736
- resolvers: {
7737
- app: appKeyResolver,
7738
- actionType: actionTypeResolver,
7739
- action: actionKeyResolver,
7740
- connection: connectionIdResolver,
7741
- inputField: inputFieldKeyResolver,
7742
- inputs: inputsAllOptionalResolver
7743
- },
7744
- handler: async ({
7745
- sdk: sdk2,
7746
- options
7747
- }) => {
7748
- const { api, getVersionedImplementationId } = sdk2.context;
7749
- const appKey = "app" in options ? options.app : options.appKey;
7750
- const actionKey = "action" in options ? options.action : options.actionKey;
7751
- const inputFieldKey = "inputField" in options ? options.inputField : options.inputFieldKey;
7752
- const {
7753
- actionType,
7754
- connection,
7755
- connectionId,
7756
- authenticationId,
7757
- inputs,
7758
- page,
7759
- cursor
7760
- } = options;
7761
- const resolvedConnectionId = await resolveConnectionId({
7762
- connection,
7763
- connectionId,
7764
- authenticationId,
7765
- resolveConnection: sdk2.context.resolveConnection
7766
- });
7767
- const selectedApi = await getVersionedImplementationId(appKey);
7768
- if (!selectedApi) {
7769
- throw new ZapierConfigurationError(
7770
- "No current_implementation_id found for app",
7771
- { configType: "current_implementation_id" }
7772
- );
7773
- }
7774
- setMethodMetadata({
7775
- selectedApi,
7776
- operationType: actionType,
7777
- operationKey: actionKey
7778
- });
7779
- const { data: action } = await sdk2.getAction({
7780
- app: appKey,
7781
- actionType,
7782
- action: actionKey
7783
- });
7784
- const needsData = await fetchImplementationNeeds({
7785
- api,
7786
- selectedApi,
7787
- action: action.key,
7788
- actionType,
7789
- connectionId: resolvedConnectionId ?? null,
7790
- inputs
7791
- });
7792
- const targetNeed = needsData.needs?.find(
7793
- (need) => need.key === inputFieldKey
7794
- );
7795
- if (targetNeed?.choices && targetNeed.choices.length > 0) {
7796
- return {
7797
- data: targetNeed.choices.map(
7798
- transformNeedChoicesToInputFieldChoiceItem
7799
- )
7800
- };
7986
+ // src/plugins/deprecated/inputFields.ts
7987
+ var listInputFieldsDeprecatedPlugin = definePlugin(
7988
+ (sdk) => ({
7989
+ listInputFields: sdk.listActionInputFields,
7990
+ context: {
7991
+ meta: {
7992
+ listInputFields: {
7993
+ categories: ["action", "deprecated"],
7994
+ type: "list",
7995
+ itemType: "RootField",
7996
+ inputSchema: ListActionInputFieldsInputSchema,
7997
+ outputSchema: RootFieldItemSchema,
7998
+ defaultPageSize: DEFAULT_PAGE_SIZE
7999
+ }
7801
8000
  }
7802
- if (!action.id) {
7803
- throw new ZapierApiError(
7804
- `Action ${actionKey} does not have an ID - cannot retrieve input field choices`
7805
- );
8001
+ }
8002
+ })
8003
+ );
8004
+ var listInputFieldChoicesDeprecatedPlugin = definePlugin(
8005
+ (sdk) => ({
8006
+ listInputFieldChoices: sdk.listActionInputFieldChoices,
8007
+ context: {
8008
+ meta: {
8009
+ listInputFieldChoices: {
8010
+ categories: ["action", "deprecated"],
8011
+ type: "list",
8012
+ itemType: "InputFieldChoiceItem",
8013
+ inputSchema: ListActionInputFieldChoicesInputSchema,
8014
+ outputSchema: InputFieldChoiceItemSchema,
8015
+ defaultPageSize: DEFAULT_PAGE_SIZE
8016
+ }
7806
8017
  }
7807
- const requestPage = cursor ? parseInt(cursor, 10) : page ?? 0;
7808
- const choicesData = await fetchImplementationChoices({
7809
- api,
7810
- actionId: action.id,
7811
- inputFieldId: inputFieldKey,
7812
- connectionId: resolvedConnectionId ?? null,
7813
- inputs,
7814
- page: requestPage
7815
- });
7816
- const choices = (choicesData.choices || []).map(
7817
- transformNeedChoicesToInputFieldChoiceItem
7818
- );
7819
- let nextCursor;
7820
- if (choicesData.next_page != null) {
7821
- nextCursor = choicesData.next_page.toString();
7822
- } else if (choicesData.links?.next) {
7823
- try {
7824
- const nextUrl = new URL(choicesData.links.next);
7825
- const nextPage = nextUrl.searchParams.get("page");
7826
- if (nextPage) {
7827
- nextCursor = nextPage;
7828
- }
7829
- } catch {
8018
+ }
8019
+ })
8020
+ );
8021
+ var getInputFieldsSchemaDeprecatedPlugin = definePlugin(
8022
+ (sdk) => ({
8023
+ getInputFieldsSchema: sdk.getActionInputFieldsSchema,
8024
+ context: {
8025
+ meta: {
8026
+ getInputFieldsSchema: {
8027
+ categories: ["action", "deprecated"],
8028
+ type: "function",
8029
+ inputSchema: GetActionInputFieldsSchemaInputSchema
7830
8030
  }
7831
8031
  }
7832
- return { data: choices, nextCursor };
7833
8032
  }
7834
8033
  })
7835
8034
  );
@@ -8482,7 +8681,7 @@ function buildSdk(properties, context) {
8482
8681
  }
8483
8682
  return registryCache.get(cacheKey);
8484
8683
  },
8485
- addPlugin(plugin) {
8684
+ addPlugin(plugin, options) {
8486
8685
  const pluginResult = plugin({
8487
8686
  ...properties,
8488
8687
  context: frozenContext
@@ -8499,10 +8698,10 @@ function buildSdk(properties, context) {
8499
8698
  for (const key of Object.keys(pluginContextRest)) {
8500
8699
  if (key in existingContext) collisions.push(`context.${key}`);
8501
8700
  }
8502
- if (collisions.length > 0) {
8701
+ if (collisions.length > 0 && !options?.override) {
8503
8702
  const name = plugin.name || "anonymous plugin";
8504
8703
  console.warn(
8505
- `[zapier-sdk] Skipping "${name}" \u2014 duplicate registration of: ${collisions.join(", ")}. If the duplicate is intentional, wrap with composePlugins(...). Otherwise rename the method or remove the duplicate.`
8704
+ `[zapier-sdk] Skipping "${name}" \u2014 duplicate registration of: ${collisions.join(", ")}. If the duplicate is intentional, pass { override: true } to addPlugin or wrap with composePlugins(...). Otherwise rename the method or remove the duplicate.`
8506
8705
  );
8507
8706
  return buildSdk(properties, context);
8508
8707
  }
@@ -8527,7 +8726,7 @@ function createZapierSdkWithoutRegistry(options = {}) {
8527
8726
  return createZapierSdk(options);
8528
8727
  }
8529
8728
  function createZapierSdk(options = {}) {
8530
- return createSdk().addPlugin(createOptionsPlugin(options)).addPlugin(eventEmissionPlugin).addPlugin(apiPlugin).addPlugin(manifestPlugin).addPlugin(capabilitiesPlugin).addPlugin(connectionsPlugin).addPlugin(listAppsPlugin).addPlugin(getAppPlugin).addPlugin(listActionsPlugin).addPlugin(getActionPlugin).addPlugin(listInputFieldsPlugin).addPlugin(getInputFieldsSchemaPlugin).addPlugin(listInputFieldChoicesPlugin).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(listTablesPlugin).addPlugin(getTablePlugin).addPlugin(deleteTablePlugin).addPlugin(createTablePlugin).addPlugin(listTableFieldsPlugin).addPlugin(createTableFieldsPlugin).addPlugin(deleteTableFieldsPlugin).addPlugin(getTableRecordPlugin).addPlugin(listTableRecordsPlugin).addPlugin(createTableRecordsPlugin).addPlugin(deleteTableRecordsPlugin).addPlugin(updateTableRecordsPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
8729
+ 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(listTablesPlugin).addPlugin(getTablePlugin).addPlugin(deleteTablePlugin).addPlugin(createTablePlugin).addPlugin(listTableFieldsPlugin).addPlugin(createTableFieldsPlugin).addPlugin(deleteTableFieldsPlugin).addPlugin(getTableRecordPlugin).addPlugin(listTableRecordsPlugin).addPlugin(createTableRecordsPlugin).addPlugin(deleteTableRecordsPlugin).addPlugin(updateTableRecordsPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
8531
8730
  }
8532
8731
  var BaseSdkOptionsSchema = zod.z.object({
8533
8732
  credentials: CredentialsSchema.optional().describe(
@@ -8610,6 +8809,9 @@ exports.DebugPropertySchema = DebugPropertySchema;
8610
8809
  exports.FieldsPropertySchema = FieldsPropertySchema;
8611
8810
  exports.InputFieldPropertySchema = InputFieldPropertySchema;
8612
8811
  exports.InputsPropertySchema = InputsPropertySchema;
8812
+ exports.LeaseLimitPropertySchema = LeaseLimitPropertySchema;
8813
+ exports.LeasePropertySchema = LeasePropertySchema;
8814
+ exports.LeaseSecondsPropertySchema = LeaseSecondsPropertySchema;
8613
8815
  exports.LimitPropertySchema = LimitPropertySchema;
8614
8816
  exports.MAX_PAGE_LIMIT = MAX_PAGE_LIMIT;
8615
8817
  exports.OffsetPropertySchema = OffsetPropertySchema;
@@ -8623,9 +8825,12 @@ exports.RelayRequestSchema = RelayRequestSchema;
8623
8825
  exports.ResolvedCredentialsSchema = ResolvedCredentialsSchema;
8624
8826
  exports.TablePropertySchema = TablePropertySchema;
8625
8827
  exports.TablesPropertySchema = TablesPropertySchema;
8828
+ exports.TriggerInboxNamePropertySchema = TriggerInboxNamePropertySchema;
8829
+ exports.TriggerInboxPropertySchema = TriggerInboxPropertySchema;
8626
8830
  exports.ZAPIER_BASE_URL = ZAPIER_BASE_URL;
8627
8831
  exports.ZAPIER_MAX_NETWORK_RETRIES = ZAPIER_MAX_NETWORK_RETRIES;
8628
8832
  exports.ZAPIER_MAX_NETWORK_RETRY_DELAY_MS = ZAPIER_MAX_NETWORK_RETRY_DELAY_MS;
8833
+ exports.ZapierAbortDrainSignal = ZapierAbortDrainSignal;
8629
8834
  exports.ZapierActionError = ZapierActionError;
8630
8835
  exports.ZapierApiError = ZapierApiError;
8631
8836
  exports.ZapierAppNotFoundError = ZapierAppNotFoundError;
@@ -8633,11 +8838,14 @@ exports.ZapierApprovalError = ZapierApprovalError;
8633
8838
  exports.ZapierAuthenticationError = ZapierAuthenticationError;
8634
8839
  exports.ZapierBundleError = ZapierBundleError;
8635
8840
  exports.ZapierConfigurationError = ZapierConfigurationError;
8841
+ exports.ZapierConflictError = ZapierConflictError;
8636
8842
  exports.ZapierError = ZapierError;
8637
8843
  exports.ZapierNotFoundError = ZapierNotFoundError;
8638
8844
  exports.ZapierRateLimitError = ZapierRateLimitError;
8639
8845
  exports.ZapierRelayError = ZapierRelayError;
8846
+ exports.ZapierReleaseTriggerMessageSignal = ZapierReleaseTriggerMessageSignal;
8640
8847
  exports.ZapierResourceNotFoundError = ZapierResourceNotFoundError;
8848
+ exports.ZapierSignal = ZapierSignal;
8641
8849
  exports.ZapierTimeoutError = ZapierTimeoutError;
8642
8850
  exports.ZapierUnknownError = ZapierUnknownError;
8643
8851
  exports.ZapierValidationError = ZapierValidationError;
@@ -8685,6 +8893,7 @@ exports.findManifestEntry = findManifestEntry;
8685
8893
  exports.findUniqueConnectionPlugin = findUniqueConnectionPlugin;
8686
8894
  exports.formatErrorMessage = formatErrorMessage;
8687
8895
  exports.generateEventId = generateEventId;
8896
+ exports.getActionInputFieldsSchemaPlugin = getActionInputFieldsSchemaPlugin;
8688
8897
  exports.getActionPlugin = getActionPlugin;
8689
8898
  exports.getAppPlugin = getAppPlugin;
8690
8899
  exports.getBaseUrlFromCredentials = getBaseUrlFromCredentials;
@@ -8718,11 +8927,12 @@ exports.isCredentialsFunction = isCredentialsFunction;
8718
8927
  exports.isCredentialsObject = isCredentialsObject;
8719
8928
  exports.isPkceCredentials = isPkceCredentials;
8720
8929
  exports.isPositional = isPositional;
8930
+ exports.listActionInputFieldChoicesPlugin = listActionInputFieldChoicesPlugin;
8931
+ exports.listActionInputFieldsPlugin = listActionInputFieldsPlugin;
8721
8932
  exports.listActionsPlugin = listActionsPlugin;
8722
8933
  exports.listAppsPlugin = listAppsPlugin;
8723
8934
  exports.listClientCredentialsPlugin = listClientCredentialsPlugin;
8724
8935
  exports.listConnectionsPlugin = listConnectionsPlugin;
8725
- exports.listInputFieldsPlugin = listInputFieldsPlugin;
8726
8936
  exports.listTableFieldsPlugin = listTableFieldsPlugin;
8727
8937
  exports.listTableRecordsPlugin = listTableRecordsPlugin;
8728
8938
  exports.listTablesPlugin = listTablesPlugin;
@@ -8749,4 +8959,5 @@ exports.tableSortResolver = tableSortResolver;
8749
8959
  exports.tableUpdateRecordsResolver = tableUpdateRecordsResolver;
8750
8960
  exports.toSnakeCase = toSnakeCase;
8751
8961
  exports.toTitleCase = toTitleCase;
8962
+ exports.triggerInboxResolver = triggerInboxResolver;
8752
8963
  exports.updateTableRecordsPlugin = updateTableRecordsPlugin;