@cloud-copilot/iam-data 0.0.1 → 0.0.202408251

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.
Files changed (56) hide show
  1. package/data/actions/wisdom.json +114 -114
  2. package/data/actions/workspaces-web.json +1 -2
  3. package/data/resourceTypes/wisdom.json +7 -7
  4. package/data/serviceNames.json +2 -2
  5. package/data/services.json +1 -1
  6. package/package.json +1 -1
  7. package/dist/cjs/actions.d.ts +0 -40
  8. package/dist/cjs/actions.d.ts.map +0 -1
  9. package/dist/cjs/actions.js +0 -43
  10. package/dist/cjs/actions.js.map +0 -1
  11. package/dist/cjs/conditionKeys.d.ts +0 -30
  12. package/dist/cjs/conditionKeys.d.ts.map +0 -1
  13. package/dist/cjs/conditionKeys.js +0 -43
  14. package/dist/cjs/conditionKeys.js.map +0 -1
  15. package/dist/cjs/data.d.ts +0 -29
  16. package/dist/cjs/data.d.ts.map +0 -1
  17. package/dist/cjs/data.js +0 -63
  18. package/dist/cjs/data.js.map +0 -1
  19. package/dist/cjs/index.d.ts +0 -5
  20. package/dist/cjs/index.d.ts.map +0 -1
  21. package/dist/cjs/index.js +0 -21
  22. package/dist/cjs/index.js.map +0 -1
  23. package/dist/cjs/package.json +0 -3
  24. package/dist/cjs/resourceTypes.d.ts +0 -29
  25. package/dist/cjs/resourceTypes.d.ts.map +0 -1
  26. package/dist/cjs/resourceTypes.js +0 -42
  27. package/dist/cjs/resourceTypes.js.map +0 -1
  28. package/dist/cjs/services.d.ts +0 -22
  29. package/dist/cjs/services.d.ts.map +0 -1
  30. package/dist/cjs/services.js +0 -39
  31. package/dist/cjs/services.js.map +0 -1
  32. package/dist/esm/actions.d.ts +0 -40
  33. package/dist/esm/actions.d.ts.map +0 -1
  34. package/dist/esm/actions.js +0 -38
  35. package/dist/esm/actions.js.map +0 -1
  36. package/dist/esm/conditionKeys.d.ts +0 -30
  37. package/dist/esm/conditionKeys.d.ts.map +0 -1
  38. package/dist/esm/conditionKeys.js +0 -38
  39. package/dist/esm/conditionKeys.js.map +0 -1
  40. package/dist/esm/data.d.ts +0 -29
  41. package/dist/esm/data.d.ts.map +0 -1
  42. package/dist/esm/data.js +0 -57
  43. package/dist/esm/data.js.map +0 -1
  44. package/dist/esm/index.d.ts +0 -5
  45. package/dist/esm/index.d.ts.map +0 -1
  46. package/dist/esm/index.js +0 -5
  47. package/dist/esm/index.js.map +0 -1
  48. package/dist/esm/package.json +0 -3
  49. package/dist/esm/resourceTypes.d.ts +0 -29
  50. package/dist/esm/resourceTypes.d.ts.map +0 -1
  51. package/dist/esm/resourceTypes.js +0 -37
  52. package/dist/esm/resourceTypes.js.map +0 -1
  53. package/dist/esm/services.d.ts +0 -22
  54. package/dist/esm/services.d.ts.map +0 -1
  55. package/dist/esm/services.js +0 -34
  56. package/dist/esm/services.js.map +0 -1
@@ -46,6 +46,30 @@
46
46
  ],
47
47
  "dependentActions": []
48
48
  },
