@trii/types 2.10.678 → 2.10.680
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/dist/AI/MapPolygon.d.ts +22 -0
- package/dist/AI/MapPolygon.js +2 -0
- package/dist/Conversations/Conversation.d.ts +8 -8
- package/dist/Conversations/Flows/Nodes/NodeAIChatBot.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeAIChatBot.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeApi.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeApi.js +183 -0
- package/dist/Conversations/Flows/Nodes/NodeBotIA.d.ts +15 -0
- package/dist/Conversations/Flows/Nodes/NodeBotIA.js +6 -0
- package/dist/Conversations/Flows/Nodes/NodeChatBotIA.d.ts +15 -0
- package/dist/Conversations/Flows/Nodes/NodeChatBotIA.js +6 -0
- package/dist/Conversations/Flows/Nodes/NodeConditional.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConditional.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeContactSearch.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeContactSearch.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeContactUpdate.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeContactUpdate.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeFillForm.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeFillForm.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeFillTicket.d.ts +1 -0
- package/dist/Conversations/Flows/Nodes/NodeFillTicket.js +9 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleCalendar.d.ts +20 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleCalendar.js +2 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleMaps copy.d.ts +12 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleMaps copy.js +6 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleMaps.d.ts +15 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleMaps.js +2 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgReply.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgReply.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgSend.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgSend.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgText.d.ts +1 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgText.js +27 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeRedirect.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeRedirect.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeSendEmail.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeSendEmail.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeSqlQuery.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeSqlQuery.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeStart.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeStart.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeTimer.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeTimer.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeToolCalculator.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolCalculator.js +37 -0
- package/dist/Conversations/Flows/Nodes/NodeToolContacts.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolContacts.js +59 -0
- package/dist/Conversations/Flows/Nodes/NodeToolFunction.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolFunction.js +45 -0
- package/dist/Conversations/Flows/Nodes/NodeToolGoogleCalendar.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolGoogleCalendar.js +87 -0
- package/dist/Conversations/Flows/Nodes/NodeToolGoogleMaps.d.ts +1 -0
- package/dist/Conversations/Flows/Nodes/NodeToolGoogleMaps.js +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolKnowledge.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolKnowledge.js +52 -0
- package/dist/Conversations/Flows/Nodes/NodeToolMapsCheckPolygon.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolMapsCheckPolygon.js +59 -0
- package/dist/Conversations/Flows/Nodes/NodeToolMcpClient.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolMcpClient.js +45 -0
- package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.js +81 -0
- package/dist/Conversations/Flows/Nodes/index.d.ts +24 -0
- package/dist/Conversations/Flows/Nodes/index.js +40 -0
- package/dist/Conversations/InboxMongo.d.ts +12 -12
- package/dist/Conversations/Routing.d.ts +14 -13
- package/dist/Conversations/Sla.d.ts +141 -0
- package/dist/Conversations/Sla.js +6 -0
- package/dist/Conversations/index.d.ts +1 -0
- package/dist/Conversations/index.js +1 -0
- package/dist/Presence/ChannelRoutingState.d.ts +17 -0
- package/dist/Presence/ChannelRoutingState.js +9 -0
- package/dist/Spaces/spaces.d.ts +2 -2
- package/dist/Tickets/AccessLevel.d.ts +5 -0
- package/dist/Tickets/AccessLevel.js +9 -0
- package/dist/index.d.ts +22 -22
- package/dist/index.js +58 -58
- package/dist/src/Chats/Chat.d.ts +61 -0
- package/dist/src/Chats/Chat.js +28 -0
- package/dist/src/Common/Channels/Channel.d.ts +9 -0
- package/dist/src/Contacts/contacts.d.ts +2 -2
- package/dist/src/Conversations/Assignment.d.ts +81 -0
- package/dist/src/Conversations/Assignment.js +4 -0
- package/dist/src/Conversations/Conversation.d.ts +234 -52
- package/dist/src/Conversations/Conversation.js +14 -34
- package/dist/src/Conversations/DashBoard/dashboard.d.ts +2 -2
- package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +280 -123
- package/dist/src/Conversations/Flows/Workflows/Workflow.js +85 -35
- package/dist/src/Conversations/Groups/Group.d.ts +2 -8
- package/dist/src/Conversations/Groups/Group.js +0 -6
- package/dist/src/Conversations/InboxMongo.d.ts +154 -0
- package/dist/src/Conversations/InboxMongo.js +128 -0
- package/dist/src/Conversations/InboxProjection.d.ts +162 -0
- package/dist/src/Conversations/InboxProjection.js +2 -0
- package/dist/src/Conversations/Label.d.ts +1 -1
- package/dist/src/Conversations/Outbox.d.ts +24 -0
- package/dist/src/Conversations/Outbox.js +4 -0
- package/dist/src/Conversations/Queue.d.ts +66 -0
- package/dist/src/Conversations/Queue.js +4 -0
- package/dist/src/Conversations/Routing.d.ts +164 -0
- package/dist/src/Conversations/Routing.js +2 -0
- package/dist/src/Conversations/Transfer.d.ts +73 -0
- package/dist/src/Conversations/Transfer.js +2 -0
- package/dist/src/Conversations/WebHook.d.ts +1 -1
- package/dist/src/Conversations/index.d.ts +8 -1
- package/dist/src/Conversations/index.js +8 -1
- package/dist/src/Forms/API.d.ts +53 -0
- package/dist/src/Forms/API.js +2 -0
- package/dist/src/Forms/SubmittedForm.d.ts +56 -0
- package/dist/src/Forms/SubmittedForm.js +9 -0
- package/dist/src/Forms/index.d.ts +2 -0
- package/dist/src/Forms/index.js +18 -0
- package/dist/src/Presence/AgentPause.d.ts +24 -0
- package/dist/src/Presence/AgentPause.js +19 -0
- package/dist/src/Presence/QueueParticipation.d.ts +17 -0
- package/dist/src/Presence/QueueParticipation.js +2 -0
- package/dist/src/Presence/QueueRoutingState.d.ts +27 -0
- package/dist/src/Presence/QueueRoutingState.js +9 -0
- package/dist/src/Presence/index.d.ts +3 -0
- package/dist/src/Presence/index.js +19 -0
- package/dist/src/Tickets/Category.d.ts +18 -0
- package/dist/src/Tickets/Dashboard.d.ts +60 -0
- package/dist/src/Tickets/Fields.d.ts +1 -0
- package/dist/src/Tickets/Layouts.d.ts +3 -1
- package/dist/src/Tickets/Workflow.d.ts +20 -0
- package/dist/src/Users/UserTrii.d.ts +10 -0
- package/dist/src/Users/UserTrii.js +8 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +3 -1
- package/package.json +1 -1
- package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
- package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
|
@@ -6,14 +6,11 @@ import { IContactAddress, IContactInfo } from "../Contacts/contacts";
|
|
|
6
6
|
import { IEnding } from "./Ending";
|
|
7
7
|
export interface IConversation {
|
|
8
8
|
id: string;
|
|
9
|
-
/**only for Front-End */
|
|
10
|
-
idLocal?: number;
|
|
11
9
|
spaceId: string;
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
version: number;
|
|
11
|
+
/**only for Front-End */
|
|
14
12
|
chatName: string;
|
|
15
13
|
chatImage: string;
|
|
16
|
-
chatMembers: IChatMemeber[];
|
|
17
14
|
chatMembersCount: number;
|
|
18
15
|
whatsappGroupInfo?: IWhatsAppGroupInfo;
|
|
19
16
|
contactInfo?: IContactInfo;
|
|
@@ -21,48 +18,47 @@ export interface IConversation {
|
|
|
21
18
|
remoteAddress: string;
|
|
22
19
|
remoteAddressId: string;
|
|
23
20
|
channelInfo: Channels.IChannelInfo;
|
|
21
|
+
status: ConversationStatus;
|
|
22
|
+
priority: 'low' | 'normal' | 'high' | 'urgent';
|
|
23
|
+
assignment: ConversationAssignmentSnapshot;
|
|
24
|
+
sla: {
|
|
25
|
+
status: 'none' | 'running' | 'warning' | 'breached' | 'met';
|
|
26
|
+
deadlineAt?: Date;
|
|
27
|
+
policyId?: string;
|
|
28
|
+
version: number;
|
|
29
|
+
};
|
|
24
30
|
lastMessage: string;
|
|
25
31
|
lastMessageId?: string;
|
|
26
32
|
newMessagesCount: number;
|
|
27
33
|
newMessagesUnread: boolean;
|
|
34
|
+
lastActivityAt: Date;
|
|
35
|
+
lastCustomerActivityAt?: Date;
|
|
36
|
+
lastAgentActivityAt?: Date;
|
|
28
37
|
labels: ILabel[];
|
|
29
38
|
pinned: boolean;
|
|
30
|
-
transferBy?: string;
|
|
31
|
-
transferTo?: ConversationAssigned;
|
|
32
39
|
expired: boolean;
|
|
33
|
-
expiredAssignedTo: ConversationAssigned;
|
|
34
|
-
status: ConversationSatus;
|
|
35
|
-
assignedTo?: ConversationAssigned;
|
|
36
40
|
participants: UserInfo[];
|
|
37
41
|
archived: boolean;
|
|
42
|
+
spam: boolean;
|
|
38
43
|
externalMessagingWindowEndAt?: Date;
|
|
39
44
|
workflowId?: string;
|
|
40
45
|
botStatus: ConversationBotStatus;
|
|
41
46
|
botVars: ConversationBotVar[];
|
|
42
47
|
metadata: IConversationMetadata;
|
|
43
48
|
/** Domain objects discussed or served by this conversation. */
|
|
44
|
-
contextReferences?: IConversationContextReference[];
|
|
45
|
-
finalizedAt: Date;
|
|
46
|
-
finalizedBy?: string;
|
|
47
49
|
finalizedOnWebChat: Date;
|
|
48
50
|
ending?: IEnding;
|
|
49
51
|
qualityEvaluation?: IInteractionQualityEvaluation;
|
|
50
52
|
reOpenAt?: Date;
|
|
53
|
+
reOpenByUserId?: string;
|
|
54
|
+
reOpenPolicyId?: string;
|
|
51
55
|
createdAt: Date;
|
|
52
56
|
updatedAt: Date;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
DEBT = "DEBT"
|
|
59
|
-
}
|
|
60
|
-
export interface IConversationContextReference {
|
|
61
|
-
entityType: ConversationContextType;
|
|
62
|
-
entityId: string;
|
|
63
|
-
role?: string;
|
|
64
|
-
linkedAt: Date;
|
|
65
|
-
linkedBy?: string;
|
|
57
|
+
resolvedAt?: Date;
|
|
58
|
+
resolvedByUserId?: string;
|
|
59
|
+
resolutionReasonId?: string;
|
|
60
|
+
finalizedAt: Date;
|
|
61
|
+
finalizedBy?: string;
|
|
66
62
|
}
|
|
67
63
|
export interface IWhatsAppGroupInfo {
|
|
68
64
|
whatsappGroupId: string;
|
|
@@ -122,29 +118,14 @@ export declare enum ConversationBotStatus {
|
|
|
122
118
|
FINALIZED = 4,
|
|
123
119
|
CANCELED = 5
|
|
124
120
|
}
|
|
125
|
-
export
|
|
121
|
+
export interface ConversationBotVar {
|
|
126
122
|
title: string;
|
|
127
123
|
value: string;
|
|
128
124
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
DIRECT = 1,
|
|
134
|
-
/**messages between multiple users */
|
|
135
|
-
GROUP = 2,
|
|
136
|
-
/**Messages to discuss a conversation */
|
|
137
|
-
DISCUSS_CONVERSATION = 11,
|
|
138
|
-
/**Messages to discuss a ticket */
|
|
139
|
-
DISCUSS_TICKET = 12
|
|
140
|
-
}
|
|
141
|
-
export interface IChatMemeber {
|
|
142
|
-
joinTimeStamp: Date;
|
|
143
|
-
isAdmin: boolean;
|
|
144
|
-
userId: string;
|
|
145
|
-
user: UserInfo;
|
|
146
|
-
}
|
|
147
|
-
export declare class ConversationAssigned {
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated Legacy channel assignment configuration. Use QueueRoutingConfig.
|
|
127
|
+
*/
|
|
128
|
+
export interface ConversationAssigned {
|
|
148
129
|
groupInfo?: GroupInfo;
|
|
149
130
|
userInfo?: UserInfo;
|
|
150
131
|
userIds?: string[];
|
|
@@ -153,15 +134,216 @@ export declare enum ConversationDirection {
|
|
|
153
134
|
INBOUND = 1,
|
|
154
135
|
OUTBOUND = 2
|
|
155
136
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
FINALIZED = 3,
|
|
160
|
-
ARCHIVED = 4
|
|
161
|
-
}
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated Use QueueDistributionMode and QueueRoutingStrategy.
|
|
139
|
+
*/
|
|
162
140
|
export declare enum AssignMethod {
|
|
163
141
|
ALL = 0,
|
|
164
142
|
ROUND_ROBIN = 1,
|
|
165
143
|
RANDOM = 2,
|
|
166
144
|
LEAST_BUSY = 3
|
|
167
145
|
}
|
|
146
|
+
export declare enum ConversationStatus {
|
|
147
|
+
NEW = 1,
|
|
148
|
+
OPEN = 2,
|
|
149
|
+
ACTIVE = 2,// Alias for OPEN
|
|
150
|
+
RESOLVED = 3,
|
|
151
|
+
FINALIZED = 3,// Alias for RESOLVED
|
|
152
|
+
WAITING = 10
|
|
153
|
+
}
|
|
154
|
+
export type InboxViewId = 'pending' | 'following' | 'sla_warning' | 'sla_breached' | 'team_sla_breached' | 'resolved';
|
|
155
|
+
export type OwnerType = 'user' | 'bot' | 'flow' | 'none';
|
|
156
|
+
export interface NoConversationOwner {
|
|
157
|
+
type: 'none';
|
|
158
|
+
id?: never;
|
|
159
|
+
displayName?: never;
|
|
160
|
+
avatarUrl?: never;
|
|
161
|
+
}
|
|
162
|
+
export interface UserConversationOwner {
|
|
163
|
+
type: 'user';
|
|
164
|
+
id: ID;
|
|
165
|
+
displayName?: string;
|
|
166
|
+
avatarUrl?: string;
|
|
167
|
+
}
|
|
168
|
+
export interface BotConversationOwner {
|
|
169
|
+
type: 'bot';
|
|
170
|
+
id: ID;
|
|
171
|
+
displayName?: string;
|
|
172
|
+
avatarUrl?: string;
|
|
173
|
+
}
|
|
174
|
+
export interface FlowConversationOwner {
|
|
175
|
+
type: 'flow';
|
|
176
|
+
id: ID;
|
|
177
|
+
displayName?: string;
|
|
178
|
+
avatarUrl?: string;
|
|
179
|
+
}
|
|
180
|
+
export type ConversationOwner = NoConversationOwner | UserConversationOwner | BotConversationOwner | FlowConversationOwner;
|
|
181
|
+
export type ConversationAssignmentStatus = 'unrouted' | 'queued' | 'routing' | 'offered' | 'assigned' | 'accepted';
|
|
182
|
+
export type ConversationAssignmentSource = 'routing' | 'manual' | 'transfer' | 'requeue';
|
|
183
|
+
interface QueuedConversationAssignmentBase {
|
|
184
|
+
assignmentId: ID;
|
|
185
|
+
queueId: ID;
|
|
186
|
+
source: ConversationAssignmentSource;
|
|
187
|
+
queuedAt: Date;
|
|
188
|
+
lastRoutingDecisionId?: ID;
|
|
189
|
+
}
|
|
190
|
+
export type ConversationAssignmentSnapshot = {
|
|
191
|
+
status: 'unrouted';
|
|
192
|
+
assignmentId?: never;
|
|
193
|
+
queueId?: never;
|
|
194
|
+
owner: NoConversationOwner | BotConversationOwner | FlowConversationOwner;
|
|
195
|
+
source?: never;
|
|
196
|
+
queuedAt?: never;
|
|
197
|
+
lastRoutingDecisionId?: never;
|
|
198
|
+
offeredAt?: never;
|
|
199
|
+
offerExpiresAt?: never;
|
|
200
|
+
assignedAt?: never;
|
|
201
|
+
acceptedAt?: never;
|
|
202
|
+
} | (QueuedConversationAssignmentBase & {
|
|
203
|
+
status: 'queued' | 'routing';
|
|
204
|
+
owner: NoConversationOwner;
|
|
205
|
+
offeredAt?: never;
|
|
206
|
+
offerExpiresAt?: never;
|
|
207
|
+
assignedAt?: never;
|
|
208
|
+
acceptedAt?: never;
|
|
209
|
+
}) | (QueuedConversationAssignmentBase & {
|
|
210
|
+
status: 'offered';
|
|
211
|
+
owner: UserConversationOwner;
|
|
212
|
+
offeredAt: Date;
|
|
213
|
+
offerExpiresAt?: Date;
|
|
214
|
+
assignedAt?: never;
|
|
215
|
+
acceptedAt?: never;
|
|
216
|
+
}) | (QueuedConversationAssignmentBase & {
|
|
217
|
+
status: 'assigned';
|
|
218
|
+
owner: UserConversationOwner;
|
|
219
|
+
offeredAt?: Date;
|
|
220
|
+
offerExpiresAt?: Date;
|
|
221
|
+
assignedAt: Date;
|
|
222
|
+
acceptedAt?: never;
|
|
223
|
+
}) | (QueuedConversationAssignmentBase & {
|
|
224
|
+
status: 'accepted';
|
|
225
|
+
owner: UserConversationOwner;
|
|
226
|
+
offeredAt?: Date;
|
|
227
|
+
offerExpiresAt?: Date;
|
|
228
|
+
assignedAt: Date;
|
|
229
|
+
acceptedAt: Date;
|
|
230
|
+
});
|
|
231
|
+
export type ActorType = 'user' | 'contact' | 'bot' | 'flow' | 'system';
|
|
232
|
+
export type ParticipantRole = 'owner' | 'collaborator' | 'follower' | 'mentioned' | 'supervisor' | 'bot' | 'flow' | 'historical';
|
|
233
|
+
export type ConversationEventType = 'conversation_created' | 'queued' | 'assigned' | 'accepted' | 'transferred' | 'consult_requested' | 'collaborator_added' | 'participant_added' | 'participant_removed' | 'participation_abandoned' | 'follow_started' | 'follow_stopped' | 'message_sent' | 'message_received' | 'internal_note_added' | 'bot_started' | 'bot_finished' | 'flow_started' | 'flow_finished' | 'status_changed' | 'resolved' | 'reopened' | 'sla_warning' | 'sla_breached' | 'sla_started' | 'sla_paused' | 'sla_resumed' | 'sla_met' | 'sla_overridden';
|
|
234
|
+
export type ID = string;
|
|
235
|
+
export type ConversationSubscriptionSource = 'manual' | 'assigned' | 'participated' | 'mentioned' | 'supervisor' | 'rule';
|
|
236
|
+
export type ConversationSubscriptionNotificationEvent = 'customer_message' | 'internal_mention' | 'assignment_change' | 'acceptance' | 'resolution' | 'reopen';
|
|
237
|
+
export type ConversationSubscriptionNotifications = {
|
|
238
|
+
mode: 'all' | 'muted';
|
|
239
|
+
events?: never;
|
|
240
|
+
} | {
|
|
241
|
+
mode: 'custom';
|
|
242
|
+
events: [
|
|
243
|
+
ConversationSubscriptionNotificationEvent,
|
|
244
|
+
...ConversationSubscriptionNotificationEvent[]
|
|
245
|
+
];
|
|
246
|
+
};
|
|
247
|
+
interface ConversationSubscriptionBase {
|
|
248
|
+
id: ID;
|
|
249
|
+
spaceId: string;
|
|
250
|
+
conversationId: ID;
|
|
251
|
+
userId: ID;
|
|
252
|
+
source: ConversationSubscriptionSource;
|
|
253
|
+
notifications: ConversationSubscriptionNotifications;
|
|
254
|
+
createdAt: Date;
|
|
255
|
+
updatedAt: Date;
|
|
256
|
+
version: number;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Current following state for one user/conversation pair.
|
|
260
|
+
*
|
|
261
|
+
* A subscription is persistent product intent. Assignment or participation
|
|
262
|
+
* visibility must not create it unless an explicit auto-follow policy applies.
|
|
263
|
+
*/
|
|
264
|
+
export type ConversationSubscription = (ConversationSubscriptionBase & {
|
|
265
|
+
status: 'following';
|
|
266
|
+
followedAt: Date;
|
|
267
|
+
unfollowedAt?: never;
|
|
268
|
+
}) | (ConversationSubscriptionBase & {
|
|
269
|
+
status: 'unfollowed';
|
|
270
|
+
followedAt: Date;
|
|
271
|
+
unfollowedAt: Date;
|
|
272
|
+
});
|
|
273
|
+
export type InboxVisibilityReason = 'manual_follow' | 'assigned_to_user' | 'shared_queue_member' | 'queue_claimable' | 'active_participant' | 'sla_warning_owner' | 'sla_breached_owner' | 'supervised_queue_sla' | 'supervisor_escalation' | 'resolved_visible';
|
|
274
|
+
export interface ConversationInboxSnapshot {
|
|
275
|
+
interactionKind: 'private' | 'wall_post' | 'comment' | 'mention';
|
|
276
|
+
channelType: string;
|
|
277
|
+
contact: {
|
|
278
|
+
id?: ID;
|
|
279
|
+
displayName: string;
|
|
280
|
+
initials?: string;
|
|
281
|
+
};
|
|
282
|
+
status: ConversationStatus;
|
|
283
|
+
owner: ConversationOwner;
|
|
284
|
+
queueId?: ID;
|
|
285
|
+
preview?: string;
|
|
286
|
+
unreadCount: number;
|
|
287
|
+
priority: 'low' | 'normal' | 'high' | 'urgent';
|
|
288
|
+
sla: {
|
|
289
|
+
status: 'none' | 'running' | 'warning' | 'breached' | 'met';
|
|
290
|
+
deadlineAt?: Date;
|
|
291
|
+
};
|
|
292
|
+
lastActivityAt: Date;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Membership of one materialized conversation in one logical inbox view.
|
|
296
|
+
*
|
|
297
|
+
* visibilityReasons has set semantics: values must be unique and non-empty.
|
|
298
|
+
* Removing one reason preserves the view while at least one reason remains.
|
|
299
|
+
*/
|
|
300
|
+
export interface UserInboxItemView {
|
|
301
|
+
viewId: InboxViewId;
|
|
302
|
+
visibilityReasons: [
|
|
303
|
+
InboxVisibilityReason,
|
|
304
|
+
...InboxVisibilityReason[]
|
|
305
|
+
];
|
|
306
|
+
requiresAction: boolean;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Materialized read model. There is exactly one document for each
|
|
310
|
+
* spaceId + userId + conversationId tuple.
|
|
311
|
+
*
|
|
312
|
+
* views must contain unique viewId values. Delete the document when the last
|
|
313
|
+
* view is removed.
|
|
314
|
+
*/
|
|
315
|
+
export interface UserInboxItemDocument {
|
|
316
|
+
id: ID;
|
|
317
|
+
spaceId: ID;
|
|
318
|
+
userId: ID;
|
|
319
|
+
conversationId: ID;
|
|
320
|
+
views: UserInboxItemView[];
|
|
321
|
+
snapshot: ConversationInboxSnapshot;
|
|
322
|
+
pinned: boolean;
|
|
323
|
+
priorityScore: number;
|
|
324
|
+
sortAt: Date;
|
|
325
|
+
conversationVersion: number;
|
|
326
|
+
subscriptionVersion?: number;
|
|
327
|
+
projectionVersion: number;
|
|
328
|
+
lastSourceEventId: ID;
|
|
329
|
+
projectedAt: Date;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Materialized counters for exactly one user/view pair.
|
|
333
|
+
*
|
|
334
|
+
* total and requiresAction count conversations, never visibility reasons.
|
|
335
|
+
* unread counts conversations whose snapshot.unreadCount is greater than zero,
|
|
336
|
+
* not the number of unread messages.
|
|
337
|
+
*/
|
|
338
|
+
export interface UserInboxCounterDocument {
|
|
339
|
+
id: ID;
|
|
340
|
+
spaceId: ID;
|
|
341
|
+
userId: ID;
|
|
342
|
+
viewId: InboxViewId;
|
|
343
|
+
total: number;
|
|
344
|
+
requiresAction: number;
|
|
345
|
+
unread: number;
|
|
346
|
+
projectionVersion: number;
|
|
347
|
+
updatedAt: Date;
|
|
348
|
+
}
|
|
349
|
+
export {};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var ConversationContextType;
|
|
5
|
-
(function (ConversationContextType) {
|
|
6
|
-
ConversationContextType["TICKET"] = "TICKET";
|
|
7
|
-
ConversationContextType["CONVERSATION"] = "CONVERSATION";
|
|
8
|
-
ConversationContextType["LEAD"] = "LEAD";
|
|
9
|
-
ConversationContextType["DEBT"] = "DEBT";
|
|
10
|
-
})(ConversationContextType || (exports.ConversationContextType = ConversationContextType = {}));
|
|
3
|
+
exports.ConversationStatus = exports.AssignMethod = exports.ConversationDirection = exports.ConversationBotStatus = void 0;
|
|
11
4
|
var ConversationBotStatus;
|
|
12
5
|
(function (ConversationBotStatus) {
|
|
13
6
|
ConversationBotStatus[ConversationBotStatus["NONE"] = 0] = "NONE";
|
|
@@ -16,37 +9,14 @@ var ConversationBotStatus;
|
|
|
16
9
|
ConversationBotStatus[ConversationBotStatus["FINALIZED"] = 4] = "FINALIZED";
|
|
17
10
|
ConversationBotStatus[ConversationBotStatus["CANCELED"] = 5] = "CANCELED";
|
|
18
11
|
})(ConversationBotStatus || (exports.ConversationBotStatus = ConversationBotStatus = {}));
|
|
19
|
-
class ConversationBotVar {
|
|
20
|
-
}
|
|
21
|
-
exports.ConversationBotVar = ConversationBotVar;
|
|
22
|
-
var ChatType;
|
|
23
|
-
(function (ChatType) {
|
|
24
|
-
/**Conversation with a external channel/contact */
|
|
25
|
-
ChatType[ChatType["EXTERNAL"] = 0] = "EXTERNAL";
|
|
26
|
-
/**messages between two users */
|
|
27
|
-
ChatType[ChatType["DIRECT"] = 1] = "DIRECT";
|
|
28
|
-
/**messages between multiple users */
|
|
29
|
-
ChatType[ChatType["GROUP"] = 2] = "GROUP";
|
|
30
|
-
/**Messages to discuss a conversation */
|
|
31
|
-
ChatType[ChatType["DISCUSS_CONVERSATION"] = 11] = "DISCUSS_CONVERSATION";
|
|
32
|
-
/**Messages to discuss a ticket */
|
|
33
|
-
ChatType[ChatType["DISCUSS_TICKET"] = 12] = "DISCUSS_TICKET";
|
|
34
|
-
})(ChatType || (exports.ChatType = ChatType = {}));
|
|
35
|
-
class ConversationAssigned {
|
|
36
|
-
}
|
|
37
|
-
exports.ConversationAssigned = ConversationAssigned;
|
|
38
12
|
var ConversationDirection;
|
|
39
13
|
(function (ConversationDirection) {
|
|
40
14
|
ConversationDirection[ConversationDirection["INBOUND"] = 1] = "INBOUND";
|
|
41
15
|
ConversationDirection[ConversationDirection["OUTBOUND"] = 2] = "OUTBOUND";
|
|
42
16
|
})(ConversationDirection || (exports.ConversationDirection = ConversationDirection = {}));
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
ConversationSatus[ConversationSatus["ACTIVE"] = 2] = "ACTIVE";
|
|
47
|
-
ConversationSatus[ConversationSatus["FINALIZED"] = 3] = "FINALIZED";
|
|
48
|
-
ConversationSatus[ConversationSatus["ARCHIVED"] = 4] = "ARCHIVED";
|
|
49
|
-
})(ConversationSatus || (exports.ConversationSatus = ConversationSatus = {}));
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use QueueDistributionMode and QueueRoutingStrategy.
|
|
19
|
+
*/
|
|
50
20
|
var AssignMethod;
|
|
51
21
|
(function (AssignMethod) {
|
|
52
22
|
AssignMethod[AssignMethod["ALL"] = 0] = "ALL";
|
|
@@ -54,3 +24,13 @@ var AssignMethod;
|
|
|
54
24
|
AssignMethod[AssignMethod["RANDOM"] = 2] = "RANDOM";
|
|
55
25
|
AssignMethod[AssignMethod["LEAST_BUSY"] = 3] = "LEAST_BUSY";
|
|
56
26
|
})(AssignMethod || (exports.AssignMethod = AssignMethod = {}));
|
|
27
|
+
var ConversationStatus;
|
|
28
|
+
(function (ConversationStatus) {
|
|
29
|
+
ConversationStatus[ConversationStatus["NEW"] = 1] = "NEW";
|
|
30
|
+
ConversationStatus[ConversationStatus["OPEN"] = 2] = "OPEN";
|
|
31
|
+
ConversationStatus[ConversationStatus["ACTIVE"] = 2] = "ACTIVE";
|
|
32
|
+
ConversationStatus[ConversationStatus["RESOLVED"] = 3] = "RESOLVED";
|
|
33
|
+
ConversationStatus[ConversationStatus["FINALIZED"] = 3] = "FINALIZED";
|
|
34
|
+
ConversationStatus[ConversationStatus["WAITING"] = 10] = "WAITING";
|
|
35
|
+
// ARCHIVED = 4,
|
|
36
|
+
})(ConversationStatus || (exports.ConversationStatus = ConversationStatus = {}));
|
|
@@ -17,8 +17,8 @@ export interface BodyDashboard {
|
|
|
17
17
|
memberId: string | null;
|
|
18
18
|
groupId: string;
|
|
19
19
|
ending?: string | null;
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/** Filters conversations by IConversation.assignment.owner.id. */
|
|
21
|
+
ownerUserId?: string | null;
|
|
22
22
|
}
|
|
23
23
|
export declare enum GeneralDashboardType {
|
|
24
24
|
UNASSIGNED = 0,
|