@backstage/plugin-permission-common 0.8.0 → 0.8.1-next.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 +21 -0
- package/dist/index.d.ts +25 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @backstage/plugin-permission-common
|
|
2
2
|
|
|
3
|
+
## 0.8.1-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- df784fe: Add the MetadataResponse type from @backstage/plugin-permission-node, since this
|
|
8
|
+
type might be used in frontend code.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/config@1.2.0
|
|
11
|
+
- @backstage/errors@1.2.4
|
|
12
|
+
- @backstage/types@1.1.1
|
|
13
|
+
|
|
14
|
+
## 0.8.1-next.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 137fa34: Add the MetadataResponseSerializedRule type from @backstage/plugin-permission-node, since this type might be used in frontend code.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/config@1.2.0
|
|
21
|
+
- @backstage/errors@1.2.4
|
|
22
|
+
- @backstage/types@1.1.1
|
|
23
|
+
|
|
3
24
|
## 0.8.0
|
|
4
25
|
|
|
5
26
|
### 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,29 @@ 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
|
+
/**
|
|
324
|
+
* Response type for the .metadata endpoint in
|
|
325
|
+
* {@link @backstage/plugin-permission-node#createPermissionIntegrationRouter}
|
|
326
|
+
*
|
|
327
|
+
* @public
|
|
328
|
+
*/
|
|
329
|
+
type MetadataResponse = {
|
|
330
|
+
permissions?: Permission[];
|
|
331
|
+
rules: MetadataResponseSerializedRule[];
|
|
332
|
+
};
|
|
333
|
+
|
|
310
334
|
/**
|
|
311
335
|
* Check if the two parameters are equivalent permissions.
|
|
312
336
|
* @public
|
|
@@ -398,4 +422,4 @@ declare class PermissionClient implements PermissionEvaluator {
|
|
|
398
422
|
private getAuthorizationHeader;
|
|
399
423
|
}
|
|
400
424
|
|
|
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 };
|
|
425
|
+
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 MetadataResponse, 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.
|
|
3
|
+
"version": "0.8.1-next.1",
|
|
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.
|
|
60
|
+
"@backstage/cli": "^0.27.0-next.3",
|
|
60
61
|
"msw": "^1.0.0"
|
|
61
62
|
},
|
|
62
63
|
"configSchema": "config.d.ts",
|