49
+ "CreateContentAssociation": {
50
+ "name": "CreateContentAssociation",
51
+ "description": "Grants permission to create a content association",
52
+ "accessLevel": "Write",
53
+ "resourceTypes": [
54
+ {
55
+ "name": "Content",
56
+ "required": true,
57
+ "conditionKeys": [],
58
+ "dependentActions": []
59
+ },
60
+ {
61
+ "name": "KnowledgeBase",
62
+ "required": true,
63
+ "conditionKeys": [],
64
+ "dependentActions": []
65
+ }
66
+ ],
67
+ "conditionKeys": [
68
+ "aws:TagKeys",
69
+ "aws:RequestTag/${TagKey}"
70
+ ],
71
+ "dependentActions": []
72
+ },
49
73
  "CreateKnowledgeBase": {
50
74
  "name": "CreateKnowledgeBase",
51
75
  "description": "Grants permission to create a knowledge base",
@@ -150,6 +174,33 @@
150
174
  "conditionKeys": [],
151
175
  "dependentActions": []
152
176
  },
177
+ "DeleteContentAssociation": {
178
+ "name": "DeleteContentAssociation",
179
+ "description": "Grants permission to delete a content association",
180
+ "accessLevel": "Write",
181
+ "resourceTypes": [
182
+ {
183
+ "name": "Content",
184
+ "required": true,
185
+ "conditionKeys": [],
186
+ "dependentActions": []
187
+ },
188
+ {
189
+ "name": "ContentAssociation",
190
+ "required": true,
191
+ "conditionKeys": [],
192
+ "dependentActions": []
193
+ },
194
+ {
195
+ "name": "KnowledgeBase",
196
+ "required": true,
197
+ "conditionKeys": [],
198
+ "dependentActions": []
199
+ }
200
+ ],
201
+ "conditionKeys": [],
202
+ "dependentActions": []
203
+ },
153
204
  "DeleteImportJob": {
154
205
  "name": "DeleteImportJob",
155
206
  "description": "Grants permission to delete a import job of a knowledge base",
@@ -258,6 +309,33 @@
258
309
  "conditionKeys": [],
259
310
  "dependentActions": []
260
311
  },
312
+ "GetContentAssociation": {
313
+ "name": "GetContentAssociation",
314
+ "description": "Grants permission to retrieve information about a content association",
315
+ "accessLevel": "Read",
316
+ "resourceTypes": [
317
+ {
318
+ "name": "Content",
319
+ "required": true,
320
+ "conditionKeys": [],
321
+ "dependentActions": []
322
+ },
323
+ {
324
+ "name": "ContentAssociation",
325
+ "required": true,
326
+ "conditionKeys": [],
327
+ "dependentActions": []
328
+ },
329
+ {
330
+ "name": "KnowledgeBase",
331
+ "required": true,
332
+ "conditionKeys": [],
333
+ "dependentActions": []
334
+ }
335
+ ],
336
+ "conditionKeys": [],
337
+ "dependentActions": []
338
+ },
261
339
  "GetContentSummary": {
262
340
  "name": "GetContentSummary",
263
341
  "description": "Grants permission to retrieve summary information about the content",
@@ -389,6 +467,27 @@
389
467
  "conditionKeys": [],
390
468
  "dependentActions": []
391
469
  },
470
+ "ListContentAssociations": {
471
+ "name": "ListContentAssociations",
472
+ "description": "Grants permission to list information about content associations",
473
+ "accessLevel": "List",
474
+ "resourceTypes": [
475
+ {
476
+ "name": "Content",
477
+ "required": true,
478
+ "conditionKeys": [],
479
+ "dependentActions": []
480
+ },
481
+ {
482
+ "name": "KnowledgeBase",
483
+ "required": true,
484
+ "conditionKeys": [],
485
+ "dependentActions": []
486
+ }
487
+ ],
488
+ "conditionKeys": [],
489
+ "dependentActions": []
490
+ },
392
491
  "ListContents": {
393
492
  "name": "ListContents",
394
493
  "description": "Grants permission to list the content with a knowledge base",
@@ -465,6 +564,21 @@
465
564
  "conditionKeys": [],
466
565
  "dependentActions": []
467
566
  },
