@trii/types 2.10.676 → 2.10.678

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 (32) hide show
  1. package/dist/Chats/Chat.d.ts +61 -0
  2. package/dist/Chats/Chat.js +28 -0
  3. package/dist/Common/Channels/Channel.d.ts +9 -0
  4. package/dist/Contacts/contacts.d.ts +2 -2
  5. package/dist/Conversations/Assignment.d.ts +81 -0
  6. package/dist/Conversations/Assignment.js +4 -0
  7. package/dist/Conversations/Conversation.d.ts +233 -53
  8. package/dist/Conversations/Conversation.js +14 -34
  9. package/dist/Conversations/DashBoard/dashboard.d.ts +2 -2
  10. package/dist/Conversations/Groups/Group.d.ts +2 -9
  11. package/dist/Conversations/Groups/Group.js +0 -6
  12. package/dist/Conversations/InboxMongo.d.ts +154 -0
  13. package/dist/Conversations/InboxMongo.js +128 -0
  14. package/dist/Conversations/InboxProjection.d.ts +162 -0
  15. package/dist/Conversations/InboxProjection.js +2 -0
  16. package/dist/Conversations/Label.d.ts +1 -1
  17. package/dist/Conversations/Outbox.d.ts +24 -0
  18. package/dist/Conversations/Outbox.js +4 -0
  19. package/dist/Conversations/Queue.d.ts +66 -0
  20. package/dist/Conversations/Queue.js +4 -0
  21. package/dist/Conversations/Routing.d.ts +163 -0
  22. package/dist/Conversations/Routing.js +2 -0
  23. package/dist/Conversations/Transfer.d.ts +73 -0
  24. package/dist/Conversations/Transfer.js +2 -0
  25. package/dist/Conversations/WebHook.d.ts +1 -1
  26. package/dist/Conversations/index.d.ts +7 -1
  27. package/dist/Conversations/index.js +7 -1
  28. package/dist/Presence/QueueParticipation.d.ts +2 -2
  29. package/dist/Presence/QueueRoutingState.d.ts +2 -2
  30. package/dist/Tickets/Dashboard.d.ts +17 -0
  31. package/dist/Tickets/Dashboard.js +13 -1
  32. package/package.json +1 -1
@@ -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';
@@ -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
- type: ChatType;
13
- ownerId: string;
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,19 +18,25 @@ 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
- followedBy: string[];
33
39
  expired: boolean;
34
- expiredAssignedTo: ConversationAssigned;
35
- status: ConversationSatus;
36
- assignedTo?: ConversationAssigned;
37
40
  participants: UserInfo[];
38
41
  archived: boolean;
39
42
  spam: boolean;
@@ -43,28 +46,19 @@ export interface IConversation {
43
46
  botVars: ConversationBotVar[];
44
47
  metadata: IConversationMetadata;
45
48
  /** Domain objects discussed or served by this conversation. */
46
- contextReferences?: IConversationContextReference[];
47
- finalizedAt: Date;
48
- finalizedBy?: string;
49
49
  finalizedOnWebChat: Date;
50
50
  ending?: IEnding;
51
51
  qualityEvaluation?: IInteractionQualityEvaluation;
52
52
  reOpenAt?: Date;
53
+ reOpenByUserId?: string;
54
+ reOpenPolicyId?: string;
53
55
  createdAt: Date;
54
56
  updatedAt: Date;
55
- }
56
- export declare enum ConversationContextType {
57
- TICKET = "TICKET",
58
- CONVERSATION = "CONVERSATION",
59
- LEAD = "LEAD",
60
- DEBT = "DEBT"
61
- }
62
- export interface IConversationContextReference {
63
- entityType: ConversationContextType;
64
- entityId: string;
65
- role?: string;
66
- linkedAt: Date;
67
- linkedBy?: string;
57
+ resolvedAt?: Date;
58
+ resolvedByUserId?: string;
59
+ resolutionReasonId?: string;
60
+ finalizedAt: Date;
61
+ finalizedBy?: string;
68
62
  }
