@zapier/zapier-sdk-cli 0.8.4 → 0.9.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 +12 -0
- package/README.md +35 -51
- package/dist/cli.cjs +750 -346
- package/dist/cli.mjs +751 -347
- package/dist/index.cjs +726 -336
- package/dist/index.mjs +727 -337
- package/dist/package.json +1 -1
- package/dist/src/plugins/add/ast-generator.d.ts +37 -0
- package/dist/src/plugins/add/ast-generator.js +403 -0
- package/dist/src/plugins/add/index.d.ts +13 -0
- package/dist/src/plugins/add/index.js +122 -0
- package/dist/src/plugins/add/schemas.d.ts +18 -0
- package/dist/src/plugins/add/schemas.js +19 -0
- package/dist/src/plugins/getLoginConfigPath/index.d.ts +15 -0
- package/dist/src/plugins/getLoginConfigPath/index.js +19 -0
- package/dist/src/plugins/getLoginConfigPath/schemas.d.ts +3 -0
- package/dist/src/plugins/getLoginConfigPath/schemas.js +5 -0
- package/dist/src/plugins/index.d.ts +2 -2
- package/dist/src/plugins/index.js +2 -2
- package/dist/src/sdk.js +3 -3
- package/dist/src/utils/cli-generator.js +15 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/plugins/add/ast-generator.ts +777 -0
- package/src/plugins/add/index.test.ts +58 -0
- package/src/plugins/add/index.ts +187 -0
- package/src/plugins/add/schemas.ts +26 -0
- package/src/plugins/getLoginConfigPath/index.ts +45 -0
- package/src/plugins/getLoginConfigPath/schemas.ts +10 -0
- package/src/plugins/index.ts +2 -2
- package/src/sdk.ts +4 -4
- package/src/utils/cli-generator.ts +22 -0
- package/tsup.config.ts +1 -1
- package/dist/src/plugins/generateTypes/index.d.ts +0 -21
- package/dist/src/plugins/generateTypes/index.js +0 -312
- package/dist/src/plugins/generateTypes/schemas.d.ts +0 -18
- package/dist/src/plugins/generateTypes/schemas.js +0 -14
- package/dist/src/plugins/getConfigPath/index.d.ts +0 -15
- package/dist/src/plugins/getConfigPath/index.js +0 -19
- package/dist/src/plugins/getConfigPath/schemas.d.ts +0 -3
- package/dist/src/plugins/getConfigPath/schemas.js +0 -5
- package/src/plugins/generateTypes/index.ts +0 -444
- package/src/plugins/generateTypes/schemas.ts +0 -23
- package/src/plugins/getConfigPath/index.ts +0 -42
- package/src/plugins/getConfigPath/schemas.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5ccaec6: AST-based type gen instead of string-based. Added `add` function for locking app versions and generating types. Removed `lockVersion` and `generateTypes functions. Manifest matching on slug or implementation name.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [5ccaec6]
|
|
12
|
+
- @zapier/zapier-sdk@0.9.0
|
|
13
|
+
- @zapier/zapier-sdk-mcp@0.3.5
|
|
14
|
+
|
|
3
15
|
## 0.8.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -29,10 +29,9 @@
|
|
|
29
29
|
- [HTTP Requests](#http-requests)
|
|
30
30
|
- [`request`](#request)
|
|
31
31
|
- [Utilities](#utilities)
|
|
32
|
+
- [`add`](#add)
|
|
32
33
|
- [`bundle-code`](#bundle-code)
|
|
33
|
-
- [`
|
|
34
|
-
- [`get-config-path`](#get-config-path)
|
|
35
|
-
- [`lock-version`](#lock-version)
|
|
34
|
+
- [`get-login-config-path`](#get-login-config-path)
|
|
36
35
|
- [`mcp`](#mcp)
|
|
37
36
|
|
|
38
37
|
## Installation
|
|
@@ -318,20 +317,21 @@ List available authentications with optional filtering
|
|
|
318
317
|
|
|
319
318
|
**Options:**
|
|
320
319
|
|
|
321
|
-
| Option
|
|
322
|
-
|
|
|
323
|
-
| `--app-key`
|
|
324
|
-
| `--
|
|
325
|
-
| `--
|
|
326
|
-
| `--
|
|
327
|
-
| `--
|
|
328
|
-
| `--
|
|
329
|
-
| `--
|
|
320
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
321
|
+
| ---------------------- | -------- | -------- | ------- | --------------- | -------------------------------------------------------- |
|
|
322
|
+
| `--app-key` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI') |
|
|
323
|
+
| `--authentication-ids` | `array` | ❌ | — | — | List of authentication IDs to filter by |
|
|
324
|
+
| `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
|
|
325
|
+
| `--title` | `string` | ❌ | — | — | Filter authentications by exact title match |
|
|
326
|
+
| `--account-id` | `string` | ❌ | — | — | Filter by account ID |
|
|
327
|
+
| `--owner` | `string` | ❌ | — | — | Filter by owner |
|
|
328
|
+
| `--page-size` | `number` | ❌ | — | — | Number of authentications per page |
|
|
329
|
+
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
330
330
|
|
|
331
331
|
**Usage:**
|
|
332
332
|
|
|
333
333
|
```bash
|
|
334
|
-
npx zapier-sdk list-authentications [--app-key] [--search] [--title] [--account-id] [--owner] [--page-size] [--max-items]
|
|
334
|
+
npx zapier-sdk list-authentications [--app-key] [--authentication-ids] [--search] [--title] [--account-id] [--owner] [--page-size] [--max-items]
|
|
335
335
|
```
|
|
336
336
|
|
|
337
337
|
### HTTP Requests
|
|
@@ -361,6 +361,25 @@ npx zapier-sdk request <url> [--method] [--body] [--authentication-id] [--callba
|
|
|
361
361
|
|
|
362
362
|
### Utilities
|
|
363
363
|
|
|
364
|
+
#### `add`
|
|
365
|
+
|
|
366
|
+
Execute add
|
|
367
|
+
|
|
368
|
+
**Options:**
|
|
369
|
+
|
|
370
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
371
|
+
| ---------------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------- | --- | ---------------- |
|
|
372
|
+
| `<app-keys>` | `array` | ✅ | — | — | |
|
|
373
|
+
| `--authentication-ids` | `array` | ❌ | — | — | Authentication IDs to use for type generation |
|
|
374
|
+
| `--config-path` | `string` | ❌ | — | — | Path to Zapier config file (defaults to '.zapierrc') |
|
|
375
|
+
| `--types-output` | `string` | ❌ | — | — | Directory for TypeScript type files (defaults to (src | lib | .)/zapier/apps/) |
|
|
376
|
+
|
|
377
|
+
**Usage:**
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
npx zapier-sdk add <app-keys> [--authentication-ids] [--config-path] [--types-output]
|
|
381
|
+
```
|
|
382
|
+
|
|
364
383
|
#### `bundle-code`
|
|
365
384
|
|
|
366
385
|
Bundle TypeScript code into executable JavaScript
|
|
@@ -382,49 +401,14 @@ Bundle TypeScript code into executable JavaScript
|
|
|
382
401
|
npx zapier-sdk bundle-code <input> [--output] [--string] [--minify] [--target] [--cjs]
|
|
383
402
|
```
|
|
384
403
|
|
|
385
|
-
#### `
|
|
386
|
-
|
|
387
|
-
Generate TypeScript SDK code for a specific app
|
|
388
|
-
|
|
389
|
-
**Options:**
|
|
390
|
-
|
|
391
|
-
| Option | Type | Required | Default | Possible Values | Description |
|
|
392
|
-
| --------------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------- |
|
|
393
|
-
| `<app-key>` | `string` | ✅ | — | — | App key to generate SDK code for |
|
|
394
|
-
| `--authentication-id` | `number` | ❌ | — | — | Authentication ID to use for this action |
|
|
395
|
-
| `--output` | `string` | ❌ | — | — | Output file path (defaults to generated/<appKey>.ts) |
|
|
396
|
-
| `--lock-file-path` | `string` | ❌ | — | — | Path to the .zapierrc lock file (defaults to .zapierrc) |
|
|
397
|
-
|
|
398
|
-
**Usage:**
|
|
399
|
-
|
|
400
|
-
```bash
|
|
401
|
-
npx zapier-sdk generate-types <app-key> [--authentication-id] [--output] [--lock-file-path]
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
#### `get-config-path`
|
|
405
|
-
|
|
406
|
-
Show the path to the configuration file
|
|
407
|
-
|
|
408
|
-
**Usage:**
|
|
409
|
-
|
|
410
|
-
```bash
|
|
411
|
-
npx zapier-sdk get-config-path
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
#### `lock-version`
|
|
415
|
-
|
|
416
|
-
Execute lockVersion
|
|
417
|
-
|
|
418
|
-
**Options:**
|
|
404
|
+
#### `get-login-config-path`
|
|
419
405
|
|
|
420
|
-
|
|
421
|
-
| ----------- | -------- | -------- | ------- | --------------- | -------------------------------------------------------- |
|
|
422
|
-
| `<app-key>` | `string` | ✅ | — | — | The app key to lock version for (e.g., 'slack', 'gmail') |
|
|
406
|
+
Show the path to the login configuration file
|
|
423
407
|
|
|
424
408
|
**Usage:**
|
|
425
409
|
|
|
426
410
|
```bash
|
|
427
|
-
npx zapier-sdk
|
|
411
|
+
npx zapier-sdk get-login-config-path
|
|
428
412
|
```
|
|
429
413
|
|
|
430
414
|
#### `mcp`
|