@zapier/zapier-sdk 0.17.0 → 0.18.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +92 -92
  3. package/dist/api/schemas.d.ts +1 -1
  4. package/dist/api/schemas.js +1 -1
  5. package/dist/index.cjs +81 -45
  6. package/dist/index.d.mts +58 -100
  7. package/dist/index.mjs +81 -45
  8. package/dist/plugins/apps/index.js +2 -2
  9. package/dist/plugins/apps/schemas.d.ts +4 -3
  10. package/dist/plugins/apps/schemas.d.ts.map +1 -1
  11. package/dist/plugins/apps/schemas.js +3 -2
  12. package/dist/plugins/fetch/index.d.ts +2 -2
  13. package/dist/plugins/fetch/index.d.ts.map +1 -1
  14. package/dist/plugins/fetch/schemas.d.ts +1 -1
  15. package/dist/plugins/fetch/schemas.d.ts.map +1 -1
  16. package/dist/plugins/fetch/schemas.js +2 -4
  17. package/dist/plugins/findFirstAuthentication/index.test.js +4 -4
  18. package/dist/plugins/findUniqueAuthentication/index.test.js +4 -4
  19. package/dist/plugins/getAuthentication/index.js +1 -1
  20. package/dist/plugins/getAuthentication/index.test.js +9 -4
  21. package/dist/plugins/getInputFieldsSchema/schemas.d.ts +1 -1
  22. package/dist/plugins/getProfile/index.d.ts.map +1 -1
  23. package/dist/plugins/getProfile/index.js +7 -4
  24. package/dist/plugins/listAuthentications/index.test.js +9 -9
  25. package/dist/plugins/listInputFieldChoices/schemas.d.ts +1 -1
  26. package/dist/plugins/listInputFields/schemas.d.ts +1 -1
  27. package/dist/plugins/manifest/schemas.d.ts +2 -2
  28. package/dist/plugins/manifest/schemas.d.ts.map +1 -1
  29. package/dist/plugins/manifest/schemas.js +2 -5
  30. package/dist/plugins/request/index.d.ts.map +1 -1
  31. package/dist/plugins/request/index.js +2 -1
  32. package/dist/plugins/request/schemas.d.ts +2 -2
  33. package/dist/plugins/request/schemas.d.ts.map +1 -1
  34. package/dist/plugins/request/schemas.js +2 -5
  35. package/dist/plugins/runAction/schemas.d.ts +1 -1
  36. package/dist/resolvers/inputFieldKey.d.ts +1 -1
  37. package/dist/resolvers/inputFieldKey.d.ts.map +1 -1
  38. package/dist/resolvers/inputs.d.ts +1 -1
  39. package/dist/resolvers/inputs.d.ts.map +1 -1
  40. package/dist/schemas/Auth.d.ts +6 -6
  41. package/dist/schemas/Auth.d.ts.map +1 -1
  42. package/dist/schemas/Auth.js +3 -1
  43. package/dist/schemas/UserProfile.d.ts +2 -44
  44. package/dist/schemas/UserProfile.d.ts.map +1 -1
  45. package/dist/schemas/UserProfile.js +10 -21
  46. package/dist/services/implementations.d.ts +2 -2
  47. package/dist/services/implementations.d.ts.map +1 -1
  48. package/dist/services/implementations.js +3 -2
  49. package/dist/temporary-internal-core/handlers/getAuthentication.test.js +6 -6
  50. package/dist/temporary-internal-core/schemas/authentications/index.d.ts +7 -7
  51. package/dist/temporary-internal-core/schemas/authentications/index.d.ts.map +1 -1
  52. package/dist/temporary-internal-core/schemas/authentications/index.js +5 -4
  53. package/dist/temporary-internal-core/utils/transformations.d.ts.map +1 -1
  54. package/dist/temporary-internal-core/utils/transformations.js +4 -2
  55. package/dist/types/properties.d.ts +1 -1
  56. package/dist/types/properties.d.ts.map +1 -1
  57. package/dist/types/properties.js +1 -2
  58. package/dist/utils/domain-utils.d.ts.map +1 -1
  59. package/dist/utils/domain-utils.js +4 -2
  60. package/dist/utils/id-utils.d.ts +13 -0
  61. package/dist/utils/id-utils.d.ts.map +1 -0
  62. package/dist/utils/id-utils.js +22 -0
  63. package/dist/utils/id-utils.test.d.ts +2 -0
  64. package/dist/utils/id-utils.test.d.ts.map +1 -0
  65. package/dist/utils/id-utils.test.js +22 -0
  66. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c2eab85: Switch numeric IDs to strings.
