@cloud-copilot/iam-data 0.0.1 → 0.0.202408250
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/package.json +1 -1
- package/dist/cjs/actions.d.ts +0 -40
- package/dist/cjs/actions.d.ts.map +0 -1
- package/dist/cjs/actions.js +0 -43
- package/dist/cjs/actions.js.map +0 -1
- package/dist/cjs/conditionKeys.d.ts +0 -30
- package/dist/cjs/conditionKeys.d.ts.map +0 -1
- package/dist/cjs/conditionKeys.js +0 -43
- package/dist/cjs/conditionKeys.js.map +0 -1
- package/dist/cjs/data.d.ts +0 -29
- package/dist/cjs/data.d.ts.map +0 -1
- package/dist/cjs/data.js +0 -63
- package/dist/cjs/data.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -5
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -21
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/resourceTypes.d.ts +0 -29
- package/dist/cjs/resourceTypes.d.ts.map +0 -1
- package/dist/cjs/resourceTypes.js +0 -42
- package/dist/cjs/resourceTypes.js.map +0 -1
- package/dist/cjs/services.d.ts +0 -22
- package/dist/cjs/services.d.ts.map +0 -1
- package/dist/cjs/services.js +0 -39
- package/dist/cjs/services.js.map +0 -1
- package/dist/esm/actions.d.ts +0 -40
- package/dist/esm/actions.d.ts.map +0 -1
- package/dist/esm/actions.js +0 -38
- package/dist/esm/actions.js.map +0 -1
- package/dist/esm/conditionKeys.d.ts +0 -30
- package/dist/esm/conditionKeys.d.ts.map +0 -1
- package/dist/esm/conditionKeys.js +0 -38
- package/dist/esm/conditionKeys.js.map +0 -1
- package/dist/esm/data.d.ts +0 -29
- package/dist/esm/data.d.ts.map +0 -1
- package/dist/esm/data.js +0 -57
- package/dist/esm/data.js.map +0 -1
- package/dist/esm/index.d.ts +0 -5
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -5
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/package.json +0 -3
- package/dist/esm/resourceTypes.d.ts +0 -29
- package/dist/esm/resourceTypes.d.ts.map +0 -1
- package/dist/esm/resourceTypes.js +0 -37
- package/dist/esm/resourceTypes.js.map +0 -1
- package/dist/esm/services.d.ts +0 -22
- package/dist/esm/services.d.ts.map +0 -1
- package/dist/esm/services.js +0 -34
- package/dist/esm/services.js.map +0 -1
package/package.json
CHANGED
package/dist/cjs/actions.d.ts
DELETED
|
@@ -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"}
|
package/dist/cjs/actions.js
DELETED
|
@@ -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
|
package/dist/cjs/actions.js.map
DELETED
|
@@ -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"}
|
package/dist/cjs/data.d.ts
DELETED
|
@@ -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
|
package/dist/cjs/data.d.ts.map
DELETED
|
@@ -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
|
package/dist/cjs/data.js.map
DELETED
|
@@ -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"}
|
package/dist/cjs/index.d.ts
DELETED
package/dist/cjs/index.d.ts.map
DELETED
|
@@ -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
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,kDAAgC;AAChC,6CAA2B"}
|
package/dist/cjs/package.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface ResourceType {
|
|
2
|
-
readonly key: string;
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly description: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param serviceKey the service key to get the resource types for
|
|
9
|
-
* @returns the resource types for the service
|
|
10
|
-
*/
|
|
11
|
-
export declare function resourceTypesForService(serviceKey: string): string[];
|
|
12
|
-
/**
|
|
13
|
-
* Check if a resource type exists for a service and resource type key
|
|
14
|
-
*
|
|
15
|
-
* @param serviceKey the service key to check for the resource type
|
|
16
|
-
* @param resourceTypeKey the resource type key to check for
|
|
17
|
-
* @returns true if the resource type exists, false otherwise
|
|
18
|
-
*/
|
|
19
|
-
export declare function resourceTypeExists(serviceKey: string, resourceTypeKey: string): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Get the resource type for a service and resource type key
|
|
22
|
-
*
|
|
23
|
-
* @param serviceKey the service key to get the resource type for
|
|
24
|
-
* @param resourceTypeKey the resource type key to get the resource type for
|
|
25
|
-
* @throws an error if the resource type does not exist
|
|
26
|
-
* @returns the resource type
|
|
27
|
-
*/
|
|
28
|
-
export declare function getResourceTypeDetails(serviceKey: string, resourceTypeKey: string): ResourceType;
|
|
29
|
-
//# sourceMappingURL=resourceTypes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceTypes.d.ts","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAGvF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,YAAY,CAMhG"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resourceTypesForService = resourceTypesForService;
|
|
4
|
-
exports.resourceTypeExists = resourceTypeExists;
|
|
5
|
-
exports.getResourceTypeDetails = getResourceTypeDetails;
|
|
6
|
-
const data_1 = require("./data");
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param serviceKey the service key to get the resource types for
|
|
10
|
-
* @returns the resource types for the service
|
|
11
|
-
*/
|
|
12
|
-
function resourceTypesForService(serviceKey) {
|
|
13
|
-
const data = (0, data_1.readResourceTypes)(serviceKey);
|
|
14
|
-
return Object.keys(data);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Check if a resource type exists for a service and resource type key
|
|
18
|
-
*
|
|
19
|
-
* @param serviceKey the service key to check for the resource type
|
|
20
|
-
* @param resourceTypeKey the resource type key to check for
|
|
21
|
-
* @returns true if the resource type exists, false otherwise
|
|
22
|
-
*/
|
|
23
|
-
function resourceTypeExists(serviceKey, resourceTypeKey) {
|
|
24
|
-
const data = (0, data_1.readResourceTypes)(serviceKey);
|
|
25
|
-
return !!data[resourceTypeKey];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Get the resource type for a service and resource type key
|
|
29
|
-
*
|
|
30
|
-
* @param serviceKey the service key to get the resource type for
|
|
31
|
-
* @param resourceTypeKey the resource type key to get the resource type for
|
|
32
|
-
* @throws an error if the resource type does not exist
|
|
33
|
-
* @returns the resource type
|
|
34
|
-
*/
|
|
35
|
-
function getResourceTypeDetails(serviceKey, resourceTypeKey) {
|
|
36
|
-
const data = (0, data_1.readResourceTypes)(serviceKey);
|
|
37
|
-
if (!data[resourceTypeKey]) {
|
|
38
|
-
throw new Error(`Resource type ${resourceTypeKey} does not exist for service ${serviceKey}`);
|
|
39
|
-
}
|
|
40
|
-
return data[resourceTypeKey];
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=resourceTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceTypes.js","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":";;AAaA,0DAGC;AASD,gDAGC;AAUD,wDAMC;AA5CD,iCAA2C;AAQ3C;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,UAAkB;IACxD,MAAM,IAAI,GAAG,IAAA,wBAAiB,EAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,UAAkB,EAAE,eAAuB;IAC5E,MAAM,IAAI,GAAG,IAAA,wBAAiB,EAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAC,UAAkB,EAAE,eAAuB;IAChF,MAAM,IAAI,GAAG,IAAA,wBAAiB,EAA+B,UAAU,CAAC,CAAC;IACzE,IAAG,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,iBAAiB,eAAe,+BAA+B,UAAU,EAAE,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;AAC/B,CAAC"}
|
package/dist/cjs/services.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get keys for all services
|
|
3
|
-
*
|
|
4
|
-
* @returns an array of all service keys
|
|
5
|
-
*/
|
|
6
|
-
export declare function allServiceKeys(): string[];
|
|
7
|
-
/**
|
|
8
|
-
* Check if a service exists
|
|
9
|
-
*
|
|
10
|
-
* @param serviceKey the service key to check
|
|
11
|
-
* @returns true if the service exists, false otherwise
|
|
12
|
-
*/
|
|
13
|
-
export declare function serviceExists(serviceKey: string): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Get the name of a service
|
|
16
|
-
*
|
|
17
|
-
* @param serviceKey the service key to get the name for
|
|
18
|
-
* @throws error if the service does not exist
|
|
19
|
-
* @returns the name of the service
|
|
20
|
-
*/
|
|
21
|
-
export declare function getServiceName(serviceKey: string): string;
|
|
22
|
-
//# sourceMappingURL=services.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMzD"}
|
package/dist/cjs/services.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allServiceKeys = allServiceKeys;
|
|
4
|
-
exports.serviceExists = serviceExists;
|
|
5
|
-
exports.getServiceName = getServiceName;
|
|
6
|
-
const data_1 = require("./data");
|
|
7
|
-
/**
|
|
8
|
-
* Get keys for all services
|
|
9
|
-
*
|
|
10
|
-
* @returns an array of all service keys
|
|
11
|
-
*/
|
|
12
|
-
function allServiceKeys() {
|
|
13
|
-
return (0, data_1.readDataFile)('services.json');
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Check if a service exists
|
|
17
|
-
*
|
|
18
|
-
* @param serviceKey the service key to check
|
|
19
|
-
* @returns true if the service exists, false otherwise
|
|
20
|
-
*/
|
|
21
|
-
function serviceExists(serviceKey) {
|
|
22
|
-
const data = (0, data_1.readDataFile)('serviceNames.json');
|
|
23
|
-
return !!data[serviceKey];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Get the name of a service
|
|
27
|
-
*
|
|
28
|
-
* @param serviceKey the service key to get the name for
|
|
29
|
-
* @throws error if the service does not exist
|
|
30
|
-
* @returns the name of the service
|
|
31
|
-
*/
|
|
32
|
-
function getServiceName(serviceKey) {
|
|
33
|
-
const data = (0, data_1.readDataFile)('serviceNames.json');
|
|
34
|
-
if (!data[serviceKey]) {
|
|
35
|
-
throw new Error(`Service ${serviceKey} does not exist`);
|
|
36
|
-
}
|
|
37
|
-
return data[serviceKey];
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=services.js.map
|
package/dist/cjs/services.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":";;AAOA,wCAEC;AAQD,sCAGC;AASD,wCAMC;AAnCD,iCAAsC;AAEtC;;;;GAIG;AACH,SAAgB,cAAc;IAC5B,OAAO,IAAA,mBAAY,EAAW,eAAe,CAAC,CAAA;AAChD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,UAAkB;IAC9C,MAAM,IAAI,GAAG,IAAA,mBAAY,EAAyB,mBAAmB,CAAC,CAAA;IACtE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,UAAkB;IAC/C,MAAM,IAAI,GAAG,IAAA,mBAAY,EAAyB,mBAAmB,CAAC,CAAA;IACtE,IAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,iBAAiB,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAA;AACzB,CAAC"}
|
package/dist/esm/actions.d.ts
DELETED
|
@@ -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"}
|
package/dist/esm/actions.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { readActionData } from "./data";
|
|
2
|
-
/**
|
|
3
|
-
* Get all actions for a service
|
|
4
|
-
*
|
|
5
|
-
* @param serviceKey the service key to get actions for
|
|
6
|
-
* @returns the actions for the service
|
|
7
|
-
*/
|
|
8
|
-
export function getActionsForService(serviceKey) {
|
|
9
|
-
const data = readActionData(serviceKey);
|
|
10
|
-
return Object.keys(data);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Check if an action exists
|
|
14
|
-
*
|
|
15
|
-
* @param serviceKey the service key to check for the action
|
|
16
|
-
* @param actionKey the action key to check for
|
|
17
|
-
* @returns true if the action exists, false otherwise
|
|
18
|
-
*/
|
|
19
|
-
export function actionExists(serviceKey, actionKey) {
|
|
20
|
-
const data = readActionData(serviceKey);
|
|
21
|
-
return !!data[actionKey];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Get the details for an action
|
|
25
|
-
*
|
|
26
|
-
* @param serviceKey the service key to get the action for
|
|
27
|
-
* @param actionKey the action key to get the details for
|
|
28
|
-
* @throws error if the service or action does not exist
|
|
29
|
-
* @returns the details for the action
|
|
30
|
-
*/
|
|
31
|
-
export function getActionDetails(serviceKey, actionKey) {
|
|
32
|
-
const data = readActionData(serviceKey);
|
|
33
|
-
if (!data[actionKey]) {
|
|
34
|
-
throw new Error(`Action ${actionKey} does not exist for service ${serviceKey}`);
|
|
35
|
-
}
|
|
36
|
-
return data[actionKey];
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=actions.js.map
|
package/dist/esm/actions.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAkBvC;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAkB;IACrD,MAAM,IAAI,GAAG,cAAc,CAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,UAAkB,EAAE,SAAiB;IAChE,MAAM,IAAI,GAAG,cAAc,CAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB,EAAE,SAAiB;IACpE,MAAM,IAAI,GAAG,cAAc,CAAyB,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,38 +0,0 @@
|
|
|
1
|
-
import { readConditionKeys } from "./data";
|
|
2
|
-
/**
|
|
3
|
-
* Reads the condition keys for a service
|
|
4
|
-
*
|
|
5
|
-
* @param serviceKey the service key to read the condition keys for
|
|
6
|
-
* @returns the condition keys for the service
|
|
7
|
-
*/
|
|
8
|
-
export function getConditionKeysForService(serviceKey) {
|
|
9
|
-
const data = readConditionKeys(serviceKey);
|
|
10
|
-
return Object.keys(data);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Check if a condition key exists
|
|
14
|
-
*
|
|
15
|
-
* @param serviceKey the service key to check for the condition key
|
|
16
|
-
* @param conditionKey the condition key to check for
|
|
17
|
-
* @returns true if the condition key exists, false otherwise
|
|
18
|
-
*/
|
|
19
|
-
export function conditionKeyExists(serviceKey, conditionKey) {
|
|
20
|
-
const data = readConditionKeys(serviceKey);
|
|
21
|
-
return !!data[conditionKey];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Get the details for a condition key
|
|
25
|
-
*
|
|
26
|
-
* @param serviceKey the service key to get the condition key for
|
|
27
|
-
* @param conditionKey the condition key to get the details for
|
|
28
|
-
* @throws error if the service or condition key does not exist
|
|
29
|
-
* @returns the details for the condition key
|
|
30
|
-
*/
|
|
31
|
-
export function getConditionKeyDetails(serviceKey, conditionKey) {
|
|
32
|
-
const data = readConditionKeys(serviceKey);
|
|
33
|
-
if (!data[conditionKey]) {
|
|
34
|
-
throw new Error(`Condition key ${conditionKey} does not exist for service ${serviceKey}`);
|
|
35
|
-
}
|
|
36
|
-
return data[conditionKey];
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=conditionKeys.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conditionKeys.js","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAQ1C;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAkB;IAC3D,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAA;IACxE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAkB,EAAE,YAAoB;IACzE,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAA;IACxE,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB,EAAE,YAAoB;IAC7E,MAAM,IAAI,GAAG,iBAAiB,CAA+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"}
|
package/dist/esm/data.d.ts
DELETED
|
@@ -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
|
package/dist/esm/data.d.ts.map
DELETED
|
@@ -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/esm/data.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "fs";
|
|
2
|
-
import { join } from "path";
|
|
3
|
-
let dataRoot = join(__dirname, '..', '..', 'data');
|
|
4
|
-
if (__dirname.endsWith('src')) {
|
|
5
|
-
dataRoot = join(__dirname, '..', 'data');
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Get the root path to the data directory
|
|
9
|
-
*
|
|
10
|
-
* @returns the root path to the data directory
|
|
11
|
-
*/
|
|
12
|
-
// function dataRoot(): string {
|
|
13
|
-
// console.log(__dirname);
|
|
14
|
-
// return join(__dirname, '..', 'data');
|
|
15
|
-
// }
|
|
16
|
-
const dataCache = {};
|
|
17
|
-
/**
|
|
18
|
-
* Get a data file from the data directory
|
|
19
|
-
*
|
|
20
|
-
* @param file the path to the file to retrieve data for.
|
|
21
|
-
* @returns the data from the file
|
|
22
|
-
*/
|
|
23
|
-
export function readDataFile(file) {
|
|
24
|
-
if (!dataCache[file]) {
|
|
25
|
-
const data = readFileSync(join(dataRoot, file), 'utf8');
|
|
26
|
-
dataCache[file] = JSON.parse(data);
|
|
27
|
-
}
|
|
28
|
-
return dataCache[file];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Read the action data for a service
|
|
32
|
-
*
|
|
33
|
-
* @param serviceKey the service key to read the action data for
|
|
34
|
-
* @returns the action data for the service
|
|
35
|
-
*/
|
|
36
|
-
export function readActionData(serviceKey) {
|
|
37
|
-
return readDataFile(join('actions', `${serviceKey}.json`));
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Read the condition key data for a service
|
|
41
|
-
*
|
|
42
|
-
* @param serviceKey the service key to read the condition key data for
|
|
43
|
-
* @returns the condition key data
|
|
44
|
-
*/
|
|
45
|
-
export function readConditionKeys(serviceKey) {
|
|
46
|
-
return readDataFile(join('conditionKeys', `${serviceKey}.json`));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Read the resource type data for a service
|
|
50
|
-
*
|
|
51
|
-
* @param serviceKey the service key to read the resource type data for
|
|
52
|
-
* @returns the resource type data
|
|
53
|
-
*/
|
|
54
|
-
export function readResourceTypes(serviceKey) {
|
|
55
|
-
return readDataFile(join('resourceTypes', `${serviceKey}.json`));
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=data.js.map
|
package/dist/esm/data.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,IAAI,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACnD,IAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7B,QAAQ,GAAG,IAAI,CAAC,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,MAAM,UAAU,YAAY,CAAI,IAAY;IAC1C,IAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,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,MAAM,UAAU,cAAc,CAAI,UAAkB;IAClD,OAAO,YAAY,CAAI,IAAI,CAAC,SAAS,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAI,UAAkB;IACrD,OAAO,YAAY,CAAI,IAAI,CAAC,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAI,UAAkB;IACrD,OAAO,YAAY,CAAI,IAAI,CAAC,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC"}
|
package/dist/esm/index.d.ts
DELETED
package/dist/esm/index.d.ts.map
DELETED
|
@@ -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/esm/index.js
DELETED
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","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/esm/package.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface ResourceType {
|
|
2
|
-
readonly key: string;
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly description: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param serviceKey the service key to get the resource types for
|
|
9
|
-
* @returns the resource types for the service
|
|
10
|
-
*/
|
|
11
|
-
export declare function resourceTypesForService(serviceKey: string): string[];
|
|
12
|
-
/**
|
|
13
|
-
* Check if a resource type exists for a service and resource type key
|
|
14
|
-
*
|
|
15
|
-
* @param serviceKey the service key to check for the resource type
|
|
16
|
-
* @param resourceTypeKey the resource type key to check for
|
|
17
|
-
* @returns true if the resource type exists, false otherwise
|
|
18
|
-
*/
|
|
19
|
-
export declare function resourceTypeExists(serviceKey: string, resourceTypeKey: string): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Get the resource type for a service and resource type key
|
|
22
|
-
*
|
|
23
|
-
* @param serviceKey the service key to get the resource type for
|
|
24
|
-
* @param resourceTypeKey the resource type key to get the resource type for
|
|
25
|
-
* @throws an error if the resource type does not exist
|
|
26
|
-
* @returns the resource type
|
|
27
|
-
*/
|
|
28
|
-
export declare function getResourceTypeDetails(serviceKey: string, resourceTypeKey: string): ResourceType;
|
|
29
|
-
//# sourceMappingURL=resourceTypes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceTypes.d.ts","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAGvF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,YAAY,CAMhG"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { readResourceTypes } from "./data";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param serviceKey the service key to get the resource types for
|
|
5
|
-
* @returns the resource types for the service
|
|
6
|
-
*/
|
|
7
|
-
export function resourceTypesForService(serviceKey) {
|
|
8
|
-
const data = readResourceTypes(serviceKey);
|
|
9
|
-
return Object.keys(data);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Check if a resource type exists for a service and resource type key
|
|
13
|
-
*
|
|
14
|
-
* @param serviceKey the service key to check for the resource type
|
|
15
|
-
* @param resourceTypeKey the resource type key to check for
|
|
16
|
-
* @returns true if the resource type exists, false otherwise
|
|
17
|
-
*/
|
|
18
|
-
export function resourceTypeExists(serviceKey, resourceTypeKey) {
|
|
19
|
-
const data = readResourceTypes(serviceKey);
|
|
20
|
-
return !!data[resourceTypeKey];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Get the resource type for a service and resource type key
|
|
24
|
-
*
|
|
25
|
-
* @param serviceKey the service key to get the resource type for
|
|
26
|
-
* @param resourceTypeKey the resource type key to get the resource type for
|
|
27
|
-
* @throws an error if the resource type does not exist
|
|
28
|
-
* @returns the resource type
|
|
29
|
-
*/
|
|
30
|
-
export function getResourceTypeDetails(serviceKey, resourceTypeKey) {
|
|
31
|
-
const data = readResourceTypes(serviceKey);
|
|
32
|
-
if (!data[resourceTypeKey]) {
|
|
33
|
-
throw new Error(`Resource type ${resourceTypeKey} does not exist for service ${serviceKey}`);
|
|
34
|
-
}
|
|
35
|
-
return data[resourceTypeKey];
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=resourceTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceTypes.js","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAQ3C;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB;IACxD,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAkB,EAAE,eAAuB;IAC5E,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB,EAAE,eAAuB;IAChF,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,IAAG,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,iBAAiB,eAAe,+BAA+B,UAAU,EAAE,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;AAC/B,CAAC"}
|
package/dist/esm/services.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get keys for all services
|
|
3
|
-
*
|
|
4
|
-
* @returns an array of all service keys
|
|
5
|
-
*/
|
|
6
|
-
export declare function allServiceKeys(): string[];
|
|
7
|
-
/**
|
|
8
|
-
* Check if a service exists
|
|
9
|
-
*
|
|
10
|
-
* @param serviceKey the service key to check
|
|
11
|
-
* @returns true if the service exists, false otherwise
|
|
12
|
-
*/
|
|
13
|
-
export declare function serviceExists(serviceKey: string): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Get the name of a service
|
|
16
|
-
*
|
|
17
|
-
* @param serviceKey the service key to get the name for
|
|
18
|
-
* @throws error if the service does not exist
|
|
19
|
-
* @returns the name of the service
|
|
20
|
-
*/
|
|
21
|
-
export declare function getServiceName(serviceKey: string): string;
|
|
22
|
-
//# sourceMappingURL=services.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMzD"}
|
package/dist/esm/services.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { readDataFile } from './data';
|
|
2
|
-
/**
|
|
3
|
-
* Get keys for all services
|
|
4
|
-
*
|
|
5
|
-
* @returns an array of all service keys
|
|
6
|
-
*/
|
|
7
|
-
export function allServiceKeys() {
|
|
8
|
-
return readDataFile('services.json');
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Check if a service exists
|
|
12
|
-
*
|
|
13
|
-
* @param serviceKey the service key to check
|
|
14
|
-
* @returns true if the service exists, false otherwise
|
|
15
|
-
*/
|
|
16
|
-
export function serviceExists(serviceKey) {
|
|
17
|
-
const data = readDataFile('serviceNames.json');
|
|
18
|
-
return !!data[serviceKey];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Get the name of a service
|
|
22
|
-
*
|
|
23
|
-
* @param serviceKey the service key to get the name for
|
|
24
|
-
* @throws error if the service does not exist
|
|
25
|
-
* @returns the name of the service
|
|
26
|
-
*/
|
|
27
|
-
export function getServiceName(serviceKey) {
|
|
28
|
-
const data = readDataFile('serviceNames.json');
|
|
29
|
-
if (!data[serviceKey]) {
|
|
30
|
-
throw new Error(`Service ${serviceKey} does not exist`);
|
|
31
|
-
}
|
|
32
|
-
return data[serviceKey];
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=services.js.map
|
package/dist/esm/services.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,YAAY,CAAW,eAAe,CAAC,CAAA;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB;IAC9C,MAAM,IAAI,GAAG,YAAY,CAAyB,mBAAmB,CAAC,CAAA;IACtE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,MAAM,IAAI,GAAG,YAAY,CAAyB,mBAAmB,CAAC,CAAA;IACtE,IAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,iBAAiB,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAA;AACzB,CAAC"}
|