@zapier/zapier-sdk 0.117.0 → 0.118.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,11 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.118.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6397776: Added the `idempotencyKey` option to `createActionRun`, `runAction`, and app action calls (`zapier.apps.<app>.<actionType>.<action>(...)`) for retrying an action without running it twice. A run started with a key already used in the last 72 hours returns the original run instead of starting a new one, even if the inputs differ, so use a fresh key for each distinct run. Keys are up to 255 characters. One key covers every page: a run for a later page (a `page` on `createActionRun`, or a later page of `runAction`) is sent with a key derived from yours and the page, so retrying a page replays that page's run.
8
+
3
9
  ## 0.117.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -525,16 +525,17 @@ Start an action run and return its ID without waiting for the result. Running an
525
525
 
526
526
  **Parameters:**
527
527
 
528
- | Name | Type | Required | Default | Possible Values | Description |
529
- | ----------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
530
- | `options` | `object` | ✅ | — | — | |
531
- | ​ ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
532
- | ​ ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
533
- | ​ ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
534
- | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Required if the action needs a connection to authenticate and interact with the service. Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
535
- | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
536
- | ​ ↳ `page` | `string` | ❌ | — | — | Page to fetch for bulk read actions. Pass the `next_page` a previous run returned to fetch the following page. |
537
- | ​ ↳ `callbackUrl` | `string` | ❌ | — | — | URL Zapier posts the finished run to, so you do not have to poll for it. Must use HTTPS and resolve to a public host, so a local receiver needs a tunnel. The body matches what `getActionRun` returns. Verify the `Zapier-Callback-Signature` header, and expect the same run to arrive more than once. |
528
+ | Name | Type | Required | Default | Possible Values | Description |
529
+ | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
530
+ | `options` | `object` | ✅ | — | — | |
531
+ | ​ ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
532
+ | ​ ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
533
+ | ​ ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
534
+ | ​ ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Required if the action needs a connection to authenticate and interact with the service. Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
535
+ | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
536
+ | ​ ↳ `page` | `string` | ❌ | — | — | Page to fetch for bulk read actions. Pass the `next_page` a previous run returned to fetch the following page. |
537
+ | ​ ↳ `callbackUrl` | `string` | ❌ | — | — | URL Zapier posts the finished run to, so you do not have to poll for it. Must use HTTPS and resolve to a public host, so a local receiver needs a tunnel. The body matches what `getActionRun` returns. Verify the `Zapier-Callback-Signature` header, and expect the same run to arrive more than once. |
538
+ | ​ ↳ `idempotencyKey` | `string` | ❌ | — | — | Key that makes retrying a run safe. Another run with the same key within 72 hours returns the original run instead of starting a new one, even if its inputs differ, so use a fresh key per distinct run. A paged run is sent with a key derived from this key and the page, so one key covers every page and retrying a page replays that page's run. |
538
539
 
539
540
  **Returns:** `Promise<StartedActionRunItem>`
540
541
 
@@ -882,18 +883,19 @@ Execute an action with the given inputs and wait for its results. Each result pa
882
883
 
883
884
  **Parameters:**
884
885
 
885
- | Name | Type | Required | Default | Possible Values | Description |
886
- | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
887
- | `options` | `object` | ✅ | — | — | |
888
- | ​ ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
889
- | ​ ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
890
- | ​ ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
891
- | ​ ↳ `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. Mutually exclusive with connectionId. |
892
- | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
893
- | ​ ↳ `timeoutSeconds` | `number` | ❌ | — | — | Maximum time to wait for action completion in seconds (default: 180) |
894
- | ​ ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
895
- | ​ ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
896
- | ​ ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
886
+ | Name | Type | Required | Default | Possible Values | Description |
887
+ | -------------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
888
+ | `options` | `object` | ✅ | — | — | |
889
+ | ​ ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
890
+ | ​ ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
891
+ | ​ ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
892
+ | ​ ↳ `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. Mutually exclusive with connectionId. |
893
+ | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
894
+ | ​ ↳ `timeoutSeconds` | `number` | ❌ | — | — | Maximum time to wait for action completion in seconds (default: 180) |
895
+ | ​ ↳ `idempotencyKey` | `string` | ❌ | — | — | Key that makes retrying a run safe. Another run with the same key within 72 hours returns the original run instead of starting a new one, even if its inputs differ, so use a fresh key per distinct run. A paged run is sent with a key derived from this key and the page, so one key covers every page and retrying a page replays that page's run. |
896
+ | ​ ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
897
+ | ​ ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
898
+ | ​ ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
897
899
 
898
900
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
899
901
 
@@ -959,12 +961,13 @@ Execute an action with the given inputs for the bound app, as an alternative to
959
961
 
960
962
  **Parameters:**
961
963
 
962
- | Name | Type | Required | Default | Possible Values | Description |
963
- | -------------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
964
- | `options` | `object` | ✅ | — | — | |
965
- | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
966
- | ​ ↳ `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. |
967
- | ​ ↳ `timeoutSeconds` | `number` | ❌ | — | — | Maximum time to wait for action completion in seconds (default: 180) |
964
+ | Name | Type | Required | Default | Possible Values | Description |
965
+ | -------------------- | ---------------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
966
+ | `options` | `object` | ✅ | — | — | |
967
+ | ​ ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
968
+ | ​ ↳ `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. |
969
+ | ​ ↳ `timeoutSeconds` | `number` | ❌ | — | — | Maximum time to wait for action completion in seconds (default: 180) |
970
+ | ​ ↳ `idempotencyKey` | `string` | ❌ | — | — | Key that makes retrying a run safe. Another run with the same key within 72 hours returns the original run instead of starting a new one, even if its inputs differ, so use a fresh key per distinct run. A paged run is sent with a key derived from this key and the page, so one key covers every page and retrying a page replays that page's run. |
968
971
 
969
972
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
970
973