@cloud-copilot/iam-data 0.19.202607151 → 0.20.202607161

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/README.md CHANGED
@@ -36,6 +36,14 @@ for(const serviceKey of serviceKeys) {
36
36
  * `iamServiceName(serviceKey: string)` - Returns the service name for a given service key.
37
37
  * `iamServiceExists(serviceKey: string)` - Returns true if the service key exists.
38
38
 
39
+ ### Categories
40
+ * `serviceCategories()` - Returns an array of all service category keys such as 'storage', 'compute', etc.
41
+ * `serviceCategoryExists(category: string)` - Returns true if the service category exists.
42
+ * `iamServiceCategoryMap()` - Returns a map of IAM service keys to category keys.
43
+ * `iamServicesForCategory(category: string)` - Returns an array of IAM service keys assigned to a category.
44
+ * `categoryForIamService(service: string)` - Returns the category key for an IAM service key.
45
+ * `getServiceCategory(category: string)` - Returns category details including `key`, `name`, and `services`.
46
+
39
47
  ### Actions
40
48
  * `iamActionsForService(serviceKey: string)` - Returns an array of all actions for a given service key.
41
49
  * `iamActionDetails(serviceKey: string, actionKey: string)` - Returns an object with the action details such as `description`, `resourceTypes`, and `conditionKeys`.
@@ -29,6 +29,18 @@
29
29
  "conditionKeys": [],
30
30
  "dependentActions": []
31
31
  },
32
+ "createdatatransformationprofile": {
33
+ "name": "CreateDataTransformationProfile",
34
+ "description": "Grants permission to create a data transformation profile",
35
+ "accessLevel": "Write",
36
+ "resourceTypes": [],
37
+ "conditionKeys": [
38
+ "aws:RequestTag/${TagKey}",
39
+ "aws:ResourceTag/${TagKey}",
40
+ "aws:TagKeys"
41
+ ],
42
+ "dependentActions": []
43
+ },
32
44
  "createfhirdatastore": {
33
45
  "name": "CreateFHIRDatastore",
34
46
  "description": "Grants permission to create a datastore that can ingest and export FHIR data",
@@ -56,6 +68,21 @@
56
68
  "conditionKeys": [],
57
69
  "dependentActions": []
58
70
  },
71
+ "deletedatatransformationprofile": {
72
+ "name": "DeleteDataTransformationProfile",
73
+ "description": "Grants permission to delete a data transformation profile and all its versions",
74
+ "accessLevel": "Write",
75
+ "resourceTypes": [
76
+ {
77
+ "name": "dataTransformationProfile",
78
+ "required": true,
79
+ "conditionKeys": [],
80
+ "dependentActions": []
81
+ }
82
+ ],
83
+ "conditionKeys": [],
84
+ "dependentActions": []
85
+ },
59
86
  "deletefhirdatastore": {
60
87
  "name": "DeleteFHIRDatastore",
61
88
  "description": "Grants permission to delete a datastore",
@@ -86,6 +113,14 @@
86
113
  "conditionKeys": [],
87
114
  "dependentActions": []
88
115
  },
116
+ "describedatatransformationjob": {
117
+ "name": "DescribeDataTransformationJob",
118
+ "description": "Grants permission to describe a data transformation job",
119
+ "accessLevel": "Read",
120
+ "resourceTypes": [],
121
+ "conditionKeys": [],
122
+ "dependentActions": []
123
+ },
89
124
  "describefhirbulkdeletejob": {
90
125
  "name": "DescribeFHIRBulkDeleteJob",
91
126
  "description": "Grants permission to describe a FHIR Bulk Delete Job",
@@ -251,6 +286,21 @@
251
286
  "conditionKeys": [],
252
287
  "dependentActions": []
253
288
  },
289
+ "getdatatransformationprofile": {
290
+ "name": "GetDataTransformationProfile",
291
+ "description": "Grants permission to retrieve a data transformation profile and its content",
292
+ "accessLevel": "Read",
293
+ "resourceTypes": [
294
+ {
295
+ "name": "dataTransformationProfile",
296
+ "required": true,
297
+ "conditionKeys": [],
298
+ "dependentActions": []
299
+ }
300
+ ],
301
+ "conditionKeys": [],
302
+ "dependentActions": []
303
+ },
254
304
  "getexportedfile": {
255
305
  "name": "GetExportedFile",
256
306
  "description": "Grants permission to access exported files from a FHIR Export job initiated with Get",
@@ -296,6 +346,37 @@
296
346
  "conditionKeys": [],
297
347
  "dependentActions": []
298
348
  },