567
+ "PutFeedback": {
568
+ "name": "PutFeedback",
569
+ "description": "Grants permission to submit feedback",
570
+ "accessLevel": "Write",
571
+ "resourceTypes": [
572
+ {
573
+ "name": "Assistant",
574
+ "required": true,
575
+ "conditionKeys": [],
576
+ "dependentActions": []
577
+ }
578
+ ],
579
+ "conditionKeys": [],
580
+ "dependentActions": []
581
+ },
468
582
  "QueryAssistant": {
469
583
  "name": "QueryAssistant",
470
584
  "description": "Grants permission to perform a manual search against the specified assistant",
@@ -743,120 +857,6 @@
743
857
  "conditionKeys": [],
744
858
  "dependentActions": []
745
859
  },
746
- "CreateContentAssociation": {
747
- "name": "CreateContentAssociation",
748
- "description": "Grants permission to create a content association",
749
- "accessLevel": "Write",
750
- "resourceTypes": [
751
- {
752
- "name": "Content",
753
- "required": true,
754
- "conditionKeys": [],
755
- "dependentActions": []
756
- },
757
- {
758
- "name": "KnowledgeBase",
759
- "required": true,
760
- "conditionKeys": [],
761
- "dependentActions": []
762
- }
763
- ],
764
- "conditionKeys": [
765
- "aws:TagKeys",
766
- "aws:RequestTag/${TagKey}"
767
- ],
768
- "dependentActions": []
769
- },
770
- "DeleteContentAssociation": {
771
- "name": "DeleteContentAssociation",
772
- "description": "Grants permission to delete a content association",
773
- "accessLevel": "Write",
774
- "resourceTypes": [
775
- {
776
- "name": "Content",
777
- "required": true,
778
- "conditionKeys": [],
779
- "dependentActions": []
780
- },
781
- {
782
- "name": "ContentAssociation",
783
- "required": true,
784
- "conditionKeys": [],
785
- "dependentActions": []
786
- },
787
- {
788
- "name": "KnowledgeBase",
789
- "required": true,
790
- "conditionKeys": [],
791
- "dependentActions": []
792
- }
793
- ],
794
- "conditionKeys": [],
795
- "dependentActions": []
796
- },
797
- "GetContentAssociation": {
798
- "name": "GetContentAssociation",
799
- "description": "Grants permission to retrieve information about a content association",
800
- "accessLevel": "Read",
801
- "resourceTypes": [
802
- {
803
- "name": "Content",
804
- "required": true,
805
- "conditionKeys": [],
806
- "dependentActions": []
807
- },
808
- {
809
- "name": "ContentAssociation",
810
- "required": true,
811
- "conditionKeys": [],
812
- "dependentActions": []
813
- },
814
- {
815
- "name": "KnowledgeBase",
816
- "required": true,
817
- "conditionKeys": [],
818
- "dependentActions": []
819
- }
820
- ],
821
- "conditionKeys": [],
822
- "dependentActions": []
823
- },
824
- "ListContentAssociations": {
825
- "name": "ListContentAssociations",
826
- "description": "Grants permission to list information about content associations",
827
- "accessLevel": "List",
828
- "resourceTypes": [
829
- {
830
- "name": "Content",
831
- "required": true,
832
- "conditionKeys": [],
833
- "dependentActions": []
834
- },
835
- {
836
- "name": "KnowledgeBase",
837
- "required": true,
838
- "conditionKeys": [],
839
- "dependentActions": []
840
- }
841
- ],
842
- "conditionKeys": [],
843
- "dependentActions": []
844
- },
845
- "PutFeedback": {
846
- "name": "PutFeedback",
847
- "description": "Grants permission to submit feedback",
848
- "accessLevel": "Write",
849
- "resourceTypes": [
850
- {
851
- "name": "Assistant",
852
- "required": true,
853
- "conditionKeys": [],
854
- "dependentActions": []
855
- }
856
- ],
857
- "conditionKeys": [],
858
- "dependentActions": []
859
- },
860
860
  "UpdateSession": {
861
861
  "name": "UpdateSession",
862
862
  "description": "Grants permission to update a session",
@@ -802,8 +802,7 @@
802
802
  }
