@zapier/zapier-sdk 0.82.1 → 0.83.1
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/AGENTS.md +1 -1
- package/CHANGELOG.md +46 -0
- package/README.md +78 -74
- package/dist/experimental.cjs +8923 -8041
- package/dist/experimental.d.mts +3441 -4723
- package/dist/experimental.d.ts +3441 -4723
- package/dist/experimental.mjs +8895 -8038
- package/dist/{index-BEIqfOJR.d.mts → index-CgdXuNF1.d.mts} +7142 -12657
- package/dist/{index-BEIqfOJR.d.ts → index-CgdXuNF1.d.ts} +7142 -12657
- package/dist/index.cjs +9177 -8323
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +9150 -8318
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -34,7 +34,7 @@ The easiest approach for local development. Run `npx zapier-sdk login` once, and
|
|
|
34
34
|
const zapier = createZapierSdk();
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
The CLI stores tokens in
|
|
37
|
+
The CLI stores tokens in the OS keychain by default (with a config-file fallback). Non-secret login metadata lives in a config file managed by the `conf` library at a platform-specific path (run `npx zapier-sdk get-login-config-path` to see it). The SDK reads this login automatically when no credentials are provided.
|
|
38
38
|
|
|
39
39
|
### Production: Token String
|
|
40
40
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.83.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6201fd4: `getWorkflow` and `listWorkflows` now include a nullable `details` field on each trigger (e.g. `webhook_url` for catch-hook triggers). Also corrected the `trigger_url` field description to note that requests must also be authenticated as the account.
|
|
8
|
+
|
|
9
|
+
## 0.83.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 5f5f028: `createZapierSdk(options)` is unchanged in usage; the SDK is now built
|
|
14
|
+
entirely on the module plugin system internally.
|
|
15
|
+
- Deprecated SDK methods now log a runtime warning when called (once per
|
|
16
|
+
process).
|
|
17
|
+
- New: `disposeSdk(sdk)` releases the SDK's resources (telemetry timers,
|
|
18
|
+
event listeners) — call it when you're done with an SDK in a long-lived
|
|
19
|
+
process.
|
|
20
|
+
- New for plugin authors: `zapierSdkPlugin` (the SDK's root plugin),
|
|
21
|
+
`PluginSurface<typeof plugin>` (derive a plugin's surface type instead of
|
|
22
|
+
hand-writing it), `resolvePlugin`, `declareOptionalProperty`,
|
|
23
|
+
`SDK_OPTIONS_ID` / `sdkOptionsPluginRef`, explicit `MethodPlugin` /
|
|
24
|
+
`PropertyPlugin` / `AggregatePlugin` descriptor types, the
|
|
25
|
+
`PluginSummary` / `LeafSummary` ledger types and `EventTransport` (so a
|
|
26
|
+
package exporting plugins can emit their inferred types in declarations),
|
|
27
|
+
and `createController` with its `Controller*` types.
|
|
28
|
+
|
|
29
|
+
Changed: `getConnection` now requires a connection locator — `connection`
|
|
30
|
+
(or a deprecated `connectionId` / `authenticationId` alias) must be
|
|
31
|
+
provided. It was previously optional in the type, with nothing sensible to
|
|
32
|
+
fetch when omitted.
|
|
33
|
+
|
|
34
|
+
Removed without a deprecation cycle (pre-1.0 break):
|
|
35
|
+
- `createZapierSdkStack`, `createOptionsPlugin`, `createZapierCoreStack` —
|
|
36
|
+
use `createZapierSdk(options)`, or compose module plugins with `createSdk`.
|
|
37
|
+
- `dangerousContextPlugin` — import the specific plugin ref you need
|
|
38
|
+
(`apiPluginRef`, `sdkOptionsPluginRef`, ...), or use `resolvePlugin` on a
|
|
39
|
+
built sdk.
|
|
40
|
+
- The `authenticationIdResolver` / `authenticationIdGenericResolver` aliases —
|
|
41
|
+
use `connectionIdResolver` / `connectionIdGenericResolver`.
|
|
42
|
+
|
|
43
|
+
Changed: the exported resolvers (`appKeyResolver`, `connectionIdResolver`,
|
|
44
|
+
`inputsResolver`, ...) are now model resolvers — bag-form callbacks whose
|
|
45
|
+
imports bind at build — instead of objects with `fetch(sdk, params)`
|
|
46
|
+
callbacks. Attach them through a `defineMethod`'s `resolvers` map; they no
|
|
47
|
+
longer work on a legacy function plugin's `meta.resolvers`.
|
|
48
|
+
|
|
3
49
|
## 0.82.1
|
|
4
50
|
|
|
5
51
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1034,7 +1034,7 @@ Create new client credentials for the authenticated user
|
|
|
1034
1034
|
**Example:**
|
|
1035
1035
|
|
|
1036
1036
|
```typescript
|
|
1037
|
-
const
|
|
1037
|
+
const { data: clientCredentials } = await zapier.createClientCredentials({
|
|
1038
1038
|
name: "example-name",
|
|
1039
1039
|
});
|
|
1040
1040
|
```
|
|
@@ -1129,7 +1129,7 @@ Cancel a run-once durable run in initialized or started status. Returns 409 if t
|
|
|
1129
1129
|
**Example:**
|
|
1130
1130
|
|
|
1131
1131
|
```typescript
|
|
1132
|
-
const
|
|
1132
|
+
const { data: durableRun } = await zapier.cancelDurableRun({
|
|
1133
1133
|
run: "example-run",
|
|
1134
1134
|
});
|
|
1135
1135
|
```
|
|
@@ -1149,22 +1149,22 @@ Create a durable workflow container. Starts disabled with no version; publish a
|
|
|
1149
1149
|
|
|
1150
1150
|
**Returns:** `Promise<WorkflowItem>`
|
|
1151
1151
|
|
|
1152
|
-
| Name | Type | Required | Possible Values | Description
|
|
1153
|
-
| ------------------------ | --------- | -------- | --------------- |
|
|
1154
|
-
| `data` | `object` | ✅ | — |
|
|
1155
|
-
| ↳ `id` | `string` | ✅ | — | Workflow ID (UUID)
|
|
1156
|
-
| ↳ `name` | `string` | ✅ | — | Workflow name
|
|
1157
|
-
| ↳ `description` | `string` | ✅ | — | Workflow description (null if unset)
|
|
1158
|
-
| ↳ `trigger_url` | `string` | ✅ | — | Public
|
|
1159
|
-
| ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers. Always false on a new workflow until enabled.
|
|
1160
|
-
| ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible.
|
|
1161
|
-
| ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data)
|
|
1162
|
-
| ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601)
|
|
1152
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1153
|
+
| ------------------------ | --------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1154
|
+
| `data` | `object` | ✅ | — | |
|
|
1155
|
+
| ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
|
|
1156
|
+
| ↳ `name` | `string` | ✅ | — | Workflow name |
|
|
1157
|
+
| ↳ `description` | `string` | ✅ | — | Workflow description (null if unset) |
|
|
1158
|
+
| ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
|
|
1159
|
+
| ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers. Always false on a new workflow until enabled. |
|
|
1160
|
+
| ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
|
|
1161
|
+
| ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
|
|
1162
|
+
| ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
|
|
1163
1163
|
|
|
1164
1164
|
**Example:**
|
|
1165
1165
|
|
|
1166
1166
|
```typescript
|
|
1167
|
-
const
|
|
1167
|
+
const { data: workflow } = await zapier.createWorkflow({
|
|
1168
1168
|
name: "example-name",
|
|
1169
1169
|
});
|
|
1170
1170
|
```
|
|
@@ -1217,7 +1217,7 @@ Disable a durable workflow so it stops accepting triggers
|
|
|
1217
1217
|
**Example:**
|
|
1218
1218
|
|
|
1219
1219
|
```typescript
|
|
1220
|
-
const
|
|
1220
|
+
const { data: workflow } = await zapier.disableWorkflow({
|
|
1221
1221
|
workflow: "example-workflow",
|
|
1222
1222
|
});
|
|
1223
1223
|
```
|
|
@@ -1244,7 +1244,7 @@ Enable a durable workflow so it accepts triggers
|
|
|
1244
1244
|
**Example:**
|
|
1245
1245
|
|
|
1246
1246
|
```typescript
|
|
1247
|
-
const
|
|
1247
|
+
const { data: workflow } = await zapier.enableWorkflow({
|
|
1248
1248
|
workflow: "example-workflow",
|
|
1249
1249
|
});
|
|
1250
1250
|
```
|
|
@@ -1336,7 +1336,7 @@ Get a durable workflow with its current version details and trigger claim status
|
|
|
1336
1336
|
| ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
|
|
1337
1337
|
| ↳ `name` | `string` | ✅ | — | Workflow name |
|
|
1338
1338
|
| ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
|
|
1339
|
-
| ↳ `trigger_url` | `string` | ✅ | — | Public
|
|
1339
|
+
| ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
|
|
1340
1340
|
| ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
|
|
1341
1341
|
| ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed` | Why the workflow is off, when system-disabled. Null when not system-disabled. Independent of per-trigger claim status: an enabled workflow can still have a failed trigger. |
|
|
1342
1342
|
| ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
|
|
@@ -1359,6 +1359,7 @@ Get a durable workflow with its current version details and trigger claim status
|
|
|
1359
1359
|
| ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
|
|
1360
1360
|
| ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
|
|
1361
1361
|
| ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'. |
|
|
1362
|
+
| ↳ `details` | `object` | ❌ | — | Trigger-type-specific metadata; shape varies by trigger type (e.g. `webhook_url` on catch-hook triggers). Null or absent when none applies. |
|
|
1362
1363
|
| ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
|
|
1363
1364
|
| ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
|
|
1364
1365
|
|
|
@@ -1615,28 +1616,29 @@ List all active durable workflows for the authenticated account
|
|
|
1615
1616
|
|
|
1616
1617
|
**Returns:** `Promise<PaginatedResult<WorkflowItem>>`
|
|
1617
1618
|
|
|
1618
|
-
| Name | Type | Required | Possible Values | Description
|
|
1619
|
-
| ------------------------- | ---------- | -------- | ------------------------------------------------------------------- |
|
|
1620
|
-
| `data[]` | `object[]` | ✅ | — |
|
|
1621
|
-
| ↳ `id` | `string` | ✅ | — | Workflow ID (UUID)
|
|
1622
|
-
| ↳ `name` | `string` | ✅ | — | Workflow name
|
|
1623
|
-
| ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset)
|
|
1624
|
-
| ↳ `trigger_url` | `string` | ✅ | — | Public
|
|
1625
|
-
| ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers
|
|
1626
|
-
| ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed` | Why the workflow is off, when system-disabled. Null when not system-disabled.
|
|
1627
|
-
| ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible.
|
|
1628
|
-
| ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data)
|
|
1629
|
-
| ↳ `current_version_id` | `string` | ✅ | — | ID of the workflow version that runs handle. Null until a version is published.
|
|
1630
|
-
| ↳ `triggers[]` | `object[]` | ✅ | — | Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers.
|
|
1631
|
-
| ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI')
|
|
1632
|
-
| ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row')
|
|
1633
|
-
| ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers.
|
|
1634
|
-
| ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object
|
|
1635
|
-
| ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source.
|
|
1636
|
-
| ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'.
|
|
1637
|
-
|
|
|
1638
|
-
| ↳ `
|
|
1639
|
-
| `
|
|
1619
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1620
|
+
| ------------------------- | ---------- | -------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1621
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1622
|
+
| ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
|
|
1623
|
+
| ↳ `name` | `string` | ✅ | — | Workflow name |
|
|
1624
|
+
| ↳ `description` | `string` | ✅ | — | Optional workflow description (null if unset) |
|
|
1625
|
+
| ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
|
|
1626
|
+
| ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
|
|
1627
|
+
| ↳ `disabled_reason` | `string` | ❌ | `trigger_claim_failed` | Why the workflow is off, when system-disabled. Null when not system-disabled. |
|
|
1628
|
+
| ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
|
|
1629
|
+
| ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
|
|
1630
|
+
| ↳ `current_version_id` | `string` | ✅ | — | ID of the workflow version that runs handle. Null until a version is published. |
|
|
1631
|
+
| ↳ `triggers[]` | `object[]` | ✅ | — | Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers. |
|
|
1632
|
+
| ↳ `selected_api` | `string` | ✅ | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI') |
|
|
1633
|
+
| ↳ `action` | `string` | ✅ | — | Trigger action key (e.g. 'new_row') |
|
|
1634
|
+
| ↳ `authentication_id` | `string` | ❌ | — | Connection ID for the trigger source. Null for no-auth triggers. |
|
|
1635
|
+
| ↳ `params` | `object` | ❌ | — | Trigger parameters as a JSON object |
|
|
1636
|
+
| ↳ `status` | `string` | ✅ | `unclaimed`, `pending`, `active`, `releasing`, `released`, `failed` | Live trigger claim status — whether the trigger is currently subscribed to its source. |
|
|
1637
|
+
| ↳ `error` | `string` | ❌ | — | Failure reason for the latest claim. Present (non-null) only when status is 'failed'. |
|
|
1638
|
+
| ↳ `details` | `object` | ❌ | — | Trigger-type-specific metadata; shape varies by trigger type (e.g. `webhook_url` on catch-hook triggers). Null or absent when none applies. |
|
|
1639
|
+
| ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
|
|
1640
|
+
| ↳ `updated_at` | `string` | ✅ | — | When the workflow was last modified (ISO-8601) |
|
|
1641
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
1640
1642
|
|
|
1641
1643
|
**Example:**
|
|
1642
1644
|
|
|
@@ -1696,7 +1698,7 @@ Publish a new version of a durable workflow. Enables the workflow by default.
|
|
|
1696
1698
|
**Example:**
|
|
1697
1699
|
|
|
1698
1700
|
```typescript
|
|
1699
|
-
const
|
|
1701
|
+
const { data: workflowVersion } = await zapier.publishWorkflowVersion({
|
|
1700
1702
|
workflow: "example-workflow",
|
|
1701
1703
|
sourceFiles: {},
|
|
1702
1704
|
});
|
|
@@ -1737,7 +1739,7 @@ Run a workflow source file as a run-once durable run on sdkdurableapi (no deploy
|
|
|
1737
1739
|
**Example:**
|
|
1738
1740
|
|
|
1739
1741
|
```typescript
|
|
1740
|
-
const
|
|
1742
|
+
const { data: durableRun } = await zapier.runDurable({
|
|
1741
1743
|
sourceFiles: {},
|
|
1742
1744
|
});
|
|
1743
1745
|
```
|
|
@@ -1766,7 +1768,7 @@ Look up a workflow's trigger URL and fire it manually, as the authenticated acco
|
|
|
1766
1768
|
**Example:**
|
|
1767
1769
|
|
|
1768
1770
|
```typescript
|
|
1769
|
-
const
|
|
1771
|
+
const { data: workflowRun } = await zapier.triggerWorkflow({
|
|
1770
1772
|
workflow: "example-workflow",
|
|
1771
1773
|
});
|
|
1772
1774
|
```
|
|
@@ -1786,23 +1788,23 @@ Update a durable workflow's name and/or description
|
|
|
1786
1788
|
|
|
1787
1789
|
**Returns:** `Promise<WorkflowItem>`
|
|
1788
1790
|
|
|
1789
|
-
| Name | Type | Required | Possible Values | Description
|
|
1790
|
-
| ------------------------ | --------- | -------- | --------------- |
|
|
1791
|
-
| `data` | `object` | ✅ | — |
|
|
1792
|
-
| ↳ `id` | `string` | ✅ | — | Workflow ID (UUID)
|
|
1793
|
-
| ↳ `name` | `string` | ✅ | — | Workflow name (post-update)
|
|
1794
|
-
| ↳ `description` | `string` | ✅ | — | Workflow description, post-update (null if unset)
|
|
1795
|
-
| ↳ `trigger_url` | `string` | ✅ | — | Public
|
|
1796
|
-
| ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers
|
|
1797
|
-
| ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible.
|
|
1798
|
-
| ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data)
|
|
1799
|
-
| ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601)
|
|
1800
|
-
| ↳ `updated_at` | `string` | ✅ | — | When this update was applied (ISO-8601)
|
|
1791
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1792
|
+
| ------------------------ | --------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1793
|
+
| `data` | `object` | ✅ | — | |
|
|
1794
|
+
| ↳ `id` | `string` | ✅ | — | Workflow ID (UUID) |
|
|
1795
|
+
| ↳ `name` | `string` | ✅ | — | Workflow name (post-update) |
|
|
1796
|
+
| ↳ `description` | `string` | ✅ | — | Workflow description, post-update (null if unset) |
|
|
1797
|
+
| ↳ `trigger_url` | `string` | ✅ | — | Public URL that fires this workflow when POSTed to. Embeds a trigger token in the path — treat as sensitive. Requests must also be authenticated as the account. |
|
|
1798
|
+
| ↳ `enabled` | `boolean` | ✅ | — | Whether the workflow currently accepts triggers |
|
|
1799
|
+
| ↳ `is_private` | `boolean` | ✅ | — | Whether the workflow is private to the creating user. False means account-visible. |
|
|
1800
|
+
| ↳ `created_by_user_id` | `string` | ✅ | — | User ID of the workflow creator (null in legacy data) |
|
|
1801
|
+
| ↳ `created_at` | `string` | ✅ | — | When the workflow was created (ISO-8601) |
|
|
1802
|
+
| ↳ `updated_at` | `string` | ✅ | — | When this update was applied (ISO-8601) |
|
|
1801
1803
|
|
|
1802
1804
|
**Example:**
|
|
1803
1805
|
|
|
1804
1806
|
```typescript
|
|
1805
|
-
const
|
|
1807
|
+
const { data: workflow } = await zapier.updateWorkflow({
|
|
1806
1808
|
workflow: "example-workflow",
|
|
1807
1809
|
});
|
|
1808
1810
|
```
|
|
@@ -1837,7 +1839,7 @@ This is the right command for most callers. Reach for the lower-level building b
|
|
|
1837
1839
|
**Example:**
|
|
1838
1840
|
|
|
1839
1841
|
```typescript
|
|
1840
|
-
const
|
|
1842
|
+
const { data: connection } = await zapier.createConnection({
|
|
1841
1843
|
app: "example-app",
|
|
1842
1844
|
});
|
|
1843
1845
|
```
|
|
@@ -1956,14 +1958,14 @@ const { data: connection } = await zapier.findUniqueConnection();
|
|
|
1956
1958
|
|
|
1957
1959
|
#### `getConnection`
|
|
1958
1960
|
|
|
1959
|
-
|
|
1961
|
+
Get details for a specific connection
|
|
1960
1962
|
|
|
1961
1963
|
**Parameters:**
|
|
1962
1964
|
|
|
1963
1965
|
| Name | Type | Required | Default | Possible Values | Description |
|
|
1964
1966
|
| ---------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1965
1967
|
| `options` | `object` | ✅ | — | — | |
|
|
1966
|
-
| ↳ `connection` | `string, number` |
|
|
1968
|
+
| ↳ `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. |
|
|
1967
1969
|
|
|
1968
1970
|
**Returns:** `Promise<ConnectionItem>`
|
|
1969
1971
|
|
|
@@ -2001,7 +2003,9 @@ Execute getConnection
|
|
|
2001
2003
|
**Example:**
|
|
2002
2004
|
|
|
2003
2005
|
```typescript
|
|
2004
|
-
const { data: connection } = await zapier.getConnection(
|
|
2006
|
+
const { data: connection } = await zapier.getConnection({
|
|
2007
|
+
connection: "example-connection",
|
|
2008
|
+
});
|
|
2005
2009
|
```
|
|
2006
2010
|
|
|
2007
2011
|
#### `getConnectionStartUrl`
|
|
@@ -2040,7 +2044,7 @@ const { data: conn } = await zapier.waitForNewConnection({ app, startedAt });
|
|
|
2040
2044
|
**Example:**
|
|
2041
2045
|
|
|
2042
2046
|
```typescript
|
|
2043
|
-
const
|
|
2047
|
+
const { data: connectionStartUrl } = await zapier.getConnectionStartUrl({
|
|
2044
2048
|
app: "example-app",
|
|
2045
2049
|
});
|
|
2046
2050
|
```
|
|
@@ -2216,7 +2220,7 @@ Create a new table
|
|
|
2216
2220
|
**Example:**
|
|
2217
2221
|
|
|
2218
2222
|
```typescript
|
|
2219
|
-
const
|
|
2223
|
+
const { data: table } = await zapier.createTable({
|
|
2220
2224
|
name: "example-name",
|
|
2221
2225
|
});
|
|
2222
2226
|
```
|
|
@@ -2254,7 +2258,7 @@ Create one or more fields in a table
|
|
|
2254
2258
|
**Example:**
|
|
2255
2259
|
|
|
2256
2260
|
```typescript
|
|
2257
|
-
const
|
|
2261
|
+
const { data: fields } = await zapier.createTableFields({
|
|
2258
2262
|
table: "example-table",
|
|
2259
2263
|
fields: [
|
|
2260
2264
|
{
|
|
@@ -2293,7 +2297,7 @@ Create one or more records in a table
|
|
|
2293
2297
|
**Example:**
|
|
2294
2298
|
|
|
2295
2299
|
```typescript
|
|
2296
|
-
const
|
|
2300
|
+
const { data: records } = await zapier.createTableRecords({
|
|
2297
2301
|
table: "example-table",
|
|
2298
2302
|
records: [
|
|
2299
2303
|
{
|
|
@@ -2630,7 +2634,7 @@ Update one or more records in a table
|
|
|
2630
2634
|
**Example:**
|
|
2631
2635
|
|
|
2632
2636
|
```typescript
|
|
2633
|
-
const
|
|
2637
|
+
const { data: records } = await zapier.updateTableRecords({
|
|
2634
2638
|
table: "example-table",
|
|
2635
2639
|
records: [
|
|
2636
2640
|
{
|
|
@@ -2674,7 +2678,7 @@ Acknowledge messages from a lease. Acked messages are removed from the inbox; un
|
|
|
2674
2678
|
**Example:**
|
|
2675
2679
|
|
|
2676
2680
|
```typescript
|
|
2677
|
-
const
|
|
2681
|
+
const { data: triggerInboxAck } = await zapier.ackTriggerInboxMessages({
|
|
2678
2682
|
inbox: "example-inbox",
|
|
2679
2683
|
lease: "example-lease",
|
|
2680
2684
|
});
|
|
@@ -2717,7 +2721,7 @@ Create a new trigger inbox subscription. Always creates a new inbox; use ensureT
|
|
|
2717
2721
|
**Example:**
|
|
2718
2722
|
|
|
2719
2723
|
```typescript
|
|
2720
|
-
const
|
|
2724
|
+
const { data: triggerInbox } = await zapier.createTriggerInbox({
|
|
2721
2725
|
app: "example-app",
|
|
2722
2726
|
action: "example-action",
|
|
2723
2727
|
});
|
|
@@ -2785,7 +2789,7 @@ Drain an existing trigger inbox: lease currently-available messages, process eac
|
|
|
2785
2789
|
**Example:**
|
|
2786
2790
|
|
|
2787
2791
|
```typescript
|
|
2788
|
-
|
|
2792
|
+
await zapier.drainTriggerInbox({
|
|
2789
2793
|
inbox: "example-inbox",
|
|
2790
2794
|
onMessage: async (message) => {
|
|
2791
2795
|
/* process message */
|
|
@@ -2830,7 +2834,7 @@ Get-or-create a trigger inbox by key. Idempotent on (user, account, key): return
|
|
|
2830
2834
|
**Example:**
|
|
2831
2835
|
|
|
2832
2836
|
```typescript
|
|
2833
|
-
const
|
|
2837
|
+
const { data: triggerInbox } = await zapier.ensureTriggerInbox({
|
|
2834
2838
|
key: "example-key",
|
|
2835
2839
|
app: "example-app",
|
|
2836
2840
|
action: "example-action",
|
|
@@ -2936,7 +2940,7 @@ Lease up to N messages from a trigger inbox. Returns messages plus a lease ID; a
|
|
|
2936
2940
|
**Example:**
|
|
2937
2941
|
|
|
2938
2942
|
```typescript
|
|
2939
|
-
const
|
|
2943
|
+
const { data: triggerInboxLease } = await zapier.leaseTriggerInboxMessages({
|
|
2940
2944
|
inbox: "example-inbox",
|
|
2941
2945
|
});
|
|
2942
2946
|
```
|
|
@@ -3284,7 +3288,7 @@ Pause a trigger inbox; events stop being collected
|
|
|
3284
3288
|
**Example:**
|
|
3285
3289
|
|
|
3286
3290
|
```typescript
|
|
3287
|
-
const
|
|
3291
|
+
const { data: triggerInbox } = await zapier.pauseTriggerInbox({
|
|
3288
3292
|
inbox: "example-inbox",
|
|
3289
3293
|
});
|
|
3290
3294
|
```
|
|
@@ -3320,7 +3324,7 @@ Release messages from a lease back to the inbox without acknowledging them. Rele
|
|
|
3320
3324
|
**Example:**
|
|
3321
3325
|
|
|
3322
3326
|
```typescript
|
|
3323
|
-
const
|
|
3327
|
+
const { data: triggerInboxRelease } = await zapier.releaseTriggerInboxMessages({
|
|
3324
3328
|
inbox: "example-inbox",
|
|
3325
3329
|
lease: "example-lease",
|
|
3326
3330
|
});
|
|
@@ -3358,7 +3362,7 @@ Resume a paused trigger inbox; events resume being collected
|
|
|
3358
3362
|
**Example:**
|
|
3359
3363
|
|
|
3360
3364
|
```typescript
|
|
3361
|
-
const
|
|
3365
|
+
const { data: triggerInbox } = await zapier.resumeTriggerInbox({
|
|
3362
3366
|
inbox: "example-inbox",
|
|
3363
3367
|
});
|
|
3364
3368
|
```
|
|
@@ -3396,7 +3400,7 @@ Update settings on an existing trigger inbox
|
|
|
3396
3400
|
**Example:**
|
|
3397
3401
|
|
|
3398
3402
|
```typescript
|
|
3399
|
-
const
|
|
3403
|
+
const { data: triggerInbox } = await zapier.updateTriggerInbox({
|
|
3400
3404
|
inbox: "example-inbox",
|
|
3401
3405
|
});
|
|
3402
3406
|
```
|
|
@@ -3426,7 +3430,7 @@ Continuously consume a trigger inbox: drain currently-available messages via onM
|
|
|
3426
3430
|
**Example:**
|
|
3427
3431
|
|
|
3428
3432
|
```typescript
|
|
3429
|
-
|
|
3433
|
+
await zapier.watchTriggerInbox({
|
|
3430
3434
|
inbox: "example-inbox",
|
|
3431
3435
|
onMessage: async (message) => {
|
|
3432
3436
|
/* process message */
|