8
+
3
9
  ## 0.17.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -263,14 +263,14 @@ Get the JSON Schema representation of input fields for an action. Returns a JSON
263
263
 
264
264
  **Parameters:**
265
265
 
266
- | Name | Type | Required | Default | Possible Values | Description |
267
- | -------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
268
- | `options` | `object` | ✅ | — | — | |
269
- | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
270
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
271
- | ↳ `actionKey` | `string` | ✅ | — | — | Action key to get the input schema for |
272
- | ↳ `authenticationId` | `string` | ❌ | — | — | Authentication ID to use when fetching the schema. Required if the action needs authentication to determine available fields. |
273
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
266
+ | Name | Type | Required | Default | Possible Values | Description |
267
+ | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
268
+ | `options` | `object` | ✅ | — | — | |
269
+ | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
270
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
271
+ | ↳ `actionKey` | `string` | ✅ | — | — | Action key to get the input schema for |
272
+ | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use when fetching the schema. Required if the action needs authentication to determine available fields. |
273
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
274
274
 
275
275
  **Returns:** `Promise<InputSchemaItem>`
276
276
 
@@ -332,19 +332,19 @@ Get the available choices for a dynamic dropdown input field
332
332
 
333
333
  **Parameters:**
334
334
 
335
- | Name | Type | Required | Default | Possible Values | Description |
336
- | -------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
337
- | `options` | `object` | ✅ | — | — | |
338
- | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
339
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
340
- | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
341
- | ↳ `inputFieldKey` | `string` | ✅ | — | — | Input field key to get choices for. |
342
- | ↳ `authenticationId` | `string` | ❌ | — | — | Authentication ID to use for this action |
343
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
344
- | ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
345
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
346
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
347
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
335
+ | Name | Type | Required | Default | Possible Values | Description |
336
+ | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
337
+ | `options` | `object` | ✅ | — | — | |
338
+ | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
339
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
340
+ | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
341
+ | ↳ `inputFieldKey` | `string` | ✅ | — | — | Input field key to get choices for. |
342
+ | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
343
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
344
+ | ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
345
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
346
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
347
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
348
348
 
349
349
  **Returns:** `Promise<PaginatedResult<InputFieldChoiceItem>>`
350
350
 
@@ -390,17 +390,17 @@ Get the input fields required for a specific action
390
390
 
391
391
  **Parameters:**
392
392
 
393
- | Name | Type | Required | Default | Possible Values | Description |
394
- | -------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
395
- | `options` | `object` | ✅ | — | — | |
396
- | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
397
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
398
- | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
399
- | ↳ `authenticationId` | `string` | ❌ | — | — | Authentication ID to use for this action |
400
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
401
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
402
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
403
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
393
+ | Name | Type | Required | Default | Possible Values | Description |
394
+ | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
395
+ | `options` | `object` | ✅ | — | — | |
396
+ | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
397
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
398
+ | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
399
+ | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
400
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
401
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
402
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
403
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
404
404
 
405
405
  **Returns:** `Promise<PaginatedResult<RootFieldItemItem>>`
406
406
 
@@ -441,17 +441,17 @@ Execute an action with the given inputs
441
441
 
442
442
  **Parameters:**
443
443
 
444
- | Name | Type | Required | Default | Possible Values | Description |
445
- | -------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------- |
446
- | `options` | `object` | ✅ | — | — | |
447
- | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
448
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
449
- | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
450
- | ↳ `authenticationId` | `string` | ❌ | — | — | Authentication ID to use for this action |
451
- | ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
452
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
453
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
454
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
444
+ | Name | Type | Required | Default | Possible Values | Description |
445
+ | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------- |
446
+ | `options` | `object` | ✅ | — | — | |
447
+ | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
448
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
449
+ | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
450
+ | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
451
+ | ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
452
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
453
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
454
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
455
455
 
456
456
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
457
457
 
@@ -494,10 +494,10 @@ Bind an authentication ID to an app
494
494
 
495
495
  **Parameters:**
496
496
 
497
- | Name | Type | Required | Default | Possible Values | Description |
498
- | -------------------- | -------- | -------- | ------- | --------------- | ----------- |
499
- | `options` | `object` | ✅ | — | — | |
500
- | ↳ `authenticationId` | `number` | ✅ | — | — | |
497
+ | Name | Type | Required | Default | Possible Values | Description |
498
+ | -------------------- | ---------------- | -------- | ------- | --------------- | ---------------------------------------- |
499
+ | `options` | `object` | ✅ | — | — | |
500
+ | ↳ `authenticationId` | `string, number` | ✅ | — | — | Authentication ID to use for this action |
501
501
 
