@spotify/backstage-plugin-rbac-common 0.6.5 → 0.6.6

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,13 @@
1
1
  # @spotify/backstage-plugin-rbac-common
2
2
 
3
+ ## 0.6.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Update to Backstage `v1.36.0`
8
+ - The role members table and members search now shows entity display names instead of refs when available.
9
+ - Added the ability to provide descriptions for roles.
10
+
3
11
  ## 0.6.5
4
12
 
5
13
  ### Patch Changes
package/dist/api.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("zod"),s=require("./permissionSchema.cjs.js"),r=require("./schema.cjs.js");const a=r.PolicyConfigParser,o=r.PolicyConfigParser.extend({name:r.PolicyTitleParser.optional(),options:r.PolicyConfigOptionsParser.optional(),roles:r.RolesParser.optional()}),t=e.z.object({description:e.z.string().optional(),update:o.optional()}),n=e.z.object({decision:s.PolicyDecisionParser,decisionOrigin:e.z.array(r.RoleDecisionParser)}),P=e.z.object({permission:s.PermissionParser,policyConfig:r.PolicyConfigParser,roleIds:e.z.array(e.z.string())}),c=e.z.object({id:e.z.string()}),l=e.z.object({authorized:e.z.boolean()}),i=e.z.object({name:e.z.string().optional(),type:e.z.enum(["user","group","all","unknown"]),entityRef:e.z.string()}),p=e.z.object({members:e.z.array(i)}),z=e.z.object({items:e.z.array(r.PolicyParser),nextCursor:e.z.string().optional(),prevCursor:e.z.string().optional(),totalItems:e.z.number()});exports.AuthorizeResponseParser=l,exports.CreateDraftRequestParser=a,exports.DraftResponseParser=c,exports.MemberResponseParser=i,exports.PolicyResponseParser=z,exports.PublishVersionRequestParser=t,exports.SearchMemberResponseParser=p,exports.TestPolicyDecisionRequestParser=P,exports.TestPolicyDecisionResponseParser=n,exports.UpdateDraftRequestParser=o;
1
+ "use strict";var e=require("zod"),s=require("./permissionSchema.cjs.js"),r=require("./schema.cjs.js");const a=r.PolicyConfigParser,o=r.PolicyConfigParser.extend({name:r.PolicyTitleParser.optional(),options:r.PolicyConfigOptionsParser.optional(),roles:r.RolesParser.optional()}),t=e.z.object({description:e.z.string().optional(),update:o.optional()}),n=e.z.object({decision:s.PolicyDecisionParser,decisionOrigin:e.z.array(r.RoleDecisionParser)}),P=e.z.object({permission:s.PermissionParser,policyConfig:r.PolicyConfigParser,roleIds:e.z.array(e.z.string())}),p=e.z.object({id:e.z.string()}),c=e.z.object({authorized:e.z.boolean()}),i=e.z.object({name:e.z.string().optional(),namespace:e.z.string().optional(),description:e.z.string().optional(),type:e.z.enum(["user","group","all","unknown"]),entityRef:e.z.string(),spec:e.z.object({type:e.z.string().optional(),profile:e.z.object({displayName:e.z.string().optional()}).optional()}).optional()}),l=e.z.object({members:e.z.array(i)}),z=e.z.object({items:e.z.array(r.PolicyParser),nextCursor:e.z.string().optional(),prevCursor:e.z.string().optional(),totalItems:e.z.number()});exports.AuthorizeResponseParser=c,exports.CreateDraftRequestParser=a,exports.DraftResponseParser=p,exports.MemberResponseParser=i,exports.PolicyResponseParser=z,exports.PublishVersionRequestParser=t,exports.SearchMemberResponseParser=l,exports.TestPolicyDecisionRequestParser=P,exports.TestPolicyDecisionResponseParser=n,exports.UpdateDraftRequestParser=o;
2
2
  //# sourceMappingURL=api.cjs.js.map
package/dist/api.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import{z as e}from"zod";import{PolicyDecisionParser as i,PermissionParser as t}from"./permissionSchema.esm.js";import{PolicyConfigParser as r,PolicyTitleParser as n,PolicyConfigOptionsParser as a,RolesParser as p,RoleDecisionParser as P,PolicyParser as l}from"./schema.esm.js";const c=r,o=r.extend({name:n.optional(),options:a.optional(),roles:p.optional()}),m=e.object({description:e.string().optional(),update:o.optional()}),u=e.object({decision:i,decisionOrigin:e.array(P)}),y=e.object({permission:t,policyConfig:r,roleIds:e.array(e.string())}),b=e.object({id:e.string()}),R=e.object({authorized:e.boolean()}),s=e.object({name:e.string().optional(),type:e.enum(["user","group","all","unknown"]),entityRef:e.string()}),g=e.object({members:e.array(s)}),f=e.object({items:e.array(l),nextCursor:e.string().optional(),prevCursor:e.string().optional(),totalItems:e.number()});export{R as AuthorizeResponseParser,c as CreateDraftRequestParser,b as DraftResponseParser,s as MemberResponseParser,f as PolicyResponseParser,m as PublishVersionRequestParser,g as SearchMemberResponseParser,y as TestPolicyDecisionRequestParser,u as TestPolicyDecisionResponseParser,o as UpdateDraftRequestParser};
1
+ import{z as e}from"zod";import{PolicyDecisionParser as i,PermissionParser as t}from"./permissionSchema.esm.js";import{PolicyConfigParser as o,PolicyTitleParser as n,PolicyConfigOptionsParser as a,RolesParser as p,RoleDecisionParser as l,PolicyParser as c}from"./schema.esm.js";const P=o,r=o.extend({name:n.optional(),options:a.optional(),roles:p.optional()}),m=e.object({description:e.string().optional(),update:r.optional()}),y=e.object({decision:i,decisionOrigin:e.array(l)}),b=e.object({permission:t,policyConfig:o,roleIds:e.array(e.string())}),g=e.object({id:e.string()}),u=e.object({authorized:e.boolean()}),s=e.object({name:e.string().optional(),namespace:e.string().optional(),description:e.string().optional(),type:e.enum(["user","group","all","unknown"]),entityRef:e.string(),spec:e.object({type:e.string().optional(),profile:e.object({displayName:e.string().optional()}).optional()}).optional()}),R=e.object({members:e.array(s)}),d=e.object({items:e.array(c),nextCursor:e.string().optional(),prevCursor:e.string().optional(),totalItems:e.number()});export{u as AuthorizeResponseParser,P as CreateDraftRequestParser,g as DraftResponseParser,s as MemberResponseParser,d as PolicyResponseParser,m as PublishVersionRequestParser,R as SearchMemberResponseParser,b as TestPolicyDecisionRequestParser,y as TestPolicyDecisionResponseParser,r as UpdateDraftRequestParser};
2
2
  //# sourceMappingURL=api.esm.js.map
package/dist/index.d.ts CHANGED
@@ -239,6 +239,7 @@ declare const RolePermissionsParser: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodO
239
239
  /** @public */
240
240
  declare const RoleParser: z.ZodObject<{
241
241
  name: z.ZodString;
242
+ description: z.ZodOptional<z.ZodString>;
242
243
  id: z.ZodDefault<z.ZodString>;
243
244
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
244
245
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -359,6 +360,7 @@ declare const RoleParser: z.ZodObject<{
359
360
  resourceType: string;
360
361
  } | "deny";
361
362
  }[];
363
+ description?: string | undefined;
362
364
  }, {
363
365
  name: string;
364
366
  members: string[] | "*";
@@ -376,10 +378,12 @@ declare const RoleParser: z.ZodObject<{
376
378
  id?: string | undefined;
377
379
  }[];
378
380
  id?: string | undefined;
381
+ description?: string | undefined;
379
382
  }>;
380
383
  /** @public */
381
384
  declare const RolesParser: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
382
385
  name: z.ZodString;
386
+ description: z.ZodOptional<z.ZodString>;
383
387
  id: z.ZodDefault<z.ZodString>;
