@zapier/zapier-sdk 0.48.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1519 -314
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +10 -1
- package/dist/api/polling.d.ts +7 -0
- package/dist/api/polling.d.ts.map +1 -1
- package/dist/api/polling.js +29 -4
- package/dist/api/types.d.ts +7 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/experimental.cjs +10389 -0
- package/dist/experimental.d.mts +2292 -0
- package/dist/experimental.d.ts +2308 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +155 -0
- package/dist/experimental.mjs +10207 -0
- package/dist/index-C2vsvjgN.d.mts +9539 -0
- package/dist/index-C2vsvjgN.d.ts +9539 -0
- package/dist/index.cjs +817 -603
- package/dist/index.d.mts +6 -8562
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.mjs +805 -603
- package/dist/plugins/apps/index.d.ts +1 -1
- package/dist/plugins/deprecated/inputFields.d.ts +468 -0
- package/dist/plugins/deprecated/inputFields.d.ts.map +1 -0
- package/dist/plugins/deprecated/inputFields.js +73 -0
- package/dist/plugins/fetch/index.d.ts +1 -1
- package/dist/plugins/fetch/schemas.d.ts +1 -1
- package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/index.d.ts +4 -4
- package/dist/plugins/getActionInputFieldsSchema/index.d.ts.map +1 -0
- package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/index.js +4 -4
- package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/schemas.d.ts +8 -8
- package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts.map +1 -0
- package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/schemas.js +13 -10
- package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/index.d.ts +4 -4
- package/dist/plugins/listActionInputFieldChoices/index.d.ts.map +1 -0
- package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/index.js +4 -4
- package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/schemas.d.ts +10 -10
- package/dist/plugins/listActionInputFieldChoices/schemas.d.ts.map +1 -0
- package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/schemas.js +13 -10
- package/dist/plugins/{listInputFields → listActionInputFields}/index.d.ts +4 -4
- package/dist/plugins/listActionInputFields/index.d.ts.map +1 -0
- package/dist/plugins/{listInputFields → listActionInputFields}/index.js +5 -5
- package/dist/plugins/{listInputFields → listActionInputFields}/schemas.d.ts +9 -9
- package/dist/plugins/listActionInputFields/schemas.d.ts.map +1 -0
- package/dist/plugins/{listInputFields → listActionInputFields}/schemas.js +7 -7
- package/dist/plugins/request/index.d.ts +2 -2
- package/dist/plugins/request/schemas.d.ts +2 -2
- package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/index.js +1 -0
- package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/index.js +1 -0
- package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/updateTableRecords/index.js +1 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts +51 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts.map +1 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.js +35 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts +34 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.js +17 -0
- package/dist/plugins/triggers/createTriggerInbox/index.d.ts +62 -0
- package/dist/plugins/triggers/createTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/createTriggerInbox/index.js +54 -0
- package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts +20 -0
- package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/createTriggerInbox/schemas.js +20 -0
- package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts +50 -0
- package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/deleteTriggerInbox/index.js +27 -0
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts +14 -0
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.js +9 -0
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +213 -0
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/drainTriggerInbox/index.js +227 -0
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts +56 -0
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts.map +1 -0
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.js +225 -0
- package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts +104 -0
- package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/drainTriggerInbox/schemas.js +102 -0
- package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts +63 -0
- package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/ensureTriggerInbox/index.js +77 -0
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts +21 -0
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.js +21 -0
- package/dist/plugins/triggers/getTriggerInbox/index.d.ts +50 -0
- package/dist/plugins/triggers/getTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/getTriggerInbox/index.js +26 -0
- package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts +14 -0
- package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/getTriggerInbox/schemas.js +9 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +48 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts.map +1 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.js +23 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts +13 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.js +10 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts +58 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts.map +1 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.js +70 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts +57 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.js +25 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts +51 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/index.js +48 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts +37 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.js +27 -0
- package/dist/plugins/triggers/listTriggerInboxes/index.d.ts +56 -0
- package/dist/plugins/triggers/listTriggerInboxes/index.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInboxes/index.js +51 -0
- package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts +58 -0
- package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInboxes/schemas.js +35 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +77 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.js +30 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts +20 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.js +28 -0
- package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +101 -0
- package/dist/plugins/triggers/listTriggerInputFields/index.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInputFields/index.js +33 -0
- package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts +16 -0
- package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInputFields/schemas.js +21 -0
- package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts +50 -0
- package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/pauseTriggerInbox/index.js +26 -0
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts +14 -0
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.js +9 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts +51 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts.map +1 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.js +37 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts +34 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.js +17 -0
- package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts +50 -0
- package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/resumeTriggerInbox/index.js +26 -0
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts +14 -0
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.js +9 -0
- package/dist/plugins/triggers/shared.d.ts +17 -0
- package/dist/plugins/triggers/shared.d.ts.map +1 -0
- package/dist/plugins/triggers/shared.js +16 -0
- package/dist/plugins/triggers/updateTriggerInbox/index.d.ts +51 -0
- package/dist/plugins/triggers/updateTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/updateTriggerInbox/index.js +30 -0
- package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts +15 -0
- package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/updateTriggerInbox/schemas.js +15 -0
- package/dist/plugins/triggers/utils.d.ts +17 -0
- package/dist/plugins/triggers/utils.d.ts.map +1 -0
- package/dist/plugins/triggers/utils.js +28 -0
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +163 -0
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/watchTriggerInbox/index.js +111 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -0
- package/dist/resolvers/actionKey.d.ts +1 -0
- package/dist/resolvers/actionKey.d.ts.map +1 -1
- package/dist/resolvers/actionKey.js +1 -1
- package/dist/resolvers/index.d.ts +2 -2
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +2 -2
- package/dist/resolvers/triggerInbox.d.ts +4 -0
- package/dist/resolvers/triggerInbox.d.ts.map +1 -0
- package/dist/resolvers/triggerInbox.js +18 -0
- package/dist/schemas/TriggerInbox.d.ts +59 -0
- package/dist/schemas/TriggerInbox.d.ts.map +1 -0
- package/dist/schemas/TriggerInbox.js +81 -0
- package/dist/schemas/TriggerMessage.d.ts +48 -0
- package/dist/schemas/TriggerMessage.d.ts.map +1 -0
- package/dist/schemas/TriggerMessage.js +79 -0
- package/dist/sdk.d.ts +621 -17
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +26 -9
- package/dist/types/errors.d.ts +13 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +16 -0
- package/dist/types/plugin.d.ts +12 -1
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/properties.d.ts +12 -0
- package/dist/types/properties.d.ts.map +1 -1
- package/dist/types/properties.js +25 -0
- package/dist/types/registry.d.ts +5 -0
- package/dist/types/registry.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +2 -2
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/signals.d.ts +20 -0
- package/dist/types/signals.d.ts.map +1 -0
- package/dist/types/signals.js +21 -0
- package/dist/utils/abort-utils.d.ts +13 -0
- package/dist/utils/abort-utils.d.ts.map +1 -1
- package/dist/utils/abort-utils.js +15 -0
- package/dist/utils/retry-utils.d.ts +6 -2
- package/dist/utils/retry-utils.d.ts.map +1 -1
- package/dist/utils/retry-utils.js +22 -3
- package/dist/utils/schema-utils.d.ts +19 -1
- package/dist/utils/schema-utils.d.ts.map +1 -1
- package/package.json +12 -1
- package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFields/index.d.ts.map +0 -1
- package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
package/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
|
|
|
@@ -394,6 +412,17 @@ Get current user's profile information
|
|
|
394
412
|
|
|
395
413
|
**Returns:** `Promise<ProfileItem>`
|
|
396
414
|
|
|
415
|
+
| Name | Type | Required | Possible Values | Description |
|
|
416
|
+
| --------------------- | --------- | -------- | --------------- | ----------- |
|
|
417
|
+
| `data` | `object` | ✅ | — | |
|
|
418
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
419
|
+
| ↳ `first_name` | `string` | ✅ | — | |
|
|
420
|
+
| ↳ `last_name` | `string` | ✅ | — | |
|
|
421
|
+
| ↳ `full_name` | `string` | ✅ | — | |
|
|
422
|
+
| ↳ `email` | `string` | ✅ | — | |
|
|
423
|
+
| ↳ `email_confirmed` | `boolean` | ✅ | — | |
|
|
424
|
+
| ↳ `timezone` | `string` | ✅ | — | |
|
|
425
|
+
|
|
397
426
|
**Example:**
|
|
398
427
|
|
|
399
428
|
```typescript
|
|
@@ -408,199 +437,278 @@ Get detailed information about a specific action
|
|
|
408
437
|
|
|
409
438
|
**Parameters:**
|
|
410
439
|
|
|
411
|
-
| Name
|
|
412
|
-
|
|
|
413
|
-
| `options`
|
|
414
|
-
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
415
|
-
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
416
|
-
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
440
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
441
|
+
| ---------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
442
|
+
| `options` | `object` | ✅ | — | — | |
|
|
443
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
444
|
+
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
445
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
417
446
|
|
|
418
447
|
**Returns:** `Promise<ActionItem>`
|
|
419
448
|
|
|
449
|
+
| Name | Type | Required | Possible Values | Description |
|
|
450
|
+
| ------------------ | --------- | -------- | ---------------------------------------------------------------------------------------------- | ----------- |
|
|
451
|
+
| `data` | `object` | ✅ | — | |
|
|
452
|
+
| ↳ `id` | `string` | ❌ | — | |
|
|
453
|
+
| ↳ `key` | `string` | ✅ | — | |
|
|
454
|
+
| ↳ `description` | `string` | ✅ | — | |
|
|
455
|
+
| ↳ `is_important` | `boolean` | ❌ | — | |
|
|
456
|
+
| ↳ `is_hidden` | `boolean` | ❌ | — | |
|
|
457
|
+
| ↳ `app_key` | `string` | ✅ | — | |
|
|
458
|
+
| ↳ `app_version` | `string` | ❌ | — | |
|
|
459
|
+
| ↳ `action_type` | `string` | ✅ | `filter`, `read`, `read_bulk`, `run`, `search`, `search_and_write`, `search_or_write`, `write` | |
|
|
460
|
+
| ↳ `title` | `string` | ✅ | — | |
|
|
461
|
+
| ↳ `type` | `string` | ✅ | `action` | |
|
|
462
|
+
|
|
420
463
|
**Example:**
|
|
421
464
|
|
|
422
465
|
```typescript
|
|
423
466
|
const { data: action } = await zapier.getAction({
|
|
424
|
-
app: "example-
|
|
467
|
+
app: "example-app",
|
|
425
468
|
actionType: "read",
|
|
426
|
-
action: "example-
|
|
469
|
+
action: "example-action",
|
|
427
470
|
});
|
|
428
471
|
```
|
|
429
472
|
|
|
430
|
-
#### `
|
|
473
|
+
#### `getActionInputFieldsSchema`
|
|
431
474
|
|
|
432
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.
|
|
433
476
|
|
|
434
477
|
**Parameters:**
|
|
435
478
|
|
|
436
|
-
| Name
|
|
437
|
-
|
|
|
438
|
-
| `options`
|
|
439
|
-
| ↳ `app` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
|
|
440
|
-
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
441
|
-
| ↳ `action` | `string` | ✅ | — | — | Action key to get the input schema for |
|
|
442
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
|
|
443
|
-
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
|
|
479
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
480
|
+
| ---------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
481
|
+
| `options` | `object` | ✅ | — | — | |
|
|
482
|
+
| ↳ `app` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
|
|
483
|
+
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
484
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key to get the input schema for |
|
|
485
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
|
|
486
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
|
|
444
487
|
|
|
445
488
|
**Returns:** `Promise<InputSchemaItem>`
|
|
446
489
|
|
|
447
490
|
**Example:**
|
|
448
491
|
|
|
449
492
|
```typescript
|
|
450
|
-
const { data: inputSchema } = await zapier.
|
|
451
|
-
app: "example-
|
|
493
|
+
const { data: inputSchema } = await zapier.getActionInputFieldsSchema({
|
|
494
|
+
app: "example-app",
|
|
452
495
|
actionType: "read",
|
|
453
|
-
action: "example-
|
|
496
|
+
action: "example-action",
|
|
454
497
|
});
|
|
455
498
|
```
|
|
456
499
|
|
|
457
|
-
#### `
|
|
500
|
+
#### `listActionInputFieldChoices`
|
|
458
501
|
|
|
459
|
-
|
|
502
|
+
Get the available choices for a dynamic dropdown input field
|
|
460
503
|
|
|
461
504
|
**Parameters:**
|
|
462
505
|
|
|
463
|
-
| Name
|
|
464
|
-
|
|
|
465
|
-
| `options`
|
|
466
|
-
| ↳ `app` | `string`
|
|
467
|
-
| ↳ `actionType` | `string`
|
|
468
|
-
| ↳ `
|
|
469
|
-
| ↳ `
|
|
470
|
-
| ↳ `
|
|
506
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
507
|
+
| ---------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
508
|
+
| `options` | `object` | ✅ | — | — | |
|
|
509
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
510
|
+
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
511
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
512
|
+
| ↳ `inputField` | `string` | ✅ | — | — | Input field key to get choices for |
|
|
513
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
|
|
514
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
|
|
515
|
+
| ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
|
|
516
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
|
|
517
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
518
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
471
519
|
|
|
472
|
-
**Returns:** `Promise<PaginatedResult<
|
|
520
|
+
**Returns:** `Promise<PaginatedResult<InputFieldChoiceItem>>`
|
|
521
|
+
|
|
522
|
+
| Name | Type | Required | Possible Values | Description |
|
|
523
|
+
| ------------ | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
524
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
525
|
+
| ↳ `key` | `string` | ❌ | — | |
|
|
526
|
+
| ↳ `label` | `string` | ❌ | — | |
|
|
527
|
+
| ↳ `sample` | `string` | ❌ | — | |
|
|
528
|
+
| ↳ `value` | `string` | ❌ | — | |
|
|
529
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
473
530
|
|
|
474
531
|
**Example:**
|
|
475
532
|
|
|
476
533
|
```typescript
|
|
477
534
|
// Get first page and a cursor for the second page
|
|
478
|
-
const { data:
|
|
479
|
-
|
|
480
|
-
|
|
535
|
+
const { data: inputFieldChoices, nextCursor } =
|
|
536
|
+
await zapier.listActionInputFieldChoices({
|
|
537
|
+
app: "example-app",
|
|
538
|
+
actionType: "read",
|
|
539
|
+
action: "example-action",
|
|
540
|
+
inputField: "example-input-field",
|
|
541
|
+
});
|
|
481
542
|
|
|
482
543
|
// Or iterate over all pages
|
|
483
|
-
for await (const page of zapier.
|
|
484
|
-
app: "example-
|
|
544
|
+
for await (const page of zapier.listActionInputFieldChoices({
|
|
545
|
+
app: "example-app",
|
|
546
|
+
actionType: "read",
|
|
547
|
+
action: "example-action",
|
|
548
|
+
inputField: "example-input-field",
|
|
485
549
|
})) {
|
|
486
550
|
// Do something with each page
|
|
487
551
|
}
|
|
488
552
|
|
|
489
553
|
// Or iterate over individual items across all pages
|
|
490
|
-
for await (const
|
|
491
|
-
.
|
|
492
|
-
app: "example-
|
|
554
|
+
for await (const inputFieldChoice of zapier
|
|
555
|
+
.listActionInputFieldChoices({
|
|
556
|
+
app: "example-app",
|
|
557
|
+
actionType: "read",
|
|
558
|
+
action: "example-action",
|
|
559
|
+
inputField: "example-input-field",
|
|
493
560
|
})
|
|
494
561
|
.items()) {
|
|
495
|
-
// Do something with each
|
|
562
|
+
// Do something with each inputFieldChoice
|
|
496
563
|
}
|
|
497
564
|
```
|
|
498
565
|
|
|
499
|
-
#### `
|
|
566
|
+
#### `listActionInputFields`
|
|
500
567
|
|
|
501
|
-
Get the
|
|
568
|
+
Get the input fields required for a specific action
|
|
502
569
|
|
|
503
570
|
**Parameters:**
|
|
504
571
|
|
|
505
|
-
| Name
|
|
506
|
-
|
|
|
507
|
-
| `options`
|
|
508
|
-
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
509
|
-
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
510
|
-
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
511
|
-
| ↳ `
|
|
512
|
-
| ↳ `
|
|
513
|
-
| ↳ `
|
|
514
|
-
| ↳ `
|
|
515
|
-
| ↳ `
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
572
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
573
|
+
| ---------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
574
|
+
| `options` | `object` | ✅ | — | — | |
|
|
575
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
576
|
+
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
577
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
578
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
|
|
579
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
|
|
580
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
|
|
581
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
582
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
583
|
+
|
|
584
|
+
**Returns:** `Promise<PaginatedResult<RootFieldItem>>`
|
|
585
|
+
|
|
586
|
+
| Name | Type | Required | Possible Values | Description |
|
|
587
|
+
| ------------ | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
588
|
+
| `data[]` | `object[]` | ✅ | — | One of the variants below, distinguished by `type` |
|
|
589
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
590
|
+
|
|
591
|
+
**When `type` is `"input_field"`:**
|
|
592
|
+
|
|
593
|
+
| Name | Type | Required | Possible Values | Description |
|
|
594
|
+
| -------------------------- | --------- | -------- | --------------- | ----------- |
|
|
595
|
+
| `type` | `string` | ✅ | `input_field` | |
|
|
596
|
+
| `key` | `string` | ✅ | — | |
|
|
597
|
+
| `default_value` | `string` | ✅ | — | |
|
|
598
|
+
| `depends_on` | `array` | ✅ | — | |
|
|
599
|
+
| `description` | `string` | ✅ | — | |
|
|
600
|
+
| `invalidates_input_fields` | `boolean` | ✅ | — | |
|
|
601
|
+
| `is_required` | `boolean` | ✅ | — | |
|
|
602
|
+
| `placeholder` | `string` | ✅ | — | |
|
|
603
|
+
| `title` | `string` | ✅ | — | |
|
|
604
|
+
| `value_type` | `string` | ✅ | — | |
|
|
605
|
+
| `format` | `string` | ❌ | — | |
|
|
606
|
+
| `items` | `object` | ❌ | — | |
|
|
607
|
+
| ↳ `type` | `string` | ✅ | — | |
|
|
608
|
+
|
|
609
|
+
**When `type` is `"info_field"`:**
|
|
610
|
+
|
|
611
|
+
| Name | Type | Required | Possible Values | Description |
|
|
612
|
+
| ------------- | -------- | -------- | --------------- | ----------- |
|
|
613
|
+
| `type` | `string` | ✅ | `info_field` | |
|
|
614
|
+
| `key` | `string` | ✅ | — | |
|
|
615
|
+
| `description` | `string` | ✅ | — | |
|
|
616
|
+
| `title` | `string` | ❌ | — | |
|
|
617
|
+
|
|
618
|
+
**When `type` is `"fieldset"`:**
|
|
619
|
+
|
|
620
|
+
| Name | Type | Required | Possible Values | Description |
|
|
621
|
+
| -------- | -------- | -------- | --------------- | ----------- |
|
|
622
|
+
| `type` | `string` | ✅ | `fieldset` | |
|
|
623
|
+
| `key` | `string` | ✅ | — | |
|
|
624
|
+
| `title` | `string` | ✅ | — | |
|
|
625
|
+
| `fields` | `array` | ✅ | — | |
|
|
520
626
|
|
|
521
627
|
**Example:**
|
|
522
628
|
|
|
523
629
|
```typescript
|
|
524
630
|
// Get first page and a cursor for the second page
|
|
525
|
-
const { data:
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
inputField: "example-value",
|
|
531
|
-
});
|
|
631
|
+
const { data: rootFields, nextCursor } = await zapier.listActionInputFields({
|
|
632
|
+
app: "example-app",
|
|
633
|
+
actionType: "read",
|
|
634
|
+
action: "example-action",
|
|
635
|
+
});
|
|
532
636
|
|
|
533
637
|
// Or iterate over all pages
|
|
534
|
-
for await (const page of zapier.
|
|
535
|
-
app: "example-
|
|
638
|
+
for await (const page of zapier.listActionInputFields({
|
|
639
|
+
app: "example-app",
|
|
536
640
|
actionType: "read",
|
|
537
|
-
action: "example-
|
|
538
|
-
inputField: "example-value",
|
|
641
|
+
action: "example-action",
|
|
539
642
|
})) {
|
|
540
643
|
// Do something with each page
|
|
541
644
|
}
|
|
542
645
|
|
|
543
646
|
// Or iterate over individual items across all pages
|
|
544
|
-
for await (const
|
|
545
|
-
.
|
|
546
|
-
app: "example-
|
|
647
|
+
for await (const rootField of zapier
|
|
648
|
+
.listActionInputFields({
|
|
649
|
+
app: "example-app",
|
|
547
650
|
actionType: "read",
|
|
548
|
-
action: "example-
|
|
549
|
-
inputField: "example-value",
|
|
651
|
+
action: "example-action",
|
|
550
652
|
})
|
|
551
653
|
.items()) {
|
|
552
|
-
// Do something with each
|
|
654
|
+
// Do something with each rootField
|
|
553
655
|
}
|
|
554
656
|
```
|
|
555
657
|
|
|
556
|
-
#### `
|
|
658
|
+
#### `listActions`
|
|
557
659
|
|
|
558
|
-
|
|
660
|
+
List all actions for a specific app
|
|
559
661
|
|
|
560
662
|
**Parameters:**
|
|
561
663
|
|
|
562
|
-
| Name
|
|
563
|
-
|
|
|
564
|
-
| `options`
|
|
565
|
-
| ↳ `app` | `string`
|
|
566
|
-
| ↳ `actionType` | `string`
|
|
567
|
-
| ↳ `
|
|
568
|
-
| ↳ `
|
|
569
|
-
| ↳ `
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
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>>`
|
|
573
674
|
|
|
574
|
-
|
|
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 |
|
|
575
689
|
|
|
576
690
|
**Example:**
|
|
577
691
|
|
|
578
692
|
```typescript
|
|
579
693
|
// Get first page and a cursor for the second page
|
|
580
|
-
const { data:
|
|
581
|
-
app: "example-
|
|
582
|
-
actionType: "read",
|
|
583
|
-
action: "example-value",
|
|
694
|
+
const { data: actions, nextCursor } = await zapier.listActions({
|
|
695
|
+
app: "example-app",
|
|
584
696
|
});
|
|
585
697
|
|
|
586
698
|
// Or iterate over all pages
|
|
587
|
-
for await (const page of zapier.
|
|
588
|
-
app: "example-
|
|
589
|
-
actionType: "read",
|
|
590
|
-
action: "example-value",
|
|
699
|
+
for await (const page of zapier.listActions({
|
|
700
|
+
app: "example-app",
|
|
591
701
|
})) {
|
|
592
702
|
// Do something with each page
|
|
593
703
|
}
|
|
594
704
|
|
|
595
705
|
// Or iterate over individual items across all pages
|
|
596
|
-
for await (const
|
|
597
|
-
.
|
|
598
|
-
app: "example-
|
|
599
|
-
actionType: "read",
|
|
600
|
-
action: "example-value",
|
|
706
|
+
for await (const action of zapier
|
|
707
|
+
.listActions({
|
|
708
|
+
app: "example-app",
|
|
601
709
|
})
|
|
602
710
|
.items()) {
|
|
603
|
-
// Do something with each
|
|
711
|
+
// Do something with each action
|
|
604
712
|
}
|
|
605
713
|
```
|
|
606
714
|
|
|
@@ -610,18 +718,18 @@ Execute an action with the given inputs
|
|
|
610
718
|
|
|
611
719
|
**Parameters:**
|
|
612
720
|
|
|
613
|
-
| Name
|
|
614
|
-
|
|
|
615
|
-
| `options`
|
|
616
|
-
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
617
|
-
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
618
|
-
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
619
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
|
|
620
|
-
| ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
|
|
621
|
-
| ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
|
|
622
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
|
|
623
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
624
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
721
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
722
|
+
| ---------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
723
|
+
| `options` | `object` | ✅ | — | — | |
|
|
724
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
725
|
+
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
726
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
727
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
|
|
728
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
|
|
729
|
+
| ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
|
|
730
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
|
|
731
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
732
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
625
733
|
|
|
626
734
|
**Returns:** `Promise<PaginatedResult<ActionResultItem>>`
|
|
627
735
|
|
|
@@ -630,16 +738,16 @@ Execute an action with the given inputs
|
|
|
630
738
|
```typescript
|
|
631
739
|
// Get first page and a cursor for the second page
|
|
632
740
|
const { data: actionResults, nextCursor } = await zapier.runAction({
|
|
633
|
-
app: "example-
|
|
741
|
+
app: "example-app",
|
|
634
742
|
actionType: "read",
|
|
635
|
-
action: "example-
|
|
743
|
+
action: "example-action",
|
|
636
744
|
});
|
|
637
745
|
|
|
638
746
|
// Or iterate over all pages
|
|
639
747
|
for await (const page of zapier.runAction({
|
|
640
|
-
app: "example-
|
|
748
|
+
app: "example-app",
|
|
641
749
|
actionType: "read",
|
|
642
|
-
action: "example-
|
|
750
|
+
action: "example-action",
|
|
643
751
|
})) {
|
|
644
752
|
// Do something with each page
|
|
645
753
|
}
|
|
@@ -647,9 +755,9 @@ for await (const page of zapier.runAction({
|
|
|
647
755
|
// Or iterate over individual items across all pages
|
|
648
756
|
for await (const actionResult of zapier
|
|
649
757
|
.runAction({
|
|
650
|
-
app: "example-
|
|
758
|
+
app: "example-app",
|
|
651
759
|
actionType: "read",
|
|
652
|
-
action: "example-
|
|
760
|
+
action: "example-action",
|
|
653
761
|
})
|
|
654
762
|
.items()) {
|
|
655
763
|
// Do something with each actionResult
|
|
@@ -664,10 +772,10 @@ Bind a connection alias or numeric connectionId to an app
|
|
|
664
772
|
|
|
665
773
|
**Parameters:**
|
|
666
774
|
|
|
667
|
-
| Name
|
|
668
|
-
|
|
|
669
|
-
| `options`
|
|
670
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
|
|
775
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
776
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
777
|
+
| `options` | `object` | ✅ | — | — | |
|
|
778
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
|
|
671
779
|
|
|
672
780
|
**Returns:** `Promise<AppProxy>`
|
|
673
781
|
|
|
@@ -683,12 +791,12 @@ Execute an action with the given inputs for the bound app, as an alternative to
|
|
|
683
791
|
|
|
684
792
|
**Parameters:**
|
|
685
793
|
|
|
686
|
-
| Name
|
|
687
|
-
|
|
|
688
|
-
| `options`
|
|
689
|
-
| ↳ `inputs` | `object` | ❌ | — | — | |
|
|
690
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
|
|
691
|
-
| ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
|
|
794
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
795
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
796
|
+
| `options` | `object` | ✅ | — | — | |
|
|
797
|
+
| ↳ `inputs` | `object` | ❌ | — | — | |
|
|
798
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
|
|
799
|
+
| ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
|
|
692
800
|
|
|
693
801
|
**Returns:** `Promise<PaginatedResult<ActionResultItem>>`
|
|
694
802
|
|
|
@@ -721,15 +829,67 @@ Get detailed information about a specific app
|
|
|
721
829
|
| Name | Type | Required | Default | Possible Values | Description |
|
|
722
830
|
| --------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
723
831
|
| `options` | `object` | ✅ | — | — | |
|
|
724
|
-
| ↳ `app`
|
|
832
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
725
833
|
|
|
726
834
|
**Returns:** `Promise<AppItem>`
|
|
727
835
|
|
|
836
|
+
| Name | Type | Required | Possible Values | Description |
|
|
837
|
+
| ---------------------------- | ---------- | -------- | --------------- | --------------------------------------------------- |
|
|
838
|
+
| `data` | `object` | ✅ | — | |
|
|
839
|
+
| ↳ `slug` | `string` | ✅ | — | URL-friendly slug identifier |
|
|
840
|
+
| ↳ `age_in_days` | `number` | ❌ | — | Number of days since the implementation was created |
|
|
841
|
+
| ↳ `auth_type` | `string` | ❌ | — | Authentication type (e.g., oauth2, api_key) |
|
|
842
|
+
| ↳ `banner` | `string` | ❌ | — | Banner message or status indicator |
|
|
843
|
+
| ↳ `categories[]` | `object[]` | ❌ | — | Categories the implementation belongs to |
|
|
844
|
+
| ↳ `id` | `number` | ✅ | — | Unique identifier for the category |
|
|
845
|
+
| ↳ `name` | `string` | ✅ | — | Display name of the category |
|
|
846
|
+
| ↳ `slug` | `string` | ✅ | — | URL-friendly slug for the category |
|
|
847
|
+
| ↳ `images` | `object` | ❌ | — | Icon images at various sizes |
|
|
848
|
+
| ↳ `url_16x16` | `string` | ❌ | — | 16x16 pixel icon URL |
|
|
849
|
+
| ↳ `url_32x32` | `string` | ❌ | — | 32x32 pixel icon URL |
|
|
850
|
+
| ↳ `url_64x64` | `string` | ❌ | — | 64x64 pixel icon URL |
|
|
851
|
+
| ↳ `url_128x128` | `string` | ❌ | — | 128x128 pixel icon URL |
|
|
852
|
+
| ↳ `popularity` | `number` | ❌ | — | Popularity score for ranking apps |
|
|
853
|
+
| ↳ `has_filters` | `boolean` | ❌ | — | Whether the app has filter actions |
|
|
854
|
+
| ↳ `has_reads` | `boolean` | ❌ | — | Whether the app has read actions |
|
|
855
|
+
| ↳ `has_searches` | `boolean` | ❌ | — | Whether the app has search actions |
|
|
856
|
+
| ↳ `has_searches_or_writes` | `boolean` | ❌ | — | Whether the app has search or write actions |
|
|
857
|
+
| ↳ `has_upfront_fields` | `boolean` | ❌ | — | Whether the app has upfront input fields |
|
|
858
|
+
| ↳ `has_writes` | `boolean` | ❌ | — | Whether the app has write actions |
|
|
859
|
+
| ↳ `is_beta` | `boolean` | ❌ | — | Whether the app is in beta |
|
|
860
|
+
| ↳ `is_built_in` | `boolean` | ❌ | — | Whether the app is a built-in Zapier app |
|
|
861
|
+
| ↳ `is_deprecated` | `boolean` | ❌ | — | Whether the app is deprecated |
|
|
862
|
+
| ↳ `is_featured` | `boolean` | ❌ | — | Whether the app is featured |
|
|
863
|
+
| ↳ `is_hidden` | `boolean` | ❌ | — | Whether the app is hidden from listings |
|
|
864
|
+
| ↳ `is_invite` | `boolean` | ❌ | — | Whether the app is invite-only |
|
|
865
|
+
| ↳ `is_premium` | `boolean` | ❌ | — | Whether the app requires a premium plan |
|
|
866
|
+
| ↳ `is_public` | `boolean` | ❌ | — | Whether the app is publicly available |
|
|
867
|
+
| ↳ `is_upcoming` | `boolean` | ❌ | — | Whether the app is upcoming/not yet released |
|
|
868
|
+
| ↳ `version` | `string` | ❌ | — | App version |
|
|
869
|
+
| ↳ `visibility` | `string` | ❌ | — | Visibility status (e.g., public, private) |
|
|
870
|
+
| ↳ `actions` | `object` | ❌ | — | Count of available actions by type |
|
|
871
|
+
| ↳ `read` | `number` | ❌ | — | Number of read actions |
|
|
872
|
+
| ↳ `read_bulk` | `number` | ❌ | — | Number of bulk read actions |
|
|
873
|
+
| ↳ `write` | `number` | ❌ | — | Number of write actions |
|
|
874
|
+
| ↳ `search` | `number` | ❌ | — | Number of search actions |
|
|
875
|
+
| ↳ `search_or_write` | `number` | ❌ | — | Number of search-or-write actions |
|
|
876
|
+
| ↳ `search_and_write` | `number` | ❌ | — | Number of search-and-write actions |
|
|
877
|
+
| ↳ `filter` | `number` | ❌ | — | Number of filter actions |
|
|
878
|
+
| ↳ `description` | `string` | ❌ | — | Description of the app |
|
|
879
|
+
| ↳ `primary_color` | `string` | ❌ | — | Primary brand color (hex) |
|
|
880
|
+
| ↳ `secondary_color` | `string` | ❌ | — | Secondary brand color (hex) |
|
|
881
|
+
| ↳ `classification` | `string` | ❌ | — | App classification category |
|
|
882
|
+
| ↳ `api_docs_url` | `string` | ❌ | — | URL to API documentation |
|
|
883
|
+
| ↳ `image` | `string` | ❌ | — | Default image URL for the app |
|
|
884
|
+
| ↳ `title` | `string` | ✅ | — | Display name of the app |
|
|
885
|
+
| ↳ `key` | `string` | ✅ | — | App key (versionless implementation name) |
|
|
886
|
+
| ↳ `implementation_id` | `string` | ✅ | — | Full implementation ID including version |
|
|
887
|
+
|
|
728
888
|
**Example:**
|
|
729
889
|
|
|
730
890
|
```typescript
|
|
731
891
|
const { data: app } = await zapier.getApp({
|
|
732
|
-
app: "example-
|
|
892
|
+
app: "example-app",
|
|
733
893
|
});
|
|
734
894
|
```
|
|
735
895
|
|
|
@@ -739,17 +899,70 @@ List all available apps with optional filtering
|
|
|
739
899
|
|
|
740
900
|
**Parameters:**
|
|
741
901
|
|
|
742
|
-
| Name
|
|
743
|
-
|
|
|
744
|
-
| `options`
|
|
745
|
-
| ↳ `search` | `string` | ❌ | — | — | Search term to filter apps by name |
|
|
746
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of apps per page |
|
|
747
|
-
| ↳ `apps` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
748
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
749
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
902
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
903
|
+
| -------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------- |
|
|
904
|
+
| `options` | `object` | ✅ | — | — | |
|
|
905
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter apps by name |
|
|
906
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of apps per page |
|
|
907
|
+
| ↳ `apps` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
908
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
909
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
750
910
|
|
|
751
911
|
**Returns:** `Promise<PaginatedResult<AppItem>>`
|
|
752
912
|
|
|
913
|
+
| Name | Type | Required | Possible Values | Description |
|
|
914
|
+
| ---------------------------- | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
915
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
916
|
+
| ↳ `slug` | `string` | ✅ | — | URL-friendly slug identifier |
|
|
917
|
+
| ↳ `age_in_days` | `number` | ❌ | — | Number of days since the implementation was created |
|
|
918
|
+
| ↳ `auth_type` | `string` | ❌ | — | Authentication type (e.g., oauth2, api_key) |
|
|
919
|
+
| ↳ `banner` | `string` | ❌ | — | Banner message or status indicator |
|
|
920
|
+
| ↳ `categories[]` | `object[]` | ❌ | — | Categories the implementation belongs to |
|
|
921
|
+
| ↳ `id` | `number` | ✅ | — | Unique identifier for the category |
|
|
922
|
+
| ↳ `name` | `string` | ✅ | — | Display name of the category |
|
|
923
|
+
| ↳ `slug` | `string` | ✅ | — | URL-friendly slug for the category |
|
|
924
|
+
| ↳ `images` | `object` | ❌ | — | Icon images at various sizes |
|
|
925
|
+
| ↳ `url_16x16` | `string` | ❌ | — | 16x16 pixel icon URL |
|
|
926
|
+
| ↳ `url_32x32` | `string` | ❌ | — | 32x32 pixel icon URL |
|
|
927
|
+
| ↳ `url_64x64` | `string` | ❌ | — | 64x64 pixel icon URL |
|
|
928
|
+
| ↳ `url_128x128` | `string` | ❌ | — | 128x128 pixel icon URL |
|
|
929
|
+
| ↳ `popularity` | `number` | ❌ | — | Popularity score for ranking apps |
|
|
930
|
+
| ↳ `has_filters` | `boolean` | ❌ | — | Whether the app has filter actions |
|
|
931
|
+
| ↳ `has_reads` | `boolean` | ❌ | — | Whether the app has read actions |
|
|
932
|
+
| ↳ `has_searches` | `boolean` | ❌ | — | Whether the app has search actions |
|
|
933
|
+
| ↳ `has_searches_or_writes` | `boolean` | ❌ | — | Whether the app has search or write actions |
|
|
934
|
+
| ↳ `has_upfront_fields` | `boolean` | ❌ | — | Whether the app has upfront input fields |
|
|
935
|
+
| ↳ `has_writes` | `boolean` | ❌ | — | Whether the app has write actions |
|
|
936
|
+
| ↳ `is_beta` | `boolean` | ❌ | — | Whether the app is in beta |
|
|
937
|
+
| ↳ `is_built_in` | `boolean` | ❌ | — | Whether the app is a built-in Zapier app |
|
|
938
|
+
| ↳ `is_deprecated` | `boolean` | ❌ | — | Whether the app is deprecated |
|
|
939
|
+
| ↳ `is_featured` | `boolean` | ❌ | — | Whether the app is featured |
|
|
940
|
+
| ↳ `is_hidden` | `boolean` | ❌ | — | Whether the app is hidden from listings |
|
|
941
|
+
| ↳ `is_invite` | `boolean` | ❌ | — | Whether the app is invite-only |
|
|
942
|
+
| ↳ `is_premium` | `boolean` | ❌ | — | Whether the app requires a premium plan |
|
|
943
|
+
| ↳ `is_public` | `boolean` | ❌ | — | Whether the app is publicly available |
|
|
944
|
+
| ↳ `is_upcoming` | `boolean` | ❌ | — | Whether the app is upcoming/not yet released |
|
|
945
|
+
| ↳ `version` | `string` | ❌ | — | App version |
|
|
946
|
+
| ↳ `visibility` | `string` | ❌ | — | Visibility status (e.g., public, private) |
|
|
947
|
+
| ↳ `actions` | `object` | ❌ | — | Count of available actions by type |
|
|
948
|
+
| ↳ `read` | `number` | ❌ | — | Number of read actions |
|
|
949
|
+
| ↳ `read_bulk` | `number` | ❌ | — | Number of bulk read actions |
|
|
950
|
+
| ↳ `write` | `number` | ❌ | — | Number of write actions |
|
|
951
|
+
| ↳ `search` | `number` | ❌ | — | Number of search actions |
|
|
952
|
+
| ↳ `search_or_write` | `number` | ❌ | — | Number of search-or-write actions |
|
|
953
|
+
| ↳ `search_and_write` | `number` | ❌ | — | Number of search-and-write actions |
|
|
954
|
+
| ↳ `filter` | `number` | ❌ | — | Number of filter actions |
|
|
955
|
+
| ↳ `description` | `string` | ❌ | — | Description of the app |
|
|
956
|
+
| ↳ `primary_color` | `string` | ❌ | — | Primary brand color (hex) |
|
|
957
|
+
| ↳ `secondary_color` | `string` | ❌ | — | Secondary brand color (hex) |
|
|
958
|
+
| ↳ `classification` | `string` | ❌ | — | App classification category |
|
|
959
|
+
| ↳ `api_docs_url` | `string` | ❌ | — | URL to API documentation |
|
|
960
|
+
| ↳ `image` | `string` | ❌ | — | Default image URL for the app |
|
|
961
|
+
| ↳ `title` | `string` | ✅ | — | Display name of the app |
|
|
962
|
+
| ↳ `key` | `string` | ✅ | — | App key (versionless implementation name) |
|
|
963
|
+
| ↳ `implementation_id` | `string` | ✅ | — | Full implementation ID including version |
|
|
964
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
965
|
+
|
|
753
966
|
**Example:**
|
|
754
967
|
|
|
755
968
|
```typescript
|
|
@@ -775,19 +988,26 @@ Create new client credentials for the authenticated user
|
|
|
775
988
|
|
|
776
989
|
**Parameters:**
|
|
777
990
|
|
|
778
|
-
| Name
|
|
779
|
-
|
|
|
780
|
-
| `options`
|
|
781
|
-
| ↳ `name` | `string` | ✅ | — | — | Human-readable name for the client credentials |
|
|
782
|
-
| ↳ `allowedScopes` | `array` | ❌ | `["external"]` | — | Scopes to allow for these credentials |
|
|
991
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
992
|
+
| ------------------- | -------- | -------- | -------------- | --------------- | ---------------------------------------------- |
|
|
993
|
+
| `options` | `object` | ✅ | — | — | |
|
|
994
|
+
| ↳ `name` | `string` | ✅ | — | — | Human-readable name for the client credentials |
|
|
995
|
+
| ↳ `allowedScopes` | `array` | ❌ | `["external"]` | — | Scopes to allow for these credentials |
|
|
783
996
|
|
|
784
|
-
**Returns:** `Promise<
|
|
997
|
+
**Returns:** `Promise<ClientCredentialsItem>`
|
|
998
|
+
|
|
999
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1000
|
+
| ------------------- | -------- | -------- | --------------- | ---------------------------------------------------------- |
|
|
1001
|
+
| `data` | `object` | ✅ | — | |
|
|
1002
|
+
| ↳ `client_id` | `string` | ✅ | — | The public identifier (Client ID) of the OAuth application |
|
|
1003
|
+
| ↳ `name` | `string` | ✅ | — | Human-readable name of the OAuth application |
|
|
1004
|
+
| ↳ `client_secret` | `string` | ✅ | — | The client secret (only shown once on creation) |
|
|
785
1005
|
|
|
786
1006
|
**Example:**
|
|
787
1007
|
|
|
788
1008
|
```typescript
|
|
789
1009
|
const result = await zapier.createClientCredentials({
|
|
790
|
-
name: "example-
|
|
1010
|
+
name: "example-name",
|
|
791
1011
|
});
|
|
792
1012
|
```
|
|
793
1013
|
|
|
@@ -797,18 +1017,18 @@ Delete client credentials by client ID
|
|
|
797
1017
|
|
|
798
1018
|
**Parameters:**
|
|
799
1019
|
|
|
800
|
-
| Name
|
|
801
|
-
|
|
|
802
|
-
| `options`
|
|
803
|
-
| ↳ `clientId` | `string` | ✅ | — | — | The client ID of the client credentials to delete |
|
|
1020
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1021
|
+
| -------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------- |
|
|
1022
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1023
|
+
| ↳ `clientId` | `string` | ✅ | — | — | The client ID of the client credentials to delete |
|
|
804
1024
|
|
|
805
|
-
**Returns:** `Promise<
|
|
1025
|
+
**Returns:** `Promise<{ success: boolean }>`
|
|
806
1026
|
|
|
807
1027
|
**Example:**
|
|
808
1028
|
|
|
809
1029
|
```typescript
|
|
810
1030
|
const result = await zapier.deleteClientCredentials({
|
|
811
|
-
clientId: "example-id",
|
|
1031
|
+
clientId: "example-client-id",
|
|
812
1032
|
});
|
|
813
1033
|
```
|
|
814
1034
|
|
|
@@ -818,15 +1038,25 @@ List client credentials for the authenticated user
|
|
|
818
1038
|
|
|
819
1039
|
**Parameters:**
|
|
820
1040
|
|
|
821
|
-
| Name
|
|
822
|
-
|
|
|
823
|
-
| `options`
|
|
824
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of credentials per page |
|
|
825
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
826
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
1041
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1042
|
+
| -------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------- |
|
|
1043
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1044
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of credentials per page |
|
|
1045
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
1046
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
827
1047
|
|
|
828
1048
|
**Returns:** `Promise<PaginatedResult<ClientCredentialsItem>>`
|
|
829
1049
|
|
|
1050
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1051
|
+
| -------------------- | ---------- | -------- | --------------- | ---------------------------------------------------------------- |
|
|
1052
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1053
|
+
| ↳ `client_id` | `string` | ✅ | — | The public identifier (Client ID) of the OAuth application |
|
|
1054
|
+
| ↳ `name` | `string` | ✅ | — | Human-readable name of the OAuth application |
|
|
1055
|
+
| ↳ `allowed_scopes` | `array` | ✅ | — | List of OAuth scopes that this application is allowed to request |
|
|
1056
|
+
| ↳ `created_at` | `string` | ❌ | — | When the application was created (ISO 8601) |
|
|
1057
|
+
| ↳ `updated_at` | `string` | ❌ | — | When the application was last updated (ISO 8601) |
|
|
1058
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
1059
|
+
|
|
830
1060
|
**Example:**
|
|
831
1061
|
|
|
832
1062
|
```typescript
|
|
@@ -853,19 +1083,50 @@ Find the first connection matching the criteria
|
|
|
853
1083
|
|
|
854
1084
|
**Parameters:**
|
|
855
1085
|
|
|
856
|
-
| Name
|
|
857
|
-
|
|
|
858
|
-
| `options`
|
|
859
|
-
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
860
|
-
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
861
|
-
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
862
|
-
| ↳ `app` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
863
|
-
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
864
|
-
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
865
|
-
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
1086
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1087
|
+
| ------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1088
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1089
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
1090
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
1091
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
1092
|
+
| ↳ `app` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
1093
|
+
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
1094
|
+
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
1095
|
+
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
866
1096
|
|
|
867
1097
|
**Returns:** `Promise<ConnectionItem>`
|
|
868
1098
|
|
|
1099
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1100
|
+
| ------------------------------ | --------- | -------- | --------------- | ---------------------------------------------------------- |
|
|
1101
|
+
| `data` | `object` | ✅ | — | |
|
|
1102
|
+
| ↳ `id` | `string` | ✅ | — | Unique identifier for the connection |
|
|
1103
|
+
| ↳ `date` | `string` | ✅ | — | Date created |
|
|
1104
|
+
| ↳ `lastchanged` | `string` | ❌ | — | Date last changed |
|
|
1105
|
+
| ↳ `account_id` | `string` | ✅ | — | Account ID associated with this connection |
|
|
1106
|
+
| ↳ `destination_selected_api` | `string` | ❌ | — | Destination API key (if applicable) |
|
|
1107
|
+
| ↳ `is_invite_only` | `boolean` | ✅ | — | Whether the connection is invite-only |
|
|
1108
|
+
| ↳ `is_private` | `boolean` | ✅ | — | Whether the connection is private |
|
|
1109
|
+
| ↳ `shared_with_all` | `boolean` | ✅ | — | Whether the connection is shared with all users |
|
|
1110
|
+
| ↳ `is_stale` | `string` | ❌ | — | Stale status string |
|
|
1111
|
+
| ↳ `is_shared` | `string` | ❌ | — | Shared status string |
|
|
1112
|
+
| ↳ `marked_stale_at` | `string` | ❌ | — | Date when marked stale |
|
|
1113
|
+
| ↳ `label` | `string` | ❌ | — | User label for the connection |
|
|
1114
|
+
| ↳ `identifier` | `string` | ❌ | — | Identifier |
|
|
1115
|
+
| ↳ `title` | `string` | ❌ | — | Title of the connection |
|
|
1116
|
+
| ↳ `url` | `string` | ❌ | — | URL to the connection resource |
|
|
1117
|
+
| ↳ `groups` | `array` | ❌ | — | Array of groups associated with the connection |
|
|
1118
|
+
| ↳ `members` | `string` | ❌ | — | Members associated with the connection |
|
|
1119
|
+
| ↳ `permissions` | `object` | ❌ | — | Permissions for the connection |
|
|
1120
|
+
| ↳ `public_id` | `string` | ❌ | — | Public UUID for the connection |
|
|
1121
|
+
| ↳ `account_public_id` | `string` | ❌ | — | Public UUID for the associated account |
|
|
1122
|
+
| ↳ `customuser_public_id` | `string` | ❌ | — | Public UUID for the associated custom user |
|
|
1123
|
+
| ↳ `implementation_id` | `string` | ❌ | — | Implementation ID (was selected_api) |
|
|
1124
|
+
| ↳ `profile_id` | `string` | ❌ | — | Profile ID (was customuser_id) |
|
|
1125
|
+
| ↳ `is_expired` | `string` | ❌ | — | Whether the connection is expired (mapped from is_stale) |
|
|
1126
|
+
| ↳ `expired_at` | `string` | ❌ | — | Date when connection expired (mapped from marked_stale_at) |
|
|
1127
|
+
| ↳ `app_key` | `string` | ❌ | — | App Key extracted from implementation_id |
|
|
1128
|
+
| ↳ `app_version` | `string` | ❌ | — | App Version extracted from implementation_id |
|
|
1129
|
+
|
|
869
1130
|
**Example:**
|
|
870
1131
|
|
|
871
1132
|
```typescript
|
|
@@ -878,19 +1139,50 @@ Find a unique connection matching the criteria
|
|
|
878
1139
|
|
|
879
1140
|
**Parameters:**
|
|
880
1141
|
|
|
881
|
-
| Name
|
|
882
|
-
|
|
|
883
|
-
| `options`
|
|
884
|
-
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
885
|
-
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
886
|
-
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
887
|
-
| ↳ `app` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
888
|
-
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
889
|
-
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
890
|
-
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
1142
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1143
|
+
| ------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1144
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1145
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
1146
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
1147
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
1148
|
+
| ↳ `app` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
1149
|
+
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
1150
|
+
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
1151
|
+
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
891
1152
|
|
|
892
1153
|
**Returns:** `Promise<ConnectionItem>`
|
|
893
1154
|
|
|
1155
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1156
|
+
| ------------------------------ | --------- | -------- | --------------- | ---------------------------------------------------------- |
|
|
1157
|
+
| `data` | `object` | ✅ | — | |
|
|
1158
|
+
| ↳ `id` | `string` | ✅ | — | Unique identifier for the connection |
|
|
1159
|
+
| ↳ `date` | `string` | ✅ | — | Date created |
|
|
1160
|
+
| ↳ `lastchanged` | `string` | ❌ | — | Date last changed |
|
|
1161
|
+
| ↳ `account_id` | `string` | ✅ | — | Account ID associated with this connection |
|
|
1162
|
+
| ↳ `destination_selected_api` | `string` | ❌ | — | Destination API key (if applicable) |
|
|
1163
|
+
| ↳ `is_invite_only` | `boolean` | ✅ | — | Whether the connection is invite-only |
|
|
1164
|
+
| ↳ `is_private` | `boolean` | ✅ | — | Whether the connection is private |
|
|
1165
|
+
| ↳ `shared_with_all` | `boolean` | ✅ | — | Whether the connection is shared with all users |
|
|
1166
|
+
| ↳ `is_stale` | `string` | ❌ | — | Stale status string |
|
|
1167
|
+
| ↳ `is_shared` | `string` | ❌ | — | Shared status string |
|
|
1168
|
+
| ↳ `marked_stale_at` | `string` | ❌ | — | Date when marked stale |
|
|
1169
|
+
| ↳ `label` | `string` | ❌ | — | User label for the connection |
|
|
1170
|
+
| ↳ `identifier` | `string` | ❌ | — | Identifier |
|
|
1171
|
+
| ↳ `title` | `string` | ❌ | — | Title of the connection |
|
|
1172
|
+
| ↳ `url` | `string` | ❌ | — | URL to the connection resource |
|
|
1173
|
+
| ↳ `groups` | `array` | ❌ | — | Array of groups associated with the connection |
|
|
1174
|
+
| ↳ `members` | `string` | ❌ | — | Members associated with the connection |
|
|
1175
|
+
| ↳ `permissions` | `object` | ❌ | — | Permissions for the connection |
|
|
1176
|
+
| ↳ `public_id` | `string` | ❌ | — | Public UUID for the connection |
|
|
1177
|
+
| ↳ `account_public_id` | `string` | ❌ | — | Public UUID for the associated account |
|
|
1178
|
+
| ↳ `customuser_public_id` | `string` | ❌ | — | Public UUID for the associated custom user |
|
|
1179
|
+
| ↳ `implementation_id` | `string` | ❌ | — | Implementation ID (was selected_api) |
|
|
1180
|
+
| ↳ `profile_id` | `string` | ❌ | — | Profile ID (was customuser_id) |
|
|
1181
|
+
| ↳ `is_expired` | `string` | ❌ | — | Whether the connection is expired (mapped from is_stale) |
|
|
1182
|
+
| ↳ `expired_at` | `string` | ❌ | — | Date when connection expired (mapped from marked_stale_at) |
|
|
1183
|
+
| ↳ `app_key` | `string` | ❌ | — | App Key extracted from implementation_id |
|
|
1184
|
+
| ↳ `app_version` | `string` | ❌ | — | App Version extracted from implementation_id |
|
|
1185
|
+
|
|
894
1186
|
**Example:**
|
|
895
1187
|
|
|
896
1188
|
```typescript
|
|
@@ -903,13 +1195,44 @@ Execute getConnection
|
|
|
903
1195
|
|
|
904
1196
|
**Parameters:**
|
|
905
1197
|
|
|
906
|
-
| Name
|
|
907
|
-
|
|
|
908
|
-
| `options`
|
|
909
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
|
|
1198
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1199
|
+
| ---------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1200
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1201
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
|
|
910
1202
|
|
|
911
1203
|
**Returns:** `Promise<ConnectionItem>`
|
|
912
1204
|
|
|
1205
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1206
|
+
| ------------------------------ | --------- | -------- | --------------- | ---------------------------------------------------------- |
|
|
1207
|
+
| `data` | `object` | ✅ | — | |
|
|
1208
|
+
| ↳ `id` | `string` | ✅ | — | Unique identifier for the connection |
|
|
1209
|
+
| ↳ `date` | `string` | ✅ | — | Date created |
|
|
1210
|
+
| ↳ `lastchanged` | `string` | ❌ | — | Date last changed |
|
|
1211
|
+
| ↳ `account_id` | `string` | ✅ | — | Account ID associated with this connection |
|
|
1212
|
+
| ↳ `destination_selected_api` | `string` | ❌ | — | Destination API key (if applicable) |
|
|
1213
|
+
| ↳ `is_invite_only` | `boolean` | ✅ | — | Whether the connection is invite-only |
|
|
1214
|
+
| ↳ `is_private` | `boolean` | ✅ | — | Whether the connection is private |
|
|
1215
|
+
| ↳ `shared_with_all` | `boolean` | ✅ | — | Whether the connection is shared with all users |
|
|
1216
|
+
| ↳ `is_stale` | `string` | ❌ | — | Stale status string |
|
|
1217
|
+
| ↳ `is_shared` | `string` | ❌ | — | Shared status string |
|
|
1218
|
+
| ↳ `marked_stale_at` | `string` | ❌ | — | Date when marked stale |
|
|
1219
|
+
| ↳ `label` | `string` | ❌ | — | User label for the connection |
|
|
1220
|
+
| ↳ `identifier` | `string` | ❌ | — | Identifier |
|
|
1221
|
+
| ↳ `title` | `string` | ❌ | — | Title of the connection |
|
|
1222
|
+
| ↳ `url` | `string` | ❌ | — | URL to the connection resource |
|
|
1223
|
+
| ↳ `groups` | `array` | ❌ | — | Array of groups associated with the connection |
|
|
1224
|
+
| ↳ `members` | `string` | ❌ | — | Members associated with the connection |
|
|
1225
|
+
| ↳ `permissions` | `object` | ❌ | — | Permissions for the connection |
|
|
1226
|
+
| ↳ `public_id` | `string` | ❌ | — | Public UUID for the connection |
|
|
1227
|
+
| ↳ `account_public_id` | `string` | ❌ | — | Public UUID for the associated account |
|
|
1228
|
+
| ↳ `customuser_public_id` | `string` | ❌ | — | Public UUID for the associated custom user |
|
|
1229
|
+
| ↳ `implementation_id` | `string` | ❌ | — | Implementation ID (was selected_api) |
|
|
1230
|
+
| ↳ `profile_id` | `string` | ❌ | — | Profile ID (was customuser_id) |
|
|
1231
|
+
| ↳ `is_expired` | `string` | ❌ | — | Whether the connection is expired (mapped from is_stale) |
|
|
1232
|
+
| ↳ `expired_at` | `string` | ❌ | — | Date when connection expired (mapped from marked_stale_at) |
|
|
1233
|
+
| ↳ `app_key` | `string` | ❌ | — | App Key extracted from implementation_id |
|
|
1234
|
+
| ↳ `app_version` | `string` | ❌ | — | App Version extracted from implementation_id |
|
|
1235
|
+
|
|
913
1236
|
**Example:**
|
|
914
1237
|
|
|
915
1238
|
```typescript
|
|
@@ -922,23 +1245,55 @@ List available connections with optional filtering
|
|
|
922
1245
|
|
|
923
1246
|
**Parameters:**
|
|
924
1247
|
|
|
925
|
-
| Name
|
|
926
|
-
|
|
|
927
|
-
| `options`
|
|
928
|
-
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
929
|
-
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
930
|
-
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
931
|
-
| ↳ `app` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
932
|
-
| ↳ `connections` | `array` | ❌ | — | — | List of connection IDs to filter by |
|
|
933
|
-
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
934
|
-
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
935
|
-
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
936
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of connections per page |
|
|
937
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
938
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
1248
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1249
|
+
| ------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1250
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1251
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
1252
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
1253
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
1254
|
+
| ↳ `app` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
1255
|
+
| ↳ `connections` | `array` | ❌ | — | — | List of connection IDs to filter by |
|
|
1256
|
+
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
1257
|
+
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
1258
|
+
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
1259
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of connections per page |
|
|
1260
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
1261
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
939
1262
|
|
|
940
1263
|
**Returns:** `Promise<PaginatedResult<ConnectionItem>>`
|
|
941
1264
|
|
|
1265
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1266
|
+
| ------------------------------ | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
1267
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1268
|
+
| ↳ `id` | `string` | ✅ | — | Unique identifier for the connection |
|
|
1269
|
+
| ↳ `date` | `string` | ✅ | — | Date created |
|
|
1270
|
+
| ↳ `lastchanged` | `string` | ❌ | — | Date last changed |
|
|
1271
|
+
| ↳ `account_id` | `string` | ✅ | — | Account ID associated with this connection |
|
|
1272
|
+
| ↳ `destination_selected_api` | `string` | ❌ | — | Destination API key (if applicable) |
|
|
1273
|
+
| ↳ `is_invite_only` | `boolean` | ✅ | — | Whether the connection is invite-only |
|
|
1274
|
+
| ↳ `is_private` | `boolean` | ✅ | — | Whether the connection is private |
|
|
1275
|
+
| ↳ `shared_with_all` | `boolean` | ✅ | — | Whether the connection is shared with all users |
|
|
1276
|
+
| ↳ `is_stale` | `string` | ❌ | — | Stale status string |
|
|
1277
|
+
| ↳ `is_shared` | `string` | ❌ | — | Shared status string |
|
|
1278
|
+
| ↳ `marked_stale_at` | `string` | ❌ | — | Date when marked stale |
|
|
1279
|
+
| ↳ `label` | `string` | ❌ | — | User label for the connection |
|
|
1280
|
+
| ↳ `identifier` | `string` | ❌ | — | Identifier |
|
|
1281
|
+
| ↳ `title` | `string` | ❌ | — | Title of the connection |
|
|
1282
|
+
| ↳ `url` | `string` | ❌ | — | URL to the connection resource |
|
|
1283
|
+
| ↳ `groups` | `array` | ❌ | — | Array of groups associated with the connection |
|
|
1284
|
+
| ↳ `members` | `string` | ❌ | — | Members associated with the connection |
|
|
1285
|
+
| ↳ `permissions` | `object` | ❌ | — | Permissions for the connection |
|
|
1286
|
+
| ↳ `public_id` | `string` | ❌ | — | Public UUID for the connection |
|
|
1287
|
+
| ↳ `account_public_id` | `string` | ❌ | — | Public UUID for the associated account |
|
|
1288
|
+
| ↳ `customuser_public_id` | `string` | ❌ | — | Public UUID for the associated custom user |
|
|
1289
|
+
| ↳ `implementation_id` | `string` | ❌ | — | Implementation ID (was selected_api) |
|
|
1290
|
+
| ↳ `profile_id` | `string` | ❌ | — | Profile ID (was customuser_id) |
|
|
1291
|
+
| ↳ `is_expired` | `string` | ❌ | — | Whether the connection is expired (mapped from is_stale) |
|
|
1292
|
+
| ↳ `expired_at` | `string` | ❌ | — | Date when connection expired (mapped from marked_stale_at) |
|
|
1293
|
+
| ↳ `app_key` | `string` | ❌ | — | App Key extracted from implementation_id |
|
|
1294
|
+
| ↳ `app_version` | `string` | ❌ | — | App Version extracted from implementation_id |
|
|
1295
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
1296
|
+
|
|
942
1297
|
**Example:**
|
|
943
1298
|
|
|
944
1299
|
```typescript
|
|
@@ -964,23 +1319,23 @@ Make authenticated HTTP requests to any API through Zapier. Pass a connectionId
|
|
|
964
1319
|
|
|
965
1320
|
**Parameters:**
|
|
966
1321
|
|
|
967
|
-
| Name
|
|
968
|
-
|
|
|
969
|
-
| `url`
|
|
970
|
-
| `init`
|
|
971
|
-
| ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET) |
|
|
972
|
-
| ↳ `headers` | `object` | ❌ | — | — | HTTP headers to include in the request |
|
|
973
|
-
| ↳ `body` | `string, custom, record` | ❌ | — | — | Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly |
|
|
974
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
|
|
975
|
-
| ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
|
|
976
|
-
| ↳ `maxTime` | `number` | ❌ | — | — | Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling. |
|
|
1322
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1323
|
+
| ----------------- | ------------------------ | -------- | ------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1324
|
+
| `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service) |
|
|
1325
|
+
| `init` | `object` | ❌ | — | — | Request options including method, headers, body, and authentication |
|
|
1326
|
+
| ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET) |
|
|
1327
|
+
| ↳ `headers` | `object` | ❌ | — | — | HTTP headers to include in the request |
|
|
1328
|
+
| ↳ `body` | `string, custom, record` | ❌ | — | — | Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly |
|
|
1329
|
+
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
|
|
1330
|
+
| ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
|
|
1331
|
+
| ↳ `maxTime` | `number` | ❌ | — | — | Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling. |
|
|
977
1332
|
|
|
978
1333
|
**Returns:** `Promise<Response>`
|
|
979
1334
|
|
|
980
1335
|
**Example:**
|
|
981
1336
|
|
|
982
1337
|
```typescript
|
|
983
|
-
const result = await zapier.fetch("example
|
|
1338
|
+
const result = await zapier.fetch("https://example.com", {});
|
|
984
1339
|
```
|
|
985
1340
|
|
|
986
1341
|
### Tables
|
|
@@ -991,19 +1346,32 @@ Create a new table
|
|
|
991
1346
|
|
|
992
1347
|
**Parameters:**
|
|
993
1348
|
|
|
994
|
-
| Name
|
|
995
|
-
|
|
|
996
|
-
| `options`
|
|
997
|
-
| ↳ `name` | `string` | ✅ | — | — | The name for the new table |
|
|
998
|
-
| ↳ `description` | `string` | ❌ | — | — | An optional description of the table |
|
|
1349
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1350
|
+
| ----------------- | -------- | -------- | ------- | --------------- | ------------------------------------ |
|
|
1351
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1352
|
+
| ↳ `name` | `string` | ✅ | — | — | The name for the new table |
|
|
1353
|
+
| ↳ `description` | `string` | ❌ | — | — | An optional description of the table |
|
|
999
1354
|
|
|
1000
|
-
**Returns:** `Promise<
|
|
1355
|
+
**Returns:** `Promise<TableItem>`
|
|
1356
|
+
|
|
1357
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1358
|
+
| --------------------- | -------- | -------- | ------------------------ | ----------- |
|
|
1359
|
+
| `data` | `object` | ✅ | — | |
|
|
1360
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1361
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1362
|
+
| ↳ `description` | `string` | ❌ | — | |
|
|
1363
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1364
|
+
| ↳ `edited_at` | `string` | ✅ | — | |
|
|
1365
|
+
| ↳ `kind` | `string` | ✅ | `table`, `virtual_table` | |
|
|
1366
|
+
| ↳ `account_id` | `string` | ✅ | — | |
|
|
1367
|
+
| ↳ `profile_id` | `string` | ✅ | — | |
|
|
1368
|
+
| ↳ `parent_table_id` | `string` | ❌ | — | |
|
|
1001
1369
|
|
|
1002
1370
|
**Example:**
|
|
1003
1371
|
|
|
1004
1372
|
```typescript
|
|
1005
1373
|
const result = await zapier.createTable({
|
|
1006
|
-
name: "example-
|
|
1374
|
+
name: "example-name",
|
|
1007
1375
|
});
|
|
1008
1376
|
```
|
|
1009
1377
|
|
|
@@ -1013,20 +1381,40 @@ Create one or more fields in a table
|
|
|
1013
1381
|
|
|
1014
1382
|
**Parameters:**
|
|
1015
1383
|
|
|
1016
|
-
| Name
|
|
1017
|
-
|
|
|
1018
|
-
| `options`
|
|
1019
|
-
| ↳ `table`
|
|
1020
|
-
| ↳ `fields`
|
|
1021
|
-
|
|
1022
|
-
|
|
1384
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1385
|
+
| --------------- | ---------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
|
|
1386
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1387
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1388
|
+
| ↳ `fields[]` | `object[]` | ✅ | — | — | Array of field definitions to create |
|
|
1389
|
+
| ↳ `type` | `string` | ✅ | — | `string`, `multiple_string`, `labeled_string`, `multiple_labeled_string`, `text`, `multiple_text`, `boolean`, `multiple_boolean`, `number`, `multiple_number`, `decimal`, `multiple_decimal`, `datetime`, `multiple_datetime`, `uuid`, `multiple_uuid`, `json`, `multiple_json`, `formula`, `button_trigger_zap`, `button_continue_zap`, `email`, `multiple_email`, `link`, `multiple_link`, `currency`, `phone_number`, `ai_formula`, `linked_record`, `multiple_linked_record` | The data type of the field |
|
|
1390
|
+
| ↳ `name` | `string` | ✅ | — | — | The display name of the field |
|
|
1391
|
+
| ↳ `options` | `object` | ❌ | — | — | Data configuration options for the field |
|
|
1392
|
+
| ↳ `config` | `object` | ❌ | — | — | Display configuration for the field |
|
|
1393
|
+
|
|
1394
|
+
**Returns:** `Promise<FieldItem[]>`
|
|
1395
|
+
|
|
1396
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1397
|
+
| ---------------- | ---------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
1398
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1399
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1400
|
+
| ↳ `type` | `string` | ✅ | `string`, `multiple_string`, `labeled_string`, `multiple_labeled_string`, `text`, `multiple_text`, `boolean`, `multiple_boolean`, `number`, `multiple_number`, `decimal`, `multiple_decimal`, `datetime`, `multiple_datetime`, `uuid`, `multiple_uuid`, `json`, `multiple_json`, `formula`, `button_trigger_zap`, `button_continue_zap`, `email`, `multiple_email`, `link`, `multiple_link`, `currency`, `phone_number`, `ai_formula`, `linked_record`, `multiple_linked_record` | |
|
|
1401
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1402
|
+
| ↳ `created_at` | `string` | ❌ | — | |
|
|
1403
|
+
| ↳ `edited_at` | `string` | ❌ | — | |
|
|
1404
|
+
| ↳ `options` | `object` | ❌ | — | |
|
|
1405
|
+
| ↳ `config` | `object` | ❌ | — | |
|
|
1023
1406
|
|
|
1024
1407
|
**Example:**
|
|
1025
1408
|
|
|
1026
1409
|
```typescript
|
|
1027
1410
|
const result = await zapier.createTableFields({
|
|
1028
|
-
table: "example-
|
|
1029
|
-
fields: [
|
|
1411
|
+
table: "example-table",
|
|
1412
|
+
fields: [
|
|
1413
|
+
{
|
|
1414
|
+
type: "string",
|
|
1415
|
+
name: "example-name",
|
|
1416
|
+
},
|
|
1417
|
+
],
|
|
1030
1418
|
});
|
|
1031
1419
|
```
|
|
1032
1420
|
|
|
@@ -1036,21 +1424,34 @@ Create one or more records in a table
|
|
|
1036
1424
|
|
|
1037
1425
|
**Parameters:**
|
|
1038
1426
|
|
|
1039
|
-
| Name
|
|
1040
|
-
|
|
|
1041
|
-
| `options`
|
|
1042
|
-
| ↳ `table`
|
|
1043
|
-
| ↳ `records` | `
|
|
1044
|
-
| ↳ `
|
|
1427
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1428
|
+
| --------------- | ---------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
1429
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1430
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1431
|
+
| ↳ `records[]` | `object[]` | ✅ | — | — | Array of records to create (max 100) |
|
|
1432
|
+
| ↳ `data` | `object` | ✅ | — | — | The field values for the record, keyed by field ID |
|
|
1433
|
+
| ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
1045
1434
|
|
|
1046
|
-
**Returns:** `Promise<
|
|
1435
|
+
**Returns:** `Promise<RecordItem[]>`
|
|
1436
|
+
|
|
1437
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1438
|
+
| ---------------- | ---------- | -------- | --------------- | ----------- |
|
|
1439
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1440
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1441
|
+
| ↳ `data` | `object` | ✅ | — | |
|
|
1442
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1443
|
+
| ↳ `edited_at` | `string` | ✅ | — | |
|
|
1047
1444
|
|
|
1048
1445
|
**Example:**
|
|
1049
1446
|
|
|
1050
1447
|
```typescript
|
|
1051
1448
|
const result = await zapier.createTableRecords({
|
|
1052
|
-
table: "example-
|
|
1053
|
-
records: [
|
|
1449
|
+
table: "example-table",
|
|
1450
|
+
records: [
|
|
1451
|
+
{
|
|
1452
|
+
data: {},
|
|
1453
|
+
},
|
|
1454
|
+
],
|
|
1054
1455
|
});
|
|
1055
1456
|
```
|
|
1056
1457
|
|
|
@@ -1060,18 +1461,18 @@ Delete a table by its ID
|
|
|
1060
1461
|
|
|
1061
1462
|
**Parameters:**
|
|
1062
1463
|
|
|
1063
|
-
| Name
|
|
1064
|
-
|
|
|
1065
|
-
| `options`
|
|
1066
|
-
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1464
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1465
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------- |
|
|
1466
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1467
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1067
1468
|
|
|
1068
|
-
**Returns:** `Promise<
|
|
1469
|
+
**Returns:** `Promise<{ success: boolean }>`
|
|
1069
1470
|
|
|
1070
1471
|
**Example:**
|
|
1071
1472
|
|
|
1072
1473
|
```typescript
|
|
1073
1474
|
const result = await zapier.deleteTable({
|
|
1074
|
-
table: "example-
|
|
1475
|
+
table: "example-table",
|
|
1075
1476
|
});
|
|
1076
1477
|
```
|
|
1077
1478
|
|
|
@@ -1081,20 +1482,20 @@ Delete one or more fields from a table
|
|
|
1081
1482
|
|
|
1082
1483
|
**Parameters:**
|
|
1083
1484
|
|
|
1084
|
-
| Name
|
|
1085
|
-
|
|
|
1086
|
-
| `options`
|
|
1087
|
-
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1088
|
-
| ↳ `fields` | `array` | ✅ | — | — | Fields to operate on. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
|
|
1485
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1486
|
+
| ------------ | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------- |
|
|
1487
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1488
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1489
|
+
| ↳ `fields` | `array` | ✅ | — | — | Fields to operate on. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
|
|
1089
1490
|
|
|
1090
|
-
**Returns:** `Promise<
|
|
1491
|
+
**Returns:** `Promise<{ success: boolean }>`
|
|
1091
1492
|
|
|
1092
1493
|
**Example:**
|
|
1093
1494
|
|
|
1094
1495
|
```typescript
|
|
1095
1496
|
const result = await zapier.deleteTableFields({
|
|
1096
|
-
table: "example-
|
|
1097
|
-
fields: ["example-
|
|
1497
|
+
table: "example-table",
|
|
1498
|
+
fields: ["example-field"],
|
|
1098
1499
|
});
|
|
1099
1500
|
```
|
|
1100
1501
|
|
|
@@ -1104,20 +1505,20 @@ Delete one or more records from a table
|
|
|
1104
1505
|
|
|
1105
1506
|
**Parameters:**
|
|
1106
1507
|
|
|
1107
|
-
| Name
|
|
1108
|
-
|
|
|
1109
|
-
| `options`
|
|
1110
|
-
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1111
|
-
| ↳ `records` | `array` | ✅ | — | — | Record IDs to operate on |
|
|
1508
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1509
|
+
| ------------- | -------- | -------- | ------- | --------------- | ---------------------------------- |
|
|
1510
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1511
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1512
|
+
| ↳ `records` | `array` | ✅ | — | — | Record IDs to operate on |
|
|
1112
1513
|
|
|
1113
|
-
**Returns:** `Promise<
|
|
1514
|
+
**Returns:** `Promise<{ success: boolean }>`
|
|
1114
1515
|
|
|
1115
1516
|
**Example:**
|
|
1116
1517
|
|
|
1117
1518
|
```typescript
|
|
1118
1519
|
const result = await zapier.deleteTableRecords({
|
|
1119
|
-
table: "example-
|
|
1120
|
-
records: ["example-
|
|
1520
|
+
table: "example-table",
|
|
1521
|
+
records: ["example-record"],
|
|
1121
1522
|
});
|
|
1122
1523
|
```
|
|
1123
1524
|
|
|
@@ -1127,18 +1528,31 @@ Get detailed information about a specific table
|
|
|
1127
1528
|
|
|
1128
1529
|
**Parameters:**
|
|
1129
1530
|
|
|
1130
|
-
| Name
|
|
1131
|
-
|
|
|
1132
|
-
| `options`
|
|
1133
|
-
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1531
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1532
|
+
| ----------- | -------- | -------- | ------- | --------------- | ---------------------------------- |
|
|
1533
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1534
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1134
1535
|
|
|
1135
1536
|
**Returns:** `Promise<TableItem>`
|
|
1136
1537
|
|
|
1538
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1539
|
+
| --------------------- | -------- | -------- | ------------------------ | ----------- |
|
|
1540
|
+
| `data` | `object` | ✅ | — | |
|
|
1541
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1542
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1543
|
+
| ↳ `description` | `string` | ❌ | — | |
|
|
1544
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1545
|
+
| ↳ `edited_at` | `string` | ✅ | — | |
|
|
1546
|
+
| ↳ `kind` | `string` | ✅ | `table`, `virtual_table` | |
|
|
1547
|
+
| ↳ `account_id` | `string` | ✅ | — | |
|
|
1548
|
+
| ↳ `profile_id` | `string` | ✅ | — | |
|
|
1549
|
+
| ↳ `parent_table_id` | `string` | ❌ | — | |
|
|
1550
|
+
|
|
1137
1551
|
**Example:**
|
|
1138
1552
|
|
|
1139
1553
|
```typescript
|
|
1140
1554
|
const { data: table } = await zapier.getTable({
|
|
1141
|
-
table: "example-
|
|
1555
|
+
table: "example-table",
|
|
1142
1556
|
});
|
|
1143
1557
|
```
|
|
1144
1558
|
|
|
@@ -1148,21 +1562,29 @@ Get a single record from a table by ID
|
|
|
1148
1562
|
|
|
1149
1563
|
**Parameters:**
|
|
1150
1564
|
|
|
1151
|
-
| Name
|
|
1152
|
-
|
|
|
1153
|
-
| `options`
|
|
1154
|
-
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1155
|
-
| ↳ `record` | `string` | ✅ | — | — | The unique identifier of the record |
|
|
1156
|
-
| ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
1565
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1566
|
+
| ------------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
1567
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1568
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1569
|
+
| ↳ `record` | `string` | ✅ | — | — | The unique identifier of the record |
|
|
1570
|
+
| ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
1157
1571
|
|
|
1158
1572
|
**Returns:** `Promise<RecordItem>`
|
|
1159
1573
|
|
|
1574
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1575
|
+
| ---------------- | -------- | -------- | --------------- | ----------- |
|
|
1576
|
+
| `data` | `object` | ✅ | — | |
|
|
1577
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1578
|
+
| ↳ `data` | `object` | ✅ | — | |
|
|
1579
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1580
|
+
| ↳ `edited_at` | `string` | ✅ | — | |
|
|
1581
|
+
|
|
1160
1582
|
**Example:**
|
|
1161
1583
|
|
|
1162
1584
|
```typescript
|
|
1163
1585
|
const { data: record } = await zapier.getTableRecord({
|
|
1164
|
-
table: "example-
|
|
1165
|
-
record: "example-
|
|
1586
|
+
table: "example-table",
|
|
1587
|
+
record: "example-record",
|
|
1166
1588
|
});
|
|
1167
1589
|
```
|
|
1168
1590
|
|
|
@@ -1172,25 +1594,37 @@ List fields for a table
|
|
|
1172
1594
|
|
|
1173
1595
|
**Parameters:**
|
|
1174
1596
|
|
|
1175
|
-
| Name
|
|
1176
|
-
|
|
|
1177
|
-
| `options`
|
|
1178
|
-
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1179
|
-
| ↳ `fields` | `array` | ❌ | — | — | Fields to operate on. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
|
|
1597
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1598
|
+
| ------------ | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------- |
|
|
1599
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1600
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1601
|
+
| ↳ `fields` | `array` | ❌ | — | — | Fields to operate on. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
|
|
1180
1602
|
|
|
1181
1603
|
**Returns:** `Promise<PaginatedResult<FieldItem>>`
|
|
1182
1604
|
|
|
1605
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1606
|
+
| ---------------- | ---------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
1607
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1608
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1609
|
+
| ↳ `type` | `string` | ✅ | `string`, `multiple_string`, `labeled_string`, `multiple_labeled_string`, `text`, `multiple_text`, `boolean`, `multiple_boolean`, `number`, `multiple_number`, `decimal`, `multiple_decimal`, `datetime`, `multiple_datetime`, `uuid`, `multiple_uuid`, `json`, `multiple_json`, `formula`, `button_trigger_zap`, `button_continue_zap`, `email`, `multiple_email`, `link`, `multiple_link`, `currency`, `phone_number`, `ai_formula`, `linked_record`, `multiple_linked_record` | |
|
|
1610
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1611
|
+
| ↳ `created_at` | `string` | ❌ | — | |
|
|
1612
|
+
| ↳ `edited_at` | `string` | ❌ | — | |
|
|
1613
|
+
| ↳ `options` | `object` | ❌ | — | |
|
|
1614
|
+
| ↳ `config` | `object` | ❌ | — | |
|
|
1615
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
1616
|
+
|
|
1183
1617
|
**Example:**
|
|
1184
1618
|
|
|
1185
1619
|
```typescript
|
|
1186
1620
|
// Get first page and a cursor for the second page
|
|
1187
1621
|
const { data: fields, nextCursor } = await zapier.listTableFields({
|
|
1188
|
-
table: "example-
|
|
1622
|
+
table: "example-table",
|
|
1189
1623
|
});
|
|
1190
1624
|
|
|
1191
1625
|
// Or iterate over all pages
|
|
1192
1626
|
for await (const page of zapier.listTableFields({
|
|
1193
|
-
table: "example-
|
|
1627
|
+
table: "example-table",
|
|
1194
1628
|
})) {
|
|
1195
1629
|
// Do something with each page
|
|
1196
1630
|
}
|
|
@@ -1198,7 +1632,7 @@ for await (const page of zapier.listTableFields({
|
|
|
1198
1632
|
// Or iterate over individual items across all pages
|
|
1199
1633
|
for await (const field of zapier
|
|
1200
1634
|
.listTableFields({
|
|
1201
|
-
table: "example-
|
|
1635
|
+
table: "example-table",
|
|
1202
1636
|
})
|
|
1203
1637
|
.items()) {
|
|
1204
1638
|
// Do something with each field
|
|
@@ -1211,32 +1645,44 @@ List records in a table with optional filtering and sorting
|
|
|
1211
1645
|
|
|
1212
1646
|
**Parameters:**
|
|
1213
1647
|
|
|
1214
|
-
| Name
|
|
1215
|
-
|
|
|
1216
|
-
| `options`
|
|
1217
|
-
| ↳ `table`
|
|
1218
|
-
| ↳ `filters`
|
|
1219
|
-
| ↳ `
|
|
1220
|
-
|
|
|
1221
|
-
|
|
|
1222
|
-
| ↳ `
|
|
1223
|
-
| ↳ `
|
|
1224
|
-
| ↳ `
|
|
1225
|
-
| ↳ `
|
|
1648
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1649
|
+
| ----------------- | ---------- | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
1650
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1651
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1652
|
+
| ↳ `filters[]` | `object[]` | ❌ | — | — | Filter conditions for the query |
|
|
1653
|
+
| ↳ `fieldKey` | `string` | ✅ | — | — | The field key to filter on (e.g. f1, f2) |
|
|
1654
|
+
| ↳ `operator` | `string` | ✅ | — | `exact`, `different`, `contains`, `icontains`, `gte`, `gt`, `lt`, `lte`, `range`, `in`, `isnull`, `startswith`, `search`, `is_within` | The comparison operator |
|
|
1655
|
+
| ↳ `value` | `string` | ❌ | — | — | The value to compare against |
|
|
1656
|
+
| ↳ `sort` | `object` | ❌ | — | — | Sort records by a field |
|
|
1657
|
+
| ↳ `fieldKey` | `string` | ✅ | — | — | The field key to sort by |
|
|
1658
|
+
| ↳ `direction` | `string` | ❌ | `"asc"` | — | Sort direction |
|
|
1659
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of records per page (max 1000) |
|
|
1660
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
1661
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
1662
|
+
| ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
1226
1663
|
|
|
1227
1664
|
**Returns:** `Promise<PaginatedResult<RecordItem>>`
|
|
1228
1665
|
|
|
1666
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1667
|
+
| ---------------- | ---------- | -------- | --------------- | -------------------------------------------------------------- |
|
|
1668
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1669
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1670
|
+
| ↳ `data` | `object` | ✅ | — | |
|
|
1671
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1672
|
+
| ↳ `edited_at` | `string` | ✅ | — | |
|
|
1673
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
1674
|
+
|
|
1229
1675
|
**Example:**
|
|
1230
1676
|
|
|
1231
1677
|
```typescript
|
|
1232
1678
|
// Get first page and a cursor for the second page
|
|
1233
1679
|
const { data: records, nextCursor } = await zapier.listTableRecords({
|
|
1234
|
-
table: "example-
|
|
1680
|
+
table: "example-table",
|
|
1235
1681
|
});
|
|
1236
1682
|
|
|
1237
1683
|
// Or iterate over all pages
|
|
1238
1684
|
for await (const page of zapier.listTableRecords({
|
|
1239
|
-
table: "example-
|
|
1685
|
+
table: "example-table",
|
|
1240
1686
|
})) {
|
|
1241
1687
|
// Do something with each page
|
|
1242
1688
|
}
|
|
@@ -1244,7 +1690,7 @@ for await (const page of zapier.listTableRecords({
|
|
|
1244
1690
|
// Or iterate over individual items across all pages
|
|
1245
1691
|
for await (const record of zapier
|
|
1246
1692
|
.listTableRecords({
|
|
1247
|
-
table: "example-
|
|
1693
|
+
table: "example-table",
|
|
1248
1694
|
})
|
|
1249
1695
|
.items()) {
|
|
1250
1696
|
// Do something with each record
|
|
@@ -1257,20 +1703,34 @@ List tables available to the authenticated user
|
|
|
1257
1703
|
|
|
1258
1704
|
**Parameters:**
|
|
1259
1705
|
|
|
1260
|
-
| Name
|
|
1261
|
-
|
|
|
1262
|
-
| `options`
|
|
1263
|
-
| ↳ `tables` | `array` | ❌ | — | — | Filter by specific table IDs |
|
|
1264
|
-
| ↳ `kind` | `string` | ❌ | — | `table`, `virtual_table`, `both` | Filter by table type |
|
|
1265
|
-
| ↳ `search` | `string` | ❌ | — | — | Search term to filter tables by name |
|
|
1266
|
-
| ↳ `owner` | `string` | ❌ | — | — | Filter by table owner. Use "me" for the current user, or a numeric user ID. Requires includeShared to be true. |
|
|
1267
|
-
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include tables shared with you. Without this, only your own tables are returned. |
|
|
1268
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of tables per page |
|
|
1269
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
1270
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
1706
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1707
|
+
| ------------------- | --------- | -------- | ------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
1708
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1709
|
+
| ↳ `tables` | `array` | ❌ | — | — | Filter by specific table IDs |
|
|
1710
|
+
| ↳ `kind` | `string` | ❌ | — | `table`, `virtual_table`, `both` | Filter by table type |
|
|
1711
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter tables by name |
|
|
1712
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by table owner. Use "me" for the current user, or a numeric user ID. Requires includeShared to be true. |
|
|
1713
|
+
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include tables shared with you. Without this, only your own tables are returned. |
|
|
1714
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of tables per page |
|
|
1715
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
1716
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
1271
1717
|
|
|
1272
1718
|
**Returns:** `Promise<PaginatedResult<TableItem>>`
|
|
1273
1719
|
|
|
1720
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1721
|
+
| --------------------- | ---------- | -------- | ------------------------ | -------------------------------------------------------------- |
|
|
1722
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1723
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1724
|
+
| ↳ `name` | `string` | ✅ | — | |
|
|
1725
|
+
| ↳ `description` | `string` | ❌ | — | |
|
|
1726
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1727
|
+
| ↳ `edited_at` | `string` | ✅ | — | |
|
|
1728
|
+
| ↳ `kind` | `string` | ✅ | `table`, `virtual_table` | |
|
|
1729
|
+
| ↳ `account_id` | `string` | ✅ | — | |
|
|
1730
|
+
| ↳ `profile_id` | `string` | ✅ | — | |
|
|
1731
|
+
| ↳ `parent_table_id` | `string` | ❌ | — | |
|
|
1732
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
1733
|
+
|
|
1274
1734
|
**Example:**
|
|
1275
1735
|
|
|
1276
1736
|
```typescript
|
|
@@ -1294,20 +1754,765 @@ Update one or more records in a table
|
|
|
1294
1754
|
|
|
1295
1755
|
**Parameters:**
|
|
1296
1756
|
|
|
1297
|
-
| Name
|
|
1298
|
-
|
|
|
1299
|
-
| `options`
|
|
1300
|
-
| ↳ `table`
|
|
1301
|
-
| ↳ `records` | `
|
|
1302
|
-
| ↳ `
|
|
1757
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1758
|
+
| --------------- | ---------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
1759
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1760
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1761
|
+
| ↳ `records[]` | `object[]` | ✅ | — | — | Array of records to update (max 100) |
|
|
1762
|
+
| ↳ `id` | `string` | ✅ | — | — | The record ID to update |
|
|
1763
|
+
| ↳ `data` | `object` | ✅ | — | — | The field values to update, keyed by field key |
|
|
1764
|
+
| ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
1765
|
+
|
|
1766
|
+
**Returns:** `Promise<RecordItem[]>`
|
|
1767
|
+
|
|
1768
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1769
|
+
| ---------------- | ---------- | -------- | --------------- | ----------- |
|
|
1770
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1771
|
+
| ↳ `id` | `string` | ✅ | — | |
|
|
1772
|
+
| ↳ `data` | `object` | ✅ | — | |
|
|
1773
|
+
| ↳ `created_at` | `string` | ✅ | — | |
|
|
1774
|
+
| ↳ `edited_at` | `string` | ✅ | — | |
|
|
1775
|
+
|
|
1776
|
+
**Example:**
|
|
1777
|
+
|
|
1778
|
+
```typescript
|
|
1779
|
+
const result = await zapier.updateTableRecords({
|
|
1780
|
+
table: "example-table",
|
|
1781
|
+
records: [
|
|
1782
|
+
{
|
|
1783
|
+
id: "example-id",
|
|
1784
|
+
data: {},
|
|
1785
|
+
},
|
|
1786
|
+
],
|
|
1787
|
+
});
|
|
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) |
|
|
1303
2033
|
|
|
1304
2034
|
**Returns:** `Promise<any>`
|
|
1305
2035
|
|
|
1306
2036
|
**Example:**
|
|
1307
2037
|
|
|
1308
2038
|
```typescript
|
|
1309
|
-
const result = await zapier.
|
|
1310
|
-
|
|
1311
|
-
|
|
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
|
+
},
|
|
1312
2517
|
});
|
|
1313
2518
|
```
|