@zapier/zapier-sdk 0.81.1 → 0.82.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 +6 -0
- package/README.md +38 -40
- package/dist/experimental.cjs +3445 -3446
- package/dist/experimental.d.mts +2 -6
- package/dist/experimental.d.ts +2 -6
- package/dist/experimental.mjs +3445 -3446
- package/dist/{index-CWi_XjB4.d.mts → index-BEIqfOJR.d.mts} +3352 -1519
- package/dist/{index-CWi_XjB4.d.ts → index-BEIqfOJR.d.ts} +3352 -1519
- package/dist/index.cjs +1664 -12
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1664 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.82.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d09592b: Graduated Triggers and Trigger Inbox methods from the experimental interface to the stable one. Every trigger method (`listTriggers`, `listTriggerInputFields`, `createTriggerInbox`, `ensureTriggerInbox`, `drainTriggerInbox`, `watchTriggerInbox`, the inbox lifecycle methods, and the message lease/ack/release methods) is now available directly from `@zapier/zapier-sdk` and the `zapier-sdk` CLI — no `/experimental` import, `--experimental` flag, or `ZAPIER_EXPERIMENTAL` env var required. On the default MCP server the request/response trigger tools (`create-trigger-inbox`, `list-triggers`, the lease/ack/release tools, etc.) are now listed; the callback-driven `drainTriggerInbox` and `watchTriggerInbox` remain SDK/CLI-only. They stay available via the experimental subpath and `zapier-sdk-experimental` binary for backward compatibility.
|
|
8
|
+
|
|
3
9
|
## 0.81.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -68,25 +68,25 @@
|
|
|
68
68
|
- [`listTableRecords`](#listtablerecords)
|
|
69
69
|
- [`listTables`](#listtables)
|
|
70
70
|
- [`updateTableRecords`](#updatetablerecords)
|
|
71
|
-
- [Triggers
|
|
72
|
-
- [`ackTriggerInboxMessages`](#acktriggerinboxmessages
|
|
73
|
-
- [`createTriggerInbox`](#createtriggerinbox
|
|
74
|
-
- [`deleteTriggerInbox`](#deletetriggerinbox
|
|
75
|
-
- [`drainTriggerInbox`](#draintriggerinbox
|
|
76
|
-
- [`ensureTriggerInbox`](#ensuretriggerinbox
|
|
77
|
-
- [`getTriggerInbox`](#gettriggerinbox
|
|
78
|
-
- [`getTriggerInputFieldsSchema`](#gettriggerinputfieldsschema
|
|
79
|
-
- [`leaseTriggerInboxMessages`](#leasetriggerinboxmessages
|
|
80
|
-
- [`listTriggerInboxMessages`](#listtriggerinboxmessages
|
|
81
|
-
- [`listTriggerInboxes`](#listtriggerinboxes
|
|
82
|
-
- [`listTriggerInputFieldChoices`](#listtriggerinputfieldchoices
|
|
83
|
-
- [`listTriggerInputFields`](#listtriggerinputfields
|
|
84
|
-
- [`listTriggers`](#listtriggers
|
|
85
|
-
- [`pauseTriggerInbox`](#pausetriggerinbox
|
|
86
|
-
- [`releaseTriggerInboxMessages`](#releasetriggerinboxmessages
|
|
87
|
-
- [`resumeTriggerInbox`](#resumetriggerinbox
|
|
88
|
-
- [`updateTriggerInbox`](#updatetriggerinbox
|
|
89
|
-
- [`watchTriggerInbox`](#watchtriggerinbox
|
|
71
|
+
- [Triggers](#triggers)
|
|
72
|
+
- [`ackTriggerInboxMessages`](#acktriggerinboxmessages)
|
|
73
|
+
- [`createTriggerInbox`](#createtriggerinbox)
|
|
74
|
+
- [`deleteTriggerInbox`](#deletetriggerinbox)
|
|
75
|
+
- [`drainTriggerInbox`](#draintriggerinbox)
|
|
76
|
+
- [`ensureTriggerInbox`](#ensuretriggerinbox)
|
|
77
|
+
- [`getTriggerInbox`](#gettriggerinbox)
|
|
78
|
+
- [`getTriggerInputFieldsSchema`](#gettriggerinputfieldsschema)
|
|
79
|
+
- [`leaseTriggerInboxMessages`](#leasetriggerinboxmessages)
|
|
80
|
+
- [`listTriggerInboxMessages`](#listtriggerinboxmessages)
|
|
81
|
+
- [`listTriggerInboxes`](#listtriggerinboxes)
|
|
82
|
+
- [`listTriggerInputFieldChoices`](#listtriggerinputfieldchoices)
|
|
83
|
+
- [`listTriggerInputFields`](#listtriggerinputfields)
|
|
84
|
+
- [`listTriggers`](#listtriggers)
|
|
85
|
+
- [`pauseTriggerInbox`](#pausetriggerinbox)
|
|
86
|
+
- [`releaseTriggerInboxMessages`](#releasetriggerinboxmessages)
|
|
87
|
+
- [`resumeTriggerInbox`](#resumetriggerinbox)
|
|
88
|
+
- [`updateTriggerInbox`](#updatetriggerinbox)
|
|
89
|
+
- [`watchTriggerInbox`](#watchtriggerinbox)
|
|
90
90
|
|
|
91
91
|
## Documentation
|
|
92
92
|
|
|
@@ -2641,11 +2641,9 @@ const result = await zapier.updateTableRecords({
|
|
|
2641
2641
|
});
|
|
2642
2642
|
```
|
|
2643
2643
|
|
|
2644
|
-
### Triggers
|
|
2644
|
+
### Triggers
|
|
2645
2645
|
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
#### `ackTriggerInboxMessages` 🧪 _experimental_
|
|
2646
|
+
#### `ackTriggerInboxMessages`
|
|
2649
2647
|
|
|
2650
2648
|
Acknowledge messages from a lease. Acked messages are removed from the inbox; unacked ones return to the available pool when the lease expires.
|
|
2651
2649
|
|
|
@@ -2682,7 +2680,7 @@ const result = await zapier.ackTriggerInboxMessages({
|
|
|
2682
2680
|
});
|
|
2683
2681
|
```
|
|
2684
2682
|
|
|
2685
|
-
#### `createTriggerInbox`
|
|
2683
|
+
#### `createTriggerInbox`
|
|
2686
2684
|
|
|
2687
2685
|
Create a new trigger inbox subscription. Always creates a new inbox; use ensureTriggerInbox for get-or-create on a stable key.
|
|
2688
2686
|
|
|
@@ -2725,7 +2723,7 @@ const result = await zapier.createTriggerInbox({
|
|
|
2725
2723
|
});
|
|
2726
2724
|
```
|
|
2727
2725
|
|
|
2728
|
-
#### `deleteTriggerInbox`
|
|
2726
|
+
#### `deleteTriggerInbox`
|
|
2729
2727
|
|
|
2730
2728
|
Mark a trigger inbox for deletion
|
|
2731
2729
|
|
|
@@ -2762,7 +2760,7 @@ const result = await zapier.deleteTriggerInbox({
|
|
|
2762
2760
|
});
|
|
2763
2761
|
```
|
|
2764
2762
|
|
|
2765
|
-
#### `drainTriggerInbox`
|
|
2763
|
+
#### `drainTriggerInbox`
|
|
2766
2764
|
|
|
2767
2765
|
Drain an existing trigger inbox: lease currently-available messages, process each via onMessage, return when the inbox is empty, maxMessages is reached, or the abort signal fires.
|
|
2768
2766
|
|
|
@@ -2795,7 +2793,7 @@ const result = await zapier.drainTriggerInbox({
|
|
|
2795
2793
|
});
|
|
2796
2794
|
```
|
|
2797
2795
|
|
|
2798
|
-
#### `ensureTriggerInbox`
|
|
2796
|
+
#### `ensureTriggerInbox`
|
|
2799
2797
|
|
|
2800
2798
|
Get-or-create a trigger inbox by key. Idempotent on (user, account, key): returns the existing inbox if a matching subscription is registered, creates a new one otherwise. Throws ZapierConflictError if the key exists with a different subscription.
|
|
2801
2799
|
|
|
@@ -2839,7 +2837,7 @@ const result = await zapier.ensureTriggerInbox({
|
|
|
2839
2837
|
});
|
|
2840
2838
|
```
|
|
2841
2839
|
|
|
2842
|
-
#### `getTriggerInbox`
|
|
2840
|
+
#### `getTriggerInbox`
|
|
2843
2841
|
|
|
2844
2842
|
Get details of a trigger inbox by ID
|
|
2845
2843
|
|
|
@@ -2876,7 +2874,7 @@ const { data: triggerInbox } = await zapier.getTriggerInbox({
|
|
|
2876
2874
|
});
|
|
2877
2875
|
```
|
|
2878
2876
|
|
|
2879
|
-
#### `getTriggerInputFieldsSchema`
|
|
2877
|
+
#### `getTriggerInputFieldsSchema`
|
|
2880
2878
|
|
|
2881
2879
|
Get the JSON Schema representation of input fields for a trigger. Returns a JSON Schema object describing the structure, types, and validation rules for the trigger's input parameters.
|
|
2882
2880
|
|
|
@@ -2901,7 +2899,7 @@ const result = await zapier.getTriggerInputFieldsSchema({
|
|
|
2901
2899
|
});
|
|
2902
2900
|
```
|
|
2903
2901
|
|
|
2904
|
-
#### `leaseTriggerInboxMessages`
|
|
2902
|
+
#### `leaseTriggerInboxMessages`
|
|
2905
2903
|
|
|
2906
2904
|
Lease up to N messages from a trigger inbox. Returns messages plus a lease ID; ack within the lease window to remove from the inbox.
|
|
2907
2905
|
|
|
@@ -2943,7 +2941,7 @@ const result = await zapier.leaseTriggerInboxMessages({
|
|
|
2943
2941
|
});
|
|
2944
2942
|
```
|
|
2945
2943
|
|
|
2946
|
-
#### `listTriggerInboxMessages`
|
|
2944
|
+
#### `listTriggerInboxMessages`
|
|
2947
2945
|
|
|
2948
2946
|
List messages in a trigger inbox (no payload, status-only)
|
|
2949
2947
|
|
|
@@ -2997,7 +2995,7 @@ for await (const triggerMessage of zapier
|
|
|
2997
2995
|
}
|
|
2998
2996
|
```
|
|
2999
2997
|
|
|
3000
|
-
#### `listTriggerInboxes`
|
|
2998
|
+
#### `listTriggerInboxes`
|
|
3001
2999
|
|
|
3002
3000
|
List all trigger inboxes for the authenticated user
|
|
3003
3001
|
|
|
@@ -3048,7 +3046,7 @@ for await (const triggerInbox of zapier.listTriggerInboxes().items()) {
|
|
|
3048
3046
|
}
|
|
3049
3047
|
```
|
|
3050
3048
|
|
|
3051
|
-
#### `listTriggerInputFieldChoices`
|
|
3049
|
+
#### `listTriggerInputFieldChoices`
|
|
3052
3050
|
|
|
3053
3051
|
Get the available choices for a dynamic dropdown input field on a trigger
|
|
3054
3052
|
|
|
@@ -3110,7 +3108,7 @@ for await (const inputFieldChoice of zapier
|
|
|
3110
3108
|
}
|
|
3111
3109
|
```
|
|
3112
3110
|
|
|
3113
|
-
#### `listTriggerInputFields`
|
|
3111
|
+
#### `listTriggerInputFields`
|
|
3114
3112
|
|
|
3115
3113
|
Get the input fields required for a specific trigger
|
|
3116
3114
|
|
|
@@ -3198,7 +3196,7 @@ for await (const rootField of zapier
|
|
|
3198
3196
|
}
|
|
3199
3197
|
```
|
|
3200
3198
|
|
|
3201
|
-
#### `listTriggers`
|
|
3199
|
+
#### `listTriggers`
|
|
3202
3200
|
|
|
3203
3201
|
List all triggers for a specific app
|
|
3204
3202
|
|
|
@@ -3254,7 +3252,7 @@ for await (const action of zapier
|
|
|
3254
3252
|
}
|
|
3255
3253
|
```
|
|
3256
3254
|
|
|
3257
|
-
#### `pauseTriggerInbox`
|
|
3255
|
+
#### `pauseTriggerInbox`
|
|
3258
3256
|
|
|
3259
3257
|
Pause a trigger inbox; events stop being collected
|
|
3260
3258
|
|
|
@@ -3291,7 +3289,7 @@ const result = await zapier.pauseTriggerInbox({
|
|
|
3291
3289
|
});
|
|
3292
3290
|
```
|
|
3293
3291
|
|
|
3294
|
-
#### `releaseTriggerInboxMessages`
|
|
3292
|
+
#### `releaseTriggerInboxMessages`
|
|
3295
3293
|
|
|
3296
3294
|
Release messages from a lease back to the inbox without acknowledging them. Released messages become immediately available for re-leasing. The lease attempt still counts against the per-message lease limit; releasing does not refund the attempt.
|
|
3297
3295
|
|
|
@@ -3328,7 +3326,7 @@ const result = await zapier.releaseTriggerInboxMessages({
|
|
|
3328
3326
|
});
|
|
3329
3327
|
```
|
|
3330
3328
|
|
|
3331
|
-
#### `resumeTriggerInbox`
|
|
3329
|
+
#### `resumeTriggerInbox`
|
|
3332
3330
|
|
|
3333
3331
|
Resume a paused trigger inbox; events resume being collected
|
|
3334
3332
|
|
|
@@ -3365,7 +3363,7 @@ const result = await zapier.resumeTriggerInbox({
|
|
|
3365
3363
|
});
|
|
3366
3364
|
```
|
|
3367
3365
|
|
|
3368
|
-
#### `updateTriggerInbox`
|
|
3366
|
+
#### `updateTriggerInbox`
|
|
3369
3367
|
|
|
3370
3368
|
Update settings on an existing trigger inbox
|
|
3371
3369
|
|
|
@@ -3403,7 +3401,7 @@ const result = await zapier.updateTriggerInbox({
|
|
|
3403
3401
|
});
|
|
3404
3402
|
```
|
|
3405
3403
|
|
|
3406
|
-
#### `watchTriggerInbox`
|
|
3404
|
+
#### `watchTriggerInbox`
|
|
3407
3405
|
|
|
3408
3406
|
Continuously consume a trigger inbox: drain currently-available messages via onMessage, then subscribe to SSE notifications for new arrivals until aborted. A periodic safety drain runs every maxDrainIntervalSeconds (default: 300) to guarantee forward progress if SSE events are missed. Resolves cleanly on signal abort or ZapierAbortDrainSignal from a handler. Transient drain failures (5xx, 429, network blips) retry indefinitely with bounded backoff until they succeed or the watch is aborted; it rejects on a fail-fast handler error, an initialization_failure, or a permanent HTTP error. Real-time wake-up health is reported on stderr: a warning when wake-ups pause and the watch falls back to the safety drain, plus (with debug) transient reconnect notices. Persistent drain failures likewise warn once on stderr while bounded-backoff retries continue.
|
|
3409
3407
|
|