@ampsec/platform-client 71.1.0 → 72.1.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.
Files changed (54) hide show
  1. package/build/src/dto/engagementContexts.dto.d.ts +55 -0
  2. package/build/src/dto/engagementContexts.dto.js +13 -0
  3. package/build/src/dto/engagementContexts.dto.js.map +1 -0
  4. package/build/src/dto/engagementConversations.dto.d.ts +126 -0
  5. package/build/src/dto/engagementConversations.dto.js +33 -0
  6. package/build/src/dto/engagementConversations.dto.js.map +1 -0
  7. package/build/src/dto/enums/engagementChannelKind.d.ts +4 -0
  8. package/build/src/dto/enums/engagementChannelKind.js +9 -0
  9. package/build/src/dto/enums/engagementChannelKind.js.map +1 -0
  10. package/build/src/dto/enums/index.d.ts +1 -0
  11. package/build/src/dto/enums/index.js +1 -0
  12. package/build/src/dto/enums/index.js.map +1 -1
  13. package/build/src/dto/index.d.ts +2 -0
  14. package/build/src/dto/index.js +2 -0
  15. package/build/src/dto/index.js.map +1 -1
  16. package/build/src/dto/notification.dto.d.ts +2 -2
  17. package/build/src/dto/platform/index.d.ts +2 -0
  18. package/build/src/dto/platform/index.js +2 -0
  19. package/build/src/dto/platform/index.js.map +1 -1
  20. package/build/src/dto/platform/platform.engagementContexts.dto.d.ts +62 -0
  21. package/build/src/dto/platform/platform.engagementContexts.dto.js +12 -0
  22. package/build/src/dto/platform/platform.engagementContexts.dto.js.map +1 -0
  23. package/build/src/dto/platform/platform.engagementConversations.dto.d.ts +60 -0
  24. package/build/src/dto/platform/platform.engagementConversations.dto.js +12 -0
  25. package/build/src/dto/platform/platform.engagementConversations.dto.js.map +1 -0
  26. package/build/src/dto/tenants.dto.d.ts +58 -4
  27. package/build/src/dto/tenants.dto.js +23 -0
  28. package/build/src/dto/tenants.dto.js.map +1 -1
  29. package/build/src/services/EngageApi.d.ts +5 -2
  30. package/build/src/services/EngageApi.js +5 -2
  31. package/build/src/services/EngageApi.js.map +1 -1
  32. package/build/src/services/constants.d.ts +1 -0
  33. package/build/src/services/constants.js +1 -0
  34. package/build/src/services/constants.js.map +1 -1
  35. package/build/src/services/engagementConversations.service.d.ts +12 -0
  36. package/build/src/services/engagementConversations.service.js +47 -0
  37. package/build/src/services/engagementConversations.service.js.map +1 -0
  38. package/build/src/services/rest/TenantsService.d.ts +2 -1
  39. package/build/src/services/rest/TenantsService.js +10 -0
  40. package/build/src/services/rest/TenantsService.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/dto/engagementContexts.dto.ts +15 -0
  43. package/src/dto/engagementConversations.dto.ts +41 -0
  44. package/src/dto/enums/engagementChannelKind.ts +4 -0
  45. package/src/dto/enums/index.ts +1 -0
  46. package/src/dto/index.ts +2 -0
  47. package/src/dto/platform/index.ts +2 -0
  48. package/src/dto/platform/platform.engagementContexts.dto.ts +14 -0
  49. package/src/dto/platform/platform.engagementConversations.dto.ts +14 -0
  50. package/src/dto/tenants.dto.ts +25 -5
  51. package/src/services/EngageApi.ts +6 -2
  52. package/src/services/constants.ts +1 -0
  53. package/src/services/engagementConversations.service.ts +53 -0
  54. package/src/services/rest/TenantsService.ts +12 -1
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ import { EngagementChannelKind } from './enums/engagementChannelKind';
3
+ export declare const _EngagementContextDto: z.ZodObject<z.objectUtil.extendShape<{
4
+ id: z.ZodString;
5
+ createdAt: z.ZodString;
6
+ updatedAt: z.ZodString;
7
+ deletedAt: z.ZodNullable<z.ZodString>;
8
+ }, {
9
+ contextKey: z.ZodString;
10
+ channel: z.ZodNativeEnum<typeof EngagementChannelKind>;
11
+ conversationId: z.ZodOptional<z.ZodString>;
12
+ }>, "strip", z.ZodTypeAny, {
13
+ id: string;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ deletedAt: string | null;
17
+ contextKey: string;
18
+ channel: EngagementChannelKind;
19
+ conversationId?: string | undefined;
20
+ }, {
21
+ id: string;
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ deletedAt: string | null;
25
+ contextKey: string;
26
+ channel: EngagementChannelKind;
27
+ conversationId?: string | undefined;
28
+ }>;
29
+ export declare const _EngagementContextUpsertDto: z.ZodObject<{
30
+ id: z.ZodOptional<z.ZodString>;
31
+ createdAt: z.ZodOptional<z.ZodString>;
32
+ updatedAt: z.ZodOptional<z.ZodString>;
33
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ contextKey: z.ZodString;
35
+ channel: z.ZodNativeEnum<typeof EngagementChannelKind>;
36
+ conversationId: z.ZodOptional<z.ZodString>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ contextKey: string;
39
+ channel: EngagementChannelKind;
40
+ id?: string | undefined;
41
+ createdAt?: string | undefined;
42
+ updatedAt?: string | undefined;
43
+ deletedAt?: string | null | undefined;
44
+ conversationId?: string | undefined;
45
+ }, {
46
+ contextKey: string;
47
+ channel: EngagementChannelKind;
48
+ id?: string | undefined;
49
+ createdAt?: string | undefined;
50
+ updatedAt?: string | undefined;
51
+ deletedAt?: string | null | undefined;
52
+ conversationId?: string | undefined;
53
+ }>;
54
+ export type EngagementContextDto = z.infer<typeof _EngagementContextDto>;
55
+ export type EngagementUpsertContextDto = z.infer<typeof _EngagementContextUpsertDto>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._EngagementContextUpsertDto = exports._EngagementContextDto = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_dto_1 = require("./base.dto");
6
+ const engagementChannelKind_1 = require("./enums/engagementChannelKind");
7
+ exports._EngagementContextDto = base_dto_1._BaseDto.extend({
8
+ contextKey: zod_1.z.string(),
9
+ channel: zod_1.z.nativeEnum(engagementChannelKind_1.EngagementChannelKind),
10
+ conversationId: zod_1.z.string().optional(),
11
+ });
12
+ exports._EngagementContextUpsertDto = exports._EngagementContextDto.partial(base_dto_1.UPSERT_DTO_MASK);
13
+ //# sourceMappingURL=engagementContexts.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engagementContexts.dto.js","sourceRoot":"","sources":["../../../src/dto/engagementContexts.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAqD;AACrD,yEAAoE;AAEvD,QAAA,qBAAqB,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACnD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,OAAO,EAAE,OAAC,CAAC,UAAU,CAAC,6CAAqB,CAAC;IAC5C,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,6BAAqB,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC"}
@@ -0,0 +1,126 @@
1
+ import { z } from 'zod';
2
+ import { EngagementChannelKind } from './enums';
3
+ export declare enum ENGAGEMENT_DIALOGUE_SPEAKER {
4
+ USER = "USER",
5
+ BOT = "BOT"
6
+ }
7
+ export declare enum ENGAGEMENT_DIALOGUE_STATUS {
8
+ FINISHED = "FINISHED",
9
+ IN_PROGRESS = "IN_PROGRESS"
10
+ }
11
+ export declare const _EngagementDialogueDto: z.ZodObject<z.objectUtil.extendShape<{
12
+ id: z.ZodString;
13
+ createdAt: z.ZodString;
14
+ updatedAt: z.ZodString;
15
+ deletedAt: z.ZodNullable<z.ZodString>;
16
+ }, {
17
+ conversationId: z.ZodString;
18
+ speaker: z.ZodNativeEnum<typeof ENGAGEMENT_DIALOGUE_SPEAKER>;
19
+ status: z.ZodNativeEnum<typeof ENGAGEMENT_DIALOGUE_STATUS>;
20
+ content: z.ZodOptional<z.ZodString>;
21
+ timestamp: z.ZodOptional<z.ZodDate>;
22
+ }>, "strip", z.ZodTypeAny, {
23
+ status: ENGAGEMENT_DIALOGUE_STATUS;
24
+ id: string;
25
+ createdAt: string;
26
+ updatedAt: string;
27
+ deletedAt: string | null;
28
+ conversationId: string;
29
+ speaker: ENGAGEMENT_DIALOGUE_SPEAKER;
30
+ content?: string | undefined;
31
+ timestamp?: Date | undefined;
32
+ }, {
33
+ status: ENGAGEMENT_DIALOGUE_STATUS;
34
+ id: string;
35
+ createdAt: string;
36
+ updatedAt: string;
37
+ deletedAt: string | null;
38
+ conversationId: string;
39
+ speaker: ENGAGEMENT_DIALOGUE_SPEAKER;
40
+ content?: string | undefined;
41
+ timestamp?: Date | undefined;
42
+ }>;
43
+ export declare const _EngagementConversationDto: z.ZodObject<z.objectUtil.extendShape<{
44
+ id: z.ZodString;
45
+ createdAt: z.ZodString;
46
+ updatedAt: z.ZodString;
47
+ deletedAt: z.ZodNullable<z.ZodString>;
48
+ }, {
49
+ dialogueIds: z.ZodArray<z.ZodString, "many">;
50
+ }>, "strip", z.ZodTypeAny, {
51
+ id: string;
52
+ createdAt: string;
53
+ updatedAt: string;
54
+ deletedAt: string | null;
55
+ dialogueIds: string[];
56
+ }, {
57
+ id: string;
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ deletedAt: string | null;
61
+ dialogueIds: string[];
62
+ }>;
63
+ export declare const _EngagementDialogueUpsertDto: z.ZodObject<{
64
+ status: z.ZodNativeEnum<typeof ENGAGEMENT_DIALOGUE_STATUS>;
65
+ id: z.ZodOptional<z.ZodString>;
66
+ createdAt: z.ZodOptional<z.ZodString>;
67
+ updatedAt: z.ZodOptional<z.ZodString>;
68
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ conversationId: z.ZodString;
70
+ speaker: z.ZodNativeEnum<typeof ENGAGEMENT_DIALOGUE_SPEAKER>;
71
+ content: z.ZodOptional<z.ZodString>;
72
+ timestamp: z.ZodOptional<z.ZodDate>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ status: ENGAGEMENT_DIALOGUE_STATUS;
75
+ conversationId: string;
76
+ speaker: ENGAGEMENT_DIALOGUE_SPEAKER;
77
+ id?: string | undefined;
78
+ createdAt?: string | undefined;
79
+ updatedAt?: string | undefined;
80
+ deletedAt?: string | null | undefined;
81
+ content?: string | undefined;
82
+ timestamp?: Date | undefined;
83
+ }, {
84
+ status: ENGAGEMENT_DIALOGUE_STATUS;
85
+ conversationId: string;
86
+ speaker: ENGAGEMENT_DIALOGUE_SPEAKER;
87
+ id?: string | undefined;
88
+ createdAt?: string | undefined;
89
+ updatedAt?: string | undefined;
90
+ deletedAt?: string | null | undefined;
91
+ content?: string | undefined;
92
+ timestamp?: Date | undefined;
93
+ }>;
94
+ export declare const _EngagementConversationUpsertDto: z.ZodObject<z.objectUtil.extendShape<{
95
+ id: z.ZodOptional<z.ZodString>;
96
+ createdAt: z.ZodOptional<z.ZodString>;
97
+ updatedAt: z.ZodOptional<z.ZodString>;
98
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ dialogueIds: z.ZodArray<z.ZodString, "many">;
100
+ }, {
101
+ engagementChannel: z.ZodNativeEnum<typeof EngagementChannelKind>;
102
+ fid: z.ZodOptional<z.ZodString>;
103
+ contextKey: z.ZodOptional<z.ZodString>;
104
+ }>, "strip", z.ZodTypeAny, {
105
+ dialogueIds: string[];
106
+ engagementChannel: EngagementChannelKind;
107
+ id?: string | undefined;
108
+ createdAt?: string | undefined;
109
+ updatedAt?: string | undefined;
110
+ deletedAt?: string | null | undefined;
111
+ fid?: string | undefined;
112
+ contextKey?: string | undefined;
113
+ }, {
114
+ dialogueIds: string[];
115
+ engagementChannel: EngagementChannelKind;
116
+ id?: string | undefined;
117
+ createdAt?: string | undefined;
118
+ updatedAt?: string | undefined;
119
+ deletedAt?: string | null | undefined;
120
+ fid?: string | undefined;
121
+ contextKey?: string | undefined;
122
+ }>;
123
+ export type EngagementConversationDto = z.infer<typeof _EngagementConversationDto>;
124
+ export type EngagementConversationUpsertDto = z.infer<typeof _EngagementConversationUpsertDto>;
125
+ export type EngagementDialogueDto = z.infer<typeof _EngagementDialogueDto>;
126
+ export type EngagementDialogueUpsertDto = z.infer<typeof _EngagementDialogueUpsertDto>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._EngagementConversationUpsertDto = exports._EngagementDialogueUpsertDto = exports._EngagementConversationDto = exports._EngagementDialogueDto = exports.ENGAGEMENT_DIALOGUE_STATUS = exports.ENGAGEMENT_DIALOGUE_SPEAKER = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_dto_1 = require("./base.dto");
6
+ const enums_1 = require("./enums");
7
+ var ENGAGEMENT_DIALOGUE_SPEAKER;
8
+ (function (ENGAGEMENT_DIALOGUE_SPEAKER) {
9
+ ENGAGEMENT_DIALOGUE_SPEAKER["USER"] = "USER";
10
+ ENGAGEMENT_DIALOGUE_SPEAKER["BOT"] = "BOT";
11
+ })(ENGAGEMENT_DIALOGUE_SPEAKER || (exports.ENGAGEMENT_DIALOGUE_SPEAKER = ENGAGEMENT_DIALOGUE_SPEAKER = {}));
12
+ var ENGAGEMENT_DIALOGUE_STATUS;
13
+ (function (ENGAGEMENT_DIALOGUE_STATUS) {
14
+ ENGAGEMENT_DIALOGUE_STATUS["FINISHED"] = "FINISHED";
15
+ ENGAGEMENT_DIALOGUE_STATUS["IN_PROGRESS"] = "IN_PROGRESS";
16
+ })(ENGAGEMENT_DIALOGUE_STATUS || (exports.ENGAGEMENT_DIALOGUE_STATUS = ENGAGEMENT_DIALOGUE_STATUS = {}));
17
+ exports._EngagementDialogueDto = base_dto_1._BaseDto.extend({
18
+ conversationId: zod_1.z.string(),
19
+ speaker: zod_1.z.nativeEnum(ENGAGEMENT_DIALOGUE_SPEAKER),
20
+ status: zod_1.z.nativeEnum(ENGAGEMENT_DIALOGUE_STATUS),
21
+ content: zod_1.z.string().optional(),
22
+ timestamp: zod_1.z.date().optional(),
23
+ });
24
+ exports._EngagementConversationDto = base_dto_1._BaseDto.extend({
25
+ dialogueIds: zod_1.z.string().array(),
26
+ });
27
+ exports._EngagementDialogueUpsertDto = exports._EngagementDialogueDto.partial(base_dto_1.UPSERT_DTO_MASK);
28
+ exports._EngagementConversationUpsertDto = exports._EngagementConversationDto.partial(base_dto_1.UPSERT_DTO_MASK).extend({
29
+ engagementChannel: zod_1.z.nativeEnum(enums_1.EngagementChannelKind),
30
+ fid: zod_1.z.string().optional(),
31
+ contextKey: zod_1.z.string().optional(),
32
+ });
33
+ //# sourceMappingURL=engagementConversations.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engagementConversations.dto.js","sourceRoot":"","sources":["../../../src/dto/engagementConversations.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAqD;AACrD,mCAA8C;AAE9C,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC;AAED,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,mDAAqB,CAAA;IACrB,yDAA2B,CAAA;AAC7B,CAAC,EAHW,0BAA0B,0CAA1B,0BAA0B,QAGrC;AAEY,QAAA,sBAAsB,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACpD,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,OAAO,EAAE,OAAC,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAClD,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,0BAA0B,CAAC;IAChD,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEU,QAAA,0BAA0B,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACxD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;CAChC,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,8BAAsB,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC;AAE/E,QAAA,gCAAgC,GAAG,kCAA0B,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC,MAAM,CAAC;IACzG,iBAAiB,EAAE,OAAC,CAAC,UAAU,CAAC,6BAAqB,CAAC;IACtD,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare enum EngagementChannelKind {
2
+ SLACK = "SLACK",
3
+ CHROME_EXTENSION = "CHROME_EXTENSION"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EngagementChannelKind = void 0;
4
+ var EngagementChannelKind;
5
+ (function (EngagementChannelKind) {
6
+ EngagementChannelKind["SLACK"] = "SLACK";
7
+ EngagementChannelKind["CHROME_EXTENSION"] = "CHROME_EXTENSION";
8
+ })(EngagementChannelKind || (exports.EngagementChannelKind = EngagementChannelKind = {}));
9
+ //# sourceMappingURL=engagementChannelKind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engagementChannelKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/engagementChannelKind.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,8DAAqC,CAAA;AACvC,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC"}
@@ -6,6 +6,7 @@ export * from './category';
6
6
  export * from './computer.os.enum';