384
388
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
385
389
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -500,6 +504,7 @@ declare const RolesParser: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
500
504
  resourceType: string;
501
505
  } | "deny";
502
506
  }[];
507
+ description?: string | undefined;
503
508
  }, {
504
509
  name: string;
505
510
  members: string[] | "*";
@@ -517,6 +522,7 @@ declare const RolesParser: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
517
522
  id?: string | undefined;
518
523
  }[];
519
524
  id?: string | undefined;
525
+ description?: string | undefined;
520
526
  }>, "many">>, {
521
527
  id: string;
522
528
  name: string;
@@ -534,6 +540,7 @@ declare const RolesParser: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
534
540
  resourceType: string;
535
541
  } | "deny";
536
542
  }[];
543
+ description?: string | undefined;
537
544
  }[], {
538
545
  name: string;
539
546
  members: string[] | "*";
@@ -551,6 +558,7 @@ declare const RolesParser: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
551
558
  id?: string | undefined;
552
559
  }[];
553
560
  id?: string | undefined;
561
+ description?: string | undefined;
554
562
  }[] | undefined>;
555
563
  /** @public */
556
564
  declare const RoleDecisionParser: z.ZodObject<{
@@ -610,6 +618,7 @@ declare const PolicyConfigParser: z.ZodObject<{
610
618
  }>>;
611
619
  roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
612
620
  name: z.ZodString;
621
+ description: z.ZodOptional<z.ZodString>;
613
622
  id: z.ZodDefault<z.ZodString>;
614
623
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
615
624
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -730,6 +739,7 @@ declare const PolicyConfigParser: z.ZodObject<{
730
739
  resourceType: string;
731
740
  } | "deny";
732
741
  }[];
742
+ description?: string | undefined;
733
743
  }, {
734
744
  name: string;
735
745
  members: string[] | "*";
@@ -747,6 +757,7 @@ declare const PolicyConfigParser: z.ZodObject<{
747
757
  id?: string | undefined;
748
758
  }[];
749
759
  id?: string | undefined;
760
+ description?: string | undefined;
750
761
  }>, "many">>, {
751
762
  id: string;
752
763
  name: string;
@@ -764,6 +775,7 @@ declare const PolicyConfigParser: z.ZodObject<{
764
775
  resourceType: string;
765
776
  } | "deny";
766
777
  }[];
778
+ description?: string | undefined;
767
779
  }[], {
768
780
  name: string;
769
781
  members: string[] | "*";
@@ -781,6 +793,7 @@ declare const PolicyConfigParser: z.ZodObject<{
781
793
  id?: string | undefined;
782
794
  }[];
783
795
  id?: string | undefined;
796
+ description?: string | undefined;
784
797
  }[] | undefined>;
785
798
  }, "strip", z.ZodTypeAny, {
786
799
  name: string;
@@ -804,6 +817,7 @@ declare const PolicyConfigParser: z.ZodObject<{
804
817
  resourceType: string;
805
818
  } | "deny";
806
819
  }[];
820
+ description?: string | undefined;
807
821
  }[];
808
822
  }, {
809
823
  name?: string | undefined;
@@ -827,6 +841,7 @@ declare const PolicyConfigParser: z.ZodObject<{
827
841
  id?: string | undefined;
828
842
  }[];
829
843
  id?: string | undefined;
844
+ description?: string | undefined;
830
845
  }[] | undefined;
831
846
  }>;
832
847
  /** @public */
@@ -841,6 +856,7 @@ declare const DefaultingPolicyConfigParser: z.ZodDefault<z.ZodObject<{
841
856
  }>>;
842
857
  roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
843
858
  name: z.ZodString;
859
+ description: z.ZodOptional<z.ZodString>;
844
860
  id: z.ZodDefault<z.ZodString>;
845
861
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
846
862
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -961,6 +977,7 @@ declare const DefaultingPolicyConfigParser: z.ZodDefault<z.ZodObject<{
961
977
  resourceType: string;
962
978
  } | "deny";
963
979
  }[];
980
+ description?: string | undefined;
964
981
  }, {
965
982
  name: string;
966
983
  members: string[] | "*";
@@ -978,6 +995,7 @@ declare const DefaultingPolicyConfigParser: z.ZodDefault<z.ZodObject<{
978
995
  id?: string | undefined;
979
996
  }[];
980
997
  id?: string | undefined;
998
+ description?: string | undefined;
981
999
  }>, "many">>, {
982
1000
  id: string;
983
1001
  name: string;
@@ -995,6 +1013,7 @@ declare const DefaultingPolicyConfigParser: z.ZodDefault<z.ZodObject<{
995
1013
  resourceType: string;
996
1014
  } | "deny";
997
1015
  }[];
1016
+ description?: string | undefined;
998
1017
  }[], {
999
1018
  name: string;
1000
1019
  members: string[] | "*";
@@ -1012,6 +1031,7 @@ declare const DefaultingPolicyConfigParser: z.ZodDefault<z.ZodObject<{
1012
1031
  id?: string | undefined;
1013
1032
  }[];
1014
1033
  id?: string | undefined;
1034
+ description?: string | undefined;
1015
1035
  }[] | undefined>;
1016
1036
  }, "strip", z.ZodTypeAny, {
1017
1037
  name: string;
@@ -1035,6 +1055,7 @@ declare const DefaultingPolicyConfigParser: z.ZodDefault<z.ZodObject<{
1035
1055
  resourceType: string;
1036
1056
  } | "deny";
1037
1057
  }[];
1058
+ description?: string | undefined;
1038
1059
  }[];
1039
1060
  }, {
1040
1061
  name?: string | undefined;
@@ -1058,6 +1079,7 @@ declare const DefaultingPolicyConfigParser: z.ZodDefault<z.ZodObject<{
1058
1079
  id?: string | undefined;
1059
1080
  }[];
1060
1081
  id?: string | undefined;
1082
+ description?: string | undefined;
1061
1083
  }[] | undefined;
1062
1084
  }>>;
1063
1085
  /** @public */
@@ -1080,6 +1102,7 @@ declare const PolicyParser: z.ZodObject<z.objectUtil.extendShape<{
1080
1102
  }>>;
1081
1103
  roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
1082
1104
  name: z.ZodString;
1105
+ description: z.ZodOptional<z.ZodString>;
1083
1106
  id: z.ZodDefault<z.ZodString>;
1084
1107
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
1085
1108
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -1200,6 +1223,7 @@ declare const PolicyParser: z.ZodObject<z.objectUtil.extendShape<{
1200
1223
  resourceType: string;
1201
1224
  } | "deny";
1202
1225
  }[];
1226
+ description?: string | undefined;
1203
1227
  }, {
1204
1228
  name: string;
1205
1229
  members: string[] | "*";
@@ -1217,6 +1241,7 @@ declare const PolicyParser: z.ZodObject<z.objectUtil.extendShape<{
1217
1241
  id?: string | undefined;
1218
1242
  }[];
1219
1243
  id?: string | undefined;
1244
+ description?: string | undefined;
1220
1245
  }>, "many">>, {
1221
1246
  id: string;
1222
1247
  name: string;
@@ -1234,6 +1259,7 @@ declare const PolicyParser: z.ZodObject<z.objectUtil.extendShape<{
1234
1259
  resourceType: string;
1235
1260
  } | "deny";
1236
1261
  }[];
1262
+ description?: string | undefined;
1237
1263
  }[], {
1238
1264
  name: string;
1239
1265
  members: string[] | "*";
@@ -1251,6 +1277,7 @@ declare const PolicyParser: z.ZodObject<z.objectUtil.extendShape<{
1251
1277
  id?: string | undefined;
1252
1278
  }[];
1253
1279
  id?: string | undefined;
1280
+ description?: string | undefined;
1254
1281
  }[] | undefined>;
