@ampsec/platform-client 37.1.0 → 38.1.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.
@@ -1,3 +1,4 @@
1
+ import { Set } from 'immutable';
1
2
  import { AuthRole } from './enums';
2
3
  /**
3
4
  ** /=====================\
@@ -18,6 +19,13 @@ export declare const AGENT_OWNER_ROLES: Set<AuthRole>;
18
19
  * @type {Set<AuthRole>}
19
20
  */
20
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>;
21
29
  /**
22
30
  * This is the set of roles that can be used to view tenant data in the agent API.
23
31
  *
@@ -1,6 +1,7 @@
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
+ const immutable_1 = require("immutable");
4
5
  const enums_1 = require("./enums");
5
6
  /**
6
7
  ** /=====================\
@@ -13,28 +14,35 @@ const enums_1 = require("./enums");
13
14
  * Includes: [{@link AuthRole.OWNER}]
14
15
  * @type {Set<AuthRole>}
15
16
  */
16
- exports.AGENT_OWNER_ROLES = new Set([enums_1.AuthRole.OWNER]);
17
+ exports.AGENT_OWNER_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.OWNER]);
17
18
  /**
18
19
  * This is the set of roles that can be used to administer a tenant in the agent API.
19
20
  *
20
21
  * Includes: [{@link AuthRole.ADMIN} {@link AuthRole.OWNER}]
21
22
  * @type {Set<AuthRole>}
22
23
  */
23
- exports.AGENT_ADMIN_ROLES = new Set([enums_1.AuthRole.ADMIN, enums_1.AuthRole.OWNER]);
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]);
24
32
  /**
25
33
  * This is the set of roles that can be used to view tenant data in the agent API.
26
34
  *
27
35
  * Includes: [{@link AuthRole.VIEWER}, {@link AuthRole.AGENT}, {@link AuthRole.ADMIN}, {@link AuthRole.OWNER}]
28
36
  * @type {Set<AuthRole>}
29
37
  */
30
- exports.AGENT_VIEWER_ROLES = new Set([enums_1.AuthRole.VIEWER, enums_1.AuthRole.AGENT, enums_1.AuthRole.ADMIN, enums_1.AuthRole.OWNER]);
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]);
31
39
  /**
32
40
  * This is the set of roles that can be used to view tenant data summaries in the agent API.
33
41
  *
34
42
  * Includes: [{@link AuthRole.REPORT_VIEWER}, {@link AuthRole.VIEWER}, {@link AuthRole.AGENT}, {@link AuthRole.ADMIN}, {@link AuthRole.OWNER}]
35
43
  * @type {Set<AuthRole>}
36
44
  */
37
- exports.AGENT_REPORT_VIEWER_ROLES = new Set([enums_1.AuthRole.REPORT_VIEWER, enums_1.AuthRole.VIEWER, enums_1.AuthRole.AGENT, enums_1.AuthRole.ADMIN, enums_1.AuthRole.OWNER]);
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]);
38
46
  /**
39
47
  ** /==========================\
40
48
  ** |== ENGAGEMENT API ROLES ==|
@@ -46,7 +54,7 @@ exports.AGENT_REPORT_VIEWER_ROLES = new Set([enums_1.AuthRole.REPORT_VIEWER, enu
46
54
  * Includes: [{@link AuthRole.USER}]
47
55
  * @type {Set<AuthRole>}
48
56
  */
49
- exports.ENGAGEMENT_END_USER_ROLES = new Set([enums_1.AuthRole.USER]);
57
+ exports.ENGAGEMENT_END_USER_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.USER]);
50
58
  /**
51
59
  ** /========================\
52
60
  ** |== PLATFORM API ROLES ==|
@@ -58,12 +66,12 @@ exports.ENGAGEMENT_END_USER_ROLES = new Set([enums_1.AuthRole.USER]);
58
66
  * Includes: [{@link AuthRole.CUSTOMER_SUCCESS}, {@link AuthRole.SUPPORT}, {@link AuthRole.OPERATOR}, {@link AuthRole.SERVICE_ACCOUNT}]
59
67
  * @type {Set<AuthRole>}
60
68
  */
