@zapier/zapier-sdk 0.42.1 → 0.44.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 +75 -73
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +309 -35
- package/dist/api/types.d.ts +29 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/constants.d.ts +25 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +32 -0
- package/dist/index.cjs +441 -44
- package/dist/index.d.mts +82 -4
- package/dist/index.mjs +437 -45
- package/dist/plugins/api/index.d.ts.map +1 -1
- package/dist/plugins/api/index.js +5 -1
- package/dist/plugins/createClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/createClientCredentials/index.js +1 -0
- package/dist/plugins/createClientCredentials/schemas.d.ts +1 -0
- package/dist/plugins/createClientCredentials/schemas.d.ts.map +1 -1
- package/dist/plugins/createClientCredentials/schemas.js +6 -0
- package/dist/plugins/fetch/index.d.ts.map +1 -1
- package/dist/plugins/fetch/index.js +15 -1
- package/dist/plugins/getInputFieldsSchema/schemas.js +1 -1
- package/dist/plugins/listInputFieldChoices/schemas.js +1 -1
- package/dist/plugins/listInputFields/schemas.js +1 -1
- package/dist/plugins/manifest/schemas.d.ts +2 -2
- package/dist/plugins/runAction/index.d.ts.map +1 -1
- package/dist/plugins/runAction/index.js +12 -1
- package/dist/plugins/runAction/schemas.js +1 -1
- package/dist/types/connections.d.ts +2 -2
- package/dist/types/connections.d.ts.map +1 -1
- package/dist/types/connections.js +5 -3
- package/dist/types/errors.d.ts +37 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +18 -0
- package/dist/types/properties.js +1 -1
- package/dist/types/sdk.d.ts +7 -0
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/sdk.js +20 -0
- package/dist/utils/open-approval.d.ts +2 -0
- package/dist/utils/open-approval.d.ts.map +1 -0
- package/dist/utils/open-approval.js +13 -0
- package/dist/utils/open-url.d.ts +3 -0
- package/dist/utils/open-url.d.ts.map +1 -0
- package/dist/utils/open-url.js +72 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.44.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- fd8660c: Allow UUID connection IDs in the `.zapierrc` connections map. `ConnectionEntrySchema.connectionId` now accepts either a positive integer (legacy form) or a UUID-format string (returned by the Zapier connections API for newer connections).
|
|
8
|
+
|
|
9
|
+
## 0.43.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 8df8761: Add an experimental interactive approval flow for policy-gated actions. When an action requires approval, the SDK detects the `approval_required` response, prompts for approval in interactive sessions, and automatically retries the original request once approved. Non-interactive sessions receive a clear error explaining that approval is required. This flow is experimental and its behavior may change in future releases.
|
|
14
|
+
|
|
3
15
|
## 0.42.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -338,18 +338,18 @@ const zapier = createZapierSdk({
|
|
|
338
338
|
manifest: {
|
|
339
339
|
apps: { slack: { implementationName: "SlackCLIAPI", version: "1.21.1" } },
|
|
340
340
|
connections: {
|
|
341
|
-
slack_work: { connectionId:
|
|
341
|
+
slack_work: { connectionId: "01234567-89ab-cdef-0123-456789abcdef" },
|
|
342
342
|
google_sheets: { connectionId: 67890 },
|
|
343
343
|
},
|
|
344
344
|
},
|
|
345
345
|
});
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
Each connection entry maps a name to a `connectionId`. App version resolution is handled separately via the `apps` section of `.zapierrc`.
|
|
348
|
+
Each connection entry maps a name to a `connectionId`. The Zapier connections API returns UUID-format IDs (the `id` field on entries from `listConnections`); positive integers from older connections are also accepted. App version resolution is handled separately via the `apps` section of `.zapierrc`.
|
|
349
349
|
|
|
350
350
|
### Using named connections
|
|
351
351
|
|
|
352
|
-
Reference connections using the `connection` parameter. Pass a connection name to be resolved from the connections map or a connection ID to be used directly.
|
|
352
|
+
Reference connections using the `connection` parameter. Pass a connection name to be resolved from the connections map, or a connection ID to be used directly.
|
|
353
353
|
|
|
354
354
|
```typescript
|
|
355
355
|
// Per-call with alias
|
|
@@ -372,8 +372,10 @@ await zapier.fetch("https://slack.com/api/auth.test", {
|
|
|
372
372
|
connection: "slack_work",
|
|
373
373
|
});
|
|
374
374
|
|
|
375
|
-
// Direct connection ID also works
|
|
376
|
-
await zapier.apps.slack.read.channels({
|
|
375
|
+
// Direct connection ID also works (UUID or legacy positive integer)
|
|
376
|
+
await zapier.apps.slack.read.channels({
|
|
377
|
+
connection: "01234567-89ab-cdef-0123-456789abcdef",
|
|
378
|
+
});
|
|
377
379
|
```
|
|
378
380
|
|
|
379
381
|
## Available Functions
|
|
@@ -431,14 +433,14 @@ Get the JSON Schema representation of input fields for an action. Returns a JSON
|
|
|
431
433
|
|
|
432
434
|
**Parameters:**
|
|
433
435
|
|
|
434
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
435
|
-
| -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- |
|
|
436
|
-
| `options` | `object` | ✅ | — | — |
|
|
437
|
-
| ↳ `app` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for
|
|
438
|
-
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type
|
|
439
|
-
| ↳ `action` | `string` | ✅ | — | — | Action key to get the input schema for
|
|
440
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (
|
|
441
|
-
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values)
|
|
436
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
437
|
+
| -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
438
|
+
| `options` | `object` | ✅ | — | — | |
|
|
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) |
|
|
442
444
|
|
|
443
445
|
**Returns:** `Promise<InputSchemaItem>`
|
|
444
446
|
|
|
@@ -500,19 +502,19 @@ Get the available choices for a dynamic dropdown input field
|
|
|
500
502
|
|
|
501
503
|
**Parameters:**
|
|
502
504
|
|
|
503
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
504
|
-
| -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- |
|
|
505
|
-
| `options` | `object` | ✅ | — | — |
|
|
506
|
-
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3')
|
|
507
|
-
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type
|
|
508
|
-
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row')
|
|
509
|
-
| ↳ `inputField` | `string` | ✅ | — | — | Input field key to get choices for
|
|
510
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (
|
|
511
|
-
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices
|
|
512
|
-
| ↳ `page` | `number` | ❌ | — | — | Page number for paginated results
|
|
513
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page
|
|
514
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages
|
|
515
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from
|
|
505
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
506
|
+
| -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
507
|
+
| `options` | `object` | ✅ | — | — | |
|
|
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
|
+
| ↳ `inputField` | `string` | ✅ | — | — | Input field key to get choices for |
|
|
512
|
+
| ↳ `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. |
|
|
513
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
|
|
514
|
+
| ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
|
|
515
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
|
|
516
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
517
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
516
518
|
|
|
517
519
|
**Returns:** `Promise<PaginatedResult<InputFieldChoiceItem>>`
|
|
518
520
|
|
|
@@ -557,17 +559,17 @@ Get the input fields required for a specific action
|
|
|
557
559
|
|
|
558
560
|
**Parameters:**
|
|
559
561
|
|
|
560
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
561
|
-
| -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- |
|
|
562
|
-
| `options` | `object` | ✅ | — | — |
|
|
563
|
-
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3')
|
|
564
|
-
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type
|
|
565
|
-
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row')
|
|
566
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (
|
|
567
|
-
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields
|
|
568
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page
|
|
569
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages
|
|
570
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from
|
|
562
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
563
|
+
| -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
564
|
+
| `options` | `object` | ✅ | — | — | |
|
|
565
|
+
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
|
|
566
|
+
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
567
|
+
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
|
|
568
|
+
| ↳ `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. |
|
|
569
|
+
| ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
|
|
570
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
|
|
571
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
572
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
571
573
|
|
|
572
574
|
**Returns:** `Promise<PaginatedResult<RootFieldItemItem>>`
|
|
573
575
|
|
|
@@ -608,18 +610,18 @@ Execute an action with the given inputs
|
|
|
608
610
|
|
|
609
611
|
**Parameters:**
|
|
610
612
|
|
|
611
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
612
|
-
| -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- |
|
|
613
|
-
| `options` | `object` | ✅ | — | — |
|
|
614
|
-
| ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3')
|
|
615
|
-
| ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type
|
|
616
|
-
| ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row')
|
|
617
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (
|
|
618
|
-
| ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action
|
|
619
|
-
| ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000)
|
|
620
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page
|
|
621
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages
|
|
622
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from
|
|
613
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
614
|
+
| -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
615
|
+
| `options` | `object` | ✅ | — | — | |
|
|
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 |
|
|
623
625
|
|
|
624
626
|
**Returns:** `Promise<PaginatedResult<ActionResultItem>>`
|
|
625
627
|
|
|
@@ -662,10 +664,10 @@ Bind a connection alias or numeric connectionId to an app
|
|
|
662
664
|
|
|
663
665
|
**Parameters:**
|
|
664
666
|
|
|
665
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
666
|
-
| -------------- | ---------------- | -------- | ------- | --------------- |
|
|
667
|
-
| `options` | `object` | ✅ | — | — |
|
|
668
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (
|
|
667
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
668
|
+
| -------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
669
|
+
| `options` | `object` | ✅ | — | — | |
|
|
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. |
|
|
669
671
|
|
|
670
672
|
**Returns:** `Promise<AppProxy>`
|
|
671
673
|
|
|
@@ -681,12 +683,12 @@ Execute an action with the given inputs for the bound app, as an alternative to
|
|
|
681
683
|
|
|
682
684
|
**Parameters:**
|
|
683
685
|
|
|
684
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
685
|
-
| -------------- | ---------------- | -------- | ------- | --------------- |
|
|
686
|
-
| `options` | `object` | ✅ | — | — |
|
|
687
|
-
| ↳ `inputs` | `object` | ❌ | — | — |
|
|
688
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (
|
|
689
|
-
| ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000)
|
|
686
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
687
|
+
| -------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
688
|
+
| `options` | `object` | ✅ | — | — | |
|
|
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) |
|
|
690
692
|
|
|
691
693
|
**Returns:** `Promise<PaginatedResult<ActionResultItem>>`
|
|
692
694
|
|
|
@@ -901,10 +903,10 @@ Execute getConnection
|
|
|
901
903
|
|
|
902
904
|
**Parameters:**
|
|
903
905
|
|
|
904
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
905
|
-
| -------------- | ---------------- | -------- | ------- | --------------- |
|
|
906
|
-
| `options` | `object` | ✅ | — | — |
|
|
907
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (
|
|
906
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
907
|
+
| -------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
908
|
+
| `options` | `object` | ✅ | — | — | |
|
|
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. |
|
|
908
910
|
|
|
909
911
|
**Returns:** `Promise<ConnectionItem>`
|
|
910
912
|
|
|
@@ -962,16 +964,16 @@ Make authenticated HTTP requests to any API through Zapier. Pass a connectionId
|
|
|
962
964
|
|
|
963
965
|
**Parameters:**
|
|
964
966
|
|
|
965
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
966
|
-
| --------------- | ------------------------ | -------- | ------- | ---------------------------------------------------------- |
|
|
967
|
-
| `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service)
|
|
968
|
-
| `init` | `object` | ❌ | — | — | Request options including method, headers, body, and authentication
|
|
969
|
-
| ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET)
|
|
970
|
-
| ↳ `headers` | `object` | ❌ | — | — | HTTP headers to include in the request
|
|
971
|
-
| ↳ `body` | `string, custom, record` | ❌ | — | — | Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly
|
|
972
|
-
| ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (
|
|
973
|
-
| ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async)
|
|
974
|
-
| ↳ `maxTime` | `number` | ❌ | — | — | Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling.
|
|
967
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
968
|
+
| --------------- | ------------------------ | -------- | ------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
969
|
+
| `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service) |
|
|
970
|
+
| `init` | `object` | ❌ | — | — | Request options including method, headers, body, and authentication |
|
|
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. |
|
|
975
977
|
|
|
976
978
|
**Returns:** `Promise<Response>`
|
|
977
979
|
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAGjB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAGjB,MAAM,SAAS,CAAC;AA2/BjB,eAAO,MAAM,eAAe,GAAI,SAAS,gBAAgB,KAAG,SAW3D,CAAC"}
|