1255
1282
  }, {
1256
1283
  /**
@@ -1315,6 +1342,7 @@ declare const PolicyParser: z.ZodObject<z.objectUtil.extendShape<{
1315
1342
  resourceType: string;
1316
1343
  } | "deny";
1317
1344
  }[];
1345
+ description?: string | undefined;
1318
1346
  }[];
1319
1347
  createdBy: string;
1320
1348
  updatedBy: string;
@@ -1350,6 +1378,7 @@ declare const PolicyParser: z.ZodObject<z.objectUtil.extendShape<{
1350
1378
  id?: string | undefined;
1351
1379
  }[];
1352
1380
  id?: string | undefined;
1381
+ description?: string | undefined;
1353
1382
  }[] | undefined;
1354
1383
  lastPublishedAt?: string | null | undefined;
1355
1384
  lastPublishedBy?: string | null | undefined;
@@ -1395,6 +1424,7 @@ declare const CreateDraftRequestParser: z.ZodObject<{
1395
1424
  }>>;
1396
1425
  roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
1397
1426
  name: z.ZodString;
1427
+ description: z.ZodOptional<z.ZodString>;
1398
1428
  id: z.ZodDefault<z.ZodString>;
1399
1429
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
1400
1430
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -1402,7 +1432,7 @@ declare const CreateDraftRequestParser: z.ZodObject<{
1402
1432
  match: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodObject<{
1403
1433
  name: z.ZodOptional<z.ZodString>;
1404
1434
  actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1405
- resourceType: z.ZodOptional<z.ZodString>;
1435
+ resourceType: z.ZodOptional<z.ZodString>; /** @public */
1406
1436
  }, "strip", z.ZodTypeAny, {
1407
1437
  name?: string | undefined;
1408
1438
  actions?: string[] | undefined;
@@ -1515,6 +1545,7 @@ declare const CreateDraftRequestParser: z.ZodObject<{
1515
1545
  resourceType: string;
1516
1546
  } | "deny";
1517
1547
  }[];
1548
+ description?: string | undefined;
1518
1549
  }, {
1519
1550
  name: string;
1520
1551
  members: string[] | "*";
@@ -1532,6 +1563,7 @@ declare const CreateDraftRequestParser: z.ZodObject<{
1532
1563
  id?: string | undefined;
1533
1564
  }[];
1534
1565
  id?: string | undefined;
1566
+ description?: string | undefined;
1535
1567
  }>, "many">>, {
1536
1568
  id: string;
1537
1569
  name: string;
@@ -1549,6 +1581,7 @@ declare const CreateDraftRequestParser: z.ZodObject<{
1549
1581
  resourceType: string;
1550
1582
  } | "deny";
1551
1583
  }[];
1584
+ description?: string | undefined;
1552
1585
  }[], {
1553
1586
  name: string;
1554
1587
  members: string[] | "*";
@@ -1566,6 +1599,7 @@ declare const CreateDraftRequestParser: z.ZodObject<{
1566
1599
  id?: string | undefined;
1567
1600
  }[];
1568
1601
  id?: string | undefined;
1602
+ description?: string | undefined;
1569
1603
  }[] | undefined>;
1570
1604
  }, "strip", z.ZodTypeAny, {
1571
1605
  name: string;
@@ -1589,6 +1623,7 @@ declare const CreateDraftRequestParser: z.ZodObject<{
1589
1623
  resourceType: string;
1590
1624
  } | "deny";
1591
1625
  }[];
1626
+ description?: string | undefined;
1592
1627
  }[];
1593
1628
  }, {
1594
1629
  name?: string | undefined;
@@ -1612,6 +1647,7 @@ declare const CreateDraftRequestParser: z.ZodObject<{
1612
1647
  id?: string | undefined;
1613
1648
  }[];
1614
1649
  id?: string | undefined;
1650
+ description?: string | undefined;
1615
1651
  }[] | undefined;
1616
1652
  }>;
1617
1653
  /** @public */
@@ -1626,6 +1662,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1626
1662
  }>>;
1627
1663
  roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
1628
1664
  name: z.ZodString;
1665
+ description: z.ZodOptional<z.ZodString>;
1629
1666
  id: z.ZodDefault<z.ZodString>;
1630
1667
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
1631
1668
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -1633,7 +1670,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1633
1670
  match: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodObject<{
1634
1671
  name: z.ZodOptional<z.ZodString>;
1635
1672
  actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1636
- resourceType: z.ZodOptional<z.ZodString>;
1673
+ resourceType: z.ZodOptional<z.ZodString>; /** @public */
1637
1674
  }, "strip", z.ZodTypeAny, {
1638
1675
  name?: string | undefined;
1639
1676
  actions?: string[] | undefined;
@@ -1746,6 +1783,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1746
1783
  resourceType: string;
1747
1784
  } | "deny";
1748
1785
  }[];
1786
+ description?: string | undefined;
1749
1787
  }, {
1750
1788
  name: string;
1751
1789
  members: string[] | "*";
@@ -1763,6 +1801,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1763
1801
  id?: string | undefined;
1764
1802
  }[];
1765
1803
  id?: string | undefined;
1804
+ description?: string | undefined;
1766
1805
  }>, "many">>, {
1767
1806
  id: string;
1768
1807
  name: string;
@@ -1780,6 +1819,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1780
1819
  resourceType: string;
1781
1820
  } | "deny";
1782
1821
  }[];
1822
+ description?: string | undefined;
1783
1823
  }[], {
1784
1824
  name: string;
1785
1825
  members: string[] | "*";
@@ -1797,6 +1837,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1797
1837
  id?: string | undefined;
1798
1838
  }[];
1799
1839
  id?: string | undefined;
1840
+ description?: string | undefined;
1800
1841
  }[] | undefined>;
1801
1842
  }, {
1802
1843
  name: z.ZodOptional<z.ZodDefault<z.ZodString>>;
@@ -1809,6 +1850,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1809
1850
  }>>>;
1810
1851
  roles: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
1811
1852
  name: z.ZodString;
1853
+ description: z.ZodOptional<z.ZodString>;
1812
1854
  id: z.ZodDefault<z.ZodString>;
1813
1855
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
1814
1856
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -1816,7 +1858,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1816
1858
  match: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodObject<{
1817
1859
  name: z.ZodOptional<z.ZodString>;
1818
1860
  actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1819
- resourceType: z.ZodOptional<z.ZodString>;
1861
+ resourceType: z.ZodOptional<z.ZodString>; /** @public */
1820
1862
  }, "strip", z.ZodTypeAny, {
1821
1863
  name?: string | undefined;
1822
1864
  actions?: string[] | undefined;
@@ -1929,6 +1971,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1929
1971
  resourceType: string;
1930
1972
  } | "deny";
1931
1973
  }[];
1974
+ description?: string | undefined;
1932
1975
  }, {
1933
1976
  name: string;
1934
1977
  members: string[] | "*";
@@ -1946,6 +1989,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1946
1989
  id?: string | undefined;
1947
1990
  }[];
1948
1991
  id?: string | undefined;
1992
+ description?: string | undefined;
1949
1993
  }>, "many">>, {
1950
1994
  id: string;
1951
1995
  name: string;
@@ -1963,6 +2007,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1963
2007
  resourceType: string;
1964
2008
  } | "deny";
1965
2009
  }[];
2010
+ description?: string | undefined;
1966
2011
  }[], {
1967
2012
  name: string;
1968
2013
  members: string[] | "*";
@@ -1980,6 +2025,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
1980
2025
  id?: string | undefined;
1981
2026
  }[];
1982
2027
  id?: string | undefined;
2028
+ description?: string | undefined;
1983
2029
  }[] | undefined>>;
1984
2030
  }>, "strip", z.ZodTypeAny, {
1985
2031
  name?: string | undefined;
@@ -2003,6 +2049,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
2003
2049
  resourceType: string;
2004
2050
  } | "deny";
2005
2051
  }[];
2052
+ description?: string | undefined;
2006
2053
  }[] | undefined;