69
63
  export interface IWhatsAppGroupInfo {
70
64
  whatsappGroupId: string;
@@ -124,29 +118,14 @@ export declare enum ConversationBotStatus {
124
118
  FINALIZED = 4,
125
119
  CANCELED = 5
126
120
  }
127
- export declare class ConversationBotVar {
121
+ export interface ConversationBotVar {
128
122
  title: string;
129
123
  value: string;
130
124
  }
131
- export declare enum ChatType {
132
- /**Conversation with a external channel/contact */
133
- EXTERNAL = 0,
134
- /**messages between two users */
135
- DIRECT = 1,
136
- /**messages between multiple users */
137
- GROUP = 2,
138
- /**Messages to discuss a conversation */
139
- DISCUSS_CONVERSATION = 11,
140
- /**Messages to discuss a ticket */
141
- DISCUSS_TICKET = 12
142
- }
143
- export interface IChatMemeber {
144
- joinTimeStamp: Date;
145
- isAdmin: boolean;
146
- userId: string;
147
- user: UserInfo;
148
- }
149
- export declare class ConversationAssigned {
125
+ /**
126
+ * @deprecated Legacy channel assignment configuration. Use QueueRoutingConfig.
127
+ */
128
+ export interface ConversationAssigned {
150
129
  groupInfo?: GroupInfo;
151
130
  userInfo?: UserInfo;
152
131
  userIds?: string[];
@@ -155,15 +134,216 @@ export declare enum ConversationDirection {
155
134
  INBOUND = 1,
156
135
  OUTBOUND = 2
157
136
  }
158
- export declare enum ConversationSatus {
159
- NEW = 1,
160
- ACTIVE = 2,
161
- FINALIZED = 3,
162
- ARCHIVED = 4
163
- }
137
+ /**
138
+ * @deprecated Use QueueDistributionMode and QueueRoutingStrategy.
139
+ */
164
140
  export declare enum AssignMethod {
165
141
  ALL = 0,
166
142
  ROUND_ROBIN = 1,
167
143
  RANDOM = 2,
168
144
  LEAST_BUSY = 3
169
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.AssignMethod = exports.ConversationSatus = exports.ConversationDirection = exports.ConversationAssigned = exports.ChatType = exports.ConversationBotVar = exports.ConversationBotStatus = exports.ConversationContextType = void 0;
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
- var ConversationSatus;
44
- (function (ConversationSatus) {
45
- ConversationSatus[ConversationSatus["NEW"] = 1] = "NEW";
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
- /** For filter conversations with IConversation.assignedTo.userInfo.id */
21
- assignedToUserId?: string | null;
20
+ /** Filters conversations by IConversation.assignment.owner.id. */
21
+ ownerUserId?: string | null;
22
22
  }
23
23
  export declare enum GeneralDashboardType {
24
24
  UNASSIGNED = 0,
@@ -1,24 +1,17 @@
1
1
  import { UserInfo } from "../../Users/UserTrii";
2
- interface IGroup {
2
+ export interface IGroup {
3
3
  id?: string | null;
4
4
  spaceId?: string | null;
5
5
  name?: string | null;
6
6
  color?: string | null;
7
7
  description?: string | null;
8
8
  users: UserInfo[];
9
- maxCapacity?: number | null;
10
- distributionMethod: Group_DistributionMethod;
11
9
  createdAt?: string | null;
12
10
  updatedAt?: string | null;
13
11
  deletedAt?: string | null;
14
12
  }
15
- interface GroupInfo {
13
+ export interface GroupInfo {
16
14
  id?: string | null;
17
15
  name?: string | null;
18
16
  color?: string | null;
19
17
  }
20
- declare enum Group_DistributionMethod {
21
- All = 0,
22
- FIFO = 1
23
- }
24
- export { IGroup, GroupInfo, Group_DistributionMethod };
@@ -1,8 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Group_DistributionMethod = void 0;
4
- var Group_DistributionMethod;
5
- (function (Group_DistributionMethod) {
6
- Group_DistributionMethod[Group_DistributionMethod["All"] = 0] = "All";
7
- Group_DistributionMethod[Group_DistributionMethod["FIFO"] = 1] = "FIFO";
8
- })(Group_DistributionMethod || (exports.Group_DistributionMethod = Group_DistributionMethod = {}));