@ampsec/platform-client 66.2.1 → 67.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/agents.dto.d.ts +76 -53
- package/build/src/dto/agents.dto.js +15 -10
- package/build/src/dto/agents.dto.js.map +1 -1
- package/build/src/dto/enums/auth.role.d.ts +19 -0
- package/build/src/dto/enums/auth.role.js +20 -1
- package/build/src/dto/enums/auth.role.js.map +1 -1
- package/build/src/dto/findings.dto.js +1 -6
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/flows.dto.d.ts +284 -188
- package/build/src/dto/flows.dto.js +6 -2
- package/build/src/dto/flows.dto.js.map +1 -1
- package/build/src/dto/platform/platform.agents.dto.d.ts +148 -4
- package/build/src/dto/platform/platform.agents.dto.js +21 -0
- package/build/src/dto/platform/platform.agents.dto.js.map +1 -1
- package/build/src/dto/platform/platform.flows.dto.d.ts +164 -112
- package/build/src/etag.js +1 -1
- package/build/src/etag.js.map +1 -1
- package/build/src/services/AgentsService.d.ts +18 -41
- package/build/src/services/AgentsService.js +39 -6
- package/build/src/services/AgentsService.js.map +1 -1
- package/build/src/services/AmpSdk.d.ts +3 -2
- package/build/src/services/AmpSdk.js +2 -1
- package/build/src/services/AmpSdk.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/agents.dto.ts +22 -34
- package/src/dto/enums/auth.role.ts +29 -1
- package/src/dto/findings.dto.ts +2 -7
- package/src/dto/flows.dto.ts +7 -2
- package/src/dto/platform/platform.agents.dto.ts +24 -4
- package/src/etag.ts +1 -1
- package/src/services/AgentsService.ts +43 -10
- package/src/services/AmpSdk.ts +3 -4
|
@@ -105,44 +105,44 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
105
105
|
triage: z.ZodOptional<z.ZodObject<{
|
|
106
106
|
message: z.ZodString;
|
|
107
107
|
yesAction: z.ZodObject<{
|
|
108
|
-
actionId: z.ZodString
|
|
109
|
-
findingStatus: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus
|
|
108
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
109
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
110
110
|
}, "strip", z.ZodTypeAny, {
|
|
111
|
-
actionId: string;
|
|
112
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
111
|
+
actionId: string | null;
|
|
112
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
113
113
|
}, {
|
|
114
|
-
actionId: string;
|
|
115
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
114
|
+
actionId: string | null;
|
|
115
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
116
116
|
}>;
|
|
117
117
|
noAction: z.ZodObject<{
|
|
118
|
-
actionId: z.ZodString
|
|
119
|
-
findingStatus: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus
|
|
118
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
119
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
120
120
|
}, "strip", z.ZodTypeAny, {
|
|
121
|
-
actionId: string;
|
|
122
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
121
|
+
actionId: string | null;
|
|
122
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
123
123
|
}, {
|
|
124
|
-
actionId: string;
|
|
125
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
124
|
+
actionId: string | null;
|
|
125
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
126
126
|
}>;
|
|
127
127
|
}, "strip", z.ZodTypeAny, {
|
|
128
128
|
message: string;
|
|
129
129
|
yesAction: {
|
|
130
|
-
actionId: string;
|
|
131
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
130
|
+
actionId: string | null;
|
|
131
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
132
132
|
};
|
|
133
133
|
noAction: {
|
|
134
|
-
actionId: string;
|
|
135
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
134
|
+
actionId: string | null;
|
|
135
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
136
136
|
};
|
|
137
137
|
}, {
|
|
138
138
|
message: string;
|
|
139
139
|
yesAction: {
|
|
140
|
-
actionId: string;
|
|
141
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
140
|
+
actionId: string | null;
|
|
141
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
142
142
|
};
|
|
143
143
|
noAction: {
|
|
144
|
-
actionId: string;
|
|
145
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
144
|
+
actionId: string | null;
|
|
145
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
146
146
|
};
|
|
147
147
|
}>>;
|
|
148
148
|
reminderInterval: z.ZodOptional<z.ZodObject<{
|
|
@@ -162,55 +162,73 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
162
162
|
includeInstructions: z.ZodOptional<z.ZodBoolean>;
|
|
163
163
|
expirationActionId: z.ZodOptional<z.ZodString>;
|
|
164
164
|
expirationAction: z.ZodOptional<z.ZodObject<{
|
|
165
|
-
actionId: z.ZodString
|
|
166
|
-
findingStatus: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus
|
|
165
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
166
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
167
167
|
}, "strip", z.ZodTypeAny, {
|
|
168
|
-
actionId: string;
|
|
169
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
168
|
+
actionId: string | null;
|
|
169
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
170
170
|
}, {
|
|
171
|
-
actionId: string;
|
|
172
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
171
|
+
actionId: string | null;
|
|
172
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
173
173
|
}>>;
|
|
174
174
|
simpleTriageYesActId: z.ZodOptional<z.ZodString>;
|
|
175
175
|
simpleTriageNoActId: z.ZodOptional<z.ZodString>;
|
|
176
176
|
resolveNowActionId: z.ZodOptional<z.ZodString>;
|
|
177
177
|
resolveNowAction: z.ZodOptional<z.ZodObject<{
|
|
178
|
-
actionId: z.ZodString
|
|
179
|
-
findingStatus: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus
|
|
178
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
179
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
180
180
|
}, "strip", z.ZodTypeAny, {
|
|
181
|
-
actionId: string;
|
|
182
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
181
|
+
actionId: string | null;
|
|
182
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
183
183
|
}, {
|
|
184
|
-
actionId: string;
|
|
185
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
184
|
+
actionId: string | null;
|
|
185
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
186
|
+
}>>;
|
|
187
|
+
scheduleResolutionAction: z.ZodOptional<z.ZodObject<{
|
|
188
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
189
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
190
|
+
}, "strip", z.ZodTypeAny, {
|
|
191
|
+
actionId: string | null;
|
|
192
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
193
|
+
}, {
|
|
194
|
+
actionId: string | null;
|
|
195
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
186
196
|
}>>;
|
|
187
197
|
}, "strip", z.ZodTypeAny, {
|
|
188
198
|
includeInstructions?: boolean | undefined;
|
|
189
199
|
expirationActionId?: string | undefined;
|
|
190
200
|
expirationAction?: {
|
|
191
|
-
actionId: string;
|
|
192
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
201
|
+
actionId: string | null;
|
|
202
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
193
203
|
} | undefined;
|
|
194
204
|
simpleTriageYesActId?: string | undefined;
|
|
195
205
|
simpleTriageNoActId?: string | undefined;
|
|
196
206
|
resolveNowActionId?: string | undefined;
|
|
197
207
|
resolveNowAction?: {
|
|
198
|
-
actionId: string;
|
|
199
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
208
|
+
actionId: string | null;
|
|
209
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
scheduleResolutionAction?: {
|
|
212
|
+
actionId: string | null;
|
|
213
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
200
214
|
} | undefined;
|
|
201
215
|
}, {
|
|
202
216
|
includeInstructions?: boolean | undefined;
|
|
203
217
|
expirationActionId?: string | undefined;
|
|
204
218
|
expirationAction?: {
|
|
205
|
-
actionId: string;
|
|
206
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
219
|
+
actionId: string | null;
|
|
220
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
207
221
|
} | undefined;
|
|
208
222
|
simpleTriageYesActId?: string | undefined;
|
|
209
223
|
simpleTriageNoActId?: string | undefined;
|
|
210
224
|
resolveNowActionId?: string | undefined;
|
|
211
225
|
resolveNowAction?: {
|
|
212
|
-
actionId: string;
|
|
213
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
226
|
+
actionId: string | null;
|
|
227
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
228
|
+
} | undefined;
|
|
229
|
+
scheduleResolutionAction?: {
|
|
230
|
+
actionId: string | null;
|
|
231
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
214
232
|
} | undefined;
|
|
215
233
|
}>>;
|
|
216
234
|
rewards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -297,12 +315,12 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
297
315
|
triage?: {
|
|
298
316
|
message: string;
|
|
299
317
|
yesAction: {
|
|
300
|
-
actionId: string;
|
|
301
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
318
|
+
actionId: string | null;
|
|
319
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
302
320
|
};
|
|
303
321
|
noAction: {
|
|
304
|
-
actionId: string;
|
|
305
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
322
|
+
actionId: string | null;
|
|
323
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
306
324
|
};
|
|
307
325
|
} | undefined;
|
|
308
326
|
reminderInterval?: {
|
|
@@ -314,15 +332,19 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
314
332
|
includeInstructions?: boolean | undefined;
|
|
315
333
|
expirationActionId?: string | undefined;
|
|
316
334
|
expirationAction?: {
|
|
317
|
-
actionId: string;
|
|
318
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
335
|
+
actionId: string | null;
|
|
336
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
319
337
|
} | undefined;
|
|
320
338
|
simpleTriageYesActId?: string | undefined;
|
|
321
339
|
simpleTriageNoActId?: string | undefined;
|
|
322
340
|
resolveNowActionId?: string | undefined;
|
|
323
341
|
resolveNowAction?: {
|
|
324
|
-
actionId: string;
|
|
325
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
342
|
+
actionId: string | null;
|
|
343
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
344
|
+
} | undefined;
|
|
345
|
+
scheduleResolutionAction?: {
|
|
346
|
+
actionId: string | null;
|
|
347
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
326
348
|
} | undefined;
|
|
327
349
|
} | undefined;
|
|
328
350
|
rewards?: {
|
|
@@ -383,12 +405,12 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
383
405
|
triage?: {
|
|
384
406
|
message: string;
|
|
385
407
|
yesAction: {
|
|
386
|
-
actionId: string;
|
|
387
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
408
|
+
actionId: string | null;
|
|
409
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
388
410
|
};
|
|
389
411
|
noAction: {
|
|
390
|
-
actionId: string;
|
|
391
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
412
|
+
actionId: string | null;
|
|
413
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
392
414
|
};
|
|
393
415
|
} | undefined;
|
|
394
416
|
reminderInterval?: {
|
|
@@ -400,15 +422,19 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<{
|
|
|
400
422
|
includeInstructions?: boolean | undefined;
|
|
401
423
|
expirationActionId?: string | undefined;
|
|
402
424
|
expirationAction?: {
|
|
403
|
-
actionId: string;
|
|
404
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
425
|
+
actionId: string | null;
|
|
426
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
405
427
|
} | undefined;
|
|
406
428
|
simpleTriageYesActId?: string | undefined;
|
|
407
429
|
simpleTriageNoActId?: string | undefined;
|
|
408
430
|
resolveNowActionId?: string | undefined;
|
|
409
431
|
resolveNowAction?: {
|
|
410
|
-
actionId: string;
|
|
411
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
432
|
+
actionId: string | null;
|
|
433
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
434
|
+
} | undefined;
|
|
435
|
+
scheduleResolutionAction?: {
|
|
436
|
+
actionId: string | null;
|
|
437
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
412
438
|
} | undefined;
|
|
413
439
|
} | undefined;
|
|
414
440
|
rewards?: {
|
|
@@ -543,44 +569,44 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
543
569
|
triage: z.ZodOptional<z.ZodObject<{
|
|
544
570
|
message: z.ZodString;
|
|
545
571
|
yesAction: z.ZodObject<{
|
|
546
|
-
actionId: z.ZodString
|
|
547
|
-
findingStatus: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus
|
|
572
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
573
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
548
574
|
}, "strip", z.ZodTypeAny, {
|
|
549
|
-
actionId: string;
|
|
550
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
575
|
+
actionId: string | null;
|
|
576
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
551
577
|
}, {
|
|
552
|
-
actionId: string;
|
|
553
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
578
|
+
actionId: string | null;
|
|
579
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
554
580
|
}>;
|
|
555
581
|
noAction: z.ZodObject<{
|
|
556
|
-
actionId: z.ZodString
|
|
557
|
-
findingStatus: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus
|
|
582
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
583
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
558
584
|
}, "strip", z.ZodTypeAny, {
|
|
559
|
-
actionId: string;
|
|
560
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
585
|
+
actionId: string | null;
|
|
586
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
561
587
|
}, {
|
|
562
|
-
actionId: string;
|
|
563
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
588
|
+
actionId: string | null;
|
|
589
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
564
590
|
}>;
|
|
565
591
|
}, "strip", z.ZodTypeAny, {
|
|
566
592
|
message: string;
|
|
567
593
|
yesAction: {
|
|
568
|
-
actionId: string;
|
|
569
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
594
|
+
actionId: string | null;
|
|
595
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
570
596
|
};
|
|
571
597
|
noAction: {
|
|
572
|
-
actionId: string;
|
|
573
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
598
|
+
actionId: string | null;
|
|
599
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
574
600
|
};
|
|
575
601
|
}, {
|
|
576
602
|
message: string;
|
|
577
603
|
yesAction: {
|
|
578
|
-
actionId: string;
|
|
579
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
604
|
+
actionId: string | null;
|
|
605
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
580
606
|
};
|
|
581
607
|
noAction: {
|
|
582
|
-
actionId: string;
|
|
583
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
608
|
+
actionId: string | null;
|
|
609
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
584
610
|
};
|
|
585
611
|
}>>;
|
|
586
612
|
reminderInterval: z.ZodOptional<z.ZodObject<{
|
|
@@ -600,55 +626,73 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
600
626
|
includeInstructions: z.ZodOptional<z.ZodBoolean>;
|
|
601
627
|
expirationActionId: z.ZodOptional<z.ZodString>;
|
|
602
628
|
expirationAction: z.ZodOptional<z.ZodObject<{
|
|
603
|
-
actionId: z.ZodString
|
|
604
|
-
findingStatus: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus
|
|
629
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
630
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
605
631
|
}, "strip", z.ZodTypeAny, {
|
|
606
|
-
actionId: string;
|
|
607
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
632
|
+
actionId: string | null;
|
|
633
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
608
634
|
}, {
|
|
609
|
-
actionId: string;
|
|
610
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
635
|
+
actionId: string | null;
|
|
636
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
611
637
|
}>>;
|
|
612
638
|
simpleTriageYesActId: z.ZodOptional<z.ZodString>;
|
|
613
639
|
simpleTriageNoActId: z.ZodOptional<z.ZodString>;
|
|
614
640
|
resolveNowActionId: z.ZodOptional<z.ZodString>;
|
|
615
641
|
resolveNowAction: z.ZodOptional<z.ZodObject<{
|
|
616
|
-
actionId: z.ZodString
|
|
617
|
-
findingStatus: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus
|
|
642
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
643
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
618
644
|
}, "strip", z.ZodTypeAny, {
|
|
619
|
-
actionId: string;
|
|
620
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
645
|
+
actionId: string | null;
|
|
646
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
621
647
|
}, {
|
|
622
|
-
actionId: string;
|
|
623
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
648
|
+
actionId: string | null;
|
|
649
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
650
|
+
}>>;
|
|
651
|
+
scheduleResolutionAction: z.ZodOptional<z.ZodObject<{
|
|
652
|
+
actionId: z.ZodNullable<z.ZodString>;
|
|
653
|
+
findingStatus: z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingStatus>>>;
|
|
654
|
+
}, "strip", z.ZodTypeAny, {
|
|
655
|
+
actionId: string | null;
|
|
656
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
657
|
+
}, {
|
|
658
|
+
actionId: string | null;
|
|
659
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
624
660
|
}>>;
|
|
625
661
|
}, "strip", z.ZodTypeAny, {
|
|
626
662
|
includeInstructions?: boolean | undefined;
|
|
627
663
|
expirationActionId?: string | undefined;
|
|
628
664
|
expirationAction?: {
|
|
629
|
-
actionId: string;
|
|
630
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
665
|
+
actionId: string | null;
|
|
666
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
631
667
|
} | undefined;
|
|
632
668
|
simpleTriageYesActId?: string | undefined;
|
|
633
669
|
simpleTriageNoActId?: string | undefined;
|
|
634
670
|
resolveNowActionId?: string | undefined;
|
|
635
671
|
resolveNowAction?: {
|
|
636
|
-
actionId: string;
|
|
637
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
672
|
+
actionId: string | null;
|
|
673
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
674
|
+
} | undefined;
|
|
675
|
+
scheduleResolutionAction?: {
|
|
676
|
+
actionId: string | null;
|
|
677
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
638
678
|
} | undefined;
|
|
639
679
|
}, {
|
|
640
680
|
includeInstructions?: boolean | undefined;
|
|
641
681
|
expirationActionId?: string | undefined;
|
|
642
682
|
expirationAction?: {
|
|
643
|
-
actionId: string;
|
|
644
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
683
|
+
actionId: string | null;
|
|
684
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
645
685
|
} | undefined;
|
|
646
686
|
simpleTriageYesActId?: string | undefined;
|
|
647
687
|
simpleTriageNoActId?: string | undefined;
|
|
648
688
|
resolveNowActionId?: string | undefined;
|
|
649
689
|
resolveNowAction?: {
|
|
650
|
-
actionId: string;
|
|
651
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
690
|
+
actionId: string | null;
|
|
691
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
692
|
+
} | undefined;
|
|
693
|
+
scheduleResolutionAction?: {
|
|
694
|
+
actionId: string | null;
|
|
695
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
652
696
|
} | undefined;
|
|
653
697
|
}>>;
|
|
654
698
|
rewards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -748,12 +792,12 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
748
792
|
triage?: {
|
|
749
793
|
message: string;
|
|
750
794
|
yesAction: {
|
|
751
|
-
actionId: string;
|
|
752
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
795
|
+
actionId: string | null;
|
|
796
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
753
797
|
};
|
|
754
798
|
noAction: {
|
|
755
|
-
actionId: string;
|
|
756
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
799
|
+
actionId: string | null;
|
|
800
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
757
801
|
};
|
|
758
802
|
} | undefined;
|
|
759
803
|
reminderInterval?: {
|
|
@@ -765,15 +809,19 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
765
809
|
includeInstructions?: boolean | undefined;
|
|
766
810
|
expirationActionId?: string | undefined;
|
|
767
811
|
expirationAction?: {
|
|
768
|
-
actionId: string;
|
|
769
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
812
|
+
actionId: string | null;
|
|
813
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
770
814
|
} | undefined;
|
|
771
815
|
simpleTriageYesActId?: string | undefined;
|
|
772
816
|
simpleTriageNoActId?: string | undefined;
|
|
773
817
|
resolveNowActionId?: string | undefined;
|
|
774
818
|
resolveNowAction?: {
|
|
775
|
-
actionId: string;
|
|
776
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
819
|
+
actionId: string | null;
|
|
820
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
821
|
+
} | undefined;
|
|
822
|
+
scheduleResolutionAction?: {
|
|
823
|
+
actionId: string | null;
|
|
824
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
777
825
|
} | undefined;
|
|
778
826
|
} | undefined;
|
|
779
827
|
rewards?: {
|
|
@@ -839,12 +887,12 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
839
887
|
triage?: {
|
|
840
888
|
message: string;
|
|
841
889
|
yesAction: {
|
|
842
|
-
actionId: string;
|
|
843
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
890
|
+
actionId: string | null;
|
|
891
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
844
892
|
};
|
|
845
893
|
noAction: {
|
|
846
|
-
actionId: string;
|
|
847
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
894
|
+
actionId: string | null;
|
|
895
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
848
896
|
};
|
|
849
897
|
} | undefined;
|
|
850
898
|
reminderInterval?: {
|
|
@@ -856,15 +904,19 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
856
904
|
includeInstructions?: boolean | undefined;
|
|
857
905
|
expirationActionId?: string | undefined;
|
|
858
906
|
expirationAction?: {
|
|
859
|
-
actionId: string;
|
|
860
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
907
|
+
actionId: string | null;
|
|
908
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
861
909
|
} | undefined;
|
|
862
910
|
simpleTriageYesActId?: string | undefined;
|
|
863
911
|
simpleTriageNoActId?: string | undefined;
|
|
864
912
|
resolveNowActionId?: string | undefined;
|
|
865
913
|
resolveNowAction?: {
|
|
866
|
-
actionId: string;
|
|
867
|
-
findingStatus?: import("..").FindingStatus | undefined;
|
|
914
|
+
actionId: string | null;
|
|
915
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
916
|
+
} | undefined;
|
|
917
|
+
scheduleResolutionAction?: {
|
|
918
|
+
actionId: string | null;
|
|
919
|
+
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
868
920
|
} | undefined;
|
|
869
921
|
} | undefined;
|
|
870
922
|
rewards?: {
|
package/build/src/etag.js
CHANGED
|
@@ -12,7 +12,7 @@ function calculateEtag(model) {
|
|
|
12
12
|
}
|
|
13
13
|
exports.calculateEtag = calculateEtag;
|
|
14
14
|
function withEtag(model) {
|
|
15
|
-
model.etag = calculateEtag(model);
|
|
15
|
+
model.etag = calculateEtag({ ...model, etag: '' });
|
|
16
16
|
}
|
|
17
17
|
exports.withEtag = withEtag;
|
|
18
18
|
function createWithEtag(model) {
|
package/build/src/etag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"etag.js","sourceRoot":"","sources":["../../src/etag.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA8B;AAG9B,SAAgB,aAAa,CAAC,KAAc;IAC1C,MAAM,UAAU,GAAoB,EAAC,GAAI,KAAgB,EAAC,CAAC;IAC3D,OAAO,UAAU,CAAC,IAAI,CAAC;IACvB,OAAO,IAAA,qBAAG,EAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AACzC,CAAC;AAJD,sCAIC;AAED,SAAgB,QAAQ,CAAC,KAA4C;IACnE,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"etag.js","sourceRoot":"","sources":["../../src/etag.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA8B;AAG9B,SAAgB,aAAa,CAAC,KAAc;IAC1C,MAAM,UAAU,GAAoB,EAAC,GAAI,KAAgB,EAAC,CAAC;IAC3D,OAAO,UAAU,CAAC,IAAI,CAAC;IACvB,OAAO,IAAA,qBAAG,EAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AACzC,CAAC;AAJD,sCAIC;AAED,SAAgB,QAAQ,CAAC,KAA4C;IACnE,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC,EAAC,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC;AACnD,CAAC;AAFD,4BAEC;AAED,SAAgB,cAAc,CAA2B,KAAQ;IAC/D,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC;AACf,CAAC;AAHD,wCAGC"}
|
|
@@ -1,46 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AgentAuthRoles, AgentDto, AgentInviteDto, AgentStatus, AgentUpsertDto, Page, PlatformAgentDto } from '../dto';
|
|
2
|
+
import { AmpDataServiceImpl } from './data.service';
|
|
3
3
|
import { AmpEntityServiceImpl } from './entity.service';
|
|
4
4
|
import { RestClient } from './rest';
|
|
5
|
-
export declare const _AgentSummaryPayload: z.ZodObject<{
|
|
6
|
-
email: z.ZodString;
|
|
7
|
-
status: z.ZodOptional<z.ZodNativeEnum<typeof import("../dto").AgentStatus>>;
|
|
8
|
-
id: z.ZodOptional<z.ZodString>;
|
|
9
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
10
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
11
|
-
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
-
firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
-
lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
-
pictureUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
15
|
-
role: z.ZodNativeEnum<typeof import("../dto").AuthRole>;
|
|
16
|
-
lastLoggedIn: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
email: string;
|
|
19
|
-
role: import("../dto").AuthRole;
|
|
20
|
-
status?: import("../dto").AgentStatus | undefined;
|
|
21
|
-
id?: string | undefined;
|
|
22
|
-
createdAt?: string | undefined;
|
|
23
|
-
updatedAt?: string | undefined;
|
|
24
|
-
deletedAt?: string | null | undefined;
|
|
25
|
-
firstName?: string | null | undefined;
|
|
26
|
-
lastName?: string | null | undefined;
|
|
27
|
-
pictureUrl?: string | undefined;
|
|
28
|
-
lastLoggedIn?: Date | null | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
email: string;
|
|
31
|
-
role: import("../dto").AuthRole;
|
|
32
|
-
status?: import("../dto").AgentStatus | undefined;
|
|
33
|
-
id?: string | undefined;
|
|
34
|
-
createdAt?: string | undefined;
|
|
35
|
-
updatedAt?: string | undefined;
|
|
36
|
-
deletedAt?: string | null | undefined;
|
|
37
|
-
firstName?: string | null | undefined;
|
|
38
|
-
lastName?: string | null | undefined;
|
|
39
|
-
pictureUrl?: string | undefined;
|
|
40
|
-
lastLoggedIn?: Date | null | undefined;
|
|
41
|
-
}>;
|
|
42
|
-
export type AgentSummaryPayload = z.infer<typeof _AgentSummaryPayload>;
|
|
43
5
|
export declare class AgentsService extends AmpEntityServiceImpl<AgentUpsertDto, AgentDto> {
|
|
44
6
|
constructor(rest: RestClient);
|
|
45
|
-
invite: (
|
|
7
|
+
invite: (agentInvitePayload: AgentInviteDto) => Promise<Page<AgentDto>>;
|
|
8
|
+
}
|
|
9
|
+
export declare class PlatformAgentService extends AmpDataServiceImpl<PlatformAgentDto> {
|
|
10
|
+
constructor(rest: RestClient);
|
|
11
|
+
create: (email: string) => Promise<import("./rest").RestResponse>;
|
|
12
|
+
delete: (id: string) => Promise<import("./rest").RestResponse>;
|
|
13
|
+
upsertMembership: ({ tid, agentId, role, status }: {
|
|
14
|
+
tid: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
role: AgentAuthRoles;
|
|
17
|
+
status: AgentStatus;
|
|
18
|
+
}) => Promise<import("./rest").RestResponse>;
|
|
19
|
+
deleteMembership: ({ tid, agentId }: {
|
|
20
|
+
tid: string;
|
|
21
|
+
agentId: string;
|
|
22
|
+
}) => Promise<import("./rest").RestResponse>;
|
|
46
23
|
}
|
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const dto_1 = require("../dto");
|
|
3
|
+
exports.PlatformAgentService = exports.AgentsService = void 0;
|
|
5
4
|
const constants_1 = require("./constants");
|
|
5
|
+
const data_service_1 = require("./data.service");
|
|
6
6
|
const entity_service_1 = require("./entity.service");
|
|
7
|
-
exports._AgentSummaryPayload = dto_1._AgentSummaryUpsertDto.required({ email: true, role: true });
|
|
8
7
|
class AgentsService extends entity_service_1.AmpEntityServiceImpl {
|
|
9
8
|
constructor(rest) {
|
|
10
9
|
super(rest, constants_1.KIND.AGENTS);
|
|
11
|
-
this.invite = async (
|
|
12
|
-
const payload = exports._AgentSummaryPayload.parse(agentSavePayload);
|
|
10
|
+
this.invite = async (agentInvitePayload) => {
|
|
13
11
|
const res = await this.rest.call({
|
|
14
12
|
url: `/${this.targetApi}/v1/${this.kind}/invite`,
|
|
15
13
|
method: 'POST',
|
|
16
|
-
data:
|
|
14
|
+
data: agentInvitePayload,
|
|
17
15
|
});
|
|
18
16
|
return res.data;
|
|
19
17
|
};
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
exports.AgentsService = AgentsService;
|
|
21
|
+
class PlatformAgentService extends data_service_1.AmpDataServiceImpl {
|
|
22
|
+
constructor(rest) {
|
|
23
|
+
super(rest, constants_1.KIND.AGENTS, constants_1.TARGET_API_PLATFORM);
|
|
24
|
+
this.create = async (email) => {
|
|
25
|
+
return this.rest.call({
|
|
26
|
+
url: `/${this.targetApi}/v1/${this.kind}`,
|
|
27
|
+
method: 'POST',
|
|
28
|
+
data: { email },
|
|
29
|
+
headers: {
|
|
30
|
+
'Content-Type': 'application/json',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
this.delete = async (id) => {
|
|
35
|
+
return this.rest.call({
|
|
36
|
+
url: `/${this.targetApi}/v1/${this.kind}/${id}`,
|
|
37
|
+
method: 'DELETE',
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
this.upsertMembership = async ({ tid, agentId, role, status }) => {
|
|
41
|
+
return this.rest.call({
|
|
42
|
+
url: `/${this.targetApi}/v1/${this.kind}/memberships`,
|
|
43
|
+
method: 'PUT',
|
|
44
|
+
data: { tid, agentId, role, status },
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
this.deleteMembership = async ({ tid, agentId }) => {
|
|
48
|
+
return this.rest.call({
|
|
49
|
+
url: `/${this.targetApi}/v1/${this.kind}/memberships/agentId/${agentId}/tid/${tid}`,
|
|
50
|
+
method: 'DELETE',
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.PlatformAgentService = PlatformAgentService;
|
|
23
56
|
//# sourceMappingURL=AgentsService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentsService.js","sourceRoot":"","sources":["../../../src/services/AgentsService.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"AgentsService.js","sourceRoot":"","sources":["../../../src/services/AgentsService.ts"],"names":[],"mappings":";;;AACA,2CAAsD;AACtD,iDAAkD;AAClD,qDAAsD;AAGtD,MAAa,aAAc,SAAQ,qCAA8C;IAC/E,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QAE3B,WAAM,GAAG,KAAK,EAAE,kBAAkC,EAA2B,EAAE;YAC7E,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,SAAS;gBAChD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,kBAAkB;aACzB,CAAC,CAAC;YAEH,OAAO,GAAG,CAAC,IAAsB,CAAC;QACpC,CAAC,CAAC;IATF,CAAC;CAUF;AAbD,sCAaC;AAED,MAAa,oBAAqB,SAAQ,iCAAoC;IAC5E,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;QAEhD,WAAM,GAAG,KAAK,EAAE,KAAa,EAAE,EAAE;YAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBACpB,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,EAAE;gBACzC,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,EAAC,KAAK,EAAC;gBACb,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;aACF,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,WAAM,GAAG,KAAK,EAAE,EAAU,EAAE,EAAE;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBACpB,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE;gBAC/C,MAAM,EAAE,QAAQ;aACjB,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,qBAAgB,GAAG,KAAK,EAAE,EAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAA4E,EAAE,EAAE;YACnI,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBACpB,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,cAAc;gBACrD,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,EAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAC;aACnC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,qBAAgB,GAAG,KAAK,EAAE,EAAC,GAAG,EAAE,OAAO,EAAiC,EAAE,EAAE;YAC1E,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBACpB,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,wBAAwB,OAAO,QAAQ,GAAG,EAAE;gBACnF,MAAM,EAAE,QAAQ;aACjB,CAAC,CAAC;QACL,CAAC,CAAC;IAhCF,CAAC;CAiCF;AApCD,oDAoCC"}
|