@zapier/zapier-sdk-cli 0.35.0 → 0.36.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 +23 -0
- package/README.md +232 -0
- package/dist/cli.cjs +337 -168
- package/dist/cli.mjs +335 -167
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/package.json +2 -1
- package/dist/src/utils/cli-generator.js +46 -12
- package/dist/src/utils/parameter-resolver.d.ts +11 -0
- package/dist/src/utils/parameter-resolver.js +262 -157
- package/dist/src/utils/schema-formatter.d.ts +6 -1
- package/dist/src/utils/schema-formatter.js +45 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.36.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d4534f3: Add support for Tables.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [d4534f3]
|
|
12
|
+
- @zapier/zapier-sdk-cli-login@0.9.0
|
|
13
|
+
- @zapier/zapier-sdk-mcp@0.10.0
|
|
14
|
+
- @zapier/zapier-sdk@0.35.0
|
|
15
|
+
|
|
16
|
+
## 0.35.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 6c5bba9: Fix fetch type for app proxy without generated types.
|
|
21
|
+
- Updated dependencies [6c5bba9]
|
|
22
|
+
- @zapier/zapier-sdk-cli-login@0.8.3
|
|
23
|
+
- @zapier/zapier-sdk-mcp@0.9.23
|
|
24
|
+
- @zapier/zapier-sdk@0.34.1
|
|
25
|
+
|
|
3
26
|
## 0.35.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -32,6 +32,19 @@
|
|
|
32
32
|
- [`list-connections`](#list-connections)
|
|
33
33
|
- [HTTP Requests](#http-requests)
|
|
34
34
|
- [`curl`](#curl)
|
|
35
|
+
- [Tables](#tables)
|
|
36
|
+
- [`create-table`](#create-table)
|
|
37
|
+
- [`create-table-fields`](#create-table-fields)
|
|
38
|
+
- [`create-table-records`](#create-table-records)
|
|
39
|
+
- [`delete-table`](#delete-table)
|
|
40
|
+
- [`delete-table-fields`](#delete-table-fields)
|
|
41
|
+
- [`delete-table-records`](#delete-table-records)
|
|
42
|
+
- [`get-table`](#get-table)
|
|
43
|
+
- [`get-table-record`](#get-table-record)
|
|
44
|
+
- [`list-table-fields`](#list-table-fields)
|
|
45
|
+
- [`list-table-records`](#list-table-records)
|
|
46
|
+
- [`list-tables`](#list-tables)
|
|
47
|
+
- [`update-table-records`](#update-table-records)
|
|
35
48
|
- [Utilities](#utilities)
|
|
36
49
|
- [`add`](#add)
|
|
37
50
|
- [`build-manifest`](#build-manifest)
|
|
@@ -512,6 +525,225 @@ Make authenticated HTTP requests to any API through Zapier. Pass a connection ID
|
|
|
512
525
|
npx zapier-sdk curl <url> [--request] [--header] [--data] [--data-raw] [--data-ascii] [--data-binary] [--data-urlencode] [--json] [--form] [--form-string] [--get] [--head] [--location] [--include] [--output] [--remote-name] [--verbose] [--silent] [--show-error] [--fail] [--fail-with-body] [--write-out] [--max-time] [--user] [--compressed] [--connection-id]
|
|
513
526
|
```
|
|
514
527
|
|
|
528
|
+
### Tables
|
|
529
|
+
|
|
530
|
+
#### `create-table`
|
|
531
|
+
|
|
532
|
+
Create a new table
|
|
533
|
+
|
|
534
|
+
**Options:**
|
|
535
|
+
|
|
536
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
537
|
+
| --------------- | -------- | -------- | ------- | --------------- | ------------------------------------ |
|
|
538
|
+
| `<name>` | `string` | ✅ | — | — | The name for the new table |
|
|
539
|
+
| `--description` | `string` | ❌ | — | — | An optional description of the table |
|
|
540
|
+
|
|
541
|
+
**Usage:**
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
npx zapier-sdk create-table <name> [--description]
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
#### `create-table-fields`
|
|
548
|
+
|
|
549
|
+
Create one or more fields in a table
|
|
550
|
+
|
|
551
|
+
**Options:**
|
|
552
|
+
|
|
553
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
554
|
+
| ------------ | -------- | -------- | ------- | --------------- | ------------------------------------ |
|
|
555
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
556
|
+
| `<fields>` | `array` | ✅ | — | — | Array of field definitions to create |
|
|
557
|
+
|
|
558
|
+
**Usage:**
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
npx zapier-sdk create-table-fields <table-id> <fields>
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
#### `create-table-records`
|
|
565
|
+
|
|
566
|
+
Create one or more records in a table
|
|
567
|
+
|
|
568
|
+
**Options:**
|
|
569
|
+
|
|
570
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
571
|
+
| ------------ | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
572
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
573
|
+
| `<records>` | `array` | ✅ | — | — | Array of records to create (max 100) |
|
|
574
|
+
| `--key-mode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
575
|
+
|
|
576
|
+
**Usage:**
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
npx zapier-sdk create-table-records <table-id> <records> [--key-mode]
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
#### `delete-table`
|
|
583
|
+
|
|
584
|
+
Delete a table by its ID
|
|
585
|
+
|
|
586
|
+
**Options:**
|
|
587
|
+
|
|
588
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
589
|
+
| ------------ | -------- | -------- | ------- | --------------- | -------------------------------------------- |
|
|
590
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table to delete |
|
|
591
|
+
|
|
592
|
+
**Usage:**
|
|
593
|
+
|
|
594
|
+
```bash
|
|
595
|
+
npx zapier-sdk delete-table <table-id>
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
#### `delete-table-fields`
|
|
599
|
+
|
|
600
|
+
Delete one or more fields from a table
|
|
601
|
+
|
|
602
|
+
**Options:**
|
|
603
|
+
|
|
604
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
605
|
+
| -------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------- |
|
|
606
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
607
|
+
| `<field-keys>` | `array` | ✅ | — | — | Fields to delete. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
|
|
608
|
+
|
|
609
|
+
**Usage:**
|
|
610
|
+
|
|
611
|
+
```bash
|
|
612
|
+
npx zapier-sdk delete-table-fields <table-id> <field-keys>
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
#### `delete-table-records`
|
|
616
|
+
|
|
617
|
+
Delete one or more records from a table
|
|
618
|
+
|
|
619
|
+
**Options:**
|
|
620
|
+
|
|
621
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
622
|
+
| -------------- | -------- | -------- | ------- | --------------- | --------------------------------------- |
|
|
623
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
624
|
+
| `<record-ids>` | `array` | ✅ | — | — | Array of record IDs to delete (max 100) |
|
|
625
|
+
|
|
626
|
+
**Usage:**
|
|
627
|
+
|
|
628
|
+
```bash
|
|
629
|
+
npx zapier-sdk delete-table-records <table-id> <record-ids>
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
#### `get-table`
|
|
633
|
+
|
|
634
|
+
Get detailed information about a specific table
|
|
635
|
+
|
|
636
|
+
**Options:**
|
|
637
|
+
|
|
638
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
639
|
+
| ------------ | -------- | -------- | ------- | --------------- | ---------------------------------------------- |
|
|
640
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table to retrieve |
|
|
641
|
+
|
|
642
|
+
**Usage:**
|
|
643
|
+
|
|
644
|
+
```bash
|
|
645
|
+
npx zapier-sdk get-table <table-id>
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
#### `get-table-record`
|
|
649
|
+
|
|
650
|
+
Get a single record from a table by ID
|
|
651
|
+
|
|
652
|
+
**Options:**
|
|
653
|
+
|
|
654
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
655
|
+
| ------------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
656
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
657
|
+
| `<record-id>` | `string` | ✅ | — | — | The unique identifier of the record |
|
|
658
|
+
| `--key-mode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
659
|
+
|
|
660
|
+
**Usage:**
|
|
661
|
+
|
|
662
|
+
```bash
|
|
663
|
+
npx zapier-sdk get-table-record <table-id> <record-id> [--key-mode]
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
#### `list-table-fields`
|
|
667
|
+
|
|
668
|
+
List fields for a table
|
|
669
|
+
|
|
670
|
+
**Options:**
|
|
671
|
+
|
|
672
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
673
|
+
| -------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------- |
|
|
674
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
675
|
+
| `--field-keys` | `array` | ❌ | — | — | Filter by specific fields. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
|
|
676
|
+
|
|
677
|
+
**Usage:**
|
|
678
|
+
|
|
679
|
+
```bash
|
|
680
|
+
npx zapier-sdk list-table-fields <table-id> [--field-keys]
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
#### `list-table-records`
|
|
684
|
+
|
|
685
|
+
List records in a table with optional filtering and sorting
|
|
686
|
+
|
|
687
|
+
**Options:**
|
|
688
|
+
|
|
689
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
690
|
+
| --------------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
691
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
692
|
+
| `--filters` | `array` | ❌ | — | — | Filter conditions for the query |
|
|
693
|
+
| `--sort` | `object` | ❌ | — | — | Sort records by a field |
|
|
694
|
+
| ↳ `<field-key>` | `string` | ✅ | — | — | The field key to sort by |
|
|
695
|
+
| ↳ `--direction` | `string` | ❌ | `"asc"` | — | Sort direction |
|
|
696
|
+
| `--page-size` | `number` | ❌ | — | — | Number of records per page (max 1000) |
|
|
697
|
+
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
698
|
+
| `--cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
699
|
+
| `--key-mode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
700
|
+
|
|
701
|
+
**Usage:**
|
|
702
|
+
|
|
703
|
+
```bash
|
|
704
|
+
npx zapier-sdk list-table-records <table-id> <field-key> [--filters] [--sort] [--direction] [--page-size] [--max-items] [--cursor] [--key-mode]
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
#### `list-tables`
|
|
708
|
+
|
|
709
|
+
List tables available to the authenticated user
|
|
710
|
+
|
|
711
|
+
**Options:**
|
|
712
|
+
|
|
713
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
714
|
+
| ------------- | -------- | -------- | ------- | -------------------------------- | --------------------------------------------------------------------------- |
|
|
715
|
+
| `--table-ids` | `array` | ❌ | — | — | Filter by specific table IDs |
|
|
716
|
+
| `--kind` | `string` | ❌ | — | `table`, `virtual_table`, `both` | Filter by table type |
|
|
717
|
+
| `--search` | `string` | ❌ | — | — | Search term to filter tables by name |
|
|
718
|
+
| `--owner` | `string` | ❌ | — | — | Filter by table owner. Use "me" for the current user, or a numeric user ID. |
|
|
719
|
+
| `--page-size` | `number` | ❌ | — | — | Number of tables per page |
|
|
720
|
+
| `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
721
|
+
| `--cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
722
|
+
|
|
723
|
+
**Usage:**
|
|
724
|
+
|
|
725
|
+
```bash
|
|
726
|
+
npx zapier-sdk list-tables [--table-ids] [--kind] [--search] [--owner] [--page-size] [--max-items] [--cursor]
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
#### `update-table-records`
|
|
730
|
+
|
|
731
|
+
Update one or more records in a table
|
|
732
|
+
|
|
733
|
+
**Options:**
|
|
734
|
+
|
|
735
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
736
|
+
| ------------ | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
737
|
+
| `<table-id>` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
738
|
+
| `<records>` | `array` | ✅ | — | — | Array of records to update (max 100) |
|
|
739
|
+
| `--key-mode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
|
|
740
|
+
|
|
741
|
+
**Usage:**
|
|
742
|
+
|
|
743
|
+
```bash
|
|
744
|
+
npx zapier-sdk update-table-records <table-id> <records> [--key-mode]
|
|
745
|
+
```
|
|
746
|
+
|
|
515
747
|
### Utilities
|
|
516
748
|
|
|
517
749
|
#### `add`
|