2007
2054
  }, {
2008
2055
  name?: string | undefined;
@@ -2026,6 +2073,7 @@ declare const UpdateDraftRequestParser: z.ZodObject<z.objectUtil.extendShape<{
2026
2073
  id?: string | undefined;
2027
2074
  }[];
2028
2075
  id?: string | undefined;
2076
+ description?: string | undefined;
2029
2077
  }[] | undefined;
2030
2078
  }>;
2031
2079
  /** @public */
@@ -2042,6 +2090,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2042
2090
  }>>;
2043
2091
  roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
2044
2092
  name: z.ZodString;
2093
+ description: z.ZodOptional<z.ZodString>;
2045
2094
  id: z.ZodDefault<z.ZodString>;
2046
2095
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
2047
2096
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -2049,7 +2098,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2049
2098
  match: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodObject<{
2050
2099
  name: z.ZodOptional<z.ZodString>;
2051
2100
  actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2052
- resourceType: z.ZodOptional<z.ZodString>;
2101
+ resourceType: z.ZodOptional<z.ZodString>; /** @public */
2053
2102
  }, "strip", z.ZodTypeAny, {
2054
2103
  name?: string | undefined;
2055
2104
  actions?: string[] | undefined;
@@ -2162,6 +2211,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2162
2211
  resourceType: string;
2163
2212
  } | "deny";
2164
2213
  }[];
2214
+ description?: string | undefined;
2165
2215
  }, {
2166
2216
  name: string;
2167
2217
  members: string[] | "*";
@@ -2179,6 +2229,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2179
2229
  id?: string | undefined;
2180
2230
  }[];
2181
2231
  id?: string | undefined;
2232
+ description?: string | undefined;
2182
2233
  }>, "many">>, {
2183
2234
  id: string;
2184
2235
  name: string;
@@ -2196,6 +2247,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2196
2247
  resourceType: string;
2197
2248
  } | "deny";
2198
2249
  }[];
2250
+ description?: string | undefined;
2199
2251
  }[], {
2200
2252
  name: string;
2201
2253
  members: string[] | "*";
@@ -2213,6 +2265,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2213
2265
  id?: string | undefined;
2214
2266
  }[];
2215
2267
  id?: string | undefined;
2268
+ description?: string | undefined;
2216
2269
  }[] | undefined>;
2217
2270
  }, {
2218
2271
  name: z.ZodOptional<z.ZodDefault<z.ZodString>>;
@@ -2225,6 +2278,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2225
2278
  }>>>;
2226
2279
  roles: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
2227
2280
  name: z.ZodString;
2281
+ description: z.ZodOptional<z.ZodString>;
2228
2282
  id: z.ZodDefault<z.ZodString>;
2229
2283
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
2230
2284
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -2232,7 +2286,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2232
2286
  match: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodObject<{
2233
2287
  name: z.ZodOptional<z.ZodString>;
2234
2288
  actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2235
- resourceType: z.ZodOptional<z.ZodString>;
2289
+ resourceType: z.ZodOptional<z.ZodString>; /** @public */
2236
2290
  }, "strip", z.ZodTypeAny, {
2237
2291
  name?: string | undefined;
2238
2292
  actions?: string[] | undefined;
@@ -2345,6 +2399,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2345
2399
  resourceType: string;
2346
2400
  } | "deny";
2347
2401
  }[];
2402
+ description?: string | undefined;
2348
2403
  }, {
2349
2404
  name: string;
2350
2405
  members: string[] | "*";
@@ -2362,6 +2417,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2362
2417
  id?: string | undefined;
2363
2418
  }[];
2364
2419
  id?: string | undefined;
2420
+ description?: string | undefined;
2365
2421
  }>, "many">>, {
2366
2422
  id: string;
2367
2423
  name: string;
@@ -2379,6 +2435,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2379
2435
  resourceType: string;
2380
2436
  } | "deny";
2381
2437
  }[];
2438
+ description?: string | undefined;
2382
2439
  }[], {
2383
2440
  name: string;
2384
2441
  members: string[] | "*";
@@ -2396,6 +2453,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2396
2453
  id?: string | undefined;
2397
2454
  }[];
2398
2455
  id?: string | undefined;
2456
+ description?: string | undefined;
2399
2457
  }[] | undefined>>;
2400
2458
  }>, "strip", z.ZodTypeAny, {
2401
2459
  name?: string | undefined;
@@ -2419,6 +2477,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2419
2477
  resourceType: string;
2420
2478
  } | "deny";
2421
2479
  }[];
2480
+ description?: string | undefined;
2422
2481
  }[] | undefined;
2423
2482
  }, {
2424
2483
  name?: string | undefined;
@@ -2442,6 +2501,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2442
2501
  id?: string | undefined;
2443
2502
  }[];
2444
2503
  id?: string | undefined;
2504
+ description?: string | undefined;
2445
2505
  }[] | undefined;
2446
2506
  }>>;
2447
2507
  }, "strip", z.ZodTypeAny, {
@@ -2468,6 +2528,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2468
2528
  resourceType: string;
2469
2529
  } | "deny";
2470
2530
  }[];
2531
+ description?: string | undefined;
2471
2532
  }[] | undefined;
2472
2533
  } | undefined;
2473
2534
  }, {
@@ -2494,6 +2555,7 @@ declare const PublishVersionRequestParser: z.ZodObject<{
2494
2555
  id?: string | undefined;
2495
2556
  }[];
2496
2557
  id?: string | undefined;
2558
+ description?: string | undefined;
2497
2559
  }[] | undefined;
2498
2560
  } | undefined;
2499
2561
  }>;
@@ -2634,6 +2696,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2634
2696
  }>>;
2635
2697
  roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
2636
2698
  name: z.ZodString;
2699
+ description: z.ZodOptional<z.ZodString>;
2637
2700
  id: z.ZodDefault<z.ZodString>;
2638
2701
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
2639
2702
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -2641,7 +2704,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2641
2704
  match: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodObject<{
2642
2705
  name: z.ZodOptional<z.ZodString>;
2643
2706
  actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2644
- resourceType: z.ZodOptional<z.ZodString>;
2707
+ resourceType: z.ZodOptional<z.ZodString>; /** @public */
2645
2708
  }, "strip", z.ZodTypeAny, {
2646
2709
  name?: string | undefined;
2647
2710
  actions?: string[] | undefined;
@@ -2754,6 +2817,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2754
2817
  resourceType: string;
2755
2818
  } | "deny";
2756
2819
  }[];
2820
+ description?: string | undefined;
2757
2821
  }, {
2758
2822
  name: string;
2759
2823
  members: string[] | "*";
@@ -2771,6 +2835,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2771
2835
  id?: string | undefined;
2772
2836
  }[];
2773
2837
  id?: string | undefined;
2838
+ description?: string | undefined;
2774
2839
  }>, "many">>, {
2775
2840
  id: string;
2776
2841
  name: string;
@@ -2788,6 +2853,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2788
2853
  resourceType: string;
2789
2854
  } | "deny";
2790
2855
  }[];
2856
+ description?: string | undefined;
2791
2857
  }[], {
2792
2858
  name: string;
2793
2859
  members: string[] | "*";
@@ -2805,6 +2871,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2805
2871
  id?: string | undefined;
2806
2872
  }[];
2807
2873
  id?: string | undefined;
2874
+ description?: string | undefined;
2808
2875
  }[] | undefined>;
2809
2876
  }, "strip", z.ZodTypeAny, {
2810
2877
  name: string;
@@ -2828,6 +2895,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2828
2895
  resourceType: string;
2829
2896
  } | "deny";
2830
2897
  }[];
2898
+ description?: string | undefined;
2831
2899
  }[];
2832
2900
  }, {
2833
2901
  name?: string | undefined;
@@ -2851,6 +2919,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2851
2919
  id?: string | undefined;
2852
2920
  }[];
2853
2921
  id?: string | undefined;
2922
+ description?: string | undefined;
2854
2923
  }[] | undefined;
2855
2924
  }>;
2856
2925
  roleIds: z.ZodArray<z.ZodString, "many">;
@@ -2887,6 +2956,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2887
2956
  resourceType: string;
