@trii/types 2.10.678 → 2.10.679

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 (139) hide show
  1. package/dist/AI/MapPolygon.d.ts +22 -0
  2. package/dist/AI/MapPolygon.js +2 -0
  3. package/dist/Conversations/Conversation.d.ts +8 -8
  4. package/dist/Conversations/Flows/Nodes/NodeAIChatBot.d.ts +0 -0
  5. package/dist/Conversations/Flows/Nodes/NodeAIChatBot.js +0 -0
  6. package/dist/Conversations/Flows/Nodes/NodeApi.d.ts +2 -0
  7. package/dist/Conversations/Flows/Nodes/NodeApi.js +183 -0
  8. package/dist/Conversations/Flows/Nodes/NodeBotIA.d.ts +15 -0
  9. package/dist/Conversations/Flows/Nodes/NodeBotIA.js +6 -0
  10. package/dist/Conversations/Flows/Nodes/NodeChatBotIA.d.ts +15 -0
  11. package/dist/Conversations/Flows/Nodes/NodeChatBotIA.js +6 -0
  12. package/dist/Conversations/Flows/Nodes/NodeConditional.d.ts +0 -0
  13. package/dist/Conversations/Flows/Nodes/NodeConditional.js +0 -0
  14. package/dist/Conversations/Flows/Nodes/NodeContactSearch.d.ts +0 -0
  15. package/dist/Conversations/Flows/Nodes/NodeContactSearch.js +0 -0
  16. package/dist/Conversations/Flows/Nodes/NodeContactUpdate.d.ts +0 -0
  17. package/dist/Conversations/Flows/Nodes/NodeContactUpdate.js +0 -0
  18. package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.d.ts +0 -0
  19. package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.js +0 -0
  20. package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.d.ts +0 -0
  21. package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.js +0 -0
  22. package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.d.ts +0 -0
  23. package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.js +0 -0
  24. package/dist/Conversations/Flows/Nodes/NodeFillForm.d.ts +0 -0
  25. package/dist/Conversations/Flows/Nodes/NodeFillForm.js +0 -0
  26. package/dist/Conversations/Flows/Nodes/NodeFillTicket.d.ts +1 -0
  27. package/dist/Conversations/Flows/Nodes/NodeFillTicket.js +9 -0
  28. package/dist/Conversations/Flows/Nodes/NodeGoogleCalendar.d.ts +20 -0
  29. package/dist/Conversations/Flows/Nodes/NodeGoogleCalendar.js +2 -0
  30. package/dist/Conversations/Flows/Nodes/NodeGoogleMaps copy.d.ts +12 -0
  31. package/dist/Conversations/Flows/Nodes/NodeGoogleMaps copy.js +6 -0
  32. package/dist/Conversations/Flows/Nodes/NodeGoogleMaps.d.ts +15 -0
  33. package/dist/Conversations/Flows/Nodes/NodeGoogleMaps.js +2 -0
  34. package/dist/Conversations/Flows/Nodes/NodeMsgReply.d.ts +0 -0
  35. package/dist/Conversations/Flows/Nodes/NodeMsgReply.js +0 -0
  36. package/dist/Conversations/Flows/Nodes/NodeMsgSend.d.ts +0 -0
  37. package/dist/Conversations/Flows/Nodes/NodeMsgSend.js +0 -0
  38. package/dist/Conversations/Flows/Nodes/NodeMsgText.d.ts +1 -0
  39. package/dist/Conversations/Flows/Nodes/NodeMsgText.js +27 -0
  40. package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.d.ts +0 -0
  41. package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.js +0 -0
  42. package/dist/Conversations/Flows/Nodes/NodeRedirect.d.ts +0 -0
  43. package/dist/Conversations/Flows/Nodes/NodeRedirect.js +0 -0
  44. package/dist/Conversations/Flows/Nodes/NodeSendEmail.d.ts +0 -0
  45. package/dist/Conversations/Flows/Nodes/NodeSendEmail.js +0 -0
  46. package/dist/Conversations/Flows/Nodes/NodeSqlQuery.d.ts +0 -0
  47. package/dist/Conversations/Flows/Nodes/NodeSqlQuery.js +0 -0
  48. package/dist/Conversations/Flows/Nodes/NodeStart.d.ts +0 -0
  49. package/dist/Conversations/Flows/Nodes/NodeStart.js +0 -0
  50. package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.d.ts +0 -0
  51. package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.js +0 -0
  52. package/dist/Conversations/Flows/Nodes/NodeTimeTimer.d.ts +0 -0
  53. package/dist/Conversations/Flows/Nodes/NodeTimeTimer.js +0 -0
  54. package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.d.ts +0 -0
  55. package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.js +0 -0
  56. package/dist/Conversations/Flows/Nodes/NodeToolCalculator.d.ts +2 -0
  57. package/dist/Conversations/Flows/Nodes/NodeToolCalculator.js +37 -0
  58. package/dist/Conversations/Flows/Nodes/NodeToolContacts.d.ts +2 -0
  59. package/dist/Conversations/Flows/Nodes/NodeToolContacts.js +59 -0
  60. package/dist/Conversations/Flows/Nodes/NodeToolFunction.d.ts +2 -0
  61. package/dist/Conversations/Flows/Nodes/NodeToolFunction.js +45 -0
  62. package/dist/Conversations/Flows/Nodes/NodeToolGoogleCalendar.d.ts +2 -0
  63. package/dist/Conversations/Flows/Nodes/NodeToolGoogleCalendar.js +87 -0
  64. package/dist/Conversations/Flows/Nodes/NodeToolGoogleMaps.d.ts +1 -0
  65. package/dist/Conversations/Flows/Nodes/NodeToolGoogleMaps.js +2 -0
  66. package/dist/Conversations/Flows/Nodes/NodeToolKnowledge.d.ts +2 -0
  67. package/dist/Conversations/Flows/Nodes/NodeToolKnowledge.js +52 -0
  68. package/dist/Conversations/Flows/Nodes/NodeToolMapsCheckPolygon.d.ts +2 -0
  69. package/dist/Conversations/Flows/Nodes/NodeToolMapsCheckPolygon.js +59 -0
  70. package/dist/Conversations/Flows/Nodes/NodeToolMcpClient.d.ts +2 -0
  71. package/dist/Conversations/Flows/Nodes/NodeToolMcpClient.js +45 -0
  72. package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.d.ts +2 -0
  73. package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.js +81 -0
  74. package/dist/Conversations/Flows/Nodes/index.d.ts +24 -0
  75. package/dist/Conversations/Flows/Nodes/index.js +40 -0
  76. package/dist/Conversations/InboxMongo.d.ts +12 -12
  77. package/dist/Conversations/Routing.d.ts +14 -13
  78. package/dist/Presence/ChannelRoutingState.d.ts +17 -0
  79. package/dist/Presence/ChannelRoutingState.js +9 -0
  80. package/dist/Spaces/spaces.d.ts +2 -2
  81. package/dist/Tickets/AccessLevel.d.ts +5 -0
  82. package/dist/Tickets/AccessLevel.js +9 -0
  83. package/dist/index.d.ts +22 -22
  84. package/dist/index.js +58 -58
  85. package/dist/src/Chats/Chat.d.ts +61 -0
  86. package/dist/src/Chats/Chat.js +28 -0
  87. package/dist/src/Common/Channels/Channel.d.ts +9 -0
  88. package/dist/src/Contacts/contacts.d.ts +2 -2
  89. package/dist/src/Conversations/Assignment.d.ts +81 -0
  90. package/dist/src/Conversations/Assignment.js +4 -0
  91. package/dist/src/Conversations/Conversation.d.ts +234 -52
  92. package/dist/src/Conversations/Conversation.js +14 -34
  93. package/dist/src/Conversations/DashBoard/dashboard.d.ts +2 -2
  94. package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +280 -123
  95. package/dist/src/Conversations/Flows/Workflows/Workflow.js +85 -35
  96. package/dist/src/Conversations/Groups/Group.d.ts +2 -8
  97. package/dist/src/Conversations/Groups/Group.js +0 -6
  98. package/dist/src/Conversations/InboxMongo.d.ts +154 -0
  99. package/dist/src/Conversations/InboxMongo.js +128 -0
  100. package/dist/src/Conversations/InboxProjection.d.ts +162 -0
  101. package/dist/src/Conversations/InboxProjection.js +2 -0
  102. package/dist/src/Conversations/Label.d.ts +1 -1
  103. package/dist/src/Conversations/Outbox.d.ts +24 -0
  104. package/dist/src/Conversations/Outbox.js +4 -0
  105. package/dist/src/Conversations/Queue.d.ts +66 -0
  106. package/dist/src/Conversations/Queue.js +4 -0
  107. package/dist/src/Conversations/Routing.d.ts +164 -0
  108. package/dist/src/Conversations/Routing.js +2 -0
  109. package/dist/src/Conversations/Transfer.d.ts +73 -0
  110. package/dist/src/Conversations/Transfer.js +2 -0
  111. package/dist/src/Conversations/WebHook.d.ts +1 -1
  112. package/dist/src/Conversations/index.d.ts +8 -1
  113. package/dist/src/Conversations/index.js +8 -1
  114. package/dist/src/Forms/API.d.ts +53 -0
  115. package/dist/src/Forms/API.js +2 -0
  116. package/dist/src/Forms/SubmittedForm.d.ts +56 -0
  117. package/dist/src/Forms/SubmittedForm.js +9 -0
  118. package/dist/src/Forms/index.d.ts +2 -0
  119. package/dist/src/Forms/index.js +18 -0
  120. package/dist/src/Presence/AgentPause.d.ts +24 -0
  121. package/dist/src/Presence/AgentPause.js +19 -0
  122. package/dist/src/Presence/QueueParticipation.d.ts +17 -0
  123. package/dist/src/Presence/QueueParticipation.js +2 -0
  124. package/dist/src/Presence/QueueRoutingState.d.ts +27 -0
  125. package/dist/src/Presence/QueueRoutingState.js +9 -0
  126. package/dist/src/Presence/index.d.ts +3 -0
  127. package/dist/src/Presence/index.js +19 -0
  128. package/dist/src/Tickets/Category.d.ts +18 -0
  129. package/dist/src/Tickets/Dashboard.d.ts +60 -0
  130. package/dist/src/Tickets/Fields.d.ts +1 -0
  131. package/dist/src/Tickets/Layouts.d.ts +3 -1
  132. package/dist/src/Tickets/Workflow.d.ts +20 -0
  133. package/dist/src/Users/UserTrii.d.ts +10 -0
  134. package/dist/src/Users/UserTrii.js +8 -1
  135. package/dist/src/index.d.ts +2 -0
  136. package/dist/src/index.js +3 -1
  137. package/package.json +1 -1
  138. package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
  139. package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
