@ampsec/platform-client 75.8.0 → 76.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/flows.dto.d.ts +156 -54
- package/build/src/dto/flows.dto.js +8 -2
- package/build/src/dto/flows.dto.js.map +1 -1
- package/build/src/dto/platform/platform.flows.dto.d.ts +82 -36
- package/build/src/dto/saasComponents.dto.d.ts +2 -0
- package/build/src/dto/saasComponents.dto.js.map +1 -1
- package/build/src/services/findings.service.d.ts +1 -25
- package/build/src/services/findings.service.js +0 -49
- package/build/src/services/findings.service.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/flows.dto.ts +10 -2
- package/src/dto/saasComponents.dto.ts +2 -0
- package/src/services/findings.service.ts +1 -51
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { FindingStatus } from './enums';
|
|
3
|
+
export declare const EMAIL_CID = "E00000000000";
|
|
4
|
+
export declare const CUSTOM_FINDINGS_CID = "C00000000000";
|
|
3
5
|
export declare enum FlowSpecStatusKind {
|
|
4
6
|
ACTIVE = "ACTIVE",
|
|
5
7
|
PAUSED = "PAUSED",
|
|
@@ -946,6 +948,37 @@ export declare const _FlowRewardsConfig: z.ZodObject<{
|
|
|
946
948
|
units?: string | undefined;
|
|
947
949
|
}>;
|
|
948
950
|
export type FlowRewardsConfig = z.infer<typeof _FlowRewardsConfig>;
|
|
951
|
+
export declare const _EngagementEscalationConfig: z.ZodObject<{
|
|
952
|
+
interval: z.ZodObject<{
|
|
953
|
+
minutes: z.ZodNumber;
|
|
954
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
955
|
+
units: z.ZodOptional<z.ZodString>;
|
|
956
|
+
}, "strip", z.ZodTypeAny, {
|
|
957
|
+
minutes: number;
|
|
958
|
+
value?: number | undefined;
|
|
959
|
+
units?: string | undefined;
|
|
960
|
+
}, {
|
|
961
|
+
minutes: number;
|
|
962
|
+
value?: number | undefined;
|
|
963
|
+
units?: string | undefined;
|
|
964
|
+
}>;
|
|
965
|
+
engagementChannelConnectorIds: z.ZodArray<z.ZodString, "many">;
|
|
966
|
+
}, "strip", z.ZodTypeAny, {
|
|
967
|
+
interval: {
|
|
968
|
+
minutes: number;
|
|
969
|
+
value?: number | undefined;
|
|
970
|
+
units?: string | undefined;
|
|
971
|
+
};
|
|
972
|
+
engagementChannelConnectorIds: string[];
|
|
973
|
+
}, {
|
|
974
|
+
interval: {
|
|
975
|
+
minutes: number;
|
|
976
|
+
value?: number | undefined;
|
|
977
|
+
units?: string | undefined;
|
|
978
|
+
};
|
|
979
|
+
engagementChannelConnectorIds: string[];
|
|
980
|
+
}>;
|
|
981
|
+
export type EngagementEscalationConfig = z.infer<typeof _EngagementEscalationConfig>;
|
|
949
982
|
export declare const _FlowSpecDto: z.ZodObject<z.objectUtil.extendShape<{
|
|
950
983
|
id: z.ZodString;
|
|
951
984
|
createdAt: z.ZodString;
|
|
@@ -1199,18 +1232,35 @@ export declare const _FlowSpecDto: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1199
1232
|
findingStatus?: FindingStatus | null | undefined;
|
|
1200
1233
|
} | undefined;
|
|
1201
1234
|
}>>;
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1235
|
+
escalation: z.ZodOptional<z.ZodObject<{
|
|
1236
|
+
interval: z.ZodObject<{
|
|
1237
|
+
minutes: z.ZodNumber;
|
|
1238
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
1239
|
+
units: z.ZodOptional<z.ZodString>;
|
|
1240
|
+
}, "strip", z.ZodTypeAny, {
|
|
1241
|
+
minutes: number;
|
|
1242
|
+
value?: number | undefined;
|
|
1243
|
+
units?: string | undefined;
|
|
1244
|
+
}, {
|
|
1245
|
+
minutes: number;
|
|
1246
|
+
value?: number | undefined;
|
|
1247
|
+
units?: string | undefined;
|
|
1248
|
+
}>;
|
|
1249
|
+
engagementChannelConnectorIds: z.ZodArray<z.ZodString, "many">;
|
|
1206
1250
|
}, "strip", z.ZodTypeAny, {
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1251
|
+
interval: {
|
|
1252
|
+
minutes: number;
|
|
1253
|
+
value?: number | undefined;
|
|
1254
|
+
units?: string | undefined;
|
|
1255
|
+
};
|
|
1256
|
+
engagementChannelConnectorIds: string[];
|
|
1210
1257
|
}, {
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1258
|
+
interval: {
|
|
1259
|
+
minutes: number;
|
|
1260
|
+
value?: number | undefined;
|
|
1261
|
+
units?: string | undefined;
|
|
1262
|
+
};
|
|
1263
|
+
engagementChannelConnectorIds: string[];
|
|
1214
1264
|
}>>;
|
|
1215
1265
|
rewards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1216
1266
|
isUpperBound: z.ZodBoolean;
|
|
@@ -1354,10 +1404,13 @@ export declare const _FlowSpecDto: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1354
1404
|
findingStatus?: FindingStatus | null | undefined;
|
|
1355
1405
|
} | undefined;
|
|
1356
1406
|
} | undefined;
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1407
|
+
escalation?: {
|
|
1408
|
+
interval: {
|
|
1409
|
+
minutes: number;
|
|
1410
|
+
value?: number | undefined;
|
|
1411
|
+
units?: string | undefined;
|
|
1412
|
+
};
|
|
1413
|
+
engagementChannelConnectorIds: string[];
|
|
1361
1414
|
} | undefined;
|
|
1362
1415
|
rewards?: {
|
|
1363
1416
|
minutes: number;
|
|
@@ -1458,10 +1511,13 @@ export declare const _FlowSpecDto: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1458
1511
|
findingStatus?: FindingStatus | null | undefined;
|
|
1459
1512
|
} | undefined;
|
|
1460
1513
|
} | undefined;
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1514
|
+
escalation?: {
|
|
1515
|
+
interval: {
|
|
1516
|
+
minutes: number;
|
|
1517
|
+
value?: number | undefined;
|
|
1518
|
+
units?: string | undefined;
|
|
1519
|
+
};
|
|
1520
|
+
engagementChannelConnectorIds: string[];
|
|
1465
1521
|
} | undefined;
|
|
1466
1522
|
rewards?: {
|
|
1467
1523
|
minutes: number;
|
|
@@ -1743,18 +1799,35 @@ export declare const _FlowSpecUpsertDto: z.ZodObject<z.objectUtil.extendShape<Om
|
|
|
1743
1799
|
findingStatus?: FindingStatus | null | undefined;
|
|
1744
1800
|
} | undefined;
|
|
1745
1801
|
}>>;
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1802
|
+
escalation: z.ZodOptional<z.ZodObject<{
|
|
1803
|
+
interval: z.ZodObject<{
|
|
1804
|
+
minutes: z.ZodNumber;
|
|
1805
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
1806
|
+
units: z.ZodOptional<z.ZodString>;
|
|
1807
|
+
}, "strip", z.ZodTypeAny, {
|
|
1808
|
+
minutes: number;
|
|
1809
|
+
value?: number | undefined;
|
|
1810
|
+
units?: string | undefined;
|
|
1811
|
+
}, {
|
|
1812
|
+
minutes: number;
|
|
1813
|
+
value?: number | undefined;
|
|
1814
|
+
units?: string | undefined;
|
|
1815
|
+
}>;
|
|
1816
|
+
engagementChannelConnectorIds: z.ZodArray<z.ZodString, "many">;
|
|
1750
1817
|
}, "strip", z.ZodTypeAny, {
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1818
|
+
interval: {
|
|
1819
|
+
minutes: number;
|
|
1820
|
+
value?: number | undefined;
|
|
1821
|
+
units?: string | undefined;
|
|
1822
|
+
};
|
|
1823
|
+
engagementChannelConnectorIds: string[];
|
|
1754
1824
|
}, {
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1825
|
+
interval: {
|
|
1826
|
+
minutes: number;
|
|
1827
|
+
value?: number | undefined;
|
|
1828
|
+
units?: string | undefined;
|
|
1829
|
+
};
|
|
1830
|
+
engagementChannelConnectorIds: string[];
|
|
1758
1831
|
}>>;
|
|
1759
1832
|
rewards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1760
1833
|
isUpperBound: z.ZodBoolean;
|
|
@@ -1903,10 +1976,13 @@ export declare const _FlowSpecUpsertDto: z.ZodObject<z.objectUtil.extendShape<Om
|
|
|
1903
1976
|
findingStatus?: FindingStatus | null | undefined;
|
|
1904
1977
|
} | undefined;
|
|
1905
1978
|
} | undefined;
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1979
|
+
escalation?: {
|
|
1980
|
+
interval: {
|
|
1981
|
+
minutes: number;
|
|
1982
|
+
value?: number | undefined;
|
|
1983
|
+
units?: string | undefined;
|
|
1984
|
+
};
|
|
1985
|
+
engagementChannelConnectorIds: string[];
|
|
1910
1986
|
} | undefined;
|
|
1911
1987
|
rewards?: {
|
|
1912
1988
|
minutes: number;
|
|
@@ -1999,10 +2075,13 @@ export declare const _FlowSpecUpsertDto: z.ZodObject<z.objectUtil.extendShape<Om
|
|
|
1999
2075
|
findingStatus?: FindingStatus | null | undefined;
|
|
2000
2076
|
} | undefined;
|
|
2001
2077
|
} | undefined;
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2078
|
+
escalation?: {
|
|
2079
|
+
interval: {
|
|
2080
|
+
minutes: number;
|
|
2081
|
+
value?: number | undefined;
|
|
2082
|
+
units?: string | undefined;
|
|
2083
|
+
};
|
|
2084
|
+
engagementChannelConnectorIds: string[];
|
|
2006
2085
|
} | undefined;
|
|
2007
2086
|
rewards?: {
|
|
2008
2087
|
minutes: number;
|
|
@@ -2198,18 +2277,35 @@ export declare const _FlowSpecFilter: z.ZodObject<z.objectUtil.extendShape<z.obj
|
|
|
2198
2277
|
findingStatus?: FindingStatus | null | undefined;
|
|
2199
2278
|
} | undefined;
|
|
2200
2279
|
}>>>;
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2280
|
+
escalation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2281
|
+
interval: z.ZodObject<{
|
|
2282
|
+
minutes: z.ZodNumber;
|
|
2283
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
2284
|
+
units: z.ZodOptional<z.ZodString>;
|
|
2285
|
+
}, "strip", z.ZodTypeAny, {
|
|
2286
|
+
minutes: number;
|
|
2287
|
+
value?: number | undefined;
|
|
2288
|
+
units?: string | undefined;
|
|
2289
|
+
}, {
|
|
2290
|
+
minutes: number;
|
|
2291
|
+
value?: number | undefined;
|
|
2292
|
+
units?: string | undefined;
|
|
2293
|
+
}>;
|
|
2294
|
+
engagementChannelConnectorIds: z.ZodArray<z.ZodString, "many">;
|
|
2205
2295
|
}, "strip", z.ZodTypeAny, {
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2296
|
+
interval: {
|
|
2297
|
+
minutes: number;
|
|
2298
|
+
value?: number | undefined;
|
|
2299
|
+
units?: string | undefined;
|
|
2300
|
+
};
|
|
2301
|
+
engagementChannelConnectorIds: string[];
|
|
2209
2302
|
}, {
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2303
|
+
interval: {
|
|
2304
|
+
minutes: number;
|
|
2305
|
+
value?: number | undefined;
|
|
2306
|
+
units?: string | undefined;
|
|
2307
|
+
};
|
|
2308
|
+
engagementChannelConnectorIds: string[];
|
|
2213
2309
|
}>>>;
|
|
2214
2310
|
rewards: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2215
2311
|
isUpperBound: z.ZodBoolean;
|
|
@@ -2339,10 +2435,13 @@ export declare const _FlowSpecFilter: z.ZodObject<z.objectUtil.extendShape<z.obj
|
|
|
2339
2435
|
findingStatus?: FindingStatus | null | undefined;
|
|
2340
2436
|
} | undefined;
|
|
2341
2437
|
} | undefined;
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2438
|
+
escalation?: {
|
|
2439
|
+
interval: {
|
|
2440
|
+
minutes: number;
|
|
2441
|
+
value?: number | undefined;
|
|
2442
|
+
units?: string | undefined;
|
|
2443
|
+
};
|
|
2444
|
+
engagementChannelConnectorIds: string[];
|
|
2346
2445
|
} | undefined;
|
|
2347
2446
|
rewards?: {
|
|
2348
2447
|
minutes: number;
|
|
@@ -2427,10 +2526,13 @@ export declare const _FlowSpecFilter: z.ZodObject<z.objectUtil.extendShape<z.obj
|
|
|
2427
2526
|
findingStatus?: FindingStatus | null | undefined;
|
|
2428
2527
|
} | undefined;
|
|
2429
2528
|
} | undefined;
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2529
|
+
escalation?: {
|
|
2530
|
+
interval: {
|
|
2531
|
+
minutes: number;
|
|
2532
|
+
value?: number | undefined;
|
|
2533
|
+
units?: string | undefined;
|
|
2534
|
+
};
|
|
2535
|
+
engagementChannelConnectorIds: string[];
|
|
2434
2536
|
} | undefined;
|
|
2435
2537
|
rewards?: {
|
|
2436
2538
|
minutes: number;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._ActiveEngagementFilterCriteria = exports._ActiveEngagement = exports._FlowSpecFilter = exports._FlowSpecUpsertDto = exports._FlowSpecDto = exports._FlowRewardsConfig = exports._FlowActions = exports._FlowInterval = exports._FlowFilter = exports._AmplifierCohortDto = exports.CohortKind = exports._FlowTriggerFilter = exports._FlowSpecCreateDto = exports._FlowStateFilter = exports._FlowStateUpsertDto = exports._FlowStateDto = exports._FlowStateStatusDto = exports._FlowHistoryEntry = exports._FlowSystemEventDto = exports._FlowTriggerEventDto = exports.FlowSpecStatusKind = void 0;
|
|
3
|
+
exports._ActiveEngagementFilterCriteria = exports._ActiveEngagement = exports._FlowSpecFilter = exports._FlowSpecUpsertDto = exports._FlowSpecDto = exports._EngagementEscalationConfig = exports._FlowRewardsConfig = exports._FlowActions = exports._FlowInterval = exports._FlowFilter = exports._AmplifierCohortDto = exports.CohortKind = exports._FlowTriggerFilter = exports._FlowSpecCreateDto = exports._FlowStateFilter = exports._FlowStateUpsertDto = exports._FlowStateDto = exports._FlowStateStatusDto = exports._FlowHistoryEntry = exports._FlowSystemEventDto = exports._FlowTriggerEventDto = exports.FlowSpecStatusKind = exports.CUSTOM_FINDINGS_CID = exports.EMAIL_CID = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
const FilterCriteria_1 = require("../FilterCriteria");
|
|
7
7
|
const enums_1 = require("./enums");
|
|
8
|
+
exports.EMAIL_CID = 'E00000000000';
|
|
9
|
+
exports.CUSTOM_FINDINGS_CID = 'C00000000000';
|
|
8
10
|
var FlowSpecStatusKind;
|
|
9
11
|
(function (FlowSpecStatusKind) {
|
|
10
12
|
FlowSpecStatusKind["ACTIVE"] = "ACTIVE";
|
|
@@ -151,6 +153,10 @@ exports._FlowRewardsConfig = zod_1.z.object({
|
|
|
151
153
|
value: zod_1.z.number().optional(),
|
|
152
154
|
units: zod_1.z.string().optional(),
|
|
153
155
|
});
|
|
156
|
+
exports._EngagementEscalationConfig = zod_1.z.object({
|
|
157
|
+
interval: exports._FlowInterval,
|
|
158
|
+
engagementChannelConnectorIds: zod_1.z.array(zod_1.z.string()),
|
|
159
|
+
});
|
|
154
160
|
exports._FlowSpecDto = base_dto_1._BaseDto.merge(zod_1.z.object({
|
|
155
161
|
id: zod_1.z.string(),
|
|
156
162
|
tid: zod_1.z.string(),
|
|
@@ -167,7 +173,7 @@ exports._FlowSpecDto = base_dto_1._BaseDto.merge(zod_1.z.object({
|
|
|
167
173
|
triage: zod_1.z.object({ message: zod_1.z.string(), yesAction: _FlowActionDetails, noAction: _FlowActionDetails }).optional(),
|
|
168
174
|
reminderInterval: exports._FlowInterval.optional(),
|
|
169
175
|
actions: exports._FlowActions.optional(),
|
|
170
|
-
|
|
176
|
+
escalation: exports._EngagementEscalationConfig.optional(),
|
|
171
177
|
rewards: zod_1.z.array(exports._FlowRewardsConfig).optional(),
|
|
172
178
|
customMessage: zod_1.z.object({ template: zod_1.z.string().optional(), append: zod_1.z.boolean().optional() }).optional(),
|
|
173
179
|
additionalContext: zod_1.z.object({ data: zod_1.z.string().optional() }).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.dto.js","sourceRoot":"","sources":["../../../src/dto/flows.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAoD;AACpD,sDAAiE;AACjE,mCAAsC;
|
|
1
|
+
{"version":3,"file":"flows.dto.js","sourceRoot":"","sources":["../../../src/dto/flows.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAoD;AACpD,sDAAiE;AACjE,mCAAsC;AAEzB,QAAA,SAAS,GAAG,cAAc,CAAC;AAC3B,QAAA,mBAAmB,GAAG,cAAc,CAAC;AAElD,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,qCAAe,CAAA;IACf,qCAAe,CAAA;AACjB,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B;AAED;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,IAAI,EAAE,OAAC;SACJ,MAAM,CAAC;QACN,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAA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,CAAC,4BAAW,CAAC,CAAC;AAG5I;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC/B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC9D,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC;AAGU,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC,EAAC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAC,CAAC,CAAC,KAAK,CAAC,kCAAiB,CAAC,CAAC"}
|
|
@@ -240,18 +240,35 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
240
240
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
241
241
|
} | undefined;
|
|
242
242
|
}>>;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
243
|
+
escalation: z.ZodOptional<z.ZodObject<{
|
|
244
|
+
interval: z.ZodObject<{
|
|
245
|
+
minutes: z.ZodNumber;
|
|
246
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
units: z.ZodOptional<z.ZodString>;
|
|
248
|
+
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
minutes: number;
|
|
250
|
+
value?: number | undefined;
|
|
251
|
+
units?: string | undefined;
|
|
252
|
+
}, {
|
|
253
|
+
minutes: number;
|
|
254
|
+
value?: number | undefined;
|
|
255
|
+
units?: string | undefined;
|
|
256
|
+
}>;
|
|
257
|
+
engagementChannelConnectorIds: z.ZodArray<z.ZodString, "many">;
|
|
247
258
|
}, "strip", z.ZodTypeAny, {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
259
|
+
interval: {
|
|
260
|
+
minutes: number;
|
|
261
|
+
value?: number | undefined;
|
|
262
|
+
units?: string | undefined;
|
|
263
|
+
};
|
|
264
|
+
engagementChannelConnectorIds: string[];
|
|
251
265
|
}, {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
266
|
+
interval: {
|
|
267
|
+
minutes: number;
|
|
268
|
+
value?: number | undefined;
|
|
269
|
+
units?: string | undefined;
|
|
270
|
+
};
|
|
271
|
+
engagementChannelConnectorIds: string[];
|
|
255
272
|
}>>;
|
|
256
273
|
rewards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
257
274
|
isUpperBound: z.ZodBoolean;
|
|
@@ -397,10 +414,13 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
397
414
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
398
415
|
} | undefined;
|
|
399
416
|
} | undefined;
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
417
|
+
escalation?: {
|
|
418
|
+
interval: {
|
|
419
|
+
minutes: number;
|
|
420
|
+
value?: number | undefined;
|
|
421
|
+
units?: string | undefined;
|
|
422
|
+
};
|
|
423
|
+
engagementChannelConnectorIds: string[];
|
|
404
424
|
} | undefined;
|
|
405
425
|
rewards?: {
|
|
406
426
|
minutes: number;
|
|
@@ -493,10 +513,13 @@ export declare const _PlatformFlowSpecUpsertDto: z.ZodObject<z.objectUtil.extend
|
|
|
493
513
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
494
514
|
} | undefined;
|
|
495
515
|
} | undefined;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
516
|
+
escalation?: {
|
|
517
|
+
interval: {
|
|
518
|
+
minutes: number;
|
|
519
|
+
value?: number | undefined;
|
|
520
|
+
units?: string | undefined;
|
|
521
|
+
};
|
|
522
|
+
engagementChannelConnectorIds: string[];
|
|
500
523
|
} | undefined;
|
|
501
524
|
rewards?: {
|
|
502
525
|
minutes: number;
|
|
@@ -757,18 +780,35 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
757
780
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
758
781
|
} | undefined;
|
|
759
782
|
}>>;
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
783
|
+
escalation: z.ZodOptional<z.ZodObject<{
|
|
784
|
+
interval: z.ZodObject<{
|
|
785
|
+
minutes: z.ZodNumber;
|
|
786
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
787
|
+
units: z.ZodOptional<z.ZodString>;
|
|
788
|
+
}, "strip", z.ZodTypeAny, {
|
|
789
|
+
minutes: number;
|
|
790
|
+
value?: number | undefined;
|
|
791
|
+
units?: string | undefined;
|
|
792
|
+
}, {
|
|
793
|
+
minutes: number;
|
|
794
|
+
value?: number | undefined;
|
|
795
|
+
units?: string | undefined;
|
|
796
|
+
}>;
|
|
797
|
+
engagementChannelConnectorIds: z.ZodArray<z.ZodString, "many">;
|
|
764
798
|
}, "strip", z.ZodTypeAny, {
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
799
|
+
interval: {
|
|
800
|
+
minutes: number;
|
|
801
|
+
value?: number | undefined;
|
|
802
|
+
units?: string | undefined;
|
|
803
|
+
};
|
|
804
|
+
engagementChannelConnectorIds: string[];
|
|
768
805
|
}, {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
806
|
+
interval: {
|
|
807
|
+
minutes: number;
|
|
808
|
+
value?: number | undefined;
|
|
809
|
+
units?: string | undefined;
|
|
810
|
+
};
|
|
811
|
+
engagementChannelConnectorIds: string[];
|
|
772
812
|
}>>;
|
|
773
813
|
rewards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
774
814
|
isUpperBound: z.ZodBoolean;
|
|
@@ -909,10 +949,13 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
909
949
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
910
950
|
} | undefined;
|
|
911
951
|
} | undefined;
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
952
|
+
escalation?: {
|
|
953
|
+
interval: {
|
|
954
|
+
minutes: number;
|
|
955
|
+
value?: number | undefined;
|
|
956
|
+
units?: string | undefined;
|
|
957
|
+
};
|
|
958
|
+
engagementChannelConnectorIds: string[];
|
|
916
959
|
} | undefined;
|
|
917
960
|
rewards?: {
|
|
918
961
|
minutes: number;
|
|
@@ -1013,10 +1056,13 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1013
1056
|
findingStatus?: import("..").FindingStatus | null | undefined;
|
|
1014
1057
|
} | undefined;
|
|
1015
1058
|
} | undefined;
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1059
|
+
escalation?: {
|
|
1060
|
+
interval: {
|
|
1061
|
+
minutes: number;
|
|
1062
|
+
value?: number | undefined;
|
|
1063
|
+
units?: string | undefined;
|
|
1064
|
+
};
|
|
1065
|
+
engagementChannelConnectorIds: string[];
|
|
1020
1066
|
} | undefined;
|
|
1021
1067
|
rewards?: {
|
|
1022
1068
|
minutes: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saasComponents.dto.js","sourceRoot":"","sources":["../../../src/dto/saasComponents.dto.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"saasComponents.dto.js","sourceRoot":"","sources":["../../../src/dto/saasComponents.dto.ts"],"names":[],"mappings":";;;AAkDA,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,8CAAiC,CAAA;IACjC,kDAAqC,CAAA;IACrC,gDAAmC,CAAA;IACnC,kCAAqB,CAAA;IACrB,0CAA6B,CAAA;AAC/B,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FindingDto, FindingStatus, Page, PlatformFindingDto, PlatformFindingUpsertDto } from '../dto';
|
|
2
2
|
import { RestClient, RestResponse } from './rest';
|
|
3
3
|
import { TargetApi } from './constants';
|
|
4
4
|
import { AmpEntityServiceImpl } from './entity.service';
|
|
@@ -11,28 +11,4 @@ export declare class FindingsService extends AmpEntityServiceImpl<PlatformFindin
|
|
|
11
11
|
patch(id: string, values: FindingPatchDto | FindingPatchDto[]): Promise<Page<FindingDto>>;
|
|
12
12
|
patchAll(values: FindingPatchDto[]): Promise<Page<FindingDto>>;
|
|
13
13
|
getInstructions(finding: FindingDto): Promise<RestResponse>;
|
|
14
|
-
/**
|
|
15
|
-
* Returns a page of FindingBucketSummaryDto scoped to a tenant. The page will contain 1
|
|
16
|
-
* result for each user + bucket combination. The result will be the MAX(bucketScore) and
|
|
17
|
-
* MIN(createdAt). The findings are also joined with flowStates to pull any running flows.
|
|
18
|
-
*
|
|
19
|
-
* @param tid tenant id
|
|
20
|
-
* @param offset Optional offset for pagination. Default 0
|
|
21
|
-
* @param limit Optional limit for pagination. Default 50
|
|
22
|
-
* @returns Page of FindingBucketSummaryDto scoped to a tenant.
|
|
23
|
-
*/
|
|
24
|
-
getFindingBuckets(tid: string, offset: number | undefined, limit: number | undefined, keepOpenThresholdMs: number): Promise<Page<FindingBucketSummaryDto>>;
|
|
25
|
-
/**
|
|
26
|
-
* Returns a page of pending engagement findings scoped to a tenant.
|
|
27
|
-
* The page will contain findings that are
|
|
28
|
-
* - pending to be engaged i.e no flow state exists for such findings.
|
|
29
|
-
* - are not consolidated i.e should not be blocked by consolidation
|
|
30
|
-
* - 'OPEN' status
|
|
31
|
-
*
|
|
32
|
-
* @param tid tenant id
|
|
33
|
-
* @param offset Optional offset for pagination. Default 0
|
|
34
|
-
* @param limit Optional limit for pagination. Default 50
|
|
35
|
-
* @returns Page of FindingDto scoped to a tenant.
|
|
36
|
-
*/
|
|
37
|
-
getPendingEngagements(tid: string, offset?: number, limit?: number): Promise<Page<PlatformFindingDto>>;
|
|
38
14
|
}
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.FindingsService = void 0;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
-
const dto_1 = require("../dto");
|
|
9
8
|
const constants_1 = require("./constants");
|
|
10
9
|
const entity_service_1 = require("./entity.service");
|
|
11
10
|
class FindingsService extends entity_service_1.AmpEntityServiceImpl {
|
|
@@ -36,54 +35,6 @@ class FindingsService extends entity_service_1.AmpEntityServiceImpl {
|
|
|
36
35
|
params: finding,
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Returns a page of FindingBucketSummaryDto scoped to a tenant. The page will contain 1
|
|
41
|
-
* result for each user + bucket combination. The result will be the MAX(bucketScore) and
|
|
42
|
-
* MIN(createdAt). The findings are also joined with flowStates to pull any running flows.
|
|
43
|
-
*
|
|
44
|
-
* @param tid tenant id
|
|
45
|
-
* @param offset Optional offset for pagination. Default 0
|
|
46
|
-
* @param limit Optional limit for pagination. Default 50
|
|
47
|
-
* @returns Page of FindingBucketSummaryDto scoped to a tenant.
|
|
48
|
-
*/
|
|
49
|
-
async getFindingBuckets(tid, offset = 0, limit = 50, keepOpenThresholdMs) {
|
|
50
|
-
const url = `/${this.targetApi}/v1/${this.kind}/_byUserBuckets`;
|
|
51
|
-
const res = await this.rest.call({
|
|
52
|
-
url,
|
|
53
|
-
method: 'GET',
|
|
54
|
-
params: {
|
|
55
|
-
tid,
|
|
56
|
-
limit,
|
|
57
|
-
offset,
|
|
58
|
-
keepOpenThresholdMs,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
return (0, dto_1.toTypedPage)(dto_1._FindingBucketSummaryDto, res.data);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Returns a page of pending engagement findings scoped to a tenant.
|
|
65
|
-
* The page will contain findings that are
|
|
66
|
-
* - pending to be engaged i.e no flow state exists for such findings.
|
|
67
|
-
* - are not consolidated i.e should not be blocked by consolidation
|
|
68
|
-
* - 'OPEN' status
|
|
69
|
-
*
|
|
70
|
-
* @param tid tenant id
|
|
71
|
-
* @param offset Optional offset for pagination. Default 0
|
|
72
|
-
* @param limit Optional limit for pagination. Default 50
|
|
73
|
-
* @returns Page of FindingDto scoped to a tenant.
|
|
74
|
-
*/
|
|
75
|
-
async getPendingEngagements(tid, offset = 0, limit = 50) {
|
|
76
|
-
const url = `/${this.targetApi}/v1/${this.kind}/_pendingEngagements`;
|
|
77
|
-
return this.getPage({
|
|
78
|
-
url,
|
|
79
|
-
method: 'GET',
|
|
80
|
-
params: {
|
|
81
|
-
tid,
|
|
82
|
-
limit,
|
|
83
|
-
offset,
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
38
|
}
|
|
88
39
|
exports.FindingsService = FindingsService;
|
|
89
40
|
//# sourceMappingURL=findings.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.service.js","sourceRoot":"","sources":["../../../src/services/findings.service.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;
|
|
1
|
+
{"version":3,"file":"findings.service.js","sourceRoot":"","sources":["../../../src/services/findings.service.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAGvB,2CAA+D;AAC/D,qDAAsD;AAOtD,MAAa,eAAgB,SAAQ,qCAAkE;IACrG,YAAY,IAAgB,EAAE,YAAuB,KAAK;QACxD,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,EAAU,EAAE,MAA2C;QAC3D,MAAM,GAAG,GAAG,gBAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;QAClH,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,GAAG;YACH,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,MAAyB;QAChC,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,GAAG;YACH,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;IAED,eAAe,CAAC,OAAmB;QACjC,MAAM,GAAG,GAAG,IAAI,6BAAiB,OAAO,IAAI,CAAC,IAAI,eAAe,CAAC;QACjE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACpB,GAAG;YACH,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,OAAO;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AA/BD,0CA+BC"}
|
package/package.json
CHANGED
package/src/dto/flows.dto.ts
CHANGED
|
@@ -2,7 +2,9 @@ import {z} from 'zod';
|
|
|
2
2
|
import {_BaseDto, _BaseUpsertDto} from './base.dto';
|
|
3
3
|
import {_PaginationFilter, _SortFilter} from '../FilterCriteria';
|
|
4
4
|
import {FindingStatus} from './enums';
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
export const EMAIL_CID = 'E00000000000';
|
|
7
|
+
export const CUSTOM_FINDINGS_CID = 'C00000000000';
|
|
6
8
|
|
|
7
9
|
export enum FlowSpecStatusKind {
|
|
8
10
|
ACTIVE = 'ACTIVE',
|
|
@@ -182,6 +184,12 @@ export const _FlowRewardsConfig = z.object({
|
|
|
182
184
|
});
|
|
183
185
|
export type FlowRewardsConfig = z.infer<typeof _FlowRewardsConfig>;
|
|
184
186
|
|
|
187
|
+
export const _EngagementEscalationConfig = z.object({
|
|
188
|
+
interval: _FlowInterval,
|
|
189
|
+
engagementChannelConnectorIds: z.array(z.string()),
|
|
190
|
+
});
|
|
191
|
+
export type EngagementEscalationConfig = z.infer<typeof _EngagementEscalationConfig>;
|
|
192
|
+
|
|
185
193
|
export const _FlowSpecDto = _BaseDto.merge(
|
|
186
194
|
z.object({
|
|
187
195
|
id: z.string(),
|
|
@@ -199,7 +207,7 @@ export const _FlowSpecDto = _BaseDto.merge(
|
|
|
199
207
|
triage: z.object({message: z.string(), yesAction: _FlowActionDetails, noAction: _FlowActionDetails}).optional(),
|
|
200
208
|
reminderInterval: _FlowInterval.optional(),
|
|
201
209
|
actions: _FlowActions.optional(),
|
|
202
|
-
|
|
210
|
+
escalation: _EngagementEscalationConfig.optional(),
|
|
203
211
|
rewards: z.array(_FlowRewardsConfig).optional(),
|
|
204
212
|
customMessage: z.object({template: z.string().optional(), append: z.boolean().optional()}).optional(),
|
|
205
213
|
additionalContext: z.object({data: z.string().optional()}).optional(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import {
|
|
2
|
+
import {FindingDto, FindingStatus, Page, PlatformFindingDto, PlatformFindingUpsertDto} from '../dto';
|
|
3
3
|
import {RestClient, RestResponse} from './rest';
|
|
4
4
|
import {KIND, TARGET_API_ENGAGE, TargetApi} from './constants';
|
|
5
5
|
import {AmpEntityServiceImpl} from './entity.service';
|
|
@@ -40,54 +40,4 @@ export class FindingsService extends AmpEntityServiceImpl<PlatformFindingUpsertD
|
|
|
40
40
|
params: finding,
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Returns a page of FindingBucketSummaryDto scoped to a tenant. The page will contain 1
|
|
46
|
-
* result for each user + bucket combination. The result will be the MAX(bucketScore) and
|
|
47
|
-
* MIN(createdAt). The findings are also joined with flowStates to pull any running flows.
|
|
48
|
-
*
|
|
49
|
-
* @param tid tenant id
|
|
50
|
-
* @param offset Optional offset for pagination. Default 0
|
|
51
|
-
* @param limit Optional limit for pagination. Default 50
|
|
52
|
-
* @returns Page of FindingBucketSummaryDto scoped to a tenant.
|
|
53
|
-
*/
|
|
54
|
-
async getFindingBuckets(tid: string, offset = 0, limit = 50, keepOpenThresholdMs: number): Promise<Page<FindingBucketSummaryDto>> {
|
|
55
|
-
const url = `/${this.targetApi}/v1/${this.kind}/_byUserBuckets`;
|
|
56
|
-
const res = await this.rest.call({
|
|
57
|
-
url,
|
|
58
|
-
method: 'GET',
|
|
59
|
-
params: {
|
|
60
|
-
tid,
|
|
61
|
-
limit,
|
|
62
|
-
offset,
|
|
63
|
-
keepOpenThresholdMs,
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
return toTypedPage(_FindingBucketSummaryDto, res.data);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Returns a page of pending engagement findings scoped to a tenant.
|
|
71
|
-
* The page will contain findings that are
|
|
72
|
-
* - pending to be engaged i.e no flow state exists for such findings.
|
|
73
|
-
* - are not consolidated i.e should not be blocked by consolidation
|
|
74
|
-
* - 'OPEN' status
|
|
75
|
-
*
|
|
76
|
-
* @param tid tenant id
|
|
77
|
-
* @param offset Optional offset for pagination. Default 0
|
|
78
|
-
* @param limit Optional limit for pagination. Default 50
|
|
79
|
-
* @returns Page of FindingDto scoped to a tenant.
|
|
80
|
-
*/
|
|
81
|
-
async getPendingEngagements(tid: string, offset = 0, limit = 50): Promise<Page<PlatformFindingDto>> {
|
|
82
|
-
const url = `/${this.targetApi}/v1/${this.kind}/_pendingEngagements`;
|
|
83
|
-
return this.getPage({
|
|
84
|
-
url,
|
|
85
|
-
method: 'GET',
|
|
86
|
-
params: {
|
|
87
|
-
tid,
|
|
88
|
-
limit,
|
|
89
|
-
offset,
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
43
|
}
|