@ampsec/platform-client 4.0.1 → 5.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/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/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/reportResults.dto.d.ts +28 -1
- package/package.json +1 -1
- package/src/dto/enums/metric.kind.ts +6 -0
- package/src/dto/platform/reports.dto.ts +0 -0
- package/src/dto/reportResults.dto.ts +33 -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"}
|
|
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?: number;
|
|
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;
|
package/package.json
CHANGED
|
File without changes
|
|
@@ -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?: number;
|
|
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;
|