@@ -0,0 +1,5 @@
1
+ export declare enum TicketAccessLevel {
2
+ ALL = "ALL",
3
+ GROUP = "GROUP",
4
+ AGENT = "AGENT"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TicketAccessLevel = void 0;
4
+ var TicketAccessLevel;
5
+ (function (TicketAccessLevel) {
6
+ TicketAccessLevel["ALL"] = "ALL";
7
+ TicketAccessLevel["GROUP"] = "GROUP";
8
+ TicketAccessLevel["AGENT"] = "AGENT";
9
+ })(TicketAccessLevel || (exports.TicketAccessLevel = TicketAccessLevel = {}));
package/dist/index.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- export * as Accounts from './Accounts/index';
2
- export * as AuditLogs from './AuditLogs/index';
3
- export * as Common from './Common/index';
4
- export * as Contacts from './Contacts/index';
5
- export * as Calendar from './Calendar/index';
6
- export * as Conversations from './Conversations/index';
7
- export * as Calls from './Calls/index';
8
- export * as Security from './Security/index';
9
- export * as Reports from './Reports/index';
10
- export * as Spaces from './Spaces/index';
11
- export * as Tickets from './Tickets/index';
12
- export * as Sales from './Sales/index';
13
- export * as Collections from './Collections/index';
14
- export * as Users from './Users/index';
15
- export * as Presence from './Presence/index';
16
- export * as ApiResponses from './ApiResponses/index';
17
- export * as EventsQueue from './Common/EventsQueue/index';
18
- export * as APIKeys from './PublicAPI/apiKey';
19
- export * as AI from './AI/index';
20
- export * as Shop from './Shop/index';
21
- export * as APIResponses from './ApiResponses/index';
22
- export * as Forms from './Forms/index';
1
+ export * as Accounts from './Accounts/index';
2
+ export * as AuditLogs from './AuditLogs/index';
3
+ export * as Common from './Common/index';
4
+ export * as Contacts from './Contacts/index';
5
+ export * as Calendar from './Calendar/index';
6
+ export * as Conversations from './Conversations/index';
7
+ export * as Calls from './Calls/index';
8
+ export * as Security from './Security/index';
9
+ export * as Reports from './Reports/index';
10
+ export * as Spaces from './Spaces/index';
11
+ export * as Tickets from './Tickets/index';
12
+ export * as Sales from './Sales/index';
13
+ export * as Collections from './Collections/index';
14
+ export * as Users from './Users/index';
15
+ export * as Presence from './Presence/index';
16
+ export * as ApiResponses from './ApiResponses/index';
17
+ export * as EventsQueue from './Common/EventsQueue/index';
18
+ export * as APIKeys from './PublicAPI/apiKey';
19
+ export * as AI from './AI/index';
20
+ export * as Shop from './Shop/index';
21
+ export * as APIResponses from './ApiResponses/index';
22
+ export * as Forms from './Forms/index';
package/dist/index.js CHANGED
@@ -1,58 +1,58 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.Forms = exports.APIResponses = exports.Shop = exports.AI = exports.APIKeys = exports.EventsQueue = exports.ApiResponses = exports.Presence = exports.Users = exports.Collections = exports.Sales = exports.Tickets = exports.Spaces = exports.Reports = exports.Security = exports.Calls = exports.Conversations = exports.Calendar = exports.Contacts = exports.Common = exports.AuditLogs = exports.Accounts = void 0;
37
- exports.Accounts = __importStar(require("./Accounts/index"));
38
- exports.AuditLogs = __importStar(require("./AuditLogs/index"));
39
- exports.Common = __importStar(require("./Common/index"));
40
- exports.Contacts = __importStar(require("./Contacts/index"));
41
- exports.Calendar = __importStar(require("./Calendar/index"));
42
- exports.Conversations = __importStar(require("./Conversations/index"));
43
- exports.Calls = __importStar(require("./Calls/index"));
44
- exports.Security = __importStar(require("./Security/index"));
45
- exports.Reports = __importStar(require("./Reports/index"));
46
- exports.Spaces = __importStar(require("./Spaces/index"));
47
- exports.Tickets = __importStar(require("./Tickets/index"));
48
- exports.Sales = __importStar(require("./Sales/index"));
49
- exports.Collections = __importStar(require("./Collections/index"));
50
- exports.Users = __importStar(require("./Users/index"));
51
- exports.Presence = __importStar(require("./Presence/index"));
52
- exports.ApiResponses = __importStar(require("./ApiResponses/index"));
53
- exports.EventsQueue = __importStar(require("./Common/EventsQueue/index"));
54
- exports.APIKeys = __importStar(require("./PublicAPI/apiKey"));
55
- exports.AI = __importStar(require("./AI/index"));
56
- exports.Shop = __importStar(require("./Shop/index"));
57
- exports.APIResponses = __importStar(require("./ApiResponses/index"));
58
- exports.Forms = __importStar(require("./Forms/index"));
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Forms = exports.APIResponses = exports.Shop = exports.AI = exports.APIKeys = exports.EventsQueue = exports.ApiResponses = exports.Presence = exports.Users = exports.Collections = exports.Sales = exports.Tickets = exports.Spaces = exports.Reports = exports.Security = exports.Calls = exports.Conversations = exports.Calendar = exports.Contacts = exports.Common = exports.AuditLogs = exports.Accounts = void 0;
37
+ exports.Accounts = __importStar(require("./Accounts/index"));
38
+ exports.AuditLogs = __importStar(require("./AuditLogs/index"));
39
+ exports.Common = __importStar(require("./Common/index"));
40
+ exports.Contacts = __importStar(require("./Contacts/index"));
41
+ exports.Calendar = __importStar(require("./Calendar/index"));
42
+ exports.Conversations = __importStar(require("./Conversations/index"));
43
+ exports.Calls = __importStar(require("./Calls/index"));
44
+ exports.Security = __importStar(require("./Security/index"));
45
+ exports.Reports = __importStar(require("./Reports/index"));
46
+ exports.Spaces = __importStar(require("./Spaces/index"));
47
+ exports.Tickets = __importStar(require("./Tickets/index"));
48
+ exports.Sales = __importStar(require("./Sales/index"));
49
+ exports.Collections = __importStar(require("./Collections/index"));
50
+ exports.Users = __importStar(require("./Users/index"));
51
+ exports.Presence = __importStar(require("./Presence/index"));
52
+ exports.ApiResponses = __importStar(require("./ApiResponses/index"));
53
+ exports.EventsQueue = __importStar(require("./Common/EventsQueue/index"));
54
+ exports.APIKeys = __importStar(require("./PublicAPI/apiKey"));
55
+ exports.AI = __importStar(require("./AI/index"));
56
+ exports.Shop = __importStar(require("./Shop/index"));
57
+ exports.APIResponses = __importStar(require("./ApiResponses/index"));
58
+ exports.Forms = __importStar(require("./Forms/index"));
@@ -0,0 +1,61 @@
1
+ import { UserInfo } from "../Users/UserTrii";
2
+ export interface Chat {
3
+ id: string;
4
+ spaceId: string;
5
+ type: ChatType;
6
+ ownerId: string;
7
+ chatName: string;
8
+ chatImage: string;
9
+ chatMembers: IChatMemeber[];
10
+ chatMembersCount: number;
11
+ remoteAddress: string;
12
+ remoteAddressId: string;
13
+ lastMessage: string;
14
+ lastMessageId?: string;
15
+ newMessagesCount: number;
16
+ newMessagesUnread: boolean;
17
+ pinned: boolean;
18
+ status: ConversationSatus;
19
+ archived: boolean;
20
+ /** Domain objects discussed or served by this conversation. */
21
+ contextReferences?: ContextReference[];
22
+ finalizedAt: Date;
23
+ finalizedBy?: string;
24
+ createdAt: Date;
25
+ updatedAt: Date;
26
+ }
27
+ export interface ContextReference {
28
+ entityType: ContextType;
29
+ entityId: string;
30
+ role?: string;
31
+ linkedAt: Date;
32
+ linkedBy?: string;
33
+ }
34
+ export declare enum ContextType {
35
+ TICKET = "TICKET",
36
+ CONVERSATION = "CONVERSATION",
37
+ LEAD = "LEAD",
38
+ DEBT = "DEBT"
39
+ }
40
+ export declare enum ChatType {
41
+ /**messages between two users */
42
+ DIRECT = 1,
43
+ /**messages between multiple users */
44
+ GROUP = 2,
45
+ /**Messages to discuss a conversation */
46
+ DISCUSS_CONVERSATION = 11,
47
+ /**Messages to discuss a ticket */
48
+ DISCUSS_TICKET = 12
49
+ }
50
+ export interface IChatMemeber {
51
+ joinTimeStamp: Date;
52
+ isAdmin: boolean;
53
+ userId: string;
54
+ user: UserInfo;
55
+ }
56
+ export declare enum ConversationSatus {
57
+ NEW = 1,
58
+ ACTIVE = 2,
59
+ FINALIZED = 3,
60
+ ARCHIVED = 4
61
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConversationSatus = exports.ChatType = exports.ContextType = void 0;
4
+ var ContextType;
5
+ (function (ContextType) {
6
+ ContextType["TICKET"] = "TICKET";
7
+ ContextType["CONVERSATION"] = "CONVERSATION";
8
+ ContextType["LEAD"] = "LEAD";
9
+ ContextType["DEBT"] = "DEBT";
10
+ })(ContextType || (exports.ContextType = ContextType = {}));
11
+ var ChatType;
12
+ (function (ChatType) {
13
+ /**messages between two users */
14
+ ChatType[ChatType["DIRECT"] = 1] = "DIRECT";
15
+ /**messages between multiple users */
16
+ ChatType[ChatType["GROUP"] = 2] = "GROUP";
17
+ /**Messages to discuss a conversation */
18
+ ChatType[ChatType["DISCUSS_CONVERSATION"] = 11] = "DISCUSS_CONVERSATION";
19
+ /**Messages to discuss a ticket */
20
+ ChatType[ChatType["DISCUSS_TICKET"] = 12] = "DISCUSS_TICKET";
21
+ })(ChatType || (exports.ChatType = ChatType = {}));
22
+ var ConversationSatus;
23
+ (function (ConversationSatus) {
24
+ ConversationSatus[ConversationSatus["NEW"] = 1] = "NEW";
25
+ ConversationSatus[ConversationSatus["ACTIVE"] = 2] = "ACTIVE";
26
+ ConversationSatus[ConversationSatus["FINALIZED"] = 3] = "FINALIZED";
27
+ ConversationSatus[ConversationSatus["ARCHIVED"] = 4] = "ARCHIVED";
28
+ })(ConversationSatus || (exports.ConversationSatus = ConversationSatus = {}));
@@ -44,8 +44,17 @@ interface IChannel {
44
44
  description?: string | null;
45
45
  type?: ChannelType | null;
46
46
  permissions?: Permission[] | null;
47
+ /**
48
+ * @deprecated Legacy channel assignment configuration. Use QueueRoutingConfig.
49
+ */
47
50
  assignTo?: ConversationAssigned;
51
+ /**
52
+ * @deprecated Legacy channel assignment configuration. Use QueueRoutingConfig.
53
+ */
48
54
  assignMethod: AssignMethod;
55
+ /**
56
+ * @deprecated Ownership is produced by the routing decision.
57
+ */
49
58
  assignToOwner?: boolean;
50
59
  /**
51
60
  * habilita la creacion de conversaciones para este canal, si esta en false, los mensajes entrantes no generaran conversaciones
@@ -14,7 +14,7 @@ export interface IBusiness {
14
14
  counters?: ICounters;
15
15
  name: string;
16
16
  imageUrl: string;
17
- owner?: string;
17
+ ownerUserId?: string;
18
18
  membersId: string[];
19
19
  members: IContactInfo[];
20
20
  phones: IContactAddress[];
@@ -54,7 +54,7 @@ export interface IContact {
54
54
  lastName: string;
55
55
  imageUrl: string;
56
56
  birthDate?: Date | null;
57
- owner?: string;
57
+ ownerUserId?: string;
58
58
  businessId?: string;
59
59
  businessName?: string;
60
60
  phones: IContactAddress[];
@@ -0,0 +1,81 @@
1
+ import { ID } from './Conversation';
2
+ export declare const CONVERSATION_ASSIGNMENT_EVENTS_COLLECTION = "conversation_assignment_events";
3
+ export type ConversationAssignmentEventType = 'enqueued' | 'routing_started' | 'offered' | 'assigned' | 'accepted' | 'transferred' | 'released' | 'timed_out' | 'requeued';
4
+ export type ConversationAssignmentReason = 'conversation_created' | 'routing_selected' | 'manual_assignment' | 'manual_transfer' | 'flow_routing' | 'offer_timeout' | 'assignment_timeout' | 'agent_accepted' | 'agent_released' | 'supervisor_released' | 'capacity_rebalance' | 'sla_escalation' | 'system_recovery';
5
+ export type AssignmentOwnerReference = {
6
+ type: 'none';
7
+ id?: never;
8
+ } | {
9
+ type: 'user' | 'bot' | 'flow';
10
+ id: ID;
11
+ };
12
+ export type AssignmentStateReference = {
13
+ status: 'unrouted';
14
+ assignmentId?: never;
15
+ queueId?: never;
16
+ owner: {
17
+ type: 'none';
18
+ id?: never;
19
+ } | {
20
+ type: 'bot' | 'flow';
21
+ id: ID;
22
+ };
23
+ } | {
24
+ status: 'queued' | 'routing';
25
+ assignmentId: ID;
26
+ queueId: ID;
27
+ owner: {
28
+ type: 'none';
29
+ id?: never;
30
+ };
31
+ } | {
32
+ status: 'offered' | 'assigned' | 'accepted';
33
+ assignmentId: ID;
34
+ queueId: ID;
35
+ owner: {
36
+ type: 'user';
37
+ id: ID;
38
+ };
39
+ };
40
+ export type AssignmentActorReference = {
41
+ type: 'system';
42
+ id?: never;
43
+ } | {
44
+ type: 'user' | 'bot' | 'flow';
45
+ id: ID;
46
+ };
47
+ /**
48
+ * Immutable domain event stored in conversation_assignment_events.
49
+ *
50
+ * Events must only be inserted. Corrections are represented by a new event.
51
+ */
52
+ export interface ConversationAssignmentEvent {
53
+ id: ID;
54
+ spaceId: ID;
55
+ conversationId: ID;
56
+ /**
57
+ * Monotonic order within a conversation.
58
+ */
59
+ sequence: number;
60
+ eventType: ConversationAssignmentEventType;
61
+ reason: ConversationAssignmentReason;
62
+ /**
63
+ * Undefined only when no previous assignment state existed.
64
+ */
65
+ previous?: AssignmentStateReference;
66
+ current: AssignmentStateReference;
67
+ actor: AssignmentActorReference;
68
+ routingDecisionId?: ID;
69
+ /**
70
+ * Version of conversations after applying the transition.
71
+ */
72
+ conversationVersion: number;
73
+ correlationId?: ID;
74
+ causationId?: ID;
75
+ idempotencyKey: string;
76
+ /**
77
+ * Domain time and persistence time, respectively.
78
+ */
79
+ occurredAt: Date;
80
+ recordedAt: Date;
81
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONVERSATION_ASSIGNMENT_EVENTS_COLLECTION = void 0;
4
+ exports.CONVERSATION_ASSIGNMENT_EVENTS_COLLECTION = 'conversation_assignment_events';