@zapier/zapier-sdk-cli 0.30.0 → 0.31.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @zapier/zapier-sdk-cli
2
2
 
3
+ ## 0.31.1
4
+
5
+ ### Patch Changes
6
+
7
+ - a49a7af: Fix bug in array option handling in the CLI causing create-client-credentials to fail.
8
+
9
+ ## 0.31.0
10
+
11
+ ### Minor Changes
12
+
13
+ - ad5ee3b: Adds a new curl plugin.
14
+ Switch -v flag to -V for version information.
15
+ Fix CLI to properly handle string and object types.
16
+ Add redirect passthrough to fetch plugin (to support curl plugin).
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [ad5ee3b]
21
+ - @zapier/zapier-sdk@0.29.0
22
+ - @zapier/zapier-sdk-mcp@0.9.4
23
+
3
24
  ## 0.30.0
4
25
 
5
26
  ### Minor Changes
package/README.md CHANGED
@@ -30,7 +30,7 @@
30
30
  - [`get-connection`](#get-connection)
31
31
  - [`list-connections`](#list-connections)
32
32
  - [HTTP Requests](#http-requests)
33
- - [`fetch`](#fetch)
33
+ - [`curl`](#curl)
34
34
  - [Utilities](#utilities)
35
35
  - [`add`](#add)
36
36
  - [`build-manifest`](#build-manifest)
@@ -85,7 +85,7 @@ These options are available for all commands:
85
85
 
86
86
  | Option | Short | Description |
87
87
  | -------------------------------------- | ----- | -------------------------------------------------- |
88
- | `--version` | `-v` | Display version number |
88
+ | `--version` | `-V` | Display version number |
89
89
  | `--help` | `-h` | Display help for command |
90
90
  | `--debug` | | Enable debug logging |
91
91
  | `--json` | | Output raw JSON instead of formatted results |
@@ -450,25 +450,46 @@ npx zapier-sdk list-connections [--search] [--title] [--owner] [--app-key] [--co
450
450
 
451
451
  ### HTTP Requests
452
452
 
453
- #### `fetch`
453
+ #### `curl`
454
454
 
455
- Make authenticated HTTP requests to any API through Zapier's Relay service. Pass a connectionId to automatically inject the user's stored credentials (OAuth tokens, API keys, etc.) into the outgoing request. Mirrors the native fetch(url, init?) signature with additional Zapier-specific options.
455
+ Make authenticated HTTP requests to any API through Zapier. Pass a connection ID to automatically inject the user's stored credentials (OAuth tokens, API keys, etc.) into the outgoing request. Use it in place of the native curl command with additional Zapier-specific options.
456
456
 
457
457
  **Options:**
458
458
 
459
- | Option | Type | Required | Default | Possible Values | Description |
460
- | ----------------- | -------------------------------- | -------- | ------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
461
- | `<url>` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service) |
462
- | `--method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET) |
463
- | `--headers` | `object` | ❌ | — | — | HTTP headers to include in the request |
464
- | `--body` | `string, custom, custom, record` | ❌ | — | — | Request body plain objects and JSON strings are auto-detected and Content-Type is set accordingly |
465
- | `--connection-id` | `string, number` | ❌ | — | — | Connection ID to use for this action |
466
- | `--callback-url` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
459
+ | Option | Type | Required | Default | Possible Values | Description |
460
+ | ------------------ | ---------------- | -------- | ------- | ---------------------------------------------------------- | ------------------------------------------------------------ |
461
+ | `<url>` | `string` | ✅ | — | — | Request URL |
462
+ | `--request` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method (defaults to GET, or POST if data is provided) |
463
+ | `--header` | `array` | ❌ | — | — | HTTP headers in 'Key: Value' format (repeatable) |
464
+ | `--data` | `array` | ❌ | — | — | HTTP POST data (repeatable, joined with &) |
465
+ | `--data-raw` | `array` | ❌ | — | — | HTTP POST data without special interpretation (repeatable) |
466
+ | `--data-ascii` | `array` | ❌ | — | — | HTTP POST ASCII data (repeatable) |
467
+ | `--data-binary` | `array` | ❌ | — | — | HTTP POST binary data (repeatable) |
468
+ | `--data-urlencode` | `array` | ❌ | — | — | HTTP POST data, URL-encoded (repeatable) |
469
+ | `--json` | `string` | ❌ | — | — | Send JSON body (sets Content-Type and Accept headers) |
470
+ | `--form` | `array` | ❌ | — | — | Multipart form data as 'name=value' (repeatable) |
471
+ | `--form-string` | `array` | ❌ | — | — | Multipart form string field (repeatable) |
472
+ | `--get` | `boolean` | ❌ | — | — | Force GET method and append data to query string |
473
+ | `--head` | `boolean` | ❌ | — | — | Fetch headers only (HEAD request) |
474
+ | `--location` | `boolean` | ❌ | — | — | Follow redirects |
475
+ | `--include` | `boolean` | ❌ | — | — | Include response headers in output |
476
+ | `--output` | `string` | ❌ | — | — | Write output to file instead of stdout |
477
+ | `--remote-name` | `boolean` | ❌ | — | — | Write output to file named like the remote file |
478
+ | `--verbose` | `boolean` | ❌ | — | — | Verbose output (show request/response headers on stderr) |
479
+ | `--silent` | `boolean` | ❌ | — | — | Silent mode (suppress errors) |
480
+ | `--show-error` | `boolean` | ❌ | — | — | Show errors even when in silent mode |
481
+ | `--fail` | `boolean` | ❌ | — | — | Fail silently on HTTP errors (exit code 22) |
482
+ | `--fail-with-body` | `boolean` | ❌ | — | — | Fail on HTTP errors but still output the body |
483
+ | `--write-out` | `string` | ❌ | — | — | Output format string after completion (e.g., '%{http_code}') |
484
+ | `--max-time` | `number` | ❌ | — | — | Maximum time in seconds for the request |
485
+ | `--user` | `string` | ❌ | — | — | Basic auth credentials as 'user:password' |
486
+ | `--compressed` | `boolean` | ❌ | — | — | Request compressed response (sends Accept-Encoding header) |
487
+ | `--connection-id` | `string, number` | ❌ | — | — | Zapier connection ID for authentication |
467
488
 
468
489
  **Usage:**
469
490
 
470
491
  ```bash
471
- npx zapier-sdk fetch <url> [--method] [--headers] [--body] [--connection-id] [--callback-url]
492
+ 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]
472
493
  ```
473
494
 
474
495
  ### Utilities