@zapier/zapier-sdk 0.48.1 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +818 -70
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +10 -1
- package/dist/api/polling.d.ts +7 -0
- package/dist/api/polling.d.ts.map +1 -1
- package/dist/api/polling.js +29 -4
- package/dist/api/types.d.ts +7 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/experimental.cjs +10389 -0
- package/dist/experimental.d.mts +2292 -0
- package/dist/experimental.d.ts +2308 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +155 -0
- package/dist/experimental.mjs +10207 -0
- package/dist/index-C2vsvjgN.d.mts +9539 -0
- package/dist/index-C2vsvjgN.d.ts +9539 -0
- package/dist/index.cjs +813 -602
- 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 +801 -602
- 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 +13 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +16 -0
- package/dist/types/plugin.d.ts +12 -1
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/properties.d.ts +12 -0
- package/dist/types/properties.d.ts.map +1 -1
- package/dist/types/properties.js +25 -0
- package/dist/types/registry.d.ts +5 -0
- package/dist/types/registry.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +2 -2
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/signals.d.ts +20 -0
- package/dist/types/signals.d.ts.map +1 -0
- package/dist/types/signals.js +21 -0
- package/dist/utils/abort-utils.d.ts +13 -0
- package/dist/utils/abort-utils.d.ts.map +1 -1
- package/dist/utils/abort-utils.js +15 -0
- package/dist/utils/retry-utils.d.ts +6 -2
- package/dist/utils/retry-utils.d.ts.map +1 -1
- package/dist/utils/retry-utils.js +22 -3
- package/dist/utils/schema-utils.d.ts +19 -1
- package/dist/utils/schema-utils.d.ts.map +1 -1
- package/package.json +12 -1
- package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFields/index.d.ts.map +0 -1
- package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
package/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
|
|
|
@@ -452,7 +470,7 @@ const { data: action } = await zapier.getAction({
|
|
|
452
470
|
});
|
|
453
471
|
```
|
|
454
472
|
|
|
455
|
-
#### `
|
|
473
|
+
#### `getActionInputFieldsSchema`
|
|
456
474
|
|
|
457
475
|
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
476
|
|
|
@@ -472,71 +490,14 @@ Get the JSON Schema representation of input fields for an action. Returns a JSON
|
|
|
472
490
|
**Example:**
|
|
473
491
|
|
|
474
492
|
```typescript
|
|
475
|
-
const { data: inputSchema } = await zapier.
|
|
493
|
+
const { data: inputSchema } = await zapier.getActionInputFieldsSchema({
|
|
476
494
|
app: "example-app",
|
|
477
495
|
actionType: "read",
|
|
478
496
|
action: "example-action",
|
|
479
497
|
});
|
|
480
498
|
```
|
|
481
499
|
|
|
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`
|
|
500
|
+
#### `listActionInputFieldChoices`
|
|
540
501
|
|
|
541
502
|
Get the available choices for a dynamic dropdown input field
|
|
542
503
|
|
|
@@ -572,7 +533,7 @@ Get the available choices for a dynamic dropdown input field
|
|
|
572
533
|
```typescript
|
|
573
534
|
// Get first page and a cursor for the second page
|
|
574
535
|
const { data: inputFieldChoices, nextCursor } =
|
|
575
|
-
await zapier.
|
|
536
|
+
await zapier.listActionInputFieldChoices({
|
|
576
537
|
app: "example-app",
|
|
577
538
|
actionType: "read",
|
|
578
539
|
action: "example-action",
|
|
@@ -580,7 +541,7 @@ const { data: inputFieldChoices, nextCursor } =
|
|
|
580
541
|
});
|
|
581
542
|
|
|
582
543
|
// Or iterate over all pages
|
|
583
|
-
for await (const page of zapier.
|
|
544
|
+
for await (const page of zapier.listActionInputFieldChoices({
|
|
584
545
|
app: "example-app",
|
|
585
546
|
actionType: "read",
|
|
586
547
|
action: "example-action",
|
|
@@ -591,7 +552,7 @@ for await (const page of zapier.listInputFieldChoices({
|
|
|
591
552
|
|
|
592
553
|
// Or iterate over individual items across all pages
|
|
593
554
|
for await (const inputFieldChoice of zapier
|
|
594
|
-
.
|
|
555
|
+
.listActionInputFieldChoices({
|
|
595
556
|
app: "example-app",
|
|
596
557
|
actionType: "read",
|
|
597
558
|
action: "example-action",
|
|
@@ -602,7 +563,7 @@ for await (const inputFieldChoice of zapier
|
|
|
602
563
|
}
|
|
603
564
|
```
|
|
604
565
|
|
|
605
|
-
#### `
|
|
566
|
+
#### `listActionInputFields`
|
|
606
567
|
|
|
607
568
|
Get the input fields required for a specific action
|
|
608
569
|
|
|
@@ -667,14 +628,14 @@ Get the input fields required for a specific action
|
|
|
667
628
|
|
|
668
629
|
```typescript
|
|
669
630
|
// Get first page and a cursor for the second page
|
|
670
|
-
const { data: rootFields, nextCursor } = await zapier.
|
|
631
|
+
const { data: rootFields, nextCursor } = await zapier.listActionInputFields({
|
|
671
632
|
app: "example-app",
|
|
672
633
|
actionType: "read",
|
|
673
634
|
action: "example-action",
|
|
674
635
|
});
|
|
675
636
|
|
|
676
637
|
// Or iterate over all pages
|
|
677
|
-
for await (const page of zapier.
|
|
638
|
+
for await (const page of zapier.listActionInputFields({
|
|
678
639
|
app: "example-app",
|
|
679
640
|
actionType: "read",
|
|
680
641
|
action: "example-action",
|
|
@@ -684,7 +645,7 @@ for await (const page of zapier.listInputFields({
|
|
|
684
645
|
|
|
685
646
|
// Or iterate over individual items across all pages
|
|
686
647
|
for await (const rootField of zapier
|
|
687
|
-
.
|
|
648
|
+
.listActionInputFields({
|
|
688
649
|
app: "example-app",
|
|
689
650
|
actionType: "read",
|
|
690
651
|
action: "example-action",
|
|
@@ -694,6 +655,63 @@ for await (const rootField of zapier
|
|
|
694
655
|
}
|
|
695
656
|
```
|
|
696
657
|
|
|
658
|
+
#### `listActions`
|
|
659
|
+
|
|
660
|
+
List all actions for a specific app
|
|
661
|
+
|
|
662
|
+
**Parameters:**
|
|
663
|
+
|
|
664
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
665
|
+
| ---------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
666
|
+
| `options` | `object` | ✅ | — | — | |
|
|
667
|
+
| ↳ `app` | `string` | ✅ | — | — | App key of actions to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
668
|
+
| ↳ `actionType` | `string` | ❌ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Filter actions by type |
|
|
669
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of actions per page |
|
|
670
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
671
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
672
|
+
|
|
673
|
+
**Returns:** `Promise<PaginatedResult<ActionItem>>`
|
|
674
|
+
|
|
675
|
+
| Name | Type | Required | Possible Values | Description |
|
|
676
|
+
| ------------------ | ---------- | -------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
677
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
678
|
+
| ↳ `id` | `string` | ❌ | — | |
|
|
679
|
+
| ↳ `key` | `string` | ✅ | — | |
|
|
680
|
+
| ↳ `description` | `string` | ✅ | — | |
|
|
681
|
+
| ↳ `is_important` | `boolean` | ❌ | — | |
|
|
682
|
+
| ↳ `is_hidden` | `boolean` | ❌ | — | |
|
|
683
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
684
|
+
| ↳ `app_version` | `string` | ❌ | — | |
|
|
685
|
+
| ↳ `action_type` | `string` | ✅ | `filter`, `read`, `read_bulk`, `run`, `search`, `search_and_write`, `search_or_write`, `write` | |
|
|
686
|
+
| ↳ `title` | `string` | ✅ | — | |
|
|
687
|
+
| ↳ `type` | `string` | ✅ | `action` | |
|
|
688
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
689
|
+
|
|
690
|
+
**Example:**
|
|
691
|
+
|
|
692
|
+
```typescript
|
|
693
|
+
// Get first page and a cursor for the second page
|
|
694
|
+
const { data: actions, nextCursor } = await zapier.listActions({
|
|
695
|
+
app: "example-app",
|
|
696
|
+
});
|
|
697
|
+
|
|
698
|
+
// Or iterate over all pages
|
|
699
|
+
for await (const page of zapier.listActions({
|
|
700
|
+
app: "example-app",
|
|
701
|
+
})) {
|
|
702
|
+
// Do something with each page
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
// Or iterate over individual items across all pages
|
|
706
|
+
for await (const action of zapier
|
|
707
|
+
.listActions({
|
|
708
|
+
app: "example-app",
|
|
709
|
+
})
|
|
710
|
+
.items()) {
|
|
711
|
+
// Do something with each action
|
|
712
|
+
}
|
|
713
|
+
```
|
|
714
|
+
|
|
697
715
|
#### `runAction`
|
|
698
716
|
|
|
699
717
|
Execute an action with the given inputs
|
|
@@ -1768,3 +1786,733 @@ const result = await zapier.updateTableRecords({
|
|
|
1768
1786
|
],
|
|
1769
1787
|
});
|
|
1770
1788
|
```
|
|
1789
|
+
|
|
1790
|
+
### Triggers (Experimental)
|
|
1791
|
+
|
|
1792
|
+
> Experimental. Import from `"@zapier/zapier-sdk/experimental"` to use these methods. Methods and behavior may change, and availabilitiy may be limited to some users.
|
|
1793
|
+
|
|
1794
|
+
#### `ackTriggerInboxMessages` 🧪 _experimental_
|
|
1795
|
+
|
|
1796
|
+
Acknowledge messages from a lease. Acked messages are removed from the inbox; unacked ones return to the available pool when the lease expires.
|
|
1797
|
+
|
|
1798
|
+
**Parameters:**
|
|
1799
|
+
|
|
1800
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1801
|
+
| -------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
1802
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1803
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
1804
|
+
| ↳ `lease` | `string` | ✅ | — | — | Lease ID returned from leaseTriggerInboxMessages |
|
|
1805
|
+
| ↳ `messages` | `array` | ❌ | — | — | Specific message IDs to ack. Omit to ack every message in the lease. |
|
|
1806
|
+
|
|
1807
|
+
**Returns:** `Promise<TriggerInboxAckItem>`
|
|
1808
|
+
|
|
1809
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1810
|
+
| --------------------------------- | ---------- | -------- | --------------------------------------------- | ------------------------ |
|
|
1811
|
+
| `data` | `object` | ✅ | — | |
|
|
1812
|
+
| ↳ `acked_id` | `string` | ✅ | — | |
|
|
1813
|
+
| ↳ `results[]` | `object[]` | ✅ | — | |
|
|
1814
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1815
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1816
|
+
| ↳ `status` | `string` | ✅ | `available`, `leased`, `acked`, `quarantined` | Message lifecycle status |
|
|
1817
|
+
| ↳ `message_attributes` | `object` | ✅ | — | |
|
|
1818
|
+
| ↳ `lease_count` | `number` | ✅ | — | |
|
|
1819
|
+
| ↳ `error_message` | `string` | ✅ | — | |
|
|
1820
|
+
| ↳ `possible_duplicate_data` | `boolean` | ✅ | — | |
|
|
1821
|
+
|
|
1822
|
+
**Example:**
|
|
1823
|
+
|
|
1824
|
+
```typescript
|
|
1825
|
+
const result = await zapier.ackTriggerInboxMessages({
|
|
1826
|
+
inbox: "example-inbox",
|
|
1827
|
+
lease: "example-lease",
|
|
1828
|
+
});
|
|
1829
|
+
```
|
|
1830
|
+
|
|
1831
|
+
#### `createTriggerInbox` 🧪 _experimental_
|
|
1832
|
+
|
|
1833
|
+
Create a new trigger inbox subscription with an auto-generated name. Always creates; use ensureTriggerInbox for get-or-create on a stable name.
|
|
1834
|
+
|
|
1835
|
+
**Parameters:**
|
|
1836
|
+
|
|
1837
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1838
|
+
| --------------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
1839
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1840
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
1841
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
1842
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Optional for triggers that don't require auth. |
|
|
1843
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the trigger subscription |
|
|
1844
|
+
| ↳ `notificationUrl` | `string` | ❌ | — | — | Webhook URL to POST to when new messages arrive |
|
|
1845
|
+
|
|
1846
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
1847
|
+
|
|
1848
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1849
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
1850
|
+
| `data` | `object` | ✅ | — | |
|
|
1851
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1852
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1853
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1854
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
1855
|
+
| ↳ `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 |
|
|
1856
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
1857
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
1858
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
1859
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
1860
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
1861
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
1862
|
+
|
|
1863
|
+
**Example:**
|
|
1864
|
+
|
|
1865
|
+
```typescript
|
|
1866
|
+
const result = await zapier.createTriggerInbox({
|
|
1867
|
+
app: "example-app",
|
|
1868
|
+
action: "example-action",
|
|
1869
|
+
});
|
|
1870
|
+
```
|
|
1871
|
+
|
|
1872
|
+
#### `deleteTriggerInbox` 🧪 _experimental_
|
|
1873
|
+
|
|
1874
|
+
Mark a trigger inbox for deletion
|
|
1875
|
+
|
|
1876
|
+
**Parameters:**
|
|
1877
|
+
|
|
1878
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1879
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
1880
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1881
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
1882
|
+
|
|
1883
|
+
**Returns:** `Promise<{ success: boolean }>`
|
|
1884
|
+
|
|
1885
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1886
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
1887
|
+
| `data` | `object` | ✅ | — | |
|
|
1888
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1889
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1890
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1891
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
1892
|
+
| ↳ `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 |
|
|
1893
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
1894
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
1895
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
1896
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
1897
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
1898
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
1899
|
+
|
|
1900
|
+
**Example:**
|
|
1901
|
+
|
|
1902
|
+
```typescript
|
|
1903
|
+
const result = await zapier.deleteTriggerInbox({
|
|
1904
|
+
inbox: "example-inbox",
|
|
1905
|
+
});
|
|
1906
|
+
```
|
|
1907
|
+
|
|
1908
|
+
#### `drainTriggerInbox` 🧪 _experimental_
|
|
1909
|
+
|
|
1910
|
+
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.
|
|
1911
|
+
|
|
1912
|
+
**Parameters:**
|
|
1913
|
+
|
|
1914
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1915
|
+
| --------------------- | ---------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1916
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1917
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
1918
|
+
| ↳ `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. |
|
|
1919
|
+
| ↳ `concurrency` | `number` | ❌ | — | — | Per-message handler workers running in parallel. Defaults to `leaseLimit`, or 1 if neither is set. |
|
|
1920
|
+
| ↳ `leaseLimit` | `number` | ❌ | — | — | Per-lease HTTP batch size. Defaults to `concurrency`, or 1 if neither is set. |
|
|
1921
|
+
| ↳ `leaseSeconds` | `number` | ❌ | — | — | Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes). |
|
|
1922
|
+
| ↳ `releaseOnError` | `boolean` | ❌ | — | — | If true, errors immediately release the message. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless. |
|
|
1923
|
+
| ↳ `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. |
|
|
1924
|
+
| ↳ `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. |
|
|
1925
|
+
| ↳ `signal` | `any` | ❌ | — | — | Abort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject. |
|
|
1926
|
+
| ↳ `maxMessages` | `number` | ❌ | — | — | Cap total messages drained. Defaults to draining the inbox until empty. |
|
|
1927
|
+
|
|
1928
|
+
**Returns:** `Promise<void>`
|
|
1929
|
+
|
|
1930
|
+
**Example:**
|
|
1931
|
+
|
|
1932
|
+
```typescript
|
|
1933
|
+
const result = await zapier.drainTriggerInbox({
|
|
1934
|
+
inbox: "example-inbox",
|
|
1935
|
+
onMessage: async (message) => {
|
|
1936
|
+
/* process message */
|
|
1937
|
+
},
|
|
1938
|
+
});
|
|
1939
|
+
```
|
|
1940
|
+
|
|
1941
|
+
#### `ensureTriggerInbox` 🧪 _experimental_
|
|
1942
|
+
|
|
1943
|
+
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.
|
|
1944
|
+
|
|
1945
|
+
**Parameters:**
|
|
1946
|
+
|
|
1947
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1948
|
+
| --------------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1949
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1950
|
+
| ↳ `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). |
|
|
1951
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
1952
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
1953
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Optional for triggers that don't require auth. |
|
|
1954
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the trigger subscription |
|
|
1955
|
+
| ↳ `notificationUrl` | `string` | ❌ | — | — | Webhook URL to POST to when new messages arrive |
|
|
1956
|
+
|
|
1957
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
1958
|
+
|
|
1959
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1960
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
1961
|
+
| `data` | `object` | ✅ | — | |
|
|
1962
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1963
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1964
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1965
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
1966
|
+
| ↳ `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 |
|
|
1967
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
1968
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
1969
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
1970
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
1971
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
1972
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
1973
|
+
|
|
1974
|
+
**Example:**
|
|
1975
|
+
|
|
1976
|
+
```typescript
|
|
1977
|
+
const result = await zapier.ensureTriggerInbox({
|
|
1978
|
+
name: "example-name",
|
|
1979
|
+
app: "example-app",
|
|
1980
|
+
action: "example-action",
|
|
1981
|
+
});
|
|
1982
|
+
```
|
|
1983
|
+
|
|
1984
|
+
#### `getTriggerInbox` 🧪 _experimental_
|
|
1985
|
+
|
|
1986
|
+
Get details of a trigger inbox by ID
|
|
1987
|
+
|
|
1988
|
+
**Parameters:**
|
|
1989
|
+
|
|
1990
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1991
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
1992
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1993
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
1994
|
+
|
|
1995
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
1996
|
+
|
|
1997
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1998
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
1999
|
+
| `data` | `object` | ✅ | — | |
|
|
2000
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2001
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2002
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2003
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2004
|
+
| ↳ `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 |
|
|
2005
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2006
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2007
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2008
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2009
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2010
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2011
|
+
|
|
2012
|
+
**Example:**
|
|
2013
|
+
|
|
2014
|
+
```typescript
|
|
2015
|
+
const { data: triggerInbox } = await zapier.getTriggerInbox({
|
|
2016
|
+
inbox: "example-inbox",
|
|
2017
|
+
});
|
|
2018
|
+
```
|
|
2019
|
+
|
|
2020
|
+
#### `getTriggerInputFieldsSchema` 🧪 _experimental_
|
|
2021
|
+
|
|
2022
|
+
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.
|
|
2023
|
+
|
|
2024
|
+
**Parameters:**
|
|
2025
|
+
|
|
2026
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2027
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
2028
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2029
|
+
| ↳ `app` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
|
|
2030
|
+
| ↳ `action` | `string` | ✅ | — | — | Trigger action key to get the input schema for |
|
|
2031
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Required if the trigger needs a connection to determine available fields. |
|
|
2032
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
|
|
2033
|
+
|
|
2034
|
+
**Returns:** `Promise<any>`
|
|
2035
|
+
|
|
2036
|
+
**Example:**
|
|
2037
|
+
|
|
2038
|
+
```typescript
|
|
2039
|
+
const result = await zapier.getTriggerInputFieldsSchema({
|
|
2040
|
+
app: "example-app",
|
|
2041
|
+
action: "example-action",
|
|
2042
|
+
});
|
|
2043
|
+
```
|
|
2044
|
+
|
|
2045
|
+
#### `leaseTriggerInboxMessages` 🧪 _experimental_
|
|
2046
|
+
|
|
2047
|
+
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.
|
|
2048
|
+
|
|
2049
|
+
**Parameters:**
|
|
2050
|
+
|
|
2051
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2052
|
+
| ------------------ | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
2053
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2054
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2055
|
+
| ↳ `leaseLimit` | `number` | ❌ | — | — | Maximum messages to lease in a single batch (1-100) |
|
|
2056
|
+
| ↳ `leaseSeconds` | `number` | ❌ | — | — | Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes). |
|
|
2057
|
+
| ↳ `signal` | `any` | ❌ | — | — | Abort signal forwarded to the lease HTTP request. Aborting causes the in-flight request to reject with AbortError. |
|
|
2058
|
+
|
|
2059
|
+
**Returns:** `Promise<TriggerInboxLeaseItem>`
|
|
2060
|
+
|
|
2061
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2062
|
+
| --------------------------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2063
|
+
| `data` | `object` | ✅ | — | |
|
|
2064
|
+
| ↳ `lease_id` | `string` | ✅ | — | |
|
|
2065
|
+
| ↳ `leased_until` | `string` | ✅ | — | |
|
|
2066
|
+
| ↳ `results[]` | `object[]` | ✅ | — | |
|
|
2067
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2068
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2069
|
+
| ↳ `status` | `string` | ✅ | `available`, `leased`, `acked`, `quarantined` | Message lifecycle status |
|
|
2070
|
+
| ↳ `message_attributes` | `object` | ✅ | — | |
|
|
2071
|
+
| ↳ `lease_count` | `number` | ✅ | — | |
|
|
2072
|
+
| ↳ `error_message` | `string` | ✅ | — | |
|
|
2073
|
+
| ↳ `possible_duplicate_data` | `boolean` | ✅ | — | |
|
|
2074
|
+
| ↳ `payload` | `object` | ✅ | — | |
|
|
2075
|
+
| ↳ `inbox_attributes` | `object` | ✅ | — | |
|
|
2076
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2077
|
+
| ↳ `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 |
|
|
2078
|
+
|
|
2079
|
+
**Example:**
|
|
2080
|
+
|
|
2081
|
+
```typescript
|
|
2082
|
+
const result = await zapier.leaseTriggerInboxMessages({
|
|
2083
|
+
inbox: "example-inbox",
|
|
2084
|
+
});
|
|
2085
|
+
```
|
|
2086
|
+
|
|
2087
|
+
#### `listTriggerInboxMessages` 🧪 _experimental_
|
|
2088
|
+
|
|
2089
|
+
List messages in a trigger inbox (no payload, status-only)
|
|
2090
|
+
|
|
2091
|
+
**Parameters:**
|
|
2092
|
+
|
|
2093
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2094
|
+
| -------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2095
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2096
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2097
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of messages per page |
|
|
2098
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2099
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Pagination cursor |
|
|
2100
|
+
|
|
2101
|
+
**Returns:** `Promise<PaginatedResult<TriggerMessageItem>>`
|
|
2102
|
+
|
|
2103
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2104
|
+
| ------------------------------- | ---------- | -------- | --------------------------------------------- | -------------------------------------------------------------- |
|
|
2105
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
2106
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2107
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2108
|
+
| ↳ `status` | `string` | ✅ | `available`, `leased`, `acked`, `quarantined` | Message lifecycle status |
|
|
2109
|
+
| ↳ `message_attributes` | `object` | ✅ | — | |
|
|
2110
|
+
| ↳ `lease_count` | `number` | ✅ | — | |
|
|
2111
|
+
| ↳ `error_message` | `string` | ✅ | — | |
|
|
2112
|
+
| ↳ `possible_duplicate_data` | `boolean` | ✅ | — | |
|
|
2113
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
2114
|
+
|
|
2115
|
+
**Example:**
|
|
2116
|
+
|
|
2117
|
+
```typescript
|
|
2118
|
+
// Get first page and a cursor for the second page
|
|
2119
|
+
const { data: triggerMessages, nextCursor } =
|
|
2120
|
+
await zapier.listTriggerInboxMessages({
|
|
2121
|
+
inbox: "example-inbox",
|
|
2122
|
+
});
|
|
2123
|
+
|
|
2124
|
+
// Or iterate over all pages
|
|
2125
|
+
for await (const page of zapier.listTriggerInboxMessages({
|
|
2126
|
+
inbox: "example-inbox",
|
|
2127
|
+
})) {
|
|
2128
|
+
// Do something with each page
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
// Or iterate over individual items across all pages
|
|
2132
|
+
for await (const triggerMessage of zapier
|
|
2133
|
+
.listTriggerInboxMessages({
|
|
2134
|
+
inbox: "example-inbox",
|
|
2135
|
+
})
|
|
2136
|
+
.items()) {
|
|
2137
|
+
// Do something with each triggerMessage
|
|
2138
|
+
}
|
|
2139
|
+
```
|
|
2140
|
+
|
|
2141
|
+
#### `listTriggerInboxes` 🧪 _experimental_
|
|
2142
|
+
|
|
2143
|
+
List all trigger inboxes for the authenticated user
|
|
2144
|
+
|
|
2145
|
+
**Parameters:**
|
|
2146
|
+
|
|
2147
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2148
|
+
| -------------- | -------- | -------- | ------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
|
2149
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2150
|
+
| ↳ `name` | `string` | ❌ | — | — | Filter by inbox name (exact match). Names are unique per (user, account), so this returns at most one inbox. |
|
|
2151
|
+
| ↳ `status` | `string` | ❌ | — | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Filter by inbox status |
|
|
2152
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of inboxes per page |
|
|
2153
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2154
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor (offset) to start from for pagination |
|
|
2155
|
+
|
|
2156
|
+
**Returns:** `Promise<PaginatedResult<TriggerInboxItem>>`
|
|
2157
|
+
|
|
2158
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2159
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
2160
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
2161
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2162
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2163
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2164
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2165
|
+
| ↳ `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 |
|
|
2166
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2167
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2168
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2169
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2170
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2171
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2172
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
2173
|
+
|
|
2174
|
+
**Example:**
|
|
2175
|
+
|
|
2176
|
+
```typescript
|
|
2177
|
+
// Get first page and a cursor for the second page
|
|
2178
|
+
const { data: triggerInboxs, nextCursor } = await zapier.listTriggerInboxes();
|
|
2179
|
+
|
|
2180
|
+
// Or iterate over all pages
|
|
2181
|
+
for await (const page of zapier.listTriggerInboxes()) {
|
|
2182
|
+
// Do something with each page
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
// Or iterate over individual items across all pages
|
|
2186
|
+
for await (const triggerInbox of zapier.listTriggerInboxes().items()) {
|
|
2187
|
+
// Do something with each triggerInbox
|
|
2188
|
+
}
|
|
2189
|
+
```
|
|
2190
|
+
|
|
2191
|
+
#### `listTriggerInputFieldChoices` 🧪 _experimental_
|
|
2192
|
+
|
|
2193
|
+
Get the available choices for a dynamic dropdown input field on a trigger
|
|
2194
|
+
|
|
2195
|
+
**Parameters:**
|
|
2196
|
+
|
|
2197
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2198
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
2199
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2200
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
2201
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
2202
|
+
| ↳ `inputField` | `string` | ✅ | — | — | Input field key to get choices for |
|
|
2203
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Required if the trigger needs a connection to populate dynamic dropdown options. |
|
|
2204
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
|
|
2205
|
+
| ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
|
|
2206
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
|
|
2207
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2208
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
2209
|
+
|
|
2210
|
+
**Returns:** `Promise<PaginatedResult<InputFieldChoiceItem>>`
|
|
2211
|
+
|
|
2212
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2213
|
+
| ------------ | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
2214
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
2215
|
+
| ↳ `key` | `string` | ❌ | — | |
|
|
2216
|
+
| ↳ `label` | `string` | ❌ | — | |
|
|
2217
|
+
| ↳ `sample` | `string` | ❌ | — | |
|
|
2218
|
+
| ↳ `value` | `string` | ❌ | — | |
|
|
2219
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
2220
|
+
|
|
2221
|
+
**Example:**
|
|
2222
|
+
|
|
2223
|
+
```typescript
|
|
2224
|
+
// Get first page and a cursor for the second page
|
|
2225
|
+
const { data: inputFieldChoices, nextCursor } =
|
|
2226
|
+
await zapier.listTriggerInputFieldChoices({
|
|
2227
|
+
app: "example-app",
|
|
2228
|
+
action: "example-action",
|
|
2229
|
+
inputField: "example-input-field",
|
|
2230
|
+
});
|
|
2231
|
+
|
|
2232
|
+
// Or iterate over all pages
|
|
2233
|
+
for await (const page of zapier.listTriggerInputFieldChoices({
|
|
2234
|
+
app: "example-app",
|
|
2235
|
+
action: "example-action",
|
|
2236
|
+
inputField: "example-input-field",
|
|
2237
|
+
})) {
|
|
2238
|
+
// Do something with each page
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
// Or iterate over individual items across all pages
|
|
2242
|
+
for await (const inputFieldChoice of zapier
|
|
2243
|
+
.listTriggerInputFieldChoices({
|
|
2244
|
+
app: "example-app",
|
|
2245
|
+
action: "example-action",
|
|
2246
|
+
inputField: "example-input-field",
|
|
2247
|
+
})
|
|
2248
|
+
.items()) {
|
|
2249
|
+
// Do something with each inputFieldChoice
|
|
2250
|
+
}
|
|
2251
|
+
```
|
|
2252
|
+
|
|
2253
|
+
#### `listTriggerInputFields` 🧪 _experimental_
|
|
2254
|
+
|
|
2255
|
+
Get the input fields required for a specific trigger
|
|
2256
|
+
|
|
2257
|
+
**Parameters:**
|
|
2258
|
+
|
|
2259
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2260
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
2261
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2262
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
2263
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
2264
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID. Required if the trigger needs a connection to determine available fields. |
|
|
2265
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
|
|
2266
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
|
|
2267
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2268
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
2269
|
+
|
|
2270
|
+
**Returns:** `Promise<PaginatedResult<RootFieldItem>>`
|
|
2271
|
+
|
|
2272
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2273
|
+
| ------------ | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
2274
|
+
| `data[]` | `object[]` | ✅ | — | One of the variants below, distinguished by `type` |
|
|
2275
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
2276
|
+
|
|
2277
|
+
**When `type` is `"input_field"`:**
|
|
2278
|
+
|
|
2279
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2280
|
+
| -------------------------- | --------- | -------- | --------------- | ----------- |
|
|
2281
|
+
| `type` | `string` | ✅ | `input_field` | |
|
|
2282
|
+
| `key` | `string` | ✅ | — | |
|
|
2283
|
+
| `default_value` | `string` | ✅ | — | |
|
|
2284
|
+
| `depends_on` | `array` | ✅ | — | |
|
|
2285
|
+
| `description` | `string` | ✅ | — | |
|
|
2286
|
+
| `invalidates_input_fields` | `boolean` | ✅ | — | |
|
|
2287
|
+
| `is_required` | `boolean` | ✅ | — | |
|
|
2288
|
+
| `placeholder` | `string` | ✅ | — | |
|
|
2289
|
+
| `title` | `string` | ✅ | — | |
|
|
2290
|
+
| `value_type` | `string` | ✅ | — | |
|
|
2291
|
+
| `format` | `string` | ❌ | — | |
|
|
2292
|
+
| `items` | `object` | ❌ | — | |
|
|
2293
|
+
| ↳ `type` | `string` | ✅ | — | |
|
|
2294
|
+
|
|
2295
|
+
**When `type` is `"info_field"`:**
|
|
2296
|
+
|
|
2297
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2298
|
+
| ------------- | -------- | -------- | --------------- | ----------- |
|
|
2299
|
+
| `type` | `string` | ✅ | `info_field` | |
|
|
2300
|
+
| `key` | `string` | ✅ | — | |
|
|
2301
|
+
| `description` | `string` | ✅ | — | |
|
|
2302
|
+
| `title` | `string` | ❌ | — | |
|
|
2303
|
+
|
|
2304
|
+
**When `type` is `"fieldset"`:**
|
|
2305
|
+
|
|
2306
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2307
|
+
| -------- | -------- | -------- | --------------- | ----------- |
|
|
2308
|
+
| `type` | `string` | ✅ | `fieldset` | |
|
|
2309
|
+
| `key` | `string` | ✅ | — | |
|
|
2310
|
+
| `title` | `string` | ✅ | — | |
|
|
2311
|
+
| `fields` | `array` | ✅ | — | |
|
|
2312
|
+
|
|
2313
|
+
**Example:**
|
|
2314
|
+
|
|
2315
|
+
```typescript
|
|
2316
|
+
// Get first page and a cursor for the second page
|
|
2317
|
+
const { data: rootFields, nextCursor } = await zapier.listTriggerInputFields({
|
|
2318
|
+
app: "example-app",
|
|
2319
|
+
action: "example-action",
|
|
2320
|
+
});
|
|
2321
|
+
|
|
2322
|
+
// Or iterate over all pages
|
|
2323
|
+
for await (const page of zapier.listTriggerInputFields({
|
|
2324
|
+
app: "example-app",
|
|
2325
|
+
action: "example-action",
|
|
2326
|
+
})) {
|
|
2327
|
+
// Do something with each page
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
// Or iterate over individual items across all pages
|
|
2331
|
+
for await (const rootField of zapier
|
|
2332
|
+
.listTriggerInputFields({
|
|
2333
|
+
app: "example-app",
|
|
2334
|
+
action: "example-action",
|
|
2335
|
+
})
|
|
2336
|
+
.items()) {
|
|
2337
|
+
// Do something with each rootField
|
|
2338
|
+
}
|
|
2339
|
+
```
|
|
2340
|
+
|
|
2341
|
+
#### `pauseTriggerInbox` 🧪 _experimental_
|
|
2342
|
+
|
|
2343
|
+
Pause a trigger inbox; events stop being collected
|
|
2344
|
+
|
|
2345
|
+
**Parameters:**
|
|
2346
|
+
|
|
2347
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2348
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2349
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2350
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2351
|
+
|
|
2352
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
2353
|
+
|
|
2354
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2355
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2356
|
+
| `data` | `object` | ✅ | — | |
|
|
2357
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2358
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2359
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2360
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2361
|
+
| ↳ `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 |
|
|
2362
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2363
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2364
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2365
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2366
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2367
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2368
|
+
|
|
2369
|
+
**Example:**
|
|
2370
|
+
|
|
2371
|
+
```typescript
|
|
2372
|
+
const result = await zapier.pauseTriggerInbox({
|
|
2373
|
+
inbox: "example-inbox",
|
|
2374
|
+
});
|
|
2375
|
+
```
|
|
2376
|
+
|
|
2377
|
+
#### `releaseTriggerInboxMessages` 🧪 _experimental_
|
|
2378
|
+
|
|
2379
|
+
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.
|
|
2380
|
+
|
|
2381
|
+
**Parameters:**
|
|
2382
|
+
|
|
2383
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2384
|
+
| -------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2385
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2386
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2387
|
+
| ↳ `lease` | `string` | ✅ | — | — | Lease ID returned from leaseTriggerInboxMessages |
|
|
2388
|
+
| ↳ `messages` | `array` | ❌ | — | — | Specific message IDs to release. Omit to release every message in the lease. |
|
|
2389
|
+
|
|
2390
|
+
**Returns:** `Promise<TriggerInboxReleaseItem>`
|
|
2391
|
+
|
|
2392
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2393
|
+
| --------------------------------- | ---------- | -------- | --------------------------------------------- | ------------------------ |
|
|
2394
|
+
| `data` | `object` | ✅ | — | |
|
|
2395
|
+
| ↳ `released_id` | `string` | ✅ | — | |
|
|
2396
|
+
| ↳ `results[]` | `object[]` | ✅ | — | |
|
|
2397
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2398
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2399
|
+
| ↳ `status` | `string` | ✅ | `available`, `leased`, `acked`, `quarantined` | Message lifecycle status |
|
|
2400
|
+
| ↳ `message_attributes` | `object` | ✅ | — | |
|
|
2401
|
+
| ↳ `lease_count` | `number` | ✅ | — | |
|
|
2402
|
+
| ↳ `error_message` | `string` | ✅ | — | |
|
|
2403
|
+
| ↳ `possible_duplicate_data` | `boolean` | ✅ | — | |
|
|
2404
|
+
|
|
2405
|
+
**Example:**
|
|
2406
|
+
|
|
2407
|
+
```typescript
|
|
2408
|
+
const result = await zapier.releaseTriggerInboxMessages({
|
|
2409
|
+
inbox: "example-inbox",
|
|
2410
|
+
lease: "example-lease",
|
|
2411
|
+
});
|
|
2412
|
+
```
|
|
2413
|
+
|
|
2414
|
+
#### `resumeTriggerInbox` 🧪 _experimental_
|
|
2415
|
+
|
|
2416
|
+
Resume a paused trigger inbox; events resume being collected
|
|
2417
|
+
|
|
2418
|
+
**Parameters:**
|
|
2419
|
+
|
|
2420
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2421
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2422
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2423
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2424
|
+
|
|
2425
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
2426
|
+
|
|
2427
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2428
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2429
|
+
| `data` | `object` | ✅ | — | |
|
|
2430
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2431
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2432
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2433
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2434
|
+
| ↳ `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 |
|
|
2435
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2436
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2437
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2438
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2439
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2440
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2441
|
+
|
|
2442
|
+
**Example:**
|
|
2443
|
+
|
|
2444
|
+
```typescript
|
|
2445
|
+
const result = await zapier.resumeTriggerInbox({
|
|
2446
|
+
inbox: "example-inbox",
|
|
2447
|
+
});
|
|
2448
|
+
```
|
|
2449
|
+
|
|
2450
|
+
#### `updateTriggerInbox` 🧪 _experimental_
|
|
2451
|
+
|
|
2452
|
+
Update settings on an existing trigger inbox
|
|
2453
|
+
|
|
2454
|
+
**Parameters:**
|
|
2455
|
+
|
|
2456
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2457
|
+
| --------------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
2458
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2459
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2460
|
+
| ↳ `notificationUrl` | `string` | ❌ | — | — | Webhook URL to POST to when new messages arrive. Pass null to clear. |
|
|
2461
|
+
|
|
2462
|
+
**Returns:** `Promise<TriggerInboxItem>`
|
|
2463
|
+
|
|
2464
|
+
| Name | Type | Required | Possible Values | Description |
|
|
2465
|
+
| ---------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
2466
|
+
| `data` | `object` | ✅ | — | |
|
|
2467
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
2468
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
2469
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
2470
|
+
| ↳ `status` | `string` | ✅ | `initializing`, `active`, `paused`, `deleting`, `initialization_failure` | Inbox lifecycle status |
|
|
2471
|
+
| ↳ `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 |
|
|
2472
|
+
| ↳ `notification_url` | `string` | ✅ | — | |
|
|
2473
|
+
| ↳ `subscription` | `object` | ✅ | — | |
|
|
2474
|
+
| ↳ `connection_id` | `string, number` | ✅ | — | |
|
|
2475
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
2476
|
+
| ↳ `action_key` | `string` | ✅ | — | |
|
|
2477
|
+
| ↳ `inputs` | `object` | ✅ | — | |
|
|
2478
|
+
|
|
2479
|
+
**Example:**
|
|
2480
|
+
|
|
2481
|
+
```typescript
|
|
2482
|
+
const result = await zapier.updateTriggerInbox({
|
|
2483
|
+
inbox: "example-inbox",
|
|
2484
|
+
});
|
|
2485
|
+
```
|
|
2486
|
+
|
|
2487
|
+
#### `watchTriggerInbox` 🧪 _experimental_
|
|
2488
|
+
|
|
2489
|
+
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.
|
|
2490
|
+
|
|
2491
|
+
**Parameters:**
|
|
2492
|
+
|
|
2493
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
2494
|
+
| ----------------------------- | ---------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2495
|
+
| `options` | `object` | ✅ | — | — | |
|
|
2496
|
+
| ↳ `inbox` | `string` | ✅ | — | — | Trigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint. |
|
|
2497
|
+
| ↳ `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. |
|
|
2498
|
+
| ↳ `concurrency` | `number` | ❌ | — | — | Per-message handler workers running in parallel. Defaults to `leaseLimit`, or 1 if neither is set. |
|
|
2499
|
+
| ↳ `leaseLimit` | `number` | ❌ | — | — | Per-lease HTTP batch size. Defaults to `concurrency`, or 1 if neither is set. |
|
|
2500
|
+
| ↳ `leaseSeconds` | `number` | ❌ | — | — | Seconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes). |
|
|
2501
|
+
| ↳ `releaseOnError` | `boolean` | ❌ | — | — | If true, errors immediately release the message. If false (default), errors leave it leased until the lease timeout. `ZapierReleaseTriggerMessageSignal` always releases regardless. |
|
|
2502
|
+
| ↳ `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. |
|
|
2503
|
+
| ↳ `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. |
|
|
2504
|
+
| ↳ `signal` | `any` | ❌ | — | — | Abort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject. |
|
|
2505
|
+
| ↳ `maxDrainIntervalSeconds` | `number` | ❌ | — | — | Maximum seconds between empty-inbox poll attempts (default: 60). Caps the back-off cadence. |
|
|
2506
|
+
|
|
2507
|
+
**Returns:** `Promise<void>`
|
|
2508
|
+
|
|
2509
|
+
**Example:**
|
|
2510
|
+
|
|
2511
|
+
```typescript
|
|
2512
|
+
const result = await zapier.watchTriggerInbox({
|
|
2513
|
+
inbox: "example-inbox",
|
|
2514
|
+
onMessage: async (message) => {
|
|
2515
|
+
/* process message */
|
|
2516
|
+
},
|
|
2517
|
+
});
|
|
2518
|
+
```
|