@zapier/zapier-sdk 0.26.0 → 0.27.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 (157) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/CLAUDE.md +6 -6
  3. package/README.md +217 -222
  4. package/dist/api/index.d.ts +1 -1
  5. package/dist/api/index.d.ts.map +1 -1
  6. package/dist/api/types.d.ts +3 -3
  7. package/dist/api/types.d.ts.map +1 -1
  8. package/dist/index.cjs +367 -216
  9. package/dist/index.d.mts +171 -91
  10. package/dist/index.d.ts +6 -5
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +4 -4
  13. package/dist/index.mjs +359 -211
  14. package/dist/plugins/apps/index.d.ts.map +1 -1
  15. package/dist/plugins/apps/index.js +20 -13
  16. package/dist/plugins/apps/schemas.d.ts +6 -2
  17. package/dist/plugins/apps/schemas.d.ts.map +1 -1
  18. package/dist/plugins/apps/schemas.js +7 -3
  19. package/dist/plugins/deprecated/authentications.d.ts +79 -0
  20. package/dist/plugins/deprecated/authentications.d.ts.map +1 -0
  21. package/dist/plugins/deprecated/authentications.js +90 -0
  22. package/dist/plugins/fetch/index.d.ts +4 -0
  23. package/dist/plugins/fetch/index.d.ts.map +1 -1
  24. package/dist/plugins/fetch/index.js +7 -4
  25. package/dist/plugins/fetch/schemas.d.ts +1 -0
  26. package/dist/plugins/fetch/schemas.d.ts.map +1 -1
  27. package/dist/plugins/fetch/schemas.js +3 -1
  28. package/dist/plugins/findFirstConnection/index.d.ts +21 -0
  29. package/dist/plugins/findFirstConnection/index.d.ts.map +1 -0
  30. package/dist/plugins/findFirstConnection/index.js +37 -0
  31. package/dist/plugins/findFirstConnection/index.test.d.ts.map +1 -0
  32. package/dist/plugins/{findFirstAuthentication → findFirstConnection}/index.test.js +43 -43
  33. package/dist/plugins/findFirstConnection/schemas.d.ts +22 -0
  34. package/dist/plugins/findFirstConnection/schemas.d.ts.map +1 -0
  35. package/dist/plugins/findFirstConnection/schemas.js +8 -0
  36. package/dist/plugins/findUniqueConnection/index.d.ts +21 -0
  37. package/dist/plugins/findUniqueConnection/index.d.ts.map +1 -0
  38. package/dist/plugins/findUniqueConnection/index.js +40 -0
  39. package/dist/plugins/findUniqueConnection/index.test.d.ts.map +1 -0
  40. package/dist/plugins/{findUniqueAuthentication → findUniqueConnection}/index.test.js +41 -41
  41. package/dist/plugins/findUniqueConnection/schemas.d.ts +22 -0
  42. package/dist/plugins/findUniqueConnection/schemas.d.ts.map +1 -0
  43. package/dist/plugins/findUniqueConnection/schemas.js +8 -0
  44. package/dist/plugins/getApp/index.js +2 -2
  45. package/dist/plugins/getConnection/index.d.ts +22 -0
  46. package/dist/plugins/getConnection/index.d.ts.map +1 -0
  47. package/dist/plugins/getConnection/index.js +35 -0
  48. package/dist/plugins/getConnection/index.test.d.ts.map +1 -0
  49. package/dist/plugins/{getAuthentication → getConnection}/index.test.js +46 -28
  50. package/dist/plugins/getConnection/schemas.d.ts +13 -0
  51. package/dist/plugins/getConnection/schemas.d.ts.map +1 -0
  52. package/dist/plugins/getConnection/schemas.js +8 -0
  53. package/dist/plugins/getInputFieldsSchema/index.d.ts.map +1 -1
  54. package/dist/plugins/getInputFieldsSchema/index.js +7 -4
  55. package/dist/plugins/getInputFieldsSchema/schemas.d.ts +1 -0
  56. package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +1 -1
  57. package/dist/plugins/getInputFieldsSchema/schemas.js +6 -2
  58. package/dist/plugins/listApps/schemas.js +2 -2
  59. package/dist/plugins/listClientCredentials/schemas.js +2 -2
  60. package/dist/plugins/listConnections/index.d.ts +24 -0
  61. package/dist/plugins/listConnections/index.d.ts.map +1 -0
  62. package/dist/plugins/{listAuthentications → listConnections}/index.js +28 -21
  63. package/dist/plugins/listConnections/index.test.d.ts.map +1 -0
  64. package/dist/plugins/{listAuthentications → listConnections}/index.test.js +219 -198
  65. package/dist/plugins/{listAuthentications → listConnections}/schemas.d.ts +11 -10
  66. package/dist/plugins/listConnections/schemas.d.ts.map +1 -0
  67. package/dist/plugins/listConnections/schemas.js +47 -0
  68. package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
  69. package/dist/plugins/listInputFieldChoices/index.js +8 -5
  70. package/dist/plugins/listInputFieldChoices/schemas.d.ts +1 -0
  71. package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -1
  72. package/dist/plugins/listInputFieldChoices/schemas.js +3 -1
  73. package/dist/plugins/listInputFields/index.d.ts.map +1 -1
  74. package/dist/plugins/listInputFields/index.js +7 -4
  75. package/dist/plugins/listInputFields/schemas.d.ts +1 -0
  76. package/dist/plugins/listInputFields/schemas.d.ts.map +1 -1
  77. package/dist/plugins/listInputFields/schemas.js +3 -1
  78. package/dist/plugins/manifest/schemas.d.ts +2 -0
  79. package/dist/plugins/manifest/schemas.d.ts.map +1 -1
  80. package/dist/plugins/manifest/schemas.js +3 -1
  81. package/dist/plugins/registry/index.d.ts.map +1 -1
  82. package/dist/plugins/registry/index.js +3 -2
  83. package/dist/plugins/request/index.d.ts.map +1 -1
  84. package/dist/plugins/request/index.js +5 -2
  85. package/dist/plugins/request/schemas.d.ts +2 -0
  86. package/dist/plugins/request/schemas.d.ts.map +1 -1
  87. package/dist/plugins/request/schemas.js +3 -1
  88. package/dist/plugins/runAction/index.d.ts.map +1 -1
  89. package/dist/plugins/runAction/index.js +12 -8
  90. package/dist/plugins/runAction/schemas.d.ts +1 -0
  91. package/dist/plugins/runAction/schemas.d.ts.map +1 -1
  92. package/dist/plugins/runAction/schemas.js +4 -2
  93. package/dist/resolvers/connectionId.d.ts +9 -0
  94. package/dist/resolvers/connectionId.d.ts.map +1 -0
  95. package/dist/resolvers/connectionId.js +42 -0
  96. package/dist/resolvers/index.d.ts +5 -1
  97. package/dist/resolvers/index.d.ts.map +1 -1
  98. package/dist/resolvers/index.js +6 -1
  99. package/dist/resolvers/inputFieldKey.d.ts +1 -1
  100. package/dist/resolvers/inputFieldKey.d.ts.map +1 -1
  101. package/dist/resolvers/inputFieldKey.js +2 -2
  102. package/dist/resolvers/inputs.d.ts +1 -1
  103. package/dist/resolvers/inputs.d.ts.map +1 -1
  104. package/dist/resolvers/inputs.js +4 -4
  105. package/dist/schemas/Connection.d.ts +29 -0
  106. package/dist/schemas/Connection.d.ts.map +1 -0
  107. package/dist/schemas/{Auth.js → Connection.js} +5 -7
  108. package/dist/sdk.d.ts +29 -7
  109. package/dist/sdk.d.ts.map +1 -1
  110. package/dist/sdk.js +12 -5
  111. package/dist/sdk.test.js +9 -8
  112. package/dist/services/implementations.d.ts +6 -6
  113. package/dist/services/implementations.d.ts.map +1 -1
  114. package/dist/services/implementations.js +10 -10
  115. package/dist/types/domain.d.ts +4 -4
  116. package/dist/types/domain.d.ts.map +1 -1
  117. package/dist/types/properties.d.ts +5 -1
  118. package/dist/types/properties.d.ts.map +1 -1
  119. package/dist/types/properties.js +4 -2
  120. package/dist/types/sdk.d.ts +12 -9
  121. package/dist/types/sdk.d.ts.map +1 -1
  122. package/package.json +2 -2
  123. package/dist/plugins/findFirstAuthentication/index.d.ts +0 -21
  124. package/dist/plugins/findFirstAuthentication/index.d.ts.map +0 -1
  125. package/dist/plugins/findFirstAuthentication/index.js +0 -36
  126. package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +0 -1
  127. package/dist/plugins/findFirstAuthentication/schemas.d.ts +0 -21
  128. package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +0 -1
  129. package/dist/plugins/findFirstAuthentication/schemas.js +0 -8
  130. package/dist/plugins/findUniqueAuthentication/index.d.ts +0 -21
  131. package/dist/plugins/findUniqueAuthentication/index.d.ts.map +0 -1
  132. package/dist/plugins/findUniqueAuthentication/index.js +0 -39
  133. package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +0 -1
  134. package/dist/plugins/findUniqueAuthentication/schemas.d.ts +0 -21
  135. package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +0 -1
  136. package/dist/plugins/findUniqueAuthentication/schemas.js +0 -8
  137. package/dist/plugins/getAuthentication/index.d.ts +0 -21
  138. package/dist/plugins/getAuthentication/index.d.ts.map +0 -1
  139. package/dist/plugins/getAuthentication/index.js +0 -29
  140. package/dist/plugins/getAuthentication/index.test.d.ts.map +0 -1
  141. package/dist/plugins/getAuthentication/schemas.d.ts +0 -7
  142. package/dist/plugins/getAuthentication/schemas.d.ts.map +0 -1
  143. package/dist/plugins/getAuthentication/schemas.js +0 -1
  144. package/dist/plugins/listAuthentications/index.d.ts +0 -24
  145. package/dist/plugins/listAuthentications/index.d.ts.map +0 -1
  146. package/dist/plugins/listAuthentications/index.test.d.ts.map +0 -1
  147. package/dist/plugins/listAuthentications/schemas.d.ts.map +0 -1
  148. package/dist/plugins/listAuthentications/schemas.js +0 -32
  149. package/dist/resolvers/authenticationId.d.ts +0 -9
  150. package/dist/resolvers/authenticationId.d.ts.map +0 -1
  151. package/dist/resolvers/authenticationId.js +0 -42
  152. package/dist/schemas/Auth.d.ts +0 -55
  153. package/dist/schemas/Auth.d.ts.map +0 -1
  154. /package/dist/plugins/{findFirstAuthentication → findFirstConnection}/index.test.d.ts +0 -0
  155. /package/dist/plugins/{findUniqueAuthentication → findUniqueConnection}/index.test.d.ts +0 -0
  156. /package/dist/plugins/{getAuthentication → getConnection}/index.test.d.ts +0 -0
  157. /package/dist/plugins/{listAuthentications → listConnections}/index.test.d.ts +0 -0
