@zapier/zapier-sdk 0.56.0 → 0.56.2
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 +3 -3
- package/dist/experimental.cjs +3 -3
- package/dist/experimental.mjs +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/plugins/triggers/drainTriggerInbox/schemas.js +1 -1
- package/dist/plugins/triggers/ensureTriggerInbox/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.56.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 884d0fc: Update ensureTriggerInbox to use new PUT endpoint in upstream Trigger Inbox API
|
|
8
|
+
|
|
9
|
+
## 0.56.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- cc0c9cf: Clarified the `releaseOnError` option description for `drainTriggerInbox` and `consumeTriggerInbox`: errors release the message when the drain finishes, not immediately.
|
|
14
|
+
|
|
3
15
|
## 0.56.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1794,7 +1794,7 @@ const result = await zapier.updateTableRecords({
|
|
|
1794
1794
|
|
|
1795
1795
|
### Triggers (Experimental)
|
|
1796
1796
|
|
|
1797
|
-
>
|
|
1797
|
+
> ℹ️ **Experimental.** Import from `"@zapier/zapier-sdk/experimental"` to use these methods. Methods and behavior may change.
|
|
1798
1798
|
|
|
1799
1799
|
#### `ackTriggerInboxMessages` 🧪 _experimental_
|
|
1800
1800
|
|
|
@@ -1925,7 +1925,7 @@ Drain an existing trigger inbox: lease currently-available messages, process eac
|
|
|
1925
1925
|
| ↳ `concurrency` | `number` | ❌ | — | — | Per-message handler workers running in parallel. Defaults to `leaseLimit`, or 1 if neither is set. |
|
|
1926
1926
|
| ↳ `leaseLimit` | `number` | ❌ | — | — | Per-lease HTTP batch size. Defaults to `concurrency`, or 1 if neither is set. |
|
|
1927
1927
|
| ↳ `leaseSeconds` | `number` | ❌ | — | — | Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes). |
|
|
1928
|
-
| ↳ `releaseOnError` | `boolean` | ❌ | — | — | If true, errors
|
|
1928
|
+
| ↳ `releaseOnError` | `boolean` | ❌ | — | — | If true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless. |
|
|
1929
1929
|
| ↳ `continueOnError` | `boolean` | ❌ | — | — | 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. |
|
|
1930
1930
|
| ↳ `onError` | `function` | ❌ | — | — | 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. |
|
|
1931
1931
|
| ↳ `signal` | `any` | ❌ | — | — | Abort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject. |
|
|
@@ -2560,7 +2560,7 @@ Continuously consume a trigger inbox: drain currently-available messages via onM
|
|
|
2560
2560
|
| ↳ `concurrency` | `number` | ❌ | — | — | Per-message handler workers running in parallel. Defaults to `leaseLimit`, or 1 if neither is set. |
|
|
2561
2561
|
| ↳ `leaseLimit` | `number` | ❌ | — | — | Per-lease HTTP batch size. Defaults to `concurrency`, or 1 if neither is set. |
|
|
2562
2562
|
| ↳ `leaseSeconds` | `number` | ❌ | — | — | Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes). |
|
|
2563
|
-
| ↳ `releaseOnError` | `boolean` | ❌ | — | — | If true, errors
|
|
2563
|
+
| ↳ `releaseOnError` | `boolean` | ❌ | — | — | If true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless. |
|
|
2564
2564
|
| ↳ `continueOnError` | `boolean` | ❌ | — | — | 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. |
|
|
2565
2565
|
| ↳ `onError` | `function` | ❌ | — | — | 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. |
|
|
2566
2566
|
| ↳ `signal` | `any` | ❌ | — | — | Abort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject. |
|
package/dist/experimental.cjs
CHANGED
|
@@ -2885,7 +2885,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
2885
2885
|
}
|
|
2886
2886
|
|
|
2887
2887
|
// src/sdk-version.ts
|
|
2888
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.
|
|
2888
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.2" : void 0) || "unknown";
|
|
2889
2889
|
|
|
2890
2890
|
// src/utils/open-url.ts
|
|
2891
2891
|
var nodePrefix = "node:";
|
|
@@ -9213,7 +9213,7 @@ var ensureTriggerInboxPlugin = definePlugin(
|
|
|
9213
9213
|
if (notificationUrl !== void 0) {
|
|
9214
9214
|
requestBody.notification_url = notificationUrl;
|
|
9215
9215
|
}
|
|
9216
|
-
const rawResponse = await api.
|
|
9216
|
+
const rawResponse = await api.put(
|
|
9217
9217
|
"/trigger-inbox/api/v1/inboxes",
|
|
9218
9218
|
requestBody,
|
|
9219
9219
|
{
|
|
@@ -9832,7 +9832,7 @@ var TriggerInboxCommandBaseSchema = zod.z.object({
|
|
|
9832
9832
|
),
|
|
9833
9833
|
leaseSeconds: LeaseSecondsPropertySchema.optional(),
|
|
9834
9834
|
releaseOnError: zod.z.boolean().optional().describe(
|
|
9835
|
-
"If true, errors
|
|
9835
|
+
"If true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless."
|
|
9836
9836
|
),
|
|
9837
9837
|
continueOnError: zod.z.boolean().optional().describe(
|
|
9838
9838
|
"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."
|
package/dist/experimental.mjs
CHANGED
|
@@ -2883,7 +2883,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
2883
2883
|
}
|
|
2884
2884
|
|
|
2885
2885
|
// src/sdk-version.ts
|
|
2886
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.
|
|
2886
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.2" : void 0) || "unknown";
|
|
2887
2887
|
|
|
2888
2888
|
// src/utils/open-url.ts
|
|
2889
2889
|
var nodePrefix = "node:";
|
|
@@ -9211,7 +9211,7 @@ var ensureTriggerInboxPlugin = definePlugin(
|
|
|
9211
9211
|
if (notificationUrl !== void 0) {
|
|
9212
9212
|
requestBody.notification_url = notificationUrl;
|
|
9213
9213
|
}
|
|
9214
|
-
const rawResponse = await api.
|
|
9214
|
+
const rawResponse = await api.put(
|
|
9215
9215
|
"/trigger-inbox/api/v1/inboxes",
|
|
9216
9216
|
requestBody,
|
|
9217
9217
|
{
|
|
@@ -9830,7 +9830,7 @@ var TriggerInboxCommandBaseSchema = z.object({
|
|
|
9830
9830
|
),
|
|
9831
9831
|
leaseSeconds: LeaseSecondsPropertySchema.optional(),
|
|
9832
9832
|
releaseOnError: z.boolean().optional().describe(
|
|
9833
|
-
"If true, errors
|
|
9833
|
+
"If true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless."
|
|
9834
9834
|
),
|
|
9835
9835
|
continueOnError: z.boolean().optional().describe(
|
|
9836
9836
|
"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."
|
package/dist/index.cjs
CHANGED
|
@@ -413,7 +413,7 @@ var TriggerInboxCommandBaseSchema = zod.z.object({
|
|
|
413
413
|
),
|
|
414
414
|
leaseSeconds: LeaseSecondsPropertySchema.optional(),
|
|
415
415
|
releaseOnError: zod.z.boolean().optional().describe(
|
|
416
|
-
"If true, errors
|
|
416
|
+
"If true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless."
|
|
417
417
|
),
|
|
418
418
|
continueOnError: zod.z.boolean().optional().describe(
|
|
419
419
|
"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."
|
|
@@ -6322,7 +6322,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
6322
6322
|
}
|
|
6323
6323
|
|
|
6324
6324
|
// src/sdk-version.ts
|
|
6325
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.
|
|
6325
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.2" : void 0) || "unknown";
|
|
6326
6326
|
|
|
6327
6327
|
// src/utils/open-url.ts
|
|
6328
6328
|
var nodePrefix = "node:";
|
package/dist/index.mjs
CHANGED
|
@@ -411,7 +411,7 @@ var TriggerInboxCommandBaseSchema = z.object({
|
|
|
411
411
|
),
|
|
412
412
|
leaseSeconds: LeaseSecondsPropertySchema.optional(),
|
|
413
413
|
releaseOnError: z.boolean().optional().describe(
|
|
414
|
-
"If true, errors
|
|
414
|
+
"If true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless."
|
|
415
415
|
),
|
|
416
416
|
continueOnError: z.boolean().optional().describe(
|
|
417
417
|
"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."
|
|
@@ -6320,7 +6320,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
6320
6320
|
}
|
|
6321
6321
|
|
|
6322
6322
|
// src/sdk-version.ts
|
|
6323
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.
|
|
6323
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.2" : void 0) || "unknown";
|
|
6324
6324
|
|
|
6325
6325
|
// src/utils/open-url.ts
|
|
6326
6326
|
var nodePrefix = "node:";
|
|
@@ -70,7 +70,7 @@ const TriggerInboxCommandBaseSchema = z.object({
|
|
|
70
70
|
releaseOnError: z
|
|
71
71
|
.boolean()
|
|
72
72
|
.optional()
|
|
73
|
-
.describe("If true, errors
|
|
73
|
+
.describe("If true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless."),
|
|
74
74
|
continueOnError: z
|
|
75
75
|
.boolean()
|
|
76
76
|
.optional()
|
|
@@ -46,7 +46,7 @@ export const ensureTriggerInboxPlugin = definePlugin((sdk) => createPluginMethod
|
|
|
46
46
|
if (notificationUrl !== undefined) {
|
|
47
47
|
requestBody.notification_url = notificationUrl;
|
|
48
48
|
}
|
|
49
|
-
const rawResponse = await api.
|
|
49
|
+
const rawResponse = await api.put("/trigger-inbox/api/v1/inboxes", requestBody, {
|
|
50
50
|
authRequired: true,
|
|
51
51
|
customErrorHandler: ({ status, data }) => {
|
|
52
52
|
if (status === 409) {
|