@spotify/backstage-plugin-rbac-common 0.5.0 → 0.5.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 +6 -0
- package/dist/index.d.ts +25 -25
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ declare const PolicyDefaultName = "Untitled policy";
|
|
|
8
8
|
/** @public */
|
|
9
9
|
declare const BackstageUserPlaceholder = ":backstageUser";
|
|
10
10
|
/** @public */
|
|
11
|
-
|
|
11
|
+
type RBACPermissionCondition = Omit<PermissionCondition, 'resourceType'>;
|
|
12
12
|
/** @public */
|
|
13
13
|
declare const PermissionConditionParser: z.ZodSchema<RBACPermissionCondition>;
|
|
14
14
|
/** @public */
|
|
@@ -1450,32 +1450,32 @@ declare function isAnyOfPermissionCriteria(conditions: PermissionCriteria<RBACPe
|
|
|
1450
1450
|
/** @public */
|
|
1451
1451
|
declare function isNotPermissionCriteria(conditions: PermissionCriteria<RBACPermissionCondition>): conditions is NotCriteria<RBACPermissionCondition>;
|
|
1452
1452
|
/** @public */
|
|
1453
|
-
|
|
1453
|
+
type ConditionalDecision = z.infer<typeof ConditionalDecisionParser>;
|
|
1454
1454
|
/** @public */
|
|
1455
|
-
|
|
1455
|
+
type LiteralDecision = z.infer<typeof LiteralDecisionParser>;
|
|
1456
1456
|
/** @public */
|
|
1457
|
-
|
|
1457
|
+
type PermissionDecision = z.infer<typeof PermissionDecisionParser>;
|
|
1458
1458
|
/** @public */
|
|
1459
|
-
|
|
1459
|
+
type PermissionMatch = z.infer<typeof PermissionMatchParser>;
|
|
1460
1460
|
/** @public */
|
|
1461
|
-
|
|
1461
|
+
type RolePermission = z.infer<typeof RolePermissionParser>;
|
|
1462
1462
|
/** @public */
|
|
1463
|
-
|
|
1463
|
+
type RolePermissions = z.infer<typeof RolePermissionsParser>;
|
|
1464
1464
|
/** @public */
|
|
1465
|
-
|
|
1465
|
+
type RawRole = z.input<typeof RoleParser>;
|
|
1466
1466
|
/** @public */
|
|
1467
|
-
|
|
1467
|
+
type Role = z.infer<typeof RoleParser>;
|
|
1468
1468
|
/** @public */
|
|
1469
|
-
|
|
1469
|
+
type RawPolicyConfig = z.input<typeof PolicyConfigParser>;
|
|
1470
1470
|
/** @public */
|
|
1471
|
-
|
|
1471
|
+
type PolicyConfig = z.infer<typeof PolicyConfigParser>;
|
|
1472
1472
|
/** @public */
|
|
1473
|
-
|
|
1473
|
+
type PolicyRoleResolutionStrategy = z.infer<typeof PolicyRoleResolutionStrategyParser>;
|
|
1474
1474
|
/** @public */
|
|
1475
|
-
|
|
1475
|
+
type PolicyConfigOptions = z.infer<typeof PolicyConfigOptionsParser>;
|
|
1476
1476
|
|
|
1477
1477
|
/** @public */
|
|
1478
|
-
|
|
1478
|
+
type Policy = PolicyConfig & {
|
|
1479
1479
|
/**
|
|
1480
1480
|
* Internal ID for lookups/references.
|
|
1481
1481
|
*/
|
|
@@ -2177,43 +2177,43 @@ declare const PublishVersionRequestParser: z.ZodObject<{
|
|
|
2177
2177
|
description?: string | undefined;
|
|
2178
2178
|
}>;
|
|
2179
2179
|
/** @public */
|
|
2180
|
-
|
|
2180
|
+
type CreateDraftRequest = z.input<typeof CreateDraftRequestParser>;
|
|
2181
2181
|
/** @public */
|
|
2182
|
-
|
|
2182
|
+
type UpdateDraftRequest = z.input<typeof UpdateDraftRequestParser>;
|
|
2183
2183
|
/** @public */
|
|
2184
|
-
|
|
2184
|
+
type PublishVersionRequest = z.infer<typeof PublishVersionRequestParser>;
|
|
2185
2185
|
/** @public */
|
|
2186
|
-
|
|
2186
|
+
type SearchMembersRequest = {
|
|
2187
2187
|
query: string;
|
|
2188
2188
|
};
|
|
2189
2189
|
/** @public */
|
|
2190
|
-
|
|
2190
|
+
type AuthorizeResponse = {
|
|
2191
2191
|
authorized: boolean;
|
|
2192
2192
|
};
|
|
2193
2193
|
/** @public */
|
|
2194
|
-
|
|
2194
|
+
type MemberResponse = {
|
|
2195
2195
|
name?: string;
|
|
2196
2196
|
type: 'user' | 'group' | 'all' | 'unknown';
|
|
2197
2197
|
entityRef: string;
|
|
2198
2198
|
};
|
|
2199
2199
|
/** @public */
|
|
2200
|
-
|
|
2200
|
+
type PolicyMember = {
|
|
2201
2201
|
policyId: string;
|
|
2202
2202
|
members: MemberResponse[];
|
|
2203
2203
|
};
|
|
2204
2204
|
/** @public */
|
|
2205
|
-
|
|
2205
|
+
type SearchMembersResponse = {
|
|
2206
2206
|
members: MemberResponse[];
|
|
2207
2207
|
};
|
|
2208
2208
|
/** @public */
|
|
2209
|
-
|
|
2209
|
+
type PaginatedResponse<T> = {
|
|
2210
2210
|
items: T[];
|
|
2211
2211
|
nextCursor?: string;
|
|
2212
2212
|
prevCursor?: string;
|
|
2213
2213
|
totalItems: number;
|
|
2214
2214
|
};
|
|
2215
2215
|
/** @public */
|
|
2216
|
-
|
|
2216
|
+
type PoliciesResponse = PaginatedResponse<Policy>;
|
|
2217
2217
|
|
|
2218
2218
|
/** @public */
|
|
2219
2219
|
declare const isMatchingPermission: (permission: Permission, match: PermissionMatch) => boolean;
|
|
@@ -2228,7 +2228,7 @@ declare const isMatchingPermission: (permission: Permission, match: PermissionMa
|
|
|
2228
2228
|
declare const matchesEntityRef: (userClaim: CompoundEntityRef, policyMember: CompoundEntityRef) => boolean;
|
|
2229
2229
|
|
|
2230
2230
|
/** @public */
|
|
2231
|
-
|
|
2231
|
+
type MapParamsCallback = (param: PermissionRuleParam) => PermissionRuleParam;
|
|
2232
2232
|
/** @public */
|
|
2233
2233
|
declare function mapParams(params: PermissionRuleParams, cb: MapParamsCallback): PermissionRuleParams;
|
|
2234
2234
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotify/backstage-plugin-rbac-common",
|
|
3
3
|
"description": "Control access to actions and data in Backstage with ease.",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.1",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://backstage.spotify.com/",
|
|
7
7
|
"main": "dist/index.cjs.js",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"postpack": "backstage-cli package postpack"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@backstage/catalog-model": "^1.
|
|
27
|
-
"@backstage/plugin-permission-common": "^0.7.
|
|
26
|
+
"@backstage/catalog-model": "^1.3.0",
|
|
27
|
+
"@backstage/plugin-permission-common": "^0.7.5",
|
|
28
28
|
"@backstage/types": "^1.0.2",
|
|
29
29
|
"uuid": "^9.0.0",
|
|
30
30
|
"zod": "^3.20.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@backstage/cli": "^0.22.
|
|
33
|
+
"@backstage/cli": "^0.22.6"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|