@lilaquadrat/chat 0.1.17 → 0.1.18

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 (68) hide show
  1. package/dist/wc/lilaquadrat-studio-chat.js +5 -5
  2. package/dist/wc/lilaquadrat-studio-chat.umd.cjs +1 -1
  3. package/package.json +24 -23
  4. package/dist/app/assets/de-BPWT8j6E.js +0 -1
  5. package/dist/app/assets/loadFonts-DmNZ8tPj.js +0 -1
  6. package/dist/app/assets/main-B18LDkun.js +0 -2
  7. package/dist/app/assets/preload-helper-OSX1TyOM.js +0 -1
  8. package/dist/app/assets/support-DgYHnicF.js +0 -2
  9. package/dist/app/assets/support-agent-CTl6KCJE.js +0 -1
  10. package/dist/app/assets/web-component-BANWBXIc.js +0 -1
  11. package/dist/app/index.html +0 -37
  12. package/dist/app/support/index.html +0 -43
  13. package/dist/studio-chat-module.js +0 -0
  14. package/dist/studio-chat-module.umd.cjs +0 -1
  15. package/dist/types/src/bot/botClient.d.ts +0 -40
  16. package/dist/types/src/bot/botManager.d.ts +0 -3
  17. package/dist/types/src/composables/useChatBootstrap.d.ts +0 -27
  18. package/dist/types/src/composables/useChatVisibility.d.ts +0 -18
  19. package/dist/types/src/composables/useTriggerEvent.d.ts +0 -10
  20. package/dist/types/src/composables/useWebSocket.d.ts +0 -11
  21. package/dist/types/src/config/auth.d.ts +0 -19
  22. package/dist/types/src/config/bootstrap.agent.d.ts +0 -86
  23. package/dist/types/src/config/bootstrap.d.ts +0 -10
  24. package/dist/types/src/config/chatConfig.d.ts +0 -83
  25. package/dist/types/src/config/components.shared.d.ts +0 -18
  26. package/dist/types/src/config/users.d.ts +0 -27
  27. package/dist/types/src/helpers/date.d.ts +0 -7
  28. package/dist/types/src/helpers/handleMessages.d.ts +0 -2
  29. package/dist/types/src/helpers/loadComponents.d.ts +0 -10
  30. package/dist/types/src/helpers/participants.d.ts +0 -50
  31. package/dist/types/src/helpers/rights.d.ts +0 -19
  32. package/dist/types/src/helpers/sdkOptions.d.ts +0 -17
  33. package/dist/types/src/helpers/sounds.d.ts +0 -8
  34. package/dist/types/src/helpers/supportStatus.d.ts +0 -15
  35. package/dist/types/src/interfaces/Conversation.d.ts +0 -44
  36. package/dist/types/src/interfaces/ConversationSla.d.ts +0 -9
  37. package/dist/types/src/interfaces/IncomingFrame.d.ts +0 -71
  38. package/dist/types/src/interfaces/Message.d.ts +0 -18
  39. package/dist/types/src/interfaces/ParticipantDocument.d.ts +0 -13
  40. package/dist/types/src/libs/StudioSDK.d.ts +0 -148
  41. package/dist/types/src/libs/chatSession.d.ts +0 -113
  42. package/dist/types/src/libs/resize.d.ts +0 -79
  43. package/dist/types/src/libs/websocketManager.d.ts +0 -54
  44. package/dist/types/src/locales/de.d.ts +0 -115
  45. package/dist/types/src/locales/en.d.ts +0 -115
  46. package/dist/types/src/main.d.ts +0 -1
  47. package/dist/types/src/mixins/groupMessages.d.ts +0 -14
  48. package/dist/types/src/mixins/hardCopy.d.ts +0 -2
  49. package/dist/types/src/mixins/logger.d.ts +0 -8
  50. package/dist/types/src/mixins/traceable.d.ts +0 -11
  51. package/dist/types/src/plugins/i18n.d.ts +0 -124
  52. package/dist/types/src/standalone/auth.d.ts +0 -26
  53. package/dist/types/src/standalone/main.d.ts +0 -1
  54. package/dist/types/src/standalone/settings.d.ts +0 -63
  55. package/dist/types/src/standalone-support/main.d.ts +0 -1
  56. package/dist/types/src/stores/bots.store.d.ts +0 -69
  57. package/dist/types/src/stores/calls.store.d.ts +0 -14
  58. package/dist/types/src/stores/contacts.store.d.ts +0 -87
  59. package/dist/types/src/stores/conversations.store.d.ts +0 -2228
  60. package/dist/types/src/stores/main.store.d.ts +0 -184
  61. package/dist/types/src/stores/supportConversations.store.d.ts +0 -65
  62. package/dist/types/src/stores/user.store.d.ts +0 -8
  63. package/dist/types/src/stores/usersCache.store.d.ts +0 -31
  64. package/dist/types/src/styles/loadFonts.d.ts +0 -15
  65. package/dist/types/src/support-agent.d.ts +0 -18
  66. package/dist/types/tsconfig.build.tsbuildinfo +0 -1
  67. package/dist/wc-support/lilaquadrat-studio-support.js +0 -9
  68. package/dist/wc-support/lilaquadrat-studio-support.umd.cjs +0 -1