349
+ "listdatatransformationjobs": {
350
+ "name": "ListDataTransformationJobs",
351
+ "description": "Grants permission to list data transformation jobs in the account",
352
+ "accessLevel": "List",
353
+ "resourceTypes": [],
354
+ "conditionKeys": [],
355
+ "dependentActions": []
356
+ },
357
+ "listdatatransformationprofileversions": {
358
+ "name": "ListDataTransformationProfileVersions",
359
+ "description": "Grants permission to list all versions of a data transformation profile",
360
+ "accessLevel": "List",
361
+ "resourceTypes": [
362
+ {
363
+ "name": "dataTransformationProfile",
364
+ "required": true,
365
+ "conditionKeys": [],
366
+ "dependentActions": []
367
+ }
368
+ ],
369
+ "conditionKeys": [],
370
+ "dependentActions": []
371
+ },
372
+ "listdatatransformationprofiles": {
373
+ "name": "ListDataTransformationProfiles",
374
+ "description": "Grants permission to list data transformation profiles in the account",
375
+ "accessLevel": "List",
376
+ "resourceTypes": [],
377
+ "conditionKeys": [],
378
+ "dependentActions": []
379
+ },
299
380
  "listfhirdatastores": {
300
381
  "name": "ListFHIRDatastores",
301
382
  "description": "Grants permission to list all FHIR datastores that are in the user's account, regardless of datastore status",
@@ -339,6 +420,12 @@
339
420
  "description": "Grants permission to get a list of tags for the specified datastore",
340
421
  "accessLevel": "List",
341
422
  "resourceTypes": [
423
+ {
424
+ "name": "dataTransformationProfile",
425
+ "required": false,
426
+ "conditionKeys": [],
427
+ "dependentActions": []
428
+ },
342
429
  {
343
430
  "name": "datastore",
344
431
  "required": false,
@@ -454,6 +541,21 @@
454
541
  "conditionKeys": [],
455
542
  "dependentActions": []
456
543
  },
544
+ "publishdatatransformationprofile": {
545
+ "name": "PublishDataTransformationProfile",
546
+ "description": "Grants permission to publish a new immutable version of a data transformation profile",
547
+ "accessLevel": "Write",
548
+ "resourceTypes": [
549
+ {
550
+ "name": "dataTransformationProfile",
551
+ "required": true,
552
+ "conditionKeys": [],
553
+ "dependentActions": []
554
+ }
555
+ ],
556
+ "conditionKeys": [],
557
+ "dependentActions": []
558
+ },
457
559
  "questionnairepackage": {
458
560
  "name": "QuestionnairePackage",
459
561
  "description": "Grants permission to retrieve Questionnaire packages with dependency Library and ValueSet resources",
@@ -544,6 +646,21 @@
544
646
  "conditionKeys": [],
545
647
  "dependentActions": []
546
648
  },
649
+ "startdatatransformationjob": {
650
+ "name": "StartDataTransformationJob",
651
+ "description": "Grants permission to start an asynchronous data transformation job",
652
+ "accessLevel": "Write",
653
+ "resourceTypes": [
654
+ {
655
+ "name": "dataTransformationProfile",
656
+ "required": true,
657
+ "conditionKeys": [],
658
+ "dependentActions": []
659
+ }
660
+ ],
661
+ "conditionKeys": [],
662
+ "dependentActions": []
663
+ },
547
664
  "startfhirbulkdeletejob": {
548
665
  "name": "StartFHIRBulkDeleteJob",
549
666
  "description": "Grants permission to begin a FHIR Bulk Delete Job",
@@ -654,6 +771,12 @@
654
771
  "description": "Grants permission to add tags to a datastore",
655
772
  "accessLevel": "Tagging, Write",
656
773
  "resourceTypes": [
774
+ {
775
+ "name": "dataTransformationProfile",
776
+ "required": false,
777
+ "conditionKeys": [],
778
+ "dependentActions": []
779
+ },
657
780
  {
658
781
  "name": "datastore",
659
782
  "required": false,
@@ -668,11 +791,32 @@
668
791
  ],
669
792
  "dependentActions": []
670
793
  },
794
+ "transformdata": {
795
+ "name": "TransformData",
796
+ "description": "Grants permission to perform a synchronous data transformation",
797
+ "accessLevel": "Write",
798
+ "resourceTypes": [
799
+ {
800
+ "name": "dataTransformationProfile",
801
+ "required": true,
802
+ "conditionKeys": [],
803
+ "dependentActions": []
804
+ }
805
+ ],
806
+ "conditionKeys": [],
807
+ "dependentActions": []
808
+ },
671
809
  "untagresource": {
672
810
  "name": "UntagResource",
673
811
  "description": "Grants permission to remove tags associated with a datastore",
674
812
  "accessLevel": "Tagging, Write",
675
813
  "resourceTypes": [
814
+ {
815
+ "name": "dataTransformationProfile",
816
+ "required": false,
817
+ "conditionKeys": [],
818
+ "dependentActions": []
819
+ },
676
820
  {
677
821
  "name": "datastore",
678
822
  "required": false,
@@ -685,6 +829,21 @@
685
829
  ],
686
830
  "dependentActions": []
687
831
  },
832
+ "updatedatatransformationprofile": {
833
+ "name": "UpdateDataTransformationProfile",
834
+ "description": "Grants permission to update the draft version of a data transformation profile",
835
+ "accessLevel": "Write",
836
+ "resourceTypes": [
837
+ {
838
+ "name": "dataTransformationProfile",
839
+ "required": true,
840
+ "conditionKeys": [],
841
+ "dependentActions": []
842
+ }
843
+ ],
844
+ "conditionKeys": [],
845
+ "dependentActions": []
846
+ },
688
847
  "updatefhirdatastore": {
689
848
  "name": "UpdateFHIRDatastore",
690
849
  "description": "Grants permission to update the configuration of a datastore",
@@ -700,6 +859,21 @@
700
859
  "conditionKeys": [],
701
860
  "dependentActions": []
702
861
  },
862
+ "updateprofilewithagent": {
863
+ "name": "UpdateProfileWithAgent",
864
+ "description": "Grants permission to update a data transformation profile using the AI agent",
865
+ "accessLevel": "Write",
866
+ "resourceTypes": [
867
+ {
868
+ "name": "dataTransformationProfile",
869
+ "required": true,
870
+ "conditionKeys": [],
871
+ "dependentActions": []
872
+ }
873
+ ],
874
+ "conditionKeys": [],
875
+ "dependentActions": []
876
+ },
703
877
  "updateresource": {
704
878
  "name": "UpdateResource",
705
879
  "description": "Grants permission to update resource",
@@ -730,6 +904,14 @@
730
904
  "conditionKeys": [],
731
905
  "dependentActions": []
732
906
  },
907
+ "validatesource": {
908
+ "name": "ValidateSource",
909
+ "description": "Grants permission to validate source data against format specifications",
910
+ "accessLevel": "Read",
911
+ "resourceTypes": [],
912
+ "conditionKeys": [],
913
+ "dependentActions": []
914
+ },
733
915
  "versionreadresource": {
734
916
  "name": "VersionReadResource",
735
917
  "description": "Grants permission to read version of a resource",
@@ -35,6 +35,21 @@
35
35
  "conditionKeys": [],
36
36
  "dependentActions": []
37
37
  },
38
+ "batchgetenabledregionsv2": {
39
+ "name": "BatchGetEnabledRegionsV2",
40
+ "description": "Grants permission to retrieve Security Hub enabled regions for accounts in an organization",
41
+ "accessLevel": "Read",
42
+ "resourceTypes": [
43
+ {
44
+ "name": "hubv2",
45
+ "required": true,
46
+ "conditionKeys": [],
47
+ "dependentActions": []
48
+ }
49
+ ],
50
+ "conditionKeys": [],
51
+ "dependentActions": []
52
+ },
38
53
  "getadhocinsightresults": {
39
54
  "name": "GetAdhocInsightResults",
40
55
  "description": "Grants permission to retrieve aggregated statistical data about the findings",
@@ -71,6 +86,21 @@
71
86
  "conditionKeys": [],
72
87
  "dependentActions": []
73
88
  },
89
+ "getcoveragestatisticsv2": {
90
+ "name": "GetCoverageStatisticsV2",
91
+ "description": "Grants permission to retrieve Security Hub coverage statistics in an organization",
92
+ "accessLevel": "Read",
93
+ "resourceTypes": [
94
+ {
95
+ "name": "hubv2",
96
+ "required": true,
97
+ "conditionKeys": [],
98
+ "dependentActions": []
99
+ }
100
+ ],
101
+ "conditionKeys": [],
102
+ "dependentActions": []
103
+ },
74
104
  "getfreetrialenddate": {
75
105
  "name": "GetFreeTrialEndDate",
76
106
  "description": "Grants permission to retrieve the end date for an account's free trial of Security Hub",
@@ -1,4 +1,11 @@
1
1
  {
2
+ "datatransformationprofile": {
3
+ "key": "dataTransformationProfile",
4
+ "arn": "arn:${Partition}:healthlake:${Region}:${Account}:dataTransformationProfile/${ProfileId}",
5
+ "conditionKeys": [
6
+ "aws:ResourceTag/${TagKey}"
7
+ ]
8
+ },
2
9
  "datastore": {
3
10
  "key": "datastore",
4
11
  "arn": "arn:${Partition}:healthlake:${Region}:${Account}:datastore/fhir/${DatastoreId}",
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Details for an AWS service category and the IAM services assigned to it.
3
+ */
4
+ export interface CategoryDetails {
5
+ /** Stable lowercase category key. */
6
+ readonly key: string;
7
+ /** Properly capitalized category name from AWS. */
8
+ readonly name: string;
9
+ /** Sorted IAM service keys assigned to the category. */
10
+ readonly services: string[];
11
+ }
12
+ /**
13
+ * Get all service category keys.
14
+ *
15
+ * @returns an array of all service category keys
16
+ */
17
+ export declare function serviceCategories(): Promise<string[]>;
18
+ /**
19
+ * Check if a service category exists.
20
+ *
21
+ * @param category the category key to check, is case insensitive
22
+ * @returns true if the category exists, false otherwise
23
+ */
24
+ export declare function serviceCategoryExists(category: string): Promise<boolean>;
25
+ /**
26
+ * Get the IAM service to category mapping.
27
+ *
28
+ * @returns a map of IAM service keys to category keys
29
+ */
30
+ export declare function iamServiceCategoryMap(): Promise<Record<string, string>>;
31
+ /**
32
+ * Get IAM service keys assigned to a service category.
33
+ *
34
+ * @param category the category key to get IAM services for, is case insensitive
35
+ * @throws an error if the category does not exist
36
+ * @returns sorted IAM service keys assigned to the category
37
+ */
38
+ export declare function iamServicesForCategory(category: string): Promise<string[]>;
39
+ /**
40
+ * Get the service category key for an IAM service.
41
+ *
42
+ * @param service the IAM service key to get the category for, is case insensitive
43
+ * @throws an error if the service does not exist or has no category mapping
44
+ * @returns the category key for the IAM service
45
+ */
46
+ export declare function categoryForIamService(service: string): Promise<string>;
47
+ /**
48
+ * Get details for a service category.
49
+ *
50
+ * @param category the category key to get details for, is case insensitive
51
+ * @throws an error if the category does not exist
52
+ * @returns details for the service category
53
+ */
54
+ export declare function getServiceCategory(category: string): Promise<CategoryDetails>;
55
+ //# sourceMappingURL=categories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../src/categories.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAE3D;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG9E;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAE7E;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAGhF;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAa5E;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAOnF"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serviceCategories = serviceCategories;
4
+ exports.serviceCategoryExists = serviceCategoryExists;
5
+ exports.iamServiceCategoryMap = iamServiceCategoryMap;
6
+ exports.iamServicesForCategory = iamServicesForCategory;
7
+ exports.categoryForIamService = categoryForIamService;
8
+ exports.getServiceCategory = getServiceCategory;
9
+ const data_js_1 = require("./data.js");
10
+ const services_js_1 = require("./services.js");
11
+ /**
12
+ * Get all service category keys.
13
+ *
14
+ * @returns an array of all service category keys
15
+ */
16
+ async function serviceCategories() {
17
+ return (0, data_js_1.readDataFile)('categories.json');
18
+ }
19
+ /**
20
+ * Check if a service category exists.
21
+ *
22
+ * @param category the category key to check, is case insensitive
23
+ * @returns true if the category exists, false otherwise
24
+ */
25
+ async function serviceCategoryExists(category) {
26
+ const categoryNames = await (0, data_js_1.readDataFile)('categoryNames.json');
27
+ return !!categoryNames[category.toLowerCase()];
28
+ }
29
+ /**
30
+ * Get the IAM service to category mapping.
31
+ *
32
+ * @returns a map of IAM service keys to category keys
33
+ */
34
+ async function iamServiceCategoryMap() {
35
+ return (0, data_js_1.readDataFile)('serviceCategories.json');
36
+ }
37
+ /**
38
+ * Get IAM service keys assigned to a service category.
39
+ *
40
+ * @param category the category key to get IAM services for, is case insensitive
41
+ * @throws an error if the category does not exist
42
+ * @returns sorted IAM service keys assigned to the category
43
+ */
44
+ async function iamServicesForCategory(category) {
45
+ const categoryDetails = await getServiceCategory(category);
46
+ return categoryDetails.services;
47
+ }
48
+ /**
49
+ * Get the service category key for an IAM service.
50
+ *
51
+ * @param service the IAM service key to get the category for, is case insensitive
52
+ * @throws an error if the service does not exist or has no category mapping
53
+ * @returns the category key for the IAM service
54
+ */
55
+ async function categoryForIamService(service) {
56
+ const serviceKey = service.toLowerCase();
57
+ const serviceExists = await (0, services_js_1.iamServiceExists)(serviceKey);
58
+ if (!serviceExists) {
59
+ throw new Error(`Service ${service} does not exist`);
60
+ }
61
+ const serviceCategories = await iamServiceCategoryMap();
62
+ const category = serviceCategories[serviceKey];
63
+ if (!category) {
64
+ throw new Error(`Category for service ${service} does not exist`);
65
+ }
66
+ return category;
67
+ }
68
+ /**
69
+ * Get details for a service category.
70
+ *
71
+ * @param category the category key to get details for, is case insensitive
72
+ * @throws an error if the category does not exist
73
+ * @returns details for the service category
74
+ */
75
+ async function getServiceCategory(category) {
76
+ const categoryKey = category.toLowerCase();
77
+ const exists = await serviceCategoryExists(categoryKey);
78
+ if (!exists) {
79
+ throw new Error(`Category ${category} does not exist`);
80
+ }
81
+ return (0, data_js_1.readCategoryDetails)(categoryKey);
82
+ }
83
+ //# sourceMappingURL=categories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.js","sourceRoot":"","sources":["../../src/categories.ts"],"names":[],"mappings":";;AAoBA,8CAEC;AAQD,sDAGC;AAOD,sDAEC;AASD,wDAGC;AASD,sDAaC;AASD,gDAOC;AA5FD,uCAA6D;AAC7D,+CAAgD;AAchD;;;;GAIG;AACI,KAAK,UAAU,iBAAiB;IACrC,OAAO,IAAA,sBAAY,EAAW,iBAAiB,CAAC,CAAA;AAClD,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,qBAAqB,CAAC,QAAgB;IAC1D,MAAM,aAAa,GAAG,MAAM,IAAA,sBAAY,EAAyB,oBAAoB,CAAC,CAAA;IACtF,OAAO,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;AAChD,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,qBAAqB;IACzC,OAAO,IAAA,sBAAY,EAAyB,wBAAwB,CAAC,CAAA;AACvE,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,sBAAsB,CAAC,QAAgB;IAC3D,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IAC1D,OAAO,eAAe,CAAC,QAAQ,CAAA;AACjC,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,qBAAqB,CAAC,OAAe;IACzD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA;IACxC,MAAM,aAAa,GAAG,MAAM,IAAA,8BAAgB,EAAC,UAAU,CAAC,CAAA;IACxD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,WAAW,OAAO,iBAAiB,CAAC,CAAA;IACtD,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAM,qBAAqB,EAAE,CAAA;IACvD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAA;IAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,wBAAwB,OAAO,iBAAiB,CAAC,CAAA;IACnE,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,kBAAkB,CAAC,QAAgB;IACvD,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAA;IAC1C,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,WAAW,CAAC,CAAA;IACvD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,YAAY,QAAQ,iBAAiB,CAAC,CAAA;IACxD,CAAC;IACD,OAAO,IAAA,6BAAmB,EAAkB,WAAW,CAAC,CAAA;AAC1D,CAAC"}
@@ -20,6 +20,13 @@ export declare function readConditionKeys<T>(serviceKey: string): Promise<T>;
20
20
  * @returns the resource type data
21
21
  */
22
22
  export declare function readResourceTypes<T>(serviceKey: string): Promise<T>;
23
+ /**
24
+ * Read the category details data for a category
25
+ *
26
+ * @param categoryKey the category key to read details for
27
+ * @returns the category details data
28
+ */
29
+ export declare function readCategoryDetails<T>(categoryKey: string): Promise<T>;
23
30
  /**
24
31
  * Read the condition patterns data
25
32
  *
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CA0BxE;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEtE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEzE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEzE;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAE7F;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAEpF"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CA0BxE;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEtE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEzE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEzE;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAE5E;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAE7F;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAEpF"}
package/dist/cjs/data.js CHANGED
@@ -4,6 +4,7 @@ exports.readDataFile = readDataFile;
4
4
  exports.readActionData = readActionData;
5
5
  exports.readConditionKeys = readConditionKeys;
6
6
  exports.readResourceTypes = readResourceTypes;
7
+ exports.readCategoryDetails = readCategoryDetails;
7
8
  exports.readConditionPatterns = readConditionPatterns;
8
9
  exports.readUnassociatedConditions = readUnassociatedConditions;
9
10
  const readRelativeFile_js_1 = require("./readRelativeFile.js");
@@ -60,6 +61,15 @@ async function readConditionKeys(serviceKey) {
60
61
  async function readResourceTypes(serviceKey) {
61
62
  return readDataFile('resourceTypes', `${serviceKey}.json`);
62
63
  }
64
+ /**
65
+ * Read the category details data for a category
66
+ *
67
+ * @param categoryKey the category key to read details for
68
+ * @returns the category details data
69
+ */
70
+ async function readCategoryDetails(categoryKey) {
71
+ return readDataFile('categories', `${categoryKey}.json`);
72
+ }
63
73
  /**
64
74
  * Read the condition patterns data
65
75
  *
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":";;AAKA,oCA0BC;AAQD,wCAEC;AAQ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AAI,CAAA;QACb,CAAC;gBAAS,CAAC;YACT,OAAO,YAAY,CAAC,IAAI,CAAC,CAAA,CAAC,uDAAuD;QACnF,CAAC;IACH,CAAC,CAAC,EAAE,CAAA;IAEJ,OAAO,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAAI,UAAkB;IACxD,OAAO,YAAY,CAAI,SAAS,EAAE,GAAG,UAAU,OAAO,CAAC,CAAA;AACzD,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAAI,UAAkB;IAC3D,OAAO,YAAY,CAAI,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAA;AAC/D,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAAI,UAAkB;IAC3D,OAAO,YAAY,CAAI,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAA;AAC/D,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,mBAAmB,CAAI,WAAmB;IAC9D,OAAO,YAAY,CAAI,YAAY,EAAE,GAAG,WAAW,OAAO,CAAC,CAAA;AAC7D,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,qBAAqB;IACzC,OAAO,YAAY,CAAyC,wBAAwB,CAAC,CAAA;AACvF,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,0BAA0B;IAC9C,OAAO,YAAY,CAA2B,6BAA6B,CAAC,CAAA;AAC9E,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './actions.js';
2
+ export * from './categories.js';
2
3
  export * from './conditionKeys.js';
3
4
  export { findConditionKey } from './findConditionKey.js';
4
5
  export { getAllGlobalConditionKeys, getGlobalConditionKeyByName, getGlobalConditionKeyByPrefix, type GlobalConditionKey } from './globalConditionKeys.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
package/dist/cjs/index.js CHANGED
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.getGlobalConditionKeyByPrefix = exports.getGlobalConditionKeyByName = exports.getAllGlobalConditionKeys = exports.findConditionKey = void 0;
18
18
  __exportStar(require("./actions.js"), exports);
19
+ __exportStar(require("./categories.js"), exports);
19
20
  __exportStar(require("./conditionKeys.js"), exports);
20
21
  var findConditionKey_js_1 = require("./findConditionKey.js");
21
22
  Object.defineProperty(exports, "findConditionKey", { enumerable: true, get: function () { return findConditionKey_js_1.findConditionKey; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,qDAAkC;AAClC,6DAAwD;AAA/C,uHAAA,gBAAgB,OAAA;AACzB,mEAKiC;AAJ/B,mIAAA,yBAAyB,OAAA;AACzB,qIAAA,2BAA2B,OAAA;AAC3B,uIAAA,6BAA6B,OAAA;AAG/B,qDAAkC;AAClC,gDAA6B;AAC7B,+CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,kDAA+B;AAC/B,qDAAkC;AAClC,6DAAwD;AAA/C,uHAAA,gBAAgB,OAAA;AACzB,mEAKiC;AAJ/B,mIAAA,yBAAyB,OAAA;AACzB,qIAAA,2BAA2B,OAAA;AAC3B,uIAAA,6BAA6B,OAAA;AAG/B,qDAAkC;AAClC,gDAA6B;AAC7B,+CAA4B"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Details for an AWS service category and the IAM services assigned to it.
3
+ */
4
+ export interface CategoryDetails {
5
+ /** Stable lowercase category key. */
6
+ readonly key: string;
7
+ /** Properly capitalized category name from AWS. */
8
+ readonly name: string;
9
+ /** Sorted IAM service keys assigned to the category. */
10
+ readonly services: string[];
11
+ }
12
+ /**
13
+ * Get all service category keys.
14
+ *
15
+ * @returns an array of all service category keys
16
+ */
17
+ export declare function serviceCategories(): Promise<string[]>;
18
+ /**
19
+ * Check if a service category exists.
20
+ *
21
+ * @param category the category key to check, is case insensitive
22
+ * @returns true if the category exists, false otherwise
23
+ */
24
+ export declare function serviceCategoryExists(category: string): Promise<boolean>;
25
+ /**
26
+ * Get the IAM service to category mapping.
27
+ *
28
+ * @returns a map of IAM service keys to category keys
29
+ */
30
+ export declare function iamServiceCategoryMap(): Promise<Record<string, string>>;
31
+ /**
32
+ * Get IAM service keys assigned to a service category.
33
+ *
34
+ * @param category the category key to get IAM services for, is case insensitive
35
+ * @throws an error if the category does not exist
36
+ * @returns sorted IAM service keys assigned to the category
37
+ */
38
+ export declare function iamServicesForCategory(category: string): Promise<string[]>;
39
+ /**
40
+ * Get the service category key for an IAM service.
41
+ *
42
+ * @param service the IAM service key to get the category for, is case insensitive
43
+ * @throws an error if the service does not exist or has no category mapping
44
+ * @returns the category key for the IAM service
45
+ */
46
+ export declare function categoryForIamService(service: string): Promise<string>;
47
+ /**
48
+ * Get details for a service category.
49
+ *
50
+ * @param category the category key to get details for, is case insensitive
51
+ * @throws an error if the category does not exist
52
+ * @returns details for the service category
53
+ */
54
+ export declare function getServiceCategory(category: string): Promise<CategoryDetails>;
55
+ //# sourceMappingURL=categories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../src/categories.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAE3D;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG9E;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAE7E;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAGhF;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAa5E;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAOnF"}
@@ -0,0 +1,75 @@
1
+ import { readCategoryDetails, readDataFile } from './data.js';
2
+ import { iamServiceExists } from './services.js';
3
+ /**
4
+ * Get all service category keys.
5
+ *
6
+ * @returns an array of all service category keys
7
+ */
8
+ export async function serviceCategories() {
9
+ return readDataFile('categories.json');
10
+ }
11
+ /**
12
+ * Check if a service category exists.
13
+ *
14
+ * @param category the category key to check, is case insensitive
15
+ * @returns true if the category exists, false otherwise
16
+ */
17
+ export async function serviceCategoryExists(category) {
18
+ const categoryNames = await readDataFile('categoryNames.json');
19
+ return !!categoryNames[category.toLowerCase()];
20
+ }
21
+ /**
22
+ * Get the IAM service to category mapping.
23
+ *
24
+ * @returns a map of IAM service keys to category keys
25
+ */
26
+ export async function iamServiceCategoryMap() {
27
+ return readDataFile('serviceCategories.json');
28
+ }
29
+ /**
30
+ * Get IAM service keys assigned to a service category.
31
+ *
32
+ * @param category the category key to get IAM services for, is case insensitive
33
+ * @throws an error if the category does not exist
34
+ * @returns sorted IAM service keys assigned to the category
35
+ */
36
+ export async function iamServicesForCategory(category) {
37
+ const categoryDetails = await getServiceCategory(category);
38
+ return categoryDetails.services;
39
+ }
40
+ /**
41
+ * Get the service category key for an IAM service.
42
+ *
43
+ * @param service the IAM service key to get the category for, is case insensitive
44
+ * @throws an error if the service does not exist or has no category mapping
45
+ * @returns the category key for the IAM service
46
+ */
47
+ export async function categoryForIamService(service) {
48
+ const serviceKey = service.toLowerCase();
49
+ const serviceExists = await iamServiceExists(serviceKey);
50
+ if (!serviceExists) {
51
+ throw new Error(`Service ${service} does not exist`);
52
+ }
53
+ const serviceCategories = await iamServiceCategoryMap();
54
+ const category = serviceCategories[serviceKey];
55
+ if (!category) {
56
+ throw new Error(`Category for service ${service} does not exist`);
57
+ }
58
+ return category;
59
+ }
60
+ /**
61
+ * Get details for a service category.
62
+ *
63
+ * @param category the category key to get details for, is case insensitive
64
+ * @throws an error if the category does not exist
65
+ * @returns details for the service category
66
+ */
67
+ export async function getServiceCategory(category) {
68
+ const categoryKey = category.toLowerCase();
69
+ const exists = await serviceCategoryExists(categoryKey);
70
+ if (!exists) {
71
+ throw new Error(`Category ${category} does not exist`);
72
+ }
73
+ return readCategoryDetails(categoryKey);
74
+ }
75
+ //# sourceMappingURL=categories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.js","sourceRoot":"","sources":["../../src/categories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAchD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,OAAO,YAAY,CAAW,iBAAiB,CAAC,CAAA;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,QAAgB;IAC1D,MAAM,aAAa,GAAG,MAAM,YAAY,CAAyB,oBAAoB,CAAC,CAAA;IACtF,OAAO,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,OAAO,YAAY,CAAyB,wBAAwB,CAAC,CAAA;AACvE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,QAAgB;IAC3D,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IAC1D,OAAO,eAAe,CAAC,QAAQ,CAAA;AACjC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAe;IACzD,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA;IACxC,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC,UAAU,CAAC,CAAA;IACxD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,WAAW,OAAO,iBAAiB,CAAC,CAAA;IACtD,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAM,qBAAqB,EAAE,CAAA;IACvD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAA;IAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,wBAAwB,OAAO,iBAAiB,CAAC,CAAA;IACnE,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,QAAgB;IACvD,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAA;IAC1C,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,WAAW,CAAC,CAAA;IACvD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,YAAY,QAAQ,iBAAiB,CAAC,CAAA;IACxD,CAAC;IACD,OAAO,mBAAmB,CAAkB,WAAW,CAAC,CAAA;AAC1D,CAAC"}
@@ -20,6 +20,13 @@ export declare function readConditionKeys<T>(serviceKey: string): Promise<T>;
20
20
  * @returns the resource type data
21
21
  */
22
22
  export declare function readResourceTypes<T>(serviceKey: string): Promise<T>;
23
+ /**
24
+ * Read the category details data for a category
25
+ *
26
+ * @param categoryKey the category key to read details for
27
+ * @returns the category details data
28
+ */
29
+ export declare function readCategoryDetails<T>(categoryKey: string): Promise<T>;
23
30
  /**
24
31
  * Read the condition patterns data
25
32
  *
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CA0BxE;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEtE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,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AAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAEpF"}
package/dist/esm/data.js CHANGED
@@ -52,6 +52,15 @@ export async function readConditionKeys(serviceKey) {
52
52
  export async function readResourceTypes(serviceKey) {
53
53
  return readDataFile('resourceTypes', `${serviceKey}.json`);
54
54
  }
55
+ /**
56
+ * Read the category details data for a category
57
+ *
58
+ * @param categoryKey the category key to read details for
59
+ * @returns the category details data
60
+ */
61
+ export async function readCategoryDetails(categoryKey) {
62
+ return readDataFile('categories', `${categoryKey}.json`);
63
+ }
55
64
  /**
56
65
  * Read the condition patterns data
57
66
  *
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,SAAS,GAAwB,EAAE,CAAA;AACzC,MAAM,YAAY,GAAiC,EAAE,CAAA;AAErD,MAAM,CAAC,KAAK,UAAU,YAAY,CAAI,GAAG,SAAmB;IAC1D,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IACzB,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAEhC,wDAAwD;IACxD,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;IAED,8DAA8D;IAC9D,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACrC,OAAO,YAAY,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAED,iEAAiE;IACjE,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE;QAC/B,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC,SAAS,CAAC,CAAA;YAC9C,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA,CAAC,0BAA0B;YACjD,OAAO,IAAI,CAAA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H,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,OAAO,YAAY,CAAyC,wBAAwB,CAAC,CAAA;AACvF,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B;IAC9C,OAAO,YAAY,CAA2B,6BAA6B,CAAC,CAAA;AAC9E,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './actions.js';
2
+ export * from './categories.js';
2
3
  export * from './conditionKeys.js';
3
4
  export { findConditionKey } from './findConditionKey.js';
4
5
  export { getAllGlobalConditionKeys, getGlobalConditionKeyByName, getGlobalConditionKeyByPrefix, type GlobalConditionKey } from './globalConditionKeys.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
package/dist/esm/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './actions.js';
2
+ export * from './categories.js';
2
3
  export * from './conditionKeys.js';
3
4
  export { findConditionKey } from './findConditionKey.js';
4
5
  export { getAllGlobalConditionKeys, getGlobalConditionKeyByName, getGlobalConditionKeyByPrefix } from './globalConditionKeys.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAE9B,MAAM,0BAA0B,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAE9B,MAAM,0BAA0B,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@cloud-copilot/iam-data",
3
- "version": "0.19.202607151",
3
+ "version": "0.20.202607161",
4
4
  "description": "AWS IAM Data",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/cloud-copilot/iam-data.git"
8
8
  },
9
- "updatedAt": "2026-07-15T15:32:31.487Z",
9
+ "updatedAt": "2026-07-16T05:31:50.198Z",
10
10
  "exports": {
11
11
  ".": {
12
12
  "import": "./dist/esm/index.js",