@zapier/zapier-sdk 0.69.3 → 0.70.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +12 -1
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/client.js +10 -1
  5. package/dist/api/error-classification.d.ts +7 -0
  6. package/dist/api/error-classification.d.ts.map +1 -1
  7. package/dist/api/error-classification.js +15 -2
  8. package/dist/api/index.d.ts +1 -1
  9. package/dist/api/index.d.ts.map +1 -1
  10. package/dist/api/sse-parser.d.ts +34 -0
  11. package/dist/api/sse-parser.d.ts.map +1 -1
  12. package/dist/api/sse-parser.js +28 -0
  13. package/dist/api/types.d.ts +9 -1
  14. package/dist/api/types.d.ts.map +1 -1
  15. package/dist/auth.d.ts.map +1 -1
  16. package/dist/auth.js +2 -2
  17. package/dist/experimental.cjs +152 -50
  18. package/dist/experimental.d.mts +12 -12
  19. package/dist/experimental.d.ts +10 -10
  20. package/dist/experimental.mjs +152 -50
  21. package/dist/{index-DuFFW71E.d.mts → index-DjLMJ3w8.d.mts} +36 -4
  22. package/dist/{index-DuFFW71E.d.ts → index-DjLMJ3w8.d.ts} +36 -4
  23. package/dist/index.cjs +32 -5
  24. package/dist/index.d.mts +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.mjs +32 -5
  28. package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +1 -1
  29. package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +1 -1
  30. package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +2 -1
  31. package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -1
  32. package/dist/plugins/codeSubstrate/createWorkflow/index.js +2 -1
  33. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -1
  34. package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +2 -1
  35. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +4 -0
  36. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +1 -1
  37. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +7 -0
  38. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -1
  39. package/dist/plugins/codeSubstrate/disableWorkflow/index.js +2 -1
  40. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -1
  41. package/dist/plugins/codeSubstrate/enableWorkflow/index.js +2 -1
  42. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +5 -5
  43. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts.map +1 -1
  44. package/dist/plugins/codeSubstrate/getDurableRun/index.js +2 -1
  45. package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +24 -24
  46. package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts.map +1 -1
  47. package/dist/plugins/codeSubstrate/getDurableRun/schemas.js +4 -9
  48. package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts +1 -1
  49. package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts.map +1 -1
  50. package/dist/plugins/codeSubstrate/listDurableRuns/index.js +6 -2
  51. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts +6 -6
  52. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts.map +1 -1
  53. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.js +2 -3
  54. package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +1 -1
  55. package/dist/plugins/codeSubstrate/runDurable/index.js +3 -2
  56. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -1
  57. package/dist/plugins/codeSubstrate/updateWorkflow/index.js +2 -1
  58. package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +4 -2
  59. package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +1 -1
  60. package/dist/plugins/triggers/drainTriggerInbox/index.js +39 -6
  61. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +4 -2
  62. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -1
  63. package/dist/plugins/triggers/watchTriggerInbox/index.js +100 -16
  64. package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts +8 -6
  65. package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts.map +1 -1
  66. package/dist/plugins/triggers/watchTriggerInbox/sse.js +11 -13
  67. package/package.json +1 -1
@@ -1016,6 +1016,9 @@ function isPositional(schema) {
1016
1016
  }
1017
1017
  return false;
1018
1018
  }
1019
+ function openEnum(values, description) {
1020
+ return zod.z.union([zod.z.enum(values), zod.z.string()]).describe(description);
1021
+ }
1019
1022
 
1020
1023
  // src/utils/logging.ts
1021
1024
  var { logDeprecation: logDeprecation2, resetDeprecationWarnings: resetDeprecationWarnings2 } = createDeprecationLogger("zapier-sdk");
@@ -2895,13 +2898,16 @@ async function exchangeClientCredentials(options) {
2895
2898
  },
2896
2899
  timestamp: Date.now()
2897
2900
  });
2898
- throw new Error(
2899
- `Client credentials exchange failed: ${response.status} ${response.statusText}`
2901
+ throw new ZapierAuthenticationError(
2902
+ `Client credentials exchange failed: ${response.status} ${response.statusText}`,
2903
+ { statusCode: response.status }
2900
2904
  );
2901
2905
  }
2902
2906
  const data = await response.json();
2903
2907
  if (!data.access_token) {
2904
- throw new Error("Client credentials response missing access_token");
2908
+ throw new ZapierAuthenticationError(
2909
+ "Client credentials response missing access_token"
2910
+ );
2905
2911
  }