61
- exports.PLATFORM_READ_ONLY_ROLES = new Set([enums_1.AuthRole.CUSTOMER_SUCCESS, enums_1.AuthRole.SUPPORT, enums_1.AuthRole.OPERATOR, enums_1.AuthRole.SERVICE_ACCOUNT]);
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]);
62
70
  /**
63
71
  * This is the set of roles that can be used by Amplifier Employees to view data in the Platform API.
64
72
  *
65
73
  * Includes: [{@link AuthRole.CUSTOMER_SUCCESS}, {@link AuthRole.SUPPORT}, {@link AuthRole.OPERATOR}, {@link AuthRole.SERVICE_ACCOUNT}]
66
74
  * @type {Set<AuthRole>}
67
75
  */
68
- exports.PLATFORM_READ_WRITE_ROLES = new Set([enums_1.AuthRole.OPERATOR, enums_1.AuthRole.SERVICE_ACCOUNT]);
76
+ exports.PLATFORM_READ_WRITE_ROLES = (0, immutable_1.Set)([enums_1.AuthRole.OPERATOR, enums_1.AuthRole.SERVICE_ACCOUNT]);
69
77
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/dto/constants.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAEjC;;;;GAIG;AAEH;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG,IAAI,GAAG,CAAW,CAAC,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrE;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG,IAAI,GAAG,CAAW,CAAC,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrF;;;;;GAKG;AACU,QAAA,kBAAkB,GAAG,IAAI,GAAG,CAAW,CAAC,gBAAQ,CAAC,MAAM,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACvH;;;;;GAKG;AACU,QAAA,yBAAyB,GAAG,IAAI,GAAG,CAAW,CAAC,gBAAQ,CAAC,aAAa,EAAE,gBAAQ,CAAC,MAAM,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,EAAE,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAEtJ;;;;GAIG;AAEH;;;;;GAKG;AACU,Q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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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "37.1.0",
3
+ "version": "38.1.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -24,6 +24,7 @@
24
24
  "dependencies": {
25
25
  "axios": "^1.4.0",
26
26
  "blueimp-md5": "^2.19.0",
27
+ "immutable": "^5.0.0-beta.4",
27
28
  "lodash": "^4.17.21",
28
29
  "lodash.omit": "^4.5.0",
29
30
  "qs": "^6.11.2"
@@ -1,3 +1,4 @@
1
+ import {Set} from 'immutable';
1
2
  import {AuthRole} from './enums';
2
3
 
3
4
  /**
@@ -12,28 +13,35 @@ import {AuthRole} from './enums';
12
13
  * Includes: [{@link AuthRole.OWNER}]
13
14
  * @type {Set<AuthRole>}
14
15
  */
15
- export const AGENT_OWNER_ROLES = new Set<AuthRole>([AuthRole.OWNER]);
16
+ export const AGENT_OWNER_ROLES = Set<AuthRole>([AuthRole.OWNER]);
16
17
  /**
17
18
  * This is the set of roles that can be used to administer a tenant in the agent API.
18
19
  *
19
20
  * Includes: [{@link AuthRole.ADMIN} {@link AuthRole.OWNER}]
20
21
  * @type {Set<AuthRole>}
21
22
  */
22
- export const AGENT_ADMIN_ROLES = new Set<AuthRole>([AuthRole.ADMIN, AuthRole.OWNER]);
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]);
23
31
  /**
24
32
  * This is the set of roles that can be used to view tenant data in the agent API.
25
33
  *
26
34
  * Includes: [{@link AuthRole.VIEWER}, {@link AuthRole.AGENT}, {@link AuthRole.ADMIN}, {@link AuthRole.OWNER}]
27
35
  * @type {Set<AuthRole>}
28
36
  */
