@zapier/zapier-sdk 0.68.0 → 0.69.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 (35) hide show
  1. package/AGENTS.md +321 -0
  2. package/CHANGELOG.md +15 -0
  3. package/CLAUDE.md +3 -319
  4. package/README.md +17 -17
  5. package/dist/api/client.d.ts.map +1 -1
  6. package/dist/api/client.js +108 -3
  7. package/dist/api/error-classification.d.ts +12 -0
  8. package/dist/api/error-classification.d.ts.map +1 -0
  9. package/dist/api/error-classification.js +18 -0
  10. package/dist/api/index.d.ts +2 -0
  11. package/dist/api/index.d.ts.map +1 -1
  12. package/dist/api/index.js +3 -0
  13. package/dist/api/sse-parser.d.ts +17 -0
  14. package/dist/api/sse-parser.d.ts.map +1 -0
  15. package/dist/api/sse-parser.js +67 -0
  16. package/dist/api/types.d.ts +16 -0
  17. package/dist/api/types.d.ts.map +1 -1
  18. package/dist/experimental.cjs +356 -67
  19. package/dist/experimental.d.mts +2 -2
  20. package/dist/experimental.mjs +356 -67
  21. package/dist/{index-oRnHsPn5.d.mts → index-DC31DAP2.d.mts} +20 -1
  22. package/dist/{index-oRnHsPn5.d.ts → index-DC31DAP2.d.ts} +20 -1
  23. package/dist/index.cjs +131 -7
  24. package/dist/index.d.mts +1 -1
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.mjs +131 -7
  28. package/dist/plugins/triggers/drainTriggerInbox/schemas.js +2 -2
  29. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +31 -6
  30. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -1
  31. package/dist/plugins/triggers/watchTriggerInbox/index.js +272 -65
  32. package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts +30 -0
  33. package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts.map +1 -0
  34. package/dist/plugins/triggers/watchTriggerInbox/sse.js +38 -0
  35. package/package.json +2 -1
@@ -3122,8 +3122,55 @@ async function invalidateCredentialsToken(options) {
3122
3122
  }
3123
3123
  }
3124
3124
 
3125
+ // src/api/sse-parser.ts
3126
+ function createSseParserStream() {
3127
+ let buffer = "";
3128
+ let data = "";
3129
+ let hasData = false;
3130
+ function processLine(line, controller) {
3131
+ if (line === "") {
3132
+ if (hasData) {
3133
+ controller.enqueue({
3134
+ data: data.endsWith("\n") ? data.slice(0, -1) : data
3135
+ });
3136
+ }
3137
+ data = "";
3138
+ hasData = false;
3139
+ return;
3140
+ }
3141
+ if (line.startsWith(":")) return;
3142
+ const colon = line.indexOf(":");
3143
+ const field = colon === -1 ? line : line.slice(0, colon);
3144
+ let value = colon === -1 ? "" : line.slice(colon + 1);
3145
+ if (value.startsWith(" ")) value = value.slice(1);
3146
+ if (field === "data") {
3147
+ data += value + "\n";
3148
+ hasData = true;
3149
+ }
3150
+ }
3151
+ return new TransformStream({
3152
+ transform(chunk, controller) {
3153
+ buffer += chunk;
3154
+ const newline = /\r\n|\r|\n/g;
3155
+ let start = 0;
3156
+ let match;
3157
+ while ((match = newline.exec(buffer)) !== null) {
3158
+ if (match[0] === "\r" && match.index === buffer.length - 1) break;
3159
+ processLine(buffer.slice(start, match.index), controller);
3160
+ start = match.index + match[0].length;
3161
+ }
3162
+ buffer = buffer.slice(start);
3163
+ },
3164
+ flush(controller) {
3165
+ if (buffer.endsWith("\r")) {
3166
+ processLine(buffer.slice(0, -1), controller);
3167
+ }
3168
+ }
3169
+ });
3170
+ }
3171
+
3125
3172
  // src/sdk-version.ts
3126
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.68.0" : void 0) || "unknown";
3173
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.69.0" : void 0) || "unknown";
3127
3174
 
3128
3175
  // src/utils/open-url.ts
3129
3176
  var nodePrefix = "node:";
@@ -3486,6 +3533,18 @@ var ZapierApiClient = class {
3486
3533
  { status: "max_retries_exceeded" }
3487
3534
  );
3488
3535
  };
3536
+ /**
3537
+ * Streaming counterpart to `fetch`. Opens a Server-Sent Events connection
3538
+ * through the same pipeline (auth, base URL, 429 retry, approval flow,
3539
+ * concurrency) and yields parsed `{ data }` frames. On a non-ok response it
3540
+ * throws the same `ZapierError` subclasses as the JSON path — callers
3541
+ * classify errors off `statusCode` instead of hand-rolling the mapping.
3542
+ *
3543
+ * The concurrency permit is released when the underlying `fetch` resolves
3544
+ * (headers received), not when the body finishes, so a long-lived stream
3545
+ * never pins a slot — see `withSemaphore`.
3546
+ */
3547
+ this.fetchStream = (path, init) => this.streamSse(path, init);
3489
3548
  this.get = async (path, options = {}) => {
3490
3549
  return this.fetchJson("GET", path, void 0, options);
3491
3550
  };
@@ -3560,17 +3619,30 @@ var ZapierApiClient = class {
3560
3619
  }
3561
3620
  // Helper to handle responses
