@trii/types 2.10.764 → 2.10.766

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 (111) hide show
  1. package/dist/Automations/Events/Event.d.ts +3 -3
  2. package/dist/Common/Messages/Message.d.ts +1 -0
  3. package/dist/Common/index.js +7 -17
  4. package/dist/Contacts/CommunicationEndpoint.d.ts +8 -8
  5. package/dist/Conversations/Classifications/ConversationClassificationEvents.d.ts +2 -2
  6. package/dist/Conversations/Conversation.d.ts +11 -11
  7. package/dist/Conversations/InboxMongo.d.ts +12 -12
  8. package/dist/Conversations/InboxQueries.d.ts +73 -3
  9. package/dist/Conversations/Routing.d.ts +10 -10
  10. package/dist/Conversations/index.js +7 -17
  11. package/dist/Events/DomainEventTypes.d.ts +23 -23
  12. package/dist/Spaces/spaces.d.ts +2 -2
  13. package/dist/Tickets/Automation.d.ts +2 -0
  14. package/dist/Tickets/Automation.js +2 -0
  15. package/dist/Tickets/Routing.d.ts +9 -0
  16. package/dist/Tickets/Workflow.d.ts +3 -1
  17. package/dist/Tickets/Workflow.js +2 -0
  18. package/dist/index.js +7 -17
  19. package/dist/src/Automations/Capabilities/Capability.d.ts +81 -0
  20. package/dist/src/Automations/Capabilities/Capability.js +23 -0
  21. package/dist/src/Automations/Capabilities/index.d.ts +1 -0
  22. package/dist/src/Automations/Capabilities/index.js +17 -0
  23. package/dist/src/Automations/Common.d.ts +94 -0
  24. package/dist/src/Automations/Common.js +40 -0
  25. package/dist/src/Automations/Events/Event.d.ts +69 -0
  26. package/dist/src/Automations/Events/Event.js +14 -0
  27. package/dist/src/Automations/Events/index.d.ts +1 -0
  28. package/dist/src/Automations/Events/index.js +17 -0
  29. package/dist/src/Automations/Executions/Execution.d.ts +254 -0
  30. package/dist/src/Automations/Executions/Execution.js +62 -0
  31. package/dist/src/Automations/Executions/Testing.d.ts +166 -0
  32. package/dist/src/Automations/Executions/Testing.js +54 -0
  33. package/dist/src/Automations/Executions/index.d.ts +2 -0
  34. package/dist/src/Automations/Executions/index.js +18 -0
  35. package/dist/src/Automations/Flows/Canvas.d.ts +103 -0
  36. package/dist/src/Automations/Flows/Canvas.js +38 -0
  37. package/dist/src/Automations/Flows/Flow.d.ts +147 -0
  38. package/dist/src/Automations/Flows/Flow.js +58 -0
  39. package/dist/src/Automations/Flows/Requests.d.ts +71 -0
  40. package/dist/src/Automations/Flows/Validation.d.ts +28 -0
  41. package/dist/src/Automations/Flows/Validation.js +9 -0
  42. package/dist/src/Automations/Flows/index.d.ts +4 -0
  43. package/dist/src/Automations/Flows/index.js +20 -0
  44. package/dist/src/Automations/Nodes/Node.d.ts +113 -0
  45. package/dist/src/Automations/Nodes/Node.js +27 -0
  46. package/dist/src/Automations/Nodes/index.d.ts +1 -0
  47. package/dist/src/Automations/Nodes/index.js +17 -0
  48. package/dist/src/Automations/index.d.ts +6 -0
  49. package/dist/src/Automations/index.js +22 -0
  50. package/dist/src/Chats/Chat.d.ts +61 -0
  51. package/dist/src/Chats/Chat.js +28 -0
  52. package/dist/src/Common/Channels/Channel.d.ts +28 -1
  53. package/dist/src/Contacts/contacts.d.ts +2 -2
  54. package/dist/src/Conversations/Assignment.d.ts +81 -0
  55. package/dist/src/Conversations/Assignment.js +4 -0
  56. package/dist/src/Conversations/Conversation.d.ts +331 -48
  57. package/dist/src/Conversations/Conversation.js +14 -34
  58. package/dist/src/Conversations/DashBoard/dashboard.d.ts +2 -2
  59. package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +280 -123
  60. package/dist/src/Conversations/Flows/Workflows/Workflow.js +85 -35
  61. package/dist/src/Conversations/Groups/Group.d.ts +2 -8
  62. package/dist/src/Conversations/Groups/Group.js +0 -6
  63. package/dist/src/Conversations/InboxMongo.d.ts +154 -0
  64. package/dist/src/Conversations/InboxMongo.js +128 -0
  65. package/dist/src/Conversations/InboxProjection.d.ts +162 -0
  66. package/dist/src/Conversations/InboxProjection.js +2 -0
  67. package/dist/src/Conversations/Label.d.ts +1 -1
  68. package/dist/src/Conversations/Outbox.d.ts +24 -0
  69. package/dist/src/Conversations/Outbox.js +4 -0
  70. package/dist/src/Conversations/Queue.d.ts +107 -0
  71. package/dist/src/Conversations/Queue.js +4 -0
  72. package/dist/src/Conversations/Routing.d.ts +164 -0
  73. package/dist/src/Conversations/Routing.js +2 -0
  74. package/dist/src/Conversations/Sla.d.ts +227 -0
  75. package/dist/src/Conversations/Sla.js +6 -0
  76. package/dist/src/Conversations/Transfer.d.ts +73 -0
  77. package/dist/src/Conversations/Transfer.js +2 -0
  78. package/dist/src/Conversations/WebHook.d.ts +1 -1
  79. package/dist/src/Conversations/index.d.ts +9 -1
  80. package/dist/src/Conversations/index.js +9 -1
  81. package/dist/src/Forms/API.d.ts +53 -0
  82. package/dist/src/Forms/API.js +2 -0
  83. package/dist/src/Forms/SubmittedForm.d.ts +56 -0
  84. package/dist/src/Forms/SubmittedForm.js +9 -0
  85. package/dist/src/Forms/index.d.ts +2 -0
  86. package/dist/src/Forms/index.js +18 -0
  87. package/dist/src/Presence/AgentPause.d.ts +24 -0
  88. package/dist/src/Presence/AgentPause.js +19 -0
  89. package/dist/src/Presence/QueueParticipation.d.ts +17 -0
  90. package/dist/src/Presence/QueueParticipation.js +2 -0
  91. package/dist/src/Presence/QueueRoutingState.d.ts +27 -0
  92. package/dist/src/Presence/QueueRoutingState.js +9 -0
  93. package/dist/src/Presence/index.d.ts +3 -0
  94. package/dist/src/Presence/index.js +19 -0
  95. package/dist/src/Tickets/Category.d.ts +18 -0
  96. package/dist/src/Tickets/Dashboard.d.ts +78 -0
  97. package/dist/src/Tickets/Dashboard.js +13 -1
  98. package/dist/src/Tickets/Fields.d.ts +1 -0
  99. package/dist/src/Tickets/Layouts.d.ts +3 -1
  100. package/dist/src/Tickets/Workflow.d.ts +20 -0
  101. package/dist/src/Users/UserTrii.d.ts +10 -0
  102. package/dist/src/Users/UserTrii.js +8 -1
  103. package/dist/src/index.d.ts +3 -0
  104. package/dist/src/index.js +4 -1
  105. package/package.json +5 -2
  106. package/dist/Conversations/DashBoard/dashboardForms.d.ts +0 -44
  107. package/dist/Conversations/DashBoard/dashboardForms.js +0 -24
  108. package/dist/Conversations/InboxCounters.d.ts +0 -18
  109. package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
  110. package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
  111. /package/dist/{Conversations/InboxCounters.js → src/Automations/Flows/Requests.js} +0 -0