@@ -1,2228 +0,0 @@
1
- import { type Participant } from '@/helpers/participants';
2
- import { type SupportStatus } from '@/helpers/supportStatus';
3
- import type { Conversation, ConversationPayload } from '@/interfaces/Conversation';
4
- import type { Message } from '@/interfaces/Message';
5
- import type { ParticipantState } from '@/interfaces/ParticipantDocument';
6
- export type ConversationEntry = Conversation;
7
- export declare const useConversationsStore: import("pinia").StoreDefinition<"conversations", Pick<{
8
- getAllConversations: () => Promise<void>;
9
- mergeConversations: (incoming: ConversationPayload[]) => void;
10
- refreshConversations: () => Promise<void>;
11
- handleReconnect: () => Promise<void>;
12
- conversations: import("vue").Ref<{
13
- _id?: string;
14
- id?: string;
15
- name?: string;
16
- participants: (string | {
17
- id: string;
18
- prename?: string;
19
- lastname?: string;
20
- email?: string;
21
- name?: string;
22
- lastSeen?: string;
23
- online?: boolean;
24
- role?: "agent" | null;
25
- })[];
26
- blocked?: string[];
27
- messagesCount?: number;
28
- messagesCountSystem?: number;
29
- createdAt?: string;
30
- lastActivity?: string;
31
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
32
- supportStatus?: SupportStatus;
33
- supportStatusUpdatedAt?: string;
34
- supportStatusVersion?: number;
35
- sla?: {
36
- conversation: string;
37
- status: SupportStatus;
38
- statusVersion: number;
39
- startedAt: string;
40
- endAt: string;
41
- stoppedAt?: string;
42
- };
43
- participant?: {
44
- _id?: string;
45
- conversation: string;
46
- user: string;
47
- state: ParticipantState;
48
- rights: string[];
49
- lastReadId?: number;
50
- latestMessageId?: number;
51
- muted?: boolean;
52
- role?: "agent";
53
- joinedAt?: string;
54
- };
55
- participantDocs?: {
56
- _id?: string;
57
- conversation: string;
58
- user: string;
59
- state: ParticipantState;
60
- rights: string[];
61
- lastReadId?: number;
62
- latestMessageId?: number;
63
- muted?: boolean;
64
- role?: "agent";
65
- joinedAt?: string;
66
- }[];
67
- lastMessage?: {
68
- _id?: string;
69
- id: number;
70
- conversation: string;
71
- user?: string;
72
- message?: string;
73
- origin: "user" | "system";
74
- history: {
75
- created: string;
76
- updated?: string;
77
- };
78
- action?: string;
79
- actionData?: Record<string, unknown>;
80
- clientMessageId?: string;
81
- duplicate?: boolean;
82
- isUser?: boolean;
83
- };
84
- oldestMessageId?: number | null;
85
- messages?: {
86
- _id?: string;
87
- id: number;
88
- conversation: string;
89
- user?: string;
90
- message?: string;
91
- origin: "user" | "system";
92
- history: {
93
- created: string;
94
- updated?: string;
95
- };
96
- action?: string;
97
- actionData?: Record<string, unknown>;
98
- clientMessageId?: string;
99
- duplicate?: boolean;
100
- isUser?: boolean;
101
- }[];
102
- messagesLoaded?: boolean;
103
- unreadCount?: number;
104
- unread?: boolean;
105
- isMember?: boolean;
106
- isNew?: boolean;
107
- isTemp?: boolean;
108
- creator?: string;
109
- }[], Conversation[] | {
110
- _id?: string;
111
- id?: string;
112
- name?: string;
113
- participants: (string | {
114
- id: string;
115
- prename?: string;
116
- lastname?: string;
117
- email?: string;
118
- name?: string;
119
- lastSeen?: string;
120
- online?: boolean;
121
- role?: "agent" | null;
122
- })[];
123
- blocked?: string[];
124
- messagesCount?: number;
125
- messagesCountSystem?: number;
126
- createdAt?: string;
127
- lastActivity?: string;
128
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
129
- supportStatus?: SupportStatus;
130
- supportStatusUpdatedAt?: string;
131
- supportStatusVersion?: number;
132
- sla?: {
133
- conversation: string;
134
- status: SupportStatus;
135
- statusVersion: number;
136
- startedAt: string;
137
- endAt: string;
138
- stoppedAt?: string;
139
- };
140
- participant?: {
141
- _id?: string;
142
- conversation: string;
143
- user: string;
144
- state: ParticipantState;
145
- rights: string[];
146
- lastReadId?: number;
147
- latestMessageId?: number;
148
- muted?: boolean;
149
- role?: "agent";
150
- joinedAt?: string;
151
- };
152
- participantDocs?: {
153
- _id?: string;
154
- conversation: string;
155
- user: string;
156
- state: ParticipantState;
157
- rights: string[];
158
- lastReadId?: number;
159
- latestMessageId?: number;
160
- muted?: boolean;
161
- role?: "agent";
162
- joinedAt?: string;
163
- }[];
164
- lastMessage?: {
165
- _id?: string;
166
- id: number;
167
- conversation: string;
168
- user?: string;
169
- message?: string;
170
- origin: "user" | "system";
171
- history: {
172
- created: string;
173
- updated?: string;
174
- };
175
- action?: string;
176
- actionData?: Record<string, unknown>;
177
- clientMessageId?: string;
178
- duplicate?: boolean;
179
- isUser?: boolean;
180
- };
181
- oldestMessageId?: number | null;
182
- messages?: {
183
- _id?: string;
184
- id: number;
185
- conversation: string;
186
- user?: string;
187
- message?: string;
188
- origin: "user" | "system";
189
- history: {
190
- created: string;
191
- updated?: string;
192
- };
193
- action?: string;
194
- actionData?: Record<string, unknown>;
195
- clientMessageId?: string;
196
- duplicate?: boolean;
197
- isUser?: boolean;
198
- }[];
199
- messagesLoaded?: boolean;
200
- unreadCount?: number;
201
- unread?: boolean;
202
- isMember?: boolean;
203
- isNew?: boolean;
204
- isTemp?: boolean;
205
- creator?: string;
206
- }[]>;
207
- conversationsLoaded: import("vue").Ref<boolean, boolean>;
208
- unreadConversations: import("vue").ComputedRef<{
209
- _id?: string;
210
- id?: string;
211
- name?: string;
212
- participants: (string | {
213
- id: string;
214
- prename?: string;
215
- lastname?: string;
216
- email?: string;
217
- name?: string;
218
- lastSeen?: string;
219
- online?: boolean;
220
- role?: "agent" | null;
221
- })[];
222
- blocked?: string[];
223
- messagesCount?: number;
224
- messagesCountSystem?: number;
225
- createdAt?: string;
226
- lastActivity?: string;
227
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
228
- supportStatus?: SupportStatus;
229
- supportStatusUpdatedAt?: string;
230
- supportStatusVersion?: number;
231
- sla?: {
232
- conversation: string;
233
- status: SupportStatus;
234
- statusVersion: number;
235
- startedAt: string;
236
- endAt: string;
237
- stoppedAt?: string;
238
- };
239
- participant?: {
240
- _id?: string;
241
- conversation: string;
242
- user: string;
243
- state: ParticipantState;
244
- rights: string[];
245
- lastReadId?: number;
246
- latestMessageId?: number;
247
- muted?: boolean;
248
- role?: "agent";
249
- joinedAt?: string;
250
- };
251
- participantDocs?: {
252
- _id?: string;
253
- conversation: string;
254
- user: string;
255
- state: ParticipantState;
256
- rights: string[];
257
- lastReadId?: number;
258
- latestMessageId?: number;
259
- muted?: boolean;
260
- role?: "agent";
261
- joinedAt?: string;
262
- }[];
263
- lastMessage?: {
264
- _id?: string;
265
- id: number;
266
- conversation: string;
267
- user?: string;
268
- message?: string;
269
- origin: "user" | "system";
270
- history: {
271
- created: string;
272
- updated?: string;
273
- };
274
- action?: string;
275
- actionData?: Record<string, unknown>;
276
- clientMessageId?: string;
277
- duplicate?: boolean;
278
- isUser?: boolean;
279
- };
280
- oldestMessageId?: number | null;
281
- messages?: {
282
- _id?: string;
283
- id: number;
284
- conversation: string;
285
- user?: string;
286
- message?: string;
287
- origin: "user" | "system";
288
- history: {
289
- created: string;
290
- updated?: string;
291
- };
292
- action?: string;
293
- actionData?: Record<string, unknown>;
294
- clientMessageId?: string;
295
- duplicate?: boolean;
296
- isUser?: boolean;
297
- }[];
298
- messagesLoaded?: boolean;
299
- unreadCount?: number;
300
- unread?: boolean;
301
- isMember?: boolean;
302
- isNew?: boolean;
303
- isTemp?: boolean;
304
- creator?: string;
305
- }[]>;
306
- totalUnreadCount: import("vue").ComputedRef<number>;
307
- totalUnreadConversations: import("vue").ComputedRef<number>;
308
- typing: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
309
- setTyping: (conversation: string, user: string, isTyping: boolean) => void;
310
- loadParticipants: (conversation: string) => Promise<import("@/interfaces/ParticipantDocument").ParticipantDocument[]>;
311
- setRights: (conversation: string, user: string, rights: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
312
- isMuted: (conversation: string) => boolean;
313
- setMuted: (conversation: string, muted: boolean) => Promise<void>;
314
- conversationMuted: (conversation: string, muted: boolean) => void;
315
- updateSupportStatus: (conversation: string, status: SupportStatus | undefined, version: number | undefined, updatedAt: string | undefined, options?: {
316
- force?: boolean;
317
- sla?: Conversation["sla"];
318
- }) => boolean;
319
- blockUser: (conversation: string, user: string, block: boolean) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
320
- updateParticipantRights: (conversation: string, user: string, rights: string[]) => void;
321
- create: (participants: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
322
- createNew: (participants: string[], creator?: string, operationMode?: "chat" | "support") => string;
323
- createConversation: () => string;
324
- startSupport: () => Promise<string>;
325
- activateConversation: (conversationId: string) => Promise<void>;
326
- activeConversation: import("vue").Ref<{
327
- _id?: string;
328
- id?: string;
329
- name?: string;
330
- participants: (string | {
331
- id: string;
332
- prename?: string;
333
- lastname?: string;
334
- email?: string;
335
- name?: string;
336
- lastSeen?: string;
337
- online?: boolean;
338
- role?: "agent" | null;
339
- })[];
340
- blocked?: string[];
341
- messagesCount?: number;
342
- messagesCountSystem?: number;
343
- createdAt?: string;
344
- lastActivity?: string;
345
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
346
- supportStatus?: SupportStatus;
347
- supportStatusUpdatedAt?: string;
348
- supportStatusVersion?: number;
349
- sla?: {
350
- conversation: string;
351
- status: SupportStatus;
352
- statusVersion: number;
353
- startedAt: string;
354
- endAt: string;
355
- stoppedAt?: string;
356
- };
357
- participant?: {
358
- _id?: string;
359
- conversation: string;
360
- user: string;
361
- state: ParticipantState;
362
- rights: string[];
363
- lastReadId?: number;
364
- latestMessageId?: number;
365
- muted?: boolean;
366
- role?: "agent";
367
- joinedAt?: string;
368
- };
369
- participantDocs?: {
370
- _id?: string;
371
- conversation: string;
372
- user: string;
373
- state: ParticipantState;
374
- rights: string[];
375
- lastReadId?: number;
376
- latestMessageId?: number;
377
- muted?: boolean;
378
- role?: "agent";
379
- joinedAt?: string;
380
- }[];
381
- lastMessage?: {
382
- _id?: string;
383
- id: number;
384
- conversation: string;
385
- user?: string;
386
- message?: string;
387
- origin: "user" | "system";
388
- history: {
389
- created: string;
390
- updated?: string;
391
- };
392
- action?: string;
393
- actionData?: Record<string, unknown>;
394
- clientMessageId?: string;
395
- duplicate?: boolean;
396
- isUser?: boolean;
397
- };
398
- oldestMessageId?: number | null;
399
- messages?: {
400
- _id?: string;
401
- id: number;
402
- conversation: string;
403
- user?: string;
404
- message?: string;
405
- origin: "user" | "system";
406
- history: {
407
- created: string;
408
- updated?: string;
409
- };
410
- action?: string;
411
- actionData?: Record<string, unknown>;
412
- clientMessageId?: string;
413
- duplicate?: boolean;
414
- isUser?: boolean;
415
- }[];
416
- messagesLoaded?: boolean;
417
- unreadCount?: number;
418
- unread?: boolean;
419
- isMember?: boolean;
420
- isNew?: boolean;
421
- isTemp?: boolean;
422
- creator?: string;
423
- }, Conversation | {
424
- _id?: string;
425
- id?: string;
426
- name?: string;
427
- participants: (string | {
428
- id: string;
429
- prename?: string;
430
- lastname?: string;
431
- email?: string;
432
- name?: string;
433
- lastSeen?: string;
434
- online?: boolean;
435
- role?: "agent" | null;
436
- })[];
437
- blocked?: string[];
438
- messagesCount?: number;
439
- messagesCountSystem?: number;
440
- createdAt?: string;
441
- lastActivity?: string;
442
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
443
- supportStatus?: SupportStatus;
444
- supportStatusUpdatedAt?: string;
445
- supportStatusVersion?: number;
446
- sla?: {
447
- conversation: string;
448
- status: SupportStatus;
449
- statusVersion: number;
450
- startedAt: string;
451
- endAt: string;
452
- stoppedAt?: string;
453
- };
454
- participant?: {
455
- _id?: string;
456
- conversation: string;
457
- user: string;
458
- state: ParticipantState;
459
- rights: string[];
460
- lastReadId?: number;
461
- latestMessageId?: number;
462
- muted?: boolean;
463
- role?: "agent";
464
- joinedAt?: string;
465
- };
466
- participantDocs?: {
467
- _id?: string;
468
- conversation: string;
469
- user: string;
470
- state: ParticipantState;
471
- rights: string[];
472
- lastReadId?: number;
473
- latestMessageId?: number;
474
- muted?: boolean;
475
- role?: "agent";
476
- joinedAt?: string;
477
- }[];
478
- lastMessage?: {
479
- _id?: string;
480
- id: number;
481
- conversation: string;
482
- user?: string;
483
- message?: string;
484
- origin: "user" | "system";
485
- history: {
486
- created: string;
487
- updated?: string;
488
- };
489
- action?: string;
490
- actionData?: Record<string, unknown>;
491
- clientMessageId?: string;
492
- duplicate?: boolean;
493
- isUser?: boolean;
494
- };
495
- oldestMessageId?: number | null;
496
- messages?: {
497
- _id?: string;
498
- id: number;
499
- conversation: string;
500
- user?: string;
501
- message?: string;
502
- origin: "user" | "system";
503
- history: {
504
- created: string;
505
- updated?: string;
506
- };
507
- action?: string;
508
- actionData?: Record<string, unknown>;
509
- clientMessageId?: string;
510
- duplicate?: boolean;
511
- isUser?: boolean;
512
- }[];
513
- messagesLoaded?: boolean;
514
- unreadCount?: number;
515
- unread?: boolean;
516
- isMember?: boolean;
517
- isNew?: boolean;
518
- isTemp?: boolean;
519
- creator?: string;
520
- }>;
521
- convertTempToConversation: (conversation: ConversationPayload) => void;
522
- getMessagesFromApi: (conversation: string, beforeId?: number) => Promise<Message[]>;
523
- addMessagesToConversation: (messages: Message[], conversation: string) => number;
524
- getMessagesForConversation: (conversation: string) => Message[];
525
- updateLastMessage: (conversationId: string, message: Message) => void;
526
- updateUnread: (conversation: string) => void;
527
- updateAllUnread: () => void;
528
- increaseMessageCount: (conversation: string) => void;
529
- increaseMessageCountSystem: (conversation: string) => void;
530
- setLastReadId: (conversation: string, lastReadId: number) => void;
531
- getConversation: (conversation: string | undefined) => ConversationEntry | undefined;
532
- addParticipant: (conversation: string, participant: string) => void;
533
- removeParticipant: (conversation: string, participant: string) => void;
534
- setParticipants: (conversation: string, participants: Participant[]) => void;
535
- toggleParticipant: (conversation: string, participant: string) => void;
536
- getConversationViaParticipantsAndName: (participants: Participant[], name?: string, options?: {
537
- excludeTemp?: boolean;
538
- exclude?: string[];
539
- }) => {
540
- _id?: string;
541
- id?: string;
542
- name?: string;
543
- participants: (string | {
544
- id: string;
545
- prename?: string;
546
- lastname?: string;
547
- email?: string;
548
- name?: string;
549
- lastSeen?: string;
550
- online?: boolean;
551
- role?: "agent" | null;
552
- })[];
553
- blocked?: string[];
554
- messagesCount?: number;
555
- messagesCountSystem?: number;
556
- createdAt?: string;
557
- lastActivity?: string;
558
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
559
- supportStatus?: SupportStatus;
560
- supportStatusUpdatedAt?: string;
561
- supportStatusVersion?: number;
562
- sla?: {
563
- conversation: string;
564
- status: SupportStatus;
565
- statusVersion: number;
566
- startedAt: string;
567
- endAt: string;
568
- stoppedAt?: string;
569
- };
570
- participant?: {
571
- _id?: string;
572
- conversation: string;
573
- user: string;
574
- state: ParticipantState;
575
- rights: string[];
576
- lastReadId?: number;
577
- latestMessageId?: number;
578
- muted?: boolean;
579
- role?: "agent";
580
- joinedAt?: string;
581
- };
582
- participantDocs?: {
583
- _id?: string;
584
- conversation: string;
585
- user: string;
586
- state: ParticipantState;
587
- rights: string[];
588
- lastReadId?: number;
589
- latestMessageId?: number;
590
- muted?: boolean;
591
- role?: "agent";
592
- joinedAt?: string;
593
- }[];
594
- lastMessage?: {
595
- _id?: string;
596
- id: number;
597
- conversation: string;
598
- user?: string;
599
- message?: string;
600
- origin: "user" | "system";
601
- history: {
602
- created: string;
603
- updated?: string;
604
- };
605
- action?: string;
606
- actionData?: Record<string, unknown>;
607
- clientMessageId?: string;
608
- duplicate?: boolean;
609
- isUser?: boolean;
610
- };
611
- oldestMessageId?: number | null;
612
- messages?: {
613
- _id?: string;
614
- id: number;
615
- conversation: string;
616
- user?: string;
617
- message?: string;
618
- origin: "user" | "system";
619
- history: {
620
- created: string;
621
- updated?: string;
622
- };
623
- action?: string;
624
- actionData?: Record<string, unknown>;
625
- clientMessageId?: string;
626
- duplicate?: boolean;
627
- isUser?: boolean;
628
- }[];
629
- messagesLoaded?: boolean;
630
- unreadCount?: number;
631
- unread?: boolean;
632
- isMember?: boolean;
633
- isNew?: boolean;
634
- isTemp?: boolean;
635
- creator?: string;
636
- };
637
- cleanConversations: () => void;
638
- abandonConversation: (conversation: string) => void;
639
- inactivateConversation: () => void;
640
- rename: (conversation: string, newName: string) => Promise<void | import("@/libs/StudioSDK").SDKResponse<unknown>>;
641
- conversationRenamed: (conversation: string, newName: string) => void;
642
- executeParticipantsEdit: (conversation: string, add: string[], remove: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
643
- updateConversationParticipant: (conversation: string, state: ParticipantState) => void;
644
- leave: (conversation: string) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
645
- deleteConversation: (conversation: string) => Promise<void>;
646
- lastActiveConversation: import("vue").Ref<string, string>;
647
- getLatestConversation: () => {
648
- _id?: string;
649
- id?: string;
650
- name?: string;
651
- participants: (string | {
652
- id: string;
653
- prename?: string;
654
- lastname?: string;
655
- email?: string;
656
- name?: string;
657
- lastSeen?: string;
658
- online?: boolean;
659
- role?: "agent" | null;
660
- })[];
661
- blocked?: string[];
662
- messagesCount?: number;
663
- messagesCountSystem?: number;
664
- createdAt?: string;
665
- lastActivity?: string;
666
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
667
- supportStatus?: SupportStatus;
668
- supportStatusUpdatedAt?: string;
669
- supportStatusVersion?: number;
670
- sla?: {
671
- conversation: string;
672
- status: SupportStatus;
673
- statusVersion: number;
674
- startedAt: string;
675
- endAt: string;
676
- stoppedAt?: string;
677
- };
678
- participant?: {
679
- _id?: string;
680
- conversation: string;
681
- user: string;
682
- state: ParticipantState;
683
- rights: string[];
684
- lastReadId?: number;
685
- latestMessageId?: number;
686
- muted?: boolean;
687
- role?: "agent";
688
- joinedAt?: string;
689
- };
690
- participantDocs?: {
691
- _id?: string;
692
- conversation: string;
693
- user: string;
694
- state: ParticipantState;
695
- rights: string[];
696
- lastReadId?: number;
697
- latestMessageId?: number;
698
- muted?: boolean;
699
- role?: "agent";
700
- joinedAt?: string;
701
- }[];
702
- lastMessage?: {
703
- _id?: string;
704
- id: number;
705
- conversation: string;
706
- user?: string;
707
- message?: string;
708
- origin: "user" | "system";
709
- history: {
710
- created: string;
711
- updated?: string;
712
- };
713
- action?: string;
714
- actionData?: Record<string, unknown>;
715
- clientMessageId?: string;
716
- duplicate?: boolean;
717
- isUser?: boolean;
718
- };
719
- oldestMessageId?: number | null;
720
- messages?: {
721
- _id?: string;
722
- id: number;
723
- conversation: string;
724
- user?: string;
725
- message?: string;
726
- origin: "user" | "system";
727
- history: {
728
- created: string;
729
- updated?: string;
730
- };
731
- action?: string;
732
- actionData?: Record<string, unknown>;
733
- clientMessageId?: string;
734
- duplicate?: boolean;
735
- isUser?: boolean;
736
- }[];
737
- messagesLoaded?: boolean;
738
- unreadCount?: number;
739
- unread?: boolean;
740
- isMember?: boolean;
741
- isNew?: boolean;
742
- isTemp?: boolean;
743
- creator?: string;
744
- };
745
- activateLastOrLatestConversation: () => void;
746
- readLastActiveConversation: () => void;
747
- }, "conversations" | "conversationsLoaded" | "typing" | "activeConversation" | "lastActiveConversation">, Pick<{
748
- getAllConversations: () => Promise<void>;
749
- mergeConversations: (incoming: ConversationPayload[]) => void;
750
- refreshConversations: () => Promise<void>;
751
- handleReconnect: () => Promise<void>;
752
- conversations: import("vue").Ref<{
753
- _id?: string;
754
- id?: string;
755
- name?: string;
756
- participants: (string | {
757
- id: string;
758
- prename?: string;
759
- lastname?: string;
760
- email?: string;
761
- name?: string;
762
- lastSeen?: string;
763
- online?: boolean;
764
- role?: "agent" | null;
765
- })[];
766
- blocked?: string[];
767
- messagesCount?: number;
768
- messagesCountSystem?: number;
769
- createdAt?: string;
770
- lastActivity?: string;
771
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
772
- supportStatus?: SupportStatus;
773
- supportStatusUpdatedAt?: string;
774
- supportStatusVersion?: number;
775
- sla?: {
776
- conversation: string;
777
- status: SupportStatus;
778
- statusVersion: number;
779
- startedAt: string;
780
- endAt: string;
781
- stoppedAt?: string;
782
- };
783
- participant?: {
784
- _id?: string;
785
- conversation: string;
786
- user: string;
787
- state: ParticipantState;
788
- rights: string[];
789
- lastReadId?: number;
790
- latestMessageId?: number;
791
- muted?: boolean;
792
- role?: "agent";
793
- joinedAt?: string;
794
- };
795
- participantDocs?: {
796
- _id?: string;
797
- conversation: string;
798
- user: string;
799
- state: ParticipantState;
800
- rights: string[];
801
- lastReadId?: number;
802
- latestMessageId?: number;
803
- muted?: boolean;
804
- role?: "agent";
805
- joinedAt?: string;
806
- }[];
807
- lastMessage?: {
808
- _id?: string;
809
- id: number;
810
- conversation: string;
811
- user?: string;
812
- message?: string;
813
- origin: "user" | "system";
814
- history: {
815
- created: string;
816
- updated?: string;
817
- };
818
- action?: string;
819
- actionData?: Record<string, unknown>;
820
- clientMessageId?: string;
821
- duplicate?: boolean;
822
- isUser?: boolean;
823
- };
824
- oldestMessageId?: number | null;
825
- messages?: {
826
- _id?: string;
827
- id: number;
828
- conversation: string;
829
- user?: string;
830
- message?: string;
831
- origin: "user" | "system";
832
- history: {
833
- created: string;
834
- updated?: string;
835
- };
836
- action?: string;
837
- actionData?: Record<string, unknown>;
838
- clientMessageId?: string;
839
- duplicate?: boolean;
840
- isUser?: boolean;
841
- }[];
842
- messagesLoaded?: boolean;
843
- unreadCount?: number;
844
- unread?: boolean;
845
- isMember?: boolean;
846
- isNew?: boolean;
847
- isTemp?: boolean;
848
- creator?: string;
849
- }[], Conversation[] | {
850
- _id?: string;
851
- id?: string;
852
- name?: string;
853
- participants: (string | {
854
- id: string;
855
- prename?: string;
856
- lastname?: string;
857
- email?: string;
858
- name?: string;
859
- lastSeen?: string;
860
- online?: boolean;
861
- role?: "agent" | null;
862
- })[];
863
- blocked?: string[];
864
- messagesCount?: number;
865
- messagesCountSystem?: number;
866
- createdAt?: string;
867
- lastActivity?: string;
868
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
869
- supportStatus?: SupportStatus;
870
- supportStatusUpdatedAt?: string;
871
- supportStatusVersion?: number;
872
- sla?: {
873
- conversation: string;
874
- status: SupportStatus;
875
- statusVersion: number;
876
- startedAt: string;
877
- endAt: string;
878
- stoppedAt?: string;
879
- };
880
- participant?: {
881
- _id?: string;
882
- conversation: string;
883
- user: string;
884
- state: ParticipantState;
885
- rights: string[];
886
- lastReadId?: number;
887
- latestMessageId?: number;
888
- muted?: boolean;
889
- role?: "agent";
890
- joinedAt?: string;
891
- };
892
- participantDocs?: {
893
- _id?: string;
894
- conversation: string;
895
- user: string;
896
- state: ParticipantState;
897
- rights: string[];
898
- lastReadId?: number;
899
- latestMessageId?: number;
900
- muted?: boolean;
901
- role?: "agent";
902
- joinedAt?: string;
903
- }[];
904
- lastMessage?: {
905
- _id?: string;
906
- id: number;
907
- conversation: string;
908
- user?: string;
909
- message?: string;
910
- origin: "user" | "system";
911
- history: {
912
- created: string;
913
- updated?: string;
914
- };
915
- action?: string;
916
- actionData?: Record<string, unknown>;
917
- clientMessageId?: string;
918
- duplicate?: boolean;
919
- isUser?: boolean;
920
- };
921
- oldestMessageId?: number | null;
922
- messages?: {
923
- _id?: string;
924
- id: number;
925
- conversation: string;
926
- user?: string;
927
- message?: string;
928
- origin: "user" | "system";
929
- history: {
930
- created: string;
931
- updated?: string;
932
- };
933
- action?: string;
934
- actionData?: Record<string, unknown>;
935
- clientMessageId?: string;
936
- duplicate?: boolean;
937
- isUser?: boolean;
938
- }[];
939
- messagesLoaded?: boolean;
940
- unreadCount?: number;
941
- unread?: boolean;
942
- isMember?: boolean;
943
- isNew?: boolean;
944
- isTemp?: boolean;
945
- creator?: string;
946
- }[]>;
947
- conversationsLoaded: import("vue").Ref<boolean, boolean>;
948
- unreadConversations: import("vue").ComputedRef<{
949
- _id?: string;
950
- id?: string;
951
- name?: string;
952
- participants: (string | {
953
- id: string;
954
- prename?: string;
955
- lastname?: string;
956
- email?: string;
957
- name?: string;
958
- lastSeen?: string;
959
- online?: boolean;
960
- role?: "agent" | null;
961
- })[];
962
- blocked?: string[];
963
- messagesCount?: number;
964
- messagesCountSystem?: number;
965
- createdAt?: string;
966
- lastActivity?: string;
967
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
968
- supportStatus?: SupportStatus;
969
- supportStatusUpdatedAt?: string;
970
- supportStatusVersion?: number;
971
- sla?: {
972
- conversation: string;
973
- status: SupportStatus;
974
- statusVersion: number;
975
- startedAt: string;
976
- endAt: string;
977
- stoppedAt?: string;
978
- };
979
- participant?: {
980
- _id?: string;
981
- conversation: string;
982
- user: string;
983
- state: ParticipantState;
984
- rights: string[];
985
- lastReadId?: number;
986
- latestMessageId?: number;
987
- muted?: boolean;
988
- role?: "agent";
989
- joinedAt?: string;
990
- };
991
- participantDocs?: {
992
- _id?: string;
993
- conversation: string;
994
- user: string;
995
- state: ParticipantState;
996
- rights: string[];
997
- lastReadId?: number;
998
- latestMessageId?: number;
999
- muted?: boolean;
1000
- role?: "agent";
1001
- joinedAt?: string;
1002
- }[];
1003
- lastMessage?: {
1004
- _id?: string;
1005
- id: number;
1006
- conversation: string;
1007
- user?: string;
1008
- message?: string;
1009
- origin: "user" | "system";
1010
- history: {
1011
- created: string;
1012
- updated?: string;
1013
- };
1014
- action?: string;
1015
- actionData?: Record<string, unknown>;
1016
- clientMessageId?: string;
1017
- duplicate?: boolean;
1018
- isUser?: boolean;
1019
- };
1020
- oldestMessageId?: number | null;
1021
- messages?: {
1022
- _id?: string;
1023
- id: number;
1024
- conversation: string;
1025
- user?: string;
1026
- message?: string;
1027
- origin: "user" | "system";
1028
- history: {
1029
- created: string;
1030
- updated?: string;
1031
- };
1032
- action?: string;
1033
- actionData?: Record<string, unknown>;
1034
- clientMessageId?: string;
1035
- duplicate?: boolean;
1036
- isUser?: boolean;
1037
- }[];
1038
- messagesLoaded?: boolean;
1039
- unreadCount?: number;
1040
- unread?: boolean;
1041
- isMember?: boolean;
1042
- isNew?: boolean;
1043
- isTemp?: boolean;
1044
- creator?: string;
1045
- }[]>;
1046
- totalUnreadCount: import("vue").ComputedRef<number>;
1047
- totalUnreadConversations: import("vue").ComputedRef<number>;
1048
- typing: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
1049
- setTyping: (conversation: string, user: string, isTyping: boolean) => void;
1050
- loadParticipants: (conversation: string) => Promise<import("@/interfaces/ParticipantDocument").ParticipantDocument[]>;
1051
- setRights: (conversation: string, user: string, rights: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
1052
- isMuted: (conversation: string) => boolean;
1053
- setMuted: (conversation: string, muted: boolean) => Promise<void>;
1054
- conversationMuted: (conversation: string, muted: boolean) => void;
1055
- updateSupportStatus: (conversation: string, status: SupportStatus | undefined, version: number | undefined, updatedAt: string | undefined, options?: {
1056
- force?: boolean;
1057
- sla?: Conversation["sla"];
1058
- }) => boolean;
1059
- blockUser: (conversation: string, user: string, block: boolean) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
1060
- updateParticipantRights: (conversation: string, user: string, rights: string[]) => void;
1061
- create: (participants: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
1062
- createNew: (participants: string[], creator?: string, operationMode?: "chat" | "support") => string;
1063
- createConversation: () => string;
1064
- startSupport: () => Promise<string>;
1065
- activateConversation: (conversationId: string) => Promise<void>;
1066
- activeConversation: import("vue").Ref<{
1067
- _id?: string;
1068
- id?: string;
1069
- name?: string;
1070
- participants: (string | {
1071
- id: string;
1072
- prename?: string;
1073
- lastname?: string;
1074
- email?: string;
1075
- name?: string;
1076
- lastSeen?: string;
1077
- online?: boolean;
1078
- role?: "agent" | null;
1079
- })[];
1080
- blocked?: string[];
1081
- messagesCount?: number;
1082
- messagesCountSystem?: number;
1083
- createdAt?: string;
1084
- lastActivity?: string;
1085
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1086
- supportStatus?: SupportStatus;
1087
- supportStatusUpdatedAt?: string;
1088
- supportStatusVersion?: number;
1089
- sla?: {
1090
- conversation: string;
1091
- status: SupportStatus;
1092
- statusVersion: number;
1093
- startedAt: string;
1094
- endAt: string;
1095
- stoppedAt?: string;
1096
- };
1097
- participant?: {
1098
- _id?: string;
1099
- conversation: string;
1100
- user: string;
1101
- state: ParticipantState;
1102
- rights: string[];
1103
- lastReadId?: number;
1104
- latestMessageId?: number;
1105
- muted?: boolean;
1106
- role?: "agent";
1107
- joinedAt?: string;
1108
- };
1109
- participantDocs?: {
1110
- _id?: string;
1111
- conversation: string;
1112
- user: string;
1113
- state: ParticipantState;
1114
- rights: string[];
1115
- lastReadId?: number;
1116
- latestMessageId?: number;
1117
- muted?: boolean;
1118
- role?: "agent";
1119
- joinedAt?: string;
1120
- }[];
1121
- lastMessage?: {
1122
- _id?: string;
1123
- id: number;
1124
- conversation: string;
1125
- user?: string;
1126
- message?: string;
1127
- origin: "user" | "system";
1128
- history: {
1129
- created: string;
1130
- updated?: string;
1131
- };
1132
- action?: string;
1133
- actionData?: Record<string, unknown>;
1134
- clientMessageId?: string;
1135
- duplicate?: boolean;
1136
- isUser?: boolean;
1137
- };
1138
- oldestMessageId?: number | null;
1139
- messages?: {
1140
- _id?: string;
1141
- id: number;
1142
- conversation: string;
1143
- user?: string;
1144
- message?: string;
1145
- origin: "user" | "system";
1146
- history: {
1147
- created: string;
1148
- updated?: string;
1149
- };
1150
- action?: string;
1151
- actionData?: Record<string, unknown>;
1152
- clientMessageId?: string;
1153
- duplicate?: boolean;
1154
- isUser?: boolean;
1155
- }[];
1156
- messagesLoaded?: boolean;
1157
- unreadCount?: number;
1158
- unread?: boolean;
1159
- isMember?: boolean;
1160
- isNew?: boolean;
1161
- isTemp?: boolean;
1162
- creator?: string;
1163
- }, Conversation | {
1164
- _id?: string;
1165
- id?: string;
1166
- name?: string;
1167
- participants: (string | {
1168
- id: string;
1169
- prename?: string;
1170
- lastname?: string;
1171
- email?: string;
1172
- name?: string;
1173
- lastSeen?: string;
1174
- online?: boolean;
1175
- role?: "agent" | null;
1176
- })[];
1177
- blocked?: string[];
1178
- messagesCount?: number;
1179
- messagesCountSystem?: number;
1180
- createdAt?: string;
1181
- lastActivity?: string;
1182
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1183
- supportStatus?: SupportStatus;
1184
- supportStatusUpdatedAt?: string;
1185
- supportStatusVersion?: number;
1186
- sla?: {
1187
- conversation: string;
1188
- status: SupportStatus;
1189
- statusVersion: number;
1190
- startedAt: string;
1191
- endAt: string;
1192
- stoppedAt?: string;
1193
- };
1194
- participant?: {
1195
- _id?: string;
1196
- conversation: string;
1197
- user: string;
1198
- state: ParticipantState;
1199
- rights: string[];
1200
- lastReadId?: number;
1201
- latestMessageId?: number;
1202
- muted?: boolean;
1203
- role?: "agent";
1204
- joinedAt?: string;
1205
- };
1206
- participantDocs?: {
1207
- _id?: string;
1208
- conversation: string;
1209
- user: string;
1210
- state: ParticipantState;
1211
- rights: string[];
1212
- lastReadId?: number;
1213
- latestMessageId?: number;
1214
- muted?: boolean;
1215
- role?: "agent";
1216
- joinedAt?: string;
1217
- }[];
1218
- lastMessage?: {
1219
- _id?: string;
1220
- id: number;
1221
- conversation: string;
1222
- user?: string;
1223
- message?: string;
1224
- origin: "user" | "system";
1225
- history: {
1226
- created: string;
1227
- updated?: string;
1228
- };
1229
- action?: string;
1230
- actionData?: Record<string, unknown>;
1231
- clientMessageId?: string;
1232
- duplicate?: boolean;
1233
- isUser?: boolean;
1234
- };
1235
- oldestMessageId?: number | null;
1236
- messages?: {
1237
- _id?: string;
1238
- id: number;
1239
- conversation: string;
1240
- user?: string;
1241
- message?: string;
1242
- origin: "user" | "system";
1243
- history: {
1244
- created: string;
1245
- updated?: string;
1246
- };
1247
- action?: string;
1248
- actionData?: Record<string, unknown>;
1249
- clientMessageId?: string;
1250
- duplicate?: boolean;
1251
- isUser?: boolean;
1252
- }[];
1253
- messagesLoaded?: boolean;
1254
- unreadCount?: number;
1255
- unread?: boolean;
1256
- isMember?: boolean;
1257
- isNew?: boolean;
1258
- isTemp?: boolean;
1259
- creator?: string;
1260
- }>;
1261
- convertTempToConversation: (conversation: ConversationPayload) => void;
1262
- getMessagesFromApi: (conversation: string, beforeId?: number) => Promise<Message[]>;
1263
- addMessagesToConversation: (messages: Message[], conversation: string) => number;
1264
- getMessagesForConversation: (conversation: string) => Message[];
1265
- updateLastMessage: (conversationId: string, message: Message) => void;
1266
- updateUnread: (conversation: string) => void;
1267
- updateAllUnread: () => void;
1268
- increaseMessageCount: (conversation: string) => void;
1269
- increaseMessageCountSystem: (conversation: string) => void;
1270
- setLastReadId: (conversation: string, lastReadId: number) => void;
1271
- getConversation: (conversation: string | undefined) => ConversationEntry | undefined;
1272
- addParticipant: (conversation: string, participant: string) => void;
1273
- removeParticipant: (conversation: string, participant: string) => void;
1274
- setParticipants: (conversation: string, participants: Participant[]) => void;
1275
- toggleParticipant: (conversation: string, participant: string) => void;
1276
- getConversationViaParticipantsAndName: (participants: Participant[], name?: string, options?: {
1277
- excludeTemp?: boolean;
1278
- exclude?: string[];
1279
- }) => {
1280
- _id?: string;
1281
- id?: string;
1282
- name?: string;
1283
- participants: (string | {
1284
- id: string;
1285
- prename?: string;
1286
- lastname?: string;
1287
- email?: string;
1288
- name?: string;
1289
- lastSeen?: string;
1290
- online?: boolean;
1291
- role?: "agent" | null;
1292
- })[];
1293
- blocked?: string[];
1294
- messagesCount?: number;
1295
- messagesCountSystem?: number;
1296
- createdAt?: string;
1297
- lastActivity?: string;
1298
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1299
- supportStatus?: SupportStatus;
1300
- supportStatusUpdatedAt?: string;
1301
- supportStatusVersion?: number;
1302
- sla?: {
1303
- conversation: string;
1304
- status: SupportStatus;
1305
- statusVersion: number;
1306
- startedAt: string;
1307
- endAt: string;
1308
- stoppedAt?: string;
1309
- };
1310
- participant?: {
1311
- _id?: string;
1312
- conversation: string;
1313
- user: string;
1314
- state: ParticipantState;
1315
- rights: string[];
1316
- lastReadId?: number;
1317
- latestMessageId?: number;
1318
- muted?: boolean;
1319
- role?: "agent";
1320
- joinedAt?: string;
1321
- };
1322
- participantDocs?: {
1323
- _id?: string;
1324
- conversation: string;
1325
- user: string;
1326
- state: ParticipantState;
1327
- rights: string[];
1328
- lastReadId?: number;
1329
- latestMessageId?: number;
1330
- muted?: boolean;
1331
- role?: "agent";
1332
- joinedAt?: string;
1333
- }[];
1334
- lastMessage?: {
1335
- _id?: string;
1336
- id: number;
1337
- conversation: string;
1338
- user?: string;
1339
- message?: string;
1340
- origin: "user" | "system";
1341
- history: {
1342
- created: string;
1343
- updated?: string;
1344
- };
1345
- action?: string;
1346
- actionData?: Record<string, unknown>;
1347
- clientMessageId?: string;
1348
- duplicate?: boolean;
1349
- isUser?: boolean;
1350
- };
1351
- oldestMessageId?: number | null;
1352
- messages?: {
1353
- _id?: string;
1354
- id: number;
1355
- conversation: string;
1356
- user?: string;
1357
- message?: string;
1358
- origin: "user" | "system";
1359
- history: {
1360
- created: string;
1361
- updated?: string;
1362
- };
1363
- action?: string;
1364
- actionData?: Record<string, unknown>;
1365
- clientMessageId?: string;
1366
- duplicate?: boolean;
1367
- isUser?: boolean;
1368
- }[];
1369
- messagesLoaded?: boolean;
1370
- unreadCount?: number;
1371
- unread?: boolean;
1372
- isMember?: boolean;
1373
- isNew?: boolean;
1374
- isTemp?: boolean;
1375
- creator?: string;
1376
- };
1377
- cleanConversations: () => void;
1378
- abandonConversation: (conversation: string) => void;
1379
- inactivateConversation: () => void;
1380
- rename: (conversation: string, newName: string) => Promise<void | import("@/libs/StudioSDK").SDKResponse<unknown>>;
1381
- conversationRenamed: (conversation: string, newName: string) => void;
1382
- executeParticipantsEdit: (conversation: string, add: string[], remove: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
1383
- updateConversationParticipant: (conversation: string, state: ParticipantState) => void;
1384
- leave: (conversation: string) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
1385
- deleteConversation: (conversation: string) => Promise<void>;
1386
- lastActiveConversation: import("vue").Ref<string, string>;
1387
- getLatestConversation: () => {
1388
- _id?: string;
1389
- id?: string;
1390
- name?: string;
1391
- participants: (string | {
1392
- id: string;
1393
- prename?: string;
1394
- lastname?: string;
1395
- email?: string;
1396
- name?: string;
1397
- lastSeen?: string;
1398
- online?: boolean;
1399
- role?: "agent" | null;
1400
- })[];
1401
- blocked?: string[];
1402
- messagesCount?: number;
1403
- messagesCountSystem?: number;
1404
- createdAt?: string;
1405
- lastActivity?: string;
1406
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1407
- supportStatus?: SupportStatus;
1408
- supportStatusUpdatedAt?: string;
1409
- supportStatusVersion?: number;
1410
- sla?: {
1411
- conversation: string;
1412
- status: SupportStatus;
1413
- statusVersion: number;
1414
- startedAt: string;
1415
- endAt: string;
1416
- stoppedAt?: string;
1417
- };
1418
- participant?: {
1419
- _id?: string;
1420
- conversation: string;
1421
- user: string;
1422
- state: ParticipantState;
1423
- rights: string[];
1424
- lastReadId?: number;
1425
- latestMessageId?: number;
1426
- muted?: boolean;
1427
- role?: "agent";
1428
- joinedAt?: string;
1429
- };
1430
- participantDocs?: {
1431
- _id?: string;
1432
- conversation: string;
1433
- user: string;
1434
- state: ParticipantState;
1435
- rights: string[];
1436
- lastReadId?: number;
1437
- latestMessageId?: number;
1438
- muted?: boolean;
1439
- role?: "agent";
1440
- joinedAt?: string;
1441
- }[];
1442
- lastMessage?: {
1443
- _id?: string;
1444
- id: number;
1445
- conversation: string;
1446
- user?: string;
1447
- message?: string;
1448
- origin: "user" | "system";
1449
- history: {
1450
- created: string;
1451
- updated?: string;
1452
- };
1453
- action?: string;
1454
- actionData?: Record<string, unknown>;
1455
- clientMessageId?: string;
1456
- duplicate?: boolean;
1457
- isUser?: boolean;
1458
- };
1459
- oldestMessageId?: number | null;
1460
- messages?: {
1461
- _id?: string;
1462
- id: number;
1463
- conversation: string;
1464
- user?: string;
1465
- message?: string;
1466
- origin: "user" | "system";
1467
- history: {
1468
- created: string;
1469
- updated?: string;
1470
- };
1471
- action?: string;
1472
- actionData?: Record<string, unknown>;
1473
- clientMessageId?: string;
1474
- duplicate?: boolean;
1475
- isUser?: boolean;
1476
- }[];
1477
- messagesLoaded?: boolean;
1478
- unreadCount?: number;
1479
- unread?: boolean;
1480
- isMember?: boolean;
1481
- isNew?: boolean;
1482
- isTemp?: boolean;
1483
- creator?: string;
1484
- };
1485
- activateLastOrLatestConversation: () => void;
1486
- readLastActiveConversation: () => void;
1487
- }, "unreadConversations" | "totalUnreadCount" | "totalUnreadConversations">, Pick<{
1488
- getAllConversations: () => Promise<void>;
1489
- mergeConversations: (incoming: ConversationPayload[]) => void;
1490
- refreshConversations: () => Promise<void>;
1491
- handleReconnect: () => Promise<void>;
1492
- conversations: import("vue").Ref<{
1493
- _id?: string;
1494
- id?: string;
1495
- name?: string;
1496
- participants: (string | {
1497
- id: string;
1498
- prename?: string;
1499
- lastname?: string;
1500
- email?: string;
1501
- name?: string;
1502
- lastSeen?: string;
1503
- online?: boolean;
1504
- role?: "agent" | null;
1505
- })[];
1506
- blocked?: string[];
1507
- messagesCount?: number;
1508
- messagesCountSystem?: number;
1509
- createdAt?: string;
1510
- lastActivity?: string;
1511
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1512
- supportStatus?: SupportStatus;
1513
- supportStatusUpdatedAt?: string;
1514
- supportStatusVersion?: number;
1515
- sla?: {
1516
- conversation: string;
1517
- status: SupportStatus;
1518
- statusVersion: number;
1519
- startedAt: string;
1520
- endAt: string;
1521
- stoppedAt?: string;
1522
- };
1523
- participant?: {
1524
- _id?: string;
1525
- conversation: string;
1526
- user: string;
1527
- state: ParticipantState;
1528
- rights: string[];
1529
- lastReadId?: number;
1530
- latestMessageId?: number;
1531
- muted?: boolean;
1532
- role?: "agent";
1533
- joinedAt?: string;
1534
- };
1535
- participantDocs?: {
1536
- _id?: string;
1537
- conversation: string;
1538
- user: string;
1539
- state: ParticipantState;
1540
- rights: string[];
1541
- lastReadId?: number;
1542
- latestMessageId?: number;
1543
- muted?: boolean;
1544
- role?: "agent";
1545
- joinedAt?: string;
1546
- }[];
1547
- lastMessage?: {
1548
- _id?: string;
1549
- id: number;
1550
- conversation: string;
1551
- user?: string;
1552
- message?: string;
1553
- origin: "user" | "system";
1554
- history: {
1555
- created: string;
1556
- updated?: string;
1557
- };
1558
- action?: string;
1559
- actionData?: Record<string, unknown>;
1560
- clientMessageId?: string;
1561
- duplicate?: boolean;
1562
- isUser?: boolean;
1563
- };
1564
- oldestMessageId?: number | null;
1565
- messages?: {
1566
- _id?: string;
1567
- id: number;
1568
- conversation: string;
1569
- user?: string;
1570
- message?: string;
1571
- origin: "user" | "system";
1572
- history: {
1573
- created: string;
1574
- updated?: string;
1575
- };
1576
- action?: string;
1577
- actionData?: Record<string, unknown>;
1578
- clientMessageId?: string;
1579
- duplicate?: boolean;
1580
- isUser?: boolean;
1581
- }[];
1582
- messagesLoaded?: boolean;
1583
- unreadCount?: number;
1584
- unread?: boolean;
1585
- isMember?: boolean;
1586
- isNew?: boolean;
1587
- isTemp?: boolean;
1588
- creator?: string;
1589
- }[], Conversation[] | {
1590
- _id?: string;
1591
- id?: string;
1592
- name?: string;
1593
- participants: (string | {
1594
- id: string;
1595
- prename?: string;
1596
- lastname?: string;
1597
- email?: string;
1598
- name?: string;
1599
- lastSeen?: string;
1600
- online?: boolean;
1601
- role?: "agent" | null;
1602
- })[];
1603
- blocked?: string[];
1604
- messagesCount?: number;
1605
- messagesCountSystem?: number;
1606
- createdAt?: string;
1607
- lastActivity?: string;
1608
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1609
- supportStatus?: SupportStatus;
1610
- supportStatusUpdatedAt?: string;
1611
- supportStatusVersion?: number;
1612
- sla?: {
1613
- conversation: string;
1614
- status: SupportStatus;
1615
- statusVersion: number;
1616
- startedAt: string;
1617
- endAt: string;
1618
- stoppedAt?: string;
1619
- };
1620
- participant?: {
1621
- _id?: string;
1622
- conversation: string;
1623
- user: string;
1624
- state: ParticipantState;
1625
- rights: string[];
1626
- lastReadId?: number;
1627
- latestMessageId?: number;
1628
- muted?: boolean;
1629
- role?: "agent";
1630
- joinedAt?: string;
1631
- };
1632
- participantDocs?: {
1633
- _id?: string;
1634
- conversation: string;
1635
- user: string;
1636
- state: ParticipantState;
1637
- rights: string[];
1638
- lastReadId?: number;
1639
- latestMessageId?: number;
1640
- muted?: boolean;
1641
- role?: "agent";
1642
- joinedAt?: string;
1643
- }[];
1644
- lastMessage?: {
1645
- _id?: string;
1646
- id: number;
1647
- conversation: string;
1648
- user?: string;
1649
- message?: string;
1650
- origin: "user" | "system";
1651
- history: {
1652
- created: string;
1653
- updated?: string;
1654
- };
1655
- action?: string;
1656
- actionData?: Record<string, unknown>;
1657
- clientMessageId?: string;
1658
- duplicate?: boolean;
1659
- isUser?: boolean;
1660
- };
1661
- oldestMessageId?: number | null;
1662
- messages?: {
1663
- _id?: string;
1664
- id: number;
1665
- conversation: string;
1666
- user?: string;
1667
- message?: string;
1668
- origin: "user" | "system";
1669
- history: {
1670
- created: string;
1671
- updated?: string;
1672
- };
1673
- action?: string;
1674
- actionData?: Record<string, unknown>;
1675
- clientMessageId?: string;
1676
- duplicate?: boolean;
1677
- isUser?: boolean;
1678
- }[];
1679
- messagesLoaded?: boolean;
1680
- unreadCount?: number;
1681
- unread?: boolean;
1682
- isMember?: boolean;
1683
- isNew?: boolean;
1684
- isTemp?: boolean;
1685
- creator?: string;
1686
- }[]>;
1687
- conversationsLoaded: import("vue").Ref<boolean, boolean>;
1688
- unreadConversations: import("vue").ComputedRef<{
1689
- _id?: string;
1690
- id?: string;
1691
- name?: string;
1692
- participants: (string | {
1693
- id: string;
1694
- prename?: string;
1695
- lastname?: string;
1696
- email?: string;
1697
- name?: string;
1698
- lastSeen?: string;
1699
- online?: boolean;
1700
- role?: "agent" | null;
1701
- })[];
1702
- blocked?: string[];
1703
- messagesCount?: number;
1704
- messagesCountSystem?: number;
1705
- createdAt?: string;
1706
- lastActivity?: string;
1707
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1708
- supportStatus?: SupportStatus;
1709
- supportStatusUpdatedAt?: string;
1710
- supportStatusVersion?: number;
1711
- sla?: {
1712
- conversation: string;
1713
- status: SupportStatus;
1714
- statusVersion: number;
1715
- startedAt: string;
1716
- endAt: string;
1717
- stoppedAt?: string;
1718
- };
1719
- participant?: {
1720
- _id?: string;
1721
- conversation: string;
1722
- user: string;
1723
- state: ParticipantState;
1724
- rights: string[];
1725
- lastReadId?: number;
1726
- latestMessageId?: number;
1727
- muted?: boolean;
1728
- role?: "agent";
1729
- joinedAt?: string;
1730
- };
1731
- participantDocs?: {
1732
- _id?: string;
1733
- conversation: string;
1734
- user: string;
1735
- state: ParticipantState;
1736
- rights: string[];
1737
- lastReadId?: number;
1738
- latestMessageId?: number;
1739
- muted?: boolean;
1740
- role?: "agent";
1741
- joinedAt?: string;
1742
- }[];
1743
- lastMessage?: {
1744
- _id?: string;
1745
- id: number;
1746
- conversation: string;
1747
- user?: string;
1748
- message?: string;
1749
- origin: "user" | "system";
1750
- history: {
1751
- created: string;
1752
- updated?: string;
1753
- };
1754
- action?: string;
1755
- actionData?: Record<string, unknown>;
1756
- clientMessageId?: string;
1757
- duplicate?: boolean;
1758
- isUser?: boolean;
1759
- };
1760
- oldestMessageId?: number | null;
1761
- messages?: {
1762
- _id?: string;
1763
- id: number;
1764
- conversation: string;
1765
- user?: string;
1766
- message?: string;
1767
- origin: "user" | "system";
1768
- history: {
1769
- created: string;
1770
- updated?: string;
1771
- };
1772
- action?: string;
1773
- actionData?: Record<string, unknown>;
1774
- clientMessageId?: string;
1775
- duplicate?: boolean;
1776
- isUser?: boolean;
1777
- }[];
1778
- messagesLoaded?: boolean;
1779
- unreadCount?: number;
1780
- unread?: boolean;
1781
- isMember?: boolean;
1782
- isNew?: boolean;
1783
- isTemp?: boolean;
1784
- creator?: string;
1785
- }[]>;
1786
- totalUnreadCount: import("vue").ComputedRef<number>;
1787
- totalUnreadConversations: import("vue").ComputedRef<number>;
1788
- typing: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
1789
- setTyping: (conversation: string, user: string, isTyping: boolean) => void;
1790
- loadParticipants: (conversation: string) => Promise<import("@/interfaces/ParticipantDocument").ParticipantDocument[]>;
1791
- setRights: (conversation: string, user: string, rights: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
1792
- isMuted: (conversation: string) => boolean;
1793
- setMuted: (conversation: string, muted: boolean) => Promise<void>;
1794
- conversationMuted: (conversation: string, muted: boolean) => void;
1795
- updateSupportStatus: (conversation: string, status: SupportStatus | undefined, version: number | undefined, updatedAt: string | undefined, options?: {
1796
- force?: boolean;
1797
- sla?: Conversation["sla"];
1798
- }) => boolean;
1799
- blockUser: (conversation: string, user: string, block: boolean) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
1800
- updateParticipantRights: (conversation: string, user: string, rights: string[]) => void;
1801
- create: (participants: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
1802
- createNew: (participants: string[], creator?: string, operationMode?: "chat" | "support") => string;
1803
- createConversation: () => string;
1804
- startSupport: () => Promise<string>;
1805
- activateConversation: (conversationId: string) => Promise<void>;
1806
- activeConversation: import("vue").Ref<{
1807
- _id?: string;
1808
- id?: string;
1809
- name?: string;
1810
- participants: (string | {
1811
- id: string;
1812
- prename?: string;
1813
- lastname?: string;
1814
- email?: string;
1815
- name?: string;
1816
- lastSeen?: string;
1817
- online?: boolean;
1818
- role?: "agent" | null;
1819
- })[];
1820
- blocked?: string[];
1821
- messagesCount?: number;
1822
- messagesCountSystem?: number;
1823
- createdAt?: string;
1824
- lastActivity?: string;
1825
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1826
- supportStatus?: SupportStatus;
1827
- supportStatusUpdatedAt?: string;
1828
- supportStatusVersion?: number;
1829
- sla?: {
1830
- conversation: string;
1831
- status: SupportStatus;
1832
- statusVersion: number;
1833
- startedAt: string;
1834
- endAt: string;
1835
- stoppedAt?: string;
1836
- };
1837
- participant?: {
1838
- _id?: string;
1839
- conversation: string;
1840
- user: string;
1841
- state: ParticipantState;
1842
- rights: string[];
1843
- lastReadId?: number;
1844
- latestMessageId?: number;
1845
- muted?: boolean;
1846
- role?: "agent";
1847
- joinedAt?: string;
1848
- };
1849
- participantDocs?: {
1850
- _id?: string;
1851
- conversation: string;
1852
- user: string;
1853
- state: ParticipantState;
1854
- rights: string[];
1855
- lastReadId?: number;
1856
- latestMessageId?: number;
1857
- muted?: boolean;
1858
- role?: "agent";
1859
- joinedAt?: string;
1860
- }[];
1861
- lastMessage?: {
1862
- _id?: string;
1863
- id: number;
1864
- conversation: string;
1865
- user?: string;
1866
- message?: string;
1867
- origin: "user" | "system";
1868
- history: {
1869
- created: string;
1870
- updated?: string;
1871
- };
1872
- action?: string;
1873
- actionData?: Record<string, unknown>;
1874
- clientMessageId?: string;
1875
- duplicate?: boolean;
1876
- isUser?: boolean;
1877
- };
1878
- oldestMessageId?: number | null;
1879
- messages?: {
1880
- _id?: string;
1881
- id: number;
1882
- conversation: string;
1883
- user?: string;
1884
- message?: string;
1885
- origin: "user" | "system";
1886
- history: {
1887
- created: string;
1888
- updated?: string;
1889
- };
1890
- action?: string;
1891
- actionData?: Record<string, unknown>;
1892
- clientMessageId?: string;
1893
- duplicate?: boolean;
1894
- isUser?: boolean;
1895
- }[];
1896
- messagesLoaded?: boolean;
1897
- unreadCount?: number;
1898
- unread?: boolean;
1899
- isMember?: boolean;
1900
- isNew?: boolean;
1901
- isTemp?: boolean;
1902
- creator?: string;
1903
- }, Conversation | {
1904
- _id?: string;
1905
- id?: string;
1906
- name?: string;
1907
- participants: (string | {
1908
- id: string;
1909
- prename?: string;
1910
- lastname?: string;
1911
- email?: string;
1912
- name?: string;
1913
- lastSeen?: string;
1914
- online?: boolean;
1915
- role?: "agent" | null;
1916
- })[];
1917
- blocked?: string[];
1918
- messagesCount?: number;
1919
- messagesCountSystem?: number;
1920
- createdAt?: string;
1921
- lastActivity?: string;
1922
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
1923
- supportStatus?: SupportStatus;
1924
- supportStatusUpdatedAt?: string;
1925
- supportStatusVersion?: number;
1926
- sla?: {
1927
- conversation: string;
1928
- status: SupportStatus;
1929
- statusVersion: number;
1930
- startedAt: string;
1931
- endAt: string;
1932
- stoppedAt?: string;
1933
- };
1934
- participant?: {
1935
- _id?: string;
1936
- conversation: string;
1937
- user: string;
1938
- state: ParticipantState;
1939
- rights: string[];
1940
- lastReadId?: number;
1941
- latestMessageId?: number;
1942
- muted?: boolean;
1943
- role?: "agent";
1944
- joinedAt?: string;
1945
- };
1946
- participantDocs?: {
1947
- _id?: string;
1948
- conversation: string;
1949
- user: string;
1950
- state: ParticipantState;
1951
- rights: string[];
1952
- lastReadId?: number;
1953
- latestMessageId?: number;
1954
- muted?: boolean;
1955
- role?: "agent";
1956
- joinedAt?: string;
1957
- }[];
1958
- lastMessage?: {
1959
- _id?: string;
1960
- id: number;
1961
- conversation: string;
1962
- user?: string;
1963
- message?: string;
1964
- origin: "user" | "system";
1965
- history: {
1966
- created: string;
1967
- updated?: string;
1968
- };
1969
- action?: string;
1970
- actionData?: Record<string, unknown>;
1971
- clientMessageId?: string;
1972
- duplicate?: boolean;
1973
- isUser?: boolean;
1974
- };
1975
- oldestMessageId?: number | null;
1976
- messages?: {
1977
- _id?: string;
1978
- id: number;
1979
- conversation: string;
1980
- user?: string;
1981
- message?: string;
1982
- origin: "user" | "system";
1983
- history: {
1984
- created: string;
1985
- updated?: string;
1986
- };
1987
- action?: string;
1988
- actionData?: Record<string, unknown>;
1989
- clientMessageId?: string;
1990
- duplicate?: boolean;
1991
- isUser?: boolean;
1992
- }[];
1993
- messagesLoaded?: boolean;
1994
- unreadCount?: number;
1995
- unread?: boolean;
1996
- isMember?: boolean;
1997
- isNew?: boolean;
1998
- isTemp?: boolean;
1999
- creator?: string;
2000
- }>;
2001
- convertTempToConversation: (conversation: ConversationPayload) => void;
2002
- getMessagesFromApi: (conversation: string, beforeId?: number) => Promise<Message[]>;
2003
- addMessagesToConversation: (messages: Message[], conversation: string) => number;
2004
- getMessagesForConversation: (conversation: string) => Message[];
2005
- updateLastMessage: (conversationId: string, message: Message) => void;
2006
- updateUnread: (conversation: string) => void;
2007
- updateAllUnread: () => void;
2008
- increaseMessageCount: (conversation: string) => void;
2009
- increaseMessageCountSystem: (conversation: string) => void;
2010
- setLastReadId: (conversation: string, lastReadId: number) => void;
2011
- getConversation: (conversation: string | undefined) => ConversationEntry | undefined;
2012
- addParticipant: (conversation: string, participant: string) => void;
2013
- removeParticipant: (conversation: string, participant: string) => void;
2014
- setParticipants: (conversation: string, participants: Participant[]) => void;
2015
- toggleParticipant: (conversation: string, participant: string) => void;
2016
- getConversationViaParticipantsAndName: (participants: Participant[], name?: string, options?: {
2017
- excludeTemp?: boolean;
2018
- exclude?: string[];
2019
- }) => {
2020
- _id?: string;
2021
- id?: string;
2022
- name?: string;
2023
- participants: (string | {
2024
- id: string;
2025
- prename?: string;
2026
- lastname?: string;
2027
- email?: string;
2028
- name?: string;
2029
- lastSeen?: string;
2030
- online?: boolean;
2031
- role?: "agent" | null;
2032
- })[];
2033
- blocked?: string[];
2034
- messagesCount?: number;
2035
- messagesCountSystem?: number;
2036
- createdAt?: string;
2037
- lastActivity?: string;
2038
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
2039
- supportStatus?: SupportStatus;
2040
- supportStatusUpdatedAt?: string;
2041
- supportStatusVersion?: number;
2042
- sla?: {
2043
- conversation: string;
2044
- status: SupportStatus;
2045
- statusVersion: number;
2046
- startedAt: string;
2047
- endAt: string;
2048
- stoppedAt?: string;
2049
- };
2050
- participant?: {
2051
- _id?: string;
2052
- conversation: string;
2053
- user: string;
2054
- state: ParticipantState;
2055
- rights: string[];
2056
- lastReadId?: number;
2057
- latestMessageId?: number;
2058
- muted?: boolean;
2059
- role?: "agent";
2060
- joinedAt?: string;
2061
- };
2062
- participantDocs?: {
2063
- _id?: string;
2064
- conversation: string;
2065
- user: string;
2066
- state: ParticipantState;
2067
- rights: string[];
2068
- lastReadId?: number;
2069
- latestMessageId?: number;
2070
- muted?: boolean;
2071
- role?: "agent";
2072
- joinedAt?: string;
2073
- }[];
2074
- lastMessage?: {
2075
- _id?: string;
2076
- id: number;
2077
- conversation: string;
2078
- user?: string;
2079
- message?: string;
2080
- origin: "user" | "system";
2081
- history: {
2082
- created: string;
2083
- updated?: string;
2084
- };
2085
- action?: string;
2086
- actionData?: Record<string, unknown>;
2087
- clientMessageId?: string;
2088
- duplicate?: boolean;
2089
- isUser?: boolean;
2090
- };
2091
- oldestMessageId?: number | null;
2092
- messages?: {
2093
- _id?: string;
2094
- id: number;
2095
- conversation: string;
2096
- user?: string;
2097
- message?: string;
2098
- origin: "user" | "system";
2099
- history: {
2100
- created: string;
2101
- updated?: string;
2102
- };
2103
- action?: string;
2104
- actionData?: Record<string, unknown>;
2105
- clientMessageId?: string;
2106
- duplicate?: boolean;
2107
- isUser?: boolean;
2108
- }[];
2109
- messagesLoaded?: boolean;
2110
- unreadCount?: number;
2111
- unread?: boolean;
2112
- isMember?: boolean;
2113
- isNew?: boolean;
2114
- isTemp?: boolean;
2115
- creator?: string;
2116
- };
2117
- cleanConversations: () => void;
2118
- abandonConversation: (conversation: string) => void;
2119
- inactivateConversation: () => void;
2120
- rename: (conversation: string, newName: string) => Promise<void | import("@/libs/StudioSDK").SDKResponse<unknown>>;
2121
- conversationRenamed: (conversation: string, newName: string) => void;
2122
- executeParticipantsEdit: (conversation: string, add: string[], remove: string[]) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
2123
- updateConversationParticipant: (conversation: string, state: ParticipantState) => void;
2124
- leave: (conversation: string) => Promise<import("@/libs/StudioSDK").SDKResponse<unknown>>;
2125
- deleteConversation: (conversation: string) => Promise<void>;
2126
- lastActiveConversation: import("vue").Ref<string, string>;
2127
- getLatestConversation: () => {
2128
- _id?: string;
2129
- id?: string;
2130
- name?: string;
2131
- participants: (string | {
2132
- id: string;
2133
- prename?: string;
2134
- lastname?: string;
2135
- email?: string;
2136
- name?: string;
2137
- lastSeen?: string;
2138
- online?: boolean;
2139
- role?: "agent" | null;
2140
- })[];
2141
- blocked?: string[];
2142
- messagesCount?: number;
2143
- messagesCountSystem?: number;
2144
- createdAt?: string;
2145
- lastActivity?: string;
2146
- operationMode: import("@/interfaces/Conversation").ConversationOperationMode;
2147
- supportStatus?: SupportStatus;
2148
- supportStatusUpdatedAt?: string;
2149
- supportStatusVersion?: number;
2150
- sla?: {
2151
- conversation: string;
2152
- status: SupportStatus;
2153
- statusVersion: number;
2154
- startedAt: string;
2155
- endAt: string;
2156
- stoppedAt?: string;
2157
- };
2158
- participant?: {
2159
- _id?: string;
2160
- conversation: string;
2161
- user: string;
2162
- state: ParticipantState;
2163
- rights: string[];
2164
- lastReadId?: number;
2165
- latestMessageId?: number;
2166
- muted?: boolean;
2167
- role?: "agent";
2168
- joinedAt?: string;
2169
- };
2170
- participantDocs?: {
2171
- _id?: string;
2172
- conversation: string;
2173
- user: string;
2174
- state: ParticipantState;
2175
- rights: string[];
2176
- lastReadId?: number;
2177
- latestMessageId?: number;
2178
- muted?: boolean;
2179
- role?: "agent";
2180
- joinedAt?: string;
2181
- }[];
2182
- lastMessage?: {
2183
- _id?: string;
2184
- id: number;
2185
- conversation: string;
2186
- user?: string;
2187
- message?: string;
2188
- origin: "user" | "system";
2189
- history: {
2190
- created: string;
2191
- updated?: string;
2192
- };
2193
- action?: string;
2194
- actionData?: Record<string, unknown>;
2195
- clientMessageId?: string;
2196
- duplicate?: boolean;
2197
- isUser?: boolean;
2198
- };
2199
- oldestMessageId?: number | null;
2200
- messages?: {
2201
- _id?: string;
2202
- id: number;
2203
- conversation: string;
2204
- user?: string;
2205
- message?: string;
2206
- origin: "user" | "system";
2207
- history: {
2208
- created: string;
2209
- updated?: string;
2210
- };
2211
- action?: string;
2212
- actionData?: Record<string, unknown>;
2213
- clientMessageId?: string;
2214
- duplicate?: boolean;
2215
- isUser?: boolean;
2216
- }[];
2217
- messagesLoaded?: boolean;
2218
- unreadCount?: number;
2219
- unread?: boolean;
2220
- isMember?: boolean;
2221
- isNew?: boolean;
2222
- isTemp?: boolean;
2223
- creator?: string;
2224
- };
2225
- activateLastOrLatestConversation: () => void;
2226
- readLastActiveConversation: () => void;
2227
- }, "leave" | "rename" | "getAllConversations" | "mergeConversations" | "refreshConversations" | "handleReconnect" | "setTyping" | "loadParticipants" | "setRights" | "isMuted" | "setMuted" | "conversationMuted" | "updateSupportStatus" | "blockUser" | "updateParticipantRights" | "create" | "createNew" | "createConversation" | "startSupport" | "activateConversation" | "convertTempToConversation" | "getMessagesFromApi" | "addMessagesToConversation" | "getMessagesForConversation" | "updateLastMessage" | "updateUnread" | "updateAllUnread" | "increaseMessageCount" | "increaseMessageCountSystem" | "setLastReadId" | "getConversation" | "addParticipant" | "removeParticipant" | "setParticipants" | "toggleParticipant" | "getConversationViaParticipantsAndName" | "cleanConversations" | "abandonConversation" | "inactivateConversation" | "conversationRenamed" | "executeParticipantsEdit" | "updateConversationParticipant" | "deleteConversation" | "getLatestConversation" | "activateLastOrLatestConversation" | "readLastActiveConversation">>;
2228
- export default useConversationsStore;