@ampsec/platform-client 10.3.0 → 11.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.
@@ -0,0 +1,5 @@
1
+ export type EnumDto = {
2
+ [enumValueName: string]: {
3
+ total: number;
4
+ };
5
+ };
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=metrics.dto.js.map
3
+ //# sourceMappingURL=enum.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum.dto.js","sourceRoot":"","sources":["../../../src/dto/enum.dto.ts"],"names":[],"mappings":""}
@@ -2,11 +2,11 @@ export * from './agents.dto';
2
2
  export * from './assets.dto';
3
3
  export * from './base.dto';
4
4
  export * from './connectors.dto';
5
+ export * from './enum.dto';
5
6
  export * from './enums';
6
7
  export * from './extKeyMap.dto';
7
8
  export * from './findings.dto';
8
9
  export * from './message.dto';
9
- export * from './metrics.dto';
10
10
  export * from './page.dto';
11
11
  export * from './platform';
12
12
  export * from './providers.dto';
@@ -18,11 +18,11 @@ __exportStar(require("./agents.dto"), exports);
18
18
  __exportStar(require("./assets.dto"), exports);
19
19
  __exportStar(require("./base.dto"), exports);
20
20
  __exportStar(require("./connectors.dto"), exports);
21
+ __exportStar(require("./enum.dto"), exports);
21
22
  __exportStar(require("./enums"), exports);
22
23
  __exportStar(require("./extKeyMap.dto"), exports);
23
24
  __exportStar(require("./findings.dto"), exports);
24
25
  __exportStar(require("./message.dto"), exports);
25
- __exportStar(require("./metrics.dto"), exports);
26
26
  __exportStar(require("./page.dto"), exports);
27
27
  __exportStar(require("./platform"), exports);
