@zapier/zapier-sdk-cli 0.4.4 → 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 +30 -0
- package/README.md +92 -72
- package/dist/cli.js +212 -67
- package/dist/src/cli.js +1 -1
- package/dist/src/commands/bundle-code/cli.js +1 -1
- package/dist/src/commands/generate-types/cli.js +17 -6
- package/dist/src/commands/generate-types/index.js +26 -5
- package/dist/src/commands/generate-types/schemas.d.ts +3 -0
- package/dist/src/commands/generate-types/schemas.js +4 -0
- package/dist/src/utils/api/client.d.ts +3 -3
- package/dist/src/utils/cli-generator-utils.d.ts +2 -2
- package/dist/src/utils/cli-generator.js +84 -23
- package/dist/src/utils/log.d.ts +4 -4
- package/dist/src/utils/parameter-resolver.d.ts +1 -1
- package/dist/src/utils/parameter-resolver.js +45 -30
- package/dist/src/utils/schema-formatter.d.ts +1 -1
- package/dist/src/utils/schema-formatter.js +6 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/cli.test.ts +1 -2
- package/src/cli.ts +1 -1
- package/src/commands/bundle-code/cli.ts +19 -4
- package/src/commands/generate-types/cli.ts +25 -9
- package/src/commands/generate-types/index.ts +32 -6
- package/src/commands/generate-types/schemas.ts +4 -0
- package/src/utils/api/client.ts +3 -3
- package/src/utils/auth/login.ts +2 -1
- package/src/utils/cli-generator-utils.ts +7 -7
- package/src/utils/cli-generator.ts +154 -48
- package/src/utils/log.ts +4 -4
- package/src/utils/parameter-resolver.ts +106 -55
- package/src/utils/schema-formatter.ts +20 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c402bcd: Remove \_\_registry in favor of getRegistry that also provides categories for functions.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- e08365e: Add support for lock file in generate-types command
|
|
12
|
+
- 8ef28ba: reducing any usage with minimal changes to runtime
|
|
13
|
+
- Updated dependencies [c472d6f]
|
|
14
|
+
- Updated dependencies [e08365e]
|
|
15
|
+
- Updated dependencies [8ef28ba]
|
|
16
|
+
- Updated dependencies [c402bcd]
|
|
17
|
+
- @zapier/zapier-sdk@0.6.0
|
|
18
|
+
- @zapier/zapier-sdk-mcp@0.2.0
|
|
19
|
+
|
|
20
|
+
## 0.5.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- 218a3ca: reducing 'any' usage with minimal changes to runtime
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [218a3ca]
|
|
29
|
+
- @zapier/zapier-sdk-cli-login@0.3.2
|
|
30
|
+
- @zapier/zapier-sdk-mcp@0.1.4
|
|
31
|
+
- @zapier/zapier-sdk@0.5.2
|
|
32
|
+
|
|
3
33
|
## 0.4.4
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -8,22 +8,24 @@
|
|
|
8
8
|
- [Quick Start](#quick-start)
|
|
9
9
|
- [Available Commands](#available-commands)
|
|
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
|
|
|
@@ -53,41 +55,41 @@ The CLI automatically generates commands from the SDK registry. All SDK function
|
|
|
53
55
|
|
|
54
56
|
### Actions
|
|
55
57
|
|
|
56
|
-
#### `
|
|
58
|
+
#### `get-action`
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
Get detailed information about a specific action
|
|
59
61
|
|
|
60
62
|
**Options:**
|
|
61
63
|
|
|
62
|
-
| Option
|
|
63
|
-
|
|
|
64
|
-
| `<appKey>`
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
64
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
65
|
+
| -------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------- |
|
|
66
|
+
| `<appKey>` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI') |
|
|
67
|
+
| `<actionType>` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
|
|
68
|
+
| `<actionKey>` | `string` | ✅ | — | — | Action key to execute |
|
|
68
69
|
|
|
69
70
|
**Usage:**
|
|
70
71
|
|
|
71
72
|
```bash
|
|
72
|
-
npx zapier-sdk
|
|
73
|
+
npx zapier-sdk get-action <appKey> <actionType> <actionKey>
|
|
73
74
|
```
|
|
74
75
|
|
|
75
|
-
#### `
|
|
76
|
+
#### `list-actions`
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
List all actions for a specific app
|
|
78
79
|
|
|
79
80
|
**Options:**
|
|
80
81
|
|
|
81
|
-
| Option
|
|
82
|
-
|
|
|
83
|
-
| `<appKey>`
|
|
84
|
-
|
|
|
85
|
-
|
|
|
82
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
83
|
+
| --------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------ |
|
|
84
|
+
| `<appKey>` | `string` | ✅ | — | — | App key of actions to list (e.g., 'SlackCLIAPI') |
|
|
85
|
+
| `--action-type` | `string` | ❌ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Filter actions by type |
|
|
86
|
+
| `--page-size` | `number` | ❌ | — | — | Number of actions per page |
|
|
87
|
+
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
86
88
|
|
|
87
89
|
**Usage:**
|
|
88
90
|
|
|
89
91
|
```bash
|
|
90
|
-
npx zapier-sdk
|
|
92
|
+
npx zapier-sdk list-actions <appKey> [--action-type] [--page-size] [--max-items]
|
|
91
93
|
```
|
|
92
94
|
|
|
93
95
|
#### `list-input-fields`
|
|
@@ -136,25 +138,6 @@ npx zapier-sdk run-action <appKey> <actionType> <actionKey> [--authentication-id
|
|
|
136
138
|
|
|
137
139
|
### Apps
|
|
138
140
|
|
|
139
|
-
#### `list-apps`
|
|
140
|
-
|
|
141
|
-
List all available apps with optional filtering
|
|
142
|
-
|
|
143
|
-
**Options:**
|
|
144
|
-
|
|
145
|
-
| Option | Type | Required | Default | Possible Values | Description |
|
|
146
|
-
| ------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------- |
|
|
147
|
-
| `--app-keys` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
148
|
-
| `--search` | `string` | ❌ | — | — | Search for apps by name |
|
|
149
|
-
| `--page-size` | `number` | ❌ | — | — | Number of apps per page |
|
|
150
|
-
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
151
|
-
|
|
152
|
-
**Usage:**
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
npx zapier-sdk list-apps [--app-keys] [--search] [--page-size] [--max-items]
|
|
156
|
-
```
|
|
157
|
-
|
|
158
141
|
#### `get-app`
|
|
159
142
|
|
|
160
143
|
Get detailed information about a specific app
|
|
@@ -171,45 +154,26 @@ Get detailed information about a specific app
|
|
|
171
154
|
npx zapier-sdk get-app <appKey>
|
|
172
155
|
```
|
|
173
156
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
#### `list-authentications`
|
|
157
|
+
#### `list-apps`
|
|
177
158
|
|
|
178
|
-
List available
|
|
159
|
+
List all available apps with optional filtering
|
|
179
160
|
|
|
180
161
|
**Options:**
|
|
181
162
|
|
|
182
|
-
| Option
|
|
183
|
-
|
|
|
184
|
-
| `--app-
|
|
185
|
-
| `--search`
|
|
186
|
-
| `--
|
|
187
|
-
| `--
|
|
188
|
-
| `--owner` | `string` | ❌ | — | — | Filter by owner |
|
|
189
|
-
| `--page-size` | `number` | ❌ | — | — | Number of authentications per page |
|
|
190
|
-
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
163
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
164
|
+
| ------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------- |
|
|
165
|
+
| `--app-keys` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
166
|
+
| `--search` | `string` | ❌ | — | — | Search for apps by name |
|
|
167
|
+
| `--page-size` | `number` | ❌ | — | — | Number of apps per page |
|
|
168
|
+
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
191
169
|
|
|
192
170
|
**Usage:**
|
|
193
171
|
|
|
194
172
|
```bash
|
|
195
|
-
npx zapier-sdk list-
|
|
173
|
+
npx zapier-sdk list-apps [--app-keys] [--search] [--page-size] [--max-items]
|
|
196
174
|
```
|
|
197
175
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
Get a specific authentication by ID
|
|
201
|
-
|
|
202
|
-
**Options:**
|
|
203
|
-
|
|
204
|
-
| Option | Type | Required | Default | Possible Values | Description |
|
|
205
|
-
| -------------------- | -------- | -------- | ------- | --------------- | ----------------------------- |
|
|
206
|
-
| `<authenticationId>` | `number` | ✅ | — | — | Authentication ID to retrieve |
|
|
207
|
-
|
|
208
|
-
**Usage:**
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
npx zapier-sdk get-authentication <authenticationId>
|
|
212
|
-
```
|
|
176
|
+
### Authentications
|
|
213
177
|
|
|
214
178
|
#### `find-first-authentication`
|
|
215
179
|
|
|
@@ -251,6 +215,44 @@ Find a unique authentication matching the criteria
|
|
|
251
215
|
npx zapier-sdk find-unique-authentication [--app-key] [--search] [--title] [--account_id] [--owner]
|
|
252
216
|
```
|
|
253
217
|
|
|
218
|
+
#### `get-authentication`
|
|
219
|
+
|
|
220
|
+
Get a specific authentication by ID
|
|
221
|
+
|
|
222
|
+
**Options:**
|
|
223
|
+
|
|
224
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
225
|
+
| -------------------- | -------- | -------- | ------- | --------------- | ----------------------------- |
|
|
226
|
+
| `<authenticationId>` | `number` | ✅ | — | — | Authentication ID to retrieve |
|
|
227
|
+
|
|
228
|
+
**Usage:**
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
npx zapier-sdk get-authentication <authenticationId>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
#### `list-authentications`
|
|
235
|
+
|
|
236
|
+
List available authentications with optional filtering
|
|
237
|
+
|
|
238
|
+
**Options:**
|
|
239
|
+
|
|
240
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
241
|
+
| -------------- | -------- | -------- | ------- | --------------- | -------------------------------------------------------- |
|
|
242
|
+
| `--app-key` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI') |
|
|
243
|
+
| `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
|
|
244
|
+
| `--title` | `string` | ❌ | — | — | Filter authentications by exact title match |
|
|
245
|
+
| `--account_id` | `string` | ❌ | — | — | Filter by account ID |
|
|
246
|
+
| `--owner` | `string` | ❌ | — | — | Filter by owner |
|
|
247
|
+
| `--page-size` | `number` | ❌ | — | — | Number of authentications per page |
|
|
248
|
+
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
249
|
+
|
|
250
|
+
**Usage:**
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
npx zapier-sdk list-authentications [--app-key] [--search] [--title] [--account_id] [--owner] [--page-size] [--max-items]
|
|
254
|
+
```
|
|
255
|
+
|
|
254
256
|
### HTTP Requests
|
|
255
257
|
|
|
256
258
|
#### `request`
|
|
@@ -276,7 +278,7 @@ Make authenticated HTTP requests through Zapier's Relay service
|
|
|
276
278
|
npx zapier-sdk request <url> [--method] [--body] [--authentication-id] [--callback-url] [--authentication-template] [--headers] [--relay-base-url]
|
|
277
279
|
```
|
|
278
280
|
|
|
279
|
-
###
|
|
281
|
+
### Users
|
|
280
282
|
|
|
281
283
|
#### `get-profile`
|
|
282
284
|
|
|
@@ -288,6 +290,24 @@ Get current user's profile information
|
|
|
288
290
|
npx zapier-sdk get-profile
|
|
289
291
|
```
|
|
290
292
|
|
|
293
|
+
### Utilities
|
|
294
|
+
|
|
295
|
+
#### `lock-version`
|
|
296
|
+
|
|
297
|
+
Execute lockVersion
|
|
298
|
+
|
|
299
|
+
**Options:**
|
|
300
|
+
|
|
301
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
302
|
+
| ---------- | -------- | -------- | ------- | --------------- | -------------------------------------------------------- |
|
|
303
|
+
| `<appKey>` | `string` | ✅ | — | — | The app key to lock version for (e.g., 'slack', 'gmail') |
|
|
304
|
+
|
|
305
|
+
**Usage:**
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
npx zapier-sdk lock-version <appKey>
|
|
309
|
+
```
|
|
310
|
+
|
|
291
311
|
### Additional CLI Commands
|
|
292
312
|
|
|
293
313
|
- `login` - Authenticate with Zapier
|