@ampsec/platform-client 4.0.1 → 6.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/assets.dto.d.ts +1 -1
- package/build/src/dto/base.dto.d.ts +1 -1
- package/build/src/dto/connectors.dto.d.ts +1 -1
- package/build/src/dto/enums/metric.kind.d.ts +5 -0
- package/build/src/dto/enums/metric.kind.js +11 -0
- package/build/src/dto/enums/metric.kind.js.map +1 -0
- package/build/src/dto/extKeyMap.dto.d.ts +1 -1
- package/build/src/dto/findings.dto.d.ts +2 -2
- package/build/src/dto/metrics.dto.d.ts +1 -1
- package/build/src/dto/platform/multi.tenant.based.dto.d.ts +2 -2
- package/build/src/dto/platform/reports.dto.d.ts +0 -0
- package/build/src/dto/platform/reports.dto.js +2 -0
- package/build/src/dto/platform/reports.dto.js.map +1 -0
- package/build/src/dto/platform/tenant.based.dto.d.ts +2 -2
- package/build/src/dto/reportResults.dto.d.ts +28 -1
- package/build/src/dto/saasAssets.dto.d.ts +3 -3
- package/build/src/dto/saasComponents.dto.d.ts +3 -3
- package/build/src/dto/saasUsers.dto.d.ts +2 -2
- package/build/src/dto/users.dto.d.ts +1 -1
- package/package.json +1 -1
- package/src/dto/assets.dto.ts +1 -1
- package/src/dto/base.dto.ts +1 -1
- package/src/dto/connectors.dto.ts +1 -1
- package/src/dto/enums/metric.kind.ts +6 -0
- package/src/dto/extKeyMap.dto.ts +1 -1
- package/src/dto/findings.dto.ts +2 -2
- package/src/dto/metrics.dto.ts +1 -1
- package/src/dto/platform/multi.tenant.based.dto.ts +2 -2
- package/src/dto/platform/reports.dto.ts +0 -0
- package/src/dto/platform/tenant.based.dto.ts +2 -2
- package/src/dto/reportResults.dto.ts +33 -1
- package/src/dto/saasAssets.dto.ts +3 -3
- package/src/dto/saasComponents.dto.ts +3 -3
- package/src/dto/saasUsers.dto.ts +2 -2
- package/src/dto/users.dto.ts +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetricKind = void 0;
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
var MetricKind;
|
|
6
|
+
(function (MetricKind) {
|
|
7
|
+
MetricKind["BASE"] = "BASE";
|
|
8
|
+
MetricKind["DESCRIPTIVE"] = "DESCRIPTIVE";
|
|
9
|
+
MetricKind["TRENDING"] = "TRENDING";
|
|
10
|
+
})(MetricKind = exports.MetricKind || (exports.MetricKind = {}));
|
|
11
|
+
//# sourceMappingURL=metric.kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric.kind.js","sourceRoot":"","sources":["../../../../src/dto/enums/metric.kind.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,yCAA2B,CAAA;IAC3B,mCAAqB,CAAA;AACvB,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB"}
|
|
@@ -17,8 +17,8 @@ export type FindingUpsertDto = BaseUpsertDto & {
|
|
|
17
17
|
/** Description of the finding */
|
|
18
18
|
description?: string;
|
|
19
19
|
/** Id of the user to which the finding applies */
|
|
20
|
-
uid?:
|
|
20
|
+
uid?: string | undefined;
|
|
21
21
|
/** Id of the SaasComponent related to the given finding */
|
|
22
|
-
scid:
|
|
22
|
+
scid: string;
|
|
23
23
|
};
|
|
24
24
|
export type FindingDto = BaseDto & FindingUpsertDto;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseDto, BaseUpsertDto } from '../base.dto';
|
|
2
2
|
export type UpsertMultiTenantBased = BaseUpsertDto & {
|
|
3
3
|
/** Tenant Ids for multi-tenant entities */
|
|
4
|
-
tids?:
|
|
4
|
+
tids?: string[];
|
|
5
5
|
};
|
|
6
6
|
export type MultiTenantBased = BaseDto & {
|
|
7
7
|
/** Tenant Ids for multi-tenant entities */
|
|
8
|
-
tids:
|
|
8
|
+
tids: string[];
|
|
9
9
|
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/reports.dto.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
import { BaseDto, BaseUpsertDto } from './base.dto';
|
|
2
|
+
import { MetricKind } from './enums/metric.kind';
|
|
3
|
+
export type BaseMetric = {
|
|
4
|
+
/** Kind indicator for metric type */
|
|
5
|
+
kind: MetricKind;
|
|
6
|
+
/** Primary descriptive label */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Primary display value */
|
|
9
|
+
value: number;
|
|
10
|
+
};
|
|
11
|
+
export type DescriptiveMetric = BaseMetric & {
|
|
12
|
+
/** Additional context label */
|
|
13
|
+
ctxLabel: string;
|
|
14
|
+
/** Additional context value */
|
|
15
|
+
ctxValue: number;
|
|
16
|
+
};
|
|
17
|
+
export type TrendingMetric = BaseMetric & {
|
|
18
|
+
/** Directional indicator: + = up, - = down, 0 = no change */
|
|
19
|
+
delta: number;
|
|
20
|
+
};
|
|
21
|
+
export type MetricResultsSubsection = {
|
|
22
|
+
[key: string]: BaseMetric[] | DescriptiveMetric[] | TrendingMetric[];
|
|
23
|
+
};
|
|
24
|
+
export type MetricResults = MetricResultsSubsection[] | BaseMetric[] | DescriptiveMetric[] | TrendingMetric[];
|
|
2
25
|
export type ReportResultUpsertDto = BaseUpsertDto & {
|
|
3
26
|
/** External Id */
|
|
4
27
|
extKey: string;
|
|
28
|
+
/** User Id */
|
|
29
|
+
uid?: string;
|
|
30
|
+
/** Department */
|
|
31
|
+
department?: string | null;
|
|
5
32
|
/** Timestamp the report result was generated in ISO8601 format */
|
|
6
33
|
ts: string;
|
|
7
34
|
/** The results generated for the given report */
|
|
8
|
-
results:
|
|
35
|
+
results: MetricResults;
|
|
9
36
|
};
|
|
10
37
|
export type ReportResultDto = BaseDto & ReportResultUpsertDto;
|
|
@@ -3,11 +3,11 @@ export type SaasAssetUpsertDto = ChangeAwareUpsertDto & {
|
|
|
3
3
|
/** External Id */
|
|
4
4
|
sn: string;
|
|
5
5
|
/** Connector Id */
|
|
6
|
-
cid:
|
|
6
|
+
cid: string;
|
|
7
7
|
/** Asset Id */
|
|
8
|
-
aid:
|
|
8
|
+
aid: string;
|
|
9
9
|
/** User Id */
|
|
10
|
-
uid?:
|
|
10
|
+
uid?: string | undefined;
|
|
11
11
|
/** Information specific to this asset */
|
|
12
12
|
meta: unknown;
|
|
13
13
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
|
|
2
2
|
export type SaasComponentUpsertDto = ChangeAwareUpsertDto & {
|
|
3
3
|
/** Asset Id */
|
|
4
|
-
aid?:
|
|
4
|
+
aid?: string | undefined;
|
|
5
5
|
/** Connector Id */
|
|
6
|
-
cid:
|
|
6
|
+
cid: string;
|
|
7
7
|
/** */
|
|
8
8
|
kind: string;
|
|
9
9
|
/** Context specific information related to the Saas Component */
|
|
10
10
|
meta: unknown;
|
|
11
11
|
/** User Id of the affected user */
|
|
12
|
-
uid?:
|
|
12
|
+
uid?: string | undefined;
|
|
13
13
|
/** External Id */
|
|
14
14
|
extKey: string;
|
|
15
15
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
|
|
2
2
|
export type SaasUserUpsertDto = ChangeAwareUpsertDto & {
|
|
3
3
|
/** User Id */
|
|
4
|
-
uid:
|
|
4
|
+
uid: string;
|
|
5
5
|
/** Connector Id */
|
|
6
|
-
cid:
|
|
6
|
+
cid: string;
|
|
7
7
|
/** External Id */
|
|
8
8
|
email: string;
|
|
9
9
|
/** Additional information specific to this Saas User */
|
|
@@ -3,7 +3,7 @@ import { MetricDto } from './metrics.dto';
|
|
|
3
3
|
import { RiskContributorDto } from './riskContributors.dto';
|
|
4
4
|
export type UserUpsertDto = ChangeAwareUpsertDto & {
|
|
5
5
|
/** Tenant ID */
|
|
6
|
-
tid:
|
|
6
|
+
tid: string;
|
|
7
7
|
/** External ID: list of emails, allows or merging users across email aliases */
|
|
8
8
|
emails: string[];
|
|
9
9
|
/** User first name */
|
package/package.json
CHANGED
package/src/dto/assets.dto.ts
CHANGED
package/src/dto/base.dto.ts
CHANGED
package/src/dto/extKeyMap.dto.ts
CHANGED
package/src/dto/findings.dto.ts
CHANGED
|
@@ -18,9 +18,9 @@ export type FindingUpsertDto = BaseUpsertDto & {
|
|
|
18
18
|
/** Description of the finding */
|
|
19
19
|
description?: string;
|
|
20
20
|
/** Id of the user to which the finding applies */
|
|
21
|
-
uid?:
|
|
21
|
+
uid?: string | undefined;
|
|
22
22
|
/** Id of the SaasComponent related to the given finding */
|
|
23
|
-
scid:
|
|
23
|
+
scid: string;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export type FindingDto = BaseDto & FindingUpsertDto;
|
package/src/dto/metrics.dto.ts
CHANGED
|
@@ -2,10 +2,10 @@ import {BaseDto, BaseUpsertDto} from '../base.dto';
|
|
|
2
2
|
|
|
3
3
|
export type UpsertMultiTenantBased = BaseUpsertDto & {
|
|
4
4
|
/** Tenant Ids for multi-tenant entities */
|
|
5
|
-
tids?:
|
|
5
|
+
tids?: string[];
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export type MultiTenantBased = BaseDto & {
|
|
9
9
|
/** Tenant Ids for multi-tenant entities */
|
|
10
|
-
tids:
|
|
10
|
+
tids: string[];
|
|
11
11
|
};
|
|
File without changes
|
|
@@ -2,10 +2,10 @@ import {BaseDto, BaseUpsertDto} from '../base.dto';
|
|
|
2
2
|
|
|
3
3
|
export type UpsertTenantBased = BaseUpsertDto & {
|
|
4
4
|
/** Tenant Id */
|
|
5
|
-
tid?:
|
|
5
|
+
tid?: string;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export type TenantBased = BaseDto & {
|
|
9
9
|
/** Tenant Id */
|
|
10
|
-
tid:
|
|
10
|
+
tid: string;
|
|
11
11
|
};
|
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
import {BaseDto, BaseUpsertDto} from './base.dto';
|
|
2
|
+
import {MetricKind} from './enums/metric.kind';
|
|
3
|
+
|
|
4
|
+
export type BaseMetric = {
|
|
5
|
+
/** Kind indicator for metric type */
|
|
6
|
+
kind: MetricKind;
|
|
7
|
+
/** Primary descriptive label */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Primary display value */
|
|
10
|
+
value: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type DescriptiveMetric = BaseMetric & {
|
|
14
|
+
/** Additional context label */
|
|
15
|
+
ctxLabel: string;
|
|
16
|
+
/** Additional context value */
|
|
17
|
+
ctxValue: number;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type TrendingMetric = BaseMetric & {
|
|
21
|
+
/** Directional indicator: + = up, - = down, 0 = no change */
|
|
22
|
+
delta: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type MetricResultsSubsection = {
|
|
26
|
+
[key: string]: BaseMetric[] | DescriptiveMetric[] | TrendingMetric[];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type MetricResults = MetricResultsSubsection[] | BaseMetric[] | DescriptiveMetric[] | TrendingMetric[];
|
|
2
30
|
|
|
3
31
|
export type ReportResultUpsertDto = BaseUpsertDto & {
|
|
4
32
|
/** External Id */
|
|
5
33
|
extKey: string;
|
|
34
|
+
/** User Id */
|
|
35
|
+
uid?: string;
|
|
36
|
+
/** Department */
|
|
37
|
+
department?: string | null;
|
|
6
38
|
/** Timestamp the report result was generated in ISO8601 format */
|
|
7
39
|
ts: string;
|
|
8
40
|
/** The results generated for the given report */
|
|
9
|
-
results:
|
|
41
|
+
results: MetricResults;
|
|
10
42
|
};
|
|
11
43
|
|
|
12
44
|
export type ReportResultDto = BaseDto & ReportResultUpsertDto;
|
|
@@ -4,11 +4,11 @@ export type SaasAssetUpsertDto = ChangeAwareUpsertDto & {
|
|
|
4
4
|
/** External Id */
|
|
5
5
|
sn: string;
|
|
6
6
|
/** Connector Id */
|
|
7
|
-
cid:
|
|
7
|
+
cid: string;
|
|
8
8
|
/** Asset Id */
|
|
9
|
-
aid:
|
|
9
|
+
aid: string;
|
|
10
10
|
/** User Id */
|
|
11
|
-
uid?:
|
|
11
|
+
uid?: string | undefined;
|
|
12
12
|
/** Information specific to this asset */
|
|
13
13
|
meta: unknown;
|
|
14
14
|
};
|
|
@@ -2,15 +2,15 @@ import {ChangeAwareDto, ChangeAwareUpsertDto} from './base.dto';
|
|
|
2
2
|
|
|
3
3
|
export type SaasComponentUpsertDto = ChangeAwareUpsertDto & {
|
|
4
4
|
/** Asset Id */
|
|
5
|
-
aid?:
|
|
5
|
+
aid?: string | undefined;
|
|
6
6
|
/** Connector Id */
|
|
7
|
-
cid:
|
|
7
|
+
cid: string;
|
|
8
8
|
/** */
|
|
9
9
|
kind: string;
|
|
10
10
|
/** Context specific information related to the Saas Component */
|
|
11
11
|
meta: unknown;
|
|
12
12
|
/** User Id of the affected user */
|
|
13
|
-
uid?:
|
|
13
|
+
uid?: string | undefined;
|
|
14
14
|
/** External Id */
|
|
15
15
|
extKey: string;
|
|
16
16
|
};
|
package/src/dto/saasUsers.dto.ts
CHANGED
|
@@ -2,9 +2,9 @@ import {ChangeAwareDto, ChangeAwareUpsertDto} from './base.dto';
|
|
|
2
2
|
|
|
3
3
|
export type SaasUserUpsertDto = ChangeAwareUpsertDto & {
|
|
4
4
|
/** User Id */
|
|
5
|
-
uid:
|
|
5
|
+
uid: string;
|
|
6
6
|
/** Connector Id */
|
|
7
|
-
cid:
|
|
7
|
+
cid: string;
|
|
8
8
|
/** External Id */
|
|
9
9
|
email: string;
|
|
10
10
|
/** Additional information specific to this Saas User */
|
package/src/dto/users.dto.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {RiskContributorDto} from './riskContributors.dto';
|
|
|
4
4
|
|
|
5
5
|
export type UserUpsertDto = ChangeAwareUpsertDto & {
|
|
6
6
|
/** Tenant ID */
|
|
7
|
-
tid:
|
|
7
|
+
tid: string;
|
|
8
8
|
/** External ID: list of emails, allows or merging users across email aliases */
|
|
9
9
|
emails: string[];
|
|
10
10
|
/** User first name */
|