@backstage/plugin-permission-common 0.8.0 → 0.8.1-next.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,15 @@
1
1
  # @backstage/plugin-permission-common
2
2
 
3
+ ## 0.8.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 137fa34: Add the MetadataResponseSerializedRule type from @backstage/plugin-permission-node, since this type might be used in frontend code.
8
+ - Updated dependencies
9
+ - @backstage/config@1.2.0
10
+ - @backstage/errors@1.2.4
11
+ - @backstage/types@1.1.1
12
+
3
13
  ## 0.8.0
4
14
 
5
15
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { JsonPrimitive } from '@backstage/types';
2
+ import zodToJsonSchema from 'zod-to-json-schema';
2
3
  import { Config } from '@backstage/config';
3
4
 
4
5
  /**
@@ -307,6 +308,19 @@ type DiscoveryApi = {
307
308
  getBaseUrl(pluginId: string): Promise<string>;
308
309
  };
309
310
 
311
+ /**
312
+ * Serialized permission rules, with the paramsSchema
313
+ * converted from a ZodSchema to a JsonSchema.
314
+ *
315
+ * @public
316
+ */
317
+ type MetadataResponseSerializedRule = {
318
+ name: string;
319
+ description: string;
320
+ resourceType: string;
321
+ paramsSchema?: ReturnType<typeof zodToJsonSchema>;
322
+ };
323
+
310
324
  /**
311
325
  * Check if the two parameters are equivalent permissions.
312
326
  * @public
@@ -398,4 +412,4 @@ declare class PermissionClient implements PermissionEvaluator {
398
412
  private getAuthorizationHeader;
399
413
  }
400
414
 
401
- export { type AllOfCriteria, type AnyOfCriteria, type AuthorizePermissionRequest, type AuthorizePermissionResponse, type AuthorizeRequestOptions, AuthorizeResult, type BasicPermission, type ConditionalPolicyDecision, type DefinitivePolicyDecision, type DiscoveryApi, type EvaluatePermissionRequest, type EvaluatePermissionRequestBatch, type EvaluatePermissionResponse, type EvaluatePermissionResponseBatch, type EvaluatorRequestOptions, type IdentifiedPermissionMessage, type NotCriteria, type Permission, type PermissionAttributes, type PermissionAuthorizer, type PermissionBase, PermissionClient, type PermissionClientRequestOptions, type PermissionCondition, type PermissionCriteria, type PermissionEvaluator, type PermissionMessageBatch, type PermissionRuleParam, type PermissionRuleParams, type PolicyDecision, type QueryPermissionRequest, type QueryPermissionResponse, type ResourcePermission, createPermission, isCreatePermission, isDeletePermission, isPermission, isReadPermission, isResourcePermission, isUpdatePermission, toPermissionEvaluator };
415
+ export { type AllOfCriteria, type AnyOfCriteria, type AuthorizePermissionRequest, type AuthorizePermissionResponse, type AuthorizeRequestOptions, AuthorizeResult, type BasicPermission, type ConditionalPolicyDecision, type DefinitivePolicyDecision, type DiscoveryApi, type EvaluatePermissionRequest, type EvaluatePermissionRequestBatch, type EvaluatePermissionResponse, type EvaluatePermissionResponseBatch, type EvaluatorRequestOptions, type IdentifiedPermissionMessage, type MetadataResponseSerializedRule, type NotCriteria, type Permission, type PermissionAttributes, type PermissionAuthorizer, type PermissionBase, PermissionClient, type PermissionClientRequestOptions, type PermissionCondition, type PermissionCriteria, type PermissionEvaluator, type PermissionMessageBatch, type PermissionRuleParam, type PermissionRuleParams, type PolicyDecision, type QueryPermissionRequest, type QueryPermissionResponse, type ResourcePermission, createPermission, isCreatePermission, isDeletePermission, isPermission, isReadPermission, isResourcePermission, isUpdatePermission, toPermissionEvaluator };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-permission-common",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-next.0",
4
4
  "description": "Isomorphic types and client for Backstage permissions and authorization",
5
5
  "backstage": {
6
6
  "role": "common-library",
@@ -53,10 +53,11 @@
53
53
  "@backstage/types": "^1.1.1",
54
54
  "cross-fetch": "^4.0.0",
55
55
  "uuid": "^9.0.0",
56
- "zod": "^3.22.4"
56
+ "zod": "^3.22.4",
57
+ "zod-to-json-schema": "^3.20.4"
57
58
  },
58
59
  "devDependencies": {
59
- "@backstage/cli": "^0.26.11",
60
+ "@backstage/cli": "^0.27.0-next.1",
60
61
  "msw": "^1.0.0"
61
62
  },
62
63
  "configSchema": "config.d.ts",