7
7
  export * from './connector.status';
8
8
  export * from './contact.type';
9
+ export * from './engagementChannelKind';
9
10
  export * from './findingBuckets';
10
11
  export * from './findingKind';
11
12
  export * from './findingSpecKind';
@@ -22,6 +22,7 @@ __exportStar(require("./category"), exports);
22
22
  __exportStar(require("./computer.os.enum"), exports);
23
23
  __exportStar(require("./connector.status"), exports);
24
24
  __exportStar(require("./contact.type"), exports);
25
+ __exportStar(require("./engagementChannelKind"), exports);
25
26
  __exportStar(require("./findingBuckets"), exports);
26
27
  __exportStar(require("./findingKind"), exports);
27
28
  __exportStar(require("./findingSpecKind"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,wDAAsC;AACtC,sDAAoC;AACpC,6CAA2B;AAC3B,qDAAmC;AACnC,qDAAmC;AACnC,iDAA+B;AAC/B,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,wDAAsC;AACtC,mDAAiC;AACjC,8DAA4C;AAC5C,yDAAuC;AACvC,sDAAoC;AACpC,uDAAqC;AACrC,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,wDAAsC;AACtC,sDAAoC;AACpC,6CAA2B;AAC3B,qDAAmC;AACnC,qDAAmC;AACnC,iDAA+B;AAC/B,0DAAwC;AACxC,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,wDAAsC;AACtC,mDAAiC;AACjC,8DAA4C;AAC5C,yDAAuC;AACvC,sDAAoC;AACpC,uDAAqC;AACrC,2DAAyC"}
@@ -9,6 +9,8 @@ export * from './customActions.dto';
9
9
  export * from './customScores.dto';
10
10
  export * from './defaultConnector.dto';
11
11
  export * from './eng';
12
+ export * from './engagementContexts.dto';
13
+ export * from './engagementConversations.dto';
12
14
  export * from './entityIdSummaries.dto';
13
15
  export * from './enum.dto';
14
16
  export * from './enums';
@@ -25,6 +25,8 @@ __exportStar(require("./customActions.dto"), exports);
25
25
  __exportStar(require("./customScores.dto"), exports);
26
26
  __exportStar(require("./defaultConnector.dto"), exports);
27
27
  __exportStar(require("./eng"), exports);
28
+ __exportStar(require("./engagementContexts.dto"), exports);
29
+ __exportStar(require("./engagementConversations.dto"), exports);
28
30
  __exportStar(require("./entityIdSummaries.dto"), exports);
29
31
  __exportStar(require("./enum.dto"), exports);
30
32
  __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,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,wCAAsB;AACtB,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,+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,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,+CAA6B;AAC7B,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B;AAC7B,wDAAsC"}
@@ -1544,6 +1544,7 @@ export declare const _CreateNotificationDto: z.ZodObject<z.objectUtil.extendShap
1544
1544
  options: {
1545
1545
  copySecOpsTeam?: boolean | undefined;
1546
1546
  };
1547
+ channel: DeliveryStrategyKind;
1547
1548
  content: {
1548
1549
  kind: ContentStrategyKind.RAW;
1549
1550
  content: string;
@@ -1551,7 +1552,6 @@ export declare const _CreateNotificationDto: z.ZodObject<z.objectUtil.extendShap
1551
1552
  subject?: string | undefined;
1552
1553
  flowContext?: Record<string, any> | undefined;
1553
1554
  };
1554
- channel: DeliveryStrategyKind;
1555
1555
  id?: string | undefined;
1556
1556
  uid?: string | undefined;
1557
1557
  createdAt?: string | undefined;
@@ -1569,6 +1569,7 @@ export declare const _CreateNotificationDto: z.ZodObject<z.objectUtil.extendShap
1569
1569
  options: {
1570
1570
  copySecOpsTeam?: boolean | undefined;
1571
1571
  };
1572
+ channel: DeliveryStrategyKind;
1572
1573
  content: {
1573
1574
  kind: ContentStrategyKind.RAW;
1574
1575
  content: string;
@@ -1576,7 +1577,6 @@ export declare const _CreateNotificationDto: z.ZodObject<z.objectUtil.extendShap
1576
1577
  subject?: string | undefined;
1577
1578
  flowContext?: Record<string, any> | undefined;
1578
1579
  };
1579
- channel: DeliveryStrategyKind;
1580
1580
  id?: string | undefined;
1581
1581
  uid?: string | undefined;
1582
1582
  createdAt?: string | undefined;
@@ -3,6 +3,8 @@ export * from './platform.assets.dto';
3
3
  export * from './platform.connectors.dto';
4
4
  export * from './platform.customActions.dto';
5
5
  export * from './platform.customScores.dto';
6
+ export * from './platform.engagementContexts.dto';
7
+ export * from './platform.engagementConversations.dto';
6
8
  export * from './platform.findingsInsights.dto';
7
9
  export * from './platform.findings.dto';
8
10
  export * from './platform.flows.dto';
@@ -19,6 +19,8 @@ __exportStar(require("./platform.assets.dto"), exports);
19
19
  __exportStar(require("./platform.connectors.dto"), exports);
20
20
  __exportStar(require("./platform.customActions.dto"), exports);
21
21
  __exportStar(require("./platform.customScores.dto"), exports);
22
+ __exportStar(require("./platform.engagementContexts.dto"), exports);
23
+ __exportStar(require("./platform.engagementConversations.dto"), exports);
22
24
  __exportStar(require("./platform.findingsInsights.dto"), exports);
23
25
  __exportStar(require("./platform.findings.dto"), exports);
24
26
  __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,+DAA6C;AAC7C,8DAA4C;AAC5C,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,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,+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,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC;AACnC,iEAA+C"}
@@ -0,0 +1,62 @@
1
+ import { z } from 'zod';
2
+ export declare const _PlatformEngagementContextUpsertDto: z.ZodObject<z.objectUtil.extendShape<{
3
+ id: z.ZodOptional<z.ZodString>;
4
+ createdAt: z.ZodOptional<z.ZodString>;
5
+ updatedAt: z.ZodOptional<z.ZodString>;
6
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ contextKey: z.ZodString;
8
+ channel: z.ZodNativeEnum<typeof import("..").EngagementChannelKind>;
9
+ conversationId: z.ZodOptional<z.ZodString>;
10
+ }, {
11
+ tid: z.ZodString;
12
+ }>, "strip", z.ZodTypeAny, {
13
+ tid: string;
14
+ contextKey: string;
15
+ channel: import("..").EngagementChannelKind;
16
+ id?: string | undefined;
17
+ createdAt?: string | undefined;
18
+ updatedAt?: string | undefined;
19
+ deletedAt?: string | null | undefined;
20
+ conversationId?: string | undefined;
21
+ }, {
22
+ tid: string;
23
+ contextKey: string;
24
+ channel: import("..").EngagementChannelKind;
25
+ id?: string | undefined;
26
+ createdAt?: string | undefined;
27
+ updatedAt?: string | undefined;
28
+ deletedAt?: string | null | undefined;
29
+ conversationId?: string | undefined;
30
+ }>;
31
+ export declare const _PlatformEngagementContextDto: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
32
+ id: z.ZodString;
33
+ createdAt: z.ZodString;
34
+ updatedAt: z.ZodString;
35
+ deletedAt: z.ZodNullable<z.ZodString>;
36
+ }, {
37
+ contextKey: z.ZodString;
38
+ channel: z.ZodNativeEnum<typeof import("..").EngagementChannelKind>;
39
+ conversationId: z.ZodOptional<z.ZodString>;
40
+ }>, {
41
+ tid: z.ZodString;
42
+ }>, "strip", z.ZodTypeAny, {
43
+ id: string;
44
+ tid: string;
45
+ createdAt: string;
46
+ updatedAt: string;
47
+ deletedAt: string | null;
48
+ contextKey: string;
49
+ channel: import("..").EngagementChannelKind;
50
+ conversationId?: string | undefined;
51
+ }, {
52
+ id: string;
53
+ tid: string;
54
+ createdAt: string;
55
+ updatedAt: string;
56
+ deletedAt: string | null;
57
+ contextKey: string;
58
+ channel: import("..").EngagementChannelKind;
59
+ conversationId?: string | undefined;
60
+ }>;
61
+ export type PlatformEngagementContextDto = z.infer<typeof _PlatformEngagementContextDto>;
62
+ export type PlatformEngagementContextUpsertDto = z.infer<typeof _PlatformEngagementContextUpsertDto>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._PlatformEngagementContextDto = exports._PlatformEngagementContextUpsertDto = void 0;
4
+ const zod_1 = require("zod");
5
+ const engagementContexts_dto_1 = require("../engagementContexts.dto");
6
+ exports._PlatformEngagementContextUpsertDto = engagementContexts_dto_1._EngagementContextUpsertDto.extend({
7
+ tid: zod_1.z.string(),
8
+ });
9
+ exports._PlatformEngagementContextDto = engagementContexts_dto_1._EngagementContextDto.extend({
10
+ tid: zod_1.z.string(),
11
+ });
12
+ //# sourceMappingURL=platform.engagementContexts.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.engagementContexts.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.engagementContexts.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,sEAA6F;AAEhF,QAAA,mCAAmC,GAAG,oDAA2B,CAAC,MAAM,CAAC;IACpF,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEU,QAAA,6BAA6B,GAAG,8CAAqB,CAAC,MAAM,CAAC;IACxE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { z } from 'zod';
2
+ export declare const _PlatformEngagementConversationUpsertDto: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
3
+ id: z.ZodOptional<z.ZodString>;
4
+ createdAt: z.ZodOptional<z.ZodString>;
5
+ updatedAt: z.ZodOptional<z.ZodString>;
6
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ dialogueIds: z.ZodArray<z.ZodString, "many">;
8
+ }, {
9
+ engagementChannel: z.ZodNativeEnum<typeof import("..").EngagementChannelKind>;
10
+ fid: z.ZodOptional<z.ZodString>;
11
+ contextKey: z.ZodOptional<z.ZodString>;
12
+ }>, {
13
+ tid: z.ZodString;
14
+ }>, "strip", z.ZodTypeAny, {
15
+ tid: string;
16
+ dialogueIds: string[];
17
+ engagementChannel: import("..").EngagementChannelKind;
18
+ id?: string | undefined;
19
+ createdAt?: string | undefined;
20
+ updatedAt?: string | undefined;
21
+ deletedAt?: string | null | undefined;
22
+ fid?: string | undefined;
23
+ contextKey?: string | undefined;
24
+ }, {
25
+ tid: string;
26
+ dialogueIds: string[];
27
+ engagementChannel: import("..").EngagementChannelKind;
28
+ id?: string | undefined;
29
+ createdAt?: string | undefined;
30
+ updatedAt?: string | undefined;
31
+ deletedAt?: string | null | undefined;
32
+ fid?: string | undefined;
33
+ contextKey?: string | undefined;
34
+ }>;
35
+ export declare const _PlatformEngagementConversationDto: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
36
+ id: z.ZodString;
37
+ createdAt: z.ZodString;
38
+ updatedAt: z.ZodString;
39
+ deletedAt: z.ZodNullable<z.ZodString>;
40
+ }, {
41
+ dialogueIds: z.ZodArray<z.ZodString, "many">;
42
+ }>, {
43
+ tid: z.ZodString;
44
+ }>, "strip", z.ZodTypeAny, {
45
+ id: string;
46
+ tid: string;
47
+ createdAt: string;
48
+ updatedAt: string;
49
+ deletedAt: string | null;
50
+ dialogueIds: string[];
51
+ }, {
52
+ id: string;
53
+ tid: string;
54
+ createdAt: string;
55
+ updatedAt: string;
56
+ deletedAt: string | null;
57
+ dialogueIds: string[];
58
+ }>;
59
+ export type PlatformEngagementConversationDto = z.infer<typeof _PlatformEngagementConversationDto>;
60
+ export type PlatformEngagementConversationUpsertDto = z.infer<typeof _PlatformEngagementConversationUpsertDto>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._PlatformEngagementConversationDto = exports._PlatformEngagementConversationUpsertDto = void 0;
4
+ const zod_1 = require("zod");
5
+ const engagementConversations_dto_1 = require("../engagementConversations.dto");
6
+ exports._PlatformEngagementConversationUpsertDto = engagementConversations_dto_1._EngagementConversationUpsertDto.extend({
7
+ tid: zod_1.z.string(),
8
+ });
9
+ exports._PlatformEngagementConversationDto = engagementConversations_dto_1._EngagementConversationDto.extend({
10
+ tid: zod_1.z.string(),
11
+ });
12
+ //# sourceMappingURL=platform.engagementConversations.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.engagementConversations.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.engagementConversations.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,gFAA4G;AAE/F,QAAA,wCAAwC,GAAG,8DAAgC,CAAC,MAAM,CAAC;IAC9F,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEU,QAAA,kCAAkC,GAAG,wDAA0B,CAAC,MAAM,CAAC;IAClF,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC"}
@@ -1,6 +1,60 @@
1
- import { BaseDto, BaseUpsertDto } from './base.dto';
2
- export type TenantUpsertDto = BaseUpsertDto & {
1
+ import { z } from 'zod';
2
+ export declare const TENANT_STATUS_FLAGS: {
3
+ HAS_ETL_ERROR: number;
4
+ HAS_RECONCILIATION_ERROR: number;
5
+ HAS_FINDINGS_GENERATION_ERROR: number;
6
+ HAS_RISK_CONTRIBUTORS_ERROR: number;
7
+ HAS_REPORTING_ERROR: number;
8
+ HAS_NOTIFICATIONS_ERROR: number;
9
+ HAS_FLOWS_ERROR: number;
10
+ };
11
+ export declare const _TenantUpsertDto: z.ZodObject<z.objectUtil.extendShape<{
12
+ id: z.ZodOptional<z.ZodString>;
13
+ createdAt: z.ZodOptional<z.ZodString>;
14
+ updatedAt: z.ZodOptional<z.ZodString>;
15
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ }, {
3
17
  /** Human readable name of the tenant */
18
+ displayValue: z.ZodString;
19
+ status: z.ZodDefault<z.ZodNumber>;
20
+ }>, "strip", z.ZodTypeAny, {
21
+ status: number;
4
22
  displayValue: string;
5
- };
6
- export type TenantDto = BaseDto & TenantUpsertDto;
23
+ id?: string | undefined;
24
+ createdAt?: string | undefined;
25
+ updatedAt?: string | undefined;
26
+ deletedAt?: string | null | undefined;
27
+ }, {
28
+ displayValue: string;
29
+ status?: number | undefined;
30
+ id?: string | undefined;
31
+ createdAt?: string | undefined;
32
+ updatedAt?: string | undefined;
33
+ deletedAt?: string | null | undefined;
34
+ }>;
35
+ export type TenantUpsertDto = z.infer<typeof _TenantUpsertDto>;
36
+ export declare const _TenantDto: z.ZodObject<z.objectUtil.extendShape<{
37
+ id: z.ZodString;
38
+ createdAt: z.ZodString;
39
+ updatedAt: z.ZodString;
40
+ deletedAt: z.ZodNullable<z.ZodString>;
41
+ }, {
42
+ /** Human readable name of the tenant */
43
+ displayValue: z.ZodString;
44
+ status: z.ZodDefault<z.ZodNumber>;
45
+ }>, "strip", z.ZodTypeAny, {
46
+ status: number;
47
+ id: string;
48
+ createdAt: string;
49
+ updatedAt: string;
50
+ deletedAt: string | null;
51
+ displayValue: string;
52
+ }, {
53
+ id: string;
54
+ createdAt: string;
55
+ updatedAt: string;
56
+ deletedAt: string | null;
57
+ displayValue: string;
58
+ status?: number | undefined;
59
+ }>;
60
+ export type TenantDto = z.infer<typeof _TenantDto>;
@@ -1,3 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._TenantDto = exports._TenantUpsertDto = exports.TENANT_STATUS_FLAGS = void 0;
4
+ const base_dto_1 = require("./base.dto");
5
+ const zod_1 = require("zod");
6
+ exports.TENANT_STATUS_FLAGS = {
7
+ HAS_ETL_ERROR: 1,
8
+ HAS_RECONCILIATION_ERROR: 1 << 1,
9
+ HAS_FINDINGS_GENERATION_ERROR: 1 << 2,
10
+ HAS_RISK_CONTRIBUTORS_ERROR: 1 << 3,
11
+ HAS_REPORTING_ERROR: 1 << 4,
12
+ HAS_NOTIFICATIONS_ERROR: 1 << 5,
13
+ HAS_FLOWS_ERROR: 1 << 6,
14
+ };
15
+ const DisplayValueAndStatusSchema = zod_1.z.object({
16
+ /** Human readable name of the tenant */
17
+ displayValue: zod_1.z.string(),
18
+ status: zod_1.z.number().default(0),
19
+ });
20
+ exports._TenantUpsertDto = base_dto_1._BaseUpsertDto.extend({
21
+ ...DisplayValueAndStatusSchema.shape,
22
+ });
23
+ exports._TenantDto = base_dto_1._BaseDto.extend({
24
+ ...DisplayValueAndStatusSchema.shape,
25
+ });
3
26
  //# sourceMappingURL=tenants.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tenants.dto.js","sourceRoot":"","sources":["../../../src/dto/tenants.dto.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"tenants.dto.js","sourceRoot":"","sources":["../../../src/dto/tenants.dto.ts"],"names":[],"mappings":";;;AAAA,yCAAoD;AACpD,6BAAsB;AAET,QAAA,mBAAmB,GAAG;IACjC,aAAa,EAAE,CAAC;IAChB,wBAAwB,EAAE,CAAC,IAAI,CAAC;IAChC,6BAA6B,EAAE,CAAC,IAAI,CAAC;IACrC,2BAA2B,EAAE,CAAC,IAAI,CAAC;IACnC,mBAAmB,EAAE,CAAC,IAAI,CAAC;IAC3B,uBAAuB,EAAE,CAAC,IAAI,CAAC;IAC/B,eAAe,EAAE,CAAC,IAAI,CAAC;CACxB,CAAC;AAEF,MAAM,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,wCAAwC;IACxC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,yBAAc,CAAC,MAAM,CAAC;IACpD,GAAG,2BAA2B,CAAC,KAAK;CACrC,CAAC,CAAC;AAGU,QAAA,UAAU,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACxC,GAAG,2BAA2B,CAAC,KAAK;CACrC,CAAC,CAAC"}
