@ampsec/platform-client 38.0.0 → 38.2.0
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.
|
@@ -19,6 +19,13 @@ export declare const AGENT_OWNER_ROLES: Set<AuthRole>;
|
|
|
19
19
|
* @type {Set<AuthRole>}
|
|
20
20
|
*/
|
|
21
21
|
export declare const AGENT_ADMIN_ROLES: Set<AuthRole>;
|
|
22
|
+
/**
|
|
23
|
+
* This is the set of roles that can be used to administer a tenant in the agent API.
|
|
24
|
+
*
|
|
25
|
+
* Includes: [{@link AuthRole.ADMIN} {@link AuthRole.OWNER} {@link AuthRole.AGENT}]
|
|
26
|
+
* @type {Set<AuthRole>}
|
|
27
|
+
*/
|
|
28
|
+
export declare const AGENT_PRACTITIONER_ROLES: Set<AuthRole>;
|
|
22
29
|
/**
|
|
23
30
|
* This is the set of roles that can be used to view tenant data in the agent API.
|
|
24
31
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PLATFORM_READ_WRITE_ROLES = exports.PLATFORM_READ_ONLY_ROLES = exports.ENGAGEMENT_END_USER_ROLES = exports.AGENT_REPORT_VIEWER_ROLES = exports.AGENT_VIEWER_ROLES = exports.AGENT_ADMIN_ROLES = exports.AGENT_OWNER_ROLES = void 0;
|
|
3
|
+
exports.PLATFORM_READ_WRITE_ROLES = exports.PLATFORM_READ_ONLY_ROLES = exports.ENGAGEMENT_END_USER_ROLES = exports.AGENT_REPORT_VIEWER_ROLES = exports.AGENT_VIEWER_ROLES = exports.AGENT_PRACTITIONER_ROLES = exports.AGENT_ADMIN_ROLES = exports.AGENT_OWNER_ROLES = void 0;
|
|
4
4
|
const immutable_1 = require("immutable");
|
|
5
5
|
const enums_1 = require("./enums");
|
|
6
6
|
/**
|
|
@@ -14,28 +14,35 @@ const enums_1 = require("./enums");
|
|
|
14
14
|
* Includes: [{@link AuthRole.OWNER}]
|
|
15
15
|
* @type {Set<AuthRole>}
|
|
16
16
|
*/
|
|
17
|
-
exports.AGENT_OWNER_ROLES = (0, immutable_1.Set)(
|
|
17
|
+
exports.AGENT_OWNER_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.OWNER]);
|
|
18
18
|
/**
|
|
19
19
|
* This is the set of roles that can be used to administer a tenant in the agent API.
|
|
20
20
|
*
|
|
21
21
|
* Includes: [{@link AuthRole.ADMIN} {@link AuthRole.OWNER}]
|
|
22
22
|
* @type {Set<AuthRole>}
|
|
23
23
|
*/
|
|
24
|
-
exports.AGENT_ADMIN_ROLES = (0, immutable_1.Set)(
|
|
24
|
+
exports.AGENT_ADMIN_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.ADMIN, enums_1.AuthRole.OWNER]);
|
|
25
|
+
/**
|
|
26
|
+
* This is the set of roles that can be used to administer a tenant in the agent API.
|
|
27
|
+
*
|
|
28
|
+
* Includes: [{@link AuthRole.ADMIN} {@link AuthRole.OWNER} {@link AuthRole.AGENT}]
|
|
29
|
+
* @type {Set<AuthRole>}
|
|
30
|
+
*/
|
|
31
|
+
exports.AGENT_PRACTITIONER_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.ADMIN, enums_1.AuthRole.OWNER, enums_1.AuthRole.AGENT]);
|
|
25
32
|
/**
|
|
26
33
|
* This is the set of roles that can be used to view tenant data in the agent API.
|
|
27
34
|
*
|
|
28
35
|
* Includes: [{@link AuthRole.VIEWER}, {@link AuthRole.AGENT}, {@link AuthRole.ADMIN}, {@link AuthRole.OWNER}]
|
|
29
36
|
* @type {Set<AuthRole>}
|
|
30
37
|
*/
|
|
31
|
-
exports.AGENT_VIEWER_ROLES = (0, immutable_1.Set)(
|
|
38
|
+
exports.AGENT_VIEWER_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.VIEWER, enums_1.AuthRole.AGENT, enums_1.AuthRole.ADMIN, enums_1.AuthRole.OWNER]);
|
|
32
39
|
/**
|
|
33
40
|
* This is the set of roles that can be used to view tenant data summaries in the agent API.
|
|
34
41
|
*
|
|
35
42
|
* Includes: [{@link AuthRole.REPORT_VIEWER}, {@link AuthRole.VIEWER}, {@link AuthRole.AGENT}, {@link AuthRole.ADMIN}, {@link AuthRole.OWNER}]
|
|
36
43
|
* @type {Set<AuthRole>}
|
|
37
44
|
*/
|
|
38
|
-
exports.AGENT_REPORT_VIEWER_ROLES = (0, immutable_1.Set)(
|
|
45
|
+
exports.AGENT_REPORT_VIEWER_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.REPORT_VIEWER, enums_1.AuthRole.VIEWER, enums_1.AuthRole.AGENT, enums_1.AuthRole.ADMIN, enums_1.AuthRole.OWNER]);
|
|
39
46
|
/**
|
|
40
47
|
** /==========================\
|
|
41
48
|
** |== ENGAGEMENT API ROLES ==|
|
|
@@ -47,7 +54,7 @@ exports.AGENT_REPORT_VIEWER_ROLES = (0, immutable_1.Set)().add(enums_1.AuthRole.
|
|
|
47
54
|
* Includes: [{@link AuthRole.USER}]
|
|
48
55
|
* @type {Set<AuthRole>}
|
|
49
56
|
*/
|
|
50
|
-
exports.ENGAGEMENT_END_USER_ROLES = (0, immutable_1.Set)(
|
|
57
|
+
exports.ENGAGEMENT_END_USER_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.USER]);
|
|
51
58
|
/**
|
|
52
59
|
** /========================\
|
|
53
60
|
** |== PLATFORM API ROLES ==|
|
|
@@ -59,12 +66,12 @@ exports.ENGAGEMENT_END_USER_ROLES = (0, immutable_1.Set)().add(enums_1.AuthRole.
|
|
|
59
66
|
* Includes: [{@link AuthRole.CUSTOMER_SUCCESS}, {@link AuthRole.SUPPORT}, {@link AuthRole.OPERATOR}, {@link AuthRole.SERVICE_ACCOUNT}]
|
|
60
67
|
* @type {Set<AuthRole>}
|
|
61
68
|
*/
|
|
62
|
-
exports.PLATFORM_READ_ONLY_ROLES = (0, immutable_1.Set)(
|
|
69
|
+
exports.PLATFORM_READ_ONLY_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.CUSTOMER_SUCCESS, enums_1.AuthRole.SUPPORT, enums_1.AuthRole.OPERATOR, enums_1.AuthRole.SERVICE_ACCOUNT]);
|
|
63
70
|
/**
|
|
64
71
|
* This is the set of roles that can be used by Amplifier Employees to view data in the Platform API.
|
|
65
72
|
*
|
|
66
73
|
* Includes: [{@link AuthRole.CUSTOMER_SUCCESS}, {@link AuthRole.SUPPORT}, {@link AuthRole.OPERATOR}, {@link AuthRole.SERVICE_ACCOUNT}]
|
|
67
74
|
* @type {Set<AuthRole>}
|
|
68
75
|
*/
|
|
69
|
-
exports.PLATFORM_READ_WRITE_ROLES = (0, immutable_1.Set)(
|
|
76
|
+
exports.PLATFORM_READ_WRITE_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.OPERATOR, enums_1.AuthRole.SERVICE_ACCOUNT]);
|
|
70
77
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/dto/constants.ts"],"names":[],"mappings":";;;AAAA,yCAA8B;AAC9B,mCAAiC;AAEjC;;;;GAIG;AAEH;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG,IAAA,eAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/dto/constants.ts"],"names":[],"mappings":";;;AAAA,yCAA8B;AAC9B,mCAAiC;AAEjC;;;;GAIG;AAEH;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG,IAAA,eAAG,EAAW,CAAC,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG,IAAA,eAAG,EAAW,CAAC,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACjF;;;;;GAKG;AACU,QAAA,wBAAwB,GAAG,IAAA,eAAG,EAAW,CAAC,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACxG;;;;;GAKG;AACU,QAAA,kBAAkB,GAAG,IAAA,eAAG,EAAW,CAAC,gBAAQ,CAAC,MAAM,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACnH;;;;;GAKG;AACU,QAAA,yBAAyB,GAAG,IAAA,eAAG,EAAW,CAAC,gBAAQ,CAAC,aAAa,EAAE,gBAAQ,CAAC,MAAM,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAElJ;;;;GAIG;AAEH;;;;;GAKG;AACU,QAAA,yBAAyB,GAAG,IAAA,eAAG,EAAW,CAAC,gBAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AAExE;;;;GAIG;AAEH;;;;;GAKG;AACU,QAAA,wBAAwB,GAAG,IAAA,eAAG,EAAW,CAAC,gBAAQ,CAAC,gBAAgB,EAAE,gBAAQ,CAAC,OAAO,EAAE,gBAAQ,CAAC,QAAQ,EAAE,gBAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;AAClJ;;;;;GAKG;AACU,QAAA,yBAAyB,GAAG,IAAA,eAAG,EAAW,CAAC,gBAAQ,CAAC,QAAQ,EAAE,gBAAQ,CAAC,eAAe,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/FilterCriteria.ts
CHANGED
package/src/dto/constants.ts
CHANGED
|
@@ -13,28 +13,35 @@ import {AuthRole} from './enums';
|
|
|
13
13
|
* Includes: [{@link AuthRole.OWNER}]
|
|
14
14
|
* @type {Set<AuthRole>}
|
|
15
15
|
*/
|
|
16
|
-
export const AGENT_OWNER_ROLES = Set<AuthRole>(
|
|
16
|
+
export const AGENT_OWNER_ROLES = Set<AuthRole>([AuthRole.OWNER]);
|
|
17
17
|
/**
|
|
18
18
|
* This is the set of roles that can be used to administer a tenant in the agent API.
|
|
19
19
|
*
|
|
20
20
|
* Includes: [{@link AuthRole.ADMIN} {@link AuthRole.OWNER}]
|
|
21
21
|
* @type {Set<AuthRole>}
|
|
22
22
|
*/
|
|
23
|
-
export const AGENT_ADMIN_ROLES = Set<AuthRole>(
|
|
23
|
+
export const AGENT_ADMIN_ROLES = Set<AuthRole>([AuthRole.ADMIN, AuthRole.OWNER]);
|
|
24
|
+
/**
|
|
25
|
+
* This is the set of roles that can be used to administer a tenant in the agent API.
|
|
26
|
+
*
|
|
27
|
+
* Includes: [{@link AuthRole.ADMIN} {@link AuthRole.OWNER} {@link AuthRole.AGENT}]
|
|
28
|
+
* @type {Set<AuthRole>}
|
|
29
|
+
*/
|
|
30
|
+
export const AGENT_PRACTITIONER_ROLES = Set<AuthRole>([AuthRole.ADMIN, AuthRole.OWNER, AuthRole.AGENT]);
|
|
24
31
|
/**
|
|
25
32
|
* This is the set of roles that can be used to view tenant data in the agent API.
|
|
26
33
|
*
|
|
27
34
|
* Includes: [{@link AuthRole.VIEWER}, {@link AuthRole.AGENT}, {@link AuthRole.ADMIN}, {@link AuthRole.OWNER}]
|
|
28
35
|
* @type {Set<AuthRole>}
|
|
29
36
|
*/
|
|
30
|
-
export const AGENT_VIEWER_ROLES = Set<AuthRole>(
|
|
37
|
+
export const AGENT_VIEWER_ROLES = Set<AuthRole>([AuthRole.VIEWER, AuthRole.AGENT, AuthRole.ADMIN, AuthRole.OWNER]);
|
|
31
38
|
/**
|
|
32
39
|
* This is the set of roles that can be used to view tenant data summaries in the agent API.
|
|
33
40
|
*
|
|
34
41
|
* Includes: [{@link AuthRole.REPORT_VIEWER}, {@link AuthRole.VIEWER}, {@link AuthRole.AGENT}, {@link AuthRole.ADMIN}, {@link AuthRole.OWNER}]
|
|
35
42
|
* @type {Set<AuthRole>}
|
|
36
43
|
*/
|
|
37
|
-
export const AGENT_REPORT_VIEWER_ROLES = Set<AuthRole>(
|
|
44
|
+
export const AGENT_REPORT_VIEWER_ROLES = Set<AuthRole>([AuthRole.REPORT_VIEWER, AuthRole.VIEWER, AuthRole.AGENT, AuthRole.ADMIN, AuthRole.OWNER]);
|
|
38
45
|
|
|
39
46
|
/**
|
|
40
47
|
** /==========================\
|
|
@@ -48,7 +55,7 @@ export const AGENT_REPORT_VIEWER_ROLES = Set<AuthRole>().add(AuthRole.REPORT_VIE
|
|
|
48
55
|
* Includes: [{@link AuthRole.USER}]
|
|
49
56
|
* @type {Set<AuthRole>}
|
|
50
57
|
*/
|
|
51
|
-
export const ENGAGEMENT_END_USER_ROLES = Set<AuthRole>(
|
|
58
|
+
export const ENGAGEMENT_END_USER_ROLES = Set<AuthRole>([AuthRole.USER]);
|
|
52
59
|
|
|
53
60
|
/**
|
|
54
61
|
** /========================\
|
|
@@ -62,11 +69,11 @@ export const ENGAGEMENT_END_USER_ROLES = Set<AuthRole>().add(AuthRole.USER);
|
|
|
62
69
|
* Includes: [{@link AuthRole.CUSTOMER_SUCCESS}, {@link AuthRole.SUPPORT}, {@link AuthRole.OPERATOR}, {@link AuthRole.SERVICE_ACCOUNT}]
|
|
63
70
|
* @type {Set<AuthRole>}
|
|
64
71
|
*/
|
|
65
|
-
export const PLATFORM_READ_ONLY_ROLES = Set<AuthRole>(
|
|
72
|
+
export const PLATFORM_READ_ONLY_ROLES = Set<AuthRole>([AuthRole.CUSTOMER_SUCCESS, AuthRole.SUPPORT, AuthRole.OPERATOR, AuthRole.SERVICE_ACCOUNT]);
|
|
66
73
|
/**
|
|
67
74
|
* This is the set of roles that can be used by Amplifier Employees to view data in the Platform API.
|
|
68
75
|
*
|
|
69
76
|
* Includes: [{@link AuthRole.CUSTOMER_SUCCESS}, {@link AuthRole.SUPPORT}, {@link AuthRole.OPERATOR}, {@link AuthRole.SERVICE_ACCOUNT}]
|
|
70
77
|
* @type {Set<AuthRole>}
|
|
71
78
|
*/
|
|
72
|
-
export const PLATFORM_READ_WRITE_ROLES = Set<AuthRole>(
|
|
79
|
+
export const PLATFORM_READ_WRITE_ROLES = Set<AuthRole>([AuthRole.OPERATOR, AuthRole.SERVICE_ACCOUNT]);
|