3562
3621
  async handleResponse(params) {
3622
+ const { data: responseData } = await this.parseResult(
3623
+ params.response
3624
+ );
3625
+ if (params.response.ok) {
3626
+ return responseData;
3627
+ }
3628
+ return this.throwForErrorResponse({ ...params, responseData });
3629
+ }
3630
+ /**
3631
+ * Maps a non-ok response to the appropriate ZapierError subclass and throws.
3632
+ * Takes the already-parsed body so a streaming caller (`fetchStream`) gets
3633
+ * the exact same status→error classification as the JSON path without
3634
+ * re-reading — or reading on the success path, which would consume the
3635
+ * stream — the response body.
3636
+ */
3637
+ async throwForErrorResponse(params) {
3563
3638
  const {
3564
3639
  response,
3640
+ responseData,
3565
3641
  customErrorHandler,
3566
3642
  resource,
3567
3643
  wasMissingAuthToken,
3568
3644
  requiredScopes
3569
3645
  } = params;
3570
- const { data: responseData } = await this.parseResult(response);
3571
- if (response.ok) {
3572
- return responseData;
3573
- }
3574
3646
  const errorInfo = {
3575
3647
  status: response.status,
3576
3648
  statusText: response.statusText,
@@ -3807,6 +3879,58 @@ var ZapierApiClient = class {
3807
3879
  }
3808
3880
  return result;
3809
3881
  }
3882
+ // The generator body for `fetchStream`. Kept as a prototype method (not an
3883
+ // arrow class field, which can't be a generator) and exposed through the
3884
+ // bound `fetchStream` arrow above for parity with the other client methods.
3885
+ async *streamSse(path, init) {
3886
+ const { onOpen, headers: initHeaders, ...fetchInit } = init ?? {};
3887
+ const signal = fetchInit.signal;
3888
+ if (signal?.aborted) return;
3889
+ const wasMissingAuthToken = fetchInit.authRequired === true && await this.getAuthToken({
3890
+ requiredScopes: fetchInit.requiredScopes
3891
+ }) == null;
3892
+ const headers = new Headers(initHeaders);
3893
+ if (!headers.has("Accept")) headers.set("Accept", "text/event-stream");
3894
+ let response;
3895
+ try {
3896
+ response = await this.fetch(path, {
3897
+ ...fetchInit,
3898
+ method: fetchInit.method ?? "GET",
3899
+ headers
3900
+ });
3901
+ } catch (err) {
3902
+ if (signal?.aborted || isAbortError(err)) return;
3903
+ throw err;
3904
+ }
3905
+ if (!response.ok) {
3906
+ const { data } = await this.parseResult(response);
3907
+ await this.throwForErrorResponse({
3908
+ response,
3909
+ responseData: data,
3910
+ wasMissingAuthToken,
3911
+ requiredScopes: fetchInit.requiredScopes
3912
+ });
3913
+ }
3914
+ if (!response.body) return;
3915
+ const reader = response.body.pipeThrough(new TextDecoderStream()).pipeThrough(createSseParserStream()).getReader();
3916
+ const onAbort = () => {
3917
+ reader.cancel().catch(() => {
3918
+ });
3919
+ };
3920
+ try {
3921
+ onOpen?.();
3922
+ signal?.addEventListener("abort", onAbort, { once: true });
3923
+ while (!signal?.aborted) {
3924
+ const { done, value } = await reader.read();
3925
+ if (done || signal?.aborted) return;
3926
+ yield value;
3927
+ }
3928
+ } finally {
3929
+ signal?.removeEventListener("abort", onAbort);
3930
+ await reader.cancel().catch(() => {
3931
+ });
3932
+ }
3933
+ }
3810
3934
  /**
3811
3935
  * Run a single approval round: create the approval, open the URL (poll mode)
3812
3936
  * or throw (throw mode), poll until resolved, and emit events. Throws on
@@ -3984,6 +4108,12 @@ var createZapierApi = (options) => {
3984
4108
  });
3985
4109
  };
3986
4110
 
4111
+ // src/api/error-classification.ts
4112
+ function isPermanentHttpError(err) {
4113
+ const statusCode = err instanceof ZapierError ? err.statusCode : void 0;
4114
+ return statusCode !== void 0 && statusCode >= 400 && statusCode < 500 && statusCode !== 429;
4115
+ }
4116
+
3987
4117
  // src/api/index.ts
3988
4118
  function getOrCreateApiClient(config) {
3989
4119
  const {
@@ -10156,10 +10286,10 @@ var DrainTriggerInboxSchema = TriggerInboxCommandBaseSchema.extend({
10156
10286
  );
10157
10287
  var WatchTriggerInboxSchema = TriggerInboxCommandBaseSchema.extend({
10158
10288
  maxDrainIntervalSeconds: z.number().int().min(1).optional().describe(
10159
- "Maximum seconds between empty-inbox poll attempts (default: 60). Caps the back-off cadence."
10289
+ "Maximum seconds between safety drain attempts (default: 300). The watcher subscribes to SSE notifications for near-real-time wake-ups; this interval is the backstop that guarantees forward progress if SSE events are missed or the connection drops undetected."
10160
10290
  )
10161
10291
  }).describe(
10162
- "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."
10292
+ "Continuously consume a trigger inbox: drain currently-available messages, then subscribe to SSE notifications 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."
10163
10293
  );
10164
10294
 
10165
10295
  // src/plugins/triggers/drainTriggerInbox/pipeline.ts
@@ -10514,36 +10644,170 @@ var drainTriggerInboxPlugin = definePlugin(
10514
10644
  }
10515
10645
  );
10516
10646
 
10647
+ // src/plugins/triggers/watchTriggerInbox/sse.ts
10648
+ async function* readInboxEvents({
10649
+ api,
10650
+ inboxId,
10651
+ signal,
10652
+ onOpen
10653
+ }) {
10654
+ for await (const message of api.fetchStream(
10655
+ `/trigger-inbox/api/v1/inboxes/${encodeURIComponent(inboxId)}/events`,
10656
+ { method: "GET", signal, authRequired: true, onOpen }
10657
+ )) {
10658
+ let parsed;
10659
+ try {
10660
+ parsed = JSON.parse(message.data);
10661
+ } catch {
10662
+ continue;
10663
+ }
10664
+ if (typeof parsed === "object" && parsed !== null && typeof parsed.inbox_id === "string" && // Only wake on a frame for this inbox. Case-insensitive: the endpoint
10665
+ // echoes the canonical lowercase UUID, but resolveTriggerInboxId passes
10666
+ // a UUID-shaped `inbox` through unchanged, so its casing may differ.
10667
+ parsed.inbox_id.toLowerCase() === inboxId.toLowerCase()) {
10668
+ yield parsed;
10669
+ }
10670
+ }
10671
+ }
10672
+
10517
10673
  // src/plugins/triggers/watchTriggerInbox/index.ts
10518
- var POLL_STAGES = [
10519
- [125, 125],
10520
- [375, 250],
10521
- [875, 500],
10522
- [1e4, 1e3],
10523
- [3e4, 2500],
10524
- [6e4, 5e3],
10525
- [18e4, 1e4]
10526
- ];
10527
- var DEFAULT_MAX_DRAIN_INTERVAL_MS = 6e4;
10528
- function pickPollIntervalMs(elapsedMs, maxIntervalMs) {
10529
- const stage = POLL_STAGES.find(([threshold]) => elapsedMs < threshold);
10530
- const interval = stage ? stage[1] : maxIntervalMs;
10531
- return Math.min(interval, maxIntervalMs);
10532
- }
10533
- function sleepOrAbort(ms, signal) {
10534
- if (signal?.aborted) return Promise.resolve();
10535
- return new Promise((resolve2) => {
10536
- let settled = false;
10537
- const settle = () => {
10538
- if (settled) return;
10539
- settled = true;
10540
- clearTimeout(timer);
10541
- signal?.removeEventListener("abort", settle);
10542
- resolve2();
10543
- };
10544
- const timer = setTimeout(settle, ms);
10545
- signal?.addEventListener("abort", settle, { once: true });
10546
- });
10674
+ var SSE_RECONNECT_BACKOFF_MS = [500, 1e3, 2e3, 5e3];
10675
+ var DEFAULT_SAFETY_DRAIN_INTERVAL_MS = 3e5;
10676
+ var SSE_HEALTHY_CONNECTION_MS = 5e3;
10677
+ function createDrainLatch() {
10678
+ let pending = false;
10679
+ const make = () => {
10680
+ let resolve2;
10681
+ const promise = new Promise((r) => {
10682
+ resolve2 = r;
10683
+ });
10684
+ return { promise, resolve: resolve2 };
10685
+ };
10686
+ let current = make();
10687
+ return {
10688
+ request() {
10689
+ pending = true;
10690
+ const prev = current;
10691
+ current = make();
10692
+ prev.resolve();
10693
+ },
10694
+ async waitForRequest() {
10695
+ if (pending) {
10696
+ pending = false;
10697
+ return;
10698
+ }
10699
+ await current.promise;
10700
+ pending = false;
10701
+ }
10702
+ };
10703
+ }
10704
+ async function drainRunner({
10705
+ drainOptions,
10706
+ drainRequest,
10707
+ signal
10708
+ }) {
10709
+ let firstFetch = true;
10710
+ while (!signal.aborted) {
10711
+ await drainRequest.waitForRequest();
10712
+ if (signal.aborted) return { kind: "aborted" };
10713
+ let abortedFromCallback = false;
10714
+ try {
10715
+ ({ abortedFromCallback } = await runDrainPass({
10716
+ ...drainOptions,
10717
+ firstFetch
10718
+ }));
10719
+ } catch (error) {
10720
+ return { kind: "error", error };
10721
+ }
10722
+ firstFetch = false;
10723
+ if (abortedFromCallback) return { kind: "abortedFromCallback" };
10724
+ }
10725
+ return { kind: "aborted" };
10726
+ }
10727
+ function sseErrorStatusCode(err) {
10728
+ return err instanceof ZapierError ? err.statusCode : void 0;
10729
+ }
10730
+ function sseErrorMessage(err) {
10731
+ return err instanceof Error ? err.message : String(err);
10732
+ }
10733
+ async function sseLoop({
10734
+ api,
10735
+ inboxId,
10736
+ drainRequest,
10737
+ safetyDrainMs,
10738
+ signal,
10739
+ debug
10740
+ }) {
10741
+ let attempt = 0;
10742
+ let degraded = false;
10743
+ while (!signal.aborted) {
10744
+ let connected = false;
10745
+ let connectedAt = 0;
10746
+ let transientError;
10747
+ try {
10748
+ for await (const _event of readInboxEvents({
10749
+ api,
10750
+ inboxId,
10751
+ signal,
10752
+ // SSE is edge-triggered with no replay, so draining on connect is the
10753
+ // only way to pick up messages that arrived before this connection —
10754
+ // including the window left by a prior disconnect.
10755
+ onOpen: () => {
10756
+ connected = true;
10757
+ connectedAt = Date.now();
10758
+ degraded = false;
10759
+ drainRequest.request();
10760
+ }
10761
+ })) {
10762
+ drainRequest.request();
10763
+ }
10764
+ if (connected && Date.now() - connectedAt >= SSE_HEALTHY_CONNECTION_MS) {
10765
+ attempt = 0;
10766
+ }
10767
+ } catch (err) {
10768
+ if (signal.aborted || isAbortError(err)) return;
10769
+ if (isPermanentHttpError(err)) {
10770
+ if (!degraded) {
10771
+ const statusCode = sseErrorStatusCode(err);
10772
+ const errorMsg = sseErrorMessage(err);
10773
+ const httpPart = statusCode !== void 0 ? ` (HTTP ${statusCode})` : "";
10774
+ console.warn(
10775
+ `[zapier-sdk] Real-time wake-ups for inbox ${inboxId}${httpPart} paused: ${errorMsg}. Falling back to the periodic safety drain.`
10776
+ );
10777
+ degraded = true;
10778
+ }
10779
+ attempt = 0;
10780
+ if (signal.aborted) return;
10781
+ await sleep(safetyDrainMs, signal);
10782
+ continue;
10783
+ }
10784
+ if (connected) attempt = 0;
10785
+ transientError = err;
10786
+ }
10787
+ if (signal.aborted) return;
10788
+ const delay = SSE_RECONNECT_BACKOFF_MS[Math.min(attempt, SSE_RECONNECT_BACKOFF_MS.length - 1)];
10789
+ attempt = Math.min(attempt + 1, SSE_RECONNECT_BACKOFF_MS.length - 1);
10790
+ if (transientError !== void 0 && debug) {
10791
+ const statusCode = sseErrorStatusCode(transientError);
10792
+ const errorMsg = sseErrorMessage(transientError);
10793
+ const httpPart = statusCode !== void 0 ? ` (HTTP ${statusCode})` : "";
10794
+ console.error(
10795
+ `[zapier-sdk] Reconnecting real-time wake-ups for inbox ${inboxId} (attempt ${attempt}, retry in ${delay}ms)${httpPart}: ${errorMsg}`
10796
+ );
10797
+ }
10798
+ await sleep(delay, signal);
10799
+ }
10800
+ }
10801
+ async function safetyTimerLoop({
10802
+ safetyDrainMs,
10803
+ drainRequest,
10804
+ signal
10805
+ }) {
10806
+ while (!signal.aborted) {
10807
+ await sleep(safetyDrainMs, signal);
10808
+ if (signal.aborted) return;
10809
+ drainRequest.request();
10810
+ }
10547
10811
  }
10548
10812
  var watchTriggerInboxPlugin = definePlugin(
10549
10813
  (sdk) => {
@@ -10554,37 +10818,62 @@ var watchTriggerInboxPlugin = definePlugin(
10554
10818
  api: sdk.context.api,
10555
10819
  inbox: options.inbox
10556
10820
  });
10557
- const maxDrainIntervalMs = options.maxDrainIntervalSeconds !== void 0 ? options.maxDrainIntervalSeconds * 1e3 : DEFAULT_MAX_DRAIN_INTERVAL_MS;
10558
- let firstFetch = true;
10559
- let lastNonEmptyAt = Date.now();
10560
- while (!options.signal?.aborted) {
10561
- const outcome = await runDrainPass({
10562
- sdk,
10563
- inboxId,
10564
- onMessage,
10565
- concurrency,
10566
- leaseLimit,
10567
- leaseSeconds: options.leaseSeconds,
10568
- maxMessages: void 0,
10569
- releaseOnError: options.releaseOnError ?? false,
10570
- continueOnError: options.continueOnError ?? false,
10571
- onError: options.onError,
10572
- signal: options.signal,
10573
- firstFetch
10574
- });
10575
- firstFetch = false;
10576
- if (options.signal?.aborted) return;
10577
- if (outcome.abortedFromCallback) return;
10578
- if (outcome.processed > 0) {
10579
- lastNonEmptyAt = Date.now();
10580
- continue;
10581
- }
10582
- const elapsedMs = Date.now() - lastNonEmptyAt;
10583
- await sleepOrAbort(
10584
- pickPollIntervalMs(elapsedMs, maxDrainIntervalMs),
10585
- options.signal
10586
- );
10821
+ if (options.signal?.aborted) return;
10822
+ const safetyDrainMs = options.maxDrainIntervalSeconds !== void 0 ? options.maxDrainIntervalSeconds * 1e3 : DEFAULT_SAFETY_DRAIN_INTERVAL_MS;
10823
+ const stop = new AbortController();
10824
+ const combined = combineAbortSignals({
10825
+ handles: [
10826
+ ...options.signal ? [{ signal: options.signal, dispose: () => {
10827
+ } }] : [],
10828
+ { signal: stop.signal, dispose: () => {
10829
+ } }
10830
+ ]
10831
+ });
10832
+ const signal = combined?.signal ?? stop.signal;
10833
+ const drainRequest = createDrainLatch();
10834
+ signal.addEventListener("abort", () => drainRequest.request(), {
10835
+ once: true
10836
+ });
10837
+ const debug = sdk.context.options.debug === true;
10838
+ const drainOptions = {
10839
+ sdk,
10840
+ inboxId,
10841
+ onMessage,
10842
+ concurrency,
10843
+ leaseLimit,
10844
+ leaseSeconds: options.leaseSeconds,
10845
+ maxMessages: void 0,
10846
+ releaseOnError: options.releaseOnError ?? false,
10847
+ continueOnError: options.continueOnError ?? false,
10848
+ onError: options.onError,
10849
+ signal
10850
+ };
10851
+ drainRequest.request();
10852
+ const runnerDone = drainRunner({ drainOptions, drainRequest, signal });
10853
+ const sseDone = sseLoop({
10854
+ api: sdk.context.api,
10855
+ inboxId,
10856
+ drainRequest,
10857
+ safetyDrainMs,
10858
+ signal,
10859
+ debug
10860
+ }).catch(() => {
10861
+ });
10862
+ const safetyDone = safetyTimerLoop({
10863
+ safetyDrainMs,
10864
+ drainRequest,
10865
+ signal
10866
+ }).catch(() => {
10867
+ });
10868
+ let end;
10869
+ try {
10870
+ end = await runnerDone;
10871
+ } finally {
10872
+ stop.abort();
10873
+ await Promise.all([sseDone, safetyDone]);
10874
+ combined?.dispose();
10587
10875
  }
10876
+ if (end.kind === "error") throw end.error;
10588
10877
  }
10589
10878
  return {
10590
10879
  watchTriggerInbox,
@@ -10593,7 +10882,7 @@ var watchTriggerInboxPlugin = definePlugin(
10593
10882
  watchTriggerInbox: {
10594
10883
  ...triggersDefaults,
10595
10884
  type: "create",
10596
- description: "Continuously consume a trigger inbox: drain currently-available messages via onMessage, then poll with backoff for new arrivals, until aborted. Resolves cleanly on signal abort or ZapierAbortDrainSignal from a handler; rejects on fatal SDK errors or fail-fast handler errors.",
10885
+ 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.",
10597
10886
  itemType: "void",
10598
10887
  // See drainTriggerInbox: override the doc generator's default
10599
10888
  // suffix so the rendered return type is Promise<void>, not
@@ -2058,6 +2058,10 @@ interface ZapierCache {
2058
2058
  */
2059
2059
  declare function createMemoryCache(): ZapierCache;
2060
2060
 
2061
+ interface SseMessage {
2062
+ data: string;
2063
+ }
2064
+
2061
2065
  declare const NeedSchema: z.ZodObject<{
2062
2066
  key: z.ZodString;
2063
2067
  alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -2397,6 +2401,13 @@ interface ApiClientOptions {
2397
2401
  */
2398
2402
  cache?: ZapierCache;
2399
2403
  }
2404
+ interface FetchStreamInit extends RequestInit {
2405
+ searchParams?: Record<string, string>;
2406
+ authRequired?: boolean;
2407
+ requiredScopes?: string[];
2408
+ approvalContext?: () => RequestContext;
2409
+ onOpen?: () => void;
2410
+ }
2400
2411
  interface ApiClient {
2401
2412
  get: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
2402
2413
  post: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
@@ -2409,6 +2420,14 @@ interface ApiClient {
2409
2420
  authRequired?: boolean;
2410
2421
  approvalContext?: () => RequestContext;
2411
2422
  }) => Promise<Response>;
2423
+ /**
2424
+ * Opens a streaming (Server-Sent Events) request and yields parsed
2425
+ * `{ data }` frames. Runs the same pipeline as `fetch` (auth, base URL,
2426
+ * 429 retry, approval, concurrency) and throws the same `ZapierError`
2427
+ * subclasses on a non-ok response. `onOpen` fires once the connection is
2428
+ * live (response ok, body present) and before the first frame.
2429
+ */
2430
+ fetchStream: (path: string, init?: FetchStreamInit) => AsyncGenerator<SseMessage>;
2412
2431
  }
2413
2432
  interface RequestOptions {
2414
2433
  headers?: Record<string, string>;
@@ -15194,4 +15213,4 @@ declare const registryPlugin: (sdk: {
15194
15213
  };
15195
15214
  }) => {};
15196
15215
 
15197
- export { createFunction as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type Choice as H, type ActionExecutionResult as I, type ActionField as J, type ActionFieldChoice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type NeedsRequest as Q, type ResolvedAppLocator as R, type NeedsResponse as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type Connection as V, type WatchTriggerInboxOptions as W, type ConnectionsResponse as X, type UserProfile as Y, type ZapierSdkOptions as Z, isPositional as _, type PluginMeta as a, AuthenticationIdPropertySchema as a$, createPluginStack as a0, createCorePlugin as a1, addPlugin as a2, type FormattedItem as a3, type Resolver as a4, type ArrayResolver as a5, type ResolverMetadata as a6, type StaticResolver as a7, type DynamicListResolver as a8, type DynamicSearchResolver as a9, definePlugin as aA, createPluginMethod as aB, createPaginatedPluginMethod as aC, composePlugins as aD, type ActionItem as aE, type ActionTypeItem as aF, registryPlugin as aG, type RequestOptions as aH, type PollOptions as aI, createZapierApi as aJ, getOrCreateApiClient as aK, type AppItem as aL, type ConnectionItem as aM, type ActionItem$1 as aN, type InputFieldItem as aO, type InfoFieldItem as aP, type RootFieldItem as aQ, type UserProfileItem as aR, type SdkPage as aS, type PaginatedSdkFunction as aT, AppKeyPropertySchema as aU, AppPropertySchema as aV, ActionTypePropertySchema as aW, ActionKeyPropertySchema as aX, ActionPropertySchema as aY, InputFieldPropertySchema as aZ, ConnectionIdPropertySchema as a_, type FieldsResolver as aa, runInMethodScope as ab, runWithTelemetryContext as ac, toSnakeCase as ad, toTitleCase as ae, batch as af, type BatchOptions as ag, buildCapabilityMessage as ah, logDeprecation as ai, resetDeprecationWarnings as aj, RelayRequestSchema as ak, RelayFetchSchema as al, createZapierSdkWithoutRegistry as am, createSdk as an, createOptionsPlugin as ao, createZapierCoreStack as ap, type FunctionRegistryEntry as aq, type FunctionDeprecation as ar, BaseSdkOptionsSchema as as, isCoreError as at, getCoreErrorCode as au, getCoreErrorCause as av, CORE_ERROR_SYMBOL as aw, CoreErrorCode as ax, type Plugin as ay, type PluginProvides as az, type Manifest as b, type RateLimitInfo as b$, ConnectionPropertySchema as b0, InputsPropertySchema as b1, LimitPropertySchema as b2, OffsetPropertySchema as b3, OutputPropertySchema as b4, DebugPropertySchema as b5, ParamsPropertySchema as b6, ActionTimeoutMsPropertySchema as b7, TablePropertySchema as b8, RecordPropertySchema as b9, type TableProperty as bA, type RecordProperty as bB, type RecordsProperty as bC, type FieldsProperty as bD, type AppsProperty as bE, type TablesProperty as bF, type ConnectionsProperty as bG, type TriggerInboxProperty as bH, type TriggerInboxNameProperty as bI, type LeaseProperty as bJ, type LeaseSecondsProperty as bK, type LeaseLimitProperty as bL, type ErrorOptions as bM, ZapierError as bN, ZapierValidationError as bO, ZapierUnknownError as bP, ZapierAuthenticationError as bQ, zapierAdaptError as bR, ZapierApiError as bS, ZapierAppNotFoundError as bT, ZapierNotFoundError as bU, ZapierResourceNotFoundError as bV, ZapierConfigurationError as bW, ZapierBundleError as bX, ZapierTimeoutError as bY, ZapierActionError as bZ, ZapierConflictError as b_, RecordsPropertySchema as ba, FieldsPropertySchema as bb, AppsPropertySchema as bc, TablesPropertySchema as bd, ConnectionsPropertySchema as be, TriggerInboxPropertySchema as bf, TriggerInboxNamePropertySchema as bg, LeasePropertySchema as bh, LeaseSecondsPropertySchema as bi, LeaseLimitPropertySchema as bj, type AppKeyProperty as bk, type AppProperty as bl, type ActionTypeProperty as bm, type ActionKeyProperty as bn, type ActionProperty as bo, type InputFieldProperty as bp, type ConnectionIdProperty as bq, type ConnectionProperty as br, type AuthenticationIdProperty as bs, type InputsProperty as bt, type LimitProperty as bu, type OffsetProperty as bv, type OutputProperty as bw, type DebugProperty as bx, type ParamsProperty as by, type ActionTimeoutMsProperty as bz, type UpdateManifestEntryResult as c, inputsResolver as c$, ZapierRateLimitError as c0, type ApprovalStatus as c1, ZapierApprovalError as c2, ZapierRelayError as c3, formatErrorMessage as c4, type ApiError as c5, ZapierSignal as c6, appsPlugin as c7, type AppsPluginProvides as c8, type ActionExecutionOptions as c9, type GetConnectionPluginProvides as cA, findFirstConnectionPlugin as cB, type FindFirstConnectionPluginProvides as cC, findUniqueConnectionPlugin as cD, type FindUniqueConnectionPluginProvides as cE, CONTEXT_CACHE_TTL_MS as cF, CONTEXT_CACHE_MAX_SIZE as cG, runActionPlugin as cH, type RunActionPluginProvides as cI, requestPlugin as cJ, type RequestPluginProvides as cK, type ManifestPluginOptions as cL, getPreferredManifestEntryKey as cM, manifestPlugin as cN, type ManifestPluginProvides as cO, DEFAULT_CONFIG_PATH as cP, type ManifestEntry as cQ, getProfilePlugin as cR, type GetProfilePluginProvides as cS, type ApiPluginOptions as cT, apiPlugin as cU, type ApiPluginProvides as cV, appKeyResolver as cW, actionTypeResolver as cX, actionKeyResolver as cY, connectionIdResolver as cZ, connectionIdGenericResolver as c_, type AppFactoryInput as ca, fetchPlugin as cb, type FetchPluginProvides as cc, listAppsPlugin as cd, type ListAppsPluginProvides as ce, listActionsPlugin as cf, type ListActionsPluginProvides as cg, listActionInputFieldsPlugin as ch, type ListActionInputFieldsPluginProvides as ci, listActionInputFieldChoicesPlugin as cj, type ListActionInputFieldChoicesPluginProvides as ck, getActionInputFieldsSchemaPlugin as cl, type GetActionInputFieldsSchemaPluginProvides as cm, listConnectionsPlugin as cn, type ListConnectionsPluginProvides as co, listClientCredentialsPlugin as cp, type ListClientCredentialsPluginProvides as cq, createClientCredentialsPlugin as cr, type CreateClientCredentialsPluginProvides as cs, deleteClientCredentialsPlugin as ct, type DeleteClientCredentialsPluginProvides as cu, getAppPlugin as cv, type GetAppPluginProvides as cw, getActionPlugin as cx, type GetActionPluginProvides as cy, getConnectionPlugin as cz, type AddActionEntryOptions as d, connectionsPlugin as d$, inputsAllOptionalResolver as d0, inputFieldKeyResolver as d1, clientCredentialsNameResolver as d2, clientIdResolver as d3, tableIdResolver as d4, triggerInboxResolver as d5, workflowIdResolver as d6, durableRunIdResolver as d7, workflowVersionIdResolver as d8, workflowRunIdResolver as d9, type LoadingEvent as dA, type EventCallback as dB, type Credentials as dC, type ResolvedCredentials as dD, type CredentialsObject as dE, type ClientCredentialsObject as dF, type PkceCredentialsObject as dG, isClientCredentials as dH, isPkceCredentials as dI, isCredentialsObject as dJ, isCredentialsFunction as dK, type ResolveCredentialsOptions as dL, resolveCredentialsFromEnv as dM, resolveCredentials as dN, getBaseUrlFromCredentials as dO, getClientIdFromCredentials as dP, ClientCredentialsObjectSchema as dQ, PkceCredentialsObjectSchema as dR, CredentialsObjectSchema as dS, ResolvedCredentialsSchema as dT, CredentialsFunctionSchema as dU, type CredentialsFunction as dV, CredentialsSchema as dW, ConnectionEntrySchema as dX, type ConnectionEntry as dY, ConnectionsMapSchema as dZ, type ConnectionsMap as d_, triggerMessagesResolver as da, tableRecordIdResolver as db, tableRecordIdsResolver as dc, tableFieldIdsResolver as dd, tableNameResolver as de, tableFieldsResolver as df, tableRecordsResolver as dg, tableUpdateRecordsResolver as dh, tableFiltersResolver as di, tableSortResolver as dj, type ResolveAuthTokenOptions as dk, clearTokenCache as dl, invalidateCachedToken as dm, injectCliLogin as dn, isCliLoginAvailable as dp, getTokenFromCliLogin as dq, resolveAuthToken as dr, invalidateCredentialsToken as ds, type ZapierCache as dt, type ZapierCacheEntry as du, type ZapierCacheSetOptions as dv, createMemoryCache as dw, type SdkEvent as dx, type AuthEvent as dy, type ApiEvent as dz, type AddActionEntryResult as e, createZapierSdk as e$, type ConnectionsPluginProvides as e0, ZAPIER_BASE_URL as e1, getZapierSdkService as e2, MAX_PAGE_LIMIT as e3, DEFAULT_PAGE_SIZE as e4, DEFAULT_ACTION_TIMEOUT_MS as e5, ZAPIER_MAX_NETWORK_RETRIES as e6, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as e7, MAX_CONCURRENCY_LIMIT as e8, parseConcurrencyEnvVar as e9, type DeleteTableRecordsPluginProvides as eA, updateTableRecordsPlugin as eB, type UpdateTableRecordsPluginProvides as eC, cleanupEventListeners as eD, type EventEmissionConfig as eE, eventEmissionPlugin as eF, type EventEmissionProvides as eG, type EventContext as eH, type ApplicationLifecycleEventData as eI, type EnhancedErrorEventData as eJ, type MethodCalledEventData as eK, buildApplicationLifecycleEvent as eL, buildErrorEventWithContext as eM, buildErrorEvent as eN, createBaseEvent as eO, buildMethodCalledEvent as eP, type BaseEvent as eQ, type MethodCalledEvent as eR, generateEventId as eS, getCurrentTimestamp as eT, getReleaseId as eU, getOsInfo as eV, getPlatformVersions as eW, isCi as eX, getCiPlatform as eY, getMemoryUsage as eZ, getCpuTime as e_, ZAPIER_MAX_CONCURRENT_REQUESTS as ea, getZapierApprovalMode as eb, getZapierDefaultApprovalMode as ec, DEFAULT_APPROVAL_TIMEOUT_MS as ed, DEFAULT_MAX_APPROVAL_RETRIES as ee, listTablesPlugin as ef, type ListTablesPluginProvides as eg, getTablePlugin as eh, type GetTablePluginProvides as ei, createTablePlugin as ej, type CreateTablePluginProvides as ek, deleteTablePlugin as el, type DeleteTablePluginProvides as em, listTableFieldsPlugin as en, type ListTableFieldsPluginProvides as eo, createTableFieldsPlugin as ep, type CreateTableFieldsPluginProvides as eq, deleteTableFieldsPlugin as er, type DeleteTableFieldsPluginProvides as es, getTableRecordPlugin as et, type GetTableRecordPluginProvides as eu, listTableRecordsPlugin as ev, type ListTableRecordsPluginProvides as ew, createTableRecordsPlugin as ex, type CreateTableRecordsPluginProvides as ey, deleteTableRecordsPlugin as ez, type ActionEntry as f, createZapierSdkStack as f0, type ZapierSdk as f1, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type PositionalMetadata as j, type ZapierFetchInitOptions as k, type DynamicResolver as l, type ActionProxy as m, type ZapierSdkApps as n, type WithAddPlugin as o, ZapierAbortDrainSignal as p, ZapierReleaseTriggerMessageSignal as q, readManifestFromFile as r, type DrainTriggerInboxCallback as s, type DrainTriggerInboxErrorObserver as t, type ListAuthenticationsPluginProvides as u, type FindFirstAuthenticationPluginProvides as v, type FindUniqueAuthenticationPluginProvides as w, type Action as x, type App as y, type Field as z };
15216
+ export { createFunction as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type Choice as H, type ActionExecutionResult as I, type ActionField as J, type ActionFieldChoice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type NeedsRequest as Q, type ResolvedAppLocator as R, type NeedsResponse as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type Connection as V, type WatchTriggerInboxOptions as W, type ConnectionsResponse as X, type UserProfile as Y, type ZapierSdkOptions as Z, isPositional as _, type PluginMeta as a, ConnectionIdPropertySchema as a$, createPluginStack as a0, createCorePlugin as a1, addPlugin as a2, type FormattedItem as a3, type Resolver as a4, type ArrayResolver as a5, type ResolverMetadata as a6, type StaticResolver as a7, type DynamicListResolver as a8, type DynamicSearchResolver as a9, definePlugin as aA, createPluginMethod as aB, createPaginatedPluginMethod as aC, composePlugins as aD, type ActionItem as aE, type ActionTypeItem as aF, registryPlugin as aG, type RequestOptions as aH, type PollOptions as aI, createZapierApi as aJ, getOrCreateApiClient as aK, type SseMessage as aL, type AppItem as aM, type ConnectionItem as aN, type ActionItem$1 as aO, type InputFieldItem as aP, type InfoFieldItem as aQ, type RootFieldItem as aR, type UserProfileItem as aS, type SdkPage as aT, type PaginatedSdkFunction as aU, AppKeyPropertySchema as aV, AppPropertySchema as aW, ActionTypePropertySchema as aX, ActionKeyPropertySchema as aY, ActionPropertySchema as aZ, InputFieldPropertySchema as a_, type FieldsResolver as aa, runInMethodScope as ab, runWithTelemetryContext as ac, toSnakeCase as ad, toTitleCase as ae, batch as af, type BatchOptions as ag, buildCapabilityMessage as ah, logDeprecation as ai, resetDeprecationWarnings as aj, RelayRequestSchema as ak, RelayFetchSchema as al, createZapierSdkWithoutRegistry as am, createSdk as an, createOptionsPlugin as ao, createZapierCoreStack as ap, type FunctionRegistryEntry as aq, type FunctionDeprecation as ar, BaseSdkOptionsSchema as as, isCoreError as at, getCoreErrorCode as au, getCoreErrorCause as av, CORE_ERROR_SYMBOL as aw, CoreErrorCode as ax, type Plugin as ay, type PluginProvides as az, type Manifest as b, ZapierConflictError as b$, AuthenticationIdPropertySchema as b0, ConnectionPropertySchema as b1, InputsPropertySchema as b2, LimitPropertySchema as b3, OffsetPropertySchema as b4, OutputPropertySchema as b5, DebugPropertySchema as b6, ParamsPropertySchema as b7, ActionTimeoutMsPropertySchema as b8, TablePropertySchema as b9, type ActionTimeoutMsProperty as bA, type TableProperty as bB, type RecordProperty as bC, type RecordsProperty as bD, type FieldsProperty as bE, type AppsProperty as bF, type TablesProperty as bG, type ConnectionsProperty as bH, type TriggerInboxProperty as bI, type TriggerInboxNameProperty as bJ, type LeaseProperty as bK, type LeaseSecondsProperty as bL, type LeaseLimitProperty as bM, type ErrorOptions as bN, ZapierError as bO, ZapierValidationError as bP, ZapierUnknownError as bQ, ZapierAuthenticationError as bR, zapierAdaptError as bS, ZapierApiError as bT, ZapierAppNotFoundError as bU, ZapierNotFoundError as bV, ZapierResourceNotFoundError as bW, ZapierConfigurationError as bX, ZapierBundleError as bY, ZapierTimeoutError as bZ, ZapierActionError as b_, RecordPropertySchema as ba, RecordsPropertySchema as bb, FieldsPropertySchema as bc, AppsPropertySchema as bd, TablesPropertySchema as be, ConnectionsPropertySchema as bf, TriggerInboxPropertySchema as bg, TriggerInboxNamePropertySchema as bh, LeasePropertySchema as bi, LeaseSecondsPropertySchema as bj, LeaseLimitPropertySchema as bk, type AppKeyProperty as bl, type AppProperty as bm, type ActionTypeProperty as bn, type ActionKeyProperty as bo, type ActionProperty as bp, type InputFieldProperty as bq, type ConnectionIdProperty as br, type ConnectionProperty as bs, type AuthenticationIdProperty as bt, type InputsProperty as bu, type LimitProperty as bv, type OffsetProperty as bw, type OutputProperty as bx, type DebugProperty as by, type ParamsProperty as bz, type UpdateManifestEntryResult as c, connectionIdGenericResolver as c$, type RateLimitInfo as c0, ZapierRateLimitError as c1, type ApprovalStatus as c2, ZapierApprovalError as c3, ZapierRelayError as c4, formatErrorMessage as c5, type ApiError as c6, ZapierSignal as c7, appsPlugin as c8, type AppsPluginProvides as c9, getConnectionPlugin as cA, type GetConnectionPluginProvides as cB, findFirstConnectionPlugin as cC, type FindFirstConnectionPluginProvides as cD, findUniqueConnectionPlugin as cE, type FindUniqueConnectionPluginProvides as cF, CONTEXT_CACHE_TTL_MS as cG, CONTEXT_CACHE_MAX_SIZE as cH, runActionPlugin as cI, type RunActionPluginProvides as cJ, requestPlugin as cK, type RequestPluginProvides as cL, type ManifestPluginOptions as cM, getPreferredManifestEntryKey as cN, manifestPlugin as cO, type ManifestPluginProvides as cP, DEFAULT_CONFIG_PATH as cQ, type ManifestEntry as cR, getProfilePlugin as cS, type GetProfilePluginProvides as cT, type ApiPluginOptions as cU, apiPlugin as cV, type ApiPluginProvides as cW, appKeyResolver as cX, actionTypeResolver as cY, actionKeyResolver as cZ, connectionIdResolver as c_, type ActionExecutionOptions as ca, type AppFactoryInput as cb, fetchPlugin as cc, type FetchPluginProvides as cd, listAppsPlugin as ce, type ListAppsPluginProvides as cf, listActionsPlugin as cg, type ListActionsPluginProvides as ch, listActionInputFieldsPlugin as ci, type ListActionInputFieldsPluginProvides as cj, listActionInputFieldChoicesPlugin as ck, type ListActionInputFieldChoicesPluginProvides as cl, getActionInputFieldsSchemaPlugin as cm, type GetActionInputFieldsSchemaPluginProvides as cn, listConnectionsPlugin as co, type ListConnectionsPluginProvides as cp, listClientCredentialsPlugin as cq, type ListClientCredentialsPluginProvides as cr, createClientCredentialsPlugin as cs, type CreateClientCredentialsPluginProvides as ct, deleteClientCredentialsPlugin as cu, type DeleteClientCredentialsPluginProvides as cv, getAppPlugin as cw, type GetAppPluginProvides as cx, getActionPlugin as cy, type GetActionPluginProvides as cz, type AddActionEntryOptions as d, type ConnectionsMap as d$, inputsResolver as d0, inputsAllOptionalResolver as d1, inputFieldKeyResolver as d2, clientCredentialsNameResolver as d3, clientIdResolver as d4, tableIdResolver as d5, triggerInboxResolver as d6, workflowIdResolver as d7, durableRunIdResolver as d8, workflowVersionIdResolver as d9, type ApiEvent as dA, type LoadingEvent as dB, type EventCallback as dC, type Credentials as dD, type ResolvedCredentials as dE, type CredentialsObject as dF, type ClientCredentialsObject as dG, type PkceCredentialsObject as dH, isClientCredentials as dI, isPkceCredentials as dJ, isCredentialsObject as dK, isCredentialsFunction as dL, type ResolveCredentialsOptions as dM, resolveCredentialsFromEnv as dN, resolveCredentials as dO, getBaseUrlFromCredentials as dP, getClientIdFromCredentials as dQ, ClientCredentialsObjectSchema as dR, PkceCredentialsObjectSchema as dS, CredentialsObjectSchema as dT, ResolvedCredentialsSchema as dU, CredentialsFunctionSchema as dV, type CredentialsFunction as dW, CredentialsSchema as dX, ConnectionEntrySchema as dY, type ConnectionEntry as dZ, ConnectionsMapSchema as d_, workflowRunIdResolver as da, triggerMessagesResolver as db, tableRecordIdResolver as dc, tableRecordIdsResolver as dd, tableFieldIdsResolver as de, tableNameResolver as df, tableFieldsResolver as dg, tableRecordsResolver as dh, tableUpdateRecordsResolver as di, tableFiltersResolver as dj, tableSortResolver as dk, type ResolveAuthTokenOptions as dl, clearTokenCache as dm, invalidateCachedToken as dn, injectCliLogin as dp, isCliLoginAvailable as dq, getTokenFromCliLogin as dr, resolveAuthToken as ds, invalidateCredentialsToken as dt, type ZapierCache as du, type ZapierCacheEntry as dv, type ZapierCacheSetOptions as dw, createMemoryCache as dx, type SdkEvent as dy, type AuthEvent as dz, type AddActionEntryResult as e, getCpuTime as e$, connectionsPlugin as e0, type ConnectionsPluginProvides as e1, ZAPIER_BASE_URL as e2, getZapierSdkService as e3, MAX_PAGE_LIMIT as e4, DEFAULT_PAGE_SIZE as e5, DEFAULT_ACTION_TIMEOUT_MS as e6, ZAPIER_MAX_NETWORK_RETRIES as e7, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as e8, MAX_CONCURRENCY_LIMIT as e9, deleteTableRecordsPlugin as eA, type DeleteTableRecordsPluginProvides as eB, updateTableRecordsPlugin as eC, type UpdateTableRecordsPluginProvides as eD, cleanupEventListeners as eE, type EventEmissionConfig as eF, eventEmissionPlugin as eG, type EventEmissionProvides as eH, type EventContext as eI, type ApplicationLifecycleEventData as eJ, type EnhancedErrorEventData as eK, type MethodCalledEventData as eL, buildApplicationLifecycleEvent as eM, buildErrorEventWithContext as eN, buildErrorEvent as eO, createBaseEvent as eP, buildMethodCalledEvent as eQ, type BaseEvent as eR, type MethodCalledEvent as eS, generateEventId as eT, getCurrentTimestamp as eU, getReleaseId as eV, getOsInfo as eW, getPlatformVersions as eX, isCi as eY, getCiPlatform as eZ, getMemoryUsage as e_, parseConcurrencyEnvVar as ea, ZAPIER_MAX_CONCURRENT_REQUESTS as eb, getZapierApprovalMode as ec, getZapierDefaultApprovalMode as ed, DEFAULT_APPROVAL_TIMEOUT_MS as ee, DEFAULT_MAX_APPROVAL_RETRIES as ef, listTablesPlugin as eg, type ListTablesPluginProvides as eh, getTablePlugin as ei, type GetTablePluginProvides as ej, createTablePlugin as ek, type CreateTablePluginProvides as el, deleteTablePlugin as em, type DeleteTablePluginProvides as en, listTableFieldsPlugin as eo, type ListTableFieldsPluginProvides as ep, createTableFieldsPlugin as eq, type CreateTableFieldsPluginProvides as er, deleteTableFieldsPlugin as es, type DeleteTableFieldsPluginProvides as et, getTableRecordPlugin as eu, type GetTableRecordPluginProvides as ev, listTableRecordsPlugin as ew, type ListTableRecordsPluginProvides as ex, createTableRecordsPlugin as ey, type CreateTableRecordsPluginProvides as ez, type ActionEntry as f, createZapierSdk as f0, createZapierSdkStack as f1, type ZapierSdk as f2, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type PositionalMetadata as j, type ZapierFetchInitOptions as k, type DynamicResolver as l, type ActionProxy as m, type ZapierSdkApps as n, type WithAddPlugin as o, ZapierAbortDrainSignal as p, ZapierReleaseTriggerMessageSignal as q, readManifestFromFile as r, type DrainTriggerInboxCallback as s, type DrainTriggerInboxErrorObserver as t, type ListAuthenticationsPluginProvides as u, type FindFirstAuthenticationPluginProvides as v, type FindUniqueAuthenticationPluginProvides as w, type Action as x, type App as y, type Field as z };