29
- export const AGENT_VIEWER_ROLES = new Set<AuthRole>([AuthRole.VIEWER, AuthRole.AGENT, AuthRole.ADMIN, AuthRole.OWNER]);
37
+ export const AGENT_VIEWER_ROLES = Set<AuthRole>([AuthRole.VIEWER, AuthRole.AGENT, AuthRole.ADMIN, AuthRole.OWNER]);
30
38
  /**
31
39
  * This is the set of roles that can be used to view tenant data summaries in the agent API.
32
40
  *
33
41
  * Includes: [{@link AuthRole.REPORT_VIEWER}, {@link AuthRole.VIEWER}, {@link AuthRole.AGENT}, {@link AuthRole.ADMIN}, {@link AuthRole.OWNER}]
34
42
  * @type {Set<AuthRole>}
35
43
  */
36
- export const AGENT_REPORT_VIEWER_ROLES = new Set<AuthRole>([AuthRole.REPORT_VIEWER, AuthRole.VIEWER, AuthRole.AGENT, AuthRole.ADMIN, AuthRole.OWNER]);
44
+ export const AGENT_REPORT_VIEWER_ROLES = Set<AuthRole>([AuthRole.REPORT_VIEWER, AuthRole.VIEWER, AuthRole.AGENT, AuthRole.ADMIN, AuthRole.OWNER]);
37
45
 
38
46
  /**
39
47
  ** /==========================\
@@ -47,7 +55,7 @@ export const AGENT_REPORT_VIEWER_ROLES = new Set<AuthRole>([AuthRole.REPORT_VIEW
47
55
  * Includes: [{@link AuthRole.USER}]
48
56
  * @type {Set<AuthRole>}
49
57
  */
50
- export const ENGAGEMENT_END_USER_ROLES = new Set<AuthRole>([AuthRole.USER]);
58
+ export const ENGAGEMENT_END_USER_ROLES = Set<AuthRole>([AuthRole.USER]);
51
59
 
52
60
  /**
53
61
  ** /========================\
@@ -61,11 +69,11 @@ export const ENGAGEMENT_END_USER_ROLES = new Set<AuthRole>([AuthRole.USER]);
61
69
  * Includes: [{@link AuthRole.CUSTOMER_SUCCESS}, {@link AuthRole.SUPPORT}, {@link AuthRole.OPERATOR}, {@link AuthRole.SERVICE_ACCOUNT}]
62
70
  * @type {Set<AuthRole>}
63
71
  */
64
- export const PLATFORM_READ_ONLY_ROLES = new Set<AuthRole>([AuthRole.CUSTOMER_SUCCESS, AuthRole.SUPPORT, AuthRole.OPERATOR, AuthRole.SERVICE_ACCOUNT]);
72
+ export const PLATFORM_READ_ONLY_ROLES = Set<AuthRole>([AuthRole.CUSTOMER_SUCCESS, AuthRole.SUPPORT, AuthRole.OPERATOR, AuthRole.SERVICE_ACCOUNT]);
65
73
  /**
66
74
  * This is the set of roles that can be used by Amplifier Employees to view data in the Platform API.
67
75
  *
68
76
  * Includes: [{@link AuthRole.CUSTOMER_SUCCESS}, {@link AuthRole.SUPPORT}, {@link AuthRole.OPERATOR}, {@link AuthRole.SERVICE_ACCOUNT}]
69
77
  * @type {Set<AuthRole>}
70
78
  */
71
- export const PLATFORM_READ_WRITE_ROLES = new Set<AuthRole>([AuthRole.OPERATOR, AuthRole.SERVICE_ACCOUNT]);
79
+ export const PLATFORM_READ_WRITE_ROLES = Set<AuthRole>([AuthRole.OPERATOR, AuthRole.SERVICE_ACCOUNT]);