803
803
  ],
804
804
  "conditionKeys": [
805
- "aws:TagKeys",
806
- "aws:RequestTag/${TagKey}"
805
+ "aws:TagKeys"
807
806
  ],
808
807
  "dependentActions": []
809
808
  },
@@ -20,6 +20,13 @@
20
20
  "aws:ResourceTag/${TagKey}"
21
21
  ]
22
22
  },
23
+ "ContentAssociation": {
24
+ "key": "ContentAssociation",
25
+ "arn": "arn:${Partition}:wisdom:${Region}:${Account}:content-association/${KnowledgeBaseId}/${ContentId}/${ContentAssociationId}",
26
+ "conditionKeys": [
27
+ "aws:ResourceTag/${TagKey}"
28
+ ]
29
+ },
23
30
  "KnowledgeBase": {
24
31
  "key": "KnowledgeBase",
25
32
  "arn": "arn:${Partition}:wisdom:${Region}:${Account}:knowledge-base/${KnowledgeBaseId}",
@@ -40,12 +47,5 @@
40
47
  "conditionKeys": [
41
48
  "aws:ResourceTag/${TagKey}"
42
49
  ]
43
- },
44
- "ContentAssociation": {
45
- "key": "ContentAssociation",
46
- "arn": "arn:${Partition}:wisdom:${Region}:${Account}:content-association/${KnowledgeBaseId}/${ContentId}/${ContentAssociationId}",
47
- "conditionKeys": [
48
- "aws:ResourceTag/${TagKey}"
49
- ]
50
50
  }
51
51
  }
@@ -28,7 +28,7 @@
28
28
  "bcm-data-exports": "AWS Billing And Cost Management Data Exports",
29
29
  "billingconductor": "AWS Billing Conductor",
30
30
  "aws-portal": "AWS Billing Console",
31
- "billing": "AWS Billing and Cost Management",
31
+ "billing": "AWS Billing",
32
32
  "budgets": "AWS Budget Service",
33
33
  "bugbust": "AWS BugBust",
34
34
  "acm": "AWS Certificate Manager",
@@ -255,7 +255,6 @@
255
255
  "cases": "Amazon Connect Cases",
256
256
  "profile": "Amazon Connect Customer Profiles",
257
257
  "voiceid": "Amazon Connect Voice ID",
258
- "wisdom": "Amazon Connect Wisdom",
259
258
  "connect": "Amazon Connect",
260
259
  "dlm": "Amazon Data Lifecycle Manager",
261
260
  "datazone": "Amazon DataZone",
@@ -343,6 +342,7 @@
343
342
  "polly": "Amazon Polly",
344
343
  "qapps": "Amazon Q Business Q Apps",
345
344
  "qbusiness": "Amazon Q Business",
345
+ "wisdom": "Amazon Q in Connect",
346
346
  "q": "Amazon Q",
347
347
  "qldb": "Amazon QLDB",
348
348
  "quicksight": "Amazon QuickSight",
@@ -255,7 +255,6 @@
255
255
  "cases",
256
256
  "profile",
257
257
  "voiceid",
258
- "wisdom",
259
258
  "connect",
260
259
  "dlm",
261
260
  "datazone",
@@ -343,6 +342,7 @@
343
342
  "polly",
344
343
  "qapps",
345
344
  "qbusiness",
345
+ "wisdom",
346
346
  "q",
347
347
  "qldb",
348
348
  "quicksight",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-copilot/iam-data",
3
- "version": "0.0.1",
3
+ "version": "0.0.202408251",
4
4
  "description": "AWS IAM Data",
5
5
  "repository": "github:cloud-copilot/iam-data",
