@zapier/zapier-sdk 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +107 -83
- package/dist/index.cjs +320 -50
- package/dist/index.d.mts +409 -340
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.mjs +320 -50
- package/dist/plugins/api/index.js +1 -1
- package/dist/plugins/findFirstAuthentication/index.d.ts.map +1 -1
- package/dist/plugins/findFirstAuthentication/index.js +1 -0
- package/dist/plugins/findUniqueAuthentication/index.d.ts.map +1 -1
- package/dist/plugins/findUniqueAuthentication/index.js +1 -0
- package/dist/plugins/getAction/index.d.ts.map +1 -1
- package/dist/plugins/getAction/index.js +1 -0
- package/dist/plugins/getAction/index.test.js +1 -1
- package/dist/plugins/getApp/index.d.ts +6 -3
- package/dist/plugins/getApp/index.d.ts.map +1 -1
- package/dist/plugins/getApp/index.js +8 -18
- package/dist/plugins/getApp/index.test.js +2 -0
- package/dist/plugins/getAuthentication/index.d.ts.map +1 -1
- package/dist/plugins/getAuthentication/index.js +1 -0
- package/dist/plugins/getAuthentication/index.test.js +12 -1
- package/dist/plugins/getProfile/index.d.ts.map +1 -1
- package/dist/plugins/getProfile/index.js +1 -0
- package/dist/plugins/listActions/index.d.ts +5 -3
- package/dist/plugins/listActions/index.d.ts.map +1 -1
- package/dist/plugins/listActions/index.js +6 -6
- package/dist/plugins/listActions/index.test.js +26 -74
- package/dist/plugins/listActions/schemas.d.ts +4 -4
- package/dist/plugins/listApps/index.d.ts.map +1 -1
- package/dist/plugins/listApps/index.js +1 -0
- package/dist/plugins/listApps/schemas.d.ts +2 -2
- package/dist/plugins/listAuthentications/index.d.ts +4 -2
- package/dist/plugins/listAuthentications/index.d.ts.map +1 -1
- package/dist/plugins/listAuthentications/index.js +9 -12
- package/dist/plugins/listAuthentications/index.test.js +33 -40
- package/dist/plugins/listAuthentications/schemas.d.ts +4 -4
- package/dist/plugins/listInputFields/index.d.ts +3 -1
- package/dist/plugins/listInputFields/index.d.ts.map +1 -1
- package/dist/plugins/listInputFields/index.js +5 -5
- package/dist/plugins/listInputFields/index.test.js +10 -8
- package/dist/plugins/listInputFields/schemas.d.ts +4 -4
- package/dist/plugins/lockVersion/index.d.ts +24 -0
- package/dist/plugins/lockVersion/index.d.ts.map +1 -0
- package/dist/plugins/lockVersion/index.js +72 -0
- package/dist/plugins/lockVersion/index.test.d.ts +2 -0
- package/dist/plugins/lockVersion/index.test.d.ts.map +1 -0
- package/dist/plugins/lockVersion/index.test.js +129 -0
- package/dist/plugins/lockVersion/schemas.d.ts +10 -0
- package/dist/plugins/lockVersion/schemas.d.ts.map +1 -0
- package/dist/plugins/lockVersion/schemas.js +6 -0
- package/dist/plugins/manifest/index.d.ts +24 -0
- package/dist/plugins/manifest/index.d.ts.map +1 -0
- package/dist/plugins/manifest/index.js +119 -0
- package/dist/plugins/manifest/index.test.d.ts +2 -0
- package/dist/plugins/manifest/index.test.d.ts.map +1 -0
- package/dist/plugins/manifest/index.test.js +331 -0
- package/dist/plugins/manifest/schemas.d.ts +64 -0
- package/dist/plugins/manifest/schemas.d.ts.map +1 -0
- package/dist/plugins/manifest/schemas.js +25 -0
- package/dist/plugins/registry/index.d.ts +9 -1
- package/dist/plugins/registry/index.d.ts.map +1 -1
- package/dist/plugins/registry/index.js +68 -3
- package/dist/plugins/request/index.d.ts.map +1 -1
- package/dist/plugins/request/index.js +1 -0
- package/dist/plugins/request/index.test.js +6 -1
- package/dist/plugins/request/schemas.d.ts +4 -4
- package/dist/plugins/runAction/index.d.ts +2 -0
- package/dist/plugins/runAction/index.d.ts.map +1 -1
- package/dist/plugins/runAction/index.js +5 -5
- package/dist/plugins/runAction/index.test.js +9 -8
- package/dist/plugins/runAction/schemas.d.ts +4 -4
- package/dist/sdk.d.ts +3 -3
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +18 -7
- package/dist/sdk.test.js +1 -1
- package/dist/types/plugin.d.ts +10 -2
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +13 -2
- package/dist/types/sdk.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -2
- package/src/plugins/api/index.ts +1 -1
- package/src/plugins/findFirstAuthentication/index.ts +1 -0
- package/src/plugins/findUniqueAuthentication/index.ts +1 -0
- package/src/plugins/getAction/index.test.ts +1 -1
- package/src/plugins/getAction/index.ts +1 -0
- package/src/plugins/getApp/index.test.ts +2 -0
- package/src/plugins/getApp/index.ts +12 -24
- package/src/plugins/getAuthentication/index.test.ts +13 -3
- package/src/plugins/getAuthentication/index.ts +1 -0
- package/src/plugins/getProfile/index.ts +1 -0
- package/src/plugins/listActions/index.test.ts +30 -89
- package/src/plugins/listActions/index.ts +13 -9
- package/src/plugins/listApps/index.ts +1 -0
- package/src/plugins/listAuthentications/index.test.ts +38 -47
- package/src/plugins/listAuthentications/index.ts +21 -18
- package/src/plugins/listInputFields/index.test.ts +12 -9
- package/src/plugins/listInputFields/index.ts +10 -6
- package/src/plugins/lockVersion/index.test.ts +176 -0
- package/src/plugins/lockVersion/index.ts +112 -0
- package/src/plugins/lockVersion/schemas.ts +9 -0
- package/src/plugins/manifest/index.test.ts +439 -0
- package/src/plugins/manifest/index.ts +171 -0
- package/src/plugins/manifest/schemas.ts +53 -0
- package/src/plugins/registry/index.ts +89 -8
- package/src/plugins/request/index.test.ts +8 -4
- package/src/plugins/request/index.ts +1 -0
- package/src/plugins/runAction/index.test.ts +9 -8
- package/src/plugins/runAction/index.ts +13 -7
- package/src/sdk.test.ts +1 -1
- package/src/sdk.ts +22 -7
- package/src/types/plugin.ts +14 -2
- package/src/types/sdk.ts +15 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c472d6f: Add manifest plugin to consume a supplied manifest, as well as lockVersion plugin to create or update the manifest.
|
|
8
|
+
- c402bcd: Remove \_\_registry in favor of getRegistry that also provides categories for functions.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- e08365e: Add support for lock file in generate-types command
|
|
13
|
+
|
|
3
14
|
## 0.5.2
|
|
4
15
|
|
|
5
16
|
### 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
|
-
- [
|
|
19
|
-
|
|
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
|
-
- [
|
|
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
|
-
#### `
|
|
64
|
+
#### `getAction`
|
|
63
65
|
|
|
64
|
-
|
|
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
|
|
71
|
-
| `actionType` | `string` |
|
|
72
|
-
| `
|
|
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<
|
|
76
|
+
**Returns:** `Promise<ActionItem>`
|
|
76
77
|
|
|
77
78
|
**Example:**
|
|
78
79
|
|
|
79
80
|
```typescript
|
|
80
|
-
const result = await sdk.
|
|
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
|
-
#### `
|
|
88
|
+
#### `listActions`
|
|
86
89
|
|
|
87
|
-
|
|
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` |
|
|
95
|
-
| `
|
|
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.
|
|
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
|
-
|
|
209
|
-
|
|
210
|
-
#### `listAuthentications`
|
|
189
|
+
#### `listApps`
|
|
211
190
|
|
|
212
|
-
List available
|
|
191
|
+
List all available apps with optional filtering
|
|
213
192
|
|
|
214
193
|
**Parameters:**
|
|
215
194
|
|
|
216
|
-
| Name
|
|
217
|
-
|
|
|
218
|
-
| `
|
|
219
|
-
| `search`
|
|
220
|
-
| `
|
|
221
|
-
| `
|
|
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<
|
|
202
|
+
**Returns:** `Promise<PaginatedResult<AppItem>>`
|
|
227
203
|
|
|
228
204
|
**Example:**
|
|
229
205
|
|
|
230
206
|
```typescript
|
|
231
|
-
const result = await sdk.
|
|
207
|
+
const result = await sdk.listApps();
|
|
232
208
|
```
|
|
233
209
|
|
|
234
|
-
|
|
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
|
-
###
|
|
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 -->
|