package/README.md CHANGED
@@ -21,15 +21,15 @@
21
21
  - [`apps.{appKey}.{actionType}.{actionKey}`](#appsappkeyactiontypeactionkey)
22
22
  - [`getApp`](#getapp)
23
23
  - [`listApps`](#listapps)
24
- - [Authentications](#authentications)
25
- - [`findFirstAuthentication`](#findfirstauthentication)
26
- - [`findUniqueAuthentication`](#finduniqueauthentication)
27
- - [`getAuthentication`](#getauthentication)
28
- - [`listAuthentications`](#listauthentications)
29
24
  - [Client Credentials](#client-credentials)
30
25
  - [`createClientCredentials`](#createclientcredentials)
31
26
  - [`deleteClientCredentials`](#deleteclientcredentials)
32
27
  - [`listClientCredentials`](#listclientcredentials)
28
+ - [Connections](#connections)
29
+ - [`findFirstConnection`](#findfirstconnection)
30
+ - [`findUniqueConnection`](#finduniqueconnection)
31
+ - [`getConnection`](#getconnection)
32
+ - [`listConnections`](#listconnections)
33
33
  - [HTTP Requests](#http-requests)
34
34
  - [`fetch`](#fetch)
35
35
 
@@ -64,7 +64,7 @@ npm install -D @zapier/zapier-sdk-cli @types/node typescript
64
64
 
65
65
  ## Quick Start
66
66
 
67
- Assuming you've installed the CLI package into your project (see instructions above), you (or an agent) can start using it right away. This is useful for introspecting actions, authentications, etc. that you want to use in code, but you can also use it to directly use integrations.
67
+ Assuming you've installed the CLI package into your project (see instructions above), you (or an agent) can start using it right away. This is useful for introspecting actions, connections, etc. that you want to use in code, but you can also use it to directly use integrations.
68
68
 
69
69
  ```bash
70
70
  # See all available commands
@@ -82,19 +82,19 @@ npx zapier-sdk list-apps --search "gmail"
82
82
  npx zapier-sdk run-action gmail
83
83
  # This will ask you for the type of action you want to run.
84
84
  # `search` or `write` are typically great for testing.
85
- # Note that you usually need an authentication (connection) to the app to run
85
+ # Note that you usually need a connection to the app to run
86
86
  # the action. If you don't already have one, you can create a new one at:
87
87
  # https://zapier.com/app/assets/connections
88
88
 
89
- # List authentications for an app.
90
- npx zapier-sdk list-authentications gmail
89
+ # List connections for an app.
90
+ npx zapier-sdk list-connections gmail
91
91
  # Or only list the ones you own.
92
- npx zapier-sdk list-authentications gmail --owner me
92
+ npx zapier-sdk list-connections gmail --owner me
93
93
  # Or just grab the first one.
94
- npx zapier-sdk find-first-authentication gmail --owner me
94
+ npx zapier-sdk find-first-connection gmail --owner me
95
95
 
96
- # Make any API request to an app using your authentication (connection).
97
- npx zapier-sdk fetch "https://gmail.googleapis.com/gmail/v1/users/me/labels" --authentication-id 123
96
+ # Make any API request to an app using your connection.
97
+ npx zapier-sdk fetch "https://gmail.googleapis.com/gmail/v1/users/me/labels" --connection-id 123
98
98
  ```
99
99
 
100
100
  The following is optional, but if you want to call our actions from code, it can be helpful to install TypeScript types for those actions. You can also just use `fetch` to make arbitrary API requests. In that case, you don't really need this, and instead you might need types or a good agent that will look up third party API docs.
@@ -156,7 +156,7 @@ console.log({
156
156
  secondPageApps,
157
157
  });
158
158
 
159
- // List methods also return an iterator for all pages.
159
+ // List methods also return an iterable for all pages.
160
160
  // Be careful with lots of pages, note the `search` to filter.
161
161
  for await (const page of zapier.listApps({ search: "slack" })) {
162
162
  const { data: apps } = page;
@@ -190,14 +190,14 @@ console.log({
190
190
  app,
191
191
  });
192
192
 
193
- // ######## Authentication Usage ########
194
- const { data: myAuths } = await zapier.listAuthentications({
193
+ // ######## Connection Usage ########
194
+ const { data: myConnections } = await zapier.listConnections({
195
195
  appKey: "slack",
196
196
  owner: "me",
197
197
  });
198
198
 
199
199
  console.log({
200
- myAuths,
200
+ myConnections,
201
201
  });
202
202
 
203
203
  // ######## Find Actions ########
@@ -233,7 +233,7 @@ const { data: channels } = await zapier.runAction({
233
233
  appKey: "slack",
234
234
  actionType: "read",
235
235
  actionKey: "channels",
236
- authenticationId: myAuths[0].id,
236
+ connectionId: myConnections[0].id,
237
237
  });
238
238
 
239
239
  console.log({
@@ -243,9 +243,9 @@ console.log({
243
243
  const { data: profile } = await zapier.getProfile();
244
244
 
245
245
  // Option 2:
246
- // Create an app binding to your authentication.
246
+ // Create an app binding to your connection.
247
247
  const mySlack = zapier.apps.slack({
248
- authenticationId: myAuths[0].id,
248
+ connectionId: myConnections[0].id,
249
249
  });
250
250
 
251
251
  // Use your app binding to run the action.
@@ -259,12 +259,12 @@ console.log({
259
259
  users,
260
260
  });
261
261
 
262
- // You can also skip the app binding and pass the auth into the action.
262
+ // You can also skip the app binding and pass the connection into the action.
263
263
  const { data: sameUsers } = await zapier.apps.slack.search.user_by_email({
264
264
  inputs: {
265
265
  email: profile.email,
266
266
  },
267
- authenticationId: myAuths[0].id,
267
+ connectionId: myConnections[0].id,
268
268
  });
269
269
 
270
270
  console.log({
@@ -278,10 +278,10 @@ console.log({
278
278
 
279
279
  // We have tens of thousands of actions across thousands of apps, but you're
280
280
  // still not limited to those. You can make any arbitrary API request to an app
281
- // using the same authentications with `.fetch`! This returns a response just
281
+ // using the same connections with `.fetch`! This returns a response just
282
282
  // like a normal `fetch` call in JavaScript.
283
283
  const emojiResponse = await zapier.fetch("https://slack.com/api/emoji.list", {
284
- authenticationId: myAuths[0].id,
284
+ connectionId: myConnections[0].id,
285
285
  });
286
286
 
287
287
  const emojiData = await emojiResponse.json();
@@ -308,7 +308,7 @@ Get current user's profile information
308
308
  **Example:**
309
309
 
310
310
  ```typescript
311
- const { data: profile } = await sdk.getProfile();
311
+ const { data: profile } = await zapier.getProfile();
312
312
  ```
313
313
 
314
314
  ### Actions
@@ -331,7 +331,7 @@ Get detailed information about a specific action
331
331
  **Example:**
332
332
 
333
333
  ```typescript
334
- const { data: action } = await sdk.getAction({
334
+ const { data: action } = await zapier.getAction({
335
335
  appKey: "example-key",
336
336
  actionType: "read",
337
337
  actionKey: "example-key",
@@ -344,21 +344,21 @@ Get the JSON Schema representation of input fields for an action. Returns a JSON
344
344
 
345
345
  **Parameters:**
346
346
 
347
- | Name | Type | Required | Default | Possible Values | Description |
348
- | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
349
- | `options` | `object` | ✅ | — | — | |
350
- | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
351
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
352
- | ↳ `actionKey` | `string` | ✅ | — | — | Action key to get the input schema for |
353
- | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use when fetching the schema. Required if the action needs authentication to determine available fields. |
354
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
347
+ | Name | Type | Required | Default | Possible Values | Description |
348
+ | ---------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
349
+ | `options` | `object` | ✅ | — | — | |
350
+ | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
351
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
352
+ | ↳ `actionKey` | `string` | ✅ | — | — | Action key to get the input schema for |
353
+ | ↳ `connectionId` | `string, number` | ❌ | — | — | Connection ID to use when fetching the schema. Required if the action needs a connection to determine available fields. |
354
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
355
355
 
356
356
  **Returns:** `Promise<InputSchemaItem>`
357
357
 
358
358
  **Example:**
359
359
 
360
360
  ```typescript
361
- const { data: inputSchema } = await sdk.getInputFieldsSchema({
361
+ const { data: inputSchema } = await zapier.getInputFieldsSchema({
362
362
  appKey: "example-key",
363
363
  actionType: "read",
364
364
  actionKey: "example-key",
@@ -386,19 +386,19 @@ List all actions for a specific app
386
386
 
387
387
  ```typescript
388
388
  // Get first page and a cursor for the second page
389
- const { data: actions, nextCursor } = await sdk.listActions({
389
+ const { data: actions, nextCursor } = await zapier.listActions({
390
390
  appKey: "example-key",
391
391
  });
392
392
 
393
393
  // Or iterate over all pages
394
- for await (const page of sdk.listActions({
394
+ for await (const page of zapier.listActions({
395
395
  appKey: "example-key",
396
396
  })) {
397
397
  // Do something with each page
398
398
  }
399
399
 
400
400
  // Or iterate over individual items across all pages
401
- for await (const action of sdk
401
+ for await (const action of zapier
402
402
  .listActions({
403
403
  appKey: "example-key",
404
404
  })
@@ -413,19 +413,19 @@ Get the available choices for a dynamic dropdown input field
413
413
 
414
414
  **Parameters:**
415
415
 
416
- | Name | Type | Required | Default | Possible Values | Description |
417
- | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
418
- | `options` | `object` | ✅ | — | — | |
419
- | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
420
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
421
- | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
422
- | ↳ `inputFieldKey` | `string` | ✅ | — | — | Input field key to get choices for. |
423
- | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
424
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
425
- | ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
426
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
427
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
428
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
416
+ | Name | Type | Required | Default | Possible Values | Description |
417
+ | ----------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
418
+ | `options` | `object` | ✅ | — | — | |
419
+ | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
420
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
421
+ | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
422
+ | ↳ `inputFieldKey` | `string` | ✅ | — | — | Input field key to get choices for. |
423
+ | ↳ `connectionId` | `string, number` | ❌ | — | — | Connection ID to use for this action |
424
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
425
+ | ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
426
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
427
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
428
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
429
429
 
430
430
  **Returns:** `Promise<PaginatedResult<InputFieldChoiceItem>>`
431
431
 
@@ -433,17 +433,16 @@ Get the available choices for a dynamic dropdown input field
433
433
 
434
434
  ```typescript
435
435
  // Get first page and a cursor for the second page
436
- const { data: inputFieldChoices, nextCursor } = await sdk.listInputFieldChoices(
437
- {
436
+ const { data: inputFieldChoices, nextCursor } =
437
+ await zapier.listInputFieldChoices({
438
438
  appKey: "example-key",
439
439
  actionType: "read",
440
440
  actionKey: "example-key",
441
441
  inputFieldKey: "example-key",
442
- },
443
- );
442
+ });
444
443
 
445
444
  // Or iterate over all pages
446
- for await (const page of sdk.listInputFieldChoices({
445
+ for await (const page of zapier.listInputFieldChoices({
447
446
  appKey: "example-key",
448
447
  actionType: "read",
449
448
  actionKey: "example-key",
@@ -453,7 +452,7 @@ for await (const page of sdk.listInputFieldChoices({
453
452
  }
454
453
 
455
454
  // Or iterate over individual items across all pages
456
- for await (const inputFieldChoice of sdk
455
+ for await (const inputFieldChoice of zapier
457
456
  .listInputFieldChoices({
458
457
  appKey: "example-key",
459
458
  actionType: "read",
@@ -471,17 +470,17 @@ Get the input fields required for a specific action
471
470
 
472
471
  **Parameters:**
473
472
 
474
- | Name | Type | Required | Default | Possible Values | Description |
475
- | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
476
- | `options` | `object` | ✅ | — | — | |
477
- | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
478
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
479
- | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
480
- | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
481
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
482
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
483
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
484
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
473
+ | Name | Type | Required | Default | Possible Values | Description |
474
+ | ---------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
475
+ | `options` | `object` | ✅ | — | — | |
476
+ | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
477
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
478
+ | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
479
+ | ↳ `connectionId` | `string, number` | ❌ | — | — | Connection ID to use for this action |
480
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
481
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
482
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
483
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
485
484
 
486
485
  **Returns:** `Promise<PaginatedResult<RootFieldItemItem>>`
487
486
 
@@ -489,14 +488,14 @@ Get the input fields required for a specific action
489
488
 
490
489
  ```typescript
491
490
  // Get first page and a cursor for the second page
492
- const { data: rootFieldItems, nextCursor } = await sdk.listInputFields({
491
+ const { data: rootFieldItems, nextCursor } = await zapier.listInputFields({
493
492
  appKey: "example-key",
494
493
  actionType: "read",
495
494
  actionKey: "example-key",
496
495
  });
497
496
 
498
497
  // Or iterate over all pages
499
- for await (const page of sdk.listInputFields({
498
+ for await (const page of zapier.listInputFields({
500
499
  appKey: "example-key",
501
500
  actionType: "read",
502
501
  actionKey: "example-key",
@@ -505,7 +504,7 @@ for await (const page of sdk.listInputFields({
505
504
  }
506
505
 
507
506
  // Or iterate over individual items across all pages
508
- for await (const rootFieldItem of sdk
507
+ for await (const rootFieldItem of zapier
509
508
  .listInputFields({
510
509
  appKey: "example-key",
511
510
  actionType: "read",
@@ -522,18 +521,18 @@ Execute an action with the given inputs
522
521
 
523
522
  **Parameters:**
524
523
 
525
- | Name | Type | Required | Default | Possible Values | Description |
526
- | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
527
- | `options` | `object` | ✅ | — | — | |
528
- | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
529
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
530
- | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
531
- | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
532
- | ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
533
- | ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
534
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
535
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
536
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
524
+ | Name | Type | Required | Default | Possible Values | Description |
525
+ | ---------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
526
+ | `options` | `object` | ✅ | — | — | |
527
+ | ↳ `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') |
528
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
529
+ | ↳ `actionKey` | `string` | ✅ | — | — | Action key to execute |
530
+ | ↳ `connectionId` | `string, number` | ❌ | — | — | Connection ID to use for this action |
531
+ | ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
532
+ | ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
533
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
534
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
535
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
537
536
 
538
537
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
539
538
 
@@ -541,14 +540,14 @@ Execute an action with the given inputs
541
540
 
542
541
  ```typescript
543
542
  // Get first page and a cursor for the second page
544
- const { data: actionResults, nextCursor } = await sdk.runAction({
543
+ const { data: actionResults, nextCursor } = await zapier.runAction({
545
544
  appKey: "example-key",
546
545
  actionType: "read",
547
546
  actionKey: "example-key",
548
547
  });
549
548
 
550
549
  // Or iterate over all pages
551
- for await (const page of sdk.runAction({
550
+ for await (const page of zapier.runAction({
552
551
  appKey: "example-key",
553
552
  actionType: "read",
554
553
  actionKey: "example-key",
@@ -557,7 +556,7 @@ for await (const page of sdk.runAction({
557
556
  }
558
557
 
559
558
  // Or iterate over individual items across all pages
560
- for await (const actionResult of sdk
559
+ for await (const actionResult of zapier
561
560
  .runAction({
562
561
  appKey: "example-key",
563
562
  actionType: "read",
@@ -572,23 +571,21 @@ for await (const actionResult of sdk
572
571
 
573
572
  #### `apps.{appKey}`
574
573
 
575
- Bind an authentication ID to an app
574
+ Bind a connection ID to an app
576
575
 
577
576
  **Parameters:**
578
577
 
579
- | Name | Type | Required | Default | Possible Values | Description |
580
- | -------------------- | ---------------- | -------- | ------- | --------------- | ---------------------------------------- |
581
- | `options` | `object` | ✅ | — | — | |
582
- | ↳ `authenticationId` | `string, number` | | — | — | Authentication ID to use for this action |
578
+ | Name | Type | Required | Default | Possible Values | Description |
579
+ | ---------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------ |
580
+ | `options` | `object` | ✅ | — | — | |
581
+ | ↳ `connectionId` | `string, number` | | — | — | Connection ID to use for this action |
583
582
 
584
583
  **Returns:** `Promise<AppProxy>`
585
584
 
586
585
  **Example:**
587
586
 
588
587
  ```typescript
589
- const result = await sdk.apps.appKey({
590
- authenticationId: "example-value",
591
- });
588
+ const result = await zapier.apps.appKey();
592
589
  ```
593
590
 
594
591
  #### `apps.{appKey}.{actionType}.{actionKey}`
@@ -597,12 +594,12 @@ Execute an action with the given inputs for the bound app, as an alternative to
597
594
 
598
595
  **Parameters:**
599
596
 
600
- | Name | Type | Required | Default | Possible Values | Description |
601
- | -------------------- | ---------------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------- |
602
- | `options` | `object` | ✅ | — | — | |
603
- | ↳ `inputs` | `object` | ❌ | — | — | |
604
- | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
605
- | ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
597
+ | Name | Type | Required | Default | Possible Values | Description |
598
+ | ---------------- | ---------------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------- |
599
+ | `options` | `object` | ✅ | — | — | |
600
+ | ↳ `inputs` | `object` | ❌ | — | — | |
601
+ | ↳ `connectionId` | `string, number` | ❌ | — | — | Connection ID to use for this action |
602
+ | ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
606
603
 
607
604
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
608
605
 
@@ -611,15 +608,15 @@ Execute an action with the given inputs for the bound app, as an alternative to
611
608
  ```typescript
612
609
  // Get first page and a cursor for the second page
613
610
  const { data: actionResults, nextCursor } =
614
- await sdk.apps.appKey.actionType.actionKey();
611
+ await zapier.apps.appKey.actionType.actionKey();
615
612
 
616
613
  // Or iterate over all pages
617
- for await (const page of sdk.apps.appKey.actionType.actionKey()) {
614
+ for await (const page of zapier.apps.appKey.actionType.actionKey()) {
618
615
  // Do something with each page
619
616
  }
620
617
 
621
618
  // Or iterate over individual items across all pages
622
- for await (const actionResult of sdk.apps.appKey.actionType
619
+ for await (const actionResult of zapier.apps.appKey.actionType
623
620
  .actionKey()
624
621
  .items()) {
625
622
  // Do something with each actionResult
@@ -642,7 +639,7 @@ Get detailed information about a specific app
642
639
  **Example:**
643
640
 
644
641
  ```typescript
645
- const { data: app } = await sdk.getApp({
642
+ const { data: app } = await zapier.getApp({
646
643
  appKey: "example-key",
647
644
  });
648
645
  ```
@@ -668,204 +665,202 @@ List all available apps with optional filtering
668
665
 
669
666
  ```typescript
670
667
  // Get first page and a cursor for the second page
671
- const { data: apps, nextCursor } = await sdk.listApps();
668
+ const { data: apps, nextCursor } = await zapier.listApps();
672
669
 
673
670
  // Or iterate over all pages
674
- for await (const page of sdk.listApps()) {
671
+ for await (const page of zapier.listApps()) {
675
672
  // Do something with each page
676
673
  }
677
674
 
678
675
  // Or iterate over individual items across all pages
679
- for await (const app of sdk.listApps().items()) {
676
+ for await (const app of zapier.listApps().items()) {
680
677
  // Do something with each app
681
678
  }
682
679
  ```
683
680
 
684
- ### Authentications
685
-
686
- #### `findFirstAuthentication`
687
-
688
- Find the first authentication matching the criteria
689
-
690
- **Parameters:**
691
-
692
- | Name | Type | Required | Default | Possible Values | Description |
693
- | ------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
694
- | `options` | `object` | ✅ | — | — | |
695
- | ↳ `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
696
- | ↳ `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
697
- | ↳ `title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
698
- | ↳ `accountId` | `string` | ❌ | — | — | Filter authentications by account ID |
699
- | ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
700
- | ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
701
-
702
- **Returns:** `Promise<AuthenticationItem>`
703
-
704
- **Example:**
705
-
706
- ```typescript
707
- const { data: authentication } = await sdk.findFirstAuthentication();
708
- ```
681
+ ### Client Credentials
709
682
 
710
- #### `findUniqueAuthentication`
683
+ #### `createClientCredentials`
711
684
 
712
- Find a unique authentication matching the criteria
685
+ Create new client credentials for the authenticated user
713
686
 
714
687
  **Parameters:**
715
688
 
716
- | Name | Type | Required | Default | Possible Values | Description |
717
- | ------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
718
- | `options` | `object` | ✅ | — | — | |
719
- | ↳ `appKey` | `string` | | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
720
- | ↳ `search` | `string` | ❌ | | — | Search term to filter authentications by title |
721
- | ↳ `title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
722
- | ↳ `accountId` | `string` | ❌ | — | — | Filter authentications by account ID |
723
- | ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
724
- | ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
689
+ | Name | Type | Required | Default | Possible Values | Description |
690
+ | ----------------- | -------- | -------- | -------------- | --------------- | ---------------------------------------------- |
691
+ | `options` | `object` | ✅ | — | — | |
692
+ | ↳ `name` | `string` | | — | — | Human-readable name for the client credentials |
693
+ | ↳ `allowedScopes` | `array` | ❌ | `["external"]` | — | Scopes to allow for these credentials |
725
694
 
726
- **Returns:** `Promise<AuthenticationItem>`
695
+ **Returns:** `Promise<any>`
727
696
 
728
697
  **Example:**
729
698
 
730
699
  ```typescript
731
- const { data: authentication } = await sdk.findUniqueAuthentication();
700
+ const result = await zapier.createClientCredentials({
701
+ name: "example-value",
702
+ });
732
703
  ```
733
704
 
734
- #### `getAuthentication`
705
+ #### `deleteClientCredentials`
735
706
 
736
- Get a specific authentication by ID
707
+ Delete client credentials by client ID
737
708
 
738
709
  **Parameters:**
739
710
 
740
- | Name | Type | Required | Default | Possible Values | Description |
741
- | -------------------- | -------- | -------- | ------- | --------------- | ----------------------------- |
742
- | `options` | `object` | ✅ | — | — | |
743
- | ↳ `authenticationId` | `string` | ✅ | — | — | Authentication ID to retrieve |
711
+ | Name | Type | Required | Default | Possible Values | Description |
712
+ | ------------ | -------- | -------- | ------- | --------------- | ------------------------------------------------- |
713
+ | `options` | `object` | ✅ | — | — | |
714
+ | ↳ `clientId` | `string` | ✅ | — | — | The client ID of the client credentials to delete |
744
715
 
745
- **Returns:** `Promise<AuthenticationItem>`
716
+ **Returns:** `Promise<any>`
746
717
 
747
718
  **Example:**
748
719
 
749
720
  ```typescript
750
- const { data: authentication } = await sdk.getAuthentication({
751
- authenticationId: "example-id",
721
+ const result = await zapier.deleteClientCredentials({
722
+ clientId: "example-id",
752
723
  });
753
724
  ```
754
725
 
755
- #### `listAuthentications`
726
+ #### `listClientCredentials`
756
727
 
757
- List available authentications with optional filtering
728
+ List client credentials for the authenticated user
758
729
 
759
730
  **Parameters:**
760
731
 
761
- | Name | Type | Required | Default | Possible Values | Description |
762
- | --------------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
763
- | `options` | `object` | ✅ | — | — | |
764
- | ↳ `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
765
- | ↳ `authenticationIds` | `array` | ❌ | — | — | List of authentication IDs to filter by |
766
- | ↳ `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
767
- | ↳ `title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
768
- | ↳ `accountId` | `string` | ❌ | — | — | Filter authentications by account ID |
769
- | ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
770
- | ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
771
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of authentications per page |
772
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
773
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
774
-
775
- **Returns:** `Promise<PaginatedResult<AuthenticationItem>>`
732
+ | Name | Type | Required | Default | Possible Values | Description |
733
+ | ------------ | -------- | -------- | ------- | --------------- | ---------------------------------------------- |
734
+ | `options` | `object` | ✅ | — | — | |
735
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of credentials per page |
736
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
737
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
738
+
739
+ **Returns:** `Promise<PaginatedResult<ClientCredentialsItem>>`
776
740
 
777
741
  **Example:**
778
742
 
779
743
  ```typescript
780
744
  // Get first page and a cursor for the second page
781
- const { data: authentications, nextCursor } = await sdk.listAuthentications();
745
+ const { data: clientCredentials, nextCursor } =
746
+ await zapier.listClientCredentials();
782
747
 
783
748
  // Or iterate over all pages
784
- for await (const page of sdk.listAuthentications()) {
749
+ for await (const page of zapier.listClientCredentials()) {
785
750
  // Do something with each page
786
751
  }
787
752
 
788
753
  // Or iterate over individual items across all pages
789
- for await (const authentication of sdk.listAuthentications().items()) {
790
- // Do something with each authentication
754
+ for await (const clientCredentials of zapier.listClientCredentials().items()) {
755
+ // Do something with each clientCredentials
791
756
  }
792
757
  ```
793
758
 
794
- ### Client Credentials
759
+ ### Connections
795
760
 
796
- #### `createClientCredentials`
761
+ #### `findFirstConnection`
797
762
 
798
- Create new client credentials for the authenticated user
763
+ Find the first connection matching the criteria
799
764
 
800
765
  **Parameters:**
801
766
 
802
- | Name | Type | Required | Default | Possible Values | Description |
803
- | ----------------- | -------- | -------- | -------------- | --------------- | ---------------------------------------------- |
804
- | `options` | `object` | ✅ | — | — | |
805
- | ↳ `name` | `string` | | — | — | Human-readable name for the client credentials |
806
- | ↳ `allowedScopes` | `array` | ❌ | `["external"]` | — | Scopes to allow for these credentials |
767
+ | Name | Type | Required | Default | Possible Values | Description |
768
+ | ------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------ |
769
+ | `options` | `object` | ✅ | — | — | |
770
+ | ↳ `search` | `string` | | — | — | Search term to filter connections by title |
771
+ | ↳ `title` | `string` | ❌ | | — | Filter connections by exact title match (searches first, then filters locally) |
772
+ | ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
773
+ | ↳ `appKey` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
774
+ | ↳ `accountId` | `string` | ❌ | — | — | Account ID to filter by |
775
+ | ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status |
807
776
 
808
- **Returns:** `Promise<any>`
777
+ **Returns:** `Promise<ConnectionItem>`
809
778
 
810
779
  **Example:**
811
780
 
812
781
  ```typescript
813
- const result = await sdk.createClientCredentials({
814
- name: "example-value",
815
- });
782
+ const { data: connection } = await zapier.findFirstConnection();
816
783
  ```
817
784
 
818
- #### `deleteClientCredentials`
785
+ #### `findUniqueConnection`
819
786
 
820
- Delete client credentials by client ID
787
+ Find a unique connection matching the criteria
821
788
 
822
789
  **Parameters:**
823
790
 
824
- | Name | Type | Required | Default | Possible Values | Description |
825
- | ------------ | -------- | -------- | ------- | --------------- | ------------------------------------------------- |
826
- | `options` | `object` | ✅ | — | — | |
827
- | ↳ `clientId` | `string` | | — | — | The client ID of the client credentials to delete |
791
+ | Name | Type | Required | Default | Possible Values | Description |
792
+ | ------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------ |
793
+ | `options` | `object` | ✅ | — | — | |
794
+ | ↳ `search` | `string` | | — | — | Search term to filter connections by title |
795
+ | ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
796
+ | ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
797
+ | ↳ `appKey` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
798
+ | ↳ `accountId` | `string` | ❌ | — | — | Account ID to filter by |
799
+ | ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status |
828
800
 
829
- **Returns:** `Promise<any>`
801
+ **Returns:** `Promise<ConnectionItem>`
830
802
 
831
803
  **Example:**
832
804
 
833
805
  ```typescript
834
- const result = await sdk.deleteClientCredentials({
835
- clientId: "example-id",
836
- });
806
+ const { data: connection } = await zapier.findUniqueConnection();
837
807
  ```
838
808
 
839
- #### `listClientCredentials`
809
+ #### `getConnection`
840
810
 
841
- List client credentials for the authenticated user
811
+ Execute getConnection
842
812
 
843
813
  **Parameters:**
844
814
 
845
- | Name | Type | Required | Default | Possible Values | Description |
846
- | ------------ | -------- | -------- | ------- | --------------- | ---------------------------------------------- |
847
- | `options` | `object` | ✅ | — | — | |
848
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of credentials per page |
849
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
850
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
815
+ | Name | Type | Required | Default | Possible Values | Description |
816
+ | ---------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------ |
817
+ | `options` | `object` | ✅ | — | — | |
818
+ | ↳ `connectionId` | `string, number` | ❌ | — | — | Connection ID to use for this action |
851
819
 
852
- **Returns:** `Promise<PaginatedResult<ClientCredentialsItem>>`
820
+ **Returns:** `Promise<ConnectionItem>`
821
+
822
+ **Example:**
823
+
824
+ ```typescript
825
+ const { data: connection } = await zapier.getConnection();
826
+ ```
827
+
828
+ #### `listConnections`
829
+
830
+ List available connections with optional filtering
831
+
832
+ **Parameters:**
833
+
834
+ | Name | Type | Required | Default | Possible Values | Description |
835
+ | ----------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------ |
836
+ | `options` | `object` | ✅ | — | — | |
837
+ | ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
838
+ | ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
839
+ | ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
840
+ | ↳ `appKey` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
841
+ | ↳ `connectionIds` | `array` | ❌ | — | — | List of connection IDs to filter by |
842
+ | ↳ `accountId` | `string` | ❌ | — | — | Account ID to filter by |
843
+ | ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status |
844
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of connections per page |
845
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
846
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
847
+
848
+ **Returns:** `Promise<PaginatedResult<ConnectionItem>>`
853
849
 
854
850
  **Example:**
855
851
 
856
852
  ```typescript
857
853
  // Get first page and a cursor for the second page
858
- const { data: clientCredentials, nextCursor } =
859
- await sdk.listClientCredentials();
854
+ const { data: connections, nextCursor } = await zapier.listConnections();
860
855
 
861
856
  // Or iterate over all pages
862
- for await (const page of sdk.listClientCredentials()) {
857
+ for await (const page of zapier.listConnections()) {
863
858
  // Do something with each page
864
859
  }
865
860
 
866
861
  // Or iterate over individual items across all pages
867
- for await (const clientCredentials of sdk.listClientCredentials().items()) {
868
- // Do something with each clientCredentials
862
+ for await (const connection of zapier.listConnections().items()) {
863
+ // Do something with each connection
869
864
  }
870
865
  ```
871
866
 
@@ -873,24 +868,24 @@ for await (const clientCredentials of sdk.listClientCredentials().items()) {
873
868
 
874
869
  #### `fetch`
875
870
 
876
- Make authenticated HTTP requests to any API through Zapier's Relay service. Pass an authenticationId to automatically inject the user's stored credentials (OAuth tokens, API keys, etc.) into the outgoing request. Mirrors the native fetch(url, init?) signature with additional Zapier-specific options.
871
+ Make authenticated HTTP requests to any API through Zapier's Relay service. Pass a connectionId to automatically inject the user's stored credentials (OAuth tokens, API keys, etc.) into the outgoing request. Mirrors the native fetch(url, init?) signature with additional Zapier-specific options.
877
872
 
878
873
  **Parameters:**
879
874
 
880
- | Name | Type | Required | Default | Possible Values | Description |
881
- | -------------------- | -------------------------------- | -------- | ------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
882
- | `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service) |
883
- | `init` | `object` | ❌ | — | — | Request options including method, headers, body, and authentication |
884
- | ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET) |
885
- | ↳ `headers` | `object` | ❌ | — | — | HTTP headers to include in the request |
886
- | ↳ `body` | `string, custom, custom, record` | ❌ | — | — | Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly |
887
- | ↳ `authenticationId` | `string, number` | ❌ | — | — | Authentication ID to use for this action |
888
- | ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
875
+ | Name | Type | Required | Default | Possible Values | Description |
876
+ | ---------------- | -------------------------------- | -------- | ------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
877
+ | `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service) |
878
+ | `init` | `object` | ❌ | — | — | Request options including method, headers, body, and authentication |
879
+ | ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET) |
880
+ | ↳ `headers` | `object` | ❌ | — | — | HTTP headers to include in the request |
881
+ | ↳ `body` | `string, custom, custom, record` | ❌ | — | — | Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly |
882
+ | ↳ `connectionId` | `string, number` | ❌ | — | — | Connection ID to use for this action |
883
+ | ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
889
884
 
890
885
  **Returns:** `Promise<Response>`
891
886
 
892
887
  **Example:**
893
888
 
894
889
  ```typescript
895
- const result = await sdk.fetch("example-value", { key: "value" });
890
+ const result = await zapier.fetch("example-value", { key: "value" });
896
891
  ```