@ampsec/platform-client 17.5.0 → 19.0.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.
- package/build/src/dto/enums/index.d.ts +1 -0
- package/build/src/dto/enums/index.js +1 -0
- package/build/src/dto/enums/index.js.map +1 -1
- package/build/src/dto/enums/riskContributor.type.d.ts +17 -0
- package/build/src/dto/enums/riskContributor.type.js +52 -0
- package/build/src/dto/enums/riskContributor.type.js.map +1 -0
- package/build/src/dto/platform/index.d.ts +1 -0
- package/build/src/dto/platform/index.js +1 -0
- package/build/src/dto/platform/index.js.map +1 -1
- package/build/src/dto/platform/platform.riskContributor.dto.d.ts +3 -0
- package/build/src/dto/platform/platform.riskContributor.dto.js +3 -0
- package/build/src/dto/platform/platform.riskContributor.dto.js.map +1 -0
- package/build/src/dto/riskContributors.dto.d.ts +5 -0
- package/build/src/dto/users.dto.d.ts +2 -2
- package/build/src/services/AmpSdk.d.ts +2 -1
- package/build/src/services/AmpSdk.js +1 -0
- package/build/src/services/AmpSdk.js.map +1 -1
- package/build/src/services/constants.d.ts +1 -0
- package/build/src/services/constants.js +1 -0
- package/build/src/services/constants.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/enums/index.ts +1 -0
- package/src/dto/enums/riskContributor.type.ts +56 -0
- package/src/dto/platform/index.ts +1 -0
- package/src/dto/platform/platform.riskContributor.dto.ts +5 -0
- package/src/dto/riskContributors.dto.ts +5 -0
- package/src/dto/users.dto.ts +2 -2
- package/src/services/AmpSdk.ts +4 -0
- package/src/services/constants.ts +1 -0
|
@@ -22,5 +22,6 @@ __exportStar(require("./findingKind"), exports);
|
|
|
22
22
|
__exportStar(require("./finding.severity"), exports);
|
|
23
23
|
__exportStar(require("./finding.status"), exports);
|
|
24
24
|
__exportStar(require("./jobExecution.status"), exports);
|
|
25
|
+
__exportStar(require("./riskContributor.type"), exports);
|
|
25
26
|
__exportStar(require("./saasComponentKind"), exports);
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,wDAAsC;AACtC,sDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,wDAAsC;AACtC,yDAAuC;AACvC,sDAAoC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum RiskContributorType {
|
|
2
|
+
IS_EXECUTIVE = "IS_EXECUTIVE",
|
|
3
|
+
MFA = "MFA",
|
|
4
|
+
PRODUCTION_ACCESS = "PRODUCTION_ACCESS",
|
|
5
|
+
PRIVILEGED_ACCESS = "PRIVILEGED_ACCESS",
|
|
6
|
+
TOOLING = "TOOLING",
|
|
7
|
+
TRAINING = "TRAINING",
|
|
8
|
+
VULNERABILITY = "VULNERABILITY"
|
|
9
|
+
}
|
|
10
|
+
export type RiskContributorValuesType = {
|
|
11
|
+
[key in keyof typeof RiskContributorType]: {
|
|
12
|
+
type: RiskContributorType;
|
|
13
|
+
displayValue: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const RiskContributorValues: RiskContributorValuesType;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RiskContributorValues = exports.RiskContributorType = void 0;
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
var RiskContributorType;
|
|
6
|
+
(function (RiskContributorType) {
|
|
7
|
+
RiskContributorType["IS_EXECUTIVE"] = "IS_EXECUTIVE";
|
|
8
|
+
RiskContributorType["MFA"] = "MFA";
|
|
9
|
+
RiskContributorType["PRODUCTION_ACCESS"] = "PRODUCTION_ACCESS";
|
|
10
|
+
RiskContributorType["PRIVILEGED_ACCESS"] = "PRIVILEGED_ACCESS";
|
|
11
|
+
RiskContributorType["TOOLING"] = "TOOLING";
|
|
12
|
+
RiskContributorType["TRAINING"] = "TRAINING";
|
|
13
|
+
RiskContributorType["VULNERABILITY"] = "VULNERABILITY";
|
|
14
|
+
})(RiskContributorType || (exports.RiskContributorType = RiskContributorType = {}));
|
|
15
|
+
exports.RiskContributorValues = {
|
|
16
|
+
IS_EXECUTIVE: {
|
|
17
|
+
type: RiskContributorType.IS_EXECUTIVE,
|
|
18
|
+
displayValue: 'EXEC',
|
|
19
|
+
description: 'User has executive access',
|
|
20
|
+
},
|
|
21
|
+
MFA: {
|
|
22
|
+
type: RiskContributorType.MFA,
|
|
23
|
+
displayValue: 'MFA',
|
|
24
|
+
description: 'User mfa not enabled',
|
|
25
|
+
},
|
|
26
|
+
PRODUCTION_ACCESS: {
|
|
27
|
+
type: RiskContributorType.PRODUCTION_ACCESS,
|
|
28
|
+
displayValue: 'PROD',
|
|
29
|
+
description: 'User has production access',
|
|
30
|
+
},
|
|
31
|
+
PRIVILEGED_ACCESS: {
|
|
32
|
+
type: RiskContributorType.PRIVILEGED_ACCESS,
|
|
33
|
+
displayValue: 'PRIV',
|
|
34
|
+
description: 'User has privileged access',
|
|
35
|
+
},
|
|
36
|
+
TOOLING: {
|
|
37
|
+
type: RiskContributorType.TOOLING,
|
|
38
|
+
displayValue: 'TOOLING',
|
|
39
|
+
description: 'User edr not enabled',
|
|
40
|
+
},
|
|
41
|
+
TRAINING: {
|
|
42
|
+
type: RiskContributorType.TRAINING,
|
|
43
|
+
displayValue: 'TRAIN',
|
|
44
|
+
description: 'User has failed phishing',
|
|
45
|
+
},
|
|
46
|
+
VULNERABILITY: {
|
|
47
|
+
type: RiskContributorType.VULNERABILITY,
|
|
48
|
+
displayValue: 'VULN',
|
|
49
|
+
description: 'User has vulnerabilities',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=riskContributor.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"riskContributor.type.js","sourceRoot":"","sources":["../../../../src/dto/enums/riskContributor.type.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,mBAQX;AARD,WAAY,mBAAmB;IAC7B,oDAA6B,CAAA;IAC7B,kCAAW,CAAA;IACX,8DAAuC,CAAA;IACvC,8DAAuC,CAAA;IACvC,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;IACrB,sDAA+B,CAAA;AACjC,CAAC,EARW,mBAAmB,mCAAnB,mBAAmB,QAQ9B;AAUY,QAAA,qBAAqB,GAA8B;IAC9D,YAAY,EAAE;QACZ,IAAI,EAAE,mBAAmB,CAAC,YAAY;QACtC,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,2BAA2B;KACzC;IACD,GAAG,EAAE;QACH,IAAI,EAAE,mBAAmB,CAAC,GAAG;QAC7B,YAAY,EAAE,KAAK;QACnB,WAAW,EAAE,sBAAsB;KACpC;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,mBAAmB,CAAC,iBAAiB;QAC3C,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,4BAA4B;KAC1C;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,mBAAmB,CAAC,iBAAiB;QAC3C,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,4BAA4B;KAC1C;IACD,OAAO,EAAE;QACP,IAAI,EAAE,mBAAmB,CAAC,OAAO;QACjC,YAAY,EAAE,SAAS;QACvB,WAAW,EAAE,sBAAsB;KACpC;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,mBAAmB,CAAC,QAAQ;QAClC,YAAY,EAAE,OAAO;QACrB,WAAW,EAAE,0BAA0B;KACxC;IACD,aAAa,EAAE;QACb,IAAI,EAAE,mBAAmB,CAAC,aAAa;QACvC,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,0BAA0B;KACxC;CACF,CAAC"}
|
|
@@ -6,6 +6,7 @@ export * from './platform.jobExecutionState.dto';
|
|
|
6
6
|
export * from './platform.jobSpec.dto';
|
|
7
7
|
export * from './platform.providers.dto';
|
|
8
8
|
export * from './platform.reportResults.dto';
|
|
9
|
+
export * from './platform.riskContributor.dto';
|
|
9
10
|
export * from './platform.saasAssets.dto';
|
|
10
11
|
export * from './platform.saasComponents.dto';
|
|
11
12
|
export * from './platform.saasUsers.dto';
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./platform.jobExecutionState.dto"), exports);
|
|
|
22
22
|
__exportStar(require("./platform.jobSpec.dto"), exports);
|
|
23
23
|
__exportStar(require("./platform.providers.dto"), exports);
|
|
24
24
|
__exportStar(require("./platform.reportResults.dto"), exports);
|
|
25
|
+
__exportStar(require("./platform.riskContributor.dto"), exports);
|
|
25
26
|
__exportStar(require("./platform.saasAssets.dto"), exports);
|
|
26
27
|
__exportStar(require("./platform.saasComponents.dto"), exports);
|
|
27
28
|
__exportStar(require("./platform.saasUsers.dto"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,0DAAwC;AACxC,mEAAiD;AACjD,yDAAuC;AACvC,2DAAyC;AACzC,+DAA6C;AAC7C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,0DAAwC;AACxC,mEAAiD;AACjD,yDAAuC;AACvC,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,qDAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.riskContributor.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.riskContributor.dto.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { BaseDto, BaseUpsertDto } from './base.dto';
|
|
2
|
+
import { RiskContributorType } from './enums';
|
|
2
3
|
export type RiskContributorUpsertDto = BaseUpsertDto & {
|
|
4
|
+
/** Type of risk contributor */
|
|
5
|
+
type: RiskContributorType;
|
|
3
6
|
/** Short descriptor of the risk contributor, e.g. V, P, etc... */
|
|
4
7
|
displayValue: string;
|
|
5
8
|
/** Description of the risk contributor */
|
|
6
9
|
description: string;
|
|
10
|
+
/** User Id */
|
|
11
|
+
uid: string;
|
|
7
12
|
};
|
|
8
13
|
export type RiskContributorDto = BaseDto & RiskContributorUpsertDto;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
|
|
2
2
|
import { MetricResults } from './reportResults.dto';
|
|
3
|
-
import {
|
|
3
|
+
import { RiskContributorUpsertDto } from './riskContributors.dto';
|
|
4
4
|
export type UserUpsertDto = ChangeAwareUpsertDto & {
|
|
5
5
|
/** Tenant ID */
|
|
6
6
|
tid: string;
|
|
@@ -23,7 +23,7 @@ export type UserUpsertDto = ChangeAwareUpsertDto & {
|
|
|
23
23
|
/** Employment start date used for calculating tenure */
|
|
24
24
|
startDate?: string;
|
|
25
25
|
/** Risk Contributors associated with the user */
|
|
26
|
-
riskContributors:
|
|
26
|
+
riskContributors: RiskContributorUpsertDto[];
|
|
27
27
|
/** Metrics associated with the user */
|
|
28
28
|
metrics?: MetricResults;
|
|
29
29
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformAssetDto, PlatformAssetUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformFindingDto, PlatformFindingUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformSaasAssetDto, PlatformSaasAssetUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformSaasUserDto, PlatformSaasUserUpsertDto, PlatformUserDto, PlatformUserUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
1
|
+
import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformAssetDto, PlatformAssetUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformFindingDto, PlatformFindingUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformRiskContributorDto, PlatformRiskContributorUpsertDto, PlatformSaasAssetDto, PlatformSaasAssetUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformSaasUserDto, PlatformSaasUserUpsertDto, PlatformUserDto, PlatformUserUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
2
2
|
import { AmpEntityService, AmpGlobalEntityService, AmpSaaSEntityService } from './entity.service';
|
|
3
3
|
import { AmpRestClientOptions, RestClient } from './rest';
|
|
4
4
|
import { PlatformJobSpecDto, PlatformJobSpecUpsertDto } from '../dto/platform/platform.jobSpec.dto';
|
|
@@ -25,6 +25,7 @@ export declare class AmpSdkServices {
|
|
|
25
25
|
readonly jobs: AmpEntityService<PlatformJobSpecUpsertDto, PlatformJobSpecDto>;
|
|
26
26
|
readonly providers: AmpEntityService<PlatformProviderUpsertDto, ProviderDto>;
|
|
27
27
|
readonly reportResults: AmpSaaSEntityService<PlatformReportResultUpsertDto, PlatformReportResultDto>;
|
|
28
|
+
readonly riskContributors: AmpSaaSEntityService<PlatformRiskContributorUpsertDto, PlatformRiskContributorDto>;
|
|
28
29
|
readonly saasAssets: AmpSaaSEntityService<PlatformSaasAssetUpsertDto, PlatformSaasAssetDto>;
|
|
29
30
|
readonly saasComponents: AmpSaaSEntityService<PlatformSaasComponentUpsertDto, PlatformSaasComponentDto>;
|
|
30
31
|
readonly saasUsers: AmpSaaSEntityService<PlatformSaasUserUpsertDto, PlatformSaasUserDto>;
|
|
@@ -26,6 +26,7 @@ class AmpSdkServices {
|
|
|
26
26
|
this.jobs = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.JOB_SPEC, constants_1.TARGET_API_PLATFORM);
|
|
27
27
|
this.providers = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.PROVIDERS, constants_1.TARGET_API_PLATFORM);
|
|
28
28
|
this.reportResults = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.REPORT_RESULTS, constants_1.TARGET_API_PLATFORM);
|
|
29
|
+
this.riskContributors = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.RISK_CONTRIBUTORS, constants_1.TARGET_API_PLATFORM);
|
|
29
30
|
this.saasAssets = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.SAAS_ASSETS, constants_1.TARGET_API_PLATFORM);
|
|
30
31
|
this.saasComponents = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.SAAS_COMPONENTS, constants_1.TARGET_API_PLATFORM);
|
|
31
32
|
this.saasUsers = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.SAAS_USERS, constants_1.TARGET_API_PLATFORM);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Amp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AEW,QAAA,OAAO,GAAG;IACrB,YAAY,EAAE,cAAc;IAC5B,yBAAyB,EAAE,qCAAqC;IAChE,yBAAyB,EAAE,qCAAqC;IAChE,iBAAiB,EAAE,mBAAmB;IACtC,qBAAqB,EAAE,uBAAuB;IAC9C,YAAY,EAAE,0BAA0B;IACxC,qBAAqB,EAAE,uBAAuB;IAC9C,gBAAgB,EAAE,kBAAkB;IACpC,mBAAmB;IACnB,kBAAkB,EAAE,cAAc;CACnC,CAAC"}
|
package/package.json
CHANGED
package/src/dto/enums/index.ts
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
export enum RiskContributorType {
|
|
3
|
+
IS_EXECUTIVE = 'IS_EXECUTIVE',
|
|
4
|
+
MFA = 'MFA',
|
|
5
|
+
PRODUCTION_ACCESS = 'PRODUCTION_ACCESS',
|
|
6
|
+
PRIVILEGED_ACCESS = 'PRIVILEGED_ACCESS',
|
|
7
|
+
TOOLING = 'TOOLING',
|
|
8
|
+
TRAINING = 'TRAINING',
|
|
9
|
+
VULNERABILITY = 'VULNERABILITY',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type RiskContributorValuesType = {
|
|
13
|
+
[key in keyof typeof RiskContributorType]: {
|
|
14
|
+
type: RiskContributorType;
|
|
15
|
+
displayValue: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const RiskContributorValues: RiskContributorValuesType = {
|
|
21
|
+
IS_EXECUTIVE: {
|
|
22
|
+
type: RiskContributorType.IS_EXECUTIVE,
|
|
23
|
+
displayValue: 'EXEC',
|
|
24
|
+
description: 'User has executive access',
|
|
25
|
+
},
|
|
26
|
+
MFA: {
|
|
27
|
+
type: RiskContributorType.MFA,
|
|
28
|
+
displayValue: 'MFA',
|
|
29
|
+
description: 'User mfa not enabled',
|
|
30
|
+
},
|
|
31
|
+
PRODUCTION_ACCESS: {
|
|
32
|
+
type: RiskContributorType.PRODUCTION_ACCESS,
|
|
33
|
+
displayValue: 'PROD',
|
|
34
|
+
description: 'User has production access',
|
|
35
|
+
},
|
|
36
|
+
PRIVILEGED_ACCESS: {
|
|
37
|
+
type: RiskContributorType.PRIVILEGED_ACCESS,
|
|
38
|
+
displayValue: 'PRIV',
|
|
39
|
+
description: 'User has privileged access',
|
|
40
|
+
},
|
|
41
|
+
TOOLING: {
|
|
42
|
+
type: RiskContributorType.TOOLING,
|
|
43
|
+
displayValue: 'TOOLING',
|
|
44
|
+
description: 'User edr not enabled',
|
|
45
|
+
},
|
|
46
|
+
TRAINING: {
|
|
47
|
+
type: RiskContributorType.TRAINING,
|
|
48
|
+
displayValue: 'TRAIN',
|
|
49
|
+
description: 'User has failed phishing',
|
|
50
|
+
},
|
|
51
|
+
VULNERABILITY: {
|
|
52
|
+
type: RiskContributorType.VULNERABILITY,
|
|
53
|
+
displayValue: 'VULN',
|
|
54
|
+
description: 'User has vulnerabilities',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
@@ -6,6 +6,7 @@ export * from './platform.jobExecutionState.dto';
|
|
|
6
6
|
export * from './platform.jobSpec.dto';
|
|
7
7
|
export * from './platform.providers.dto';
|
|
8
8
|
export * from './platform.reportResults.dto';
|
|
9
|
+
export * from './platform.riskContributor.dto';
|
|
9
10
|
export * from './platform.saasAssets.dto';
|
|
10
11
|
export * from './platform.saasComponents.dto';
|
|
11
12
|
export * from './platform.saasUsers.dto';
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import {BaseDto, BaseUpsertDto} from './base.dto';
|
|
2
|
+
import {RiskContributorType} from './enums';
|
|
2
3
|
|
|
3
4
|
export type RiskContributorUpsertDto = BaseUpsertDto & {
|
|
5
|
+
/** Type of risk contributor */
|
|
6
|
+
type: RiskContributorType;
|
|
4
7
|
/** Short descriptor of the risk contributor, e.g. V, P, etc... */
|
|
5
8
|
displayValue: string;
|
|
6
9
|
/** Description of the risk contributor */
|
|
7
10
|
description: string;
|
|
11
|
+
/** User Id */
|
|
12
|
+
uid: string;
|
|
8
13
|
};
|
|
9
14
|
|
|
10
15
|
export type RiskContributorDto = BaseDto & RiskContributorUpsertDto;
|
package/src/dto/users.dto.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {ChangeAwareDto, ChangeAwareUpsertDto} from './base.dto';
|
|
2
2
|
import {MetricResults} from './reportResults.dto';
|
|
3
|
-
import {
|
|
3
|
+
import {RiskContributorUpsertDto} from './riskContributors.dto';
|
|
4
4
|
|
|
5
5
|
export type UserUpsertDto = ChangeAwareUpsertDto & {
|
|
6
6
|
/** Tenant ID */
|
|
@@ -24,7 +24,7 @@ export type UserUpsertDto = ChangeAwareUpsertDto & {
|
|
|
24
24
|
/** Employment start date used for calculating tenure */
|
|
25
25
|
startDate?: string;
|
|
26
26
|
/** Risk Contributors associated with the user */
|
|
27
|
-
riskContributors:
|
|
27
|
+
riskContributors: RiskContributorUpsertDto[];
|
|
28
28
|
/** Metrics associated with the user */
|
|
29
29
|
metrics?: MetricResults;
|
|
30
30
|
};
|
package/src/services/AmpSdk.ts
CHANGED
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
PlatformProviderUpsertDto,
|
|
11
11
|
PlatformReportResultDto,
|
|
12
12
|
PlatformReportResultUpsertDto,
|
|
13
|
+
PlatformRiskContributorDto,
|
|
14
|
+
PlatformRiskContributorUpsertDto,
|
|
13
15
|
PlatformSaasAssetDto,
|
|
14
16
|
PlatformSaasAssetUpsertDto,
|
|
15
17
|
PlatformSaasComponentDto,
|
|
@@ -51,6 +53,7 @@ export class AmpSdkServices {
|
|
|
51
53
|
readonly jobs: AmpEntityService<PlatformJobSpecUpsertDto, PlatformJobSpecDto>;
|
|
52
54
|
readonly providers: AmpEntityService<PlatformProviderUpsertDto, ProviderDto>;
|
|
53
55
|
readonly reportResults: AmpSaaSEntityService<PlatformReportResultUpsertDto, PlatformReportResultDto>;
|
|
56
|
+
readonly riskContributors: AmpSaaSEntityService<PlatformRiskContributorUpsertDto, PlatformRiskContributorDto>;
|
|
54
57
|
readonly saasAssets: AmpSaaSEntityService<PlatformSaasAssetUpsertDto, PlatformSaasAssetDto>;
|
|
55
58
|
readonly saasComponents: AmpSaaSEntityService<PlatformSaasComponentUpsertDto, PlatformSaasComponentDto>;
|
|
56
59
|
readonly saasUsers: AmpSaaSEntityService<PlatformSaasUserUpsertDto, PlatformSaasUserDto>;
|
|
@@ -68,6 +71,7 @@ export class AmpSdkServices {
|
|
|
68
71
|
this.jobs = new AmpEntityServiceImpl<PlatformJobSpecUpsertDto, PlatformJobSpecDto>(rest, KIND.JOB_SPEC, TARGET_API_PLATFORM);
|
|
69
72
|
this.providers = new AmpEntityServiceImpl<PlatformProviderUpsertDto, ProviderDto>(rest, KIND.PROVIDERS, TARGET_API_PLATFORM);
|
|
70
73
|
this.reportResults = new AmpSaaSEntityServiceImpl<PlatformReportResultUpsertDto, PlatformReportResultDto>(rest, KIND.REPORT_RESULTS, TARGET_API_PLATFORM);
|
|
74
|
+
this.riskContributors = new AmpSaaSEntityServiceImpl<PlatformRiskContributorUpsertDto, PlatformRiskContributorDto>(rest, KIND.RISK_CONTRIBUTORS, TARGET_API_PLATFORM);
|
|
71
75
|
this.saasAssets = new AmpSaaSEntityServiceImpl<PlatformSaasAssetUpsertDto, PlatformSaasAssetDto>(rest, KIND.SAAS_ASSETS, TARGET_API_PLATFORM);
|
|
72
76
|
this.saasComponents = new AmpSaaSEntityServiceImpl<PlatformSaasComponentUpsertDto, PlatformSaasComponentDto>(rest, KIND.SAAS_COMPONENTS, TARGET_API_PLATFORM);
|
|
73
77
|
this.saasUsers = new AmpSaaSEntityServiceImpl<PlatformSaasUserUpsertDto, PlatformSaasUserDto>(rest, KIND.SAAS_USERS, TARGET_API_PLATFORM);
|