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