@zapier/zapier-sdk 0.48.1 → 0.50.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 +21 -0
- package/README.md +832 -81
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +27 -16
- 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 +15 -7
- package/dist/api/types.d.ts.map +1 -1
- package/dist/constants.d.ts +8 -9
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +8 -11
- package/dist/experimental.cjs +10383 -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 +10202 -0
- package/dist/index-BQ2ii0Bs.d.mts +9538 -0
- package/dist/index-BQ2ii0Bs.d.ts +9538 -0
- package/dist/index.cjs +718 -513
- 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 +706 -512
- package/dist/plugins/api/index.d.ts.map +1 -1
- package/dist/plugins/api/index.js +1 -2
- 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 +4 -4
- 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/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 +18 -5
- 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 +4 -4
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/sdk.js +4 -11
- 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/README.md
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
- [`getProfile`](#getprofile)
|
|
13
13
|
- [Actions](#actions)
|
|
14
14
|
- [`getAction`](#getaction)
|
|
15
|
-
- [`
|
|
15
|
+
- [`getActionInputFieldsSchema`](#getactioninputfieldsschema)
|
|
16
|
+
- [`listActionInputFieldChoices`](#listactioninputfieldchoices)
|
|
17
|
+
- [`listActionInputFields`](#listactioninputfields)
|
|
16
18
|
- [`listActions`](#listactions)
|
|
17
|
-
- [`listInputFieldChoices`](#listinputfieldchoices)
|
|
18
|
-
- [`listInputFields`](#listinputfields)
|
|
19
19
|
- [`runAction`](#runaction)
|
|
20
20
|
- [Apps](#apps)
|
|
21
21
|
- [`apps.{appKey}`](#appsappkey)
|
|
@@ -46,6 +46,24 @@
|
|
|
46
46
|
- [`listTableRecords`](#listtablerecords)
|
|
47
47
|
- [`listTables`](#listtables)
|
|
48
48
|
- [`updateTableRecords`](#updatetablerecords)
|
|
49
|
+
- [Triggers (Experimental)](#triggers-experimental)
|
|
50
|
+
- [`ackTriggerInboxMessages`](#acktriggerinboxmessages--experimental)
|
|
51
|
+
- [`createTriggerInbox`](#createtriggerinbox--experimental)
|
|
52
|
+
- [`deleteTriggerInbox`](#deletetriggerinbox--experimental)
|
|
53
|
+
- [`drainTriggerInbox`](#draintriggerinbox--experimental)
|
|
54
|
+
- [`ensureTriggerInbox`](#ensuretriggerinbox--experimental)
|
|
55
|
+
- [`getTriggerInbox`](#gettriggerinbox--experimental)
|
|
56
|
+
- [`getTriggerInputFieldsSchema`](#gettriggerinputfieldsschema--experimental)
|
|
57
|
+
- [`leaseTriggerInboxMessages`](#leasetriggerinboxmessages--experimental)
|
|
58
|
+
- [`listTriggerInboxMessages`](#listtriggerinboxmessages--experimental)
|
|
59
|
+
- [`listTriggerInboxes`](#listtriggerinboxes--experimental)
|
|
60
|
+
- [`listTriggerInputFieldChoices`](#listtriggerinputfieldchoices--experimental)
|
|
61
|
+
- [`listTriggerInputFields`](#listtriggerinputfields--experimental)
|
|
62
|
+
- [`pauseTriggerInbox`](#pausetriggerinbox--experimental)
|
|
63
|
+
- [`releaseTriggerInboxMessages`](#releasetriggerinboxmessages--experimental)
|
|
64
|
+
- [`resumeTriggerInbox`](#resumetriggerinbox--experimental)
|
|
65
|
+
- [`updateTriggerInbox`](#updatetriggerinbox--experimental)
|
|
66
|
+
- [`watchTriggerInbox`](#watchtriggerinbox--experimental)
|
|
49
67
|
|
|
50
68
|
## Documentation
|
|
51
69
|
|
|
@@ -311,17 +329,20 @@ console.log(emojiData.emoji);
|
|
|
311
329
|
|
|
312
330
|
The `createZapierSdk(...)` factory function is the main entry point for the SDK. It provides methods for managing connections, listing apps, running actions, and more.
|
|
313
331
|
|
|
314
|
-
| Name | Type | Required | Default | Possible Values
|
|
315
|
-
| ----------------------------- | -------------------------- | -------- | ------- |
|
|
316
|
-
| `credentials` | `string, object, function` | ❌ | — | —
|
|
317
|
-
| `debug` | `boolean` | ❌ | — | —
|
|
318
|
-
| `baseUrl` | `string` | ❌ | — | —
|
|
319
|
-
| `trackingBaseUrl` | `string` | ❌ | — | —
|
|
320
|
-
| `maxNetworkRetries` | `number` | ❌ | — | —
|
|
321
|
-
| `maxNetworkRetryDelayMs` | `number` | ❌ | — | —
|
|
322
|
-
| `
|
|
323
|
-
| `
|
|
324
|
-
| `
|
|
332
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
333
|
+
| ----------------------------- | -------------------------- | -------- | ------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
334
|
+
| `credentials` | `string, object, function` | ❌ | — | — | Authentication credentials. Can be a string (token or API key), a client credentials object ({ clientId, clientSecret }), a PKCE object ({ clientId }), or a function returning any of those. |
|
|
335
|
+
| `debug` | `boolean` | ❌ | — | — | Enable debug logging. |
|
|
336
|
+
| `baseUrl` | `string` | ❌ | — | — | Base URL for Zapier API endpoints. |
|
|
337
|
+
| `trackingBaseUrl` | `string` | ❌ | — | — | Base URL for Zapier tracking endpoints. |
|
|
338
|
+
| `maxNetworkRetries` | `number` | ❌ | — | — | Max retries for rate-limited requests (default: 3). |
|
|
339
|
+
| `maxNetworkRetryDelayMs` | `number` | ❌ | — | — | Max delay in ms to wait for retry (default: 60000). |
|
|
340
|
+
| `approvalTimeoutMs` | `number` | ❌ | — | — | Timeout in ms for approval polling. Default: 600000 (10 min). |
|
|
341
|
+
| `maxApprovalRetries` | `number` | ❌ | — | — | Maximum number of sequential approval rounds per request (one per gating policy) before giving up. Default: 2. |
|
|
342
|
+
| `approvalMode` | `string` | ❌ | — | `disabled`, `poll`, `throw` | Approval flow behavior. "disabled" (default) throws a ZapierApprovalError on approval-required responses without creating an approval. "poll" creates the approval, opens it in a browser, polls until resolved, and retries the original request. "throw" creates the approval and throws a ZapierApprovalError with the approval URL so the caller can surface it. Defaults to the ZAPIER_APPROVAL_MODE env var, then "disabled". |
|
|
343
|
+
| `canIncludeSharedConnections` | `boolean` | ❌ | — | — | Allow listing shared connections. |
|
|
344
|
+
| `canIncludeSharedTables` | `boolean` | ❌ | — | — | Allow listing shared tables. |
|
|
345
|
+
| `canDeleteTables` | `boolean` | ❌ | — | — | Allow deleting tables. |
|
|
325
346
|
|
|
326
347
|
## Named Connections
|
|
327
348
|
|
|
@@ -452,7 +473,7 @@ const { data: action } = await zapier.getAction({
|
|
|
452
473
|
});
|
|
453
474
|
```
|
|
454
475
|
|
|
455
|
-
#### `
|
|
476
|
+
#### `getActionInputFieldsSchema`
|
|
456
477
|
|
|
457
478
|
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.
|
|
458
479
|
|
|
@@ -472,71 +493,14 @@ Get the JSON Schema representation of input fields for an action. Returns a JSON
|
|
|
472
493
|
**Example:**
|
|
473
494
|
|
|
474
495
|
```typescript
|
|
475
|
-
const { data: inputSchema } = await zapier.
|
|
496
|
+
const { data: inputSchema } = await zapier.getActionInputFieldsSchema({
|
|
476
497
|
app: "example-app",
|
|
477
498
|
actionType: "read",
|
|
478
499
|
action: "example-action",
|
|
479
500
|
});
|
|
480
501
|
```
|
|
481
502
|
|
|
482
|
-
#### `
|
|
483
|
-
|
|
484
|
-
List all actions for a specific app
|
|
485
|
-
|
|
486
|
-
**Parameters:**
|
|
487
|
-
|
|
488
|
-
| Name | Type | Required | Default | Possible Values | Description |
|
|
489
|
-
| ---------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
490
|
-
| `options` | `object` | ✅ | — | — | |
|
|
491
|
-
| ↳ `app` | `string` | ✅ | — | — | App key of actions to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
492
|
-
| ↳ `actionType` | `string` | ❌ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Filter actions by type |
|
|
493
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of actions per page |
|
|
494
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
495
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
496
|
-
|
|
497
|
-
**Returns:** `Promise<PaginatedResult<ActionItem>>`
|
|
498
|
-
|
|
499
|
-
| Name | Type | Required | Possible Values | Description |
|
|
500
|
-
| ------------------ | ---------- | -------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
501
|
-
| `data[]` | `object[]` | ✅ | — | |
|
|
502
|
-
| ↳ `id` | `string` | ❌ | — | |
|
|
503
|
-
| ↳ `key` | `string` | ✅ | — | |
|
|
504
|
-
| ↳ `description` | `string` | ✅ | — | |
|
|
505
|
-
| ↳ `is_important` | `boolean` | ❌ | — | |
|
|
506
|
-
| ↳ `is_hidden` | `boolean` | ❌ | — | |
|
|
507
|
-
| ↳ `app_key` | `string` | ✅ | — | |
|
|
508
|
-
| ↳ `app_version` | `string` | ❌ | — | |
|
|
509
|
-
| ↳ `action_type` | `string` | ✅ | `filter`, `read`, `read_bulk`, `run`, `search`, `search_and_write`, `search_or_write`, `write` | |
|
|
510
|
-
| ↳ `title` | `string` | ✅ | — | |
|
|
511
|
-
| ↳ `type` | `string` | ✅ | `action` | |
|
|
512
|
-
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
513
|
-
|
|
514
|
-
**Example:**
|
|
515
|
-
|
|
516
|
-
```typescript
|
|
517
|
-
// Get first page and a cursor for the second page
|
|
518
|
-
const { data: actions, nextCursor } = await zapier.listActions({
|
|
519
|
-
app: "example-app",
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
// Or iterate over all pages
|
|
523
|
-
for await (const page of zapier.listActions({
|
|
524
|
-
app: "example-app",
|
|
525
|
-
})) {
|
|
526
|
-
// Do something with each page
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
// Or iterate over individual items across all pages
|
|
530
|
-
for await (const action of zapier
|
|
531
|
-
.listActions({
|
|
532
|
-
app: "example-app",
|
|
533
|
-
})
|
|
534
|
-
.items()) {
|
|
535
|
-
// Do something with each action
|
|
536
|
-
}
|
|
537
|
-
```
|
|
538
|
-
|
|
539
|
-
#### `listInputFieldChoices`
|
|
503
|
+
#### `listActionInputFieldChoices`
|
|
540
504
|
|
|
541
505
|
Get the available choices for a dynamic dropdown input field
|
|
542
506
|
|
|
@@ -572,7 +536,7 @@ Get the available choices for a dynamic dropdown input field
|
|
|
572
536
|
```typescript
|
|
573
537
|
// Get first page and a cursor for the second page
|
|
574
538
|
const { data: inputFieldChoices, nextCursor } =
|
|
575
|
-
await zapier.
|
|
539
|
+
await zapier.listActionInputFieldChoices({
|
|
576
540
|
app: "example-app",
|
|
577
541
|
actionType: "read",
|
|
578
542
|
action: "example-action",
|
|
@@ -580,7 +544,7 @@ const { data: inputFieldChoices, nextCursor } =
|
|
|
580
544
|
});
|
|
581
545
|
|
|
582
546
|
// Or iterate over all pages
|
|
583
|
-
for await (const page of zapier.
|
|
547
|
+
for await (const page of zapier.listActionInputFieldChoices({
|
|
584
548
|
app: "example-app",
|
|
585
549
|
actionType: "read",
|
|
586
550
|
action: "example-action",
|
|
@@ -591,7 +555,7 @@ for await (const page of zapier.listInputFieldChoices({
|
|
|
591
555
|
|
|
592
556
|
// Or iterate over individual items across all pages
|
|
593
557
|
for await (const inputFieldChoice of zapier
|
|
594
|
-
.
|
|
558
|
+
.listActionInputFieldChoices({
|
|
595
559
|
app: "example-app",
|
|
596
560
|
actionType: "read",
|
|
597
561
|
action: "example-action",
|
|
@@ -602,7 +566,7 @@ for await (const inputFieldChoice of zapier
|
|
|
602
566
|
}
|
|
603
567
|
```
|
|
604
568
|
|
|
605
|
-
#### `
|
|
569
|
+
#### `listActionInputFields`
|
|
606
570
|
|
|
607
571
|
Get the input fields required for a specific action
|
|
608
572
|
|
|
@@ -667,14 +631,14 @@ Get the input fields required for a specific action
|
|
|
667
631
|
|
|
668
632
|
```typescript
|
|
669
633
|
// Get first page and a cursor for the second page
|
|
670
|
-
const { data: rootFields, nextCursor } = await zapier.
|
|
634
|
+
const { data: rootFields, nextCursor } = await zapier.listActionInputFields({
|
|
671
635
|
app: "example-app",
|
|
672
636
|
actionType: "read",
|
|
673
637
|
action: "example-action",
|
|
674
638
|
});
|
|
675
639
|
|
|
676
640
|
// Or iterate over all pages
|
|
677
|
-
for await (const page of zapier.
|
|
641
|
+
for await (const page of zapier.listActionInputFields({
|
|
678
642
|
app: "example-app",
|
|
679
643
|
actionType: "read",
|
|
680
644
|
action: "example-action",
|
|
@@ -684,7 +648,7 @@ for await (const page of zapier.listInputFields({
|
|
|
684
648
|
|
|
685
649
|
// Or iterate over individual items across all pages
|
|
686
650
|
for await (const rootField of zapier
|
|
687
|
-
.
|
|
651
|
+
.listActionInputFields({
|
|
688
652
|
app: "example-app",
|
|
689
653
|
actionType: "read",
|
|
690
654
|
action: "example-action",
|
|
@@ -694,6 +658,63 @@ for await (const rootField of zapier
|
|
|
694
658
|
}
|
|
695
659
|
```
|
|
696
660
|
|
|
661
|
+
#### `listActions`
|
|
662
|
+
|
|
663
|
+
List all actions for a specific app
|
|
664
|
+
|
|
665
|
+
**Parameters:**
|
|
666
|
+
|
|
667
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
668
|
+
| ---------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
669
|
+
| `options` | `object` | ✅ | — | — | |
|
|
670
|
+
| ↳ `app` | `string` | ✅ | — | — | App key of actions to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
671
|
+
| ↳ `actionType` | `string` | ❌ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Filter actions by type |
|
|
672
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of actions per page |
|
|
673
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
674
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
675
|
+
|
|
676
|
+
**Returns:** `Promise<PaginatedResult<ActionItem>>`
|
|
677
|
+
|
|
678
|
+
| Name | Type | Required | Possible Values | Description |
|
|
679
|
+
| ------------------ | ---------- | -------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
680
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
681
|
+
| ↳ `id` | `string` | ❌ | — | |
|
|
682
|
+
| ↳ `key` | `string` | ✅ | — | |
|
|
683
|
+
| ↳ `description` | `string` | ✅ | — | |
|
|
684
|
+
| ↳ `is_important` | `boolean` | ❌ | — | |
|
|
685
|
+
| ↳ `is_hidden` | `boolean` | ❌ | — | |
|
|
686
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
687
|
+
| ↳ `app_version` | `string` | ❌ | — | |
|
|
688
|
+
| ↳ `action_type` | `string` | ✅ | `filter`, `read`, `read_bulk`, `run`, `search`, `search_and_write`, `search_or_write`, `write` | |
|
|
689
|
+
| ↳ `title` | `string` | ✅ | — | |
|
|
690
|
+
| ↳ `type` | `string` | ✅ | `action` | |
|
|
691
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
692
|
+
|
|
693
|
+
**Example:**
|
|
694
|
+
|
|
695
|
+
```typescript
|
|
696
|
+
// Get first page and a cursor for the second page
|
|
697
|
+
const { data: actions, nextCursor } = await zapier.listActions({
|
|
698
|
+
app: "example-app",
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
// Or iterate over all pages
|
|
702
|
+
for await (const page of zapier.listActions({
|
|
703
|
+
app: "example-app",
|
|
704
|
+
})) {
|
|
705
|
+
// Do something with each page
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// Or iterate over individual items across all pages
|
|
709
|
+
for await (const action of zapier
|
|
710
|
+
.listActions({
|
|
711
|
+
app: "example-app",
|
|
712
|
+
})
|
|
713
|
+
.items()) {
|
|
714
|
+
// Do something with each action
|
|
715
|
+
}
|
|
716
|
+
```
|
|
717
|
+
|
|
697
718
|
#### `runAction`
|
|
698
719
|
|
|
699
720
|
Execute an action with the given inputs
|
|
@@ -1768,3 +1789,733 @@ const result = await zapier.updateTableRecords({
|
|
|
1768
1789
|
],
|
|
1769
1790
|
});
|
|
1770
1791
|
```
|
|
1792
|
+
|
|
1793
|
+
### Triggers (Experimental)
|
|
1794
|
+
|
|
1795
|
+
> Experimental. Import from `"@zapier/zapier-sdk/experimental"` to use these methods. Methods and behavior may change, and availabilitiy may be limited to some users.
|
|
1796
|
+
|
|
1797
|
+
#### `ackTriggerInboxMessages` 🧪 _experimental_
|
|
1798
|
+
|
|
1799
|
+
Acknowledge messages from a lease. Acked messages are removed from the inbox; unacked ones return to the available pool when the lease expires.
|
|
1800
|
+
|
|
1801
|
+
**Parameters:**
|
|
1802
|
+
|
|
1803
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1804
|
+
| -------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
1805
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1806
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
1807
|
+
| ↳ `lease` | `string` | ✅ | — | — | Lease ID returned from leaseTriggerInboxMessages |
|
|
1808
|
+
| ↳ `messages` | `array` | ❌ | — | — | Specific message IDs to ack. Omit to ack every message in the lease. |
|
|
1809
|
+
|
|
1810
|
+
**Returns:** `Promise<TriggerInboxAckItem>`
|
|
1811
|
+
|
|
1812
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1813
|
+
| --------------------------------- | ---------- | -------- | --------------------------------------------- | ------------------------ |
|
|
1814
|
+
| `data` | `object` | ✅ | — | |
|
|
1815
|
+
| ↳ `acked_id` | `string` | ✅ | — | |
|
|
1816
|
+
| ↳ `results[]` | `object[]` | ✅ | — | |
|
|
1817
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1818
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1819
|
+
| ↳ `status` | `string` | ✅ | `available`, `leased`, `acked`, `quarantined` | Message lifecycle status |
|
|
1820
|
+
| ↳ `message_attributes` | `object` | ✅ | — | |
|
|
1821
|
+
| ↳ `lease_count` | `number` | ✅ | — | |
|
|
1822
|
+
| ↳ `error_message` | `string` | ✅ | — | |
|
|
1823
|
+
| ↳ `possible_duplicate_data` | `boolean` | ✅ | — | |
|
|
1824
|
+
|
|
1825
|
+
**Example:**
|
|
1826
|
+
|
|
1827
|
+
```typescript
|
|
1828
|
+
const result = await zapier.ackTriggerInboxMessages({
|
|
1829
|
+
inbox: "example-inbox",
|
|
1830
|
+
lease: "example-lease",
|
|
1831
|
+
});
|
|
1832
|
+
```
|
|
1833
|
+
|
|
1834
|
+
#### `createTriggerInbox` 🧪 _experimental_
|
|
1835
|
+
|
|
1836
|
+
Create a new trigger inbox subscription with an auto-generated name. Always creates; use ensureTriggerInbox for get-or-create on a stable name.
|
|
1837
|
+
|
|
1838
|
+
**Parameters:**
|
|
1839
|
+
|
|
1840
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1841
|
+
| --------------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
1842
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1843
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
1844
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
1845
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Optional for triggers that don't require auth. |
|
|
1846
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the trigger subscription |
|
|
1847
|
+
| ↳ `notificationUrl` | `string` | ❌ | — | — | Webhook URL to POST to when new messages arrive |
|
|
1848
|
+
|
|
1849
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
1850
|
+
|
|
1851
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1852
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
1853
|
+
| `data` | `object` | ✅ | — | |
|
|
1854
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1855
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1856
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1857
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
1858
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
1859
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
1860
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
1861
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
1862
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
1863
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
1864
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
1865
|
+
|
|
1866
|
+
**Example:**
|
|
1867
|
+
|
|
1868
|
+
```typescript
|
|
1869
|
+
const result = await zapier.createTriggerInbox({
|
|
1870
|
+
app: "example-app",
|
|
1871
|
+
action: "example-action",
|
|
1872
|
+
});
|
|
1873
|
+
```
|
|
1874
|
+
|
|
1875
|
+
#### `deleteTriggerInbox` 🧪 _experimental_
|
|
1876
|
+
|
|
1877
|
+
Mark a trigger inbox for deletion
|
|
1878
|
+
|
|
1879
|
+
**Parameters:**
|
|
1880
|
+
|
|
1881
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1882
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
1883
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1884
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
1885
|
+
|
|
1886
|
+
**Returns:** `Promise<{ success: boolean }>`
|
|
1887
|
+
|
|
1888
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1889
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
1890
|
+
| `data` | `object` | ✅ | — | |
|
|
1891
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1892
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1893
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1894
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
1895
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
1896
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
1897
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
1898
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
1899
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
1900
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
1901
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
1902
|
+
|
|
1903
|
+
**Example:**
|
|
1904
|
+
|
|
1905
|
+
```typescript
|
|
1906
|
+
const result = await zapier.deleteTriggerInbox({
|
|
1907
|
+
inbox: "example-inbox",
|
|
1908
|
+
});
|
|
1909
|
+
```
|
|
1910
|
+
|
|
1911
|
+
#### `drainTriggerInbox` 🧪 _experimental_
|
|
1912
|
+
|
|
1913
|
+
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.
|
|
1914
|
+
|
|
1915
|
+
**Parameters:**
|
|
1916
|
+
|
|
1917
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1918
|
+
| --------------------- | ---------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1919
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1920
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
1921
|
+
| ↳ `onMessage` | `function` | ❌ | — | — | 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. |
|
|
1922
|
+
| ↳ `concurrency` | `number` | ❌ | — | — | Per-message handler workers running in parallel. Defaults to `leaseLimit`, or 1 if neither is set. |
|
|
1923
|
+
| ↳ `leaseLimit` | `number` | ❌ | — | — | Per-lease HTTP batch size. Defaults to `concurrency`, or 1 if neither is set. |
|
|
1924
|
+
| ↳ `leaseSeconds` | `number` | ❌ | — | — | Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes). |
|
|
1925
|
+
| ↳ `releaseOnError` | `boolean` | ❌ | — | — | If true, errors immediately release the message. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless. |
|
|
1926
|
+
| ↳ `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. |
|
|
1927
|
+
| ↳ `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. |
|
|
1928
|
+
| ↳ `signal` | `any` | ❌ | — | — | Abort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject. |
|
|
1929
|
+
| ↳ `maxMessages` | `number` | ❌ | — | — | Cap total messages drained. Defaults to draining the inbox until empty. |
|
|
1930
|
+
|
|
1931
|
+
**Returns:** `Promise<void>`
|
|
1932
|
+
|
|
1933
|
+
**Example:**
|
|
1934
|
+
|
|
1935
|
+
```typescript
|
|
1936
|
+
const result = await zapier.drainTriggerInbox({
|
|
1937
|
+
inbox: "example-inbox",
|
|
1938
|
+
onMessage: async (message) => {
|
|
1939
|
+
/* process message */
|
|
1940
|
+
},
|
|
1941
|
+
});
|
|
1942
|
+
```
|
|
1943
|
+
|
|
1944
|
+
#### `ensureTriggerInbox` 🧪 _experimental_
|
|
1945
|
+
|
|
1946
|
+
Get-or-create a trigger inbox by name. Idempotent on (user, account, name): returns the existing inbox if a matching subscription is registered, creates a new one otherwise. Throws ZapierConflictError if the name exists with a different subscription.
|
|
1947
|
+
|
|
1948
|
+
**Parameters:**
|
|
1949
|
+
|
|
1950
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1951
|
+
| --------------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1952
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1953
|
+
| ↳ `name` | `string` | ✅ | — | — | Inbox name; serves as the idempotency key. Required for ensureTriggerInbox — without one, the API mints a fresh inbox each call (use createTriggerInbox for that path). |
|
|
1954
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
1955
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
1956
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Optional for triggers that don't require auth. |
|
|
1957
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the trigger subscription |
|
|
1958
|
+
| ↳ `notificationUrl` | `string` | ❌ | — | — | Webhook URL to POST to when new messages arrive |
|
|
1959
|
+
|
|
1960
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
1961
|
+
|
|
1962
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1963
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
1964
|
+
| `data` | `object` | ✅ | — | |
|
|
1965
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1966
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1967
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1968
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
1969
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
1970
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
1971
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
1972
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
1973
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
1974
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
1975
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
1976
|
+
|
|
1977
|
+
**Example:**
|
|
1978
|
+
|
|
1979
|
+
```typescript
|
|
1980
|
+
const result = await zapier.ensureTriggerInbox({
|
|
1981
|
+
name: "example-name",
|
|
1982
|
+
app: "example-app",
|
|
1983
|
+
action: "example-action",
|
|
1984
|
+
});
|
|
1985
|
+
```
|
|
1986
|
+
|
|
1987
|
+
#### `getTriggerInbox` 🧪 _experimental_
|
|
1988
|
+
|
|
1989
|
+
Get details of a trigger inbox by ID
|
|
1990
|
+
|
|
1991
|
+
**Parameters:**
|
|
1992
|
+
|
|
1993
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1994
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
1995
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1996
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
1997
|
+
|
|
1998
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
1999
|
+
|
|
2000
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2001
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2002
|
+
| `data` | `object` | ✅ | — | |
|
|
2003
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2004
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2005
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2006
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2007
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
2008
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2009
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2010
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2011
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2012
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2013
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2014
|
+
|
|
2015
|
+
**Example:**
|
|
2016
|
+
|
|
2017
|
+
```typescript
|
|
2018
|
+
const { data: triggerInbox } = await zapier.getTriggerInbox({
|
|
2019
|
+
inbox: "example-inbox",
|
|
2020
|
+
});
|
|
2021
|
+
```
|
|
2022
|
+
|
|
2023
|
+
#### `getTriggerInputFieldsSchema` 🧪 _experimental_
|
|
2024
|
+
|
|
2025
|
+
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.
|
|
2026
|
+
|
|
2027
|
+
**Parameters:**
|
|
2028
|
+
|
|
2029
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2030
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
2031
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2032
|
+
| ↳ `app` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
|
|
2033
|
+
| ↳ `action` | `string` | ✅ | — | — | Trigger action key to get the input schema for |
|
|
2034
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Required if the trigger needs a connection to determine available fields. |
|
|
2035
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
|
|
2036
|
+
|
|
2037
|
+
**Returns:** `Promise<any>`
|
|
2038
|
+
|
|
2039
|
+
**Example:**
|
|
2040
|
+
|
|
2041
|
+
```typescript
|
|
2042
|
+
const result = await zapier.getTriggerInputFieldsSchema({
|
|
2043
|
+
app: "example-app",
|
|
2044
|
+
action: "example-action",
|
|
2045
|
+
});
|
|
2046
|
+
```
|
|
2047
|
+
|
|
2048
|
+
#### `leaseTriggerInboxMessages` 🧪 _experimental_
|
|
2049
|
+
|
|
2050
|
+
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.
|
|
2051
|
+
|
|
2052
|
+
**Parameters:**
|
|
2053
|
+
|
|
2054
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2055
|
+
| ------------------ | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
2056
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2057
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2058
|
+
| ↳ `leaseLimit` | `number` | ❌ | — | — | Maximum messages to lease in a single batch (1-100) |
|
|
2059
|
+
| ↳ `leaseSeconds` | `number` | ❌ | — | — | Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes). |
|
|
2060
|
+
| ↳ `signal` | `any` | ❌ | — | — | Abort signal forwarded to the lease HTTP request. Aborting causes the in-flight request to reject with AbortError. |
|
|
2061
|
+
|
|
2062
|
+
**Returns:** `Promise<TriggerInboxLeaseItem>`
|
|
2063
|
+
|
|
2064
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2065
|
+
| --------------------------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2066
|
+
| `data` | `object` | ✅ | — | |
|
|
2067
|
+
| ↳ `lease_id` | `string` | ✅ | — | |
|
|
2068
|
+
| ↳ `leased_until` | `string` | ✅ | — | |
|
|
2069
|
+
| ↳ `results[]` | `object[]` | ✅ | — | |
|
|
2070
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2071
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2072
|
+
| ↳ `status` | `string` | ✅ | `available`, `leased`, `acked`, `quarantined` | Message lifecycle status |
|
|
2073
|
+
| ↳ `message_attributes` | `object` | ✅ | — | |
|
|
2074
|
+
| ↳ `lease_count` | `number` | ✅ | — | |
|
|
2075
|
+
| ↳ `error_message` | `string` | ✅ | — | |
|
|
2076
|
+
| ↳ `possible_duplicate_data` | `boolean` | ✅ | — | |
|
|
2077
|
+
| ↳ `payload` | `object` | ✅ | — | |
|
|
2078
|
+
| ↳ `inbox_attributes` | `object` | ✅ | — | |
|
|
2079
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2080
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
2081
|
+
|
|
2082
|
+
**Example:**
|
|
2083
|
+
|
|
2084
|
+
```typescript
|
|
2085
|
+
const result = await zapier.leaseTriggerInboxMessages({
|
|
2086
|
+
inbox: "example-inbox",
|
|
2087
|
+
});
|
|
2088
|
+
```
|
|
2089
|
+
|
|
2090
|
+
#### `listTriggerInboxMessages` 🧪 _experimental_
|
|
2091
|
+
|
|
2092
|
+
List messages in a trigger inbox (no payload, status-only)
|
|
2093
|
+
|
|
2094
|
+
**Parameters:**
|
|
2095
|
+
|
|
2096
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2097
|
+
| -------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2098
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2099
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2100
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of messages per page |
|
|
2101
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2102
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Pagination cursor |
|
|
2103
|
+
|
|
2104
|
+
**Returns:** `Promise<PaginatedResult<TriggerMessageItem>>`
|
|
2105
|
+
|
|
2106
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2107
|
+
| ------------------------------- | ---------- | -------- | --------------------------------------------- | -------------------------------------------------------------- |
|
|
2108
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
2109
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2110
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2111
|
+
| ↳ `status` | `string` | ✅ | `available`, `leased`, `acked`, `quarantined` | Message lifecycle status |
|
|
2112
|
+
| ↳ `message_attributes` | `object` | ✅ | — | |
|
|
2113
|
+
| ↳ `lease_count` | `number` | ✅ | — | |
|
|
2114
|
+
| ↳ `error_message` | `string` | ✅ | — | |
|
|
2115
|
+
| ↳ `possible_duplicate_data` | `boolean` | ✅ | — | |
|
|
2116
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
2117
|
+
|
|
2118
|
+
**Example:**
|
|
2119
|
+
|
|
2120
|
+
```typescript
|
|
2121
|
+
// Get first page and a cursor for the second page
|
|
2122
|
+
const { data: triggerMessages, nextCursor } =
|
|
2123
|
+
await zapier.listTriggerInboxMessages({
|
|
2124
|
+
inbox: "example-inbox",
|
|
2125
|
+
});
|
|
2126
|
+
|
|
2127
|
+
// Or iterate over all pages
|
|
2128
|
+
for await (const page of zapier.listTriggerInboxMessages({
|
|
2129
|
+
inbox: "example-inbox",
|
|
2130
|
+
})) {
|
|
2131
|
+
// Do something with each page
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
// Or iterate over individual items across all pages
|
|
2135
|
+
for await (const triggerMessage of zapier
|
|
2136
|
+
.listTriggerInboxMessages({
|
|
2137
|
+
inbox: "example-inbox",
|
|
2138
|
+
})
|
|
2139
|
+
.items()) {
|
|
2140
|
+
// Do something with each triggerMessage
|
|
2141
|
+
}
|
|
2142
|
+
```
|
|
2143
|
+
|
|
2144
|
+
#### `listTriggerInboxes` 🧪 _experimental_
|
|
2145
|
+
|
|
2146
|
+
List all trigger inboxes for the authenticated user
|
|
2147
|
+
|
|
2148
|
+
**Parameters:**
|
|
2149
|
+
|
|
2150
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2151
|
+
| -------------- | -------- | -------- | ------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
|
2152
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2153
|
+
| ↳ `name` | `string` | ❌ | — | — | Filter by inbox name (exact match). Names are unique per (user, account), so this returns at most one inbox. |
|
|
2154
|
+
| ↳ `status` | `string` | ❌ | — | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Filter by inbox status |
|
|
2155
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of inboxes per page |
|
|
2156
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2157
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor (offset) to start from for pagination |
|
|
2158
|
+
|
|
2159
|
+
**Returns:** `Promise<PaginatedResult<TriggerInboxItem>>`
|
|
2160
|
+
|
|
2161
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2162
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
2163
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
2164
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2165
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2166
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2167
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2168
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
2169
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2170
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2171
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2172
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2173
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2174
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2175
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
2176
|
+
|
|
2177
|
+
**Example:**
|
|
2178
|
+
|
|
2179
|
+
```typescript
|
|
2180
|
+
// Get first page and a cursor for the second page
|
|
2181
|
+
const { data: triggerInboxs, nextCursor } = await zapier.listTriggerInboxes();
|
|
2182
|
+
|
|
2183
|
+
// Or iterate over all pages
|
|
2184
|
+
for await (const page of zapier.listTriggerInboxes()) {
|
|
2185
|
+
// Do something with each page
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
// Or iterate over individual items across all pages
|
|
2189
|
+
for await (const triggerInbox of zapier.listTriggerInboxes().items()) {
|
|
2190
|
+
// Do something with each triggerInbox
|
|
2191
|
+
}
|
|
2192
|
+
```
|
|
2193
|
+
|
|
2194
|
+
#### `listTriggerInputFieldChoices` 🧪 _experimental_
|
|
2195
|
+
|
|
2196
|
+
Get the available choices for a dynamic dropdown input field on a trigger
|
|
2197
|
+
|
|
2198
|
+
**Parameters:**
|
|
2199
|
+
|
|
2200
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2201
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
2202
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2203
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
2204
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
2205
|
+
| ↳ `inputField` | `string` | ✅ | — | — | Input field key to get choices for |
|
|
2206
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Required if the trigger needs a connection to populate dynamic dropdown options. |
|
|
2207
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
|
|
2208
|
+
| ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
|
|
2209
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
|
|
2210
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2211
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
2212
|
+
|
|
2213
|
+
**Returns:** `Promise<PaginatedResult<InputFieldChoiceItem>>`
|
|
2214
|
+
|
|
2215
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2216
|
+
| ------------ | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
2217
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
2218
|
+
| ↳ `key` | `string` | ❌ | — | |
|
|
2219
|
+
| ↳ `label` | `string` | ❌ | — | |
|
|
2220
|
+
| ↳ `sample` | `string` | ❌ | — | |
|
|
2221
|
+
| ↳ `value` | `string` | ❌ | — | |
|
|
2222
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
2223
|
+
|
|
2224
|
+
**Example:**
|
|
2225
|
+
|
|
2226
|
+
```typescript
|
|
2227
|
+
// Get first page and a cursor for the second page
|
|
2228
|
+
const { data: inputFieldChoices, nextCursor } =
|
|
2229
|
+
await zapier.listTriggerInputFieldChoices({
|
|
2230
|
+
app: "example-app",
|
|
2231
|
+
action: "example-action",
|
|
2232
|
+
inputField: "example-input-field",
|
|
2233
|
+
});
|
|
2234
|
+
|
|
2235
|
+
// Or iterate over all pages
|
|
2236
|
+
for await (const page of zapier.listTriggerInputFieldChoices({
|
|
2237
|
+
app: "example-app",
|
|
2238
|
+
action: "example-action",
|
|
2239
|
+
inputField: "example-input-field",
|
|
2240
|
+
})) {
|
|
2241
|
+
// Do something with each page
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
// Or iterate over individual items across all pages
|
|
2245
|
+
for await (const inputFieldChoice of zapier
|
|
2246
|
+
.listTriggerInputFieldChoices({
|
|
2247
|
+
app: "example-app",
|
|
2248
|
+
action: "example-action",
|
|
2249
|
+
inputField: "example-input-field",
|
|
2250
|
+
})
|
|
2251
|
+
.items()) {
|
|
2252
|
+
// Do something with each inputFieldChoice
|
|
2253
|
+
}
|
|
2254
|
+
```
|
|
2255
|
+
|
|
2256
|
+
#### `listTriggerInputFields` 🧪 _experimental_
|
|
2257
|
+
|
|
2258
|
+
Get the input fields required for a specific trigger
|
|
2259
|
+
|
|
2260
|
+
**Parameters:**
|
|
2261
|
+
|
|
2262
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2263
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
2264
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2265
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
2266
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
2267
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Required if the trigger needs a connection to determine available fields. |
|
|
2268
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
|
|
2269
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
|
|
2270
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2271
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
2272
|
+
|
|
2273
|
+
**Returns:** `Promise<PaginatedResult<RootFieldItem>>`
|
|
2274
|
+
|
|
2275
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2276
|
+
| ------------ | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
2277
|
+
| `data[]` | `object[]` | ✅ | — | One of the variants below, distinguished by `type` |
|
|
2278
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
2279
|
+
|
|
2280
|
+
**When `type` is `"input_field"`:**
|
|
2281
|
+
|
|
2282
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2283
|
+
| -------------------------- | --------- | -------- | --------------- | ----------- |
|
|
2284
|
+
| `type` | `string` | ✅ | `input_field` | |
|
|
2285
|
+
| `key` | `string` | ✅ | — | |
|
|
2286
|
+
| `default_value` | `string` | ✅ | — | |
|
|
2287
|
+
| `depends_on` | `array` | ✅ | — | |
|
|
2288
|
+
| `description` | `string` | ✅ | — | |
|
|
2289
|
+
| `invalidates_input_fields` | `boolean` | ✅ | — | |
|
|
2290
|
+
| `is_required` | `boolean` | ✅ | — | |
|
|
2291
|
+
| `placeholder` | `string` | ✅ | — | |
|
|
2292
|
+
| `title` | `string` | ✅ | — | |
|
|
2293
|
+
| `value_type` | `string` | ✅ | — | |
|
|
2294
|
+
| `format` | `string` | ❌ | — | |
|
|
2295
|
+
| `items` | `object` | ❌ | — | |
|
|
2296
|
+
| ↳ `type` | `string` | ✅ | — | |
|
|
2297
|
+
|
|
2298
|
+
**When `type` is `"info_field"`:**
|
|
2299
|
+
|
|
2300
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2301
|
+
| ------------- | -------- | -------- | --------------- | ----------- |
|
|
2302
|
+
| `type` | `string` | ✅ | `info_field` | |
|
|
2303
|
+
| `key` | `string` | ✅ | — | |
|
|
2304
|
+
| `description` | `string` | ✅ | — | |
|
|
2305
|
+
| `title` | `string` | ❌ | — | |
|
|
2306
|
+
|
|
2307
|
+
**When `type` is `"fieldset"`:**
|
|
2308
|
+
|
|
2309
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2310
|
+
| -------- | -------- | -------- | --------------- | ----------- |
|
|
2311
|
+
| `type` | `string` | ✅ | `fieldset` | |
|
|
2312
|
+
| `key` | `string` | ✅ | — | |
|
|
2313
|
+
| `title` | `string` | ✅ | — | |
|
|
2314
|
+
| `fields` | `array` | ✅ | — | |
|
|
2315
|
+
|
|
2316
|
+
**Example:**
|
|
2317
|
+
|
|
2318
|
+
```typescript
|
|
2319
|
+
// Get first page and a cursor for the second page
|
|
2320
|
+
const { data: rootFields, nextCursor } = await zapier.listTriggerInputFields({
|
|
2321
|
+
app: "example-app",
|
|
2322
|
+
action: "example-action",
|
|
2323
|
+
});
|
|
2324
|
+
|
|
2325
|
+
// Or iterate over all pages
|
|
2326
|
+
for await (const page of zapier.listTriggerInputFields({
|
|
2327
|
+
app: "example-app",
|
|
2328
|
+
action: "example-action",
|
|
2329
|
+
})) {
|
|
2330
|
+
// Do something with each page
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
// Or iterate over individual items across all pages
|
|
2334
|
+
for await (const rootField of zapier
|
|
2335
|
+
.listTriggerInputFields({
|
|
2336
|
+
app: "example-app",
|
|
2337
|
+
action: "example-action",
|
|
2338
|
+
})
|
|
2339
|
+
.items()) {
|
|
2340
|
+
// Do something with each rootField
|
|
2341
|
+
}
|
|
2342
|
+
```
|
|
2343
|
+
|
|
2344
|
+
#### `pauseTriggerInbox` 🧪 _experimental_
|
|
2345
|
+
|
|
2346
|
+
Pause a trigger inbox; events stop being collected
|
|
2347
|
+
|
|
2348
|
+
**Parameters:**
|
|
2349
|
+
|
|
2350
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2351
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2352
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2353
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2354
|
+
|
|
2355
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
2356
|
+
|
|
2357
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2358
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2359
|
+
| `data` | `object` | ✅ | — | |
|
|
2360
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2361
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2362
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2363
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2364
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
2365
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2366
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2367
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2368
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2369
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2370
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2371
|
+
|
|
2372
|
+
**Example:**
|
|
2373
|
+
|
|
2374
|
+
```typescript
|
|
2375
|
+
const result = await zapier.pauseTriggerInbox({
|
|
2376
|
+
inbox: "example-inbox",
|
|
2377
|
+
});
|
|
2378
|
+
```
|
|
2379
|
+
|
|
2380
|
+
#### `releaseTriggerInboxMessages` 🧪 _experimental_
|
|
2381
|
+
|
|
2382
|
+
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.
|
|
2383
|
+
|
|
2384
|
+
**Parameters:**
|
|
2385
|
+
|
|
2386
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2387
|
+
| -------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2388
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2389
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2390
|
+
| ↳ `lease` | `string` | ✅ | — | — | Lease ID returned from leaseTriggerInboxMessages |
|
|
2391
|
+
| ↳ `messages` | `array` | ❌ | — | — | Specific message IDs to release. Omit to release every message in the lease. |
|
|
2392
|
+
|
|
2393
|
+
**Returns:** `Promise<TriggerInboxReleaseItem>`
|
|
2394
|
+
|
|
2395
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2396
|
+
| --------------------------------- | ---------- | -------- | --------------------------------------------- | ------------------------ |
|
|
2397
|
+
| `data` | `object` | ✅ | — | |
|
|
2398
|
+
| ↳ `released_id` | `string` | ✅ | — | |
|
|
2399
|
+
| ↳ `results[]` | `object[]` | ✅ | — | |
|
|
2400
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2401
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2402
|
+
| ↳ `status` | `string` | ✅ | `available`, `leased`, `acked`, `quarantined` | Message lifecycle status |
|
|
2403
|
+
| ↳ `message_attributes` | `object` | ✅ | — | |
|
|
2404
|
+
| ↳ `lease_count` | `number` | ✅ | — | |
|
|
2405
|
+
| ↳ `error_message` | `string` | ✅ | — | |
|
|
2406
|
+
| ↳ `possible_duplicate_data` | `boolean` | ✅ | — | |
|
|
2407
|
+
|
|
2408
|
+
**Example:**
|
|
2409
|
+
|
|
2410
|
+
```typescript
|
|
2411
|
+
const result = await zapier.releaseTriggerInboxMessages({
|
|
2412
|
+
inbox: "example-inbox",
|
|
2413
|
+
lease: "example-lease",
|
|
2414
|
+
});
|
|
2415
|
+
```
|
|
2416
|
+
|
|
2417
|
+
#### `resumeTriggerInbox` 🧪 _experimental_
|
|
2418
|
+
|
|
2419
|
+
Resume a paused trigger inbox; events resume being collected
|
|
2420
|
+
|
|
2421
|
+
**Parameters:**
|
|
2422
|
+
|
|
2423
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2424
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2425
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2426
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2427
|
+
|
|
2428
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
2429
|
+
|
|
2430
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2431
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2432
|
+
| `data` | `object` | ✅ | — | |
|
|
2433
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2434
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2435
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2436
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2437
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
2438
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2439
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2440
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2441
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2442
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2443
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2444
|
+
|
|
2445
|
+
**Example:**
|
|
2446
|
+
|
|
2447
|
+
```typescript
|
|
2448
|
+
const result = await zapier.resumeTriggerInbox({
|
|
2449
|
+
inbox: "example-inbox",
|
|
2450
|
+
});
|
|
2451
|
+
```
|
|
2452
|
+
|
|
2453
|
+
#### `updateTriggerInbox` 🧪 _experimental_
|
|
2454
|
+
|
|
2455
|
+
Update settings on an existing trigger inbox
|
|
2456
|
+
|
|
2457
|
+
**Parameters:**
|
|
2458
|
+
|
|
2459
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2460
|
+
| --------------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2461
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2462
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2463
|
+
| ↳ `notificationUrl` | `string` | ❌ | — | — | Webhook URL to POST to when new messages arrive. Pass null to clear. |
|
|
2464
|
+
|
|
2465
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
2466
|
+
|
|
2467
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2468
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2469
|
+
| `data` | `object` | ✅ | — | |
|
|
2470
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2471
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2472
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2473
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2474
|
+
| ↳ `paused_reason` | `string` | ✅ | `user`, `authentication`, `authentication_access_revoked`, `partner_revoked`, `subscribe_failed`, `migrate_failed`, `abandoned`, `unknown`, `upstream_failures` | Why the inbox was paused, if applicable |
|
|
2475
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2476
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2477
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2478
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2479
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2480
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2481
|
+
|
|
2482
|
+
**Example:**
|
|
2483
|
+
|
|
2484
|
+
```typescript
|
|
2485
|
+
const result = await zapier.updateTriggerInbox({
|
|
2486
|
+
inbox: "example-inbox",
|
|
2487
|
+
});
|
|
2488
|
+
```
|
|
2489
|
+
|
|
2490
|
+
#### `watchTriggerInbox` 🧪 _experimental_
|
|
2491
|
+
|
|
2492
|
+
Continuously consume a trigger inbox: drain currently-available messages via onMessage, then poll with backoff for new arrivals, until aborted. Resolves cleanly on signal abort or ZapierAbortDrainSignal from a handler; rejects on fatal SDK errors or fail-fast handler errors.
|
|
2493
|
+
|
|
2494
|
+
**Parameters:**
|
|
2495
|
+
|
|
2496
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2497
|
+
| ----------------------------- | ---------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2498
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2499
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2500
|
+
| ↳ `onMessage` | `function` | ❌ | — | — | 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. |
|
|
2501
|
+
| ↳ `concurrency` | `number` | ❌ | — | — | Per-message handler workers running in parallel. Defaults to `leaseLimit`, or 1 if neither is set. |
|
|
2502
|
+
| ↳ `leaseLimit` | `number` | ❌ | — | — | Per-lease HTTP batch size. Defaults to `concurrency`, or 1 if neither is set. |
|
|
2503
|
+
| ↳ `leaseSeconds` | `number` | ❌ | — | — | Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes). |
|
|
2504
|
+
| ↳ `releaseOnError` | `boolean` | ❌ | — | — | If true, errors immediately release the message. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless. |
|
|
2505
|
+
| ↳ `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. |
|
|
2506
|
+
| ↳ `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. |
|
|
2507
|
+
| ↳ `signal` | `any` | ❌ | — | — | Abort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject. |
|
|
2508
|
+
| ↳ `maxDrainIntervalSeconds` | `number` | ❌ | — | — | Maximum seconds between empty-inbox poll attempts (default: 60). Caps the back-off cadence. |
|
|
2509
|
+
|
|
2510
|
+
**Returns:** `Promise<void>`
|
|
2511
|
+
|
|
2512
|
+
**Example:**
|
|
2513
|
+
|
|
2514
|
+
```typescript
|
|
2515
|
+
const result = await zapier.watchTriggerInbox({
|
|
2516
|
+
inbox: "example-inbox",
|
|
2517
|
+
onMessage: async (message) => {
|
|
2518
|
+
/* process message */
|
|
2519
|
+
},
|
|
2520
|
+
});
|
|
2521
|
+
```
|