@zapier/zapier-sdk 0.115.1 → 0.116.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.116.0
4
+
5
+ ### Minor Changes
6
+
7
+ - db3e28a: Added the `idempotencyKey` option to `fetch` for retrying API Proxy requests without repeating side effects.
8
+
9
+ ## 0.115.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 5bb041a: _This release contains no user-facing changes._
14
+
3
15
  ## 0.115.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -207,7 +207,7 @@ npx zapier-sdk list-connections gmail --owner me
207
207
  npx zapier-sdk find-first-connection gmail --owner me
208
208
 
209
209
  # Make any API request to an app using your connection.
210
- npx zapier-sdk fetch "https://gmail.googleapis.com/gmail/v1/users/me/labels" --connection-id 123
210
+ npx zapier-sdk curl "https://gmail.googleapis.com/gmail/v1/users/me/labels" --connection 123
211
211
  ```
212
212
 
213
213
  The following is optional, but if you want to call our actions from code, it can be helpful to install TypeScript types for those actions. You can also just use `fetch` to make arbitrary API requests. In that case, you don't really need this, and instead you might need types or a good agent that will look up third party API docs.
@@ -3016,13 +3016,14 @@ Make authenticated HTTP requests to any API through Zapier. Pass a connectionId
3016
3016
 
3017
3017
  | Name | Type | Required | Default | Possible Values | Description |
3018
3018
  | -------------------- | ------------------------ | -------- | ------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3019
- | `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service) |
3019
+ | `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's API Proxy) |
3020
3020
  | `init` | `object` | ❌ | — | — | Request options including method, headers, body, and authentication |
3021
3021
  | ​ ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET) |
3022
3022
  | ​ ↳ `headers` | `object` | ❌ | — | — | HTTP headers to include in the request |
3023
3023
  | ​ ↳ `body` | `string, custom, record` | ❌ | — | — | Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly |
3024
3024
  | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
3025
3025
  | ​ ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
3026
+ | ​ ↳ `idempotencyKey` | `string` | ❌ | — | — | Key used to make API Proxy retries safe from duplicate side effects |
3026
3027
  | ​ ↳ `maxTimeSeconds` | `number` | ❌ | — | — | Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling. |
3027
3028
 
3028
3029
  **Returns:** `Promise<Response>`