@zapier/zapier-sdk 0.69.2 → 0.70.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.
- package/CHANGELOG.md +34 -0
- package/README.md +33 -23
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +10 -1
- package/dist/api/error-classification.d.ts +7 -0
- package/dist/api/error-classification.d.ts.map +1 -1
- package/dist/api/error-classification.js +15 -2
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/sse-parser.d.ts +34 -0
- package/dist/api/sse-parser.d.ts.map +1 -1
- package/dist/api/sse-parser.js +28 -0
- package/dist/api/types.d.ts +9 -1
- package/dist/api/types.d.ts.map +1 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +2 -2
- package/dist/experimental.cjs +174 -35
- package/dist/experimental.d.mts +34 -2
- package/dist/experimental.d.ts +32 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.mjs +174 -35
- package/dist/{index-DuFFW71E.d.mts → index-C0bQ5snd.d.mts} +33 -1
- package/dist/{index-DuFFW71E.d.ts → index-C0bQ5snd.d.ts} +33 -1
- package/dist/index.cjs +32 -5
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +32 -5
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +3 -0
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/createWorkflow/index.js +3 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts +3 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.js +11 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +13 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.js +9 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts +13 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.js +52 -0
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +4 -2
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/drainTriggerInbox/index.js +39 -6
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +4 -2
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/watchTriggerInbox/index.js +100 -16
- package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts +8 -6
- package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts.map +1 -1
- package/dist/plugins/triggers/watchTriggerInbox/sse.js +11 -13
- package/package.json +1 -1
package/dist/experimental.cjs
CHANGED
|
@@ -2895,13 +2895,16 @@ async function exchangeClientCredentials(options) {
|
|
|
2895
2895
|
},
|
|
2896
2896
|
timestamp: Date.now()
|
|
2897
2897
|
});
|
|
2898
|
-
throw new
|
|
2899
|
-
`Client credentials exchange failed: ${response.status} ${response.statusText}
|
|
2898
|
+
throw new ZapierAuthenticationError(
|
|
2899
|
+
`Client credentials exchange failed: ${response.status} ${response.statusText}`,
|
|
2900
|
+
{ statusCode: response.status }
|
|
2900
2901
|
);
|
|
2901
2902
|
}
|
|
2902
2903
|
const data = await response.json();
|
|
2903
2904
|
if (!data.access_token) {
|
|
2904
|
-
throw new
|
|
2905
|
+
throw new ZapierAuthenticationError(
|
|
2906
|
+
"Client credentials response missing access_token"
|
|
2907
|
+
);
|
|
2905
2908
|
}
|
|
2906
2909
|
onEvent?.({
|
|
2907
2910
|
type: "auth_success",
|
|
@@ -3124,6 +3127,17 @@ async function invalidateCredentialsToken(options) {
|
|
|
3124
3127
|
}
|
|
3125
3128
|
|
|
3126
3129
|
// src/api/sse-parser.ts
|
|
3130
|
+
async function* jsonFrames(source) {
|
|
3131
|
+
for await (const { data } of source) {
|
|
3132
|
+
let frame;
|
|
3133
|
+
try {
|
|
3134
|
+
frame = { parsed: true, data: JSON.parse(data), raw: data };
|
|
3135
|
+
} catch {
|
|
3136
|
+
frame = { parsed: false, data: null, raw: data };
|
|
3137
|
+
}
|
|
3138
|
+
yield frame;
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3127
3141
|
function createSseParserStream() {
|
|
3128
3142
|
let buffer = "";
|
|
3129
3143
|
let data = "";
|
|
@@ -3171,7 +3185,7 @@ function createSseParserStream() {
|
|
|
3171
3185
|
}
|
|
3172
3186
|
|
|
3173
3187
|
// src/sdk-version.ts
|
|
3174
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
3188
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.0" : void 0) || "unknown";
|
|
3175
3189
|
|
|
3176
3190
|
// src/utils/open-url.ts
|
|
3177
3191
|
var nodePrefix = "node:";
|
|
@@ -3546,6 +3560,15 @@ var ZapierApiClient = class {
|
|
|
3546
3560
|
* never pins a slot — see `withSemaphore`.
|
|
3547
3561
|
*/
|
|
3548
3562
|
this.fetchStream = (path, init) => this.streamSse(path, init);
|
|
3563
|
+
/**
|
|
3564
|
+
* Like `fetchStream`, but parses each frame's `data` as JSON. Diverges from
|
|
3565
|
+
* `fetchJson` deliberately: that throws on invalid JSON, but a long-lived
|
|
3566
|
+
* stream must survive a single malformed frame, so a parse failure is yielded
|
|
3567
|
+
* as `{ parsed: false, data: null, raw }` rather than thrown. A non-ok
|
|
3568
|
+
* response still throws the shared `ZapierError` (from `fetchStream`, before
|
|
3569
|
+
* any frame), so transport / auth failures surface as usual.
|
|
3570
|
+
*/
|
|
3571
|
+
this.fetchJsonStream = (path, init) => jsonFrames(this.fetchStream(path, init));
|
|
3549
3572
|
this.get = async (path, options = {}) => {
|
|
3550
3573
|
return this.fetchJson("GET", path, void 0, options);
|
|
3551
3574
|
};
|
|
@@ -3752,16 +3775,16 @@ var ZapierApiClient = class {
|
|
|
3752
3775
|
if (typeof errorInfo.data === "string") {
|
|
3753
3776
|
return { message: `${fallbackMessage}: ${errorInfo.data}` };
|
|
3754
3777
|
}
|
|
3755
|
-
const
|
|
3778
|
+
const errorMessage2 = this.extractErrorMessage(errorInfo.data) || fallbackMessage;
|
|
3756
3779
|
if (this.hasErrorArray(errorInfo.data)) {
|
|
3757
3780
|
if (this.isApiErrorArray(errorInfo.data.errors)) {
|
|
3758
3781
|
return {
|
|
3759
|
-
message:
|
|
3782
|
+
message: errorMessage2,
|
|
3760
3783
|
errors: errorInfo.data.errors
|
|
3761
3784
|
};
|
|
3762
3785
|
} else {
|
|
3763
3786
|
return {
|
|
3764
|
-
message:
|
|
3787
|
+
message: errorMessage2,
|
|
3765
3788
|
errors: errorInfo.data.errors.map((e) => ({
|
|
3766
3789
|
status: errorInfo.status,
|
|
3767
3790
|
code: String(errorInfo.status),
|
|
@@ -3771,7 +3794,7 @@ var ZapierApiClient = class {
|
|
|
3771
3794
|
};
|
|
3772
3795
|
}
|
|
3773
3796
|
}
|
|
3774
|
-
return { message:
|
|
3797
|
+
return { message: errorMessage2 };
|
|
3775
3798
|
} catch {
|
|
3776
3799
|
return { message: fallbackMessage };
|
|
3777
3800
|
}
|
|
@@ -4111,7 +4134,11 @@ var createZapierApi = (options) => {
|
|
|
4111
4134
|
|
|
4112
4135
|
// src/api/error-classification.ts
|
|
4113
4136
|
function isPermanentHttpError(err) {
|
|
4114
|
-
|
|
4137
|
+
if (!(err instanceof ZapierError)) return false;
|
|
4138
|
+
if (err instanceof ZapierAuthenticationError && err.statusCode === void 0) {
|
|
4139
|
+
return true;
|
|
4140
|
+
}
|
|
4141
|
+
const { statusCode } = err;
|
|
4115
4142
|
return statusCode !== void 0 && statusCode >= 400 && statusCode < 500 && statusCode !== 429;
|
|
4116
4143
|
}
|
|
4117
4144
|
|
|
@@ -6099,11 +6126,11 @@ var runActionPlugin = definePlugin(
|
|
|
6099
6126
|
timeoutMs
|
|
6100
6127
|
});
|
|
6101
6128
|
if (result.errors && result.errors.length > 0) {
|
|
6102
|
-
const
|
|
6129
|
+
const errorMessage2 = result.errors.map(
|
|
6103
6130
|
(error) => error.detail || error.title || "Unknown error"
|
|
6104
6131
|
).join("; ");
|
|
6105
6132
|
throw new ZapierActionError(
|
|
6106
|
-
`Action execution failed: ${
|
|
6133
|
+
`Action execution failed: ${errorMessage2}`,
|
|
6107
6134
|
{ appKey, actionKey }
|
|
6108
6135
|
);
|
|
6109
6136
|
}
|
|
@@ -9277,10 +9304,10 @@ var eventEmissionPlugin = definePlugin(
|
|
|
9277
9304
|
registeredListeners.uncaughtException = uncaughtExceptionHandler;
|
|
9278
9305
|
globalThis.process.on("uncaughtException", uncaughtExceptionHandler);
|
|
9279
9306
|
const unhandledRejectionHandler = async (reason, promise) => {
|
|
9280
|
-
const
|
|
9307
|
+
const errorMessage2 = reason instanceof Error ? reason.message : typeof reason === "string" ? reason : "Unhandled promise rejection";
|
|
9281
9308
|
const errorStack = reason instanceof Error ? reason.stack : null;
|
|
9282
9309
|
let errorEvent = buildErrorEventWithContext({
|
|
9283
|
-
error_message:
|
|
9310
|
+
error_message: errorMessage2,
|
|
9284
9311
|
error_type: "UnhandledRejection",
|
|
9285
9312
|
error_stack_trace: errorStack,
|
|
9286
9313
|
error_severity: "critical",
|
|
@@ -10467,6 +10494,16 @@ async function runBatchedDrainPipeline(options) {
|
|
|
10467
10494
|
}
|
|
10468
10495
|
|
|
10469
10496
|
// src/plugins/triggers/drainTriggerInbox/index.ts
|
|
10497
|
+
var nonRetryableDrainErrors = /* @__PURE__ */ new WeakSet();
|
|
10498
|
+
function markNonRetryableDrainError(err) {
|
|
10499
|
+
if (typeof err === "object" && err !== null) {
|
|
10500
|
+
nonRetryableDrainErrors.add(err);
|
|
10501
|
+
}
|
|
10502
|
+
return err;
|
|
10503
|
+
}
|
|
10504
|
+
function isNonRetryableDrainError(err) {
|
|
10505
|
+
return typeof err === "object" && err !== null && nonRetryableDrainErrors.has(err);
|
|
10506
|
+
}
|
|
10470
10507
|
function isLeaseExpiredError(err) {
|
|
10471
10508
|
if (!(err instanceof ZapierValidationError)) return false;
|
|
10472
10509
|
return err.errors?.some((e) => e.code === "lease_expired") ?? false;
|
|
@@ -10487,6 +10524,7 @@ async function runDrainPass(options) {
|
|
|
10487
10524
|
} = options;
|
|
10488
10525
|
let firstFetch = options.firstFetch;
|
|
10489
10526
|
let abortedFromCallback = false;
|
|
10527
|
+
let handlerErrorCaptured = false;
|
|
10490
10528
|
let firstHandlerError = void 0;
|
|
10491
10529
|
const outcomes = await runBatchedDrainPipeline({
|
|
10492
10530
|
concurrency,
|
|
@@ -10508,8 +10546,10 @@ async function runDrainPass(options) {
|
|
|
10508
10546
|
}
|
|
10509
10547
|
if (lease.results.length === 0) {
|
|
10510
10548
|
if (firstFetch && lease.inbox_attributes.status === "initialization_failure") {
|
|
10511
|
-
throw
|
|
10512
|
-
|
|
10549
|
+
throw markNonRetryableDrainError(
|
|
10550
|
+
new ZapierApiError(
|
|
10551
|
+
`Trigger inbox ${inboxId} is in initialization_failure state \u2014 inspect via getTriggerInbox.`
|
|
10552
|
+
)
|
|
10513
10553
|
);
|
|
10514
10554
|
}
|
|
10515
10555
|
firstFetch = false;
|
|
@@ -10549,7 +10589,10 @@ async function runDrainPass(options) {
|
|
|
10549
10589
|
}
|
|
10550
10590
|
}
|
|
10551
10591
|
if (!continueOnError && !(err instanceof ZapierSignal)) {
|
|
10552
|
-
if (
|
|
10592
|
+
if (!handlerErrorCaptured) {
|
|
10593
|
+
firstHandlerError = err;
|
|
10594
|
+
handlerErrorCaptured = true;
|
|
10595
|
+
}
|
|
10553
10596
|
abort = true;
|
|
10554
10597
|
}
|
|
10555
10598
|
return { value: message, action, abort };
|
|
@@ -10578,7 +10621,9 @@ async function runDrainPass(options) {
|
|
|
10578
10621
|
}
|
|
10579
10622
|
}
|
|
10580
10623
|
});
|
|
10581
|
-
if (
|
|
10624
|
+
if (handlerErrorCaptured) {
|
|
10625
|
+
throw markNonRetryableDrainError(firstHandlerError);
|
|
10626
|
+
}
|
|
10582
10627
|
return { abortedFromCallback, processed: outcomes.length };
|
|
10583
10628
|
}
|
|
10584
10629
|
function requireOnMessage(onMessage) {
|
|
@@ -10652,16 +10697,12 @@ async function* readInboxEvents({
|
|
|
10652
10697
|
signal,
|
|
10653
10698
|
onOpen
|
|
10654
10699
|
}) {
|
|
10655
|
-
for await (const message of api.
|
|
10700
|
+
for await (const message of api.fetchJsonStream(
|
|
10656
10701
|
`/trigger-inbox/api/v1/inboxes/${encodeURIComponent(inboxId)}/events`,
|
|
10657
10702
|
{ method: "GET", signal, authRequired: true, onOpen }
|
|
10658
10703
|
)) {
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
parsed = JSON.parse(message.data);
|
|
10662
|
-
} catch {
|
|
10663
|
-
continue;
|
|
10664
|
-
}
|
|
10704
|
+
if (!message.parsed) continue;
|
|
10705
|
+
const parsed = message.data;
|
|
10665
10706
|
if (typeof parsed === "object" && parsed !== null && typeof parsed.inbox_id === "string" && // Only wake on a frame for this inbox. Case-insensitive: the endpoint
|
|
10666
10707
|
// echoes the canonical lowercase UUID, but resolveTriggerInboxId passes
|
|
10667
10708
|
// a UUID-shaped `inbox` through unchanged, so its casing may differ.
|
|
@@ -10675,6 +10716,7 @@ async function* readInboxEvents({
|
|
|
10675
10716
|
var SSE_RECONNECT_BACKOFF_MS = [500, 1e3, 2e3, 5e3];
|
|
10676
10717
|
var DEFAULT_SAFETY_DRAIN_INTERVAL_MS = 3e5;
|
|
10677
10718
|
var SSE_HEALTHY_CONNECTION_MS = 5e3;
|
|
10719
|
+
var ERROR_BACKOFF_CAP = 4;
|
|
10678
10720
|
function createDrainLatch() {
|
|
10679
10721
|
let pending = false;
|
|
10680
10722
|
const make = () => {
|
|
@@ -10705,9 +10747,14 @@ function createDrainLatch() {
|
|
|
10705
10747
|
async function drainRunner({
|
|
10706
10748
|
drainOptions,
|
|
10707
10749
|
drainRequest,
|
|
10708
|
-
signal
|
|
10750
|
+
signal,
|
|
10751
|
+
inboxId,
|
|
10752
|
+
debug
|
|
10709
10753
|
}) {
|
|
10710
10754
|
let firstFetch = true;
|
|
10755
|
+
let consecutiveErrors = 0;
|
|
10756
|
+
let errorAttempts = 0;
|
|
10757
|
+
let drainDegraded = false;
|
|
10711
10758
|
while (!signal.aborted) {
|
|
10712
10759
|
await drainRequest.waitForRequest();
|
|
10713
10760
|
if (signal.aborted) return { kind: "aborted" };
|
|
@@ -10718,17 +10765,47 @@ async function drainRunner({
|
|
|
10718
10765
|
firstFetch
|
|
10719
10766
|
}));
|
|
10720
10767
|
} catch (error) {
|
|
10721
|
-
return { kind: "
|
|
10768
|
+
if (signal.aborted) return { kind: "aborted" };
|
|
10769
|
+
const isNonObjectThrow = typeof error !== "object" || error === null;
|
|
10770
|
+
if (isNonObjectThrow || isNonRetryableDrainError(error) || isPermanentHttpError(error)) {
|
|
10771
|
+
return { kind: "error", error };
|
|
10772
|
+
}
|
|
10773
|
+
consecutiveErrors = Math.min(consecutiveErrors + 1, ERROR_BACKOFF_CAP);
|
|
10774
|
+
errorAttempts += 1;
|
|
10775
|
+
const delay = calculateErrorBackoffMs(
|
|
10776
|
+
BASE_ERROR_BACKOFF_MS,
|
|
10777
|
+
consecutiveErrors
|
|
10778
|
+
);
|
|
10779
|
+
const statusCode = errorStatusCode(error);
|
|
10780
|
+
const httpPart = statusCode !== void 0 ? ` (HTTP ${statusCode})` : "";
|
|
10781
|
+
if (!drainDegraded && consecutiveErrors >= ERROR_BACKOFF_CAP) {
|
|
10782
|
+
console.warn(
|
|
10783
|
+
`[zapier-sdk] Draining inbox ${inboxId}${httpPart} is failing repeatedly: ${errorMessage(error)}. Continuing to retry with backoff.`
|
|
10784
|
+
);
|
|
10785
|
+
drainDegraded = true;
|
|
10786
|
+
}
|
|
10787
|
+
if (debug) {
|
|
10788
|
+
console.error(
|
|
10789
|
+
`[zapier-sdk] Retrying drain for inbox ${inboxId} (attempt ${errorAttempts}, retry in ${delay}ms)${httpPart}: ${errorMessage(error)}`
|
|
10790
|
+
);
|
|
10791
|
+
}
|
|
10792
|
+
await sleep(delay, signal);
|
|
10793
|
+
if (signal.aborted) return { kind: "aborted" };
|
|
10794
|
+
drainRequest.request();
|
|
10795
|
+
continue;
|
|
10722
10796
|
}
|
|
10723
10797
|
firstFetch = false;
|
|
10798
|
+
consecutiveErrors = 0;
|
|
10799
|
+
errorAttempts = 0;
|
|
10800
|
+
drainDegraded = false;
|
|
10724
10801
|
if (abortedFromCallback) return { kind: "abortedFromCallback" };
|
|
10725
10802
|
}
|
|
10726
10803
|
return { kind: "aborted" };
|
|
10727
10804
|
}
|
|
10728
|
-
function
|
|
10805
|
+
function errorStatusCode(err) {
|
|
10729
10806
|
return err instanceof ZapierError ? err.statusCode : void 0;
|
|
10730
10807
|
}
|
|
10731
|
-
function
|
|
10808
|
+
function errorMessage(err) {
|
|
10732
10809
|
return err instanceof Error ? err.message : String(err);
|
|
10733
10810
|
}
|
|
10734
10811
|
async function sseLoop({
|
|
@@ -10769,8 +10846,8 @@ async function sseLoop({
|
|
|
10769
10846
|
if (signal.aborted || isAbortError(err)) return;
|
|
10770
10847
|
if (isPermanentHttpError(err)) {
|
|
10771
10848
|
if (!degraded) {
|
|
10772
|
-
const statusCode =
|
|
10773
|
-
const errorMsg =
|
|
10849
|
+
const statusCode = errorStatusCode(err);
|
|
10850
|
+
const errorMsg = errorMessage(err);
|
|
10774
10851
|
const httpPart = statusCode !== void 0 ? ` (HTTP ${statusCode})` : "";
|
|
10775
10852
|
console.warn(
|
|
10776
10853
|
`[zapier-sdk] Real-time wake-ups for inbox ${inboxId}${httpPart} paused: ${errorMsg}. Falling back to the periodic safety drain.`
|
|
@@ -10789,8 +10866,8 @@ async function sseLoop({
|
|
|
10789
10866
|
const delay = SSE_RECONNECT_BACKOFF_MS[Math.min(attempt, SSE_RECONNECT_BACKOFF_MS.length - 1)];
|
|
10790
10867
|
attempt = Math.min(attempt + 1, SSE_RECONNECT_BACKOFF_MS.length - 1);
|
|
10791
10868
|
if (transientError !== void 0 && debug) {
|
|
10792
|
-
const statusCode =
|
|
10793
|
-
const errorMsg =
|
|
10869
|
+
const statusCode = errorStatusCode(transientError);
|
|
10870
|
+
const errorMsg = errorMessage(transientError);
|
|
10794
10871
|
const httpPart = statusCode !== void 0 ? ` (HTTP ${statusCode})` : "";
|
|
10795
10872
|
console.error(
|
|
10796
10873
|
`[zapier-sdk] Reconnecting real-time wake-ups for inbox ${inboxId} (attempt ${attempt}, retry in ${delay}ms)${httpPart}: ${errorMsg}`
|
|
@@ -10850,7 +10927,13 @@ var watchTriggerInboxPlugin = definePlugin(
|
|
|
10850
10927
|
signal
|
|
10851
10928
|
};
|
|
10852
10929
|
drainRequest.request();
|
|
10853
|
-
const runnerDone = drainRunner({
|
|
10930
|
+
const runnerDone = drainRunner({
|
|
10931
|
+
drainOptions,
|
|
10932
|
+
drainRequest,
|
|
10933
|
+
signal,
|
|
10934
|
+
inboxId,
|
|
10935
|
+
debug
|
|
10936
|
+
});
|
|
10854
10937
|
const sseDone = sseLoop({
|
|
10855
10938
|
api: sdk.context.api,
|
|
10856
10939
|
inboxId,
|
|
@@ -10883,7 +10966,7 @@ var watchTriggerInboxPlugin = definePlugin(
|
|
|
10883
10966
|
watchTriggerInbox: {
|
|
10884
10967
|
...triggersDefaults,
|
|
10885
10968
|
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
|
|
10969
|
+
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
10970
|
itemType: "void",
|
|
10888
10971
|
// See drainTriggerInbox: override the doc generator's default
|
|
10889
10972
|
// suffix so the rendered return type is Promise<void>, not
|
|
@@ -11177,7 +11260,10 @@ var getWorkflowPlugin = definePlugin(
|
|
|
11177
11260
|
);
|
|
11178
11261
|
var CreateWorkflowOptionsSchema = zod.z.object({
|
|
11179
11262
|
name: zod.z.string().min(1).describe("Workflow name"),
|
|
11180
|
-
description: zod.z.string().optional().describe("Optional description for the workflow")
|
|
11263
|
+
description: zod.z.string().optional().describe("Optional description for the workflow"),
|
|
11264
|
+
is_private: zod.z.boolean().optional().describe(
|
|
11265
|
+
"If true, only the creating user can see or manage this workflow. Defaults to false (account-visible)."
|
|
11266
|
+
)
|
|
11181
11267
|
}).describe(
|
|
11182
11268
|
"Create a durable workflow container. Starts disabled with no version; publish a version to add code."
|
|
11183
11269
|
);
|
|
@@ -11191,6 +11277,10 @@ var CreateWorkflowResponseSchema = zod.z.object({
|
|
|
11191
11277
|
enabled: zod.z.boolean().describe(
|
|
11192
11278
|
"Whether the workflow currently accepts triggers. Always false on a new workflow until enabled."
|
|
11193
11279
|
),
|
|
11280
|
+
is_private: zod.z.boolean().describe(
|
|
11281
|
+
"Whether the workflow is private to the creating user. False means account-visible."
|
|
11282
|
+
),
|
|
11283
|
+
created_by_user_id: zod.z.string().nullable().describe("User ID of the workflow creator (null in legacy data)"),
|
|
11194
11284
|
created_at: zod.z.string().describe("When the workflow was created (ISO-8601)")
|
|
11195
11285
|
});
|
|
11196
11286
|
|
|
@@ -11208,6 +11298,9 @@ var createWorkflowPlugin = definePlugin(
|
|
|
11208
11298
|
if (options.description !== void 0) {
|
|
11209
11299
|
body.description = options.description;
|
|
11210
11300
|
}
|
|
11301
|
+
if (options.is_private !== void 0) {
|
|
11302
|
+
body.is_private = options.is_private;
|
|
11303
|
+
}
|
|
11211
11304
|
const data = await sdk2.context.api.post(
|
|
11212
11305
|
"/durableworkflowzaps/api/v0/workflows",
|
|
11213
11306
|
body,
|
|
@@ -11658,6 +11751,34 @@ var cancelDurableRunPlugin = definePlugin(
|
|
|
11658
11751
|
}
|
|
11659
11752
|
})
|
|
11660
11753
|
);
|
|
11754
|
+
var CONNECTION_ID_PATTERN = /^([1-9][0-9]*|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
11755
|
+
var ConnectionBindingSchema = zod.z.object({
|
|
11756
|
+
connection_id: zod.z.union([
|
|
11757
|
+
zod.z.number().int().positive(),
|
|
11758
|
+
zod.z.string().regex(
|
|
11759
|
+
CONNECTION_ID_PATTERN,
|
|
11760
|
+
"connection_id must be a positive integer string or UUID"
|
|
11761
|
+
)
|
|
11762
|
+
]).describe(
|
|
11763
|
+
"Zapier connection ID. Positive integer (legacy) or UUID string (newer)."
|
|
11764
|
+
)
|
|
11765
|
+
}).describe(
|
|
11766
|
+
"Connection binding: maps a single alias to a concrete connection."
|
|
11767
|
+
);
|
|
11768
|
+
var AppVersionBindingSchema = zod.z.object({
|
|
11769
|
+
implementation_name: zod.z.string().describe("App implementation identifier (e.g. 'SlackCLIAPI')"),
|
|
11770
|
+
version: zod.z.string().optional().describe("App implementation version (e.g. '1.27.1')")
|
|
11771
|
+
}).describe("App-version binding: maps a single alias to an app version.");
|
|
11772
|
+
var TriggerConfigSchema = zod.z.object({
|
|
11773
|
+
selected_api: zod.z.string().describe("Zapier app/API identifier (e.g. 'GoogleSheetsAPI')"),
|
|
11774
|
+
action: zod.z.string().describe("Trigger action key (e.g. 'new_row')"),
|
|
11775
|
+
authentication_id: zod.z.string().nullish().describe(
|
|
11776
|
+
"Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier)."
|
|
11777
|
+
),
|
|
11778
|
+
params: zod.z.record(zod.z.string(), zod.z.unknown()).optional().describe("Trigger parameters as a JSON object")
|
|
11779
|
+
}).describe(
|
|
11780
|
+
"Zapier trigger configuration. When set, the workflow subscribes to trigger events."
|
|
11781
|
+
);
|
|
11661
11782
|
var PublishWorkflowVersionOptionsSchema = zod.z.object({
|
|
11662
11783
|
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
11663
11784
|
source_files: zod.z.record(zod.z.string(), zod.z.string()).refine((files) => Object.keys(files).length > 0, {
|
|
@@ -11669,6 +11790,15 @@ var PublishWorkflowVersionOptionsSchema = zod.z.object({
|
|
|
11669
11790
|
),
|
|
11670
11791
|
enabled: zod.z.boolean().optional().describe(
|
|
11671
11792
|
"Enable the workflow after publishing. Defaults to true; pass false to publish without enabling."
|
|
11793
|
+
),
|
|
11794
|
+
connections: zod.z.record(zod.z.string(), ConnectionBindingSchema).nullish().describe(
|
|
11795
|
+
"Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding."
|
|
11796
|
+
),
|
|
11797
|
+
app_versions: zod.z.record(zod.z.string(), AppVersionBindingSchema).nullish().describe(
|
|
11798
|
+
"Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding."
|
|
11799
|
+
),
|
|
11800
|
+
trigger: TriggerConfigSchema.optional().describe(
|
|
11801
|
+
"Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows."
|
|
11672
11802
|
)
|
|
11673
11803
|
}).describe(
|
|
11674
11804
|
"Publish a new version of a durable workflow. Enables the workflow by default."
|
|
@@ -11708,6 +11838,15 @@ var publishWorkflowVersionPlugin = definePlugin(
|
|
|
11708
11838
|
if (options.enabled !== void 0) {
|
|
11709
11839
|
body.enabled = options.enabled;
|
|
11710
11840
|
}
|
|
11841
|
+
if (options.connections !== void 0) {
|
|
11842
|
+
body.connections = options.connections;
|
|
11843
|
+
}
|
|
11844
|
+
if (options.app_versions !== void 0) {
|
|
11845
|
+
body.app_versions = options.app_versions;
|
|
11846
|
+
}
|
|
11847
|
+
if (options.trigger !== void 0) {
|
|
11848
|
+
body.trigger = options.trigger;
|
|
11849
|
+
}
|
|
11711
11850
|
const raw = await sdk2.context.api.post(
|
|
11712
11851
|
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/versions`,
|
|
11713
11852
|
body,
|
package/dist/experimental.d.mts
CHANGED
|
@@ -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-
|
|
2
|
-
export { x as Action,
|
|
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-C0bQ5snd.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-C0bQ5snd.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';
|
|
@@ -2580,6 +2580,7 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
|
|
|
2580
2580
|
createWorkflow: (options?: {
|
|
2581
2581
|
name: string;
|
|
2582
2582
|
description?: string | undefined;
|
|
2583
|
+
is_private?: boolean | undefined;
|
|
2583
2584
|
} | undefined) => Promise<{
|
|
2584
2585
|
data: {
|
|
2585
2586
|
id: string;
|
|
@@ -2587,6 +2588,8 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
|
|
|
2587
2588
|
description: string | null;
|
|
2588
2589
|
trigger_url: string;
|
|
2589
2590
|
enabled: boolean;
|
|
2591
|
+
is_private: boolean;
|
|
2592
|
+
created_by_user_id: string | null;
|
|
2590
2593
|
created_at: string;
|
|
2591
2594
|
};
|
|
2592
2595
|
}>;
|
|
@@ -2806,6 +2809,19 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
|
|
|
2806
2809
|
dependencies?: Record<string, string> | undefined;
|
|
2807
2810
|
zapier_durable_version?: string | undefined;
|
|
2808
2811
|
enabled?: boolean | undefined;
|
|
2812
|
+
connections?: Record<string, {
|
|
2813
|
+
connection_id: string | number;
|
|
2814
|
+
}> | null | undefined;
|
|
2815
|
+
app_versions?: Record<string, {
|
|
2816
|
+
implementation_name: string;
|
|
2817
|
+
version?: string | undefined;
|
|
2818
|
+
}> | null | undefined;
|
|
2819
|
+
trigger?: {
|
|
2820
|
+
selected_api: string;
|
|
2821
|
+
action: string;
|
|
2822
|
+
authentication_id?: string | null | undefined;
|
|
2823
|
+
params?: Record<string, unknown> | undefined;
|
|
2824
|
+
} | undefined;
|
|
2809
2825
|
} | undefined) => Promise<{
|
|
2810
2826
|
data: {
|
|
2811
2827
|
id: string;
|
|
@@ -5569,6 +5585,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
|
|
|
5569
5585
|
createWorkflow: (options?: {
|
|
5570
5586
|
name: string;
|
|
5571
5587
|
description?: string | undefined;
|
|
5588
|
+
is_private?: boolean | undefined;
|
|
5572
5589
|
} | undefined) => Promise<{
|
|
5573
5590
|
data: {
|
|
5574
5591
|
id: string;
|
|
@@ -5576,6 +5593,8 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
|
|
|
5576
5593
|
description: string | null;
|
|
5577
5594
|
trigger_url: string;
|
|
5578
5595
|
enabled: boolean;
|
|
5596
|
+
is_private: boolean;
|
|
5597
|
+
created_by_user_id: string | null;
|
|
5579
5598
|
created_at: string;
|
|
5580
5599
|
};
|
|
5581
5600
|
}>;
|
|
@@ -5795,6 +5814,19 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
|
|
|
5795
5814
|
dependencies?: Record<string, string> | undefined;
|
|
5796
5815
|
zapier_durable_version?: string | undefined;
|
|
5797
5816
|
enabled?: boolean | undefined;
|
|
5817
|
+
connections?: Record<string, {
|
|
5818
|
+
connection_id: string | number;
|
|
5819
|
+
}> | null | undefined;
|
|
5820
|
+
app_versions?: Record<string, {
|
|
5821
|
+
implementation_name: string;
|
|
5822
|
+
version?: string | undefined;
|
|
5823
|
+
}> | null | undefined;
|
|
5824
|
+
trigger?: {
|
|
5825
|
+
selected_api: string;
|
|
5826
|
+
action: string;
|
|
5827
|
+
authentication_id?: string | null | undefined;
|
|
5828
|
+
params?: Record<string, unknown> | undefined;
|
|
5829
|
+
} | undefined;
|
|
5798
5830
|
} | undefined) => Promise<{
|
|
5799
5831
|
data: {
|
|
5800
5832
|
id: string;
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2595,6 +2595,7 @@ export declare function createZapierSdkStack(options?: ZapierSdkOptions): import
|
|
|
2595
2595
|
createWorkflow: (options?: {
|
|
2596
2596
|
name: string;
|
|
2597
2597
|
description?: string | undefined;
|
|
2598
|
+
is_private?: boolean | undefined;
|
|
2598
2599
|
} | undefined) => Promise<{
|
|
2599
2600
|
data: {
|
|
2600
2601
|
id: string;
|
|
@@ -2602,6 +2603,8 @@ export declare function createZapierSdkStack(options?: ZapierSdkOptions): import
|
|
|
2602
2603
|
description: string | null;
|
|
2603
2604
|
trigger_url: string;
|
|
2604
2605
|
enabled: boolean;
|
|
2606
|
+
is_private: boolean;
|
|
2607
|
+
created_by_user_id: string | null;
|
|
2605
2608
|
created_at: string;
|
|
2606
2609
|
};
|
|
2607
2610
|
}>;
|
|
@@ -2821,6 +2824,19 @@ export declare function createZapierSdkStack(options?: ZapierSdkOptions): import
|
|
|
2821
2824
|
dependencies?: Record<string, string> | undefined;
|
|
2822
2825
|
zapier_durable_version?: string | undefined;
|
|
2823
2826
|
enabled?: boolean | undefined;
|
|
2827
|
+
connections?: Record<string, {
|
|
2828
|
+
connection_id: string | number;
|
|
2829
|
+
}> | null | undefined;
|
|
2830
|
+
app_versions?: Record<string, {
|
|
2831
|
+
implementation_name: string;
|
|
2832
|
+
version?: string | undefined;
|
|
2833
|
+
}> | null | undefined;
|
|
2834
|
+
trigger?: {
|
|
2835
|
+
selected_api: string;
|
|
2836
|
+
action: string;
|
|
2837
|
+
authentication_id?: string | null | undefined;
|
|
2838
|
+
params?: Record<string, unknown> | undefined;
|
|
2839
|
+
} | undefined;
|
|
2824
2840
|
} | undefined) => Promise<{
|
|
2825
2841
|
data: {
|
|
2826
2842
|
id: string;
|
|
@@ -5584,6 +5600,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("kit
|
|
|
5584
5600
|
createWorkflow: (options?: {
|
|
5585
5601
|
name: string;
|
|
5586
5602
|
description?: string | undefined;
|
|
5603
|
+
is_private?: boolean | undefined;
|
|
5587
5604
|
} | undefined) => Promise<{
|
|
5588
5605
|
data: {
|
|
5589
5606
|
id: string;
|
|
@@ -5591,6 +5608,8 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("kit
|
|
|
5591
5608
|
description: string | null;
|
|
5592
5609
|
trigger_url: string;
|
|
5593
5610
|
enabled: boolean;
|
|
5611
|
+
is_private: boolean;
|
|
5612
|
+
created_by_user_id: string | null;
|
|
5594
5613
|
created_at: string;
|
|
5595
5614
|
};
|
|
5596
5615
|
}>;
|
|
@@ -5810,6 +5829,19 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("kit
|
|
|
5810
5829
|
dependencies?: Record<string, string> | undefined;
|
|
5811
5830
|
zapier_durable_version?: string | undefined;
|
|
5812
5831
|
enabled?: boolean | undefined;
|
|
5832
|
+
connections?: Record<string, {
|
|
5833
|
+
connection_id: string | number;
|
|
5834
|
+
}> | null | undefined;
|
|
5835
|
+
app_versions?: Record<string, {
|
|
5836
|
+
implementation_name: string;
|
|
5837
|
+
version?: string | undefined;
|
|
5838
|
+
}> | null | undefined;
|
|
5839
|
+
trigger?: {
|
|
5840
|
+
selected_api: string;
|
|
5841
|
+
action: string;
|
|
5842
|
+
authentication_id?: string | null | undefined;
|
|
5843
|
+
params?: Record<string, unknown> | undefined;
|
|
5844
|
+
} | undefined;
|
|
5813
5845
|
} | undefined) => Promise<{
|
|
5814
5846
|
data: {
|
|
5815
5847
|
id: string;
|