@zapier/zapier-sdk 0.5.2 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +107 -83
  3. package/dist/index.cjs +320 -50
  4. package/dist/index.d.mts +409 -340
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +0 -1
  7. package/dist/index.mjs +320 -50
  8. package/dist/plugins/api/index.js +1 -1
  9. package/dist/plugins/findFirstAuthentication/index.d.ts.map +1 -1
  10. package/dist/plugins/findFirstAuthentication/index.js +1 -0
  11. package/dist/plugins/findUniqueAuthentication/index.d.ts.map +1 -1
  12. package/dist/plugins/findUniqueAuthentication/index.js +1 -0
  13. package/dist/plugins/getAction/index.d.ts.map +1 -1
  14. package/dist/plugins/getAction/index.js +1 -0
  15. package/dist/plugins/getAction/index.test.js +1 -1
  16. package/dist/plugins/getApp/index.d.ts +6 -3
  17. package/dist/plugins/getApp/index.d.ts.map +1 -1
  18. package/dist/plugins/getApp/index.js +8 -18
  19. package/dist/plugins/getApp/index.test.js +2 -0
  20. package/dist/plugins/getAuthentication/index.d.ts.map +1 -1
  21. package/dist/plugins/getAuthentication/index.js +1 -0
  22. package/dist/plugins/getAuthentication/index.test.js +12 -1
  23. package/dist/plugins/getProfile/index.d.ts.map +1 -1
  24. package/dist/plugins/getProfile/index.js +1 -0
  25. package/dist/plugins/listActions/index.d.ts +5 -3
  26. package/dist/plugins/listActions/index.d.ts.map +1 -1
  27. package/dist/plugins/listActions/index.js +6 -6
  28. package/dist/plugins/listActions/index.test.js +26 -74
  29. package/dist/plugins/listActions/schemas.d.ts +4 -4
  30. package/dist/plugins/listApps/index.d.ts.map +1 -1
  31. package/dist/plugins/listApps/index.js +1 -0
  32. package/dist/plugins/listApps/schemas.d.ts +2 -2
  33. package/dist/plugins/listAuthentications/index.d.ts +4 -2
  34. package/dist/plugins/listAuthentications/index.d.ts.map +1 -1
  35. package/dist/plugins/listAuthentications/index.js +9 -12
  36. package/dist/plugins/listAuthentications/index.test.js +33 -40
  37. package/dist/plugins/listAuthentications/schemas.d.ts +4 -4
  38. package/dist/plugins/listInputFields/index.d.ts +3 -1
  39. package/dist/plugins/listInputFields/index.d.ts.map +1 -1
  40. package/dist/plugins/listInputFields/index.js +5 -5
  41. package/dist/plugins/listInputFields/index.test.js +10 -8
  42. package/dist/plugins/listInputFields/schemas.d.ts +4 -4
  43. package/dist/plugins/lockVersion/index.d.ts +24 -0
  44. package/dist/plugins/lockVersion/index.d.ts.map +1 -0
  45. package/dist/plugins/lockVersion/index.js +72 -0
  46. package/dist/plugins/lockVersion/index.test.d.ts +2 -0
  47. package/dist/plugins/lockVersion/index.test.d.ts.map +1 -0
  48. package/dist/plugins/lockVersion/index.test.js +129 -0
  49. package/dist/plugins/lockVersion/schemas.d.ts +10 -0
  50. package/dist/plugins/lockVersion/schemas.d.ts.map +1 -0
  51. package/dist/plugins/lockVersion/schemas.js +6 -0
  52. package/dist/plugins/manifest/index.d.ts +24 -0
  53. package/dist/plugins/manifest/index.d.ts.map +1 -0
  54. package/dist/plugins/manifest/index.js +119 -0
  55. package/dist/plugins/manifest/index.test.d.ts +2 -0
  56. package/dist/plugins/manifest/index.test.d.ts.map +1 -0
  57. package/dist/plugins/manifest/index.test.js +331 -0
  58. package/dist/plugins/manifest/schemas.d.ts +64 -0
  59. package/dist/plugins/manifest/schemas.d.ts.map +1 -0
  60. package/dist/plugins/manifest/schemas.js +25 -0
  61. package/dist/plugins/registry/index.d.ts +9 -1
  62. package/dist/plugins/registry/index.d.ts.map +1 -1
  63. package/dist/plugins/registry/index.js +68 -3
  64. package/dist/plugins/request/index.d.ts.map +1 -1
  65. package/dist/plugins/request/index.js +1 -0
  66. package/dist/plugins/request/index.test.js +6 -1
  67. package/dist/plugins/request/schemas.d.ts +4 -4
  68. package/dist/plugins/runAction/index.d.ts +2 -0
  69. package/dist/plugins/runAction/index.d.ts.map +1 -1
  70. package/dist/plugins/runAction/index.js +5 -5
  71. package/dist/plugins/runAction/index.test.js +9 -8
  72. package/dist/plugins/runAction/schemas.d.ts +4 -4
  73. package/dist/sdk.d.ts +3 -3
  74. package/dist/sdk.d.ts.map +1 -1
  75. package/dist/sdk.js +18 -7
  76. package/dist/sdk.test.js +1 -1
  77. package/dist/types/plugin.d.ts +10 -2
  78. package/dist/types/plugin.d.ts.map +1 -1
  79. package/dist/types/sdk.d.ts +13 -2
  80. package/dist/types/sdk.d.ts.map +1 -1
  81. package/package.json +1 -1
  82. package/src/index.ts +0 -2
  83. package/src/plugins/api/index.ts +1 -1
  84. package/src/plugins/findFirstAuthentication/index.ts +1 -0
  85. package/src/plugins/findUniqueAuthentication/index.ts +1 -0
  86. package/src/plugins/getAction/index.test.ts +1 -1
  87. package/src/plugins/getAction/index.ts +1 -0
  88. package/src/plugins/getApp/index.test.ts +2 -0
  89. package/src/plugins/getApp/index.ts +12 -24
  90. package/src/plugins/getAuthentication/index.test.ts +13 -3
  91. package/src/plugins/getAuthentication/index.ts +1 -0
  92. package/src/plugins/getProfile/index.ts +1 -0
  93. package/src/plugins/listActions/index.test.ts +30 -89
  94. package/src/plugins/listActions/index.ts +13 -9
  95. package/src/plugins/listApps/index.ts +1 -0
  96. package/src/plugins/listAuthentications/index.test.ts +38 -47
  97. package/src/plugins/listAuthentications/index.ts +21 -18
  98. package/src/plugins/listInputFields/index.test.ts +12 -9
  99. package/src/plugins/listInputFields/index.ts +10 -6
  100. package/src/plugins/lockVersion/index.test.ts +176 -0
  101. package/src/plugins/lockVersion/index.ts +112 -0
  102. package/src/plugins/lockVersion/schemas.ts +9 -0
  103. package/src/plugins/manifest/index.test.ts +438 -0
  104. package/src/plugins/manifest/index.ts +171 -0
  105. package/src/plugins/manifest/schemas.ts +53 -0
  106. package/src/plugins/registry/index.ts +89 -8
  107. package/src/plugins/request/index.test.ts +8 -4
  108. package/src/plugins/request/index.ts +1 -0
  109. package/src/plugins/runAction/index.test.ts +9 -8
  110. package/src/plugins/runAction/index.ts +13 -7
  111. package/src/sdk.test.ts +1 -1
  112. package/src/sdk.ts +22 -7
  113. package/src/types/plugin.ts +14 -2
  114. package/src/types/sdk.ts +15 -1
  115. package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 38fe5c4: Clean up no .zapierrc warning
