@zapier/zapier-sdk 0.112.4 → 0.112.5

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.112.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 51116a0: Added a `permissions` field to actions returned by `listActions`, `getAction` and `listTriggers`. It passes through every flag the API returns, including `can_use`, which is `false` when an account admin has restricted the action.
8
+
3
9
  ## 0.112.4
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -554,6 +554,7 @@ Get detailed information about a specific action
554
554
  | ​ ↳ `description` | `string` | ✅ | — | |
555
555
  | ​ ↳ `is_important` | `boolean` | ❌ | — | |
556
556
  | ​ ↳ `is_hidden` | `boolean` | ❌ | — | |
557
+ | ​ ↳ `permissions` | `object` | ❌ | — | |
557
558
  | ​ ↳ `app_key` | `string` | ✅ | — | |
558
559
  | ​ ↳ `app_version` | `string` | ❌ | — | |
559
560
  | ​ ↳ `action_type` | `string` | ✅ | `filter`, `read`, `read_bulk`, `run`, `search`, `search_and_write`, `search_or_write`, `write` | |
@@ -817,6 +818,7 @@ List all actions for a specific app
817
818
  | ​ ↳ `description` | `string` | ✅ | — | |
818
819
  | ​ ↳ `is_important` | `boolean` | ❌ | — | |
819
820
  | ​ ↳ `is_hidden` | `boolean` | ❌ | — | |
821
+ | ​ ↳ `permissions` | `object` | ❌ | — | |
820
822
  | ​ ↳ `app_key` | `string` | ✅ | — | |
821
823
  | ​ ↳ `app_version` | `string` | ❌ | — | |
822
824
  | ​ ↳ `action_type` | `string` | ✅ | `filter`, `read`, `read_bulk`, `run`, `search`, `search_and_write`, `search_or_write`, `write` | |
@@ -4136,6 +4138,7 @@ List all triggers for a specific app
4136
4138
  | ​ ↳ `description` | `string` | ✅ | — | |
4137
4139
  | ​ ↳ `is_important` | `boolean` | ❌ | — | |
4138
4140
  | ​ ↳ `is_hidden` | `boolean` | ❌ | — | |
4141
+ | ​ ↳ `permissions` | `object` | ❌ | — | |
4139
4142
  | ​ ↳ `app_key` | `string` | ✅ | — | |
4140
4143
  | ​ ↳ `app_version` | `string` | ❌ | — | |
4141
4144
  | ​ ↳ `action_type` | `string` | ✅ | `filter`, `read`, `read_bulk`, `run`, `search`, `search_and_write`, `search_or_write`, `write` | |
@@ -2818,7 +2818,7 @@ function logRouteOverride({
2818
2818
  }
2819
2819
 
2820
2820
  // src/sdk-version.ts
2821
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.112.4" : void 0) || "unknown";
2821
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.112.5" : void 0) || "unknown";
2822
2822
 
2823
2823
  // src/utils/open-url.ts
2824
2824
  var nodePrefix = "node:";
@@ -4397,6 +4397,7 @@ function normalizeActionItem(action) {
4397
4397
  description: action.description,
4398
4398
  is_important: action.is_important,
4399
4399
  is_hidden: action.is_hidden,
4400
+ permissions: action.permissions,
4400
4401
  // Transformed fields
4401
4402
  app_key: appKey,
4402
4403
  app_version: appVersion,
@@ -6656,9 +6657,7 @@ var NeedSchema = zod.z.object({
6656
6657
  zod.z.object({
6657
6658
  action_url: zod.z.string().optional()
6658
6659
  });
6659
- zod.z.object({
6660
- can_use: zod.z.boolean().optional()
6661
- });
6660
+ var ActionPermissionsSchema = zod.z.partialRecord(zod.z.string(), zod.z.boolean());
6662
6661
  var ActionSchema = zod.z.object({
6663
6662
  id: zod.z.string().optional(),
6664
6663
  type: zod.z.enum([
@@ -6676,7 +6675,8 @@ var ActionSchema = zod.z.object({
6676
6675
  description: zod.z.string(),
6677
6676
  is_important: zod.z.boolean().optional(),
6678
6677
  is_hidden: zod.z.boolean().optional(),
6679
- selected_api: zod.z.string().optional()
6678
+ selected_api: zod.z.string().optional(),
6679
+ permissions: ActionPermissionsSchema.optional()
6680
6680
  });
6681
6681
  var ChoiceSchema = zod.z.object({
6682
6682
  value: zod.z.union([zod.z.string(), zod.z.number()]),
@@ -2817,7 +2817,7 @@ function logRouteOverride({
2817
2817
  }
2818
2818
 
2819
2819
  // src/sdk-version.ts
2820
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.112.4" : void 0) || "unknown";
2820
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.112.5" : void 0) || "unknown";
2821
2821
 
2822
2822
  // src/utils/open-url.ts
2823
2823
  var nodePrefix = "node:";
@@ -4396,6 +4396,7 @@ function normalizeActionItem(action) {
4396
4396
  description: action.description,
4397
4397
  is_important: action.is_important,
4398
4398
  is_hidden: action.is_hidden,
4399
+ permissions: action.permissions,
4399
4400
  // Transformed fields
4400
4401
  app_key: appKey,
4401
4402
  app_version: appVersion,
@@ -6655,9 +6656,7 @@ var NeedSchema = z.object({
6655
6656
  z.object({
6656
6657
  action_url: z.string().optional()
6657
6658
  });
6658
- z.object({
6659
- can_use: z.boolean().optional()
6660
- });
6659
+ var ActionPermissionsSchema = z.partialRecord(z.string(), z.boolean());
6661
6660
  var ActionSchema = z.object({
6662
6661
  id: z.string().optional(),
6663
6662
  type: z.enum([
@@ -6675,7 +6674,8 @@ var ActionSchema = z.object({
6675
6674
  description: z.string(),
6676
6675
  is_important: z.boolean().optional(),
6677
6676
  is_hidden: z.boolean().optional(),
6678
- selected_api: z.string().optional()
6677
+ selected_api: z.string().optional(),
6678
+ permissions: ActionPermissionsSchema.optional()
6679
6679
  });
6680
6680
  var ChoiceSchema = z.object({
6681
6681
  value: z.union([z.string(), z.number()]),