502
502
  **Returns:** `Promise<AppProxy>`
503
503
 
@@ -505,7 +505,7 @@ Bind an authentication ID to an app
505
505
 
506
506
  ```typescript
507
507
  const result = await sdk.apps.appKey({
508
- authenticationId: 12345,
508
+ authenticationId: "example-value",
509
509
  });
510
510
  ```
511
511
 
@@ -515,11 +515,11 @@ Execute an action with the given inputs for the bound app, as an alternative to
515
515
 
516
516
  **Parameters:**
517
517
 
518
- | Name | Type | Required | Default | Possible Values | Description |
519
- | -------------------- | -------- | -------- | ------- | --------------- | ----------- |
520
- | `options` | `object` | ✅ | — | — | |
521
- | ↳ `inputs` | `object` | ❌ | — | — | |
522
- | ↳ `authenticationId` | `number` | ❌ | — | — | |
518
+ | Name | Type | Required | Default | Possible Values | Description |
519
+ | -------------------- | ---------------- | -------- | ------- | --------------- | ---------------------------------------- |
520
+ | `options` | `object` | ✅ | — | — | |
521
+ | ↳ `inputs` | `object` | ❌ | — | — | |
522
+ | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
523
523
 
524
524
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
525
525
 
@@ -652,10 +652,10 @@ Get a specific authentication by ID
652
652
 
653
653
  **Parameters:**
654
654
 
655
- | Name | Type | Required | Default | Possible Values | Description |
656
- | -------------------- | -------- | -------- | ------- | --------------- | ----------------------------- |
657
- | `options` | `object` | ✅ | — | — | |
658
- | ↳ `authenticationId` | `number` | ✅ | — | — | Authentication ID to retrieve |
655
+ | Name | Type | Required | Default | Possible Values | Description |
656
+ | -------------------- | ---------------- | -------- | ------- | --------------- | ----------------------------- |
657
+ | `options` | `object` | ✅ | — | — | |
658
+ | ↳ `authenticationId` | `string, number` | ✅ | — | — | Authentication ID to retrieve |
659
659
 
660
660
  **Returns:** `Promise<AuthenticationItem>`
661
661
 
@@ -663,7 +663,7 @@ Get a specific authentication by ID
663
663
 
664
664
  ```typescript
665
665
  const { data: authentication } = await sdk.getAuthentication({
666
- authenticationId: 12345,
666
+ authenticationId: "example-value",
667
667
  });
668
668
  ```
669
669
 
@@ -673,18 +673,18 @@ List available authentications with optional filtering
673
673
 
674
674
  **Parameters:**
675
675
 
676
- | Name | Type | Required | Default | Possible Values | Description |
677
- | --------------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------ |
678
- | `options` | `object` | ✅ | — | — | |
679
- | ↳ `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
680
- | ↳ `authenticationIds` | `array` | ❌ | — | — | List of authentication IDs to filter by |
681
- | ↳ `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
682
- | ↳ `title` | `string` | ❌ | — | — | Filter authentications by exact title match |
683
- | ↳ `accountId` | `string` | ❌ | — | — | Filter by account ID |
684
- | ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
685
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of authentications per page |
686
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
687
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
676
+ | Name | Type | Required | Default | Possible Values | Description |
677
+ | --------------------- | ----------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------ |
678
+ | `options` | `object` | ✅ | — | — | |
679
+ | ↳ `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
680
+ | ↳ `authenticationIds` | `array` | ❌ | — | — | List of authentication IDs to filter by |
681
+ | ↳ `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
682
+ | ↳ `title` | `string` | ❌ | — | — | Filter authentications by exact title match |
683
+ | ↳ `accountId` | `string` | ❌ | — | — | Filter by account ID |
684
+ | ↳ `owner` | `string, literal` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
685
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of authentications per page |
686
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
687
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
688
688
 
689
689
  **Returns:** `Promise<PaginatedResult<AuthenticationItem>>`
690
690
 
@@ -713,23 +713,23 @@ Execute fetch
713
713
 
714
714
  **Parameters:**
715
715
 
