@ampsec/platform-client 62.8.0 → 62.10.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/base.dto.d.ts +6 -0
- package/build/src/dto/base.dto.js +8 -2
- package/build/src/dto/base.dto.js.map +1 -1
- package/build/src/dto/customActions.dto.d.ts +365 -0
- package/build/src/dto/customActions.dto.js +40 -0
- package/build/src/dto/customActions.dto.js.map +1 -0
- package/build/src/dto/customScores.dto.d.ts +153 -0
- package/build/src/dto/customScores.dto.js +17 -0
- package/build/src/dto/customScores.dto.js.map +1 -0
- package/build/src/dto/findings.dto.d.ts +88 -0
- package/build/src/dto/findings.dto.js +25 -0
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/flows.dto.d.ts +19 -0
- package/build/src/dto/flows.dto.js +9 -10
- package/build/src/dto/flows.dto.js.map +1 -1
- package/build/src/dto/index.d.ts +2 -0
- package/build/src/dto/index.js +2 -0
- package/build/src/dto/index.js.map +1 -1
- package/build/src/dto/platform/index.d.ts +2 -0
- package/build/src/dto/platform/index.js +2 -0
- package/build/src/dto/platform/index.js.map +1 -1
- package/build/src/dto/platform/platform.customActions.dto.d.ts +303 -0
- package/build/src/dto/platform/platform.customActions.dto.js +12 -0
- package/build/src/dto/platform/platform.customActions.dto.js.map +1 -0
- package/build/src/dto/platform/platform.customScores.dto.d.ts +165 -0
- package/build/src/dto/platform/platform.customScores.dto.js +18 -0
- package/build/src/dto/platform/platform.customScores.dto.js.map +1 -0
- package/build/src/dto/platform/platform.findings.dto.d.ts +77 -0
- package/build/src/dto/platform/platform.findings.dto.js +9 -0
- package/build/src/dto/platform/platform.findings.dto.js.map +1 -1
- package/build/src/dto/platform/platform.saasAssets.dto.d.ts +3 -0
- package/build/src/dto/platform/platform.saasAssets.dto.js +1 -0
- package/build/src/dto/platform/platform.saasAssets.dto.js.map +1 -1
- package/build/src/dto/platform/platform.saasComponents.dto.d.ts +1 -0
- package/build/src/dto/platform/platform.saasUsers.dto.d.ts +3 -0
- package/build/src/dto/platform/platform.saasUsers.dto.js +1 -0
- package/build/src/dto/platform/platform.saasUsers.dto.js.map +1 -1
- package/build/src/services/AmpApi.d.ts +5 -1
- package/build/src/services/AmpApi.js +4 -0
- package/build/src/services/AmpApi.js.map +1 -1
- package/build/src/services/AmpSdk.d.ts +5 -4
- package/build/src/services/AmpSdk.js +4 -0
- package/build/src/services/AmpSdk.js.map +1 -1
- package/build/src/services/constants.d.ts +4 -0
- package/build/src/services/constants.js +4 -0
- package/build/src/services/constants.js.map +1 -1
- package/build/src/services/entity.service.d.ts +2 -2
- package/build/src/services/entity.service.js +4 -7
- package/build/src/services/entity.service.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/base.dto.ts +7 -2
- package/src/dto/customActions.dto.ts +44 -0
- package/src/dto/customScores.dto.ts +21 -0
- package/src/dto/findings.dto.ts +29 -1
- package/src/dto/flows.dto.ts +8 -11
- package/src/dto/index.ts +2 -0
- package/src/dto/platform/index.ts +2 -0
- package/src/dto/platform/platform.customActions.dto.ts +12 -0
- package/src/dto/platform/platform.customScores.dto.ts +22 -0
- package/src/dto/platform/platform.findings.dto.ts +12 -1
- package/src/dto/platform/platform.saasAssets.dto.ts +1 -0
- package/src/dto/platform/platform.saasComponents.dto.ts +1 -0
- package/src/dto/platform/platform.saasUsers.dto.ts +1 -0
- package/src/services/AmpApi.ts +29 -1
- package/src/services/AmpSdk.ts +29 -10
- package/src/services/constants.ts +4 -0
- package/src/services/entity.service.ts +5 -8
|
@@ -16,6 +16,12 @@ export declare const _BaseDto: z.ZodObject<{
|
|
|
16
16
|
deletedAt: string | null;
|
|
17
17
|
}>;
|
|
18
18
|
export type BaseDto = z.infer<typeof _BaseDto>;
|
|
19
|
+
export declare const UPSERT_DTO_MASK: {
|
|
20
|
+
readonly id: true;
|
|
21
|
+
readonly createdAt: true;
|
|
22
|
+
readonly updatedAt: true;
|
|
23
|
+
readonly deletedAt: true;
|
|
24
|
+
};
|
|
19
25
|
export declare const _BaseUpsertDto: z.ZodObject<{
|
|
20
26
|
id: z.ZodOptional<z.ZodString>;
|
|
21
27
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._ChangeAwareDto = exports._ChangeAwareUpsertDto = exports._BaseUpsertDto = exports._BaseDto = void 0;
|
|
3
|
+
exports._ChangeAwareDto = exports._ChangeAwareUpsertDto = exports._BaseUpsertDto = exports.UPSERT_DTO_MASK = exports._BaseDto = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports._BaseDto = zod_1.z.object({
|
|
6
6
|
id: zod_1.z.string(),
|
|
@@ -8,7 +8,13 @@ exports._BaseDto = zod_1.z.object({
|
|
|
8
8
|
updatedAt: zod_1.z.string(),
|
|
9
9
|
deletedAt: zod_1.z.string().nullable(),
|
|
10
10
|
});
|
|
11
|
-
exports.
|
|
11
|
+
exports.UPSERT_DTO_MASK = {
|
|
12
|
+
id: true,
|
|
13
|
+
createdAt: true,
|
|
14
|
+
updatedAt: true,
|
|
15
|
+
deletedAt: true,
|
|
16
|
+
};
|
|
17
|
+
exports._BaseUpsertDto = exports._BaseDto.partial(exports.UPSERT_DTO_MASK);
|
|
12
18
|
const WithEtag = zod_1.z.object({ etag: zod_1.z.string() });
|
|
13
19
|
exports._ChangeAwareUpsertDto = exports._BaseUpsertDto.merge(WithEtag);
|
|
14
20
|
exports._ChangeAwareDto = exports._BaseDto.merge(WithEtag);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.dto.js","sourceRoot":"","sources":["../../../src/dto/base.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAET,QAAA,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"base.dto.js","sourceRoot":"","sources":["../../../src/dto/base.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAET,QAAA,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAGU,QAAA,eAAe,GAAG;IAC7B,EAAE,EAAE,IAAI;IACR,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CACP,CAAC;AAEE,QAAA,cAAc,GAAG,gBAAQ,CAAC,OAAO,CAAC,uBAAe,CAAC,CAAC;AAGhE,MAAM,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,EAAC,CAAC,CAAC;AAEjC,QAAA,qBAAqB,GAAG,sBAAc,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAIvD,QAAA,eAAe,GAAG,gBAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const _CustomRestActionMetaDto: z.ZodObject<{
|
|
3
|
+
request: z.ZodObject<{
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
method: z.ZodString;
|
|
6
|
+
payload: z.ZodObject<{
|
|
7
|
+
kind: z.ZodLiteral<"TEMPLATE">;
|
|
8
|
+
format: z.ZodLiteral<"JSON">;
|
|
9
|
+
value: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
value: string;
|
|
12
|
+
kind: "TEMPLATE";
|
|
13
|
+
format: "JSON";
|
|
14
|
+
}, {
|
|
15
|
+
value: string;
|
|
16
|
+
kind: "TEMPLATE";
|
|
17
|
+
format: "JSON";
|
|
18
|
+
}>;
|
|
19
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
20
|
+
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
method: string;
|
|
23
|
+
url: string;
|
|
24
|
+
params: Record<string, string>;
|
|
25
|
+
payload: {
|
|
26
|
+
value: string;
|
|
27
|
+
kind: "TEMPLATE";
|
|
28
|
+
format: "JSON";
|
|
29
|
+
};
|
|
30
|
+
headers: Record<string, string>;
|
|
31
|
+
}, {
|
|
32
|
+
method: string;
|
|
33
|
+
url: string;
|
|
34
|
+
params: Record<string, string>;
|
|
35
|
+
payload: {
|
|
36
|
+
value: string;
|
|
37
|
+
kind: "TEMPLATE";
|
|
38
|
+
format: "JSON";
|
|
39
|
+
};
|
|
40
|
+
headers: Record<string, string>;
|
|
41
|
+
}>;
|
|
42
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
request: {
|
|
45
|
+
method: string;
|
|
46
|
+
url: string;
|
|
47
|
+
params: Record<string, string>;
|
|
48
|
+
payload: {
|
|
49
|
+
value: string;
|
|
50
|
+
kind: "TEMPLATE";
|
|
51
|
+
format: "JSON";
|
|
52
|
+
};
|
|
53
|
+
headers: Record<string, string>;
|
|
54
|
+
};
|
|
55
|
+
timeout?: number | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
request: {
|
|
58
|
+
method: string;
|
|
59
|
+
url: string;
|
|
60
|
+
params: Record<string, string>;
|
|
61
|
+
payload: {
|
|
62
|
+
value: string;
|
|
63
|
+
kind: "TEMPLATE";
|
|
64
|
+
format: "JSON";
|
|
65
|
+
};
|
|
66
|
+
headers: Record<string, string>;
|
|
67
|
+
};
|
|
68
|
+
timeout?: number | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const _CustomActionDto: z.ZodObject<{
|
|
71
|
+
description: z.ZodString;
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
createdAt: z.ZodString;
|
|
74
|
+
updatedAt: z.ZodString;
|
|
75
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
76
|
+
displayValue: z.ZodString;
|
|
77
|
+
isTemplate: z.ZodBoolean;
|
|
78
|
+
retryStrategy: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"CONSTANT_BACKOFF">;
|
|
80
|
+
maxRetries: z.ZodNumber;
|
|
81
|
+
delay: z.ZodNumber;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
kind: "CONSTANT_BACKOFF";
|
|
84
|
+
maxRetries: number;
|
|
85
|
+
delay: number;
|
|
86
|
+
}, {
|
|
87
|
+
kind: "CONSTANT_BACKOFF";
|
|
88
|
+
maxRetries: number;
|
|
89
|
+
delay: number;
|
|
90
|
+
}>>;
|
|
91
|
+
kind: z.ZodLiteral<"REST_ACTION">;
|
|
92
|
+
meta: z.ZodObject<{
|
|
93
|
+
request: z.ZodObject<{
|
|
94
|
+
url: z.ZodString;
|
|
95
|
+
method: z.ZodString;
|
|
96
|
+
payload: z.ZodObject<{
|
|
97
|
+
kind: z.ZodLiteral<"TEMPLATE">;
|
|
98
|
+
format: z.ZodLiteral<"JSON">;
|
|
99
|
+
value: z.ZodString;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
value: string;
|
|
102
|
+
kind: "TEMPLATE";
|
|
103
|
+
format: "JSON";
|
|
104
|
+
}, {
|
|
105
|
+
value: string;
|
|
106
|
+
kind: "TEMPLATE";
|
|
107
|
+
format: "JSON";
|
|
108
|
+
}>;
|
|
109
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
110
|
+
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
method: string;
|
|
113
|
+
url: string;
|
|
114
|
+
params: Record<string, string>;
|
|
115
|
+
payload: {
|
|
116
|
+
value: string;
|
|
117
|
+
kind: "TEMPLATE";
|
|
118
|
+
format: "JSON";
|
|
119
|
+
};
|
|
120
|
+
headers: Record<string, string>;
|
|
121
|
+
}, {
|
|
122
|
+
method: string;
|
|
123
|
+
url: string;
|
|
124
|
+
params: Record<string, string>;
|
|
125
|
+
payload: {
|
|
126
|
+
value: string;
|
|
127
|
+
kind: "TEMPLATE";
|
|
128
|
+
format: "JSON";
|
|
129
|
+
};
|
|
130
|
+
headers: Record<string, string>;
|
|
131
|
+
}>;
|
|
132
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
request: {
|
|
135
|
+
method: string;
|
|
136
|
+
url: string;
|
|
137
|
+
params: Record<string, string>;
|
|
138
|
+
payload: {
|
|
139
|
+
value: string;
|
|
140
|
+
kind: "TEMPLATE";
|
|
141
|
+
format: "JSON";
|
|
142
|
+
};
|
|
143
|
+
headers: Record<string, string>;
|
|
144
|
+
};
|
|
145
|
+
timeout?: number | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
request: {
|
|
148
|
+
method: string;
|
|
149
|
+
url: string;
|
|
150
|
+
params: Record<string, string>;
|
|
151
|
+
payload: {
|
|
152
|
+
value: string;
|
|
153
|
+
kind: "TEMPLATE";
|
|
154
|
+
format: "JSON";
|
|
155
|
+
};
|
|
156
|
+
headers: Record<string, string>;
|
|
157
|
+
};
|
|
158
|
+
timeout?: number | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
description: string;
|
|
162
|
+
id: string;
|
|
163
|
+
createdAt: string;
|
|
164
|
+
updatedAt: string;
|
|
165
|
+
deletedAt: string | null;
|
|
166
|
+
displayValue: string;
|
|
167
|
+
meta: {
|
|
168
|
+
request: {
|
|
169
|
+
method: string;
|
|
170
|
+
url: string;
|
|
171
|
+
params: Record<string, string>;
|
|
172
|
+
payload: {
|
|
173
|
+
value: string;
|
|
174
|
+
kind: "TEMPLATE";
|
|
175
|
+
format: "JSON";
|
|
176
|
+
};
|
|
177
|
+
headers: Record<string, string>;
|
|
178
|
+
};
|
|
179
|
+
timeout?: number | undefined;
|
|
180
|
+
};
|
|
181
|
+
isTemplate: boolean;
|
|
182
|
+
kind: "REST_ACTION";
|
|
183
|
+
retryStrategy?: {
|
|
184
|
+
kind: "CONSTANT_BACKOFF";
|
|
185
|
+
maxRetries: number;
|
|
186
|
+
delay: number;
|
|
187
|
+
} | undefined;
|
|
188
|
+
}, {
|
|
189
|
+
description: string;
|
|
190
|
+
id: string;
|
|
191
|
+
createdAt: string;
|
|
192
|
+
updatedAt: string;
|
|
193
|
+
deletedAt: string | null;
|
|
194
|
+
displayValue: string;
|
|
195
|
+
meta: {
|
|
196
|
+
request: {
|
|
197
|
+
method: string;
|
|
198
|
+
url: string;
|
|
199
|
+
params: Record<string, string>;
|
|
200
|
+
payload: {
|
|
201
|
+
value: string;
|
|
202
|
+
kind: "TEMPLATE";
|
|
203
|
+
format: "JSON";
|
|
204
|
+
};
|
|
205
|
+
headers: Record<string, string>;
|
|
206
|
+
};
|
|
207
|
+
timeout?: number | undefined;
|
|
208
|
+
};
|
|
209
|
+
isTemplate: boolean;
|
|
210
|
+
kind: "REST_ACTION";
|
|
211
|
+
retryStrategy?: {
|
|
212
|
+
kind: "CONSTANT_BACKOFF";
|
|
213
|
+
maxRetries: number;
|
|
214
|
+
delay: number;
|
|
215
|
+
} | undefined;
|
|
216
|
+
}>;
|
|
217
|
+
export type CustomActionDto = z.infer<typeof _CustomActionDto>;
|
|
218
|
+
export declare const _CustomActionUpsertDto: z.ZodObject<{
|
|
219
|
+
description: z.ZodString;
|
|
220
|
+
id: z.ZodOptional<z.ZodString>;
|
|
221
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
222
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
223
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
displayValue: z.ZodString;
|
|
225
|
+
meta: z.ZodObject<{
|
|
226
|
+
request: z.ZodObject<{
|
|
227
|
+
url: z.ZodString;
|
|
228
|
+
method: z.ZodString;
|
|
229
|
+
payload: z.ZodObject<{
|
|
230
|
+
kind: z.ZodLiteral<"TEMPLATE">;
|
|
231
|
+
format: z.ZodLiteral<"JSON">;
|
|
232
|
+
value: z.ZodString;
|
|
233
|
+
}, "strip", z.ZodTypeAny, {
|
|
234
|
+
value: string;
|
|
235
|
+
kind: "TEMPLATE";
|
|
236
|
+
format: "JSON";
|
|
237
|
+
}, {
|
|
238
|
+
value: string;
|
|
239
|
+
kind: "TEMPLATE";
|
|
240
|
+
format: "JSON";
|
|
241
|
+
}>;
|
|
242
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
243
|
+
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
method: string;
|
|
246
|
+
url: string;
|
|
247
|
+
params: Record<string, string>;
|
|
248
|
+
payload: {
|
|
249
|
+
value: string;
|
|
250
|
+
kind: "TEMPLATE";
|
|
251
|
+
format: "JSON";
|
|
252
|
+
};
|
|
253
|
+
headers: Record<string, string>;
|
|
254
|
+
}, {
|
|
255
|
+
method: string;
|
|
256
|
+
url: string;
|
|
257
|
+
params: Record<string, string>;
|
|
258
|
+
payload: {
|
|
259
|
+
value: string;
|
|
260
|
+
kind: "TEMPLATE";
|
|
261
|
+
format: "JSON";
|
|
262
|
+
};
|
|
263
|
+
headers: Record<string, string>;
|
|
264
|
+
}>;
|
|
265
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
request: {
|
|
268
|
+
method: string;
|
|
269
|
+
url: string;
|
|
270
|
+
params: Record<string, string>;
|
|
271
|
+
payload: {
|
|
272
|
+
value: string;
|
|
273
|
+
kind: "TEMPLATE";
|
|
274
|
+
format: "JSON";
|
|
275
|
+
};
|
|
276
|
+
headers: Record<string, string>;
|
|
277
|
+
};
|
|
278
|
+
timeout?: number | undefined;
|
|
279
|
+
}, {
|
|
280
|
+
request: {
|
|
281
|
+
method: string;
|
|
282
|
+
url: string;
|
|
283
|
+
params: Record<string, string>;
|
|
284
|
+
payload: {
|
|
285
|
+
value: string;
|
|
286
|
+
kind: "TEMPLATE";
|
|
287
|
+
format: "JSON";
|
|
288
|
+
};
|
|
289
|
+
headers: Record<string, string>;
|
|
290
|
+
};
|
|
291
|
+
timeout?: number | undefined;
|
|
292
|
+
}>;
|
|
293
|
+
isTemplate: z.ZodBoolean;
|
|
294
|
+
kind: z.ZodLiteral<"REST_ACTION">;
|
|
295
|
+
retryStrategy: z.ZodOptional<z.ZodObject<{
|
|
296
|
+
kind: z.ZodLiteral<"CONSTANT_BACKOFF">;
|
|
297
|
+
maxRetries: z.ZodNumber;
|
|
298
|
+
delay: z.ZodNumber;
|
|
299
|
+
}, "strip", z.ZodTypeAny, {
|
|
300
|
+
kind: "CONSTANT_BACKOFF";
|
|
301
|
+
maxRetries: number;
|
|
302
|
+
delay: number;
|
|
303
|
+
}, {
|
|
304
|
+
kind: "CONSTANT_BACKOFF";
|
|
305
|
+
maxRetries: number;
|
|
306
|
+
delay: number;
|
|
307
|
+
}>>;
|
|
308
|
+
}, "strip", z.ZodTypeAny, {
|
|
309
|
+
description: string;
|
|
310
|
+
displayValue: string;
|
|
311
|
+
meta: {
|
|
312
|
+
request: {
|
|
313
|
+
method: string;
|
|
314
|
+
url: string;
|
|
315
|
+
params: Record<string, string>;
|
|
316
|
+
payload: {
|
|
317
|
+
value: string;
|
|
318
|
+
kind: "TEMPLATE";
|
|
319
|
+
format: "JSON";
|
|
320
|
+
};
|
|
321
|
+
headers: Record<string, string>;
|
|
322
|
+
};
|
|
323
|
+
timeout?: number | undefined;
|
|
324
|
+
};
|
|
325
|
+
isTemplate: boolean;
|
|
326
|
+
kind: "REST_ACTION";
|
|
327
|
+
id?: string | undefined;
|
|
328
|
+
createdAt?: string | undefined;
|
|
329
|
+
updatedAt?: string | undefined;
|
|
330
|
+
deletedAt?: string | null | undefined;
|
|
331
|
+
retryStrategy?: {
|
|
332
|
+
kind: "CONSTANT_BACKOFF";
|
|
333
|
+
maxRetries: number;
|
|
334
|
+
delay: number;
|
|
335
|
+
} | undefined;
|
|
336
|
+
}, {
|
|
337
|
+
description: string;
|
|
338
|
+
displayValue: string;
|
|
339
|
+
meta: {
|
|
340
|
+
request: {
|
|
341
|
+
method: string;
|
|
342
|
+
url: string;
|
|
343
|
+
params: Record<string, string>;
|
|
344
|
+
payload: {
|
|
345
|
+
value: string;
|
|
346
|
+
kind: "TEMPLATE";
|
|
347
|
+
format: "JSON";
|
|
348
|
+
};
|
|
349
|
+
headers: Record<string, string>;
|
|
350
|
+
};
|
|
351
|
+
timeout?: number | undefined;
|
|
352
|
+
};
|
|
353
|
+
isTemplate: boolean;
|
|
354
|
+
kind: "REST_ACTION";
|
|
355
|
+
id?: string | undefined;
|
|
356
|
+
createdAt?: string | undefined;
|
|
357
|
+
updatedAt?: string | undefined;
|
|
358
|
+
deletedAt?: string | null | undefined;
|
|
359
|
+
retryStrategy?: {
|
|
360
|
+
kind: "CONSTANT_BACKOFF";
|
|
361
|
+
maxRetries: number;
|
|
362
|
+
delay: number;
|
|
363
|
+
} | undefined;
|
|
364
|
+
}>;
|
|
365
|
+
export type CustomActionUpsertDto = z.infer<typeof _CustomActionUpsertDto>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._CustomActionUpsertDto = exports._CustomActionDto = exports._CustomRestActionMetaDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const base_dto_1 = require("./base.dto");
|
|
6
|
+
const _BaseCustomAction = base_dto_1._BaseDto.extend({
|
|
7
|
+
displayValue: zod_1.z.string(),
|
|
8
|
+
description: zod_1.z.string(),
|
|
9
|
+
isTemplate: zod_1.z.boolean(),
|
|
10
|
+
retryStrategy: zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
kind: zod_1.z.literal('CONSTANT_BACKOFF'),
|
|
13
|
+
maxRetries: zod_1.z.number(),
|
|
14
|
+
delay: zod_1.z.number(),
|
|
15
|
+
})
|
|
16
|
+
.optional(),
|
|
17
|
+
});
|
|
18
|
+
exports._CustomRestActionMetaDto = zod_1.z.object({
|
|
19
|
+
request: zod_1.z.object({
|
|
20
|
+
url: zod_1.z.string(),
|
|
21
|
+
method: zod_1.z.string(),
|
|
22
|
+
payload: zod_1.z.object({
|
|
23
|
+
kind: zod_1.z.literal('TEMPLATE'),
|
|
24
|
+
format: zod_1.z.literal('JSON'),
|
|
25
|
+
value: zod_1.z.string(),
|
|
26
|
+
}),
|
|
27
|
+
headers: zod_1.z.record(zod_1.z.string()),
|
|
28
|
+
params: zod_1.z.record(zod_1.z.string()),
|
|
29
|
+
}),
|
|
30
|
+
timeout: zod_1.z.number().optional(),
|
|
31
|
+
});
|
|
32
|
+
const _CustomRestActionDto = _BaseCustomAction.extend({
|
|
33
|
+
kind: zod_1.z.literal('REST_ACTION'),
|
|
34
|
+
meta: exports._CustomRestActionMetaDto,
|
|
35
|
+
});
|
|
36
|
+
const _CustomRestActionUpsertDto = _CustomRestActionDto.partial(base_dto_1.UPSERT_DTO_MASK);
|
|
37
|
+
exports._CustomActionDto = _CustomRestActionDto;
|
|
38
|
+
exports._CustomActionUpsertDto = _CustomRestActionUpsertDto;
|
|
39
|
+
// TODO action execution history + errors
|
|
40
|
+
//# sourceMappingURL=customActions.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customActions.dto.js","sourceRoot":"","sources":["../../../src/dto/customActions.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAqD;AAErD,MAAM,iBAAiB,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE;IACvB,aAAa,EAAE,OAAC;SACb,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;QACnC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;QACtB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;KAClB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;QAClB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YAChB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3B,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;YACzB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;SAClB,CAAC;QACF,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;KAC7B,CAAC;IACF,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AACH,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,MAAM,CAAC;IACpD,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAC9B,IAAI,EAAE,gCAAwB;CAC/B,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,oBAAoB,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC;AAEpE,QAAA,gBAAgB,GAAG,oBAAoB,CAAC;AAGxC,QAAA,sBAAsB,GAAG,0BAA0B,CAAC;AAGjE,yCAAyC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const _CustomScoreValueDto: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
createdAt: z.ZodString;
|
|
5
|
+
updatedAt: z.ZodString;
|
|
6
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
7
|
+
findingSpecId: z.ZodString;
|
|
8
|
+
value: z.ZodNumber;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
value: number;
|
|
11
|
+
id: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
deletedAt: string | null;
|
|
15
|
+
findingSpecId: string;
|
|
16
|
+
}, {
|
|
17
|
+
value: number;
|
|
18
|
+
id: string;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
deletedAt: string | null;
|
|
22
|
+
findingSpecId: string;
|
|
23
|
+
}>;
|
|
24
|
+
export type CustomScoreValueDto = z.infer<typeof _CustomScoreValueDto>;
|
|
25
|
+
export declare const _CustomScoreValueUpsertDto: z.ZodObject<{
|
|
26
|
+
value: z.ZodNumber;
|
|
27
|
+
id: z.ZodOptional<z.ZodString>;
|
|
28
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
29
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
30
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
findingSpecId: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
value: number;
|
|
34
|
+
findingSpecId: string;
|
|
35
|
+
id?: string | undefined;
|
|
36
|
+
createdAt?: string | undefined;
|
|
37
|
+
updatedAt?: string | undefined;
|
|
38
|
+
deletedAt?: string | null | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
value: number;
|
|
41
|
+
findingSpecId: string;
|
|
42
|
+
id?: string | undefined;
|
|
43
|
+
createdAt?: string | undefined;
|
|
44
|
+
updatedAt?: string | undefined;
|
|
45
|
+
deletedAt?: string | null | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
export type CustomScoreValueUpsertDto = z.infer<typeof _CustomScoreValueUpsertDto>;
|
|
48
|
+
export declare const _CustomScoreCohortDto: z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
createdAt: z.ZodString;
|
|
51
|
+
updatedAt: z.ZodString;
|
|
52
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
53
|
+
cohort: z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
kind: z.ZodEnum<["ORGANIZATION", "DEPARTMENT", "USER", "RISK_CONTRIBUTOR"]>;
|
|
56
|
+
displayValue: z.ZodString;
|
|
57
|
+
value: z.ZodString;
|
|
58
|
+
inclusive: z.ZodBoolean;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
inclusive: boolean;
|
|
61
|
+
value: string;
|
|
62
|
+
id: string;
|
|
63
|
+
displayValue: string;
|
|
64
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
65
|
+
}, {
|
|
66
|
+
inclusive: boolean;
|
|
67
|
+
value: string;
|
|
68
|
+
id: string;
|
|
69
|
+
displayValue: string;
|
|
70
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
71
|
+
}>;
|
|
72
|
+
multiplier: z.ZodNumber;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
id: string;
|
|
75
|
+
createdAt: string;
|
|
76
|
+
updatedAt: string;
|
|
77
|
+
deletedAt: string | null;
|
|
78
|
+
cohort: {
|
|
79
|
+
inclusive: boolean;
|
|
80
|
+
value: string;
|
|
81
|
+
id: string;
|
|
82
|
+
displayValue: string;
|
|
83
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
84
|
+
};
|
|
85
|
+
multiplier: number;
|
|
86
|
+
}, {
|
|
87
|
+
id: string;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
updatedAt: string;
|
|
90
|
+
deletedAt: string | null;
|
|
91
|
+
cohort: {
|
|
92
|
+
inclusive: boolean;
|
|
93
|
+
value: string;
|
|
94
|
+
id: string;
|
|
95
|
+
displayValue: string;
|
|
96
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
97
|
+
};
|
|
98
|
+
multiplier: number;
|
|
99
|
+
}>;
|
|
100
|
+
export type CustomScoreCohortDto = z.infer<typeof _CustomScoreCohortDto>;
|
|
101
|
+
export declare const _CustomScoreCohortUpsertDto: z.ZodObject<{
|
|
102
|
+
id: z.ZodOptional<z.ZodString>;
|
|
103
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
104
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
105
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
+
cohort: z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
kind: z.ZodEnum<["ORGANIZATION", "DEPARTMENT", "USER", "RISK_CONTRIBUTOR"]>;
|
|
109
|
+
displayValue: z.ZodString;
|
|
110
|
+
value: z.ZodString;
|
|
111
|
+
inclusive: z.ZodBoolean;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
inclusive: boolean;
|
|
114
|
+
value: string;
|
|
115
|
+
id: string;
|
|
116
|
+
displayValue: string;
|
|
117
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
118
|
+
}, {
|
|
119
|
+
inclusive: boolean;
|
|
120
|
+
value: string;
|
|
121
|
+
id: string;
|
|
122
|
+
displayValue: string;
|
|
123
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
124
|
+
}>;
|
|
125
|
+
multiplier: z.ZodNumber;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
cohort: {
|
|
128
|
+
inclusive: boolean;
|
|
129
|
+
value: string;
|
|
130
|
+
id: string;
|
|
131
|
+
displayValue: string;
|
|
132
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
133
|
+
};
|
|
134
|
+
multiplier: number;
|
|
135
|
+
id?: string | undefined;
|
|
136
|
+
createdAt?: string | undefined;
|
|
137
|
+
updatedAt?: string | undefined;
|
|
138
|
+
deletedAt?: string | null | undefined;
|
|
139
|
+
}, {
|
|
140
|
+
cohort: {
|
|
141
|
+
inclusive: boolean;
|
|
142
|
+
value: string;
|
|
143
|
+
id: string;
|
|
144
|
+
displayValue: string;
|
|
145
|
+
kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
|
|
146
|
+
};
|
|
147
|
+
multiplier: number;
|
|
148
|
+
id?: string | undefined;
|
|
149
|
+
createdAt?: string | undefined;
|
|
150
|
+
updatedAt?: string | undefined;
|
|
151
|
+
deletedAt?: string | null | undefined;
|
|
152
|
+
}>;
|
|
153
|
+
export type CustomScoreCohortUpsertDto = z.infer<typeof _CustomScoreCohortUpsertDto>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._CustomScoreCohortUpsertDto = exports._CustomScoreCohortDto = exports._CustomScoreValueUpsertDto = exports._CustomScoreValueDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const base_dto_1 = require("./base.dto");
|
|
6
|
+
const flows_dto_1 = require("./flows.dto");
|
|
7
|
+
exports._CustomScoreValueDto = base_dto_1._BaseDto.extend({
|
|
8
|
+
findingSpecId: zod_1.z.string(),
|
|
9
|
+
value: zod_1.z.number(),
|
|
10
|
+
});
|
|
11
|
+
exports._CustomScoreValueUpsertDto = exports._CustomScoreValueDto.partial(base_dto_1.UPSERT_DTO_MASK);
|
|
12
|
+
exports._CustomScoreCohortDto = base_dto_1._BaseDto.extend({
|
|
13
|
+
cohort: flows_dto_1._AmplifierCohortDto,
|
|
14
|
+
multiplier: zod_1.z.number(),
|
|
15
|
+
});
|
|
16
|
+
exports._CustomScoreCohortUpsertDto = exports._CustomScoreCohortDto.partial(base_dto_1.UPSERT_DTO_MASK);
|
|
17
|
+
//# sourceMappingURL=customScores.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customScores.dto.js","sourceRoot":"","sources":["../../../src/dto/customScores.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAqD;AACrD,2CAAgD;AAEnC,QAAA,oBAAoB,GAAG,mBAAQ,CAAC,MAAM,CAAC;IAClD,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAGU,QAAA,0BAA0B,GAAG,4BAAoB,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC;AAG3E,QAAA,qBAAqB,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,+BAAmB;IAC3B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAGU,QAAA,2BAA2B,GAAG,6BAAqB,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC"}
|