28
28
  __exportStar(require("./providers.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,6CAA2B;AAC3B,mDAAiC;AACjC,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,gDAA8B;AAC9B,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,6CAA2B;AAC3B,mDAAiC;AACjC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B"}
@@ -2,7 +2,6 @@ export * from './platform.agents.dto';
2
2
  export * from './platform.assets.dto';
3
3
  export * from './platform.connectors.dto';
4
4
  export * from './platform.findings.dto';
5
- export * from './platform.metrics.dto';
6
5
  export * from './platform.providers.dto';
7
6
  export * from './platform.reportResults.dto';
8
7
  export * from './platform.saasAssets.dto';
@@ -18,7 +18,6 @@ __exportStar(require("./platform.agents.dto"), exports);
18
18
  __exportStar(require("./platform.assets.dto"), exports);
19
19
  __exportStar(require("./platform.connectors.dto"), exports);
20
20
  __exportStar(require("./platform.findings.dto"), exports);
21
- __exportStar(require("./platform.metrics.dto"), exports);
22
21
  __exportStar(require("./platform.providers.dto"), exports);
23
22
  __exportStar(require("./platform.reportResults.dto"), exports);
24
23
  __exportStar(require("./platform.saasAssets.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,yDAAuC;AACvC,2DAAyC;AACzC,+DAA6C;AAC7C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,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,2DAAyC;AACzC,+DAA6C;AAC7C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,yDAAuC;AACvC,uDAAqC;AACrC,qDAAmC"}
@@ -1,5 +1,8 @@
1
1
  import { BaseDto, BaseUpsertDto } from './base.dto';
2
2
  import { MetricKind } from './enums/metric.kind';
3
+ export type Meta = {
4
+ [propName: string]: Meta | string | number;
5
+ };
3
6
  export type BaseMetric = {
4
7
  /** Kind indicator for metric type */
5
8
  kind: MetricKind;
@@ -7,6 +10,8 @@ export type BaseMetric = {
7
10
  label: string;
8
11
  /** Primary display value */
9
12
  value: number;
13
+ /** Generic field to hold additional information */
14
+ meta?: Meta;
10
15
  };
11
16
  export type DescriptiveMetric = BaseMetric & {
12
17
  /** Additional context label */
@@ -1,5 +1,5 @@
1
1
  import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
- import { MetricDto } from './metrics.dto';
2
+ import { MetricResults } from './reportResults.dto';
3
3
  import { RiskContributorDto } from './riskContributors.dto';
4
4
  export type UserUpsertDto = ChangeAwareUpsertDto & {
5
5
  /** Tenant ID */
@@ -21,6 +21,6 @@ export type UserUpsertDto = ChangeAwareUpsertDto & {
21
21
  /** Risk Contributors associated with the user */
22
22
  riskContributors: RiskContributorDto[];
23
23
  /** Metrics associated with the user */
24
- metrics: MetricDto[];
24
+ metrics?: MetricResults;
25
25
  };
26
26
  export type UserDto = ChangeAwareDto & UserUpsertDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "10.3.0",
3
+ "version": "11.0.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -0,0 +1,3 @@
1
+ export type EnumDto = {
2
+ [enumValueName: string]: {total: number};
3
+ };
package/src/dto/index.ts CHANGED
@@ -2,11 +2,11 @@ export * from './agents.dto';
2
2
  export * from './assets.dto';
3
3
  export * from './base.dto';
4
4
  export * from './connectors.dto';
5
+ export * from './enum.dto';
5
6
  export * from './enums';
6
7
  export * from './extKeyMap.dto';
7
8
  export * from './findings.dto';
8
9
  export * from './message.dto';
9
- export * from './metrics.dto';
10
10
  export * from './page.dto';
11
11
  export * from './platform';
12
12
  export * from './providers.dto';
@@ -2,7 +2,6 @@ export * from './platform.agents.dto';
2
2
  export * from './platform.assets.dto';
3
3
  export * from './platform.connectors.dto';
4
4
  export * from './platform.findings.dto';
5
- export * from './platform.metrics.dto';
6
5
  export * from './platform.providers.dto';
7
6
  export * from './platform.reportResults.dto';
8
7
  export * from './platform.saasAssets.dto';
@@ -1,6 +1,10 @@
1
1
  import {BaseDto, BaseUpsertDto} from './base.dto';
2
2
  import {MetricKind} from './enums/metric.kind';
3
3
 
4
+ export type Meta = {
5
+ [propName: string]: Meta | string | number;
6
+ };
7
+
4
8
  export type BaseMetric = {
5
9
  /** Kind indicator for metric type */
6
10
  kind: MetricKind;
@@ -8,6 +12,8 @@ export type BaseMetric = {
8
12
  label: string;
9
13
  /** Primary display value */
10
14
  value: number;
15
+ /** Generic field to hold additional information */
16
+ meta?: Meta;
11
17
  };
12
18
 
13
19
  export type DescriptiveMetric = BaseMetric & {
@@ -1,5 +1,5 @@
1
1
  import {ChangeAwareDto, ChangeAwareUpsertDto} from './base.dto';
2
- import {MetricDto} from './metrics.dto';
2
+ import {MetricResults} from './reportResults.dto';
3
3
  import {RiskContributorDto} from './riskContributors.dto';
4
4
 
5
5
  export type UserUpsertDto = ChangeAwareUpsertDto & {
@@ -22,7 +22,7 @@ export type UserUpsertDto = ChangeAwareUpsertDto & {
22
22
  /** Risk Contributors associated with the user */
23
23
  riskContributors: RiskContributorDto[];
24
24
  /** Metrics associated with the user */
25
- metrics: MetricDto[];
25
+ metrics?: MetricResults;
26
26
  };
27
27
 
28
28
  export type UserDto = ChangeAwareDto & UserUpsertDto;
@@ -1,8 +0,0 @@
1
- import { BaseDto, BaseUpsertDto } from './base.dto';
2
- export type MetricUpsertDto = BaseUpsertDto & {
3
- uid: string;
4
- score: number;
5
- scoreDelta: number;
6
- rank: number;
7
- };
8
- export type MetricDto = BaseDto & MetricUpsertDto;
@@ -1 +0,0 @@
1
- {"version":3,"file":"metrics.dto.js","sourceRoot":"","sources":["../../../src/dto/metrics.dto.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { MetricDto, MetricUpsertDto } from '../metrics.dto';
2
- import { TenantBased, UpsertTenantBased } from './tenant.based.dto';
3
- export type PlatformMetricUpsertDto = MetricUpsertDto & UpsertTenantBased;
4
- export type PlatformMetricDto = MetricDto & TenantBased;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=platform.metrics.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.metrics.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.metrics.dto.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import {BaseDto, BaseUpsertDto} from './base.dto';
2
-
3
- export type MetricUpsertDto = BaseUpsertDto & {
4
- uid: string;
5
- score: number;
6
- scoreDelta: number;
7
- rank: number;
8
- };
9
-
10
- export type MetricDto = BaseDto & MetricUpsertDto;
@@ -1,6 +0,0 @@
1
- import {MetricDto, MetricUpsertDto} from '../metrics.dto';
2
- import {TenantBased, UpsertTenantBased} from './tenant.based.dto';
3
-
4
- export type PlatformMetricUpsertDto = MetricUpsertDto & UpsertTenantBased;
5
-
6
- export type PlatformMetricDto = MetricDto & TenantBased;