2906
2912
  onEvent?.({
2907
2913
  type: "auth_success",
@@ -3124,6 +3130,17 @@ async function invalidateCredentialsToken(options) {
3124
3130
  }
3125
3131
 
3126
3132
  // src/api/sse-parser.ts
3133
+ async function* jsonFrames(source) {
3134
+ for await (const { data } of source) {
3135
+ let frame;
3136
+ try {
3137
+ frame = { parsed: true, data: JSON.parse(data), raw: data };
3138
+ } catch {
3139
+ frame = { parsed: false, data: null, raw: data };
3140
+ }
3141
+ yield frame;
3142
+ }
3143
+ }
3127
3144
  function createSseParserStream() {
3128
3145
  let buffer = "";
3129
3146
  let data = "";
@@ -3171,7 +3188,7 @@ function createSseParserStream() {
3171
3188
  }
3172
3189
 
3173
3190
  // src/sdk-version.ts
3174
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.69.3" : void 0) || "unknown";
3191
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.1" : void 0) || "unknown";
3175
3192
 
3176
3193
  // src/utils/open-url.ts
3177
3194
  var nodePrefix = "node:";
@@ -3546,6 +3563,15 @@ var ZapierApiClient = class {
3546
3563
  * never pins a slot — see `withSemaphore`.
3547
3564
  */
3548
3565
  this.fetchStream = (path, init) => this.streamSse(path, init);
3566
+ /**
3567
+ * Like `fetchStream`, but parses each frame's `data` as JSON. Diverges from
3568
+ * `fetchJson` deliberately: that throws on invalid JSON, but a long-lived
3569
+ * stream must survive a single malformed frame, so a parse failure is yielded
3570
+ * as `{ parsed: false, data: null, raw }` rather than thrown. A non-ok
3571
+ * response still throws the shared `ZapierError` (from `fetchStream`, before
3572
+ * any frame), so transport / auth failures surface as usual.
3573
+ */
3574
+ this.fetchJsonStream = (path, init) => jsonFrames(this.fetchStream(path, init));
3549
3575
  this.get = async (path, options = {}) => {
3550
3576
  return this.fetchJson("GET", path, void 0, options);
3551
3577
  };
@@ -3752,16 +3778,16 @@ var ZapierApiClient = class {
3752
3778
  if (typeof errorInfo.data === "string") {
3753
3779
  return { message: `${fallbackMessage}: ${errorInfo.data}` };
3754
3780
  }
3755
- const errorMessage = this.extractErrorMessage(errorInfo.data) || fallbackMessage;
3781
+ const errorMessage2 = this.extractErrorMessage(errorInfo.data) || fallbackMessage;
3756
3782
  if (this.hasErrorArray(errorInfo.data)) {
3757
3783
  if (this.isApiErrorArray(errorInfo.data.errors)) {
3758
3784
  return {
3759
- message: errorMessage,
3785
+ message: errorMessage2,
3760
3786
  errors: errorInfo.data.errors
3761
3787
  };
3762
3788
  } else {
3763
3789
  return {
3764
- message: errorMessage,
3790
+ message: errorMessage2,
3765
3791
  errors: errorInfo.data.errors.map((e) => ({
3766
3792
  status: errorInfo.status,
3767
3793
  code: String(errorInfo.status),
@@ -3771,7 +3797,7 @@ var ZapierApiClient = class {
3771
3797
  };
3772
3798
  }
3773
3799
  }
3774
- return { message: errorMessage };
3800
+ return { message: errorMessage2 };
3775
3801
  } catch {
3776
3802
  return { message: fallbackMessage };
3777
3803
  }
@@ -4111,7 +4137,11 @@ var createZapierApi = (options) => {
4111
4137
 
4112
4138
  // src/api/error-classification.ts
4113
4139
  function isPermanentHttpError(err) {
4114
- const statusCode = err instanceof ZapierError ? err.statusCode : void 0;
4140
+ if (!(err instanceof ZapierError)) return false;
4141
+ if (err instanceof ZapierAuthenticationError && err.statusCode === void 0) {
4142
+ return true;
4143
+ }
4144
+ const { statusCode } = err;
4115
4145
  return statusCode !== void 0 && statusCode >= 400 && statusCode < 500 && statusCode !== 429;
4116
4146
  }
4117
4147
 
@@ -6099,11 +6129,11 @@ var runActionPlugin = definePlugin(
6099
6129
  timeoutMs
6100
6130
  });
6101
6131
  if (result.errors && result.errors.length > 0) {
6102
- const errorMessage = result.errors.map(
6132
+ const errorMessage2 = result.errors.map(
6103
6133
  (error) => error.detail || error.title || "Unknown error"
6104
6134
  ).join("; ");
6105
6135
  throw new ZapierActionError(
6106
- `Action execution failed: ${errorMessage}`,
6136
+ `Action execution failed: ${errorMessage2}`,
6107
6137
  { appKey, actionKey }
6108
6138
  );
6109
6139
  }
@@ -9277,10 +9307,10 @@ var eventEmissionPlugin = definePlugin(
9277
9307
  registeredListeners.uncaughtException = uncaughtExceptionHandler;
9278
9308
  globalThis.process.on("uncaughtException", uncaughtExceptionHandler);
9279
9309
  const unhandledRejectionHandler = async (reason, promise) => {
9280
- const errorMessage = reason instanceof Error ? reason.message : typeof reason === "string" ? reason : "Unhandled promise rejection";
9310
+ const errorMessage2 = reason instanceof Error ? reason.message : typeof reason === "string" ? reason : "Unhandled promise rejection";
9281
9311
  const errorStack = reason instanceof Error ? reason.stack : null;
9282
9312
  let errorEvent = buildErrorEventWithContext({
9283
- error_message: errorMessage,
9313
+ error_message: errorMessage2,
9284
9314
  error_type: "UnhandledRejection",
9285
9315
  error_stack_trace: errorStack,
9286
9316
  error_severity: "critical",
@@ -10467,6 +10497,16 @@ async function runBatchedDrainPipeline(options) {
10467
10497
  }
10468
10498
 
10469
10499
  // src/plugins/triggers/drainTriggerInbox/index.ts
10500
+ var nonRetryableDrainErrors = /* @__PURE__ */ new WeakSet();
10501
+ function markNonRetryableDrainError(err) {
10502
+ if (typeof err === "object" && err !== null) {
10503
+ nonRetryableDrainErrors.add(err);
10504
+ }
10505
+ return err;
10506
+ }
10507
+ function isNonRetryableDrainError(err) {
10508
+ return typeof err === "object" && err !== null && nonRetryableDrainErrors.has(err);
10509
+ }
10470
10510
  function isLeaseExpiredError(err) {
10471
10511
  if (!(err instanceof ZapierValidationError)) return false;
10472
10512
  return err.errors?.some((e) => e.code === "lease_expired") ?? false;
@@ -10487,6 +10527,7 @@ async function runDrainPass(options) {
10487
10527
  } = options;
10488
10528
  let firstFetch = options.firstFetch;
10489
10529
  let abortedFromCallback = false;
10530
+ let handlerErrorCaptured = false;
10490
10531
  let firstHandlerError = void 0;
10491
10532
  const outcomes = await runBatchedDrainPipeline({
10492
10533
  concurrency,
@@ -10508,8 +10549,10 @@ async function runDrainPass(options) {
10508
10549
  }
10509
10550
  if (lease.results.length === 0) {
10510
10551
  if (firstFetch && lease.inbox_attributes.status === "initialization_failure") {
10511
- throw new ZapierApiError(
10512
- `Trigger inbox ${inboxId} is in initialization_failure state \u2014 inspect via getTriggerInbox.`
10552
+ throw markNonRetryableDrainError(
10553
+ new ZapierApiError(
10554
+ `Trigger inbox ${inboxId} is in initialization_failure state \u2014 inspect via getTriggerInbox.`
10555
+ )
10513
10556
  );
10514
10557
  }
10515
10558
  firstFetch = false;
@@ -10549,7 +10592,10 @@ async function runDrainPass(options) {
10549
10592
  }
10550
10593
  }
10551
10594
  if (!continueOnError && !(err instanceof ZapierSignal)) {
10552
- if (firstHandlerError === void 0) firstHandlerError = err;
10595
+ if (!handlerErrorCaptured) {
10596
+ firstHandlerError = err;
10597
+ handlerErrorCaptured = true;
10598
+ }
10553
10599
  abort = true;
10554
10600
  }
10555
10601
  return { value: message, action, abort };
@@ -10578,7 +10624,9 @@ async function runDrainPass(options) {
10578
10624
  }
10579
10625
  }
10580
10626
  });
10581
- if (firstHandlerError !== void 0) throw firstHandlerError;
10627
+ if (handlerErrorCaptured) {
10628
+ throw markNonRetryableDrainError(firstHandlerError);
10629
+ }
10582
10630
  return { abortedFromCallback, processed: outcomes.length };
10583
10631
  }
10584
10632
  function requireOnMessage(onMessage) {
@@ -10652,16 +10700,12 @@ async function* readInboxEvents({
10652
10700
  signal,
10653
10701
  onOpen
10654
10702
  }) {
10655
- for await (const message of api.fetchStream(
10703
+ for await (const message of api.fetchJsonStream(
10656
10704
  `/trigger-inbox/api/v1/inboxes/${encodeURIComponent(inboxId)}/events`,
10657
10705
  { method: "GET", signal, authRequired: true, onOpen }
10658
10706
  )) {
10659
- let parsed;
10660
- try {
10661
- parsed = JSON.parse(message.data);
10662
- } catch {
10663
- continue;
10664
- }
10707
+ if (!message.parsed) continue;
10708
+ const parsed = message.data;
10665
10709
  if (typeof parsed === "object" && parsed !== null && typeof parsed.inbox_id === "string" && // Only wake on a frame for this inbox. Case-insensitive: the endpoint
10666
10710
  // echoes the canonical lowercase UUID, but resolveTriggerInboxId passes
10667
10711
  // a UUID-shaped `inbox` through unchanged, so its casing may differ.
@@ -10675,6 +10719,7 @@ async function* readInboxEvents({
10675
10719
  var SSE_RECONNECT_BACKOFF_MS = [500, 1e3, 2e3, 5e3];
10676
10720
  var DEFAULT_SAFETY_DRAIN_INTERVAL_MS = 3e5;
10677
10721
  var SSE_HEALTHY_CONNECTION_MS = 5e3;
10722
+ var ERROR_BACKOFF_CAP = 4;
10678
10723
  function createDrainLatch() {
10679
10724
  let pending = false;
10680
10725
  const make = () => {
@@ -10705,9 +10750,14 @@ function createDrainLatch() {
10705
10750
  async function drainRunner({
10706
10751
  drainOptions,
10707
10752
  drainRequest,
10708
- signal
10753
+ signal,
10754
+ inboxId,
10755
+ debug
10709
10756
  }) {
10710
10757
  let firstFetch = true;
10758
+ let consecutiveErrors = 0;
10759
+ let errorAttempts = 0;
10760
+ let drainDegraded = false;
10711
10761
  while (!signal.aborted) {
10712
10762
  await drainRequest.waitForRequest();
10713
10763
  if (signal.aborted) return { kind: "aborted" };
@@ -10718,17 +10768,47 @@ async function drainRunner({
10718
10768
  firstFetch
10719
10769
  }));
10720
10770
  } catch (error) {
10721
- return { kind: "error", error };
10771
+ if (signal.aborted) return { kind: "aborted" };
10772
+ const isNonObjectThrow = typeof error !== "object" || error === null;
10773
+ if (isNonObjectThrow || isNonRetryableDrainError(error) || isPermanentHttpError(error)) {
10774
+ return { kind: "error", error };
10775
+ }
10776
+ consecutiveErrors = Math.min(consecutiveErrors + 1, ERROR_BACKOFF_CAP);
10777
+ errorAttempts += 1;
10778
+ const delay = calculateErrorBackoffMs(
10779
+ BASE_ERROR_BACKOFF_MS,
10780
+ consecutiveErrors
10781
+ );
10782
+ const statusCode = errorStatusCode(error);
10783
+ const httpPart = statusCode !== void 0 ? ` (HTTP ${statusCode})` : "";
10784
+ if (!drainDegraded && consecutiveErrors >= ERROR_BACKOFF_CAP) {
10785
+ console.warn(
10786
+ `[zapier-sdk] Draining inbox ${inboxId}${httpPart} is failing repeatedly: ${errorMessage(error)}. Continuing to retry with backoff.`
10787
+ );
10788
+ drainDegraded = true;
10789
+ }
10790
+ if (debug) {
10791
+ console.error(
10792
+ `[zapier-sdk] Retrying drain for inbox ${inboxId} (attempt ${errorAttempts}, retry in ${delay}ms)${httpPart}: ${errorMessage(error)}`
10793
+ );
10794
+ }
10795
+ await sleep(delay, signal);
10796
+ if (signal.aborted) return { kind: "aborted" };
10797
+ drainRequest.request();
10798
+ continue;
10722
10799
  }
10723
10800
  firstFetch = false;
10801
+ consecutiveErrors = 0;
10802
+ errorAttempts = 0;
10803
+ drainDegraded = false;
10724
10804
  if (abortedFromCallback) return { kind: "abortedFromCallback" };
10725
10805
  }
10726
10806
  return { kind: "aborted" };
10727
10807
  }
10728
- function sseErrorStatusCode(err) {
10808
+ function errorStatusCode(err) {
10729
10809
  return err instanceof ZapierError ? err.statusCode : void 0;
10730
10810
  }
10731
- function sseErrorMessage(err) {
10811
+ function errorMessage(err) {
10732
10812
  return err instanceof Error ? err.message : String(err);
10733
10813
  }
10734
10814
  async function sseLoop({
@@ -10769,8 +10849,8 @@ async function sseLoop({
10769
10849
  if (signal.aborted || isAbortError(err)) return;
10770
10850
  if (isPermanentHttpError(err)) {
10771
10851
  if (!degraded) {
10772
- const statusCode = sseErrorStatusCode(err);
10773
- const errorMsg = sseErrorMessage(err);
10852
+ const statusCode = errorStatusCode(err);
10853
+ const errorMsg = errorMessage(err);
10774
10854
  const httpPart = statusCode !== void 0 ? ` (HTTP ${statusCode})` : "";
10775
10855
  console.warn(
10776
10856
  `[zapier-sdk] Real-time wake-ups for inbox ${inboxId}${httpPart} paused: ${errorMsg}. Falling back to the periodic safety drain.`
@@ -10789,8 +10869,8 @@ async function sseLoop({
10789
10869
  const delay = SSE_RECONNECT_BACKOFF_MS[Math.min(attempt, SSE_RECONNECT_BACKOFF_MS.length - 1)];
10790
10870
  attempt = Math.min(attempt + 1, SSE_RECONNECT_BACKOFF_MS.length - 1);
10791
10871
  if (transientError !== void 0 && debug) {
10792
- const statusCode = sseErrorStatusCode(transientError);
10793
- const errorMsg = sseErrorMessage(transientError);
10872
+ const statusCode = errorStatusCode(transientError);
10873
+ const errorMsg = errorMessage(transientError);
10794
10874
  const httpPart = statusCode !== void 0 ? ` (HTTP ${statusCode})` : "";
10795
10875
  console.error(
10796
10876
  `[zapier-sdk] Reconnecting real-time wake-ups for inbox ${inboxId} (attempt ${attempt}, retry in ${delay}ms)${httpPart}: ${errorMsg}`
@@ -10850,7 +10930,13 @@ var watchTriggerInboxPlugin = definePlugin(
10850
10930
  signal
10851
10931
  };
10852
10932
  drainRequest.request();
10853
- const runnerDone = drainRunner({ drainOptions, drainRequest, signal });
10933
+ const runnerDone = drainRunner({
10934
+ drainOptions,
10935
+ drainRequest,
10936
+ signal,
10937
+ inboxId,
10938
+ debug
10939
+ });
10854
10940
  const sseDone = sseLoop({
10855
10941
  api: sdk.context.api,
10856
10942
  inboxId,
@@ -10883,7 +10969,7 @@ var watchTriggerInboxPlugin = definePlugin(
10883
10969
  watchTriggerInbox: {
10884
10970
  ...triggersDefaults,
10885
10971
  type: "create",
10886
- description: "Continuously consume a trigger inbox: drain currently-available messages via onMessage, then subscribe to SSE notifications for new arrivals until aborted. A periodic safety drain runs every maxDrainIntervalSeconds (default: 300) to guarantee forward progress if SSE events are missed. Resolves cleanly on signal abort or ZapierAbortDrainSignal from a handler; rejects on fatal SDK errors or fail-fast handler errors. Real-time wake-up health is reported on stderr: a warning when wake-ups pause and the watch falls back to the safety drain, plus (with debug) transient reconnect notices.",
10972
+ description: "Continuously consume a trigger inbox: drain currently-available messages via onMessage, then subscribe to SSE notifications for new arrivals until aborted. A periodic safety drain runs every maxDrainIntervalSeconds (default: 300) to guarantee forward progress if SSE events are missed. Resolves cleanly on signal abort or ZapierAbortDrainSignal from a handler. Transient drain failures (5xx, 429, network blips) retry indefinitely with bounded backoff until they succeed or the watch is aborted; it rejects on a fail-fast handler error, an initialization_failure, or a permanent HTTP error. Real-time wake-up health is reported on stderr: a warning when wake-ups pause and the watch falls back to the safety drain, plus (with debug) transient reconnect notices. Persistent drain failures likewise warn once on stderr while bounded-backoff retries continue.",
10887
10973
  itemType: "void",
10888
10974
  // See drainTriggerInbox: override the doc generator's default
10889
10975
  // suffix so the rendered return type is Promise<void>, not
@@ -11218,11 +11304,12 @@ var createWorkflowPlugin = definePlugin(
11218
11304
  if (options.is_private !== void 0) {
11219
11305
  body.is_private = options.is_private;
11220
11306
  }
11221
- const data = await sdk2.context.api.post(
11307
+ const raw = await sdk2.context.api.post(
11222
11308
  "/durableworkflowzaps/api/v0/workflows",
11223
11309
  body,
11224
11310
  { authRequired: true }
11225
11311
  );
11312
+ const data = CreateWorkflowResponseSchema.parse(raw);
11226
11313
  return { data };
11227
11314
  }
11228
11315
  })
@@ -11264,7 +11351,7 @@ var updateWorkflowPlugin = definePlugin(
11264
11351
  if (options.description !== void 0) {
11265
11352
  body.description = options.description;
11266
11353
  }
11267
- const data = await sdk2.context.api.patch(
11354
+ const raw = await sdk2.context.api.patch(
11268
11355
  `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
11269
11356
  body,
11270
11357
  {
@@ -11272,6 +11359,7 @@ var updateWorkflowPlugin = definePlugin(
11272
11359
  resource: { type: "workflow", id: options.workflow }
11273
11360
  }
11274
11361
  );
11362
+ const data = UpdateWorkflowResponseSchema.parse(raw);
11275
11363
  return { data };
11276
11364
  }
11277
11365
  })
@@ -11295,7 +11383,7 @@ var enableWorkflowPlugin = definePlugin(
11295
11383
  outputSchema: EnableWorkflowResponseSchema,
11296
11384
  resolvers: { workflow: workflowIdResolver },
11297
11385
  handler: async ({ sdk: sdk2, options }) => {
11298
- const data = await sdk2.context.api.post(
11386
+ const raw = await sdk2.context.api.post(
11299
11387
  `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`,
11300
11388
  void 0,
11301
11389
  {
@@ -11303,6 +11391,7 @@ var enableWorkflowPlugin = definePlugin(
11303
11391
  resource: { type: "workflow", id: options.workflow }
11304
11392
  }
11305
11393
  );
11394
+ const data = EnableWorkflowResponseSchema.parse(raw);
11306
11395
  return { data };
11307
11396
  }
11308
11397
  })
@@ -11328,7 +11417,7 @@ var disableWorkflowPlugin = definePlugin(
11328
11417
  outputSchema: DisableWorkflowResponseSchema,
11329
11418
  resolvers: { workflow: workflowIdResolver },
11330
11419
  handler: async ({ sdk: sdk2, options }) => {
11331
- const data = await sdk2.context.api.post(
11420
+ const raw = await sdk2.context.api.post(
11332
11421
  `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`,
11333
11422
  void 0,
11334
11423
  {
@@ -11336,6 +11425,7 @@ var disableWorkflowPlugin = definePlugin(
11336
11425
  resource: { type: "workflow", id: options.workflow }
11337
11426
  }
11338
11427
  );
11428
+ const data = DisableWorkflowResponseSchema.parse(raw);
11339
11429
  return { data };
11340
11430
  }
11341
11431
  })
@@ -11345,6 +11435,9 @@ var DeleteWorkflowOptionsSchema = zod.z.object({
11345
11435
  }).describe(
11346
11436
  "Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves."
11347
11437
  );
11438
+ var DeleteWorkflowResponseSchema = zod.z.object({
11439
+ id: zod.z.string().describe("Workflow ID that was targeted for deletion")
11440
+ });
11348
11441
 
11349
11442
  // src/plugins/codeSubstrate/deleteWorkflow/index.ts
11350
11443
  var deleteWorkflowPlugin = definePlugin(
@@ -11355,6 +11448,7 @@ var deleteWorkflowPlugin = definePlugin(
11355
11448
  itemType: "Workflow",
11356
11449
  confirm: "delete",
11357
11450
  inputSchema: DeleteWorkflowOptionsSchema,
11451
+ outputSchema: DeleteWorkflowResponseSchema,
11358
11452
  resolvers: { workflow: workflowIdResolver },
11359
11453
  handler: async ({ sdk: sdk2, options }) => {
11360
11454
  await sdk2.context.api.delete(
@@ -11369,7 +11463,8 @@ var deleteWorkflowPlugin = definePlugin(
11369
11463
  }
11370
11464
  })
11371
11465
  );
11372
- var RunStatusSchema = zod.z.enum(["initialized", "started", "finished", "failed", "cancelled"]).describe(
11466
+ var RunStatusSchema = openEnum(
11467
+ ["initialized", "started", "finished", "failed", "cancelled"],
11373
11468
  "Run lifecycle status. `finished` / `failed` / `cancelled` are terminal."
11374
11469
  );
11375
11470
  var RunErrorSchema = zod.z.object({
@@ -11402,7 +11497,7 @@ var ListDurableRunsOptionsSchema = zod.z.object({
11402
11497
  }).describe(
11403
11498
  "List run-once durable runs for the authenticated account, newest first"
11404
11499
  );
11405
- zod.z.object({
11500
+ var ListDurableRunsApiResponseSchema = zod.z.object({
11406
11501
  results: zod.z.array(RunItemSchema),
11407
11502
  meta: zod.z.object({
11408
11503
  limit: zod.z.number(),
@@ -11432,10 +11527,11 @@ var listDurableRunsPlugin = definePlugin(
11432
11527
  if (options.cursor) {
11433
11528
  searchParams.cursor = options.cursor;
11434
11529
  }
11435
- const response = await sdk2.context.api.get(
11436
- "/sdkdurableapi/api/v0/runs",
11437
- { searchParams, authRequired: true }
11438
- );
11530
+ const raw = await sdk2.context.api.get("/sdkdurableapi/api/v0/runs", {
11531
+ searchParams,
11532
+ authRequired: true
11533
+ });
11534
+ const response = ListDurableRunsApiResponseSchema.parse(raw);
11439
11535
  return {
11440
11536
  data: response.results,
11441
11537
  nextCursor: response.meta.next_cursor ?? void 0
@@ -11443,10 +11539,12 @@ var listDurableRunsPlugin = definePlugin(
11443
11539
  }
11444
11540
  })
11445
11541
  );
11446
- var OperationTypeSchema = zod.z.enum(["step", "wait", "callback"]).describe(
11542
+ var OperationTypeSchema = openEnum(
11543
+ ["step", "wait", "callback"],
11447
11544
  "Operation kind: `step` is a journaled function call; `wait` is a time-based suspension; `callback` is a wait on an external callback."
11448
11545
  );
11449
- var OperationStatusSchema = zod.z.enum(["pending", "completed", "failed", "exhausted"]).describe(
11546
+ var OperationStatusSchema = openEnum(
11547
+ ["pending", "completed", "failed", "exhausted"],
11450
11548
  "Operation lifecycle status. `exhausted` means retries were exceeded."
11451
11549
  );
11452
11550
  var OperationSchema = zod.z.object({
@@ -11474,7 +11572,8 @@ var OperationSchema = zod.z.object({
11474
11572
  completed_at: zod.z.string().optional().describe("When the operation reached a terminal state (ISO-8601)"),
11475
11573
  created_at: zod.z.string().describe("When the operation was created (ISO-8601)")
11476
11574
  });
11477
- var ExecutionStatusSchema = zod.z.enum(["running", "waiting", "completed", "failed"]).describe(
11575
+ var ExecutionStatusSchema = openEnum(
11576
+ ["running", "waiting", "completed", "failed"],
11478
11577
  "Execution lifecycle status. `waiting` means blocked on a wait or callback operation."
11479
11578
  );
11480
11579
  var ExecutionSummarySchema = zod.z.object({
@@ -11538,13 +11637,14 @@ var getDurableRunPlugin = definePlugin(
11538
11637
  outputSchema: GetDurableRunResponseSchema,
11539
11638
  resolvers: { run: durableRunIdResolver },
11540
11639
  handler: async ({ sdk: sdk2, options }) => {
11541
- const data = await sdk2.context.api.get(
11640
+ const raw = await sdk2.context.api.get(
11542
11641
  `/sdkdurableapi/api/v0/runs/${encodeURIComponent(options.run)}`,
11543
11642
  {
11544
11643
  authRequired: true,
11545
11644
  resource: { type: "run", id: options.run }
11546
11645
  }
11547
11646
  );
11647
+ const data = GetDurableRunResponseSchema.parse(raw);
11548
11648
  return { data };
11549
11649
  }
11550
11650
  })
@@ -11623,11 +11723,12 @@ var runDurablePlugin = definePlugin(
11623
11723
  if (options.private !== void 0) {
11624
11724
  body.is_private = options.private;
11625
11725
  }
11626
- const data = await sdk2.context.api.post(
11726
+ const raw = await sdk2.context.api.post(
11627
11727
  "/sdkdurableapi/api/v0/runs",
11628
11728
  body,
11629
11729
  { authRequired: true }
11630
11730
  );
11731
+ const data = RunDurableResponseSchema.parse(raw);
11631
11732
  return { data };
11632
11733
  }
11633
11734
  })
@@ -11637,7 +11738,7 @@ var CancelDurableRunOptionsSchema = zod.z.object({
11637
11738
  }).describe(
11638
11739
  "Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal."
11639
11740
  );
11640
- zod.z.object({
11741
+ var CancelDurableRunResponseSchema = zod.z.object({
11641
11742
  id: zod.z.string().describe("Run ID that was targeted"),
11642
11743
  status: zod.z.literal("cancelled").describe(
11643
11744
  "Always `cancelled` on a successful call. Synthesized client-side \u2014 the backend returns 204; callers needing the run's full state should follow up with getDurableRun."
@@ -11652,6 +11753,7 @@ var cancelDurableRunPlugin = definePlugin(
11652
11753
  type: "update",
11653
11754
  itemType: "DurableRun",
11654
11755
  inputSchema: CancelDurableRunOptionsSchema,
11756
+ outputSchema: CancelDurableRunResponseSchema,
11655
11757
  resolvers: { run: durableRunIdResolver },
11656
11758
  handler: async ({ sdk: sdk2, options }) => {
11657
11759
  await sdk2.context.api.post(
@@ -1,5 +1,5 @@
1
- import { B as BaseSdkOptions, P as PluginStack, a as PluginMeta, M as MethodHooks, C as CoreOptions, Z as ZapierSdkOptions$1, E as EventEmissionContext, A as ApiClient, b as Manifest, R as ResolvedAppLocator, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, d as AddActionEntryOptions, e as AddActionEntryResult, f as ActionEntry, g as findManifestEntry, r as readManifestFromFile, h as CapabilitiesContext, i as PaginatedSdkResult, F as FieldsetItem, j as PositionalMetadata, O as OutputFormatter, k as ZapierFetchInitOptions, D as DrainTriggerInboxOptions, l as DynamicResolver, W as WatchTriggerInboxOptions, m as ActionProxy, n as ZapierSdkApps, o as WithAddPlugin } from './index-DuFFW71E.mjs';
2
- export { x as Action, cb as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aP as ActionItem, bp as ActionKeyProperty, aZ as ActionKeyPropertySchema, bq as ActionProperty, a_ as ActionPropertySchema, aE as ActionResolverItem, bB as ActionTimeoutMsProperty, b9 as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bo as ActionTypeProperty, aY as ActionTypePropertySchema, c7 as ApiError, dB as ApiEvent, cV as ApiPluginOptions, cX as ApiPluginProvides, y as App, cc as AppFactoryInput, aN as AppItem, bm as AppKeyProperty, aW as AppKeyPropertySchema, bn as AppProperty, aX as AppPropertySchema, eK as ApplicationLifecycleEventData, c3 as ApprovalStatus, ca as AppsPluginProvides, bG as AppsProperty, be as AppsPropertySchema, a5 as ArrayResolver, dA as AuthEvent, bu as AuthenticationIdProperty, b1 as AuthenticationIdPropertySchema, eS as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cI as CONTEXT_CACHE_MAX_SIZE, cH as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dH as ClientCredentialsObject, dS as ClientCredentialsObjectSchema, V as Connection, d_ as ConnectionEntry, dZ as ConnectionEntrySchema, bs as ConnectionIdProperty, b0 as ConnectionIdPropertySchema, aO as ConnectionItem, bt as ConnectionProperty, b2 as ConnectionPropertySchema, e0 as ConnectionsMap, d$ as ConnectionsMapSchema, e2 as ConnectionsPluginProvides, bI as ConnectionsProperty, bg as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cu as CreateClientCredentialsPluginProvides, es as CreateTableFieldsPluginProvides, em as CreateTablePluginProvides, eA as CreateTableRecordsPluginProvides, dE as Credentials, dX as CredentialsFunction, dW as CredentialsFunctionSchema, dG as CredentialsObject, dU as CredentialsObjectSchema, dY as CredentialsSchema, e7 as DEFAULT_ACTION_TIMEOUT_MS, ef as DEFAULT_APPROVAL_TIMEOUT_MS, cR as DEFAULT_CONFIG_PATH, eg as DEFAULT_MAX_APPROVAL_RETRIES, e6 as DEFAULT_PAGE_SIZE, bz as DebugProperty, b7 as DebugPropertySchema, cw as DeleteClientCredentialsPluginProvides, eu as DeleteTableFieldsPluginProvides, eo as DeleteTablePluginProvides, eC as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, a8 as DynamicListResolver, a9 as DynamicSearchResolver, eL as EnhancedErrorEventData, bO as ErrorOptions, dD as EventCallback, eJ as EventContext, eG as EventEmissionConfig, eI as EventEmissionProvides, ce as FetchPluginProvides, z as Field, bF as FieldsProperty, bd as FieldsPropertySchema, aa as FieldsResolver, v as FindFirstAuthenticationPluginProvides, cE as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cG as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, co as GetActionInputFieldsSchemaPluginProvides, cA as GetActionPluginProvides, cy as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cC as GetConnectionPluginProvides, cU as GetProfilePluginProvides, ek as GetTablePluginProvides, ew as GetTableRecordPluginProvides, aR as InfoFieldItem, aQ as InputFieldItem, br as InputFieldProperty, a$ as InputFieldPropertySchema, bv as InputsProperty, b3 as InputsPropertySchema, bN as LeaseLimitProperty, bl as LeaseLimitPropertySchema, bL as LeaseProperty, bj as LeasePropertySchema, bM as LeaseSecondsProperty, bk as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bw as LimitProperty, b4 as LimitPropertySchema, cm as ListActionInputFieldChoicesPluginProvides, ck as ListActionInputFieldsPluginProvides, ci as ListActionsPluginProvides, cg as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, cs as ListClientCredentialsPluginProvides, cq as ListConnectionsPluginProvides, eq as ListTableFieldsPluginProvides, ey as ListTableRecordsPluginProvides, ei as ListTablesPluginProvides, dC as LoadingEvent, ea as MAX_CONCURRENCY_LIMIT, e5 as MAX_PAGE_LIMIT, cS as ManifestEntry, cN as ManifestPluginOptions, cQ as ManifestPluginProvides, eT as MethodCalledEvent, eM as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, bx as OffsetProperty, b5 as OffsetPropertySchema, by as OutputProperty, b6 as OutputPropertySchema, aV as PaginatedSdkFunction, bA as ParamsProperty, b8 as ParamsPropertySchema, dI as PkceCredentialsObject, dT as PkceCredentialsObjectSchema, ay as Plugin, az as PluginProvides, aI as PollOptions, c1 as RateLimitInfo, bD as RecordProperty, bb as RecordPropertySchema, bE as RecordsProperty, bc as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cM as RequestPluginProvides, dm as ResolveAuthTokenOptions, dN as ResolveCredentialsOptions, dF as ResolvedCredentials, dV as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aS as RootFieldItem, cK as RunActionPluginProvides, dz as SdkEvent, aU as SdkPage, aM as SseMessage, a7 as StaticResolver, bC as TableProperty, ba as TablePropertySchema, bH as TablesProperty, bf as TablesPropertySchema, bK as TriggerInboxNameProperty, bi as TriggerInboxNamePropertySchema, bJ as TriggerInboxProperty, bh as TriggerInboxPropertySchema, T as TriggerMessageStatus, eE as UpdateTableRecordsPluginProvides, Y as UserProfile, aT as UserProfileItem, e3 as ZAPIER_BASE_URL, ec as ZAPIER_MAX_CONCURRENT_REQUESTS, e8 as ZAPIER_MAX_NETWORK_RETRIES, e9 as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, b$ as ZapierActionError, bU as ZapierApiError, bV as ZapierAppNotFoundError, c4 as ZapierApprovalError, bS as ZapierAuthenticationError, bZ as ZapierBundleError, dv as ZapierCache, dw as ZapierCacheEntry, dx as ZapierCacheSetOptions, bY as ZapierConfigurationError, c0 as ZapierConflictError, bP as ZapierError, bW as ZapierNotFoundError, c2 as ZapierRateLimitError, c5 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bX as ZapierResourceNotFoundError, c8 as ZapierSignal, b_ as ZapierTimeoutError, bR as ZapierUnknownError, bQ as ZapierValidationError, c_ as actionKeyResolver, cZ as actionTypeResolver, a2 as addPlugin, cW as apiPlugin, cY as appKeyResolver, c9 as appsPlugin, d0 as authenticationIdGenericResolver, c$ as authenticationIdResolver, af as batch, eN as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eP as buildErrorEvent, eO as buildErrorEventWithContext, eR as buildMethodCalledEvent, eF as cleanupEventListeners, dn as clearTokenCache, d4 as clientCredentialsNameResolver, d5 as clientIdResolver, aD as composePlugins, d0 as connectionIdGenericResolver, c$ as connectionIdResolver, e1 as connectionsPlugin, eQ as createBaseEvent, ct as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dy as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, er as createTableFieldsPlugin, el as createTablePlugin, ez as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cv as deleteClientCredentialsPlugin, et as deleteTableFieldsPlugin, en as deleteTablePlugin, eB as deleteTableRecordsPlugin, d9 as durableRunIdResolver, eH as eventEmissionPlugin, cd as fetchPlugin, cD as findFirstConnectionPlugin, cF as findUniqueConnectionPlugin, c6 as formatErrorMessage, eU as generateEventId, cn as getActionInputFieldsSchemaPlugin, cz as getActionPlugin, cx as getAppPlugin, dQ as getBaseUrlFromCredentials, e_ as getCiPlatform, dR as getClientIdFromCredentials, cB as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f0 as getCpuTime, eV as getCurrentTimestamp, e$ as getMemoryUsage, aK as getOrCreateApiClient, eX as getOsInfo, eY as getPlatformVersions, cO as getPreferredManifestEntryKey, cT as getProfilePlugin, eW as getReleaseId, ej as getTablePlugin, ev as getTableRecordPlugin, ds as getTokenFromCliLogin, ed as getZapierApprovalMode, ee as getZapierDefaultApprovalMode, e4 as getZapierSdkService, dq as injectCliLogin, d3 as inputFieldKeyResolver, d2 as inputsAllOptionalResolver, d1 as inputsResolver, dp as invalidateCachedToken, du as invalidateCredentialsToken, eZ as isCi, dr as isCliLoginAvailable, dJ as isClientCredentials, at as isCoreError, dM as isCredentialsFunction, dL as isCredentialsObject, aL as isPermanentHttpError, dK as isPkceCredentials, _ as isPositional, cl as listActionInputFieldChoicesPlugin, cj as listActionInputFieldsPlugin, ch as listActionsPlugin, cf as listAppsPlugin, cr as listClientCredentialsPlugin, cp as listConnectionsPlugin, ep as listTableFieldsPlugin, ex as listTableRecordsPlugin, eh as listTablesPlugin, ai as logDeprecation, cP as manifestPlugin, eb as parseConcurrencyEnvVar, aG as registryPlugin, cL as requestPlugin, aj as resetDeprecationWarnings, dt as resolveAuthToken, dP as resolveCredentials, dO as resolveCredentialsFromEnv, cJ as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, df as tableFieldIdsResolver, dh as tableFieldsResolver, dk as tableFiltersResolver, d6 as tableIdResolver, dg as tableNameResolver, dd as tableRecordIdResolver, de as tableRecordIdsResolver, di as tableRecordsResolver, dl as tableSortResolver, dj as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d7 as triggerInboxResolver, dc as triggerMessagesResolver, eD as updateTableRecordsPlugin, d8 as workflowIdResolver, db as workflowRunIdResolver, da as workflowVersionIdResolver, bT as zapierAdaptError } from './index-DuFFW71E.mjs';
1
+ import { B as BaseSdkOptions, P as PluginStack, a as PluginMeta, M as MethodHooks, C as CoreOptions, Z as ZapierSdkOptions$1, E as EventEmissionContext, A as ApiClient, b as Manifest, R as ResolvedAppLocator, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, d as AddActionEntryOptions, e as AddActionEntryResult, f as ActionEntry, g as findManifestEntry, r as readManifestFromFile, h as CapabilitiesContext, i as PaginatedSdkResult, F as FieldsetItem, j as PositionalMetadata, O as OutputFormatter, k as ZapierFetchInitOptions, D as DrainTriggerInboxOptions, l as DynamicResolver, W as WatchTriggerInboxOptions, m as ActionProxy, n as ZapierSdkApps, o as WithAddPlugin } from './index-DjLMJ3w8.mjs';
2
+ export { x as Action, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, a8 as DynamicListResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, az as PluginProvides, aI as PollOptions, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-DjLMJ3w8.mjs';
3
3
  import * as zod_v4_core from 'zod/v4/core';
4
4
  import * as zod from 'zod';
5
5
  import '@zapier/zapier-sdk-core/v0/schemas/connections';
@@ -2676,7 +2676,7 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
2676
2676
  maxItems?: number;
2677
2677
  }) | undefined) => PaginatedSdkResult<{
2678
2678
  id: string;
2679
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
2679
+ status: string;
2680
2680
  input: unknown;
2681
2681
  output: unknown;
2682
2682
  error: {
@@ -2701,7 +2701,7 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
2701
2701
  } | undefined) => Promise<{
2702
2702
  data: {
2703
2703
  id: string;
2704
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
2704
+ status: string;
2705
2705
  input: unknown;
2706
2706
  output: unknown;
2707
2707
  error: {
@@ -2712,7 +2712,7 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
2712
2712
  execution: {
2713
2713
  id: string;
2714
2714
  name: string;
2715
- status: "failed" | "running" | "waiting" | "completed";
2715
+ status: string;
2716
2716
  input: unknown;
2717
2717
  created_at: string;
2718
2718
  output?: unknown;
@@ -2732,8 +2732,8 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
2732
2732
  id: string;
2733
2733
  execution_id: string;
2734
2734
  name: string;
2735
- type: "step" | "wait" | "callback";
2736
- status: "failed" | "completed" | "pending" | "exhausted";
2735
+ type: string;
2736
+ status: string;
2737
2737
  retry_count: number;
2738
2738
  created_at: string;
2739
2739
  result?: unknown;
@@ -5681,7 +5681,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
5681
5681
  maxItems?: number;
5682
5682
  }) | undefined) => PaginatedSdkResult<{
5683
5683
  id: string;
5684
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
5684
+ status: string;
5685
5685
  input: unknown;
5686
5686
  output: unknown;
5687
5687
  error: {
@@ -5706,7 +5706,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
5706
5706
  } | undefined) => Promise<{
5707
5707
  data: {
5708
5708
  id: string;
5709
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
5709
+ status: string;
5710
5710
  input: unknown;
5711
5711
  output: unknown;
5712
5712
  error: {
@@ -5717,7 +5717,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
5717
5717
  execution: {
5718
5718
  id: string;
5719
5719
  name: string;
5720
- status: "failed" | "running" | "waiting" | "completed";
5720
+ status: string;
5721
5721
  input: unknown;
5722
5722
  created_at: string;
5723
5723
  output?: unknown;
@@ -5737,8 +5737,8 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
5737
5737
  id: string;
5738
5738
  execution_id: string;
5739
5739
  name: string;
5740
- type: "step" | "wait" | "callback";
5741
- status: "failed" | "completed" | "pending" | "exhausted";
5740
+ type: string;
5741
+ status: string;
5742
5742
  retry_count: number;
5743
5743
  created_at: string;
5744
5744
  result?: unknown;