@@ -4,16 +4,16 @@ import { GroupInfo } from "./Groups/Group";
4
4
  import { Channels } from "../Common/index";
5
5
  import { IContactAddress, IContactInfo } from "../Contacts/contacts";
6
6
  import { IEnding } from "./Ending";
7
+ import { ChatType } from "../Chats/Chat";
7
8
  export interface IConversation {
8
9
  id: string;
9
- /**only for Front-End */
10
- idLocal?: number;
11
10
  spaceId: string;
11
+ version: number;
12
+ /** @deprecated Use assignment.owner. */
12
13
  type: ChatType;
13
- ownerId: string;
14
+ /**only for Front-End */
14
15
  chatName: string;
15
16
  chatImage: string;
16
- chatMembers: IChatMemeber[];
17
17
  chatMembersCount: number;
18
18
  whatsappGroupInfo?: IWhatsAppGroupInfo;
19
19
  contactInfo?: IContactInfo;
@@ -21,48 +21,55 @@ export interface IConversation {
21
21
  remoteAddress: string;
22
22
  remoteAddressId: string;
23
23
  channelInfo: Channels.IChannelInfo;
24
+ status: ConversationStatus;
25
+ priority: 'low' | 'normal' | 'high' | 'urgent';
26
+ assignment: ConversationAssignmentSnapshot;
27
+ /** @deprecated Use owner and assignment.*/
28
+ assignedTo?: ConversationAssigned;
29
+ sla: {
30
+ status: 'none' | 'running' | 'warning' | 'breached' | 'met';
31
+ deadlineAt?: Date;
32
+ policyId?: string;
33
+ version: number;
34
+ };
24
35
  lastMessage: string;
25
36
  lastMessageId?: string;
26
37
  newMessagesCount: number;
27
38
  newMessagesUnread: boolean;
39
+ lastActivityAt: Date;
40
+ lastCustomerActivityAt?: Date;
41
+ lastAgentActivityAt?: Date;
28
42
  labels: ILabel[];
29
43
  pinned: boolean;
44
+ /** @deprecated A transfer is represented by an event and the resulting current state. */
30
45
  transferBy?: string;
46
+ /** @deprecated A transfer is represented by an event and the resulting current state. */
31
47
  transferTo?: ConversationAssigned;
32
48
  expired: boolean;
49
+ /** @deprecated Expiration does not own a separate assignment snapshot.*/
33
50
  expiredAssignedTo: ConversationAssigned;
34
- status: ConversationSatus;
35
- assignedTo?: ConversationAssigned;
36
51
  participants: UserInfo[];
37
52
  archived: boolean;
53
+ spam: boolean;
38
54
  externalMessagingWindowEndAt?: Date;
39
55
  workflowId?: string;
40
56
  botStatus: ConversationBotStatus;
41
57
  botVars: ConversationBotVar[];
42
58
  metadata: IConversationMetadata;
43
59
  /** Domain objects discussed or served by this conversation. */
44
- contextReferences?: IConversationContextReference[];
45
- finalizedAt: Date;
46
- finalizedBy?: string;
47
60
  finalizedOnWebChat: Date;
48
61
  ending?: IEnding;
49
62
  qualityEvaluation?: IInteractionQualityEvaluation;
50
63
  reOpenAt?: Date;
64
+ reOpenByUserId?: string;
65
+ reOpenPolicyId?: string;
51
66
  createdAt: Date;
52
67
  updatedAt: Date;
53
- }
54
- export declare enum ConversationContextType {
55
- TICKET = "TICKET",
56
- CONVERSATION = "CONVERSATION",
57
- LEAD = "LEAD",
58
- DEBT = "DEBT"
59
- }
60
- export interface IConversationContextReference {
61
- entityType: ConversationContextType;
62
- entityId: string;
63
- role?: string;
64
- linkedAt: Date;
65
- linkedBy?: string;
68
+ resolvedAt?: Date;
69
+ resolvedByUserId?: string;
70
+ resolutionReasonId?: string;
71
+ finalizedAt: Date;
72
+ finalizedBy?: string;
66
73
  }
67
74
  export interface IWhatsAppGroupInfo {
68
75
  whatsappGroupId: string;
@@ -122,29 +129,14 @@ export declare enum ConversationBotStatus {
122
129
  FINALIZED = 4,
123
130
  CANCELED = 5
124
131
  }
125
- export declare class ConversationBotVar {
132
+ export interface ConversationBotVar {
126
133
  title: string;
127
134
  value: string;
128
135
  }
129
- export declare enum ChatType {
130
- /**Conversation with a external channel/contact */
131
- EXTERNAL = 0,
132
- /**messages between two users */
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 {
136
+ /**
137
+ * @deprecated Legacy channel assignment configuration. Use QueueRoutingConfig.
138
+ */
139
+ export interface ConversationAssigned {
148
140
  groupInfo?: GroupInfo;
149
141
  userInfo?: UserInfo;
150
142
  userIds?: string[];
@@ -153,15 +145,306 @@ export declare enum ConversationDirection {
153
145
  INBOUND = 1,
154
146
  OUTBOUND = 2
155
147
  }
156
- export declare enum ConversationSatus {
157
- NEW = 1,
158
- ACTIVE = 2,
159
- FINALIZED = 3,
160
- ARCHIVED = 4
161
- }
148
+ /**
149
+ * @deprecated Use QueueDistributionMode and QueueRoutingStrategy.
150
+ */
162
151
  export declare enum AssignMethod {
163
152
  ALL = 0,
164
153
  ROUND_ROBIN = 1,
165
154
  RANDOM = 2,
166
155
  LEAST_BUSY = 3
167
156
  }
157
+ export declare enum ConversationStatus {
158
+ NEW = 1,
159
+ OPEN = 2,
160
+ ACTIVE = 2,// Alias for OPEN
161
+ RESOLVED = 3,
162
+ FINALIZED = 3,// Alias for RESOLVED
163
+ WAITING = 10
164
+ }
165
+ export type InboxViewId = 'pending' | 'following' | 'sla_warning' | 'sla_breached' | 'team_sla_breached' | 'resolved';
166
+ export type OwnerType = 'user' | 'bot' | 'flow' | 'none';
167
+ export interface NoConversationOwner {
168
+ type: 'none';
169
+ id?: never;
170
+ displayName?: never;
171
+ avatarUrl?: never;
172
+ }
173
+ export interface UserConversationOwner {
174
+ type: 'user';
175
+ id: ID;
176
+ displayName?: string;
177
+ avatarUrl?: string;
178
+ }
179
+ export interface BotConversationOwner {
180
+ type: 'bot';
181
+ id: ID;
182
+ displayName?: string;
183
+ avatarUrl?: string;
184
+ }
185
+ export interface FlowConversationOwner {
186
+ type: 'flow';
187
+ id: ID;
188
+ displayName?: string;
189
+ avatarUrl?: string;
190
+ }
191
+ export type ConversationOwner = NoConversationOwner | UserConversationOwner | BotConversationOwner | FlowConversationOwner;
192
+ export type ConversationAssignmentStatus = 'unrouted' | 'queued' | 'routing' | 'offered' | 'assigned' | 'accepted';
193
+ export type ConversationAssignmentSource = 'routing' | 'manual' | 'transfer' | 'requeue';
194
+ interface QueuedConversationAssignmentBase {
195
+ assignmentId: ID;
196
+ queueId: ID;
197
+ source: ConversationAssignmentSource;
198
+ queuedAt: Date;
199
+ lastRoutingDecisionId?: ID;
200
+ }
201
+ export type ConversationAssignmentSnapshot = {
202
+ status: 'unrouted';
203
+ assignmentId?: never;
204
+ queueId?: never;
205
+ owner: NoConversationOwner | BotConversationOwner | FlowConversationOwner;
206
+ source?: never;
207
+ queuedAt?: never;
208
+ lastRoutingDecisionId?: never;
209
+ offeredAt?: never;
210
+ offerExpiresAt?: never;
211
+ assignedAt?: never;
212
+ acceptedAt?: never;
213
+ } | (QueuedConversationAssignmentBase & {
214
+ status: 'queued' | 'routing';
215
+ owner: NoConversationOwner;
216
+ offeredAt?: never;
217
+ offerExpiresAt?: never;
218
+ assignedAt?: never;
219
+ acceptedAt?: never;
220
+ }) | (QueuedConversationAssignmentBase & {
221
+ status: 'offered';
222
+ owner: UserConversationOwner;
223
+ offeredAt: Date;
224
+ offerExpiresAt?: Date;
225
+ assignedAt?: never;
226
+ acceptedAt?: never;
227
+ }) | (QueuedConversationAssignmentBase & {
228
+ status: 'assigned';
229
+ owner: UserConversationOwner;
230
+ offeredAt?: Date;
231
+ offerExpiresAt?: Date;
232
+ assignedAt: Date;
233
+ acceptedAt?: never;
234
+ }) | (QueuedConversationAssignmentBase & {
235
+ status: 'accepted';
236
+ owner: UserConversationOwner;
237
+ offeredAt?: Date;
238
+ offerExpiresAt?: Date;
239
+ assignedAt: Date;
240
+ acceptedAt: Date;
241
+ });
242
+ export type ActorType = 'user' | 'contact' | 'bot' | 'flow' | 'system';
243
+ export type ParticipantRole = 'owner' | 'collaborator' | 'follower' | 'mentioned' | 'supervisor' | 'bot' | 'flow' | 'historical';
244
+ 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';
245
+ export type ID = string;
246
+ export type ConversationSubscriptionSource = 'manual' | 'assigned' | 'participated' | 'mentioned' | 'supervisor' | 'rule';
247
+ export type ConversationSubscriptionNotificationEvent = 'customer_message' | 'internal_mention' | 'assignment_change' | 'acceptance' | 'resolution' | 'reopen';
248
+ export type ConversationSubscriptionNotifications = {
249
+ mode: 'all' | 'muted';
250
+ events?: never;
251
+ } | {
252
+ mode: 'custom';
253
+ events: [
254
+ ConversationSubscriptionNotificationEvent,
255
+ ...ConversationSubscriptionNotificationEvent[]
256
+ ];
257
+ };
258
+ interface ConversationSubscriptionBase {
259
+ id: ID;
260
+ spaceId: string;
261
+ conversationId: ID;
262
+ userId: ID;
263
+ source: ConversationSubscriptionSource;
264
+ notifications: ConversationSubscriptionNotifications;
265
+ createdAt: Date;
266
+ updatedAt: Date;
267
+ version: number;
268
+ }
269
+ /**
270
+ * Current following state for one user/conversation pair.
271
+ *
272
+ * A subscription is persistent product intent. Assignment or participation
273
+ * visibility must not create it unless an explicit auto-follow policy applies.
274
+ */
275
+ export type ConversationSubscription = (ConversationSubscriptionBase & {
276
+ status: 'following';
277
+ followedAt: Date;
278
+ unfollowedAt?: never;
279
+ }) | (ConversationSubscriptionBase & {
280
+ status: 'unfollowed';
281
+ followedAt: Date;
282
+ unfollowedAt: Date;
283
+ });
284
+ 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';
285
+ export interface ConversationInboxSnapshot {
286
+ interactionKind: 'private' | 'wall_post' | 'comment' | 'mention';
287
+ channelType: string;
288
+ contact: {
289
+ id?: ID;
290
+ displayName: string;
291
+ initials?: string;
292
+ };
293
+ status: ConversationStatus;
294
+ owner: ConversationOwner;
295
+ queueId?: ID;
296
+ preview?: string;
297
+ unreadCount: number;
298
+ priority: 'low' | 'normal' | 'high' | 'urgent';
299
+ sla: {
300
+ status: 'none' | 'running' | 'warning' | 'breached' | 'met';
301
+ deadlineAt?: Date;
302
+ };
303
+ lastActivityAt: Date;
304
+ }
305
+ /**
306
+ * Membership of one materialized conversation in one logical inbox view.
307
+ *
308
+ * visibilityReasons has set semantics: values must be unique and non-empty.
309
+ * Removing one reason preserves the view while at least one reason remains.
310
+ */
311
+ export interface UserInboxItemView {
312
+ viewId: InboxViewId;
313
+ visibilityReasons: [
314
+ InboxVisibilityReason,
315
+ ...InboxVisibilityReason[]
316
+ ];
317
+ requiresAction: boolean;
318
+ }
319
+ /**
320
+ * Materialized read model. There is exactly one document for each
321
+ * spaceId + userId + conversationId tuple.
322
+ *
323
+ * views must contain unique viewId values. Delete the document when the last
324
+ * view is removed.
325
+ */
326
+ export interface UserInboxItemDocument {
327
+ id: ID;
328
+ spaceId: ID;
329
+ userId: ID;
330
+ conversationId: ID;
331
+ views: UserInboxItemView[];
332
+ snapshot: ConversationInboxSnapshot;
333
+ pinned: boolean;
334
+ priorityScore: number;
335
+ sortAt: Date;
336
+ conversationVersion: number;
337
+ subscriptionVersion?: number;
338
+ projectionVersion: number;
339
+ lastSourceEventId: ID;
340
+ projectedAt: Date;
341
+ }
342
+ /**
343
+ * Materialized counters for exactly one user/view pair.
344
+ *
345
+ * total and requiresAction count conversations, never visibility reasons.
346
+ * unread counts conversations whose snapshot.unreadCount is greater than zero,
347
+ * not the number of unread messages.
348
+ */
349
+ export interface UserInboxCounterDocument {
350
+ id: ID;
351
+ spaceId: ID;
352
+ userId: ID;
353
+ viewId: InboxViewId;
354
+ total: number;
355
+ requiresAction: number;
356
+ unread: number;
357
+ projectionVersion: number;
358
+ updatedAt: Date;
359
+ }
360
+ export interface CursorPage<T> {
361
+ items: T[];
362
+ nextCursor?: string;
363
+ hasMore: boolean;
364
+ generatedAt: Date;
365
+ }
366
+ export interface ConversationCapabilitiesDto {
367
+ canView: boolean;
368
+ canReply: boolean;
369
+ canFollow: boolean;
370
+ canAbandon: boolean;
371
+ canClaim: boolean;
372
+ canAccept: boolean;
373
+ canRelease: boolean;
374
+ canTransfer: boolean;
375
+ canResolve: boolean;
376
+ canReopen: boolean;
377
+ canChangePriority: boolean;
378
+ canManageLabels: boolean;
379
+ canManageSla: boolean;
380
+ canViewAssignmentHistory: boolean;
381
+ canViewRoutingDecisions: boolean;
382
+ }
383
+ export interface InboxViewSummaryDto {
384
+ id: InboxViewId | 'supervised_target';
385
+ label: string;
386
+ scope: 'personal' | 'supervision' | 'history';
387
+ order: number;
388
+ total: number;
389
+ requiresAction: number;
390
+ unread: number;
391
+ enabled: boolean;
392
+ targetRequired: boolean;
393
+ capabilities: string[];
394
+ }
395
+ export interface InboxViewsResponse {
396
+ views: InboxViewSummaryDto[];
397
+ countersGeneratedAt: Date;
398
+ projectionLagMs?: number;
399
+ }
400
+ export interface InboxFilterDto {
401
+ text?: string;
402
+ queueIds?: ID[];
403
+ ownerUserIds?: ID[];
404
+ channelTypes?: string[];
405
+ statuses?: ConversationStatus[];
406
+ priorities?: Array<'low' | 'normal' | 'high' | 'urgent'>;
407
+ slaStatuses?: Array<'none' | 'running' | 'warning' | 'breached' | 'met'>;
408
+ labelIds?: ID[];
409
+ unread?: boolean;
410
+ requiresAction?: boolean;
411
+ pinned?: boolean;
412
+ lastActivity?: {
413
+ from?: Date;
414
+ to?: Date;
415
+ };
416
+ sort: {
417
+ type: 'activity';
418
+ } | {
419
+ type: 'priority';
420
+ };
421
+ }
422
+ export type InboxConversationItemDto = Pick<UserInboxItemDocument, 'conversationId' | 'views' | 'snapshot' | 'pinned' | 'priorityScore' | 'sortAt'> & {
423
+ capabilities: Pick<ConversationCapabilitiesDto, 'canView' | 'canReply' | 'canClaim' | 'canTransfer'>;
424
+ };
425
+ export interface InboxConversationPage extends CursorPage<InboxConversationItemDto> {
426
+ appliedFilter: InboxFilterDto;
427
+ facets?: unknown;
428
+ }
429
+ /**
430
+ * DTO API - GET /inbox/views/{viewId}/filter-options.
431
+ */
432
+ export interface InboxFacetOptionDto {
433
+ id: string;
434
+ label: string;
435
+ count: number;
436
+ }
437
+ export interface InboxFacetsDto {
438
+ queues: InboxFacetOptionDto[];
439
+ owners: InboxFacetOptionDto[];
440
+ channels: InboxFacetOptionDto[];
441
+ statuses: InboxFacetOptionDto[];
442
+ priorities: InboxFacetOptionDto[];
443
+ slaStatuses: InboxFacetOptionDto[];
444
+ labels: InboxFacetOptionDto[];
445
+ }
446
+ export interface InboxFilterOptionsResponse {
447
+ facets: InboxFacetsDto;
448
+ generatedAt: Date;
449
+ }
450
+ 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,