716
- | Name | Type | Required | Default | Possible Values | Description |
717
- | -------------------------- | -------- | -------- | ------- | ---------------------------------------------------------- | -------------------------------------------------------------------- |
718
- | `url` | `string` | ✅ | — | — | The URL to fetch |
719
- | `init` | `object` | ❌ | — | — | Fetch options including authentication |
720
- | ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | |
721
- | ↳ `headers` | `object` | ❌ | — | — | |
722
- | ↳ `body` | `string` | ❌ | — | — | |
723
- | ↳ `authenticationId` | `number` | ❌ | — | — | Zapier authentication ID to use for the request |
724
- | ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
725
- | ↳ `authenticationTemplate` | `string` | ❌ | — | — | Optional JSON string authentication template to bypass Notary lookup |
716
+ | Name | Type | Required | Default | Possible Values | Description |
717
+ | -------------------------- | ------------------------ | -------- | ------- | ---------------------------------------------------------- | -------------------------------------------------------------------- |
718
+ | `url` | `string, custom` | ✅ | — | — | The URL to fetch |
719
+ | `init` | `object` | ❌ | — | — | Fetch options including authentication |
720
+ | ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | |
721
+ | ↳ `headers` | `object` | ❌ | — | — | |
722
+ | ↳ `body` | `string, custom, custom` | ❌ | — | — | |
723
+ | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
724
+ | ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
725
+ | ↳ `authenticationTemplate` | `string` | ❌ | — | — | Optional JSON string authentication template to bypass Notary lookup |
726
726
 
727
727
  **Returns:** `Promise<Response>`
728
728
 
729
729
  **Example:**
730
730
 
731
731
  ```typescript
732
- const result = await sdk.fetch("https://example.com", { key: "value" });
732
+ const result = await sdk.fetch("example-value", { key: "value" });
733
733
  ```
734
734
 
735
735
  #### `request`
@@ -738,17 +738,17 @@ Make authenticated HTTP requests through Zapier's Relay service
738
738
 
739
739
  **Parameters:**
740
740
 
741
- | Name | Type | Required | Default | Possible Values | Description |
742
- | -------------------------- | -------- | -------- | ------- | ---------------------------------------------------------- | -------------------------------------------------------------------- |
743
- | `options` | `object` | ✅ | — | — | |
744
- | ↳ `url` | `string` | ✅ | — | — | The URL to request (will be proxied through Relay) |
745
- | ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method |
746
- | ↳ `body` | `string` | ❌ | — | — | Request body as a string |
747
- | ↳ `authenticationId` | `number` | ❌ | — | — | Zapier authentication ID to use for the request |
748
- | ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
749
- | ↳ `authenticationTemplate` | `string` | ❌ | — | — | Optional JSON string authentication template to bypass Notary lookup |
750
- | ↳ `headers` | `string` | ❌ | — | — | Request headers |
751
- | ↳ `relayBaseUrl` | `string` | ❌ | — | — | Base URL for Relay service |
741
+ | Name | Type | Required | Default | Possible Values | Description |
742
+ | -------------------------- | ----------------------- | -------- | ------- | ---------------------------------------------------------- | -------------------------------------------------------------------- |
743
+ | `options` | `object` | ✅ | — | — | |
744
+ | ↳ `url` | `string` | ✅ | — | — | The URL to request (will be proxied through Relay) |
745
+ | ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method |
746
+ | ↳ `body` | `string` | ❌ | — | — | Request body as a string |
747
+ | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
748
+ | ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
749
+ | ↳ `authenticationTemplate` | `string` | ❌ | — | — | Optional JSON string authentication template to bypass Notary lookup |
750
+ | ↳ `headers` | `record, custom, array` | ❌ | — | — | Request headers |
751
+ | ↳ `relayBaseUrl` | `string` | ❌ | — | — | Base URL for Relay service |
752
752
 
753
753
  **Returns:** `Promise<Response>`
754
754
 
@@ -552,7 +552,7 @@ export declare const NeedChoicesResponseLinksSchema: z.ZodObject<{
552
552
  }, z.core.$strip>;
553
553
  export declare const NeedChoicesRequestSchema: z.ZodObject<{
554
554
  selected_api: z.ZodOptional<z.ZodString>;
555
- authentication_id: z.ZodOptional<z.ZodNumber>;
555
+ authentication_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
556
556
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
557
557
  page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
558
558
  prefill: z.ZodOptional<z.ZodString>;
@@ -385,7 +385,7 @@ export const NeedChoicesRequestSchema = z.object({
385
385
  .string()
386
386
  .optional()
387
387
  .describe("Something like `SlackAPI` (for Python apps) or `SplitwiseCLIAPI@1.0.0` (for CLI apps). Non-public apps are fine as long as the authed user can access them."),
388
- authentication_id: z
388
+ authentication_id: z.coerce
389
389
  .number()
390
390
  .optional()
391
391
  .describe("If the app needs auth, provide an `authentication_id` that has the `selected_api` of the app you want to run. Can be any auth visible to the user (including shared)."),