@@ -6,6 +6,7 @@ import { AmpSettingsService } from './settings.service';
6
6
  import { UserIdentityService } from './rest/UserIdentityService';
7
7
  import { AmpInsightsService } from './insights.service';
8
8
  import { FindingsService } from './findings.service';
9
+ import { EngagementConversationService } from './engagementConversations.service';
9
10
  export type EngageApiOptions = AmpRestClientOptions;
10
11
  /**
11
12
  * Engage API
@@ -14,7 +15,7 @@ export type EngageApiOptions = AmpRestClientOptions;
14
15
  * a plugin leverage the AmpSdk instead (see {@link AmpSdkServices} ), or
15
16
  * a an extension for Agents use AmpApi instead (see {@link AmpApi}).
16
17
  *
17
- * This client provides READ_ONLY access to The folloing resoureces:
18
+ * This client provides READ_ONLY access to The following resources:
18
19
  * - Connectors: {@link EngageApi.connectors}
19
20
  * - Findings: {@link EngageApi.findings}
20
21
  * - Identity: {@link EngageApi.identity}
@@ -22,8 +23,9 @@ export type EngageApiOptions = AmpRestClientOptions;
22
23
  * - Providers: {@link EngageApi.providers}
23
24
  * - Reporting: {@link EngageApi.reports}
24
25
  * - Settings: {@link EngageApi.settings}
26
+ * - Conversations: {@link EngageApi.conversations}
25
27
  *
26
- * This client provides PATCH access to The folloing resoureces:
28
+ * This client provides PATCH access to The following resources:
27
29
  * - Findings: {@link EngageApi.findings}
28
30
  */