2888
2957
  } | "deny";
2889
2958
  }[];
2959
+ description?: string | undefined;
2890
2960
  }[];
2891
2961
  };
2892
2962
  roleIds: string[];
@@ -2923,6 +2993,7 @@ declare const TestPolicyDecisionRequestParser: z.ZodObject<{
2923
2993
  id?: string | undefined;
2924
2994
  }[];
2925
2995
  id?: string | undefined;
2996
+ description?: string | undefined;
2926
2997
  }[] | undefined;
2927
2998
  };
2928
2999
  roleIds: string[];
@@ -2962,16 +3033,54 @@ type AuthorizeResponse = z.infer<typeof AuthorizeResponseParser>;
2962
3033
  /** @public */
2963
3034
  declare const MemberResponseParser: z.ZodObject<{
2964
3035
  name: z.ZodOptional<z.ZodString>;
3036
+ namespace: z.ZodOptional<z.ZodString>;
3037
+ description: z.ZodOptional<z.ZodString>;
2965
3038
  type: z.ZodEnum<["user", "group", "all", "unknown"]>;
2966
3039
  entityRef: z.ZodString;
3040
+ spec: z.ZodOptional<z.ZodObject<{
3041
+ type: z.ZodOptional<z.ZodString>;
3042
+ profile: z.ZodOptional<z.ZodObject<{
3043
+ displayName: z.ZodOptional<z.ZodString>;
3044
+ }, "strip", z.ZodTypeAny, {
3045
+ displayName?: string | undefined;
3046
+ }, {
3047
+ displayName?: string | undefined;
3048
+ }>>;
3049
+ }, "strip", z.ZodTypeAny, {
3050
+ type?: string | undefined;
3051
+ profile?: {
3052
+ displayName?: string | undefined;
3053
+ } | undefined;
3054
+ }, {
3055
+ type?: string | undefined;
3056
+ profile?: {
3057
+ displayName?: string | undefined;
3058
+ } | undefined;
3059
+ }>>;
2967
3060
  }, "strip", z.ZodTypeAny, {
2968
3061
  type: "unknown" | "all" | "user" | "group";
2969
3062
  entityRef: string;
2970
3063
  name?: string | undefined;
3064
+ description?: string | undefined;
3065
+ namespace?: string | undefined;
3066
+ spec?: {
3067
+ type?: string | undefined;
3068
+ profile?: {
3069
+ displayName?: string | undefined;
3070
+ } | undefined;
3071
+ } | undefined;
2971
3072
  }, {
2972
3073
  type: "unknown" | "all" | "user" | "group";
2973
3074
  entityRef: string;
2974
3075
  name?: string | undefined;
3076
+ description?: string | undefined;
3077
+ namespace?: string | undefined;
3078
+ spec?: {
3079
+ type?: string | undefined;
3080
+ profile?: {
3081
+ displayName?: string | undefined;
3082
+ } | undefined;
3083
+ } | undefined;
2975
3084
  }>;
2976
3085
  /** @public */
2977
3086
  type MemberResponse = z.infer<typeof MemberResponseParser>;
@@ -2984,28 +3093,82 @@ type PolicyMember = {
2984
3093
  declare const SearchMemberResponseParser: z.ZodObject<{
2985
3094
  members: z.ZodArray<z.ZodObject<{
2986
3095
  name: z.ZodOptional<z.ZodString>;
3096
+ namespace: z.ZodOptional<z.ZodString>;
3097
+ description: z.ZodOptional<z.ZodString>;
2987
3098
  type: z.ZodEnum<["user", "group", "all", "unknown"]>;
2988
3099
  entityRef: z.ZodString;
3100
+ spec: z.ZodOptional<z.ZodObject<{
3101
+ type: z.ZodOptional<z.ZodString>;
3102
+ profile: z.ZodOptional<z.ZodObject<{
3103
+ displayName: z.ZodOptional<z.ZodString>;
3104
+ }, "strip", z.ZodTypeAny, {
3105
+ displayName?: string | undefined;
3106
+ }, {
3107
+ displayName?: string | undefined;
3108
+ }>>;
3109
+ }, "strip", z.ZodTypeAny, {
3110
+ type?: string | undefined;
3111
+ profile?: {
3112
+ displayName?: string | undefined;
3113
+ } | undefined;
3114
+ }, {
3115
+ type?: string | undefined;
3116
+ profile?: {
3117
+ displayName?: string | undefined;
3118
+ } | undefined;
3119
+ }>>;
2989
3120
  }, "strip", z.ZodTypeAny, {
2990
3121
  type: "unknown" | "all" | "user" | "group";
2991
3122
  entityRef: string;
2992
3123
  name?: string | undefined;
3124
+ description?: string | undefined;
3125
+ namespace?: string | undefined;
3126
+ spec?: {
3127
+ type?: string | undefined;
3128
+ profile?: {
3129
+ displayName?: string | undefined;
3130
+ } | undefined;
3131
+ } | undefined;
2993
3132
  }, {
2994
3133
  type: "unknown" | "all" | "user" | "group";
2995
3134
  entityRef: string;
2996
3135
  name?: string | undefined;
3136
+ description?: string | undefined;
3137
+ namespace?: string | undefined;
3138
+ spec?: {
3139
+ type?: string | undefined;
3140
+ profile?: {
3141
+ displayName?: string | undefined;
3142
+ } | undefined;
3143
+ } | undefined;
2997
3144
  }>, "many">;
2998
3145
  }, "strip", z.ZodTypeAny, {
2999
3146
  members: {
3000
3147
  type: "unknown" | "all" | "user" | "group";
3001
3148
  entityRef: string;
3002
3149
  name?: string | undefined;
3150
+ description?: string | undefined;
3151
+ namespace?: string | undefined;
3152
+ spec?: {
3153
+ type?: string | undefined;
3154
+ profile?: {
3155
+ displayName?: string | undefined;
3156
+ } | undefined;
3157
+ } | undefined;
3003
3158
  }[];
3004
3159
  }, {
3005
3160
  members: {
3006
3161
  type: "unknown" | "all" | "user" | "group";
3007
3162
  entityRef: string;
3008
3163
  name?: string | undefined;
3164
+ description?: string | undefined;
3165
+ namespace?: string | undefined;
3166
+ spec?: {
3167
+ type?: string | undefined;
3168
+ profile?: {
3169
+ displayName?: string | undefined;
3170
+ } | undefined;
3171
+ } | undefined;
3009
3172
  }[];
3010
3173
  }>;
3011
3174
  /** @public */
@@ -3032,6 +3195,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3032
3195
  }>>;
3033
3196
  roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
3034
3197
  name: z.ZodString;
3198
+ description: z.ZodOptional<z.ZodString>;
3035
3199
  id: z.ZodDefault<z.ZodString>;
3036
3200
  members: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">]>;
3037
3201
  permissions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
@@ -3039,7 +3203,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3039
3203
  match: z.ZodUnion<[z.ZodLiteral<"*">, z.ZodObject<{
3040
3204
  name: z.ZodOptional<z.ZodString>;
3041
3205
  actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3042
- resourceType: z.ZodOptional<z.ZodString>;
3206
+ resourceType: z.ZodOptional<z.ZodString>; /** @public */
3043
3207
  }, "strip", z.ZodTypeAny, {
3044
3208
  name?: string | undefined;
3045
3209
  actions?: string[] | undefined;
@@ -3152,6 +3316,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3152
3316
  resourceType: string;
3153
3317
  } | "deny";
3154
3318
  }[];
3319
+ description?: string | undefined;
3155
3320
  }, {
3156
3321
  name: string;
3157
3322
  members: string[] | "*";
@@ -3169,6 +3334,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3169
3334
  id?: string | undefined;
3170
3335
  }[];
3171
3336
  id?: string | undefined;
3337
+ description?: string | undefined;
3172
3338
  }>, "many">>, {
3173
3339
  id: string;
3174
3340
  name: string;
@@ -3186,6 +3352,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3186
3352
  resourceType: string;
3187
3353
  } | "deny";