8
+
9
+ ## 0.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - c472d6f: Add manifest plugin to consume a supplied manifest, as well as lockVersion plugin to create or update the manifest.
14
+ - c402bcd: Remove \_\_registry in favor of getRegistry that also provides categories for functions.
15
+
16
+ ### Patch Changes
17
+
18
+ - e08365e: Add support for lock file in generate-types command
19
+
3
20
  ## 0.5.2
4
21
 
5
22
  ### Patch Changes
package/README.md CHANGED
@@ -8,22 +8,24 @@
8
8
  - [Quick Start](#quick-start)
9
9
  - [Available Functions](#available-functions)
10
10
  - [Actions](#actions)
11
- - [`listActions`](#listactions)
12
11
  - [`getAction`](#getaction)
12
+ - [`listActions`](#listactions)
13
13
  - [`listInputFields`](#listinputfields)
14
14
  - [`runAction`](#runaction)
15
15
  - [Apps](#apps)
16
- - [`listApps`](#listapps)
17
16
  - [`getApp`](#getapp)
18
- - [Authentication](#authentication)
19
- - [`listAuthentications`](#listauthentications)
20
- - [`getAuthentication`](#getauthentication)
17
+ - [`listApps`](#listapps)
18
+ - [Authentications](#authentications)
21
19
  - [`findFirstAuthentication`](#findfirstauthentication)
22
20
  - [`findUniqueAuthentication`](#finduniqueauthentication)
21
+ - [`getAuthentication`](#getauthentication)
22
+ - [`listAuthentications`](#listauthentications)
23
23
  - [HTTP Requests](#http-requests)
24
24
  - [`request`](#request)
25
- - [User & Profile](#user--profile)
25
+ - [Users](#users)
26
26
  - [`getProfile`](#getprofile)
27
+ - [Utilities](#utilities)
28
+ - [`lockVersion`](#lockversion)
27
29
 
28
30
  ## Installation
29
31
 
@@ -59,50 +61,50 @@ const result = await sdk.runAction({
59
61
 
60
62
  ### Actions
61
63
 
62
- #### `listActions`
64
+ #### `getAction`
63
65
 
64
- List all actions for a specific app
66
+ Get detailed information about a specific action
65
67
 
66
68
  **Parameters:**
67
69
 
68
- | Name | Type | Required | Default | Possible Values | Description |
69
- | ------------ | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------ |
70
- | `appKey` | `string` | ✅ | — | — | App key of actions to list (e.g., 'SlackCLIAPI') |
71
- | `actionType` | `string` | | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Filter actions by type |
72
- | `pageSize` | `number` | | — | — | Number of actions per page |
73
- | `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
70
+ | Name | Type | Required | Default | Possible Values | Description |
71
+ | ------------ | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------- |
72
+ | `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI') |
73
+ | `actionType` | `string` | | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
74
+ | `actionKey` | `string` | | — | — | Action key to execute |
74
75
 
75
- **Returns:** `Promise<PaginatedResult<ActionItem>>`
76
+ **Returns:** `Promise<ActionItem>`
76
77
 
77
78
  **Example:**
78
79
 
79
80
  ```typescript
80
- const result = await sdk.listActions({
81
+ const result = await sdk.getAction({
81
82
  appKey: "example-key",
83
+ actionType: "read",
84
+ actionKey: "example-key",
82
85
  });
83
86
  ```
84
87
 
85
- #### `getAction`
88
+ #### `listActions`
86
89
 
87
- Get detailed information about a specific action
90
+ List all actions for a specific app
88
91
 
89
92
  **Parameters:**
90
93
 
91
- | Name | Type | Required | Default | Possible Values | Description |
92
- | ------------ | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------- |
93
- | `appKey` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI') |
94
- | `actionType` | `string` | | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
95
- | `actionKey` | `string` | | — | — | Action key to execute |
94
+ | Name | Type | Required | Default | Possible Values | Description |
95
+ | ------------ | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------ |
96
+ | `appKey` | `string` | ✅ | — | — | App key of actions to list (e.g., 'SlackCLIAPI') |
97
+ | `actionType` | `string` | | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Filter actions by type |
98
+ | `pageSize` | `number` | | — | — | Number of actions per page |
99
+ | `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
96
100
 
97
- **Returns:** `Promise<ActionItem>`
101
+ **Returns:** `Promise<PaginatedResult<ActionItem>>`
98
102
 
99
103
  **Example:**
100
104
 
101
105
  ```typescript
102
- const result = await sdk.getAction({
106
+ const result = await sdk.listActions({
103
107
  appKey: "example-key",
104
- actionType: "read",
105
- actionKey: "example-key",
106
108
  });
107
109
  ```
108
110
 
@@ -164,27 +166,6 @@ const result = await sdk.runAction({
164
166
 
165
167
  ### Apps
166
168
 
167
- #### `listApps`
168
-
169
- List all available apps with optional filtering
170
-
171
- **Parameters:**
172
-
173
- | Name | Type | Required | Default | Possible Values | Description |
174
- | ---------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------- |
175
- | `appKeys` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') |
176
- | `search` | `string` | ❌ | — | — | Search for apps by name |
177
- | `pageSize` | `number` | ❌ | — | — | Number of apps per page |
178
- | `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
179
-
180
- **Returns:** `Promise<PaginatedResult<AppItem>>`
181
-
182
- **Example:**
183
-
184
- ```typescript
185
- const result = await sdk.listApps();
186
- ```
187
-
188
169
  #### `getApp`
189
170
 
190
171
  Get detailed information about a specific app
@@ -205,51 +186,28 @@ const result = await sdk.getApp({
205
186
  });
206
187
  ```
207
188
 
208
- ### Authentication
209
-
210
- #### `listAuthentications`
189
+ #### `listApps`
211
190
 
212
- List available authentications with optional filtering
191
+ List all available apps with optional filtering
213
192
 
214
193
  **Parameters:**
215
194
 
216
- | Name | Type | Required | Default | Possible Values | Description |
217
- | ------------ | -------- | -------- | ------- | --------------- | -------------------------------------------------------- |
218
- | `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI') |
219
- | `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
220
- | `title` | `string` | ❌ | — | — | Filter authentications by exact title match |
221
- | `account_id` | `string` | ❌ | — | — | Filter by account ID |
222
- | `owner` | `string` | ❌ | — | — | Filter by owner |
223
- | `pageSize` | `number` | ❌ | — | — | Number of authentications per page |
224
- | `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
195
+ | Name | Type | Required | Default | Possible Values | Description |
196
+ | ---------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------- |
197
+ | `appKeys` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') |
198
+ | `search` | `string` | ❌ | — | — | Search for apps by name |
199
+ | `pageSize` | `number` | ❌ | — | — | Number of apps per page |
200
+ | `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
225
201
 
226
- **Returns:** `Promise<PaginatedResult<Authentication>>`
202
+ **Returns:** `Promise<PaginatedResult<AppItem>>`
227
203
 
228
204
  **Example:**
229
205
 
230
206
  ```typescript
231
- const result = await sdk.listAuthentications();
207
+ const result = await sdk.listApps();
232
208
  ```
233
209
 
234
- #### `getAuthentication`
235
-
236
- Get a specific authentication by ID
237
-
238
- **Parameters:**
239
-
240
- | Name | Type | Required | Default | Possible Values | Description |
241
- | ------------------ | -------- | -------- | ------- | --------------- | ----------------------------- |
242
- | `authenticationId` | `number` | ✅ | — | — | Authentication ID to retrieve |
243
-
244
- **Returns:** `Promise<Authentication>`
245
-
246
- **Example:**
247
-
248
- ```typescript
249
- const result = await sdk.getAuthentication({
250
- authenticationId: 12345,
251
- });
252
- ```
210
+ ### Authentications
253
211
 
254
212
  #### `findFirstAuthentication`
255
213
 
@@ -295,6 +253,50 @@ Find a unique authentication matching the criteria
295
253
  const result = await sdk.findUniqueAuthentication();
296
254
  ```
297
255
 
256
+ #### `getAuthentication`
257
+
258
+ Get a specific authentication by ID
259
+
260
+ **Parameters:**
261
+
262
+ | Name | Type | Required | Default | Possible Values | Description |
263
+ | ------------------ | -------- | -------- | ------- | --------------- | ----------------------------- |
264
+ | `authenticationId` | `number` | ✅ | — | — | Authentication ID to retrieve |
265
+
266
+ **Returns:** `Promise<Authentication>`
267
+
268
+ **Example:**
269
+
270
+ ```typescript
271
+ const result = await sdk.getAuthentication({
272
+ authenticationId: 12345,
273
+ });
274
+ ```
275
+
276
+ #### `listAuthentications`
277
+
278
+ List available authentications with optional filtering
279
+
280
+ **Parameters:**
281
+
282
+ | Name | Type | Required | Default | Possible Values | Description |
283
+ | ------------ | -------- | -------- | ------- | --------------- | -------------------------------------------------------- |
284
+ | `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI') |
285
+ | `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
286
+ | `title` | `string` | ❌ | — | — | Filter authentications by exact title match |
287
+ | `account_id` | `string` | ❌ | — | — | Filter by account ID |
288
+ | `owner` | `string` | ❌ | — | — | Filter by owner |
289
+ | `pageSize` | `number` | ❌ | — | — | Number of authentications per page |
290
+ | `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
291
+
292
+ **Returns:** `Promise<PaginatedResult<Authentication>>`
293
+
294
+ **Example:**
295
+
296
+ ```typescript
297
+ const result = await sdk.listAuthentications();
298
+ ```
299
+
298
300
  ### HTTP Requests
299
301
 
300
302
  #### `request`
@@ -324,7 +326,7 @@ const result = await sdk.request({
324
326
  });
325
327
  ```
326
328
 
327
- ### User & Profile
329
+ ### Users
328
330
 
329
331
  #### `getProfile`
330
332
 
@@ -340,4 +342,26 @@ Get current user's profile information
340
342
  const result = await sdk.getProfile();
341
343
  ```
342
344
 
345
+ ### Utilities
346
+
347
+ #### `lockVersion`
348
+
349
+ Execute lockVersion
350
+
351
+ **Parameters:**
352
+
353
+ | Name | Type | Required | Default | Possible Values | Description |
354
+ | -------- | -------- | -------- | ------- | --------------- | -------------------------------------------------------- |
355
+ | `appKey` | `string` | ✅ | — | — | The app key to lock version for (e.g., 'slack', 'gmail') |
356
+
357
+ **Returns:** `Promise<any>`
358
+
359
+ **Example:**
360
+
361
+ ```typescript
362
+ const result = await sdk.lockVersion({
363
+ appKey: "example-key",
364
+ });
365
+ ```
366
+
343
367
  <!-- End Generated API Reference -->