29
31
  export declare class EngageApi {
@@ -35,6 +37,7 @@ export declare class EngageApi {
35
37
  readonly providers: AmpDataService<ProviderDto>;
36
38
  readonly reports: AmpReportService;
37
39
  readonly settings: AmpSettingsService;
40
+ readonly conversations: EngagementConversationService;
38
41
  constructor(rest: RestClient);
39
42
  static instance(options: EngageApiOptions): EngageApi;
40
43
  }
@@ -10,6 +10,7 @@ const settings_service_1 = require("./settings.service");
10
10
  const UserIdentityService_1 = require("./rest/UserIdentityService");
11
11
  const insights_service_1 = require("./insights.service");
12
12
  const findings_service_1 = require("./findings.service");
13
+ const engagementConversations_service_1 = require("./engagementConversations.service");
13
14
  /**
14
15
  * Engage API
15
16
  * This client is a wrapper around the AMP REST API meant to be used by
@@ -17,7 +18,7 @@ const findings_service_1 = require("./findings.service");
17
18
  * a plugin leverage the AmpSdk instead (see {@link AmpSdkServices} ), or
18
19
  * a an extension for Agents use AmpApi instead (see {@link AmpApi}).
19
20
  *
20
- * This client provides READ_ONLY access to The folloing resoureces:
21
+ * This client provides READ_ONLY access to The following resources:
21
22
  * - Connectors: {@link EngageApi.connectors}
22
23
  * - Findings: {@link EngageApi.findings}
23
24
  * - Identity: {@link EngageApi.identity}
@@ -25,8 +26,9 @@ const findings_service_1 = require("./findings.service");
25
26
  * - Providers: {@link EngageApi.providers}
26
27
  * - Reporting: {@link EngageApi.reports}
27
28
  * - Settings: {@link EngageApi.settings}
29
+ * - Conversations: {@link EngageApi.conversations}
28
30
  *
29
- * This client provides PATCH access to The folloing resoureces:
31
+ * This client provides PATCH access to The following resources:
30
32
  * - Findings: {@link EngageApi.findings}
31
33
  */
32
34
  class EngageApi {
@@ -39,6 +41,7 @@ class EngageApi {
39
41
  this.providers = new data_service_1.AmpDataServiceImpl(rest, constants_1.KIND.PROVIDERS, constants_1.TARGET_API_ENGAGE);
40
42
  this.reports = new reports_service_1.AmpReportServiceImpl(rest);
41
43
  this.settings = new settings_service_1.AmpSettingsService(rest); // TODO: confirm it is not needed. Currently returns NOT_IMPLEMENTED error code
44
+ this.conversations = new engagementConversations_service_1.EngagementConversationService(rest, constants_1.KIND.ENGAGEMENT_CONVERSATIONS, constants_1.TARGET_API_ENGAGE);
42
45
  }
43
46
  static instance(options) {
44
47
  const rest = (0, rest_1.get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I,SAAS,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AA3BD,8BA2BC"}
@@ -13,6 +13,7 @@ export declare const KIND: {
13
13
  CUSTOM_ACTIONS: string;
14
14
  CUSTOM_SCORE_COHORTS: string;
15
15
  CUSTOM_SCORE_VALUES: string;
16
+ ENGAGEMENT_CONVERSATIONS: string;
16
17
  ENUM_DEPARTMENTS: string;
17
18
  ENUM_ORGANIZATIONS: string;
18
19
  ENUM_TITLES: string;
@@ -12,6 +12,7 @@ exports.KIND = {
12
12
  CUSTOM_ACTIONS: 'custom_actions',
13
13
  CUSTOM_SCORE_COHORTS: 'custom_score_cohorts',
14
14
  CUSTOM_SCORE_VALUES: 'custom_score_values',
15
+ ENGAGEMENT_CONVERSATIONS: 'engagement_conversations',
15
16
  ENUM_DEPARTMENTS: 'departments',
16
17
  ENUM_ORGANIZATIONS: 'organizations',
17
18
  ENUM_TITLES: 'titles',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/constants.ts"],"names":[],"mappings":";;;AAIa,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAGhC,QAAA,mBAAmB,GAAc,UAAU,CAAC;AAC5C,QAAA,gBAAgB,GAAc,KAAK,CAAC;AACpC,QAAA,iBAAiB,GAAc,KAAK,CAAC;AAErC,QAAA,IAAI,GAAG;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,oBAAoB,EAAE,sBAAsB;IAC5C,mBAAmB,EAAE,qBAAqB;IAC1C,gBAAgB,EAAE,aAAa;IAC/B,kBAAkB,EAAE,eAAe;IACnC,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,mBAAmB;IACtC,aAAa,EAAE,gBAAgB;IAC/B,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,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1
+ import { EngagementChannelKind, EngagementConversationDto, EngagementConversationUpsertDto, EngagementDialogueDto, EngagementDialogueUpsertDto } from '../dto';
2
+ import { RestClient } from './rest';
3
+ export declare class EngagementConversationService {
4
+ private readonly rest;
5
+ protected readonly kind: string;
6
+ protected readonly targetApi: string;
7
+ constructor(rest: RestClient, kind: string, targetApi: string);
8
+ createConversation: (conversationUpsertDto: EngagementConversationUpsertDto) => Promise<EngagementConversationDto>;
9
+ getConversation: (engagementChannel: EngagementChannelKind, fid: string) => Promise<EngagementConversationDto>;
10
+ getDialogue: (conversationId: string, dialogueId: string) => Promise<EngagementDialogueDto>;
11
+ submitDialogue: (dialogueUpsertDto: EngagementDialogueUpsertDto) => Promise<EngagementDialogueDto>;
12
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EngagementConversationService = void 0;
4
+ class EngagementConversationService {
5
+ constructor(rest, kind, targetApi) {
6
+ this.createConversation = async (conversationUpsertDto) => {
7
+ const res = await this.rest.call({
8
+ url: `/${this.targetApi}/v1/${this.kind}/conversation`,
9
+ method: 'POST',
10
+ data: conversationUpsertDto,
11
+ });
12
+ return res.data;
13
+ };
14
+ this.getConversation = async (engagementChannel, fid) => {
15
+ const params = {
16
+ engagementChannel,
17
+ fid,
18
+ };
19
+ const res = await this.rest.call({
20
+ url: `/${this.targetApi}/v1/${this.kind}/conversation`,
21
+ method: 'GET',
22
+ params: params,
23
+ });
24
+ return res.data;
25
+ };
26
+ this.getDialogue = async (conversationId, dialogueId) => {
27
+ const res = await this.rest.call({
28
+ url: `/${this.targetApi}/v1/${this.kind}/conversation/${conversationId}/dialogue/${dialogueId}`,
29
+ method: 'GET',
30
+ });
31
+ return res.data;
32
+ };
33
+ this.submitDialogue = async (dialogueUpsertDto) => {
34
+ const conversationId = dialogueUpsertDto.conversationId;
35
+ const res = await this.rest.call({
36
+ url: `/${this.targetApi}/v1/${this.kind}/conversation/${conversationId}/dialogue/`,
37
+ method: 'POST',
38
+ });
39
+ return res.data;
40
+ };
41
+ this.rest = rest;
42
+ this.kind = kind;
43
+ this.targetApi = targetApi;
44
+ }
45
+ }
46
+ exports.EngagementConversationService = EngagementConversationService;
47
+ //# sourceMappingURL=engagementConversations.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engagementConversations.service.js","sourceRoot":"","sources":["../../../src/services/engagementConversations.service.ts"],"names":[],"mappings":";;;AAGA,MAAa,6BAA6B;IAKxC,YAAY,IAAgB,EAAE,IAAY,EAAE,SAAiB;QAM7D,uBAAkB,GAAG,KAAK,EAAE,qBAAsD,EAAsC,EAAE;YACxH,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,eAAe;gBACtD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,qBAAqB;aAC5B,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,IAAiC,CAAC;QAC/C,CAAC,CAAC;QAEF,oBAAe,GAAG,KAAK,EAAE,iBAAwC,EAAE,GAAW,EAAsC,EAAE;YACpH,MAAM,MAAM,GAAG;gBACb,iBAAiB;gBACjB,GAAG;aACJ,CAAC;YACF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,eAAe;gBACtD,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,MAAM;aACf,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,IAAiC,CAAC;QAC/C,CAAC,CAAC;QAEF,gBAAW,GAAG,KAAK,EAAE,cAAsB,EAAE,UAAkB,EAAkC,EAAE;YACjG,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,iBAAiB,cAAc,aAAa,UAAU,EAAE;gBAC/F,MAAM,EAAE,KAAK;aACd,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,IAA6B,CAAC;QAC3C,CAAC,CAAC;QAEF,mBAAc,GAAG,KAAK,EAAE,iBAA8C,EAAkC,EAAE;YACxG,MAAM,cAAc,GAAG,iBAAiB,CAAC,cAAc,CAAC;YACxD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,iBAAiB,cAAc,YAAY;gBAClF,MAAM,EAAE,MAAM;aACf,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,IAA6B,CAAC;QAC3C,CAAC,CAAC;QA1CA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CAwCF;AAjDD,sEAiDC"}
@@ -1,4 +1,4 @@
1
- import { TenantCountReportDto, TenantDto, TenantUpsertDto } from '../../dto';
1
+ import { PlatformTenantDto, TenantCountReportDto, TenantDto, TenantUpsertDto } from '../../dto';
2
2
  import { TargetApi } from '../constants';
3
3
  import { AmpEntityServiceImpl } from '../entity.service';
4
4
  import { RestClient } from './RestClient';
@@ -6,6 +6,7 @@ import { OpsRpcResult } from '../../dto/platform/platform.ops.dto';
6
6
  export declare class TenantsService extends AmpEntityServiceImpl<TenantUpsertDto, TenantDto> {
7
7
  constructor(rest: RestClient, targetApi?: TargetApi);
8
8
  countReport(tid: string): Promise<TenantCountReportDto>;
9
+ updateStatus(tid: string, status: number): Promise<PlatformTenantDto>;
9
10
  /**
10
11
  * !!! WARNING !!! 🚨 💀 🚨 💀 🚨 💀 🚨 💀
11
12
  * This method will permanently HARD delete any soft deleted tenant data, including the tenant itsself. There is no UNDO!
@@ -18,6 +18,16 @@ class TenantsService extends entity_service_1.AmpEntityServiceImpl {
18
18
  })
19
19
  .then(res => dto_1._TenantCountReportDto.parse(res.data));
20
20
  }
21
+ updateStatus(tid, status) {
22
+ const url = `/${this.targetApi}/v1/${this.kind}/${tid}/status`;
23
+ return this.rest
24
+ .call({
25
+ url,
26
+ method: 'PUT',
27
+ data: { status },
28
+ })
29
+ .then(res => dto_1._TenantDto.parse(res.data));
30
+ }
21
31
  /**
22
32
  * !!! WARNING !!! 🚨 💀 🚨 💀 🚨 💀 🚨 💀
23
33
  * This method will permanently HARD delete any soft deleted tenant data, including the tenant itsself. There is no UNDO!
@@ -1 +1 @@
1
- {"version":3,"file":"TenantsService.js","sourceRoot":"","sources":["../../../../src/services/rest/TenantsService.ts"],"names":[],"mappings":";;;AAAA,mCAAkG;AAClG,4CAA6C;AAC7C,sDAAuD;AAEvD,0EAAgF;AAEhF,MAAa,cAAe,SAAQ,qCAAgD;IAClF,YAAY,IAAgB,EAAE,YAAuB,KAAK;QACxD,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,WAAW,CAAC,GAAW;QACrB,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,IAAI,GAAG,eAAe,CAAC;QACrE,OAAO,IAAI,CAAC,IAAI;aACb,IAAI,CAAC;YACJ,GAAG;YACH,MAAM,EAAE,KAAK;SACd,CAAC;aACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,2BAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,GAAW;QACpB,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,aAAa,CAAC;QAC5C,OAAO,IAAI,CAAC,IAAI;aACb,IAAI,CAAC;YACJ,GAAG;YACH,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,EAAE,EAAE,YAAY;gBAChB,KAAK,EAAE;oBACL,GAAG;iBACJ;aACF;SACF,CAAC;aACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,gCAAa,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,GAAW;QACtB,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,aAAa,CAAC;QAC5C,OAAO,IAAI,CAAC,IAAI;aACb,IAAI,CAAC;YACJ,GAAG;YACH,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,EAAE,EAAE,cAAc;gBAClB,KAAK,EAAE;oBACL,GAAG;iBACJ;aACF;SACF,CAAC;aACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,gCAAa,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAChD,CAAC;CACF;AA9DD,wCA8DC"}
1
+ {"version":3,"file":"TenantsService.js","sourceRoot":"","sources":["../../../../src/services/rest/TenantsService.ts"],"names":[],"mappings":";;;AAAA,mCAAmJ;AACnJ,4CAA6C;AAC7C,sDAAuD;AAEvD,0EAAgF;AAEhF,MAAa,cAAe,SAAQ,qCAAgD;IAClF,YAAY,IAAgB,EAAE,YAAuB,KAAK;QACxD,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,WAAW,CAAC,GAAW;QACrB,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,IAAI,GAAG,eAAe,CAAC;QACrE,OAAO,IAAI,CAAC,IAAI;aACb,IAAI,CAAC;YACJ,GAAG;YACH,MAAM,EAAE,KAAK;SACd,CAAC;aACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,2BAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,C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+1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "71.1.0",
3
+ "version": "72.1.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -0,0 +1,15 @@
1
+ import {z} from 'zod';
2
+ import {UPSERT_DTO_MASK, _BaseDto} from './base.dto';
3
+ import {EngagementChannelKind} from './enums/engagementChannelKind';
4
+
5
+ export const _EngagementContextDto = _BaseDto.extend({
6
+ contextKey: z.string(),
7
+ channel: z.nativeEnum(EngagementChannelKind),
8
+ conversationId: z.string().optional(),
9
+ });
10
+
11
+ export const _EngagementContextUpsertDto = _EngagementContextDto.partial(UPSERT_DTO_MASK);
12
+
13
+ export type EngagementContextDto = z.infer<typeof _EngagementContextDto>;
14
+
15
+ export type EngagementUpsertContextDto = z.infer<typeof _EngagementContextUpsertDto>;
@@ -0,0 +1,41 @@
1
+ import {z} from 'zod';
2
+ import {UPSERT_DTO_MASK, _BaseDto} from './base.dto';
3
+ import {EngagementChannelKind} from './enums';
4
+
5
+ export enum ENGAGEMENT_DIALOGUE_SPEAKER {
6
+ USER = 'USER',
7
+ BOT = 'BOT',
8
+ }
9
+
10
+ export enum ENGAGEMENT_DIALOGUE_STATUS {
11
+ FINISHED = 'FINISHED',
12
+ IN_PROGRESS = 'IN_PROGRESS',
13
+ }
14
+
15
+ export const _EngagementDialogueDto = _BaseDto.extend({
16
+ conversationId: z.string(),
17
+ speaker: z.nativeEnum(ENGAGEMENT_DIALOGUE_SPEAKER),
18
+ status: z.nativeEnum(ENGAGEMENT_DIALOGUE_STATUS),
19
+ content: z.string().optional(),
20
+ timestamp: z.date().optional(),
21
+ });
22
+
23
+ export const _EngagementConversationDto = _BaseDto.extend({
24
+ dialogueIds: z.string().array(),
25
+ });
26
+
27
+ export const _EngagementDialogueUpsertDto = _EngagementDialogueDto.partial(UPSERT_DTO_MASK);
28
+
29
+ export const _EngagementConversationUpsertDto = _EngagementConversationDto.partial(UPSERT_DTO_MASK).extend({
30
+ engagementChannel: z.nativeEnum(EngagementChannelKind),
31
+ fid: z.string().optional(),
32
+ contextKey: z.string().optional(),
33
+ });
34
+
35
+ export type EngagementConversationDto = z.infer<typeof _EngagementConversationDto>;
36
+
37
+ export type EngagementConversationUpsertDto = z.infer<typeof _EngagementConversationUpsertDto>;
38
+
39
+ export type EngagementDialogueDto = z.infer<typeof _EngagementDialogueDto>;
40
+
41
+ export type EngagementDialogueUpsertDto = z.infer<typeof _EngagementDialogueUpsertDto>;
@@ -0,0 +1,4 @@
1
+ export enum EngagementChannelKind {
2
+ SLACK = 'SLACK',
3
+ CHROME_EXTENSION = 'CHROME_EXTENSION',
4
+ }
@@ -6,6 +6,7 @@ export * from './category';
6
6
  export * from './computer.os.enum';
7
7
  export * from './connector.status';
8
8
  export * from './contact.type';
9
+ export * from './engagementChannelKind';
9
10
  export * from './findingBuckets';
10
11
  export * from './findingKind';
11
12
  export * from './findingSpecKind';
package/src/dto/index.ts CHANGED
@@ -9,6 +9,8 @@ export * from './customActions.dto';
9
9
  export * from './customScores.dto';
10
10
  export * from './defaultConnector.dto';
11
11
  export * from './eng';
12
+ export * from './engagementContexts.dto';
13
+ export * from './engagementConversations.dto';
12
14
  export * from './entityIdSummaries.dto';
13
15
  export * from './enum.dto';
14
16
  export * from './enums';
@@ -3,6 +3,8 @@ export * from './platform.assets.dto';
3
3
  export * from './platform.connectors.dto';
4
4
  export * from './platform.customActions.dto';
5
5
  export * from './platform.customScores.dto';
6
+ export * from './platform.engagementContexts.dto';
7
+ export * from './platform.engagementConversations.dto';
6
8
  export * from './platform.findingsInsights.dto';
7
9
  export * from './platform.findings.dto';
8
10
  export * from './platform.flows.dto';
@@ -0,0 +1,14 @@
1
+ import {z} from 'zod';
2
+ import {_EngagementContextDto, _EngagementContextUpsertDto} from '../engagementContexts.dto';
3
+
4
+ export const _PlatformEngagementContextUpsertDto = _EngagementContextUpsertDto.extend({
5
+ tid: z.string(),
6
+ });
7
+
8
+ export const _PlatformEngagementContextDto = _EngagementContextDto.extend({
9
+ tid: z.string(),
10
+ });
11
+
12
+ export type PlatformEngagementContextDto = z.infer<typeof _PlatformEngagementContextDto>;
13
+
14
+ export type PlatformEngagementContextUpsertDto = z.infer<typeof _PlatformEngagementContextUpsertDto>;
@@ -0,0 +1,14 @@
1
+ import {z} from 'zod';
2
+ import {_EngagementConversationDto, _EngagementConversationUpsertDto} from '../engagementConversations.dto';
3
+
4
+ export const _PlatformEngagementConversationUpsertDto = _EngagementConversationUpsertDto.extend({
5
+ tid: z.string(),
6
+ });
7
+
8
+ export const _PlatformEngagementConversationDto = _EngagementConversationDto.extend({
9
+ tid: z.string(),
10
+ });
11
+
12
+ export type PlatformEngagementConversationDto = z.infer<typeof _PlatformEngagementConversationDto>;
13
+
14
+ export type PlatformEngagementConversationUpsertDto = z.infer<typeof _PlatformEngagementConversationUpsertDto>;
@@ -1,8 +1,28 @@
1
- import {BaseDto, BaseUpsertDto} from './base.dto';
1
+ import {_BaseDto, _BaseUpsertDto} from './base.dto';
2
+ import {z} from 'zod';
2
3
 
3
- export type TenantUpsertDto = BaseUpsertDto & {
4
- /** Human readable name of the tenant */
5
- displayValue: string;
4
+ export const TENANT_STATUS_FLAGS = {
5
+ HAS_ETL_ERROR: 1,
6
+ HAS_RECONCILIATION_ERROR: 1 << 1,
7
+ HAS_FINDINGS_GENERATION_ERROR: 1 << 2,
8
+ HAS_RISK_CONTRIBUTORS_ERROR: 1 << 3,
9
+ HAS_REPORTING_ERROR: 1 << 4,
10
+ HAS_NOTIFICATIONS_ERROR: 1 << 5,
11
+ HAS_FLOWS_ERROR: 1 << 6,
6
12
  };
7
13
 
8
- export type TenantDto = BaseDto & TenantUpsertDto;
14
+ const DisplayValueAndStatusSchema = z.object({
15
+ /** Human readable name of the tenant */
16
+ displayValue: z.string(),
17
+ status: z.number().default(0),
18
+ });
19
+
20
+ export const _TenantUpsertDto = _BaseUpsertDto.extend({
21
+ ...DisplayValueAndStatusSchema.shape,
22
+ });
23
+ export type TenantUpsertDto = z.infer<typeof _TenantUpsertDto>;
24
+
25
+ export const _TenantDto = _BaseDto.extend({
26
+ ...DisplayValueAndStatusSchema.shape,
27
+ });
28
+ export type TenantDto = z.infer<typeof _TenantDto>;
@@ -8,6 +8,7 @@ import {AmpSettingsService} from './settings.service';
8
8
  import {UserIdentityService} from './rest/UserIdentityService';
9
9
  import {AmpInsightsService, AmpInsightsServiceImpl} from './insights.service';
10
10
  import {FindingsService} from './findings.service';
11
+ import {EngagementConversationService} from './engagementConversations.service';
11
12
 
12
13
  export type EngageApiOptions = AmpRestClientOptions;
13
14
 
@@ -18,7 +19,7 @@ export type EngageApiOptions = AmpRestClientOptions;
18
19
  * a plugin leverage the AmpSdk instead (see {@link AmpSdkServices} ), or
19
20
  * a an extension for Agents use AmpApi instead (see {@link AmpApi}).
20
21
  *
21
- * This client provides READ_ONLY access to The folloing resoureces:
22
+ * This client provides READ_ONLY access to The following resources:
22
23
  * - Connectors: {@link EngageApi.connectors}
23
24
  * - Findings: {@link EngageApi.findings}
24
25
  * - Identity: {@link EngageApi.identity}
@@ -26,8 +27,9 @@ export type EngageApiOptions = AmpRestClientOptions;
26
27
  * - Providers: {@link EngageApi.providers}
27
28
  * - Reporting: {@link EngageApi.reports}
28
29
  * - Settings: {@link EngageApi.settings}
30
+ * - Conversations: {@link EngageApi.conversations}
29
31
  *
30
- * This client provides PATCH access to The folloing resoureces:
32
+ * This client provides PATCH access to The following resources:
31
33
  * - Findings: {@link EngageApi.findings}
32
34
  */
33
35
  export class EngageApi {
@@ -39,6 +41,7 @@ export class EngageApi {
39
41
  readonly providers: AmpDataService<ProviderDto>;
40
42
  readonly reports: AmpReportService;
41
43
  readonly settings: AmpSettingsService;
44
+ readonly conversations: EngagementConversationService;
42
45
 
43
46
  constructor(rest: RestClient) {
44
47
  this.connectors = new AmpEntityServiceImpl<ConnectorUpsertDto, ConnectorDto>(rest, KIND.CONNECTORS, TARGET_API_ENGAGE);
@@ -49,6 +52,7 @@ export class EngageApi {
49
52
  this.providers = new AmpDataServiceImpl<ProviderDto>(rest, KIND.PROVIDERS, TARGET_API_ENGAGE);
50
53
  this.reports = new AmpReportServiceImpl(rest);
51
54
  this.settings = new AmpSettingsService(rest); // TODO: confirm it is not needed. Currently returns NOT_IMPLEMENTED error code
55
+ this.conversations = new EngagementConversationService(rest, KIND.ENGAGEMENT_CONVERSATIONS, TARGET_API_ENGAGE);
52
56
  }
53
57
 
54
58
  static instance(options: EngageApiOptions): EngageApi {
@@ -16,6 +16,7 @@ export const KIND = {
16
16
  CUSTOM_ACTIONS: 'custom_actions',
17
17
  CUSTOM_SCORE_COHORTS: 'custom_score_cohorts',
18
18
  CUSTOM_SCORE_VALUES: 'custom_score_values',
19
+ ENGAGEMENT_CONVERSATIONS: 'engagement_conversations',
19
20
  ENUM_DEPARTMENTS: 'departments',
20
21
  ENUM_ORGANIZATIONS: 'organizations',
21
22
  ENUM_TITLES: 'titles',
@@ -0,0 +1,53 @@
1
+ import {EngagementChannelKind, EngagementConversationDto, EngagementConversationUpsertDto, EngagementDialogueDto, EngagementDialogueUpsertDto} from '../dto';
2
+ import {RestClient} from './rest';
3
+
4
+ export class EngagementConversationService {
5
+ private readonly rest: RestClient;
6
+ protected readonly kind: string;
7
+ protected readonly targetApi: string;
8
+
9
+ constructor(rest: RestClient, kind: string, targetApi: string) {
10
+ this.rest = rest;
11
+ this.kind = kind;
12
+ this.targetApi = targetApi;
13
+ }
14
+
15
+ createConversation = async (conversationUpsertDto: EngagementConversationUpsertDto): Promise<EngagementConversationDto> => {
16
+ const res = await this.rest.call({
17
+ url: `/${this.targetApi}/v1/${this.kind}/conversation`,
18
+ method: 'POST',
19
+ data: conversationUpsertDto,
20
+ });
21
+ return res.data as EngagementConversationDto;
22
+ };
23
+
24
+ getConversation = async (engagementChannel: EngagementChannelKind, fid: string): Promise<EngagementConversationDto> => {
25
+ const params = {
26
+ engagementChannel,
27
+ fid,
28
+ };
29
+ const res = await this.rest.call({
30
+ url: `/${this.targetApi}/v1/${this.kind}/conversation`,
31
+ method: 'GET',
32
+ params: params,
33
+ });
34
+ return res.data as EngagementConversationDto;
35
+ };
36
+
37
+ getDialogue = async (conversationId: string, dialogueId: string): Promise<EngagementDialogueDto> => {
38
+ const res = await this.rest.call({
39
+ url: `/${this.targetApi}/v1/${this.kind}/conversation/${conversationId}/dialogue/${dialogueId}`,
40
+ method: 'GET',
41
+ });
42
+ return res.data as EngagementDialogueDto;
43
+ };
44
+
45
+ submitDialogue = async (dialogueUpsertDto: EngagementDialogueUpsertDto): Promise<EngagementDialogueDto> => {
46
+ const conversationId = dialogueUpsertDto.conversationId;
47
+ const res = await this.rest.call({
48
+ url: `/${this.targetApi}/v1/${this.kind}/conversation/${conversationId}/dialogue/`,
49
+ method: 'POST',
50
+ });
51
+ return res.data as EngagementDialogueDto;
52
+ };
53
+ }
@@ -1,4 +1,4 @@
1
- import {TenantCountReportDto, TenantDto, TenantUpsertDto, _TenantCountReportDto} from '../../dto';
1
+ import {PlatformTenantDto, TenantCountReportDto, TenantDto, TenantUpsertDto, _TenantCountReportDto, _TenantDto, _TenantUpsertDto} from '../../dto';
2
2
  import {KIND, TargetApi} from '../constants';
3
3
  import {AmpEntityServiceImpl} from '../entity.service';
4
4
  import {RestClient} from './RestClient';
@@ -19,6 +19,17 @@ export class TenantsService extends AmpEntityServiceImpl<TenantUpsertDto, Tenant
19
19
  .then(res => _TenantCountReportDto.parse(res.data));
20
20
  }
21
21
 
22
+ updateStatus(tid: string, status: number): Promise<PlatformTenantDto> {
23
+ const url = `/${this.targetApi}/v1/${this.kind}/${tid}/status`;
24
+ return this.rest
25
+ .call({
26
+ url,
27
+ method: 'PUT',
28
+ data: {status},
29
+ })
30
+ .then(res => _TenantDto.parse(res.data));
31
+ }
32
+
22
33
  /**
23
34
  * !!! WARNING !!! 🚨 💀 🚨 💀 🚨 💀 🚨 💀
24
35
  * This method will permanently HARD delete any soft deleted tenant data, including the tenant itsself. There is no UNDO!