@ampsec/platform-client 82.10.0 → 83.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/findingsInsights.dto.d.ts +157 -11
- package/build/src/dto/findingsInsights.dto.js +43 -0
- package/build/src/dto/findingsInsights.dto.js.map +1 -1
- package/build/src/dto/providers.dto.d.ts +15 -5
- package/build/src/dto/providers.dto.js +8 -0
- package/build/src/dto/providers.dto.js.map +1 -1
- package/build/src/dto/riskContributors.dto.d.ts +17 -5
- package/build/src/dto/riskContributors.dto.js +13 -0
- package/build/src/dto/riskContributors.dto.js.map +1 -1
- package/example/package.json +2 -2
- package/package.json +2 -2
- package/src/dto/findingsInsights.dto.ts +43 -72
- package/src/dto/providers.dto.ts +9 -7
- package/src/dto/riskContributors.dto.ts +10 -7
|
@@ -3,18 +3,161 @@ import { Category, FindingKind } from './enums';
|
|
|
3
3
|
import { FindingSeverity, FindingStatus } from './enums';
|
|
4
4
|
import { ComputerOs } from './enums/computer.os.enum';
|
|
5
5
|
import { MobileOs } from './enums/mobile.os.enum';
|
|
6
|
-
import {
|
|
7
|
-
export
|
|
8
|
-
discoveredAt
|
|
9
|
-
closed_at
|
|
10
|
-
category: Category
|
|
11
|
-
kind: FindingKind
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export declare const _FindingsInsightsDto: z.ZodObject<{
|
|
8
|
+
discoveredAt: z.ZodOptional<z.ZodString>;
|
|
9
|
+
closed_at: z.ZodOptional<z.ZodString>;
|
|
10
|
+
category: z.ZodNativeEnum<typeof Category>;
|
|
11
|
+
kind: z.ZodNativeEnum<typeof FindingKind>;
|
|
12
|
+
status: z.ZodNativeEnum<typeof FindingStatus>;
|
|
13
|
+
severity: z.ZodNativeEnum<typeof FindingSeverity>;
|
|
14
|
+
number_of_engagements: z.ZodNumber;
|
|
15
|
+
active_engagements: z.ZodArray<z.ZodObject<{
|
|
16
|
+
engagementStartedAt: z.ZodString;
|
|
17
|
+
expirationAt: z.ZodNullable<z.ZodString>;
|
|
18
|
+
firstName: z.ZodString;
|
|
19
|
+
lastName: z.ZodString;
|
|
20
|
+
emails: z.ZodString;
|
|
21
|
+
uid: z.ZodString;
|
|
22
|
+
numberOfReminders: z.ZodNumber;
|
|
23
|
+
scheduledDate: z.ZodNullable<z.ZodString>;
|
|
24
|
+
status: z.ZodEnum<["RUNNING", "ERROR", "SUCCESS", "CANCELLED", "EXPIRED"]>;
|
|
25
|
+
scope: z.ZodOptional<z.ZodNativeEnum<typeof import("./flows.dto").FlowSpecStatusKind>>;
|
|
26
|
+
state: z.ZodOptional<z.ZodNativeEnum<typeof import("./flows.dto").EngagementState>>;
|
|
27
|
+
flowName: z.ZodString;
|
|
28
|
+
fid: z.ZodString;
|
|
29
|
+
specId: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
|
|
32
|
+
uid: string;
|
|
33
|
+
firstName: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
emails: string;
|
|
36
|
+
fid: string;
|
|
37
|
+
specId: string;
|
|
38
|
+
engagementStartedAt: string;
|
|
39
|
+
expirationAt: string | null;
|
|
40
|
+
numberOfReminders: number;
|
|
41
|
+
scheduledDate: string | null;
|
|
42
|
+
flowName: string;
|
|
43
|
+
scope?: import("./flows.dto").FlowSpecStatusKind | undefined;
|
|
44
|
+
state?: import("./flows.dto").EngagementState | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
|
|
47
|
+
uid: string;
|
|
48
|
+
firstName: string;
|
|
49
|
+
lastName: string;
|
|
50
|
+
emails: string;
|
|
51
|
+
fid: string;
|
|
52
|
+
specId: string;
|
|
53
|
+
engagementStartedAt: string;
|
|
54
|
+
expirationAt: string | null;
|
|
55
|
+
numberOfReminders: number;
|
|
56
|
+
scheduledDate: string | null;
|
|
57
|
+
flowName: string;
|
|
58
|
+
scope?: import("./flows.dto").FlowSpecStatusKind | undefined;
|
|
59
|
+
state?: import("./flows.dto").EngagementState | undefined;
|
|
60
|
+
}>, "many">;
|
|
61
|
+
title: z.ZodString;
|
|
62
|
+
description: z.ZodString;
|
|
63
|
+
provider_name: z.ZodString;
|
|
64
|
+
device_display_value: z.ZodString;
|
|
65
|
+
user_id: z.ZodString;
|
|
66
|
+
user_organization: z.ZodString;
|
|
67
|
+
user_department: z.ZodString;
|
|
68
|
+
user_title: z.ZodString;
|
|
69
|
+
user_score: z.ZodNumber;
|
|
70
|
+
user_emails: z.ZodString;
|
|
71
|
+
user_type: z.ZodString;
|
|
72
|
+
user_name: z.ZodString;
|
|
73
|
+
user_is_executive: z.ZodBoolean;
|
|
74
|
+
user_has_priv_access: z.ZodBoolean;
|
|
75
|
+
user_has_prod_access: z.ZodBoolean;
|
|
76
|
+
user_mfa_not_enabled: z.ZodBoolean;
|
|
77
|
+
user_has_open_vulns: z.ZodBoolean;
|
|
78
|
+
user_total_open_vulns_count: z.ZodNumber;
|
|
79
|
+
user_open_crit_vulns_count: z.ZodNumber;
|
|
80
|
+
user_open_high_vulns_count: z.ZodNumber;
|
|
81
|
+
user_open_med_vulns_count: z.ZodNumber;
|
|
82
|
+
user_open_low_vulns_count: z.ZodNumber;
|
|
83
|
+
user_open_failed_phishing_count: z.ZodNumber;
|
|
84
|
+
user_open_overdue_training_count: z.ZodNumber;
|
|
85
|
+
user_computer_os: z.ZodOptional<z.ZodNativeEnum<typeof ComputerOs>>;
|
|
86
|
+
user_mobile_os: z.ZodOptional<z.ZodNativeEnum<typeof MobileOs>>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
88
|
status: FindingStatus;
|
|
89
|
+
description: string;
|
|
90
|
+
kind: FindingKind;
|
|
91
|
+
title: string;
|
|
13
92
|
severity: FindingSeverity;
|
|
93
|
+
category: Category;
|
|
14
94
|
number_of_engagements: number;
|
|
15
|
-
active_engagements:
|
|
16
|
-
|
|
95
|
+
active_engagements: {
|
|
96
|
+
status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
|
|
97
|
+
uid: string;
|
|
98
|
+
firstName: string;
|
|
99
|
+
lastName: string;
|
|
100
|
+
emails: string;
|
|
101
|
+
fid: string;
|
|
102
|
+
specId: string;
|
|
103
|
+
engagementStartedAt: string;
|
|
104
|
+
expirationAt: string | null;
|
|
105
|
+
numberOfReminders: number;
|
|
106
|
+
scheduledDate: string | null;
|
|
107
|
+
flowName: string;
|
|
108
|
+
scope?: import("./flows.dto").FlowSpecStatusKind | undefined;
|
|
109
|
+
state?: import("./flows.dto").EngagementState | undefined;
|
|
110
|
+
}[];
|
|
111
|
+
provider_name: string;
|
|
112
|
+
device_display_value: string;
|
|
113
|
+
user_id: string;
|
|
114
|
+
user_organization: string;
|
|
115
|
+
user_department: string;
|
|
116
|
+
user_title: string;
|
|
117
|
+
user_score: number;
|
|
118
|
+
user_emails: string;
|
|
119
|
+
user_type: string;
|
|
120
|
+
user_name: string;
|
|
121
|
+
user_is_executive: boolean;
|
|
122
|
+
user_has_priv_access: boolean;
|
|
123
|
+
user_has_prod_access: boolean;
|
|
124
|
+
user_mfa_not_enabled: boolean;
|
|
125
|
+
user_has_open_vulns: boolean;
|
|
126
|
+
user_total_open_vulns_count: number;
|
|
127
|
+
user_open_crit_vulns_count: number;
|
|
128
|
+
user_open_high_vulns_count: number;
|
|
129
|
+
user_open_med_vulns_count: number;
|
|
130
|
+
user_open_low_vulns_count: number;
|
|
131
|
+
user_open_failed_phishing_count: number;
|
|
132
|
+
user_open_overdue_training_count: number;
|
|
133
|
+
discoveredAt?: string | undefined;
|
|
134
|
+
closed_at?: string | undefined;
|
|
135
|
+
user_computer_os?: ComputerOs | undefined;
|
|
136
|
+
user_mobile_os?: MobileOs | undefined;
|
|
137
|
+
}, {
|
|
138
|
+
status: FindingStatus;
|
|
17
139
|
description: string;
|
|
140
|
+
kind: FindingKind;
|
|
141
|
+
title: string;
|
|
142
|
+
severity: FindingSeverity;
|
|
143
|
+
category: Category;
|
|
144
|
+
number_of_engagements: number;
|
|
145
|
+
active_engagements: {
|
|
146
|
+
status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
|
|
147
|
+
uid: string;
|
|
148
|
+
firstName: string;
|
|
149
|
+
lastName: string;
|
|
150
|
+
emails: string;
|
|
151
|
+
fid: string;
|
|
152
|
+
specId: string;
|
|
153
|
+
engagementStartedAt: string;
|
|
154
|
+
expirationAt: string | null;
|
|
155
|
+
numberOfReminders: number;
|
|
156
|
+
scheduledDate: string | null;
|
|
157
|
+
flowName: string;
|
|
158
|
+
scope?: import("./flows.dto").FlowSpecStatusKind | undefined;
|
|
159
|
+
state?: import("./flows.dto").EngagementState | undefined;
|
|
160
|
+
}[];
|
|
18
161
|
provider_name: string;
|
|
19
162
|
device_display_value: string;
|
|
20
163
|
user_id: string;
|
|
@@ -37,7 +180,10 @@ export type FindingsInsightsUpsertDto = BaseUpsertDto & {
|
|
|
37
180
|
user_open_low_vulns_count: number;
|
|
38
181
|
user_open_failed_phishing_count: number;
|
|
39
182
|
user_open_overdue_training_count: number;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
183
|
+
discoveredAt?: string | undefined;
|
|
184
|
+
closed_at?: string | undefined;
|
|
185
|
+
user_computer_os?: ComputerOs | undefined;
|
|
186
|
+
user_mobile_os?: MobileOs | undefined;
|
|
187
|
+
}>;
|
|
188
|
+
export type FindingsInsightsUpsertDto = BaseUpsertDto & z.infer<typeof _FindingsInsightsDto>;
|
|
43
189
|
export type FindingsInsightsDto = BaseDto & FindingsInsightsUpsertDto;
|
|
@@ -1,3 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._FindingsInsightsDto = void 0;
|
|
4
|
+
const enums_1 = require("./enums");
|
|
5
|
+
const enums_2 = require("./enums");
|
|
6
|
+
const computer_os_enum_1 = require("./enums/computer.os.enum");
|
|
7
|
+
const mobile_os_enum_1 = require("./enums/mobile.os.enum");
|
|
8
|
+
const flows_dto_1 = require("./flows.dto");
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
exports._FindingsInsightsDto = zod_1.z.object({
|
|
11
|
+
discoveredAt: zod_1.z.string().optional(),
|
|
12
|
+
closed_at: zod_1.z.string().optional(),
|
|
13
|
+
category: zod_1.z.nativeEnum(enums_1.Category),
|
|
14
|
+
kind: zod_1.z.nativeEnum(enums_1.FindingKind),
|
|
15
|
+
status: zod_1.z.nativeEnum(enums_2.FindingStatus),
|
|
16
|
+
severity: zod_1.z.nativeEnum(enums_2.FindingSeverity),
|
|
17
|
+
number_of_engagements: zod_1.z.number(),
|
|
18
|
+
active_engagements: zod_1.z.array(flows_dto_1._ActiveEngagement),
|
|
19
|
+
title: zod_1.z.string(),
|
|
20
|
+
description: zod_1.z.string(),
|
|
21
|
+
provider_name: zod_1.z.string(),
|
|
22
|
+
device_display_value: zod_1.z.string(),
|
|
23
|
+
user_id: zod_1.z.string(),
|
|
24
|
+
user_organization: zod_1.z.string(),
|
|
25
|
+
user_department: zod_1.z.string(),
|
|
26
|
+
user_title: zod_1.z.string(),
|
|
27
|
+
user_score: zod_1.z.number(),
|
|
28
|
+
user_emails: zod_1.z.string(),
|
|
29
|
+
user_type: zod_1.z.string(),
|
|
30
|
+
user_name: zod_1.z.string(),
|
|
31
|
+
user_is_executive: zod_1.z.boolean(),
|
|
32
|
+
user_has_priv_access: zod_1.z.boolean(),
|
|
33
|
+
user_has_prod_access: zod_1.z.boolean(),
|
|
34
|
+
user_mfa_not_enabled: zod_1.z.boolean(),
|
|
35
|
+
user_has_open_vulns: zod_1.z.boolean(),
|
|
36
|
+
user_total_open_vulns_count: zod_1.z.number(),
|
|
37
|
+
user_open_crit_vulns_count: zod_1.z.number(),
|
|
38
|
+
user_open_high_vulns_count: zod_1.z.number(),
|
|
39
|
+
user_open_med_vulns_count: zod_1.z.number(),
|
|
40
|
+
user_open_low_vulns_count: zod_1.z.number(),
|
|
41
|
+
user_open_failed_phishing_count: zod_1.z.number(),
|
|
42
|
+
user_open_overdue_training_count: zod_1.z.number(),
|
|
43
|
+
user_computer_os: zod_1.z.nativeEnum(computer_os_enum_1.ComputerOs).optional(),
|
|
44
|
+
user_mobile_os: zod_1.z.nativeEnum(mobile_os_enum_1.MobileOs).optional(),
|
|
45
|
+
});
|
|
3
46
|
//# sourceMappingURL=findingsInsights.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findingsInsights.dto.js","sourceRoot":"","sources":["../../../src/dto/findingsInsights.dto.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"findingsInsights.dto.js","sourceRoot":"","sources":["../../../src/dto/findingsInsights.dto.ts"],"names":[],"mappings":";;;AACA,mCAA8C;AAC9C,mCAAuD;AACvD,+DAAoD;AACpD,2DAAgD;AAChD,2CAA8C;AAE9C,6BAAsB;AAET,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,OAAC,CAAC,UAAU,CAAC,gBAAQ,CAAC;IAChC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,mBAAW,CAAC;IAC/B,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,qBAAa,CAAC;IACnC,QAAQ,EAAE,OAAC,CAAC,UAAU,CAAC,uBAAe,CAAC;IACvC,qBAAqB,EAAE,OAAC,CAAC,MAAM,EAAE;IACjC,kBAAkB,EAAE,OAAC,CAAC,KAAK,CAAC,6BAAiB,CAAC;IAC9C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE;IAChC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,iBAAiB,EAAE,OAAC,CAAC,OAAO,EAAE;IAC9B,oBAAoB,EAAE,OAAC,CAAC,OAAO,EAAE;IACjC,oBAAoB,EAAE,OAAC,CAAC,OAAO,EAAE;IACjC,oBAAoB,EAAE,OAAC,CAAC,OAAO,EAAE;IACjC,mBAAmB,EAAE,OAAC,CAAC,OAAO,EAAE;IAChC,2BAA2B,EAAE,OAAC,CAAC,MAAM,EAAE;IACvC,0BAA0B,EAAE,OAAC,CAAC,MAAM,EAAE;IACtC,0BAA0B,EAAE,OAAC,CAAC,MAAM,EAAE;IACtC,yBAAyB,EAAE,OAAC,CAAC,MAAM,EAAE;IACrC,yBAAyB,EAAE,OAAC,CAAC,MAAM,EAAE;IACrC,+BAA+B,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3C,gCAAgC,EAAE,OAAC,CAAC,MAAM,EAAE;IAC5C,gBAAgB,EAAE,OAAC,CAAC,UAAU,CAAC,6BAAU,CAAC,CAAC,QAAQ,EAAE;IACrD,cAAc,EAAE,OAAC,CAAC,UAAU,CAAC,yBAAQ,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC"}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { BaseDto, BaseUpsertDto } from './base.dto';
|
|
2
2
|
import { SyncConfig } from './connectorSyncs.dto';
|
|
3
3
|
import { Category } from './enums';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export declare const _SimpleProviderDto: z.ZodObject<{
|
|
6
|
+
id: z.ZodOptional<z.ZodString>;
|
|
7
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
8
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Category>, "many">>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id?: string | undefined;
|
|
11
|
+
displayValue?: string | undefined;
|
|
12
|
+
categories?: Category[] | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
id?: string | undefined;
|
|
15
|
+
displayValue?: string | undefined;
|
|
16
|
+
categories?: Category[] | undefined;
|
|
17
|
+
}>;
|
|
9
18
|
export type ProviderUpsertDto = BaseUpsertDto & {
|
|
10
19
|
/** Human readable name of the provider */
|
|
11
20
|
displayValue: string;
|
|
@@ -15,3 +24,4 @@ export type ProviderUpsertDto = BaseUpsertDto & {
|
|
|
15
24
|
supportedSyncConfigs?: SyncConfig[];
|
|
16
25
|
};
|
|
17
26
|
export type ProviderDto = BaseDto & ProviderUpsertDto;
|
|
27
|
+
export type SimpleProviderDto = z.infer<typeof _SimpleProviderDto>;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._SimpleProviderDto = void 0;
|
|
4
|
+
const enums_1 = require("./enums");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports._SimpleProviderDto = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string().optional(),
|
|
8
|
+
displayValue: zod_1.z.string().optional(),
|
|
9
|
+
categories: zod_1.z.array(zod_1.z.nativeEnum(enums_1.Category)).optional(),
|
|
10
|
+
});
|
|
3
11
|
//# sourceMappingURL=providers.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.dto.js","sourceRoot":"","sources":["../../../src/dto/providers.dto.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"providers.dto.js","sourceRoot":"","sources":["../../../src/dto/providers.dto.ts"],"names":[],"mappings":";;;AAEA,mCAAiC;AACjC,6BAAsB;AAET,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,UAAU,CAAC,gBAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC"}
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { BaseDto, BaseUpsertDto } from './base.dto';
|
|
2
2
|
import { RiskContributorType } from './enums';
|
|
3
|
-
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export declare const _RiskContributorUpsertDto: z.ZodObject<{
|
|
4
5
|
/** Type of risk contributor */
|
|
5
|
-
type: RiskContributorType
|
|
6
|
+
type: z.ZodNativeEnum<typeof RiskContributorType>;
|
|
6
7
|
/** Short descriptor of the risk contributor, e.g. V, P, etc... */
|
|
7
|
-
displayValue:
|
|
8
|
+
displayValue: z.ZodString;
|
|
8
9
|
/** Description of the risk contributor */
|
|
9
|
-
description:
|
|
10
|
+
description: z.ZodString;
|
|
10
11
|
/** User Id */
|
|
12
|
+
uid: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
type: RiskContributorType;
|
|
15
|
+
description: string;
|
|
11
16
|
uid: string;
|
|
12
|
-
|
|
17
|
+
displayValue: string;
|
|
18
|
+
}, {
|
|
19
|
+
type: RiskContributorType;
|
|
20
|
+
description: string;
|
|
21
|
+
uid: string;
|
|
22
|
+
displayValue: string;
|
|
23
|
+
}>;
|
|
24
|
+
export type RiskContributorUpsertDto = BaseUpsertDto & z.infer<typeof _RiskContributorUpsertDto>;
|
|
13
25
|
export type RiskContributorDto = BaseDto & RiskContributorUpsertDto;
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._RiskContributorUpsertDto = void 0;
|
|
4
|
+
const enums_1 = require("./enums");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports._RiskContributorUpsertDto = zod_1.z.object({
|
|
7
|
+
/** Type of risk contributor */
|
|
8
|
+
type: zod_1.z.nativeEnum(enums_1.RiskContributorType),
|
|
9
|
+
/** Short descriptor of the risk contributor, e.g. V, P, etc... */
|
|
10
|
+
displayValue: zod_1.z.string(),
|
|
11
|
+
/** Description of the risk contributor */
|
|
12
|
+
description: zod_1.z.string(),
|
|
13
|
+
/** User Id */
|
|
14
|
+
uid: zod_1.z.string(),
|
|
15
|
+
});
|
|
3
16
|
//# sourceMappingURL=riskContributors.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"riskContributors.dto.js","sourceRoot":"","sources":["../../../src/dto/riskContributors.dto.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"riskContributors.dto.js","sourceRoot":"","sources":["../../../src/dto/riskContributors.dto.ts"],"names":[],"mappings":";;;AACA,mCAA4C;AAC5C,6BAAsB;AAET,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,+BAA+B;IAC/B,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,2BAAmB,CAAC;IACvC,kEAAkE;IAClE,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,0CAA0C;IAC1C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,cAAc;IACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC"}
|
package/example/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "example",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "example.js",
|
|
6
6
|
"scripts": {
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@ampsec/platform-client": "^12.2.0",
|
|
14
|
-
"axios": "^1.
|
|
14
|
+
"axios": "^1.10.0"
|
|
15
15
|
}
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ampsec/platform-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "83.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"runkitExampleFilename": "example/main.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"author": "Amplifier Security <engineering@amplifiersecurity.com>",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"axios": "^1.
|
|
25
|
+
"axios": "^1.10.0",
|
|
26
26
|
"blueimp-md5": "^2.19.0",
|
|
27
27
|
"contentful": "10.8.9",
|
|
28
28
|
"immutable": "^5.0.0-beta.4",
|
|
@@ -1,78 +1,49 @@
|
|
|
1
|
-
import {BaseDto, BaseUpsertDto} from './base.dto';
|
|
1
|
+
import {BaseDto, BaseUpsertDto, _BaseDto} from './base.dto';
|
|
2
2
|
import {Category, FindingKind} from './enums';
|
|
3
3
|
import {FindingSeverity, FindingStatus} from './enums';
|
|
4
4
|
import {ComputerOs} from './enums/computer.os.enum';
|
|
5
5
|
import {MobileOs} from './enums/mobile.os.enum';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
category: Category
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
user_is_executive: boolean;
|
|
50
|
-
|
|
51
|
-
user_has_priv_access: boolean;
|
|
52
|
-
|
|
53
|
-
user_has_prod_access: boolean;
|
|
54
|
-
|
|
55
|
-
user_mfa_not_enabled: boolean;
|
|
56
|
-
|
|
57
|
-
user_has_open_vulns: boolean;
|
|
58
|
-
|
|
59
|
-
user_total_open_vulns_count: number;
|
|
60
|
-
|
|
61
|
-
user_open_crit_vulns_count: number;
|
|
62
|
-
|
|
63
|
-
user_open_high_vulns_count: number;
|
|
64
|
-
|
|
65
|
-
user_open_med_vulns_count: number;
|
|
66
|
-
|
|
67
|
-
user_open_low_vulns_count: number;
|
|
68
|
-
|
|
69
|
-
user_open_failed_phishing_count: number;
|
|
70
|
-
|
|
71
|
-
user_open_overdue_training_count: number;
|
|
72
|
-
|
|
73
|
-
user_computer_os?: ComputerOs;
|
|
74
|
-
|
|
75
|
-
user_mobile_os?: MobileOs;
|
|
76
|
-
};
|
|
6
|
+
import {_ActiveEngagement} from './flows.dto';
|
|
7
|
+
|
|
8
|
+
import {z} from 'zod';
|
|
9
|
+
|
|
10
|
+
export const _FindingsInsightsDto = z.object({
|
|
11
|
+
discoveredAt: z.string().optional(),
|
|
12
|
+
closed_at: z.string().optional(),
|
|
13
|
+
category: z.nativeEnum(Category),
|
|
14
|
+
kind: z.nativeEnum(FindingKind),
|
|
15
|
+
status: z.nativeEnum(FindingStatus),
|
|
16
|
+
severity: z.nativeEnum(FindingSeverity),
|
|
17
|
+
number_of_engagements: z.number(),
|
|
18
|
+
active_engagements: z.array(_ActiveEngagement),
|
|
19
|
+
title: z.string(),
|
|
20
|
+
description: z.string(),
|
|
21
|
+
provider_name: z.string(),
|
|
22
|
+
device_display_value: z.string(),
|
|
23
|
+
user_id: z.string(),
|
|
24
|
+
user_organization: z.string(),
|
|
25
|
+
user_department: z.string(),
|
|
26
|
+
user_title: z.string(),
|
|
27
|
+
user_score: z.number(),
|
|
28
|
+
user_emails: z.string(),
|
|
29
|
+
user_type: z.string(),
|
|
30
|
+
user_name: z.string(),
|
|
31
|
+
user_is_executive: z.boolean(),
|
|
32
|
+
user_has_priv_access: z.boolean(),
|
|
33
|
+
user_has_prod_access: z.boolean(),
|
|
34
|
+
user_mfa_not_enabled: z.boolean(),
|
|
35
|
+
user_has_open_vulns: z.boolean(),
|
|
36
|
+
user_total_open_vulns_count: z.number(),
|
|
37
|
+
user_open_crit_vulns_count: z.number(),
|
|
38
|
+
user_open_high_vulns_count: z.number(),
|
|
39
|
+
user_open_med_vulns_count: z.number(),
|
|
40
|
+
user_open_low_vulns_count: z.number(),
|
|
41
|
+
user_open_failed_phishing_count: z.number(),
|
|
42
|
+
user_open_overdue_training_count: z.number(),
|
|
43
|
+
user_computer_os: z.nativeEnum(ComputerOs).optional(),
|
|
44
|
+
user_mobile_os: z.nativeEnum(MobileOs).optional(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export type FindingsInsightsUpsertDto = BaseUpsertDto & z.infer<typeof _FindingsInsightsDto>;
|
|
77
48
|
|
|
78
49
|
export type FindingsInsightsDto = BaseDto & FindingsInsightsUpsertDto;
|
package/src/dto/providers.dto.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {BaseDto, BaseUpsertDto} from './base.dto';
|
|
2
|
-
import {SyncConfig} from './connectorSyncs.dto';
|
|
1
|
+
import {BaseDto, BaseUpsertDto, _BaseDto} from './base.dto';
|
|
2
|
+
import {_SyncConfig, SyncConfig} from './connectorSyncs.dto';
|
|
3
3
|
import {Category} from './enums';
|
|
4
|
+
import {z} from 'zod';
|
|
4
5
|
|
|
5
|
-
export
|
|
6
|
-
id
|
|
7
|
-
displayValue
|
|
8
|
-
categories
|
|
9
|
-
};
|
|
6
|
+
export const _SimpleProviderDto = z.object({
|
|
7
|
+
id: z.string().optional(),
|
|
8
|
+
displayValue: z.string().optional(),
|
|
9
|
+
categories: z.array(z.nativeEnum(Category)).optional(),
|
|
10
|
+
});
|
|
10
11
|
|
|
11
12
|
export type ProviderUpsertDto = BaseUpsertDto & {
|
|
12
13
|
/** Human readable name of the provider */
|
|
@@ -18,3 +19,4 @@ export type ProviderUpsertDto = BaseUpsertDto & {
|
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export type ProviderDto = BaseDto & ProviderUpsertDto;
|
|
22
|
+
export type SimpleProviderDto = z.infer<typeof _SimpleProviderDto>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import {BaseDto, BaseUpsertDto} from './base.dto';
|
|
1
|
+
import {_BaseDto, BaseDto, BaseUpsertDto} from './base.dto';
|
|
2
2
|
import {RiskContributorType} from './enums';
|
|
3
|
+
import {z} from 'zod';
|
|
3
4
|
|
|
4
|
-
export
|
|
5
|
+
export const _RiskContributorUpsertDto = z.object({
|
|
5
6
|
/** Type of risk contributor */
|
|
6
|
-
type: RiskContributorType
|
|
7
|
+
type: z.nativeEnum(RiskContributorType),
|
|
7
8
|
/** Short descriptor of the risk contributor, e.g. V, P, etc... */
|
|
8
|
-
displayValue: string
|
|
9
|
+
displayValue: z.string(),
|
|
9
10
|
/** Description of the risk contributor */
|
|
10
|
-
description: string
|
|
11
|
+
description: z.string(),
|
|
11
12
|
/** User Id */
|
|
12
|
-
uid: string
|
|
13
|
-
};
|
|
13
|
+
uid: z.string(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export type RiskContributorUpsertDto = BaseUpsertDto & z.infer<typeof _RiskContributorUpsertDto>;
|
|
14
17
|
|
|
15
18
|
export type RiskContributorDto = BaseDto & RiskContributorUpsertDto;
|