6
6
  "exports": {
@@ -1,40 +0,0 @@
1
- interface ActionResourceType {
2
- "name": string;
3
- "required": boolean;
4
- "conditionKeys": string[];
5
- "dependentActions": string[];
6
- }
7
- interface Action {
8
- "name": string;
9
- "description": string;
10
- "accessLevel": "Read" | "Write" | "List" | "Tagging";
11
- "resourceTypes": ActionResourceType[];
12
- "conditionKeys": string[];
13
- "dependentActions": string[];
14
- }
15
- /**
16
- * Get all actions for a service
17
- *
18
- * @param serviceKey the service key to get actions for
19
- * @returns the actions for the service
20
- */
21
- export declare function getActionsForService(serviceKey: string): string[];
22
- /**
23
- * Check if an action exists
24
- *
25
- * @param serviceKey the service key to check for the action
26
- * @param actionKey the action key to check for
27
- * @returns true if the action exists, false otherwise
28
- */
29
- export declare function actionExists(serviceKey: string, actionKey: string): boolean;
30
- /**
31
- * Get the details for an action
32
- *
33
- * @param serviceKey the service key to get the action for
34
- * @param actionKey the action key to get the details for
35
- * @throws error if the service or action does not exist
36
- * @returns the details for the action
37
- */
38
- export declare function getActionDetails(serviceKey: string, actionKey: string): Action;
39
- export {};
40
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B;AAED,UAAU,MAAM;IACd,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACrD,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGjE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAG3E;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAM9E"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getActionsForService = getActionsForService;
4
- exports.actionExists = actionExists;
5
- exports.getActionDetails = getActionDetails;
6
- const data_1 = require("./data");
7
- /**
8
- * Get all actions for a service
9
- *
10
- * @param serviceKey the service key to get actions for
11
- * @returns the actions for the service
12
- */
13
- function getActionsForService(serviceKey) {
14
- const data = (0, data_1.readActionData)(serviceKey);
15
- return Object.keys(data);
16
- }
17
- /**
18
- * Check if an action exists
19
- *
20
- * @param serviceKey the service key to check for the action
21
- * @param actionKey the action key to check for
22
- * @returns true if the action exists, false otherwise
23
- */
24
- function actionExists(serviceKey, actionKey) {
25
- const data = (0, data_1.readActionData)(serviceKey);
26
- return !!data[actionKey];
27
- }
28
- /**
29
- * Get the details for an action
30
- *
31
- * @param serviceKey the service key to get the action for
32
- * @param actionKey the action key to get the details for
33
- * @throws error if the service or action does not exist
34
- * @returns the details for the action
35
- */
36
- function getActionDetails(serviceKey, actionKey) {
37
- const data = (0, data_1.readActionData)(serviceKey);
38
- if (!data[actionKey]) {
39
- throw new Error(`Action ${actionKey} does not exist for service ${serviceKey}`);
40
- }
41
- return data[actionKey];
42
- }
43
- //# sourceMappingURL=actions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":";;AAwBA,oDAGC;AASD,oCAGC;AAUD,4CAMC;AAvDD,iCAAuC;AAkBvC;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,UAAkB;IACrD,MAAM,IAAI,GAAG,IAAA,qBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,UAAkB,EAAE,SAAiB;IAChE,MAAM,IAAI,GAAG,IAAA,qBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAC,UAAkB,EAAE,SAAiB;IACpE,MAAM,IAAI,GAAG,IAAA,qBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,IAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,+BAA+B,UAAU,EAAE,CAAC,CAAA;IACjF,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAA;AACxB,CAAC"}
@@ -1,30 +0,0 @@
1
- export interface ConditionKey {
2
- key: string;
3
- description: string;
4
- type: string;
5
- }
6
- /**
7
- * Reads the condition keys for a service
8
- *
9
- * @param serviceKey the service key to read the condition keys for
10
- * @returns the condition keys for the service
11
- */
12
- export declare function getConditionKeysForService(serviceKey: string): string[];
13
- /**
14
- * Check if a condition key exists
15
- *
16
- * @param serviceKey the service key to check for the condition key
17
- * @param conditionKey the condition key to check for
18
- * @returns true if the condition key exists, false otherwise
19
- */
20
- export declare function conditionKeyExists(serviceKey: string, conditionKey: string): boolean;
21
- /**
22
- * Get the details for a condition key
23
- *
24
- * @param serviceKey the service key to get the condition key for
25
- * @param conditionKey the condition key to get the details for
26
- * @throws error if the service or condition key does not exist
27
- * @returns the details for the condition key
28
- */
29
- export declare function getConditionKeyDetails(serviceKey: string, conditionKey: string): ConditionKey;
30
- //# sourceMappingURL=conditionKeys.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditionKeys.d.ts","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAGpF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CAM7F"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getConditionKeysForService = getConditionKeysForService;
4
- exports.conditionKeyExists = conditionKeyExists;
5
- exports.getConditionKeyDetails = getConditionKeyDetails;
6
- const data_1 = require("./data");
7
- /**
8
- * Reads the condition keys for a service
9
- *
10
- * @param serviceKey the service key to read the condition keys for
11
- * @returns the condition keys for the service
12
- */
13
- function getConditionKeysForService(serviceKey) {
14
- const data = (0, data_1.readConditionKeys)(serviceKey);
15
- return Object.keys(data);
16
- }
17
- /**
18
- * Check if a condition key exists
19
- *
20
- * @param serviceKey the service key to check for the condition key
21
- * @param conditionKey the condition key to check for
22
- * @returns true if the condition key exists, false otherwise
23
- */
24
- function conditionKeyExists(serviceKey, conditionKey) {
25
- const data = (0, data_1.readConditionKeys)(serviceKey);
26
- return !!data[conditionKey];
27
- }
28
- /**
29
- * Get the details for a condition key
30
- *
31
- * @param serviceKey the service key to get the condition key for
32
- * @param conditionKey the condition key to get the details for
33
- * @throws error if the service or condition key does not exist
34
- * @returns the details for the condition key
35
- */
36
- function getConditionKeyDetails(serviceKey, conditionKey) {
37
- const data = (0, data_1.readConditionKeys)(serviceKey);
38
- if (!data[conditionKey]) {
39
- throw new Error(`Condition key ${conditionKey} does not exist for service ${serviceKey}`);
40
- }
41
- return data[conditionKey];
42
- }
43
- //# sourceMappingURL=conditionKeys.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditionKeys.js","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":";;AAcA,gEAGC;AASD,gDAGC;AAUD,wDAMC;AA7CD,iCAA0C;AAQ1C;;;;;GAKG;AACH,SAAgB,0BAA0B,CAAC,UAAkB;IAC3D,MAAM,IAAI,GAAG,IAAA,wBAAiB,EAA+B,UAAU,CAAC,CAAA;IACxE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,UAAkB,EAAE,YAAoB;IACzE,MAAM,IAAI,GAAG,IAAA,wBAAiB,EAA+B,UAAU,CAAC,CAAA;IACxE,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAC,UAAkB,EAAE,YAAoB;IAC7E,MAAM,IAAI,GAAG,IAAA,wBAAiB,EAA+B,UAAU,CAAC,CAAA;IACxE,IAAG,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,+BAA+B,UAAU,EAAE,CAAC,CAAA;IAC3F,CAAC;IACD,OAAO,IAAI,CAAC,YAAY,CAAC,CAAA;AAC3B,CAAC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Get a data file from the data directory
3
- *
4
- * @param file the path to the file to retrieve data for.
5
- * @returns the data from the file
6
- */
7
- export declare function readDataFile<T>(file: string): T;
8
- /**
9
- * Read the action data for a service
10
- *
11
- * @param serviceKey the service key to read the action data for
12
- * @returns the action data for the service
13
- */
14
- export declare function readActionData<T>(serviceKey: string): T;
15
- /**
16
- * Read the condition key data for a service
17
- *
18
- * @param serviceKey the service key to read the condition key data for
19
- * @returns the condition key data
20
- */
21
- export declare function readConditionKeys<T>(serviceKey: string): T;
22
- /**
23
- * Read the resource type data for a service
24
- *
25
- * @param serviceKey the service key to read the resource type data for
26
- * @returns the resource type data
27
- */
28
- export declare function readResourceTypes<T>(serviceKey: string): T;
29
- //# sourceMappingURL=data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAM/C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D"}
package/dist/cjs/data.js DELETED
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readDataFile = readDataFile;
4
- exports.readActionData = readActionData;
5
- exports.readConditionKeys = readConditionKeys;
6
- exports.readResourceTypes = readResourceTypes;
7
- const fs_1 = require("fs");
8
- const path_1 = require("path");
9
- let dataRoot = (0, path_1.join)(__dirname, '..', '..', 'data');
10
- if (__dirname.endsWith('src')) {
11
- dataRoot = (0, path_1.join)(__dirname, '..', 'data');
12
- }
13
- /**
14
- * Get the root path to the data directory
15
- *
16
- * @returns the root path to the data directory
17
- */
18
- // function dataRoot(): string {
19
- // console.log(__dirname);
20
- // return join(__dirname, '..', 'data');
21
- // }
22
- const dataCache = {};
23
- /**
24
- * Get a data file from the data directory
25
- *
26
- * @param file the path to the file to retrieve data for.
27
- * @returns the data from the file
28
- */
29
- function readDataFile(file) {
30
- if (!dataCache[file]) {
31
- const data = (0, fs_1.readFileSync)((0, path_1.join)(dataRoot, file), 'utf8');
32
- dataCache[file] = JSON.parse(data);
33
- }
34
- return dataCache[file];
35
- }
36
- /**
37
- * Read the action data for a service
38
- *
39
- * @param serviceKey the service key to read the action data for
40
- * @returns the action data for the service
41
- */
42
- function readActionData(serviceKey) {
43
- return readDataFile((0, path_1.join)('actions', `${serviceKey}.json`));
44
- }
45
- /**
46
- * Read the condition key data for a service
47
- *
48
- * @param serviceKey the service key to read the condition key data for
49
- * @returns the condition key data
50
- */
51
- function readConditionKeys(serviceKey) {
52
- return readDataFile((0, path_1.join)('conditionKeys', `${serviceKey}.json`));
53
- }
54
- /**
55
- * Read the resource type data for a service
56
- *
57
- * @param serviceKey the service key to read the resource type data for
58
- * @returns the resource type data
59
- */
60
- function readResourceTypes(serviceKey) {
61
- return readDataFile((0, path_1.join)('resourceTypes', `${serviceKey}.json`));
62
- }
63
- //# sourceMappingURL=data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":";;AA0BA,oCAMC;AAQD,wCAEC;AAQD,8CAEC;AAQD,8CAEC;AA9DD,2BAAkC;AAClC,+BAA4B;AAE5B,IAAI,QAAQ,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACnD,IAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7B,QAAQ,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,gCAAgC;AAChC,4BAA4B;AAC5B,0CAA0C;AAC1C,IAAI;AAEJ,MAAM,SAAS,GAAwB,EAAE,CAAC;AAE1C;;;;;GAKG;AACH,SAAgB,YAAY,CAAI,IAAY;IAC1C,IAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QACxD,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAI,UAAkB;IAClD,OAAO,YAAY,CAAI,IAAA,WAAI,EAAC,SAAS,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAI,UAAkB;IACrD,OAAO,YAAY,CAAI,IAAA,WAAI,EAAC,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAI,UAAkB;IACrD,OAAO,YAAY,CAAI,IAAA,WAAI,EAAC,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './actions';
2
- export * from './conditionKeys';
3
- export * from './resourceTypes';
4
- export * from './services';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
package/dist/cjs/index.js DELETED
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./actions"), exports);
18
- __exportStar(require("./conditionKeys"), exports);
19
- __exportStar(require("./resourceTypes"), exports);
20
- __exportStar(require("./services"), exports);
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,kDAAgC;AAChC,6CAA2B"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }