@ampsec/platform-client 75.3.0 → 75.4.1
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/engagementMappings.dto.d.ts +75 -0
- package/build/src/dto/engagementMappings.dto.js +24 -0
- package/build/src/dto/engagementMappings.dto.js.map +1 -0
- package/build/src/dto/index.d.ts +1 -0
- package/build/src/dto/index.js +1 -0
- package/build/src/dto/index.js.map +1 -1
- package/build/src/dto/notification.dto.d.ts +1 -0
- package/build/src/dto/notification.dto.js +1 -0
- package/build/src/dto/notification.dto.js.map +1 -1
- package/build/src/dto/platform/index.d.ts +1 -0
- package/build/src/dto/platform/index.js +1 -0
- package/build/src/dto/platform/index.js.map +1 -1
- package/build/src/dto/platform/platform.engagementMappings.dto.d.ts +79 -0
- package/build/src/dto/platform/platform.engagementMappings.dto.js +9 -0
- package/build/src/dto/platform/platform.engagementMappings.dto.js.map +1 -0
- package/build/src/dto/platform/platform.tenants.dto.d.ts +10 -10
- package/build/src/services/AmpSdk.d.ts +2 -0
- package/build/src/services/AmpSdk.js +2 -0
- package/build/src/services/AmpSdk.js.map +1 -1
- package/build/src/services/engagements.service.d.ts +18 -3
- package/build/src/services/engagements.service.js +33 -0
- package/build/src/services/engagements.service.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/engagementMappings.dto.ts +23 -0
- package/src/dto/index.ts +1 -0
- package/src/dto/notification.dto.ts +1 -0
- package/src/dto/platform/index.ts +1 -0
- package/src/dto/platform/platform.engagementMappings.dto.ts +8 -0
- package/src/services/AmpSdk.ts +3 -0
- package/src/services/engagements.service.ts +34 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const _EngagementMappingDto: z.ZodObject<{
|
|
3
|
+
finding: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
kind: z.ZodString;
|
|
6
|
+
uid: z.ZodString;
|
|
7
|
+
bucket: z.ZodString;
|
|
8
|
+
score: z.ZodNumber;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
uid: string;
|
|
12
|
+
kind: string;
|
|
13
|
+
score: number;
|
|
14
|
+
bucket: string;
|
|
15
|
+
}, {
|
|
16
|
+
id: string;
|
|
17
|
+
uid: string;
|
|
18
|
+
kind: string;
|
|
19
|
+
score: number;
|
|
20
|
+
bucket: string;
|
|
21
|
+
}>;
|
|
22
|
+
flowSpec: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
id: string;
|
|
26
|
+
}, {
|
|
27
|
+
id: string;
|
|
28
|
+
}>;
|
|
29
|
+
engagementConfig: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
consolidation: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
overrideGhostMode: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
forceTrigger: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
consolidation?: boolean | undefined;
|
|
35
|
+
overrideGhostMode?: boolean | undefined;
|
|
36
|
+
forceTrigger?: boolean | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
consolidation?: boolean | undefined;
|
|
39
|
+
overrideGhostMode?: boolean | undefined;
|
|
40
|
+
forceTrigger?: boolean | undefined;
|
|
41
|
+
}>>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
finding: {
|
|
44
|
+
id: string;
|
|
45
|
+
uid: string;
|
|
46
|
+
kind: string;
|
|
47
|
+
score: number;
|
|
48
|
+
bucket: string;
|
|
49
|
+
};
|
|
50
|
+
flowSpec: {
|
|
51
|
+
id: string;
|
|
52
|
+
};
|
|
53
|
+
engagementConfig?: {
|
|
54
|
+
consolidation?: boolean | undefined;
|
|
55
|
+
overrideGhostMode?: boolean | undefined;
|
|
56
|
+
forceTrigger?: boolean | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
finding: {
|
|
60
|
+
id: string;
|
|
61
|
+
uid: string;
|
|
62
|
+
kind: string;
|
|
63
|
+
score: number;
|
|
64
|
+
bucket: string;
|
|
65
|
+
};
|
|
66
|
+
flowSpec: {
|
|
67
|
+
id: string;
|
|
68
|
+
};
|
|
69
|
+
engagementConfig?: {
|
|
70
|
+
consolidation?: boolean | undefined;
|
|
71
|
+
overrideGhostMode?: boolean | undefined;
|
|
72
|
+
forceTrigger?: boolean | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
export type EngagementMappingDto = z.infer<typeof _EngagementMappingDto>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._EngagementMappingDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports._EngagementMappingDto = zod_1.z.object({
|
|
6
|
+
finding: zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string(),
|
|
8
|
+
kind: zod_1.z.string(),
|
|
9
|
+
uid: zod_1.z.string(),
|
|
10
|
+
bucket: zod_1.z.string(),
|
|
11
|
+
score: zod_1.z.number(),
|
|
12
|
+
}),
|
|
13
|
+
flowSpec: zod_1.z.object({
|
|
14
|
+
id: zod_1.z.string(),
|
|
15
|
+
}),
|
|
16
|
+
engagementConfig: zod_1.z
|
|
17
|
+
.object({
|
|
18
|
+
consolidation: zod_1.z.boolean().optional(),
|
|
19
|
+
overrideGhostMode: zod_1.z.boolean().optional(),
|
|
20
|
+
forceTrigger: zod_1.z.boolean().optional(),
|
|
21
|
+
})
|
|
22
|
+
.optional(),
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=engagementMappings.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engagementMappings.dto.js","sourceRoot":"","sources":["../../../src/dto/engagementMappings.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAET,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;KAClB,CAAC;IACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;QACjB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;KACf,CAAC;IACF,gBAAgB,EAAE,OAAC;SAChB,MAAM,CAAC;QACN,aAAa,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QACrC,iBAAiB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QACzC,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
|
package/build/src/dto/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './defaultConnector.dto';
|
|
|
12
12
|
export * from './eng';
|
|
13
13
|
export * from './engagementContexts.dto';
|
|
14
14
|
export * from './engagementConversations.dto';
|
|
15
|
+
export * from './engagementMappings.dto';
|
|
15
16
|
export * from './entityIdSummaries.dto';
|
|
16
17
|
export * from './enum.dto';
|
|
17
18
|
export * from './enums';
|
package/build/src/dto/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __exportStar(require("./defaultConnector.dto"), exports);
|
|
|
28
28
|
__exportStar(require("./eng"), exports);
|
|
29
29
|
__exportStar(require("./engagementContexts.dto"), exports);
|
|
30
30
|
__exportStar(require("./engagementConversations.dto"), exports);
|
|
31
|
+
__exportStar(require("./engagementMappings.dto"), exports);
|
|
31
32
|
__exportStar(require("./entityIdSummaries.dto"), exports);
|
|
32
33
|
__exportStar(require("./enum.dto"), exports);
|
|
33
34
|
__exportStar(require("./enums"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,mDAAiC;AACjC,uDAAqC;AACrC,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,wCAAsB;AACtB,2DAAyC;AACzC,gEAA8C;AAC9C,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,yDAAuC;AACvC,8CAA4B;AAC5B,wCAAsB;AACtB,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B;AAC7B,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,mDAAiC;AACjC,uDAAqC;AACrC,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,wCAAsB;AACtB,2DAAyC;AACzC,gEAA8C;AAC9C,2DAAyC;AACzC,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,yDAAuC;AACvC,8CAA4B;AAC5B,wCAAsB;AACtB,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B;AAC7B,wDAAsC"}
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
var NotificationStatus;
|
|
7
7
|
(function (NotificationStatus) {
|
|
8
|
+
NotificationStatus["ERROR"] = "ERROR";
|
|
8
9
|
NotificationStatus["INVALID"] = "INVALID";
|
|
9
10
|
NotificationStatus["PENDING"] = "PENDING";
|
|
10
11
|
NotificationStatus["READ"] = "READ";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAA6D;AAE7D,IAAY,
|
|
1
|
+
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAA6D;AAE7D,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED,IAAY,uBAaX;AAbD,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,wEAAwE;IACxE,wCAAa,CAAA;IACb,sEAA2C,CAAA;IAC3C,4DAAiC,CAAA;IACjC,4CAAiB,CAAA;IACjB,2EAA2E;IAC3E,gDAAqB,CAAA;IACrB,kEAAuC,CAAA;IACvC,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
|
|
7
7
|
export * from './platform.engagementContexts.dto';
|
|
8
8
|
export * from './platform.engagementConversations.dto';
|
|
9
|
+
export * from './platform.engagementMappings.dto';
|
|
9
10
|
export * from './platform.findingsInsights.dto';
|
|
10
11
|
export * from './platform.findings.dto';
|
|
11
12
|
export * from './platform.flows.dto';
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./platform.customActions.dto"), exports);
|
|
|
22
22
|
__exportStar(require("./platform.customScores.dto"), exports);
|
|
23
23
|
__exportStar(require("./platform.engagementContexts.dto"), exports);
|
|
24
24
|
__exportStar(require("./platform.engagementConversations.dto"), exports);
|
|
25
|
+
__exportStar(require("./platform.engagementMappings.dto"), exports);
|
|
25
26
|
__exportStar(require("./platform.findingsInsights.dto"), exports);
|
|
26
27
|
__exportStar(require("./platform.findings.dto"), exports);
|
|
27
28
|
__exportStar(require("./platform.flows.dto"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,gEAA8C;AAC9C,+DAA6C;AAC7C,8DAA4C;AAC5C,oEAAkD;AAClD,yEAAuD;AACvD,kEAAgD;AAChD,0DAAwC;AACxC,uDAAqC;AACrC,mEAAiD;AACjD,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,6DAA2C;AAC3C,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC;AACnC,iEAA+C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,gEAA8C;AAC9C,+DAA6C;AAC7C,8DAA4C;AAC5C,oEAAkD;AAClD,yEAAuD;AACvD,oEAAkD;AAClD,kEAAgD;AAChD,0DAAwC;AACxC,uDAAqC;AACrC,mEAAiD;AACjD,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,6DAA2C;AAC3C,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC;AACnC,iEAA+C"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const _PlatformEngagementMappingDto: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
finding: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
kind: z.ZodString;
|
|
6
|
+
uid: z.ZodString;
|
|
7
|
+
bucket: z.ZodString;
|
|
8
|
+
score: z.ZodNumber;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
uid: string;
|
|
12
|
+
kind: string;
|
|
13
|
+
score: number;
|
|
14
|
+
bucket: string;
|
|
15
|
+
}, {
|
|
16
|
+
id: string;
|
|
17
|
+
uid: string;
|
|
18
|
+
kind: string;
|
|
19
|
+
score: number;
|
|
20
|
+
bucket: string;
|
|
21
|
+
}>;
|
|
22
|
+
flowSpec: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
id: string;
|
|
26
|
+
}, {
|
|
27
|
+
id: string;
|
|
28
|
+
}>;
|
|
29
|
+
engagementConfig: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
consolidation: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
overrideGhostMode: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
forceTrigger: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
consolidation?: boolean | undefined;
|
|
35
|
+
overrideGhostMode?: boolean | undefined;
|
|
36
|
+
forceTrigger?: boolean | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
consolidation?: boolean | undefined;
|
|
39
|
+
overrideGhostMode?: boolean | undefined;
|
|
40
|
+
forceTrigger?: boolean | undefined;
|
|
41
|
+
}>>;
|
|
42
|
+
}, {
|
|
43
|
+
tid: z.ZodString;
|
|
44
|
+
}>, "strip", z.ZodTypeAny, {
|
|
45
|
+
tid: string;
|
|
46
|
+
finding: {
|
|
47
|
+
id: string;
|
|
48
|
+
uid: string;
|
|
49
|
+
kind: string;
|
|
50
|
+
score: number;
|
|
51
|
+
bucket: string;
|
|
52
|
+
};
|
|
53
|
+
flowSpec: {
|
|
54
|
+
id: string;
|
|
55
|
+
};
|
|
56
|
+
engagementConfig?: {
|
|
57
|
+
consolidation?: boolean | undefined;
|
|
58
|
+
overrideGhostMode?: boolean | undefined;
|
|
59
|
+
forceTrigger?: boolean | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
tid: string;
|
|
63
|
+
finding: {
|
|
64
|
+
id: string;
|
|
65
|
+
uid: string;
|
|
66
|
+
kind: string;
|
|
67
|
+
score: number;
|
|
68
|
+
bucket: string;
|
|
69
|
+
};
|
|
70
|
+
flowSpec: {
|
|
71
|
+
id: string;
|
|
72
|
+
};
|
|
73
|
+
engagementConfig?: {
|
|
74
|
+
consolidation?: boolean | undefined;
|
|
75
|
+
overrideGhostMode?: boolean | undefined;
|
|
76
|
+
forceTrigger?: boolean | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
export type PlatformEngagementMappingDto = z.infer<typeof _PlatformEngagementMappingDto>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._PlatformEngagementMappingDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const engagementMappings_dto_1 = require("../engagementMappings.dto");
|
|
6
|
+
exports._PlatformEngagementMappingDto = engagementMappings_dto_1._EngagementMappingDto.extend({
|
|
7
|
+
tid: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=platform.engagementMappings.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.engagementMappings.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.engagementMappings.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,sEAAgE;AAEnD,QAAA,6BAA6B,GAAG,8CAAqB,CAAC,MAAM,CAAC;IACxE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC"}
|
|
@@ -399,12 +399,12 @@ export declare const _FlowsCountReport: z.ZodObject<{
|
|
|
399
399
|
total: z.ZodNumber;
|
|
400
400
|
}, "strip", z.ZodTypeAny, {
|
|
401
401
|
status: string;
|
|
402
|
-
total: number;
|
|
403
402
|
bucket: string;
|
|
403
|
+
total: number;
|
|
404
404
|
}, {
|
|
405
405
|
status: string;
|
|
406
|
-
total: number;
|
|
407
406
|
bucket: string;
|
|
407
|
+
total: number;
|
|
408
408
|
}>, "many">;
|
|
409
409
|
total: z.ZodObject<{
|
|
410
410
|
active: z.ZodNumber;
|
|
@@ -470,8 +470,8 @@ export declare const _FlowsCountReport: z.ZodObject<{
|
|
|
470
470
|
}[];
|
|
471
471
|
statesByBucketStatus: {
|
|
472
472
|
status: string;
|
|
473
|
-
total: number;
|
|
474
473
|
bucket: string;
|
|
474
|
+
total: number;
|
|
475
475
|
}[];
|
|
476
476
|
}, {
|
|
477
477
|
total: {
|
|
@@ -497,8 +497,8 @@ export declare const _FlowsCountReport: z.ZodObject<{
|
|
|
497
497
|
}[];
|
|
498
498
|
statesByBucketStatus: {
|
|
499
499
|
status: string;
|
|
500
|
-
total: number;
|
|
501
500
|
bucket: string;
|
|
501
|
+
total: number;
|
|
502
502
|
}[];
|
|
503
503
|
}>;
|
|
504
504
|
export type FlowsCountReport = z.infer<typeof _FlowsCountReport>;
|
|
@@ -893,12 +893,12 @@ export declare const _TenantCountReportDto: z.ZodObject<{
|
|
|
893
893
|
total: z.ZodNumber;
|
|
894
894
|
}, "strip", z.ZodTypeAny, {
|
|
895
895
|
status: string;
|
|
896
|
-
total: number;
|
|
897
896
|
bucket: string;
|
|
897
|
+
total: number;
|
|
898
898
|
}, {
|
|
899
899
|
status: string;
|
|
900
|
-
total: number;
|
|
901
900
|
bucket: string;
|
|
901
|
+
total: number;
|
|
902
902
|
}>, "many">;
|
|
903
903
|
total: z.ZodObject<{
|
|
904
904
|
active: z.ZodNumber;
|
|
@@ -964,8 +964,8 @@ export declare const _TenantCountReportDto: z.ZodObject<{
|
|
|
964
964
|
}[];
|
|
965
965
|
statesByBucketStatus: {
|
|
966
966
|
status: string;
|
|
967
|
-
total: number;
|
|
968
967
|
bucket: string;
|
|
968
|
+
total: number;
|
|
969
969
|
}[];
|
|
970
970
|
}, {
|
|
971
971
|
total: {
|
|
@@ -991,8 +991,8 @@ export declare const _TenantCountReportDto: z.ZodObject<{
|
|
|
991
991
|
}[];
|
|
992
992
|
statesByBucketStatus: {
|
|
993
993
|
status: string;
|
|
994
|
-
total: number;
|
|
995
994
|
bucket: string;
|
|
995
|
+
total: number;
|
|
996
996
|
}[];
|
|
997
997
|
}>;
|
|
998
998
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1110,8 +1110,8 @@ export declare const _TenantCountReportDto: z.ZodObject<{
|
|
|
1110
1110
|
}[];
|
|
1111
1111
|
statesByBucketStatus: {
|
|
1112
1112
|
status: string;
|
|
1113
|
-
total: number;
|
|
1114
1113
|
bucket: string;
|
|
1114
|
+
total: number;
|
|
1115
1115
|
}[];
|
|
1116
1116
|
};
|
|
1117
1117
|
}, {
|
|
@@ -1229,8 +1229,8 @@ export declare const _TenantCountReportDto: z.ZodObject<{
|
|
|
1229
1229
|
}[];
|
|
1230
1230
|
statesByBucketStatus: {
|
|
1231
1231
|
status: string;
|
|
1232
|
-
total: number;
|
|
1233
1232
|
bucket: string;
|
|
1233
|
+
total: number;
|
|
1234
1234
|
}[];
|
|
1235
1235
|
};
|
|
1236
1236
|
}>;
|
|
@@ -10,6 +10,7 @@ import { PlatformConnectorService } from './connector.platform.service';
|
|
|
10
10
|
import { PlatformAgentService } from './AgentsService';
|
|
11
11
|
import { TenantsService } from './rest/TenantsService';
|
|
12
12
|
import { FindingsService } from './findings.service';
|
|
13
|
+
import { EngagementService } from './engagements.service';
|
|
13
14
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
14
15
|
/**
|
|
15
16
|
* AMP API
|
|
@@ -30,6 +31,7 @@ export declare class AmpSdkServices {
|
|
|
30
31
|
readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
|
|
31
32
|
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
32
33
|
readonly customScoreValues: AmpEntityService<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>;
|
|
34
|
+
readonly engagements: EngagementService;
|
|
33
35
|
readonly enums: EnumService;
|
|
34
36
|
readonly findings: FindingsService;
|
|
35
37
|
readonly findingSpecs: AmpSaaSEntityService<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>;
|
|
@@ -13,6 +13,7 @@ const connector_platform_service_1 = require("./connector.platform.service");
|
|
|
13
13
|
const AgentsService_1 = require("./AgentsService");
|
|
14
14
|
const TenantsService_1 = require("./rest/TenantsService");
|
|
15
15
|
const findings_service_1 = require("./findings.service");
|
|
16
|
+
const engagements_service_1 = require("./engagements.service");
|
|
16
17
|
/**
|
|
17
18
|
* AMP API
|
|
18
19
|
* This client is a wrapper around the AMP REST API meant to be used by
|
|
@@ -33,6 +34,7 @@ class AmpSdkServices {
|
|
|
33
34
|
this.customActions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_ACTIONS, constants_1.TARGET_API_PLATFORM);
|
|
34
35
|
this.customScoreCohorts = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_COHORTS, constants_1.TARGET_API_PLATFORM);
|
|
35
36
|
this.customScoreValues = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_VALUES, constants_1.TARGET_API_PLATFORM);
|
|
37
|
+
this.engagements = new engagements_service_1.EngagementService(rest, constants_1.TARGET_API_PLATFORM);
|
|
36
38
|
this.enums = new EnumService_1.DefaultEnumService(rest, constants_1.TARGET_API_PLATFORM);
|
|
37
39
|
this.findings = new findings_service_1.FindingsService(rest, constants_1.TARGET_API_PLATFORM);
|
|
38
40
|
this.findingSpecs = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FINDING_SPECS, constants_1.TARGET_API_PLATFORM);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;AAwCA,qDAS0B;AAC1B,iCAA0E;AAC1E,2CAAsD;AACtD,oDAAmE;AACnE,yDAAyD;AACzD,6DAA+J;AAC/J,6DAAuD;AACvD,yEAAmE;AACnE,6EAAsE;AACtE,mDAAqD;AACrD,0DAAqD;AACrD,yDAAmD;
|
|
1
|
+
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;AAwCA,qDAS0B;AAC1B,iCAA0E;AAC1E,2CAAsD;AACtD,oDAAmE;AACnE,yDAAyD;AACzD,6DAA+J;AAC/J,6DAAuD;AACvD,yEAAmE;AACnE,6EAAsE;AACtE,mDAAqD;AACrD,0DAAqD;AACrD,yDAAmD;AACnD,+DAAwD;AAIxD;;;;;;;;GAQG;AACH,MAAa,cAAc;IAmCzB,YAAY,IAAgB;QA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IAAI,CAAC,gBAAgB,GAAG,IAAI,gDAA+B,CAA+D,IAAI,EAAE,gBAAI,CAAC,kBAAkB,EAAE,+BAAmB,CAAC,CAAC;QAC9K,IAAI,CAAC,oBAAoB,GAAG,IAAI,gDAA+B,CAC7D,IAAI,EACJ,gBAAI,CAAC,sBAAsB,EAC3B,+BAAmB,CACpB,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,gDAA+B,CAA6D,IAAI,EAAE,gBAAI,CAAC,iBAAiB,EAAE,+BAAmB,CAAC,CAAC;QAE1K,IAAI,CAAC,QAAQ,GAAG,IAAI,wCAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAI,+BAAc,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,mCAAkB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QACrE,IAAI,CAAC,MAAM,GAAG,IAAI,qCAAoB,CAA2C,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;QACzH,IAAI,CAAC,KAAK,GAAG,IAAI,kCAAiB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,OAAsB;QACpC,MAAM,IAAI,GAAG,IAAA,uBAAgB,EAAC,OAAO,CAAC,CAAC;QACvC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AAhFD,wCAgFC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { RestClient } from './rest';
|
|
2
2
|
import { TargetApi } from './constants';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { Page, PlatformEngagementMappingDto } from '../dto';
|
|
4
5
|
declare const _TriggerRequest: z.ZodObject<{
|
|
5
6
|
fids: z.ZodArray<z.ZodString, "many">;
|
|
6
7
|
allowDuplicates: z.ZodDefault<z.ZodBoolean>;
|
|
7
8
|
overrideGhostMode: z.ZodDefault<z.ZodBoolean>;
|
|
8
9
|
forceTrigger: z.ZodDefault<z.ZodBoolean>;
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
fids: string[];
|
|
11
|
-
allowDuplicates: boolean;
|
|
12
11
|
overrideGhostMode: boolean;
|
|
13
12
|
forceTrigger: boolean;
|
|
13
|
+
fids: string[];
|
|
14
|
+
allowDuplicates: boolean;
|
|
14
15
|
}, {
|
|
15
16
|
fids: string[];
|
|
16
|
-
allowDuplicates?: boolean | undefined;
|
|
17
17
|
overrideGhostMode?: boolean | undefined;
|
|
18
18
|
forceTrigger?: boolean | undefined;
|
|
19
|
+
allowDuplicates?: boolean | undefined;
|
|
19
20
|
}>;
|
|
20
21
|
type TriggerRequest = z.infer<typeof _TriggerRequest>;
|
|
21
22
|
type EngagementMessage = {
|
|
@@ -27,5 +28,19 @@ export declare class EngagementService {
|
|
|
27
28
|
protected readonly targetApi: string;
|
|
28
29
|
constructor(rest: RestClient, targetApi?: TargetApi);
|
|
29
30
|
trigger: (triggerRequest: TriggerRequest) => Promise<EngagementMessage>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a page of pending engagement mappings scoped to a tenant.
|
|
33
|
+
* The page will contain engagement mappings that are
|
|
34
|
+
* - pending to be engaged.
|
|
35
|
+
* - 'OPEN' status
|
|
36
|
+
*
|
|
37
|
+
* @param tid tenant id
|
|
38
|
+
* @param consolidation flag to determine if the response should be consolidated engagement mappings
|
|
39
|
+
* @param keepOpenThresholdMs Optional threshold in milliseconds to keep the engagement mapping open
|
|
40
|
+
* @param offset Optional offset for pagination. Default 0
|
|
41
|
+
* @param limit Optional limit for pagination. Default 50
|
|
42
|
+
* @returns Page of PlatformEngagementMappingDto scoped to a tenant.
|
|
43
|
+
*/
|
|
44
|
+
getPendingEngagementMappings(tid: string, consolidation: boolean, keepOpenThresholdMs?: number, offset?: number, limit?: number): Promise<Page<PlatformEngagementMappingDto>>;
|
|
30
45
|
}
|
|
31
46
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EngagementService = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
4
5
|
const zod_1 = require("zod");
|
|
6
|
+
const dto_1 = require("../dto");
|
|
5
7
|
const _TriggerRequest = zod_1.z.object({
|
|
6
8
|
fids: zod_1.z.array(zod_1.z.string()),
|
|
7
9
|
allowDuplicates: zod_1.z.boolean().default(true),
|
|
@@ -22,6 +24,37 @@ class EngagementService {
|
|
|
22
24
|
this.rest = rest;
|
|
23
25
|
this.targetApi = targetApi;
|
|
24
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns a page of pending engagement mappings scoped to a tenant.
|
|
29
|
+
* The page will contain engagement mappings that are
|
|
30
|
+
* - pending to be engaged.
|
|
31
|
+
* - 'OPEN' status
|
|
32
|
+
*
|
|
33
|
+
* @param tid tenant id
|
|
34
|
+
* @param consolidation flag to determine if the response should be consolidated engagement mappings
|
|
35
|
+
* @param keepOpenThresholdMs Optional threshold in milliseconds to keep the engagement mapping open
|
|
36
|
+
* @param offset Optional offset for pagination. Default 0
|
|
37
|
+
* @param limit Optional limit for pagination. Default 50
|
|
38
|
+
* @returns Page of PlatformEngagementMappingDto scoped to a tenant.
|
|
39
|
+
*/
|
|
40
|
+
async getPendingEngagementMappings(tid, consolidation, keepOpenThresholdMs, offset = 0, limit = 50) {
|
|
41
|
+
if (this.targetApi !== constants_1.TARGET_API_PLATFORM) {
|
|
42
|
+
throw new Error(`This method is only available for the ${constants_1.TARGET_API_PLATFORM} target API`);
|
|
43
|
+
}
|
|
44
|
+
const url = `/${this.targetApi}/v1/engagements/pending`;
|
|
45
|
+
const res = await this.rest.call({
|
|
46
|
+
url,
|
|
47
|
+
method: 'GET',
|
|
48
|
+
params: {
|
|
49
|
+
tid,
|
|
50
|
+
consolidation,
|
|
51
|
+
keepOpenThresholdMs,
|
|
52
|
+
limit,
|
|
53
|
+
offset,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
return (0, dto_1.toTypedPage)(dto_1._PlatformEngagementMappingDto, res.data);
|
|
57
|
+
}
|
|
25
58
|
}
|
|
26
59
|
exports.EngagementService = EngagementService;
|
|
27
60
|
//# sourceMappingURL=engagements.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engagements.service.js","sourceRoot":"","sources":["../../../src/services/engagements.service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"engagements.service.js","sourceRoot":"","sources":["../../../src/services/engagements.service.ts"],"names":[],"mappings":";;;AAEA,2CAA2D;AAC3D,6BAAsB;AACtB,gCAAsG;AAEtG,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IACzB,eAAe,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1C,iBAAiB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC7C,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACzC,CAAC,CAAC;AASH,MAAa,iBAAiB;IAG5B,YAAY,IAAgB,EAAE,YAAuB,KAAK;QAK1D,YAAO,GAAG,KAAK,EAAE,cAA8B,EAA8B,EAAE;YAC7E,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,yBAAyB;gBAC/C,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,cAAc;aACrB,CAAC,CAAC;YAEH,MAAM,OAAO,GAAG,GAAG,CAAC,IAAyB,CAAC;YAC9C,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC;QAbA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAaD;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,4BAA4B,CAAC,GAAW,EAAE,aAAsB,EAAE,mBAA4B,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE;QAC1H,IAAI,IAAI,CAAC,SAAS,KAAK,+BAAmB,EAAE,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,yCAAyC,+BAAmB,aAAa,CAAC,CAAC;QAC7F,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,yBAAyB,CAAC;QACxD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC/B,GAAG;YACH,MAAM,EAAE,KAAK;YACb,MAAM,EAAE;gBACN,GAAG;gBACH,aAAa;gBACb,mBAAmB;gBACnB,KAAK;gBACL,MAAM;aACP;SACF,CAAC,CAAC;QACH,OAAO,IAAA,iBAAW,EAAC,mCAA6B,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF;AAlDD,8CAkDC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
|
|
3
|
+
export const _EngagementMappingDto = z.object({
|
|
4
|
+
finding: z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
kind: z.string(),
|
|
7
|
+
uid: z.string(),
|
|
8
|
+
bucket: z.string(),
|
|
9
|
+
score: z.number(),
|
|
10
|
+
}),
|
|
11
|
+
flowSpec: z.object({
|
|
12
|
+
id: z.string(),
|
|
13
|
+
}),
|
|
14
|
+
engagementConfig: z
|
|
15
|
+
.object({
|
|
16
|
+
consolidation: z.boolean().optional(),
|
|
17
|
+
overrideGhostMode: z.boolean().optional(),
|
|
18
|
+
forceTrigger: z.boolean().optional(),
|
|
19
|
+
})
|
|
20
|
+
.optional(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export type EngagementMappingDto = z.infer<typeof _EngagementMappingDto>;
|
package/src/dto/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './defaultConnector.dto';
|
|
|
12
12
|
export * from './eng';
|
|
13
13
|
export * from './engagementContexts.dto';
|
|
14
14
|
export * from './engagementConversations.dto';
|
|
15
|
+
export * from './engagementMappings.dto';
|
|
15
16
|
export * from './entityIdSummaries.dto';
|
|
16
17
|
export * from './enum.dto';
|
|
17
18
|
export * from './enums';
|
|
@@ -6,6 +6,7 @@ export * from './platform.customActions.dto';
|
|
|
6
6
|
export * from './platform.customScores.dto';
|
|
7
7
|
export * from './platform.engagementContexts.dto';
|
|
8
8
|
export * from './platform.engagementConversations.dto';
|
|
9
|
+
export * from './platform.engagementMappings.dto';
|
|
9
10
|
export * from './platform.findingsInsights.dto';
|
|
10
11
|
export * from './platform.findings.dto';
|
|
11
12
|
export * from './platform.flows.dto';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
import {_EngagementMappingDto} from '../engagementMappings.dto';
|
|
3
|
+
|
|
4
|
+
export const _PlatformEngagementMappingDto = _EngagementMappingDto.extend({
|
|
5
|
+
tid: z.string(),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export type PlatformEngagementMappingDto = z.infer<typeof _PlatformEngagementMappingDto>;
|
package/src/services/AmpSdk.ts
CHANGED
|
@@ -59,6 +59,7 @@ import {PlatformConnectorService} from './connector.platform.service';
|
|
|
59
59
|
import {PlatformAgentService} from './AgentsService';
|
|
60
60
|
import {TenantsService} from './rest/TenantsService';
|
|
61
61
|
import {FindingsService} from './findings.service';
|
|
62
|
+
import {EngagementService} from './engagements.service';
|
|
62
63
|
|
|
63
64
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
64
65
|
|
|
@@ -81,6 +82,7 @@ export class AmpSdkServices {
|
|
|
81
82
|
readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
|
|
82
83
|
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
83
84
|
readonly customScoreValues: AmpEntityService<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>;
|
|
85
|
+
readonly engagements: EngagementService;
|
|
84
86
|
readonly enums: EnumService;
|
|
85
87
|
readonly findings: FindingsService;
|
|
86
88
|
readonly findingSpecs: AmpSaaSEntityService<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>;
|
|
@@ -115,6 +117,7 @@ export class AmpSdkServices {
|
|
|
115
117
|
this.customActions = new AmpEntityServiceImpl<PlatformCustomActionUpsertDto, PlatformCustomActionDto>(rest, KIND.CUSTOM_ACTIONS, TARGET_API_PLATFORM);
|
|
116
118
|
this.customScoreCohorts = new AmpEntityServiceImpl<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>(rest, KIND.CUSTOM_SCORE_COHORTS, TARGET_API_PLATFORM);
|
|
117
119
|
this.customScoreValues = new AmpEntityServiceImpl<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>(rest, KIND.CUSTOM_SCORE_VALUES, TARGET_API_PLATFORM);
|
|
120
|
+
this.engagements = new EngagementService(rest, TARGET_API_PLATFORM);
|
|
118
121
|
this.enums = new DefaultEnumService(rest, TARGET_API_PLATFORM);
|
|
119
122
|
this.findings = new FindingsService(rest, TARGET_API_PLATFORM);
|
|
120
123
|
this.findingSpecs = new AmpSaaSEntityServiceImpl<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>(rest, KIND.FINDING_SPECS, TARGET_API_PLATFORM);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import {RestClient} from './rest';
|
|
3
|
-
import {TargetApi} from './constants';
|
|
3
|
+
import {TARGET_API_PLATFORM, TargetApi} from './constants';
|
|
4
4
|
import {z} from 'zod';
|
|
5
|
+
import {_PlatformEngagementMappingDto, Page, PlatformEngagementMappingDto, toTypedPage} from '../dto';
|
|
5
6
|
|
|
6
7
|
const _TriggerRequest = z.object({
|
|
7
8
|
fids: z.array(z.string()),
|
|
@@ -35,4 +36,36 @@ export class EngagementService {
|
|
|
35
36
|
const message = res.data as EngagementMessage;
|
|
36
37
|
return message;
|
|
37
38
|
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Returns a page of pending engagement mappings scoped to a tenant.
|
|
42
|
+
* The page will contain engagement mappings that are
|
|
43
|
+
* - pending to be engaged.
|
|
44
|
+
* - 'OPEN' status
|
|
45
|
+
*
|
|
46
|
+
* @param tid tenant id
|
|
47
|
+
* @param consolidation flag to determine if the response should be consolidated engagement mappings
|
|
48
|
+
* @param keepOpenThresholdMs Optional threshold in milliseconds to keep the engagement mapping open
|
|
49
|
+
* @param offset Optional offset for pagination. Default 0
|
|
50
|
+
* @param limit Optional limit for pagination. Default 50
|
|
51
|
+
* @returns Page of PlatformEngagementMappingDto scoped to a tenant.
|
|
52
|
+
*/
|
|
53
|
+
async getPendingEngagementMappings(tid: string, consolidation: boolean, keepOpenThresholdMs?: number, offset = 0, limit = 50): Promise<Page<PlatformEngagementMappingDto>> {
|
|
54
|
+
if (this.targetApi !== TARGET_API_PLATFORM) {
|
|
55
|
+
throw new Error(`This method is only available for the ${TARGET_API_PLATFORM} target API`);
|
|
56
|
+
}
|
|
57
|
+
const url = `/${this.targetApi}/v1/engagements/pending`;
|
|
58
|
+
const res = await this.rest.call({
|
|
59
|
+
url,
|
|
60
|
+
method: 'GET',
|
|
61
|
+
params: {
|
|
62
|
+
tid,
|
|
63
|
+
consolidation,
|
|
64
|
+
keepOpenThresholdMs,
|
|
65
|
+
limit,
|
|
66
|
+
offset,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
return toTypedPage(_PlatformEngagementMappingDto, res.data);
|
|
70
|
+
}
|
|
38
71
|
}
|