3188
3354
  }[];
3355
+ description?: string | undefined;
3189
3356
  }[], {
3190
3357
  name: string;
3191
3358
  members: string[] | "*";
@@ -3203,6 +3370,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3203
3370
  id?: string | undefined;
3204
3371
  }[];
3205
3372
  id?: string | undefined;
3373
+ description?: string | undefined;
3206
3374
  }[] | undefined>;
3207
3375
  }, {
3208
3376
  id: z.ZodString;
@@ -3240,6 +3408,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3240
3408
  resourceType: string;
3241
3409
  } | "deny";
3242
3410
  }[];
3411
+ description?: string | undefined;
3243
3412
  }[];
3244
3413
  createdBy: string;
3245
3414
  updatedBy: string;
@@ -3275,6 +3444,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3275
3444
  id?: string | undefined;
3276
3445
  }[];
3277
3446
  id?: string | undefined;
3447
+ description?: string | undefined;
3278
3448
  }[] | undefined;
3279
3449
  lastPublishedAt?: string | null | undefined;
3280
3450
  lastPublishedBy?: string | null | undefined;
@@ -3309,6 +3479,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3309
3479
  resourceType: string;
3310
3480
  } | "deny";
3311
3481
  }[];
3482
+ description?: string | undefined;
3312
3483
  }[];
3313
3484
  createdBy: string;
3314
3485
  updatedBy: string;
@@ -3349,6 +3520,7 @@ declare const PolicyResponseParser: z.ZodObject<{
3349
3520
  id?: string | undefined;
3350
3521
  }[];
3351
3522
  id?: string | undefined;
3523
+ description?: string | undefined;
3352
3524
  }[] | undefined;
3353
3525
  lastPublishedAt?: string | null | undefined;
3354
3526
  lastPublishedBy?: string | null | undefined;
@@ -1,2 +1,2 @@
1
- "use strict";var a=require("@backstage/catalog-model"),m=require("uuid"),e=require("zod"),o=require("./validationMessages.cjs.js");const P="Untitled policy",q=":backstageUser",f=e.z.object({rule:e.z.string(),params:e.z.record(e.z.any()).optional()}),n=e.z.lazy(()=>e.z.union([e.z.object({allOf:e.z.array(n).nonempty()}).strict(),e.z.object({anyOf:e.z.array(n).nonempty()}).strict(),e.z.object({not:n}).strict(),f])),h=e.z.object({pluginId:e.z.string().min(1).describe("Plugin ID that defines the permission and rules used."),resourceType:e.z.string().min(1).describe("Resource type associated with the conditions used."),conditions:n}),y=e.z.union([e.z.literal("allow"),e.z.literal("deny")]),c=e.z.union([y,h]),g=e.z.union([e.z.literal("*"),e.z.object({name:e.z.string().optional().describe("Name that must match the incoming permission request."),actions:e.z.array(e.z.string()).optional().describe("Actions that must be present on the incoming permission's attributes."),resourceType:e.z.string().min(1).optional().describe("Resource type that must match that of the incoming permission request.")})]),z=e.z.string().default(()=>m.v4().split("-")[0]).describe("ID of the permission."),p=e.z.object({id:z,match:g.describe("Values used to match against the incoming permission request."),decision:c.describe("Authorization result or conditions to send if this role permission applies.")}).refine(({decision:i,match:s})=>O(i)?s!=="*"&&s?.resourceType!==void 0:!0,{path:["match","resourceType"],message:"match.resourceType is required for conditional decisions."}),b=e.z.array(p).superRefine((i,s)=>{const r=d(i,"id");r>=0&&s.addIssue({code:e.z.ZodIssueCode.custom,message:"Permission ids must be unique",path:[r,"id"]})}).describe("Permission decisions used to determine authorization responses."),v=e.z.string().refine(x,{message:"Invalid entity ref for member.",path:[]}).transform(i=>a.stringifyEntityRef(a.parseEntityRef(i,{defaultKind:"group",defaultNamespace:"default"}))),C=e.z.string().default(()=>m.v4().split("-")[0]).describe("ID of the role."),R=e.z.object({name:e.z.string().min(1,{message:o.minCharacters("Role name",1)}).max(1024,{message:o.maxCharacters("Role name",1024)}).describe("Name of the role."),id:C,members:e.z.union([e.z.literal("*"),e.z.array(v).min(1)]).describe("Entity references used to map users to this role. These entities don't need to exist in the catalog."),permissions:b}),D=e.z.array(R).default([]).superRefine((i,s)=>{const r=d(i,"name");r>=0&&s.addIssue({code:e.z.ZodIssueCode.custom,message:"Role names must be unique",path:[r,"name"]});const t=d(i,"id");t>=0&&s.addIssue({code:e.z.ZodIssueCode.custom,message:"Role ids must be unique",path:[t,"id"]})}),T=e.z.object({decision:c.describe("The authorization result or conditions the corresponding role resulted in"),roleId:C.describe("The id of the role that resulted in the decision"),rolePermissionId:z.describe("The id of the role permission that resulted in the decisions.")}),A=e.z.string().min(1,{message:o.minCharacters("Policy name",1)}).max(1024,{message:o.maxCharacters("Policy name",1024)}).default(P).describe("Name of the policy."),j=e.z.union([e.z.literal("first-match"),e.z.literal("any-allow")]),I=e.z.object({resolutionStrategy:j}).default({resolutionStrategy:"first-match"}),l=e.z.object({name:A,options:I,roles:D}),N=l.default({roles:[]});function x(i){try{return a.parseEntityRef(i,{defaultKind:"group",defaultNamespace:"default"}),!0}catch{return!1}}function d(i,s){let r=0;const t=new Set;for(;r<i.length;){const u=i[r][s];if(t.has(u))return r;t.add(u),r++}return-1}function O(i){return typeof i!="string"}function B(i){const s=Object.entries(i);return s.length===1&&s[0][0]==="allOf"&&Array.isArray(s[0][1])}function S(i){const s=Object.entries(i);return s.length===1&&s[0][0]==="anyOf"&&Array.isArray(s[0][1])}function w(i){const s=Object.entries(i);return s.length===1&&s[0][0]==="not"&&!Array.isArray(s[0][1])}const E=l.extend({id:e.z.string(),createdAt:e.z.string(),createdBy:e.z.string(),updatedAt:e.z.string(),updatedBy:e.z.string(),description:e.z.string().optional().nullable(),lastPublishedAt:e.z.string().optional().nullable(),lastPublishedBy:e.z.string().optional().nullable(),status:e.z.enum(["draft","active","inactive"])});exports.BackstageUserPlaceholder=q,exports.ConditionalDecisionParser=h,exports.DefaultingPolicyConfigParser=N,exports.LiteralDecisionParser=y,exports.PermissionConditionParser=f,exports.PermissionDecisionParser=c,exports.PermissionMatchParser=g,exports.PolicyConfigOptionsParser=I,exports.PolicyConfigParser=l,exports.PolicyDefaultName=P,exports.PolicyParser=E,exports.PolicyRoleResolutionStrategyParser=j,exports.PolicyTitleParser=A,exports.RoleDecisionParser=T,exports.RoleParser=R,exports.RolePermissionParser=p,exports.RolePermissionsParser=b,exports.RolesParser=D,exports.isAllOfPermissionCriteria=B,exports.isAnyOfPermissionCriteria=S,exports.isConditionalDecision=O,exports.isNotPermissionCriteria=w;
1
+ "use strict";var a=require("@backstage/catalog-model"),m=require("uuid"),e=require("zod"),o=require("./validationMessages.cjs.js");const P="Untitled policy",q=":backstageUser",f=e.z.object({rule:e.z.string(),params:e.z.record(e.z.any()).optional()}),n=e.z.lazy(()=>e.z.union([e.z.object({allOf:e.z.array(n).nonempty()}).strict(),e.z.object({anyOf:e.z.array(n).nonempty()}).strict(),e.z.object({not:n}).strict(),f])),h=e.z.object({pluginId:e.z.string().min(1).describe("Plugin ID that defines the permission and rules used."),resourceType:e.z.string().min(1).describe("Resource type associated with the conditions used."),conditions:n}),g=e.z.union([e.z.literal("allow"),e.z.literal("deny")]),c=e.z.union([g,h]),y=e.z.union([e.z.literal("*"),e.z.object({name:e.z.string().optional().describe("Name that must match the incoming permission request."),actions:e.z.array(e.z.string()).optional().describe("Actions that must be present on the incoming permission's attributes."),resourceType:e.z.string().min(1).optional().describe("Resource type that must match that of the incoming permission request.")})]),z=e.z.string().default(()=>m.v4().split("-")[0]).describe("ID of the permission."),p=e.z.object({id:z,match:y.describe("Values used to match against the incoming permission request."),decision:c.describe("Authorization result or conditions to send if this role permission applies.")}).refine(({decision:i,match:s})=>O(i)?s!=="*"&&s?.resourceType!==void 0:!0,{path:["match","resourceType"],message:"match.resourceType is required for conditional decisions."}),b=e.z.array(p).superRefine((i,s)=>{const r=d(i,"id");r>=0&&s.addIssue({code:e.z.ZodIssueCode.custom,message:"Permission ids must be unique",path:[r,"id"]})}).describe("Permission decisions used to determine authorization responses."),v=e.z.string().refine(x,{message:"Invalid entity ref for member.",path:[]}).transform(i=>a.stringifyEntityRef(a.parseEntityRef(i,{defaultKind:"group",defaultNamespace:"default"}))),C=e.z.string().default(()=>m.v4().split("-")[0]).describe("ID of the role."),R=e.z.object({name:e.z.string().min(1,{message:o.minCharacters("Role name",1)}).max(1024,{message:o.maxCharacters("Role name",1024)}).describe("Name of the role."),description:e.z.string().optional().describe("Description of the role."),id:C,members:e.z.union([e.z.literal("*"),e.z.array(v).min(1)]).describe("Entity references used to map users to this role. These entities don't need to exist in the catalog."),permissions:b}),D=e.z.array(R).default([]).superRefine((i,s)=>{const r=d(i,"name");r>=0&&s.addIssue({code:e.z.ZodIssueCode.custom,message:"Role names must be unique",path:[r,"name"]});const t=d(i,"id");t>=0&&s.addIssue({code:e.z.ZodIssueCode.custom,message:"Role ids must be unique",path:[t,"id"]})}),T=e.z.object({decision:c.describe("The authorization result or conditions the corresponding role resulted in"),roleId:C.describe("The id of the role that resulted in the decision"),rolePermissionId:z.describe("The id of the role permission that resulted in the decisions.")}),A=e.z.string().min(1,{message:o.minCharacters("Policy name",1)}).max(1024,{message:o.maxCharacters("Policy name",1024)}).default(P).describe("Name of the policy."),j=e.z.union([e.z.literal("first-match"),e.z.literal("any-allow")]),I=e.z.object({resolutionStrategy:j}).default({resolutionStrategy:"first-match"}),l=e.z.object({name:A,options:I,roles:D}),N=l.default({roles:[]});function x(i){try{return a.parseEntityRef(i,{defaultKind:"group",defaultNamespace:"default"}),!0}catch{return!1}}function d(i,s){let r=0;const t=new Set;for(;r<i.length;){const u=i[r][s];if(t.has(u))return r;t.add(u),r++}return-1}function O(i){return typeof i!="string"}function B(i){const s=Object.entries(i);return s.length===1&&s[0][0]==="allOf"&&Array.isArray(s[0][1])}function S(i){const s=Object.entries(i);return s.length===1&&s[0][0]==="anyOf"&&Array.isArray(s[0][1])}function w(i){const s=Object.entries(i);return s.length===1&&s[0][0]==="not"&&!Array.isArray(s[0][1])}const E=l.extend({id:e.z.string(),createdAt:e.z.string(),createdBy:e.z.string(),updatedAt:e.z.string(),updatedBy:e.z.string(),description:e.z.string().optional().nullable(),lastPublishedAt:e.z.string().optional().nullable(),lastPublishedBy:e.z.string().optional().nullable(),status:e.z.enum(["draft","active","inactive"])});exports.BackstageUserPlaceholder=q,exports.ConditionalDecisionParser=h,exports.DefaultingPolicyConfigParser=N,exports.LiteralDecisionParser=g,exports.PermissionConditionParser=f,exports.PermissionDecisionParser=c,exports.PermissionMatchParser=y,exports.PolicyConfigOptionsParser=I,exports.PolicyConfigParser=l,exports.PolicyDefaultName=P,exports.PolicyParser=E,exports.PolicyRoleResolutionStrategyParser=j,exports.PolicyTitleParser=A,exports.RoleDecisionParser=T,exports.RoleParser=R,exports.RolePermissionParser=p,exports.RolePermissionsParser=b,exports.RolesParser=D,exports.isAllOfPermissionCriteria=B,exports.isAnyOfPermissionCriteria=S,exports.isConditionalDecision=O,exports.isNotPermissionCriteria=w;
2
2
  //# sourceMappingURL=schema.cjs.js.map
@@ -1,2 +1,2 @@
1
- import{stringifyEntityRef as N,parseEntityRef as d}from"@backstage/catalog-model";import{v4 as u}from"uuid";import{z as e}from"zod";import{minCharacters as m,maxCharacters as f}from"./validationMessages.esm.js";const p="Untitled policy",x=":backstageUser",h=e.object({rule:e.string(),params:e.record(e.any()).optional()}),o=e.lazy(()=>e.union([e.object({allOf:e.array(o).nonempty()}).strict(),e.object({anyOf:e.array(o).nonempty()}).strict(),e.object({not:o}).strict(),h])),g=e.object({pluginId:e.string().min(1).describe("Plugin ID that defines the permission and rules used."),resourceType:e.string().min(1).describe("Resource type associated with the conditions used."),conditions:o}),y=e.union([e.literal("allow"),e.literal("deny")]),n=e.union([y,g]),b=e.union([e.literal("*"),e.object({name:e.string().optional().describe("Name that must match the incoming permission request."),actions:e.array(e.string()).optional().describe("Actions that must be present on the incoming permission's attributes."),resourceType:e.string().min(1).optional().describe("Resource type that must match that of the incoming permission request.")})]),P=e.string().default(()=>u().split("-")[0]).describe("ID of the permission."),R=e.object({id:P,match:b.describe("Values used to match against the incoming permission request."),decision:n.describe("Authorization result or conditions to send if this role permission applies.")}).refine(({decision:t,match:i})=>q(t)?i!=="*"&&i?.resourceType!==void 0:!0,{path:["match","resourceType"],message:"match.resourceType is required for conditional decisions."}),j=e.array(R).superRefine((t,i)=>{const s=c(t,"id");s>=0&&i.addIssue({code:e.ZodIssueCode.custom,message:"Permission ids must be unique",path:[s,"id"]})}).describe("Permission decisions used to determine authorization responses."),v=e.string().refine(B,{message:"Invalid entity ref for member.",path:[]}).transform(t=>N(d(t,{defaultKind:"group",defaultNamespace:"default"}))),C=e.string().default(()=>u().split("-")[0]).describe("ID of the role."),A=e.object({name:e.string().min(1,{message:m("Role name",1)}).max(1024,{message:f("Role name",1024)}).describe("Name of the role."),id:C,members:e.union([e.literal("*"),e.array(v).min(1)]).describe("Entity references used to map users to this role. These entities don't need to exist in the catalog."),permissions:j}),I=e.array(A).default([]).superRefine((t,i)=>{const s=c(t,"name");s>=0&&i.addIssue({code:e.ZodIssueCode.custom,message:"Role names must be unique",path:[s,"name"]});const r=c(t,"id");r>=0&&i.addIssue({code:e.ZodIssueCode.custom,message:"Role ids must be unique",path:[r,"id"]})}),z=e.object({decision:n.describe("The authorization result or conditions the corresponding role resulted in"),roleId:C.describe("The id of the role that resulted in the decision"),rolePermissionId:P.describe("The id of the role permission that resulted in the decisions.")}),D=e.string().min(1,{message:m("Policy name",1)}).max(1024,{message:f("Policy name",1024)}).default(p).describe("Name of the policy."),O=e.union([e.literal("first-match"),e.literal("any-allow")]),T=e.object({resolutionStrategy:O}).default({resolutionStrategy:"first-match"}),a=e.object({name:D,options:T,roles:I}),w=a.default({roles:[]});function B(t){try{return d(t,{defaultKind:"group",defaultNamespace:"default"}),!0}catch{return!1}}function c(t,i){let s=0;const r=new Set;for(;s<t.length;){const l=t[s][i];if(r.has(l))return s;r.add(l),s++}return-1}function q(t){return typeof t!="string"}function S(t){const i=Object.entries(t);return i.length===1&&i[0][0]==="allOf"&&Array.isArray(i[0][1])}function E(t){const i=Object.entries(t);return i.length===1&&i[0][0]==="anyOf"&&Array.isArray(i[0][1])}function U(t){const i=Object.entries(t);return i.length===1&&i[0][0]==="not"&&!Array.isArray(i[0][1])}const Z=a.extend({id:e.string(),createdAt:e.string(),createdBy:e.string(),updatedAt:e.string(),updatedBy:e.string(),description:e.string().optional().nullable(),lastPublishedAt:e.string().optional().nullable(),lastPublishedBy:e.string().optional().nullable(),status:e.enum(["draft","active","inactive"])});export{x as BackstageUserPlaceholder,g as ConditionalDecisionParser,w as DefaultingPolicyConfigParser,y as LiteralDecisionParser,h as PermissionConditionParser,n as PermissionDecisionParser,b as PermissionMatchParser,T as PolicyConfigOptionsParser,a as PolicyConfigParser,p as PolicyDefaultName,Z as PolicyParser,O as PolicyRoleResolutionStrategyParser,D as PolicyTitleParser,z as RoleDecisionParser,A as RoleParser,R as RolePermissionParser,j as RolePermissionsParser,I as RolesParser,S as isAllOfPermissionCriteria,E as isAnyOfPermissionCriteria,q as isConditionalDecision,U as isNotPermissionCriteria};
1
+ import{stringifyEntityRef as N,parseEntityRef as d}from"@backstage/catalog-model";import{v4 as u}from"uuid";import{z as e}from"zod";import{minCharacters as m,maxCharacters as p}from"./validationMessages.esm.js";const f="Untitled policy",x=":backstageUser",h=e.object({rule:e.string(),params:e.record(e.any()).optional()}),o=e.lazy(()=>e.union([e.object({allOf:e.array(o).nonempty()}).strict(),e.object({anyOf:e.array(o).nonempty()}).strict(),e.object({not:o}).strict(),h])),g=e.object({pluginId:e.string().min(1).describe("Plugin ID that defines the permission and rules used."),resourceType:e.string().min(1).describe("Resource type associated with the conditions used."),conditions:o}),y=e.union([e.literal("allow"),e.literal("deny")]),n=e.union([y,g]),b=e.union([e.literal("*"),e.object({name:e.string().optional().describe("Name that must match the incoming permission request."),actions:e.array(e.string()).optional().describe("Actions that must be present on the incoming permission's attributes."),resourceType:e.string().min(1).optional().describe("Resource type that must match that of the incoming permission request.")})]),P=e.string().default(()=>u().split("-")[0]).describe("ID of the permission."),R=e.object({id:P,match:b.describe("Values used to match against the incoming permission request."),decision:n.describe("Authorization result or conditions to send if this role permission applies.")}).refine(({decision:t,match:i})=>q(t)?i!=="*"&&i?.resourceType!==void 0:!0,{path:["match","resourceType"],message:"match.resourceType is required for conditional decisions."}),j=e.array(R).superRefine((t,i)=>{const s=c(t,"id");s>=0&&i.addIssue({code:e.ZodIssueCode.custom,message:"Permission ids must be unique",path:[s,"id"]})}).describe("Permission decisions used to determine authorization responses."),v=e.string().refine(B,{message:"Invalid entity ref for member.",path:[]}).transform(t=>N(d(t,{defaultKind:"group",defaultNamespace:"default"}))),C=e.string().default(()=>u().split("-")[0]).describe("ID of the role."),A=e.object({name:e.string().min(1,{message:m("Role name",1)}).max(1024,{message:p("Role name",1024)}).describe("Name of the role."),description:e.string().optional().describe("Description of the role."),id:C,members:e.union([e.literal("*"),e.array(v).min(1)]).describe("Entity references used to map users to this role. These entities don't need to exist in the catalog."),permissions:j}),I=e.array(A).default([]).superRefine((t,i)=>{const s=c(t,"name");s>=0&&i.addIssue({code:e.ZodIssueCode.custom,message:"Role names must be unique",path:[s,"name"]});const r=c(t,"id");r>=0&&i.addIssue({code:e.ZodIssueCode.custom,message:"Role ids must be unique",path:[r,"id"]})}),z=e.object({decision:n.describe("The authorization result or conditions the corresponding role resulted in"),roleId:C.describe("The id of the role that resulted in the decision"),rolePermissionId:P.describe("The id of the role permission that resulted in the decisions.")}),D=e.string().min(1,{message:m("Policy name",1)}).max(1024,{message:p("Policy name",1024)}).default(f).describe("Name of the policy."),O=e.union([e.literal("first-match"),e.literal("any-allow")]),T=e.object({resolutionStrategy:O}).default({resolutionStrategy:"first-match"}),a=e.object({name:D,options:T,roles:I}),w=a.default({roles:[]});function B(t){try{return d(t,{defaultKind:"group",defaultNamespace:"default"}),!0}catch{return!1}}function c(t,i){let s=0;const r=new Set;for(;s<t.length;){const l=t[s][i];if(r.has(l))return s;r.add(l),s++}return-1}function q(t){return typeof t!="string"}function S(t){const i=Object.entries(t);return i.length===1&&i[0][0]==="allOf"&&Array.isArray(i[0][1])}function E(t){const i=Object.entries(t);return i.length===1&&i[0][0]==="anyOf"&&Array.isArray(i[0][1])}function U(t){const i=Object.entries(t);return i.length===1&&i[0][0]==="not"&&!Array.isArray(i[0][1])}const Z=a.extend({id:e.string(),createdAt:e.string(),createdBy:e.string(),updatedAt:e.string(),updatedBy:e.string(),description:e.string().optional().nullable(),lastPublishedAt:e.string().optional().nullable(),lastPublishedBy:e.string().optional().nullable(),status:e.enum(["draft","active","inactive"])});export{x as BackstageUserPlaceholder,g as ConditionalDecisionParser,w as DefaultingPolicyConfigParser,y as LiteralDecisionParser,h as PermissionConditionParser,n as PermissionDecisionParser,b as PermissionMatchParser,T as PolicyConfigOptionsParser,a as PolicyConfigParser,f as PolicyDefaultName,Z as PolicyParser,O as PolicyRoleResolutionStrategyParser,D as PolicyTitleParser,z as RoleDecisionParser,A as RoleParser,R as RolePermissionParser,j as RolePermissionsParser,I as RolesParser,S as isAllOfPermissionCriteria,E as isAnyOfPermissionCriteria,q as isConditionalDecision,U as isNotPermissionCriteria};
2
2
  //# sourceMappingURL=schema.esm.js.map
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.6.5",
4
+ "version": "0.6.6",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://backstage.spotify.com",
7
7
  "main": "dist/index.cjs.js",
@@ -38,7 +38,7 @@
38
38
  "zod": "^3.20.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@backstage/cli": "^0.29.5"
41
+ "@backstage/cli": "^0.30.0"
42
42
  },
43
43
  "files": [
44
44
  "dist",