@codingfactory/messenger-client 0.1.0

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.
@@ -0,0 +1,3760 @@
1
+ import type { CreateFolderPayload, UpdateFolderPayload } from '../services/api/messaging';
2
+ import type { ConversationFolder } from '../types/messaging';
3
+ interface FetchConversationsOptions {
4
+ background?: boolean;
5
+ includePresence?: boolean;
6
+ }
7
+ export interface ReactionUser {
8
+ id: string;
9
+ name: string;
10
+ }
11
+ export interface ReactionSummary {
12
+ reaction: string;
13
+ count: number;
14
+ users: ReactionUser[];
15
+ }
16
+ export type ReactionType = 'heart' | 'laugh' | 'thumbsup' | 'surprised' | 'sad' | 'angry';
17
+ export interface ReplyToPreview {
18
+ id: string;
19
+ author_id: string;
20
+ body?: string | null;
21
+ }
22
+ export interface SharedPostPreview {
23
+ id: string;
24
+ title: string;
25
+ url: string;
26
+ excerpt?: string | null;
27
+ media_thumbnail?: string | null;
28
+ author?: {
29
+ id: string;
30
+ name: string;
31
+ avatar?: string | null;
32
+ handle?: string | null;
33
+ } | null;
34
+ }
35
+ export interface Message {
36
+ id: string;
37
+ conversation_id: string;
38
+ author_id: string;
39
+ author?: {
40
+ id: string;
41
+ name: string;
42
+ avatar?: string;
43
+ avatar_url?: string;
44
+ handle?: string;
45
+ };
46
+ body?: string;
47
+ reply_to_id?: string | null;
48
+ reply_to?: ReplyToPreview | null;
49
+ shared_post?: SharedPostPreview | null;
50
+ attachments: Attachment[];
51
+ reactions?: ReactionSummary[];
52
+ meta: Record<string, unknown>;
53
+ edited_at?: string | null;
54
+ is_deleted: boolean;
55
+ created_at: string;
56
+ updated_at: string;
57
+ }
58
+ export interface Attachment {
59
+ id: string;
60
+ name: string;
61
+ url: string;
62
+ type: string;
63
+ size: number;
64
+ thumbnail?: string;
65
+ }
66
+ /** Raw attachment shape — covers backend API (media_id/mime) and broadcast events */
67
+ interface RawAttachment {
68
+ media_id?: string;
69
+ id?: string;
70
+ url: string;
71
+ mime?: string;
72
+ mime_type?: string;
73
+ type?: string;
74
+ name?: string;
75
+ size?: number;
76
+ thumbnail?: string;
77
+ thumbnail_url?: string;
78
+ }
79
+ export type PresenceStatus = 'online' | 'idle' | 'dnd' | 'offline';
80
+ export interface Conversation {
81
+ id: string;
82
+ type: 'dm' | 'group';
83
+ title?: string;
84
+ folder_id?: string | null;
85
+ is_request?: boolean;
86
+ created_by?: string;
87
+ participants: Participant[];
88
+ last_message?: Message;
89
+ last_message_at?: string;
90
+ unread_count: number;
91
+ is_muted: boolean;
92
+ muted_until?: string | null;
93
+ is_pinned: boolean;
94
+ is_archived: boolean;
95
+ created_at: string;
96
+ other_user_id?: string;
97
+ other_online?: boolean;
98
+ other_presence_status?: PresenceStatus;
99
+ }
100
+ export interface Participant {
101
+ id: string;
102
+ user_id: string;
103
+ user?: {
104
+ id: string;
105
+ name: string;
106
+ avatar?: string;
107
+ avatar_url?: string;
108
+ handle?: string;
109
+ };
110
+ role: 'admin' | 'member';
111
+ last_read_message_id?: string;
112
+ muted_until?: string;
113
+ joined_at: string;
114
+ }
115
+ export interface PaginatedResponse<T> {
116
+ data: T[];
117
+ next_cursor?: string;
118
+ has_more: boolean;
119
+ }
120
+ type ConversationListFilter = 'archived' | 'pinned' | 'requests';
121
+ export interface TypingUser {
122
+ id: string;
123
+ name: string;
124
+ avatar?: string;
125
+ }
126
+ interface MessagingState {
127
+ conversations: Conversation[];
128
+ requests: Conversation[];
129
+ folders: ConversationFolder[];
130
+ foldersLoaded: boolean;
131
+ activeFolderId: string | null;
132
+ messages: Record<string, Message[]>;
133
+ typingUsers: Record<string, TypingUser[]>;
134
+ loading: boolean;
135
+ error: string | null;
136
+ conversationCursors: Record<string, string>;
137
+ conversationHasMore: Record<string, boolean>;
138
+ loadingMessages: Record<string, boolean>;
139
+ lastFetch: number;
140
+ searchResults: Message[];
141
+ searchLoading: boolean;
142
+ backgroundPollRetryAfterUntil: number;
143
+ backgroundPollTransientFailureCount: number;
144
+ _pendingSendIds: Set<string>;
145
+ _activeDetailSubscriptions: Set<string>;
146
+ _activeGlobalConversationSubscriptions: Set<string>;
147
+ }
148
+ export declare const useMessagingStore: import("pinia").StoreDefinition<"messaging", MessagingState, {
149
+ getConversationById: (state: {
150
+ conversations: {
151
+ id: string;
152
+ type: "dm" | "group";
153
+ title?: string | undefined;
154
+ folder_id?: string | null | undefined;
155
+ is_request?: boolean | undefined;
156
+ created_by?: string | undefined;
157
+ participants: {
158
+ id: string;
159
+ user_id: string;
160
+ user?: {
161
+ id: string;
162
+ name: string;
163
+ avatar?: string | undefined;
164
+ avatar_url?: string | undefined;
165
+ handle?: string | undefined;
166
+ } | undefined;
167
+ role: "admin" | "member";
168
+ last_read_message_id?: string | undefined;
169
+ muted_until?: string | undefined;
170
+ joined_at: string;
171
+ }[];
172
+ last_message?: {
173
+ id: string;
174
+ conversation_id: string;
175
+ author_id: string;
176
+ author?: {
177
+ id: string;
178
+ name: string;
179
+ avatar?: string | undefined;
180
+ avatar_url?: string | undefined;
181
+ handle?: string | undefined;
182
+ } | undefined;
183
+ body?: string | undefined;
184
+ reply_to_id?: string | null | undefined;
185
+ reply_to?: {
186
+ id: string;
187
+ author_id: string;
188
+ body?: string | null | undefined;
189
+ } | null | undefined;
190
+ shared_post?: {
191
+ id: string;
192
+ title: string;
193
+ url: string;
194
+ excerpt?: string | null | undefined;
195
+ media_thumbnail?: string | null | undefined;
196
+ author?: {
197
+ id: string;
198
+ name: string;
199
+ avatar?: string | null | undefined;
200
+ handle?: string | null | undefined;
201
+ } | null | undefined;
202
+ } | null | undefined;
203
+ attachments: {
204
+ id: string;
205
+ name: string;
206
+ url: string;
207
+ type: string;
208
+ size: number;
209
+ thumbnail?: string | undefined;
210
+ }[];
211
+ reactions?: {
212
+ reaction: string;
213
+ count: number;
214
+ users: {
215
+ id: string;
216
+ name: string;
217
+ }[];
218
+ }[] | undefined;
219
+ meta: Record<string, unknown>;
220
+ edited_at?: string | null | undefined;
221
+ is_deleted: boolean;
222
+ created_at: string;
223
+ updated_at: string;
224
+ } | undefined;
225
+ last_message_at?: string | undefined;
226
+ unread_count: number;
227
+ is_muted: boolean;
228
+ muted_until?: string | null | undefined;
229
+ is_pinned: boolean;
230
+ is_archived: boolean;
231
+ created_at: string;
232
+ other_user_id?: string | undefined;
233
+ other_online?: boolean | undefined;
234
+ other_presence_status?: PresenceStatus | undefined;
235
+ }[];
236
+ requests: {
237
+ id: string;
238
+ type: "dm" | "group";
239
+ title?: string | undefined;
240
+ folder_id?: string | null | undefined;
241
+ is_request?: boolean | undefined;
242
+ created_by?: string | undefined;
243
+ participants: {
244
+ id: string;
245
+ user_id: string;
246
+ user?: {
247
+ id: string;
248
+ name: string;
249
+ avatar?: string | undefined;
250
+ avatar_url?: string | undefined;
251
+ handle?: string | undefined;
252
+ } | undefined;
253
+ role: "admin" | "member";
254
+ last_read_message_id?: string | undefined;
255
+ muted_until?: string | undefined;
256
+ joined_at: string;
257
+ }[];
258
+ last_message?: {
259
+ id: string;
260
+ conversation_id: string;
261
+ author_id: string;
262
+ author?: {
263
+ id: string;
264
+ name: string;
265
+ avatar?: string | undefined;
266
+ avatar_url?: string | undefined;
267
+ handle?: string | undefined;
268
+ } | undefined;
269
+ body?: string | undefined;
270
+ reply_to_id?: string | null | undefined;
271
+ reply_to?: {
272
+ id: string;
273
+ author_id: string;
274
+ body?: string | null | undefined;
275
+ } | null | undefined;
276
+ shared_post?: {
277
+ id: string;
278
+ title: string;
279
+ url: string;
280
+ excerpt?: string | null | undefined;
281
+ media_thumbnail?: string | null | undefined;
282
+ author?: {
283
+ id: string;
284
+ name: string;
285
+ avatar?: string | null | undefined;
286
+ handle?: string | null | undefined;
287
+ } | null | undefined;
288
+ } | null | undefined;
289
+ attachments: {
290
+ id: string;
291
+ name: string;
292
+ url: string;
293
+ type: string;
294
+ size: number;
295
+ thumbnail?: string | undefined;
296
+ }[];
297
+ reactions?: {
298
+ reaction: string;
299
+ count: number;
300
+ users: {
301
+ id: string;
302
+ name: string;
303
+ }[];
304
+ }[] | undefined;
305
+ meta: Record<string, unknown>;
306
+ edited_at?: string | null | undefined;
307
+ is_deleted: boolean;
308
+ created_at: string;
309
+ updated_at: string;
310
+ } | undefined;
311
+ last_message_at?: string | undefined;
312
+ unread_count: number;
313
+ is_muted: boolean;
314
+ muted_until?: string | null | undefined;
315
+ is_pinned: boolean;
316
+ is_archived: boolean;
317
+ created_at: string;
318
+ other_user_id?: string | undefined;
319
+ other_online?: boolean | undefined;
320
+ other_presence_status?: PresenceStatus | undefined;
321
+ }[];
322
+ folders: {
323
+ id: string;
324
+ name: string;
325
+ color?: string | null | undefined;
326
+ icon?: string | null | undefined;
327
+ sort_order: number;
328
+ conversation_count: number;
329
+ unread_count: number;
330
+ created_at: string;
331
+ updated_at: string;
332
+ }[];
333
+ foldersLoaded: boolean;
334
+ activeFolderId: string | null;
335
+ messages: Record<string, Message[]>;
336
+ typingUsers: Record<string, TypingUser[]>;
337
+ loading: boolean;
338
+ error: string | null;
339
+ conversationCursors: Record<string, string>;
340
+ conversationHasMore: Record<string, boolean>;
341
+ loadingMessages: Record<string, boolean>;
342
+ lastFetch: number;
343
+ searchResults: {
344
+ id: string;
345
+ conversation_id: string;
346
+ author_id: string;
347
+ author?: {
348
+ id: string;
349
+ name: string;
350
+ avatar?: string | undefined;
351
+ avatar_url?: string | undefined;
352
+ handle?: string | undefined;
353
+ } | undefined;
354
+ body?: string | undefined;
355
+ reply_to_id?: string | null | undefined;
356
+ reply_to?: {
357
+ id: string;
358
+ author_id: string;
359
+ body?: string | null | undefined;
360
+ } | null | undefined;
361
+ shared_post?: {
362
+ id: string;
363
+ title: string;
364
+ url: string;
365
+ excerpt?: string | null | undefined;
366
+ media_thumbnail?: string | null | undefined;
367
+ author?: {
368
+ id: string;
369
+ name: string;
370
+ avatar?: string | null | undefined;
371
+ handle?: string | null | undefined;
372
+ } | null | undefined;
373
+ } | null | undefined;
374
+ attachments: {
375
+ id: string;
376
+ name: string;
377
+ url: string;
378
+ type: string;
379
+ size: number;
380
+ thumbnail?: string | undefined;
381
+ }[];
382
+ reactions?: {
383
+ reaction: string;
384
+ count: number;
385
+ users: {
386
+ id: string;
387
+ name: string;
388
+ }[];
389
+ }[] | undefined;
390
+ meta: Record<string, unknown>;
391
+ edited_at?: string | null | undefined;
392
+ is_deleted: boolean;
393
+ created_at: string;
394
+ updated_at: string;
395
+ }[];
396
+ searchLoading: boolean;
397
+ backgroundPollRetryAfterUntil: number;
398
+ backgroundPollTransientFailureCount: number;
399
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
400
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
401
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
402
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => (id: string) => Conversation | undefined;
403
+ getMessagesByConversationId: (state: {
404
+ conversations: {
405
+ id: string;
406
+ type: "dm" | "group";
407
+ title?: string | undefined;
408
+ folder_id?: string | null | undefined;
409
+ is_request?: boolean | undefined;
410
+ created_by?: string | undefined;
411
+ participants: {
412
+ id: string;
413
+ user_id: string;
414
+ user?: {
415
+ id: string;
416
+ name: string;
417
+ avatar?: string | undefined;
418
+ avatar_url?: string | undefined;
419
+ handle?: string | undefined;
420
+ } | undefined;
421
+ role: "admin" | "member";
422
+ last_read_message_id?: string | undefined;
423
+ muted_until?: string | undefined;
424
+ joined_at: string;
425
+ }[];
426
+ last_message?: {
427
+ id: string;
428
+ conversation_id: string;
429
+ author_id: string;
430
+ author?: {
431
+ id: string;
432
+ name: string;
433
+ avatar?: string | undefined;
434
+ avatar_url?: string | undefined;
435
+ handle?: string | undefined;
436
+ } | undefined;
437
+ body?: string | undefined;
438
+ reply_to_id?: string | null | undefined;
439
+ reply_to?: {
440
+ id: string;
441
+ author_id: string;
442
+ body?: string | null | undefined;
443
+ } | null | undefined;
444
+ shared_post?: {
445
+ id: string;
446
+ title: string;
447
+ url: string;
448
+ excerpt?: string | null | undefined;
449
+ media_thumbnail?: string | null | undefined;
450
+ author?: {
451
+ id: string;
452
+ name: string;
453
+ avatar?: string | null | undefined;
454
+ handle?: string | null | undefined;
455
+ } | null | undefined;
456
+ } | null | undefined;
457
+ attachments: {
458
+ id: string;
459
+ name: string;
460
+ url: string;
461
+ type: string;
462
+ size: number;
463
+ thumbnail?: string | undefined;
464
+ }[];
465
+ reactions?: {
466
+ reaction: string;
467
+ count: number;
468
+ users: {
469
+ id: string;
470
+ name: string;
471
+ }[];
472
+ }[] | undefined;
473
+ meta: Record<string, unknown>;
474
+ edited_at?: string | null | undefined;
475
+ is_deleted: boolean;
476
+ created_at: string;
477
+ updated_at: string;
478
+ } | undefined;
479
+ last_message_at?: string | undefined;
480
+ unread_count: number;
481
+ is_muted: boolean;
482
+ muted_until?: string | null | undefined;
483
+ is_pinned: boolean;
484
+ is_archived: boolean;
485
+ created_at: string;
486
+ other_user_id?: string | undefined;
487
+ other_online?: boolean | undefined;
488
+ other_presence_status?: PresenceStatus | undefined;
489
+ }[];
490
+ requests: {
491
+ id: string;
492
+ type: "dm" | "group";
493
+ title?: string | undefined;
494
+ folder_id?: string | null | undefined;
495
+ is_request?: boolean | undefined;
496
+ created_by?: string | undefined;
497
+ participants: {
498
+ id: string;
499
+ user_id: string;
500
+ user?: {
501
+ id: string;
502
+ name: string;
503
+ avatar?: string | undefined;
504
+ avatar_url?: string | undefined;
505
+ handle?: string | undefined;
506
+ } | undefined;
507
+ role: "admin" | "member";
508
+ last_read_message_id?: string | undefined;
509
+ muted_until?: string | undefined;
510
+ joined_at: string;
511
+ }[];
512
+ last_message?: {
513
+ id: string;
514
+ conversation_id: string;
515
+ author_id: string;
516
+ author?: {
517
+ id: string;
518
+ name: string;
519
+ avatar?: string | undefined;
520
+ avatar_url?: string | undefined;
521
+ handle?: string | undefined;
522
+ } | undefined;
523
+ body?: string | undefined;
524
+ reply_to_id?: string | null | undefined;
525
+ reply_to?: {
526
+ id: string;
527
+ author_id: string;
528
+ body?: string | null | undefined;
529
+ } | null | undefined;
530
+ shared_post?: {
531
+ id: string;
532
+ title: string;
533
+ url: string;
534
+ excerpt?: string | null | undefined;
535
+ media_thumbnail?: string | null | undefined;
536
+ author?: {
537
+ id: string;
538
+ name: string;
539
+ avatar?: string | null | undefined;
540
+ handle?: string | null | undefined;
541
+ } | null | undefined;
542
+ } | null | undefined;
543
+ attachments: {
544
+ id: string;
545
+ name: string;
546
+ url: string;
547
+ type: string;
548
+ size: number;
549
+ thumbnail?: string | undefined;
550
+ }[];
551
+ reactions?: {
552
+ reaction: string;
553
+ count: number;
554
+ users: {
555
+ id: string;
556
+ name: string;
557
+ }[];
558
+ }[] | undefined;
559
+ meta: Record<string, unknown>;
560
+ edited_at?: string | null | undefined;
561
+ is_deleted: boolean;
562
+ created_at: string;
563
+ updated_at: string;
564
+ } | undefined;
565
+ last_message_at?: string | undefined;
566
+ unread_count: number;
567
+ is_muted: boolean;
568
+ muted_until?: string | null | undefined;
569
+ is_pinned: boolean;
570
+ is_archived: boolean;
571
+ created_at: string;
572
+ other_user_id?: string | undefined;
573
+ other_online?: boolean | undefined;
574
+ other_presence_status?: PresenceStatus | undefined;
575
+ }[];
576
+ folders: {
577
+ id: string;
578
+ name: string;
579
+ color?: string | null | undefined;
580
+ icon?: string | null | undefined;
581
+ sort_order: number;
582
+ conversation_count: number;
583
+ unread_count: number;
584
+ created_at: string;
585
+ updated_at: string;
586
+ }[];
587
+ foldersLoaded: boolean;
588
+ activeFolderId: string | null;
589
+ messages: Record<string, Message[]>;
590
+ typingUsers: Record<string, TypingUser[]>;
591
+ loading: boolean;
592
+ error: string | null;
593
+ conversationCursors: Record<string, string>;
594
+ conversationHasMore: Record<string, boolean>;
595
+ loadingMessages: Record<string, boolean>;
596
+ lastFetch: number;
597
+ searchResults: {
598
+ id: string;
599
+ conversation_id: string;
600
+ author_id: string;
601
+ author?: {
602
+ id: string;
603
+ name: string;
604
+ avatar?: string | undefined;
605
+ avatar_url?: string | undefined;
606
+ handle?: string | undefined;
607
+ } | undefined;
608
+ body?: string | undefined;
609
+ reply_to_id?: string | null | undefined;
610
+ reply_to?: {
611
+ id: string;
612
+ author_id: string;
613
+ body?: string | null | undefined;
614
+ } | null | undefined;
615
+ shared_post?: {
616
+ id: string;
617
+ title: string;
618
+ url: string;
619
+ excerpt?: string | null | undefined;
620
+ media_thumbnail?: string | null | undefined;
621
+ author?: {
622
+ id: string;
623
+ name: string;
624
+ avatar?: string | null | undefined;
625
+ handle?: string | null | undefined;
626
+ } | null | undefined;
627
+ } | null | undefined;
628
+ attachments: {
629
+ id: string;
630
+ name: string;
631
+ url: string;
632
+ type: string;
633
+ size: number;
634
+ thumbnail?: string | undefined;
635
+ }[];
636
+ reactions?: {
637
+ reaction: string;
638
+ count: number;
639
+ users: {
640
+ id: string;
641
+ name: string;
642
+ }[];
643
+ }[] | undefined;
644
+ meta: Record<string, unknown>;
645
+ edited_at?: string | null | undefined;
646
+ is_deleted: boolean;
647
+ created_at: string;
648
+ updated_at: string;
649
+ }[];
650
+ searchLoading: boolean;
651
+ backgroundPollRetryAfterUntil: number;
652
+ backgroundPollTransientFailureCount: number;
653
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
654
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
655
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
656
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => (conversationId: string) => Message[];
657
+ getTypingUsers: (state: {
658
+ conversations: {
659
+ id: string;
660
+ type: "dm" | "group";
661
+ title?: string | undefined;
662
+ folder_id?: string | null | undefined;
663
+ is_request?: boolean | undefined;
664
+ created_by?: string | undefined;
665
+ participants: {
666
+ id: string;
667
+ user_id: string;
668
+ user?: {
669
+ id: string;
670
+ name: string;
671
+ avatar?: string | undefined;
672
+ avatar_url?: string | undefined;
673
+ handle?: string | undefined;
674
+ } | undefined;
675
+ role: "admin" | "member";
676
+ last_read_message_id?: string | undefined;
677
+ muted_until?: string | undefined;
678
+ joined_at: string;
679
+ }[];
680
+ last_message?: {
681
+ id: string;
682
+ conversation_id: string;
683
+ author_id: string;
684
+ author?: {
685
+ id: string;
686
+ name: string;
687
+ avatar?: string | undefined;
688
+ avatar_url?: string | undefined;
689
+ handle?: string | undefined;
690
+ } | undefined;
691
+ body?: string | undefined;
692
+ reply_to_id?: string | null | undefined;
693
+ reply_to?: {
694
+ id: string;
695
+ author_id: string;
696
+ body?: string | null | undefined;
697
+ } | null | undefined;
698
+ shared_post?: {
699
+ id: string;
700
+ title: string;
701
+ url: string;
702
+ excerpt?: string | null | undefined;
703
+ media_thumbnail?: string | null | undefined;
704
+ author?: {
705
+ id: string;
706
+ name: string;
707
+ avatar?: string | null | undefined;
708
+ handle?: string | null | undefined;
709
+ } | null | undefined;
710
+ } | null | undefined;
711
+ attachments: {
712
+ id: string;
713
+ name: string;
714
+ url: string;
715
+ type: string;
716
+ size: number;
717
+ thumbnail?: string | undefined;
718
+ }[];
719
+ reactions?: {
720
+ reaction: string;
721
+ count: number;
722
+ users: {
723
+ id: string;
724
+ name: string;
725
+ }[];
726
+ }[] | undefined;
727
+ meta: Record<string, unknown>;
728
+ edited_at?: string | null | undefined;
729
+ is_deleted: boolean;
730
+ created_at: string;
731
+ updated_at: string;
732
+ } | undefined;
733
+ last_message_at?: string | undefined;
734
+ unread_count: number;
735
+ is_muted: boolean;
736
+ muted_until?: string | null | undefined;
737
+ is_pinned: boolean;
738
+ is_archived: boolean;
739
+ created_at: string;
740
+ other_user_id?: string | undefined;
741
+ other_online?: boolean | undefined;
742
+ other_presence_status?: PresenceStatus | undefined;
743
+ }[];
744
+ requests: {
745
+ id: string;
746
+ type: "dm" | "group";
747
+ title?: string | undefined;
748
+ folder_id?: string | null | undefined;
749
+ is_request?: boolean | undefined;
750
+ created_by?: string | undefined;
751
+ participants: {
752
+ id: string;
753
+ user_id: string;
754
+ user?: {
755
+ id: string;
756
+ name: string;
757
+ avatar?: string | undefined;
758
+ avatar_url?: string | undefined;
759
+ handle?: string | undefined;
760
+ } | undefined;
761
+ role: "admin" | "member";
762
+ last_read_message_id?: string | undefined;
763
+ muted_until?: string | undefined;
764
+ joined_at: string;
765
+ }[];
766
+ last_message?: {
767
+ id: string;
768
+ conversation_id: string;
769
+ author_id: string;
770
+ author?: {
771
+ id: string;
772
+ name: string;
773
+ avatar?: string | undefined;
774
+ avatar_url?: string | undefined;
775
+ handle?: string | undefined;
776
+ } | undefined;
777
+ body?: string | undefined;
778
+ reply_to_id?: string | null | undefined;
779
+ reply_to?: {
780
+ id: string;
781
+ author_id: string;
782
+ body?: string | null | undefined;
783
+ } | null | undefined;
784
+ shared_post?: {
785
+ id: string;
786
+ title: string;
787
+ url: string;
788
+ excerpt?: string | null | undefined;
789
+ media_thumbnail?: string | null | undefined;
790
+ author?: {
791
+ id: string;
792
+ name: string;
793
+ avatar?: string | null | undefined;
794
+ handle?: string | null | undefined;
795
+ } | null | undefined;
796
+ } | null | undefined;
797
+ attachments: {
798
+ id: string;
799
+ name: string;
800
+ url: string;
801
+ type: string;
802
+ size: number;
803
+ thumbnail?: string | undefined;
804
+ }[];
805
+ reactions?: {
806
+ reaction: string;
807
+ count: number;
808
+ users: {
809
+ id: string;
810
+ name: string;
811
+ }[];
812
+ }[] | undefined;
813
+ meta: Record<string, unknown>;
814
+ edited_at?: string | null | undefined;
815
+ is_deleted: boolean;
816
+ created_at: string;
817
+ updated_at: string;
818
+ } | undefined;
819
+ last_message_at?: string | undefined;
820
+ unread_count: number;
821
+ is_muted: boolean;
822
+ muted_until?: string | null | undefined;
823
+ is_pinned: boolean;
824
+ is_archived: boolean;
825
+ created_at: string;
826
+ other_user_id?: string | undefined;
827
+ other_online?: boolean | undefined;
828
+ other_presence_status?: PresenceStatus | undefined;
829
+ }[];
830
+ folders: {
831
+ id: string;
832
+ name: string;
833
+ color?: string | null | undefined;
834
+ icon?: string | null | undefined;
835
+ sort_order: number;
836
+ conversation_count: number;
837
+ unread_count: number;
838
+ created_at: string;
839
+ updated_at: string;
840
+ }[];
841
+ foldersLoaded: boolean;
842
+ activeFolderId: string | null;
843
+ messages: Record<string, Message[]>;
844
+ typingUsers: Record<string, TypingUser[]>;
845
+ loading: boolean;
846
+ error: string | null;
847
+ conversationCursors: Record<string, string>;
848
+ conversationHasMore: Record<string, boolean>;
849
+ loadingMessages: Record<string, boolean>;
850
+ lastFetch: number;
851
+ searchResults: {
852
+ id: string;
853
+ conversation_id: string;
854
+ author_id: string;
855
+ author?: {
856
+ id: string;
857
+ name: string;
858
+ avatar?: string | undefined;
859
+ avatar_url?: string | undefined;
860
+ handle?: string | undefined;
861
+ } | undefined;
862
+ body?: string | undefined;
863
+ reply_to_id?: string | null | undefined;
864
+ reply_to?: {
865
+ id: string;
866
+ author_id: string;
867
+ body?: string | null | undefined;
868
+ } | null | undefined;
869
+ shared_post?: {
870
+ id: string;
871
+ title: string;
872
+ url: string;
873
+ excerpt?: string | null | undefined;
874
+ media_thumbnail?: string | null | undefined;
875
+ author?: {
876
+ id: string;
877
+ name: string;
878
+ avatar?: string | null | undefined;
879
+ handle?: string | null | undefined;
880
+ } | null | undefined;
881
+ } | null | undefined;
882
+ attachments: {
883
+ id: string;
884
+ name: string;
885
+ url: string;
886
+ type: string;
887
+ size: number;
888
+ thumbnail?: string | undefined;
889
+ }[];
890
+ reactions?: {
891
+ reaction: string;
892
+ count: number;
893
+ users: {
894
+ id: string;
895
+ name: string;
896
+ }[];
897
+ }[] | undefined;
898
+ meta: Record<string, unknown>;
899
+ edited_at?: string | null | undefined;
900
+ is_deleted: boolean;
901
+ created_at: string;
902
+ updated_at: string;
903
+ }[];
904
+ searchLoading: boolean;
905
+ backgroundPollRetryAfterUntil: number;
906
+ backgroundPollTransientFailureCount: number;
907
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
908
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
909
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
910
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => (conversationId: string) => TypingUser[];
911
+ unreadConversationsCount: (state: {
912
+ conversations: {
913
+ id: string;
914
+ type: "dm" | "group";
915
+ title?: string | undefined;
916
+ folder_id?: string | null | undefined;
917
+ is_request?: boolean | undefined;
918
+ created_by?: string | undefined;
919
+ participants: {
920
+ id: string;
921
+ user_id: string;
922
+ user?: {
923
+ id: string;
924
+ name: string;
925
+ avatar?: string | undefined;
926
+ avatar_url?: string | undefined;
927
+ handle?: string | undefined;
928
+ } | undefined;
929
+ role: "admin" | "member";
930
+ last_read_message_id?: string | undefined;
931
+ muted_until?: string | undefined;
932
+ joined_at: string;
933
+ }[];
934
+ last_message?: {
935
+ id: string;
936
+ conversation_id: string;
937
+ author_id: string;
938
+ author?: {
939
+ id: string;
940
+ name: string;
941
+ avatar?: string | undefined;
942
+ avatar_url?: string | undefined;
943
+ handle?: string | undefined;
944
+ } | undefined;
945
+ body?: string | undefined;
946
+ reply_to_id?: string | null | undefined;
947
+ reply_to?: {
948
+ id: string;
949
+ author_id: string;
950
+ body?: string | null | undefined;
951
+ } | null | undefined;
952
+ shared_post?: {
953
+ id: string;
954
+ title: string;
955
+ url: string;
956
+ excerpt?: string | null | undefined;
957
+ media_thumbnail?: string | null | undefined;
958
+ author?: {
959
+ id: string;
960
+ name: string;
961
+ avatar?: string | null | undefined;
962
+ handle?: string | null | undefined;
963
+ } | null | undefined;
964
+ } | null | undefined;
965
+ attachments: {
966
+ id: string;
967
+ name: string;
968
+ url: string;
969
+ type: string;
970
+ size: number;
971
+ thumbnail?: string | undefined;
972
+ }[];
973
+ reactions?: {
974
+ reaction: string;
975
+ count: number;
976
+ users: {
977
+ id: string;
978
+ name: string;
979
+ }[];
980
+ }[] | undefined;
981
+ meta: Record<string, unknown>;
982
+ edited_at?: string | null | undefined;
983
+ is_deleted: boolean;
984
+ created_at: string;
985
+ updated_at: string;
986
+ } | undefined;
987
+ last_message_at?: string | undefined;
988
+ unread_count: number;
989
+ is_muted: boolean;
990
+ muted_until?: string | null | undefined;
991
+ is_pinned: boolean;
992
+ is_archived: boolean;
993
+ created_at: string;
994
+ other_user_id?: string | undefined;
995
+ other_online?: boolean | undefined;
996
+ other_presence_status?: PresenceStatus | undefined;
997
+ }[];
998
+ requests: {
999
+ id: string;
1000
+ type: "dm" | "group";
1001
+ title?: string | undefined;
1002
+ folder_id?: string | null | undefined;
1003
+ is_request?: boolean | undefined;
1004
+ created_by?: string | undefined;
1005
+ participants: {
1006
+ id: string;
1007
+ user_id: string;
1008
+ user?: {
1009
+ id: string;
1010
+ name: string;
1011
+ avatar?: string | undefined;
1012
+ avatar_url?: string | undefined;
1013
+ handle?: string | undefined;
1014
+ } | undefined;
1015
+ role: "admin" | "member";
1016
+ last_read_message_id?: string | undefined;
1017
+ muted_until?: string | undefined;
1018
+ joined_at: string;
1019
+ }[];
1020
+ last_message?: {
1021
+ id: string;
1022
+ conversation_id: string;
1023
+ author_id: string;
1024
+ author?: {
1025
+ id: string;
1026
+ name: string;
1027
+ avatar?: string | undefined;
1028
+ avatar_url?: string | undefined;
1029
+ handle?: string | undefined;
1030
+ } | undefined;
1031
+ body?: string | undefined;
1032
+ reply_to_id?: string | null | undefined;
1033
+ reply_to?: {
1034
+ id: string;
1035
+ author_id: string;
1036
+ body?: string | null | undefined;
1037
+ } | null | undefined;
1038
+ shared_post?: {
1039
+ id: string;
1040
+ title: string;
1041
+ url: string;
1042
+ excerpt?: string | null | undefined;
1043
+ media_thumbnail?: string | null | undefined;
1044
+ author?: {
1045
+ id: string;
1046
+ name: string;
1047
+ avatar?: string | null | undefined;
1048
+ handle?: string | null | undefined;
1049
+ } | null | undefined;
1050
+ } | null | undefined;
1051
+ attachments: {
1052
+ id: string;
1053
+ name: string;
1054
+ url: string;
1055
+ type: string;
1056
+ size: number;
1057
+ thumbnail?: string | undefined;
1058
+ }[];
1059
+ reactions?: {
1060
+ reaction: string;
1061
+ count: number;
1062
+ users: {
1063
+ id: string;
1064
+ name: string;
1065
+ }[];
1066
+ }[] | undefined;
1067
+ meta: Record<string, unknown>;
1068
+ edited_at?: string | null | undefined;
1069
+ is_deleted: boolean;
1070
+ created_at: string;
1071
+ updated_at: string;
1072
+ } | undefined;
1073
+ last_message_at?: string | undefined;
1074
+ unread_count: number;
1075
+ is_muted: boolean;
1076
+ muted_until?: string | null | undefined;
1077
+ is_pinned: boolean;
1078
+ is_archived: boolean;
1079
+ created_at: string;
1080
+ other_user_id?: string | undefined;
1081
+ other_online?: boolean | undefined;
1082
+ other_presence_status?: PresenceStatus | undefined;
1083
+ }[];
1084
+ folders: {
1085
+ id: string;
1086
+ name: string;
1087
+ color?: string | null | undefined;
1088
+ icon?: string | null | undefined;
1089
+ sort_order: number;
1090
+ conversation_count: number;
1091
+ unread_count: number;
1092
+ created_at: string;
1093
+ updated_at: string;
1094
+ }[];
1095
+ foldersLoaded: boolean;
1096
+ activeFolderId: string | null;
1097
+ messages: Record<string, Message[]>;
1098
+ typingUsers: Record<string, TypingUser[]>;
1099
+ loading: boolean;
1100
+ error: string | null;
1101
+ conversationCursors: Record<string, string>;
1102
+ conversationHasMore: Record<string, boolean>;
1103
+ loadingMessages: Record<string, boolean>;
1104
+ lastFetch: number;
1105
+ searchResults: {
1106
+ id: string;
1107
+ conversation_id: string;
1108
+ author_id: string;
1109
+ author?: {
1110
+ id: string;
1111
+ name: string;
1112
+ avatar?: string | undefined;
1113
+ avatar_url?: string | undefined;
1114
+ handle?: string | undefined;
1115
+ } | undefined;
1116
+ body?: string | undefined;
1117
+ reply_to_id?: string | null | undefined;
1118
+ reply_to?: {
1119
+ id: string;
1120
+ author_id: string;
1121
+ body?: string | null | undefined;
1122
+ } | null | undefined;
1123
+ shared_post?: {
1124
+ id: string;
1125
+ title: string;
1126
+ url: string;
1127
+ excerpt?: string | null | undefined;
1128
+ media_thumbnail?: string | null | undefined;
1129
+ author?: {
1130
+ id: string;
1131
+ name: string;
1132
+ avatar?: string | null | undefined;
1133
+ handle?: string | null | undefined;
1134
+ } | null | undefined;
1135
+ } | null | undefined;
1136
+ attachments: {
1137
+ id: string;
1138
+ name: string;
1139
+ url: string;
1140
+ type: string;
1141
+ size: number;
1142
+ thumbnail?: string | undefined;
1143
+ }[];
1144
+ reactions?: {
1145
+ reaction: string;
1146
+ count: number;
1147
+ users: {
1148
+ id: string;
1149
+ name: string;
1150
+ }[];
1151
+ }[] | undefined;
1152
+ meta: Record<string, unknown>;
1153
+ edited_at?: string | null | undefined;
1154
+ is_deleted: boolean;
1155
+ created_at: string;
1156
+ updated_at: string;
1157
+ }[];
1158
+ searchLoading: boolean;
1159
+ backgroundPollRetryAfterUntil: number;
1160
+ backgroundPollTransientFailureCount: number;
1161
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
1162
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
1163
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
1164
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => number;
1165
+ unreadCount: (state: {
1166
+ conversations: {
1167
+ id: string;
1168
+ type: "dm" | "group";
1169
+ title?: string | undefined;
1170
+ folder_id?: string | null | undefined;
1171
+ is_request?: boolean | undefined;
1172
+ created_by?: string | undefined;
1173
+ participants: {
1174
+ id: string;
1175
+ user_id: string;
1176
+ user?: {
1177
+ id: string;
1178
+ name: string;
1179
+ avatar?: string | undefined;
1180
+ avatar_url?: string | undefined;
1181
+ handle?: string | undefined;
1182
+ } | undefined;
1183
+ role: "admin" | "member";
1184
+ last_read_message_id?: string | undefined;
1185
+ muted_until?: string | undefined;
1186
+ joined_at: string;
1187
+ }[];
1188
+ last_message?: {
1189
+ id: string;
1190
+ conversation_id: string;
1191
+ author_id: string;
1192
+ author?: {
1193
+ id: string;
1194
+ name: string;
1195
+ avatar?: string | undefined;
1196
+ avatar_url?: string | undefined;
1197
+ handle?: string | undefined;
1198
+ } | undefined;
1199
+ body?: string | undefined;
1200
+ reply_to_id?: string | null | undefined;
1201
+ reply_to?: {
1202
+ id: string;
1203
+ author_id: string;
1204
+ body?: string | null | undefined;
1205
+ } | null | undefined;
1206
+ shared_post?: {
1207
+ id: string;
1208
+ title: string;
1209
+ url: string;
1210
+ excerpt?: string | null | undefined;
1211
+ media_thumbnail?: string | null | undefined;
1212
+ author?: {
1213
+ id: string;
1214
+ name: string;
1215
+ avatar?: string | null | undefined;
1216
+ handle?: string | null | undefined;
1217
+ } | null | undefined;
1218
+ } | null | undefined;
1219
+ attachments: {
1220
+ id: string;
1221
+ name: string;
1222
+ url: string;
1223
+ type: string;
1224
+ size: number;
1225
+ thumbnail?: string | undefined;
1226
+ }[];
1227
+ reactions?: {
1228
+ reaction: string;
1229
+ count: number;
1230
+ users: {
1231
+ id: string;
1232
+ name: string;
1233
+ }[];
1234
+ }[] | undefined;
1235
+ meta: Record<string, unknown>;
1236
+ edited_at?: string | null | undefined;
1237
+ is_deleted: boolean;
1238
+ created_at: string;
1239
+ updated_at: string;
1240
+ } | undefined;
1241
+ last_message_at?: string | undefined;
1242
+ unread_count: number;
1243
+ is_muted: boolean;
1244
+ muted_until?: string | null | undefined;
1245
+ is_pinned: boolean;
1246
+ is_archived: boolean;
1247
+ created_at: string;
1248
+ other_user_id?: string | undefined;
1249
+ other_online?: boolean | undefined;
1250
+ other_presence_status?: PresenceStatus | undefined;
1251
+ }[];
1252
+ requests: {
1253
+ id: string;
1254
+ type: "dm" | "group";
1255
+ title?: string | undefined;
1256
+ folder_id?: string | null | undefined;
1257
+ is_request?: boolean | undefined;
1258
+ created_by?: string | undefined;
1259
+ participants: {
1260
+ id: string;
1261
+ user_id: string;
1262
+ user?: {
1263
+ id: string;
1264
+ name: string;
1265
+ avatar?: string | undefined;
1266
+ avatar_url?: string | undefined;
1267
+ handle?: string | undefined;
1268
+ } | undefined;
1269
+ role: "admin" | "member";
1270
+ last_read_message_id?: string | undefined;
1271
+ muted_until?: string | undefined;
1272
+ joined_at: string;
1273
+ }[];
1274
+ last_message?: {
1275
+ id: string;
1276
+ conversation_id: string;
1277
+ author_id: string;
1278
+ author?: {
1279
+ id: string;
1280
+ name: string;
1281
+ avatar?: string | undefined;
1282
+ avatar_url?: string | undefined;
1283
+ handle?: string | undefined;
1284
+ } | undefined;
1285
+ body?: string | undefined;
1286
+ reply_to_id?: string | null | undefined;
1287
+ reply_to?: {
1288
+ id: string;
1289
+ author_id: string;
1290
+ body?: string | null | undefined;
1291
+ } | null | undefined;
1292
+ shared_post?: {
1293
+ id: string;
1294
+ title: string;
1295
+ url: string;
1296
+ excerpt?: string | null | undefined;
1297
+ media_thumbnail?: string | null | undefined;
1298
+ author?: {
1299
+ id: string;
1300
+ name: string;
1301
+ avatar?: string | null | undefined;
1302
+ handle?: string | null | undefined;
1303
+ } | null | undefined;
1304
+ } | null | undefined;
1305
+ attachments: {
1306
+ id: string;
1307
+ name: string;
1308
+ url: string;
1309
+ type: string;
1310
+ size: number;
1311
+ thumbnail?: string | undefined;
1312
+ }[];
1313
+ reactions?: {
1314
+ reaction: string;
1315
+ count: number;
1316
+ users: {
1317
+ id: string;
1318
+ name: string;
1319
+ }[];
1320
+ }[] | undefined;
1321
+ meta: Record<string, unknown>;
1322
+ edited_at?: string | null | undefined;
1323
+ is_deleted: boolean;
1324
+ created_at: string;
1325
+ updated_at: string;
1326
+ } | undefined;
1327
+ last_message_at?: string | undefined;
1328
+ unread_count: number;
1329
+ is_muted: boolean;
1330
+ muted_until?: string | null | undefined;
1331
+ is_pinned: boolean;
1332
+ is_archived: boolean;
1333
+ created_at: string;
1334
+ other_user_id?: string | undefined;
1335
+ other_online?: boolean | undefined;
1336
+ other_presence_status?: PresenceStatus | undefined;
1337
+ }[];
1338
+ folders: {
1339
+ id: string;
1340
+ name: string;
1341
+ color?: string | null | undefined;
1342
+ icon?: string | null | undefined;
1343
+ sort_order: number;
1344
+ conversation_count: number;
1345
+ unread_count: number;
1346
+ created_at: string;
1347
+ updated_at: string;
1348
+ }[];
1349
+ foldersLoaded: boolean;
1350
+ activeFolderId: string | null;
1351
+ messages: Record<string, Message[]>;
1352
+ typingUsers: Record<string, TypingUser[]>;
1353
+ loading: boolean;
1354
+ error: string | null;
1355
+ conversationCursors: Record<string, string>;
1356
+ conversationHasMore: Record<string, boolean>;
1357
+ loadingMessages: Record<string, boolean>;
1358
+ lastFetch: number;
1359
+ searchResults: {
1360
+ id: string;
1361
+ conversation_id: string;
1362
+ author_id: string;
1363
+ author?: {
1364
+ id: string;
1365
+ name: string;
1366
+ avatar?: string | undefined;
1367
+ avatar_url?: string | undefined;
1368
+ handle?: string | undefined;
1369
+ } | undefined;
1370
+ body?: string | undefined;
1371
+ reply_to_id?: string | null | undefined;
1372
+ reply_to?: {
1373
+ id: string;
1374
+ author_id: string;
1375
+ body?: string | null | undefined;
1376
+ } | null | undefined;
1377
+ shared_post?: {
1378
+ id: string;
1379
+ title: string;
1380
+ url: string;
1381
+ excerpt?: string | null | undefined;
1382
+ media_thumbnail?: string | null | undefined;
1383
+ author?: {
1384
+ id: string;
1385
+ name: string;
1386
+ avatar?: string | null | undefined;
1387
+ handle?: string | null | undefined;
1388
+ } | null | undefined;
1389
+ } | null | undefined;
1390
+ attachments: {
1391
+ id: string;
1392
+ name: string;
1393
+ url: string;
1394
+ type: string;
1395
+ size: number;
1396
+ thumbnail?: string | undefined;
1397
+ }[];
1398
+ reactions?: {
1399
+ reaction: string;
1400
+ count: number;
1401
+ users: {
1402
+ id: string;
1403
+ name: string;
1404
+ }[];
1405
+ }[] | undefined;
1406
+ meta: Record<string, unknown>;
1407
+ edited_at?: string | null | undefined;
1408
+ is_deleted: boolean;
1409
+ created_at: string;
1410
+ updated_at: string;
1411
+ }[];
1412
+ searchLoading: boolean;
1413
+ backgroundPollRetryAfterUntil: number;
1414
+ backgroundPollTransientFailureCount: number;
1415
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
1416
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
1417
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
1418
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => number;
1419
+ totalUnreadCount: (state: {
1420
+ conversations: {
1421
+ id: string;
1422
+ type: "dm" | "group";
1423
+ title?: string | undefined;
1424
+ folder_id?: string | null | undefined;
1425
+ is_request?: boolean | undefined;
1426
+ created_by?: string | undefined;
1427
+ participants: {
1428
+ id: string;
1429
+ user_id: string;
1430
+ user?: {
1431
+ id: string;
1432
+ name: string;
1433
+ avatar?: string | undefined;
1434
+ avatar_url?: string | undefined;
1435
+ handle?: string | undefined;
1436
+ } | undefined;
1437
+ role: "admin" | "member";
1438
+ last_read_message_id?: string | undefined;
1439
+ muted_until?: string | undefined;
1440
+ joined_at: string;
1441
+ }[];
1442
+ last_message?: {
1443
+ id: string;
1444
+ conversation_id: string;
1445
+ author_id: string;
1446
+ author?: {
1447
+ id: string;
1448
+ name: string;
1449
+ avatar?: string | undefined;
1450
+ avatar_url?: string | undefined;
1451
+ handle?: string | undefined;
1452
+ } | undefined;
1453
+ body?: string | undefined;
1454
+ reply_to_id?: string | null | undefined;
1455
+ reply_to?: {
1456
+ id: string;
1457
+ author_id: string;
1458
+ body?: string | null | undefined;
1459
+ } | null | undefined;
1460
+ shared_post?: {
1461
+ id: string;
1462
+ title: string;
1463
+ url: string;
1464
+ excerpt?: string | null | undefined;
1465
+ media_thumbnail?: string | null | undefined;
1466
+ author?: {
1467
+ id: string;
1468
+ name: string;
1469
+ avatar?: string | null | undefined;
1470
+ handle?: string | null | undefined;
1471
+ } | null | undefined;
1472
+ } | null | undefined;
1473
+ attachments: {
1474
+ id: string;
1475
+ name: string;
1476
+ url: string;
1477
+ type: string;
1478
+ size: number;
1479
+ thumbnail?: string | undefined;
1480
+ }[];
1481
+ reactions?: {
1482
+ reaction: string;
1483
+ count: number;
1484
+ users: {
1485
+ id: string;
1486
+ name: string;
1487
+ }[];
1488
+ }[] | undefined;
1489
+ meta: Record<string, unknown>;
1490
+ edited_at?: string | null | undefined;
1491
+ is_deleted: boolean;
1492
+ created_at: string;
1493
+ updated_at: string;
1494
+ } | undefined;
1495
+ last_message_at?: string | undefined;
1496
+ unread_count: number;
1497
+ is_muted: boolean;
1498
+ muted_until?: string | null | undefined;
1499
+ is_pinned: boolean;
1500
+ is_archived: boolean;
1501
+ created_at: string;
1502
+ other_user_id?: string | undefined;
1503
+ other_online?: boolean | undefined;
1504
+ other_presence_status?: PresenceStatus | undefined;
1505
+ }[];
1506
+ requests: {
1507
+ id: string;
1508
+ type: "dm" | "group";
1509
+ title?: string | undefined;
1510
+ folder_id?: string | null | undefined;
1511
+ is_request?: boolean | undefined;
1512
+ created_by?: string | undefined;
1513
+ participants: {
1514
+ id: string;
1515
+ user_id: string;
1516
+ user?: {
1517
+ id: string;
1518
+ name: string;
1519
+ avatar?: string | undefined;
1520
+ avatar_url?: string | undefined;
1521
+ handle?: string | undefined;
1522
+ } | undefined;
1523
+ role: "admin" | "member";
1524
+ last_read_message_id?: string | undefined;
1525
+ muted_until?: string | undefined;
1526
+ joined_at: string;
1527
+ }[];
1528
+ last_message?: {
1529
+ id: string;
1530
+ conversation_id: string;
1531
+ author_id: string;
1532
+ author?: {
1533
+ id: string;
1534
+ name: string;
1535
+ avatar?: string | undefined;
1536
+ avatar_url?: string | undefined;
1537
+ handle?: string | undefined;
1538
+ } | undefined;
1539
+ body?: string | undefined;
1540
+ reply_to_id?: string | null | undefined;
1541
+ reply_to?: {
1542
+ id: string;
1543
+ author_id: string;
1544
+ body?: string | null | undefined;
1545
+ } | null | undefined;
1546
+ shared_post?: {
1547
+ id: string;
1548
+ title: string;
1549
+ url: string;
1550
+ excerpt?: string | null | undefined;
1551
+ media_thumbnail?: string | null | undefined;
1552
+ author?: {
1553
+ id: string;
1554
+ name: string;
1555
+ avatar?: string | null | undefined;
1556
+ handle?: string | null | undefined;
1557
+ } | null | undefined;
1558
+ } | null | undefined;
1559
+ attachments: {
1560
+ id: string;
1561
+ name: string;
1562
+ url: string;
1563
+ type: string;
1564
+ size: number;
1565
+ thumbnail?: string | undefined;
1566
+ }[];
1567
+ reactions?: {
1568
+ reaction: string;
1569
+ count: number;
1570
+ users: {
1571
+ id: string;
1572
+ name: string;
1573
+ }[];
1574
+ }[] | undefined;
1575
+ meta: Record<string, unknown>;
1576
+ edited_at?: string | null | undefined;
1577
+ is_deleted: boolean;
1578
+ created_at: string;
1579
+ updated_at: string;
1580
+ } | undefined;
1581
+ last_message_at?: string | undefined;
1582
+ unread_count: number;
1583
+ is_muted: boolean;
1584
+ muted_until?: string | null | undefined;
1585
+ is_pinned: boolean;
1586
+ is_archived: boolean;
1587
+ created_at: string;
1588
+ other_user_id?: string | undefined;
1589
+ other_online?: boolean | undefined;
1590
+ other_presence_status?: PresenceStatus | undefined;
1591
+ }[];
1592
+ folders: {
1593
+ id: string;
1594
+ name: string;
1595
+ color?: string | null | undefined;
1596
+ icon?: string | null | undefined;
1597
+ sort_order: number;
1598
+ conversation_count: number;
1599
+ unread_count: number;
1600
+ created_at: string;
1601
+ updated_at: string;
1602
+ }[];
1603
+ foldersLoaded: boolean;
1604
+ activeFolderId: string | null;
1605
+ messages: Record<string, Message[]>;
1606
+ typingUsers: Record<string, TypingUser[]>;
1607
+ loading: boolean;
1608
+ error: string | null;
1609
+ conversationCursors: Record<string, string>;
1610
+ conversationHasMore: Record<string, boolean>;
1611
+ loadingMessages: Record<string, boolean>;
1612
+ lastFetch: number;
1613
+ searchResults: {
1614
+ id: string;
1615
+ conversation_id: string;
1616
+ author_id: string;
1617
+ author?: {
1618
+ id: string;
1619
+ name: string;
1620
+ avatar?: string | undefined;
1621
+ avatar_url?: string | undefined;
1622
+ handle?: string | undefined;
1623
+ } | undefined;
1624
+ body?: string | undefined;
1625
+ reply_to_id?: string | null | undefined;
1626
+ reply_to?: {
1627
+ id: string;
1628
+ author_id: string;
1629
+ body?: string | null | undefined;
1630
+ } | null | undefined;
1631
+ shared_post?: {
1632
+ id: string;
1633
+ title: string;
1634
+ url: string;
1635
+ excerpt?: string | null | undefined;
1636
+ media_thumbnail?: string | null | undefined;
1637
+ author?: {
1638
+ id: string;
1639
+ name: string;
1640
+ avatar?: string | null | undefined;
1641
+ handle?: string | null | undefined;
1642
+ } | null | undefined;
1643
+ } | null | undefined;
1644
+ attachments: {
1645
+ id: string;
1646
+ name: string;
1647
+ url: string;
1648
+ type: string;
1649
+ size: number;
1650
+ thumbnail?: string | undefined;
1651
+ }[];
1652
+ reactions?: {
1653
+ reaction: string;
1654
+ count: number;
1655
+ users: {
1656
+ id: string;
1657
+ name: string;
1658
+ }[];
1659
+ }[] | undefined;
1660
+ meta: Record<string, unknown>;
1661
+ edited_at?: string | null | undefined;
1662
+ is_deleted: boolean;
1663
+ created_at: string;
1664
+ updated_at: string;
1665
+ }[];
1666
+ searchLoading: boolean;
1667
+ backgroundPollRetryAfterUntil: number;
1668
+ backgroundPollTransientFailureCount: number;
1669
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
1670
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
1671
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
1672
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => number;
1673
+ sortedFolders: (state: {
1674
+ conversations: {
1675
+ id: string;
1676
+ type: "dm" | "group";
1677
+ title?: string | undefined;
1678
+ folder_id?: string | null | undefined;
1679
+ is_request?: boolean | undefined;
1680
+ created_by?: string | undefined;
1681
+ participants: {
1682
+ id: string;
1683
+ user_id: string;
1684
+ user?: {
1685
+ id: string;
1686
+ name: string;
1687
+ avatar?: string | undefined;
1688
+ avatar_url?: string | undefined;
1689
+ handle?: string | undefined;
1690
+ } | undefined;
1691
+ role: "admin" | "member";
1692
+ last_read_message_id?: string | undefined;
1693
+ muted_until?: string | undefined;
1694
+ joined_at: string;
1695
+ }[];
1696
+ last_message?: {
1697
+ id: string;
1698
+ conversation_id: string;
1699
+ author_id: string;
1700
+ author?: {
1701
+ id: string;
1702
+ name: string;
1703
+ avatar?: string | undefined;
1704
+ avatar_url?: string | undefined;
1705
+ handle?: string | undefined;
1706
+ } | undefined;
1707
+ body?: string | undefined;
1708
+ reply_to_id?: string | null | undefined;
1709
+ reply_to?: {
1710
+ id: string;
1711
+ author_id: string;
1712
+ body?: string | null | undefined;
1713
+ } | null | undefined;
1714
+ shared_post?: {
1715
+ id: string;
1716
+ title: string;
1717
+ url: string;
1718
+ excerpt?: string | null | undefined;
1719
+ media_thumbnail?: string | null | undefined;
1720
+ author?: {
1721
+ id: string;
1722
+ name: string;
1723
+ avatar?: string | null | undefined;
1724
+ handle?: string | null | undefined;
1725
+ } | null | undefined;
1726
+ } | null | undefined;
1727
+ attachments: {
1728
+ id: string;
1729
+ name: string;
1730
+ url: string;
1731
+ type: string;
1732
+ size: number;
1733
+ thumbnail?: string | undefined;
1734
+ }[];
1735
+ reactions?: {
1736
+ reaction: string;
1737
+ count: number;
1738
+ users: {
1739
+ id: string;
1740
+ name: string;
1741
+ }[];
1742
+ }[] | undefined;
1743
+ meta: Record<string, unknown>;
1744
+ edited_at?: string | null | undefined;
1745
+ is_deleted: boolean;
1746
+ created_at: string;
1747
+ updated_at: string;
1748
+ } | undefined;
1749
+ last_message_at?: string | undefined;
1750
+ unread_count: number;
1751
+ is_muted: boolean;
1752
+ muted_until?: string | null | undefined;
1753
+ is_pinned: boolean;
1754
+ is_archived: boolean;
1755
+ created_at: string;
1756
+ other_user_id?: string | undefined;
1757
+ other_online?: boolean | undefined;
1758
+ other_presence_status?: PresenceStatus | undefined;
1759
+ }[];
1760
+ requests: {
1761
+ id: string;
1762
+ type: "dm" | "group";
1763
+ title?: string | undefined;
1764
+ folder_id?: string | null | undefined;
1765
+ is_request?: boolean | undefined;
1766
+ created_by?: string | undefined;
1767
+ participants: {
1768
+ id: string;
1769
+ user_id: string;
1770
+ user?: {
1771
+ id: string;
1772
+ name: string;
1773
+ avatar?: string | undefined;
1774
+ avatar_url?: string | undefined;
1775
+ handle?: string | undefined;
1776
+ } | undefined;
1777
+ role: "admin" | "member";
1778
+ last_read_message_id?: string | undefined;
1779
+ muted_until?: string | undefined;
1780
+ joined_at: string;
1781
+ }[];
1782
+ last_message?: {
1783
+ id: string;
1784
+ conversation_id: string;
1785
+ author_id: string;
1786
+ author?: {
1787
+ id: string;
1788
+ name: string;
1789
+ avatar?: string | undefined;
1790
+ avatar_url?: string | undefined;
1791
+ handle?: string | undefined;
1792
+ } | undefined;
1793
+ body?: string | undefined;
1794
+ reply_to_id?: string | null | undefined;
1795
+ reply_to?: {
1796
+ id: string;
1797
+ author_id: string;
1798
+ body?: string | null | undefined;
1799
+ } | null | undefined;
1800
+ shared_post?: {
1801
+ id: string;
1802
+ title: string;
1803
+ url: string;
1804
+ excerpt?: string | null | undefined;
1805
+ media_thumbnail?: string | null | undefined;
1806
+ author?: {
1807
+ id: string;
1808
+ name: string;
1809
+ avatar?: string | null | undefined;
1810
+ handle?: string | null | undefined;
1811
+ } | null | undefined;
1812
+ } | null | undefined;
1813
+ attachments: {
1814
+ id: string;
1815
+ name: string;
1816
+ url: string;
1817
+ type: string;
1818
+ size: number;
1819
+ thumbnail?: string | undefined;
1820
+ }[];
1821
+ reactions?: {
1822
+ reaction: string;
1823
+ count: number;
1824
+ users: {
1825
+ id: string;
1826
+ name: string;
1827
+ }[];
1828
+ }[] | undefined;
1829
+ meta: Record<string, unknown>;
1830
+ edited_at?: string | null | undefined;
1831
+ is_deleted: boolean;
1832
+ created_at: string;
1833
+ updated_at: string;
1834
+ } | undefined;
1835
+ last_message_at?: string | undefined;
1836
+ unread_count: number;
1837
+ is_muted: boolean;
1838
+ muted_until?: string | null | undefined;
1839
+ is_pinned: boolean;
1840
+ is_archived: boolean;
1841
+ created_at: string;
1842
+ other_user_id?: string | undefined;
1843
+ other_online?: boolean | undefined;
1844
+ other_presence_status?: PresenceStatus | undefined;
1845
+ }[];
1846
+ folders: {
1847
+ id: string;
1848
+ name: string;
1849
+ color?: string | null | undefined;
1850
+ icon?: string | null | undefined;
1851
+ sort_order: number;
1852
+ conversation_count: number;
1853
+ unread_count: number;
1854
+ created_at: string;
1855
+ updated_at: string;
1856
+ }[];
1857
+ foldersLoaded: boolean;
1858
+ activeFolderId: string | null;
1859
+ messages: Record<string, Message[]>;
1860
+ typingUsers: Record<string, TypingUser[]>;
1861
+ loading: boolean;
1862
+ error: string | null;
1863
+ conversationCursors: Record<string, string>;
1864
+ conversationHasMore: Record<string, boolean>;
1865
+ loadingMessages: Record<string, boolean>;
1866
+ lastFetch: number;
1867
+ searchResults: {
1868
+ id: string;
1869
+ conversation_id: string;
1870
+ author_id: string;
1871
+ author?: {
1872
+ id: string;
1873
+ name: string;
1874
+ avatar?: string | undefined;
1875
+ avatar_url?: string | undefined;
1876
+ handle?: string | undefined;
1877
+ } | undefined;
1878
+ body?: string | undefined;
1879
+ reply_to_id?: string | null | undefined;
1880
+ reply_to?: {
1881
+ id: string;
1882
+ author_id: string;
1883
+ body?: string | null | undefined;
1884
+ } | null | undefined;
1885
+ shared_post?: {
1886
+ id: string;
1887
+ title: string;
1888
+ url: string;
1889
+ excerpt?: string | null | undefined;
1890
+ media_thumbnail?: string | null | undefined;
1891
+ author?: {
1892
+ id: string;
1893
+ name: string;
1894
+ avatar?: string | null | undefined;
1895
+ handle?: string | null | undefined;
1896
+ } | null | undefined;
1897
+ } | null | undefined;
1898
+ attachments: {
1899
+ id: string;
1900
+ name: string;
1901
+ url: string;
1902
+ type: string;
1903
+ size: number;
1904
+ thumbnail?: string | undefined;
1905
+ }[];
1906
+ reactions?: {
1907
+ reaction: string;
1908
+ count: number;
1909
+ users: {
1910
+ id: string;
1911
+ name: string;
1912
+ }[];
1913
+ }[] | undefined;
1914
+ meta: Record<string, unknown>;
1915
+ edited_at?: string | null | undefined;
1916
+ is_deleted: boolean;
1917
+ created_at: string;
1918
+ updated_at: string;
1919
+ }[];
1920
+ searchLoading: boolean;
1921
+ backgroundPollRetryAfterUntil: number;
1922
+ backgroundPollTransientFailureCount: number;
1923
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
1924
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
1925
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
1926
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => ConversationFolder[];
1927
+ folderById: (state: {
1928
+ conversations: {
1929
+ id: string;
1930
+ type: "dm" | "group";
1931
+ title?: string | undefined;
1932
+ folder_id?: string | null | undefined;
1933
+ is_request?: boolean | undefined;
1934
+ created_by?: string | undefined;
1935
+ participants: {
1936
+ id: string;
1937
+ user_id: string;
1938
+ user?: {
1939
+ id: string;
1940
+ name: string;
1941
+ avatar?: string | undefined;
1942
+ avatar_url?: string | undefined;
1943
+ handle?: string | undefined;
1944
+ } | undefined;
1945
+ role: "admin" | "member";
1946
+ last_read_message_id?: string | undefined;
1947
+ muted_until?: string | undefined;
1948
+ joined_at: string;
1949
+ }[];
1950
+ last_message?: {
1951
+ id: string;
1952
+ conversation_id: string;
1953
+ author_id: string;
1954
+ author?: {
1955
+ id: string;
1956
+ name: string;
1957
+ avatar?: string | undefined;
1958
+ avatar_url?: string | undefined;
1959
+ handle?: string | undefined;
1960
+ } | undefined;
1961
+ body?: string | undefined;
1962
+ reply_to_id?: string | null | undefined;
1963
+ reply_to?: {
1964
+ id: string;
1965
+ author_id: string;
1966
+ body?: string | null | undefined;
1967
+ } | null | undefined;
1968
+ shared_post?: {
1969
+ id: string;
1970
+ title: string;
1971
+ url: string;
1972
+ excerpt?: string | null | undefined;
1973
+ media_thumbnail?: string | null | undefined;
1974
+ author?: {
1975
+ id: string;
1976
+ name: string;
1977
+ avatar?: string | null | undefined;
1978
+ handle?: string | null | undefined;
1979
+ } | null | undefined;
1980
+ } | null | undefined;
1981
+ attachments: {
1982
+ id: string;
1983
+ name: string;
1984
+ url: string;
1985
+ type: string;
1986
+ size: number;
1987
+ thumbnail?: string | undefined;
1988
+ }[];
1989
+ reactions?: {
1990
+ reaction: string;
1991
+ count: number;
1992
+ users: {
1993
+ id: string;
1994
+ name: string;
1995
+ }[];
1996
+ }[] | undefined;
1997
+ meta: Record<string, unknown>;
1998
+ edited_at?: string | null | undefined;
1999
+ is_deleted: boolean;
2000
+ created_at: string;
2001
+ updated_at: string;
2002
+ } | undefined;
2003
+ last_message_at?: string | undefined;
2004
+ unread_count: number;
2005
+ is_muted: boolean;
2006
+ muted_until?: string | null | undefined;
2007
+ is_pinned: boolean;
2008
+ is_archived: boolean;
2009
+ created_at: string;
2010
+ other_user_id?: string | undefined;
2011
+ other_online?: boolean | undefined;
2012
+ other_presence_status?: PresenceStatus | undefined;
2013
+ }[];
2014
+ requests: {
2015
+ id: string;
2016
+ type: "dm" | "group";
2017
+ title?: string | undefined;
2018
+ folder_id?: string | null | undefined;
2019
+ is_request?: boolean | undefined;
2020
+ created_by?: string | undefined;
2021
+ participants: {
2022
+ id: string;
2023
+ user_id: string;
2024
+ user?: {
2025
+ id: string;
2026
+ name: string;
2027
+ avatar?: string | undefined;
2028
+ avatar_url?: string | undefined;
2029
+ handle?: string | undefined;
2030
+ } | undefined;
2031
+ role: "admin" | "member";
2032
+ last_read_message_id?: string | undefined;
2033
+ muted_until?: string | undefined;
2034
+ joined_at: string;
2035
+ }[];
2036
+ last_message?: {
2037
+ id: string;
2038
+ conversation_id: string;
2039
+ author_id: string;
2040
+ author?: {
2041
+ id: string;
2042
+ name: string;
2043
+ avatar?: string | undefined;
2044
+ avatar_url?: string | undefined;
2045
+ handle?: string | undefined;
2046
+ } | undefined;
2047
+ body?: string | undefined;
2048
+ reply_to_id?: string | null | undefined;
2049
+ reply_to?: {
2050
+ id: string;
2051
+ author_id: string;
2052
+ body?: string | null | undefined;
2053
+ } | null | undefined;
2054
+ shared_post?: {
2055
+ id: string;
2056
+ title: string;
2057
+ url: string;
2058
+ excerpt?: string | null | undefined;
2059
+ media_thumbnail?: string | null | undefined;
2060
+ author?: {
2061
+ id: string;
2062
+ name: string;
2063
+ avatar?: string | null | undefined;
2064
+ handle?: string | null | undefined;
2065
+ } | null | undefined;
2066
+ } | null | undefined;
2067
+ attachments: {
2068
+ id: string;
2069
+ name: string;
2070
+ url: string;
2071
+ type: string;
2072
+ size: number;
2073
+ thumbnail?: string | undefined;
2074
+ }[];
2075
+ reactions?: {
2076
+ reaction: string;
2077
+ count: number;
2078
+ users: {
2079
+ id: string;
2080
+ name: string;
2081
+ }[];
2082
+ }[] | undefined;
2083
+ meta: Record<string, unknown>;
2084
+ edited_at?: string | null | undefined;
2085
+ is_deleted: boolean;
2086
+ created_at: string;
2087
+ updated_at: string;
2088
+ } | undefined;
2089
+ last_message_at?: string | undefined;
2090
+ unread_count: number;
2091
+ is_muted: boolean;
2092
+ muted_until?: string | null | undefined;
2093
+ is_pinned: boolean;
2094
+ is_archived: boolean;
2095
+ created_at: string;
2096
+ other_user_id?: string | undefined;
2097
+ other_online?: boolean | undefined;
2098
+ other_presence_status?: PresenceStatus | undefined;
2099
+ }[];
2100
+ folders: {
2101
+ id: string;
2102
+ name: string;
2103
+ color?: string | null | undefined;
2104
+ icon?: string | null | undefined;
2105
+ sort_order: number;
2106
+ conversation_count: number;
2107
+ unread_count: number;
2108
+ created_at: string;
2109
+ updated_at: string;
2110
+ }[];
2111
+ foldersLoaded: boolean;
2112
+ activeFolderId: string | null;
2113
+ messages: Record<string, Message[]>;
2114
+ typingUsers: Record<string, TypingUser[]>;
2115
+ loading: boolean;
2116
+ error: string | null;
2117
+ conversationCursors: Record<string, string>;
2118
+ conversationHasMore: Record<string, boolean>;
2119
+ loadingMessages: Record<string, boolean>;
2120
+ lastFetch: number;
2121
+ searchResults: {
2122
+ id: string;
2123
+ conversation_id: string;
2124
+ author_id: string;
2125
+ author?: {
2126
+ id: string;
2127
+ name: string;
2128
+ avatar?: string | undefined;
2129
+ avatar_url?: string | undefined;
2130
+ handle?: string | undefined;
2131
+ } | undefined;
2132
+ body?: string | undefined;
2133
+ reply_to_id?: string | null | undefined;
2134
+ reply_to?: {
2135
+ id: string;
2136
+ author_id: string;
2137
+ body?: string | null | undefined;
2138
+ } | null | undefined;
2139
+ shared_post?: {
2140
+ id: string;
2141
+ title: string;
2142
+ url: string;
2143
+ excerpt?: string | null | undefined;
2144
+ media_thumbnail?: string | null | undefined;
2145
+ author?: {
2146
+ id: string;
2147
+ name: string;
2148
+ avatar?: string | null | undefined;
2149
+ handle?: string | null | undefined;
2150
+ } | null | undefined;
2151
+ } | null | undefined;
2152
+ attachments: {
2153
+ id: string;
2154
+ name: string;
2155
+ url: string;
2156
+ type: string;
2157
+ size: number;
2158
+ thumbnail?: string | undefined;
2159
+ }[];
2160
+ reactions?: {
2161
+ reaction: string;
2162
+ count: number;
2163
+ users: {
2164
+ id: string;
2165
+ name: string;
2166
+ }[];
2167
+ }[] | undefined;
2168
+ meta: Record<string, unknown>;
2169
+ edited_at?: string | null | undefined;
2170
+ is_deleted: boolean;
2171
+ created_at: string;
2172
+ updated_at: string;
2173
+ }[];
2174
+ searchLoading: boolean;
2175
+ backgroundPollRetryAfterUntil: number;
2176
+ backgroundPollTransientFailureCount: number;
2177
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
2178
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
2179
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
2180
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => (id: string) => ConversationFolder | undefined;
2181
+ conversationsInFolder: (state: {
2182
+ conversations: {
2183
+ id: string;
2184
+ type: "dm" | "group";
2185
+ title?: string | undefined;
2186
+ folder_id?: string | null | undefined;
2187
+ is_request?: boolean | undefined;
2188
+ created_by?: string | undefined;
2189
+ participants: {
2190
+ id: string;
2191
+ user_id: string;
2192
+ user?: {
2193
+ id: string;
2194
+ name: string;
2195
+ avatar?: string | undefined;
2196
+ avatar_url?: string | undefined;
2197
+ handle?: string | undefined;
2198
+ } | undefined;
2199
+ role: "admin" | "member";
2200
+ last_read_message_id?: string | undefined;
2201
+ muted_until?: string | undefined;
2202
+ joined_at: string;
2203
+ }[];
2204
+ last_message?: {
2205
+ id: string;
2206
+ conversation_id: string;
2207
+ author_id: string;
2208
+ author?: {
2209
+ id: string;
2210
+ name: string;
2211
+ avatar?: string | undefined;
2212
+ avatar_url?: string | undefined;
2213
+ handle?: string | undefined;
2214
+ } | undefined;
2215
+ body?: string | undefined;
2216
+ reply_to_id?: string | null | undefined;
2217
+ reply_to?: {
2218
+ id: string;
2219
+ author_id: string;
2220
+ body?: string | null | undefined;
2221
+ } | null | undefined;
2222
+ shared_post?: {
2223
+ id: string;
2224
+ title: string;
2225
+ url: string;
2226
+ excerpt?: string | null | undefined;
2227
+ media_thumbnail?: string | null | undefined;
2228
+ author?: {
2229
+ id: string;
2230
+ name: string;
2231
+ avatar?: string | null | undefined;
2232
+ handle?: string | null | undefined;
2233
+ } | null | undefined;
2234
+ } | null | undefined;
2235
+ attachments: {
2236
+ id: string;
2237
+ name: string;
2238
+ url: string;
2239
+ type: string;
2240
+ size: number;
2241
+ thumbnail?: string | undefined;
2242
+ }[];
2243
+ reactions?: {
2244
+ reaction: string;
2245
+ count: number;
2246
+ users: {
2247
+ id: string;
2248
+ name: string;
2249
+ }[];
2250
+ }[] | undefined;
2251
+ meta: Record<string, unknown>;
2252
+ edited_at?: string | null | undefined;
2253
+ is_deleted: boolean;
2254
+ created_at: string;
2255
+ updated_at: string;
2256
+ } | undefined;
2257
+ last_message_at?: string | undefined;
2258
+ unread_count: number;
2259
+ is_muted: boolean;
2260
+ muted_until?: string | null | undefined;
2261
+ is_pinned: boolean;
2262
+ is_archived: boolean;
2263
+ created_at: string;
2264
+ other_user_id?: string | undefined;
2265
+ other_online?: boolean | undefined;
2266
+ other_presence_status?: PresenceStatus | undefined;
2267
+ }[];
2268
+ requests: {
2269
+ id: string;
2270
+ type: "dm" | "group";
2271
+ title?: string | undefined;
2272
+ folder_id?: string | null | undefined;
2273
+ is_request?: boolean | undefined;
2274
+ created_by?: string | undefined;
2275
+ participants: {
2276
+ id: string;
2277
+ user_id: string;
2278
+ user?: {
2279
+ id: string;
2280
+ name: string;
2281
+ avatar?: string | undefined;
2282
+ avatar_url?: string | undefined;
2283
+ handle?: string | undefined;
2284
+ } | undefined;
2285
+ role: "admin" | "member";
2286
+ last_read_message_id?: string | undefined;
2287
+ muted_until?: string | undefined;
2288
+ joined_at: string;
2289
+ }[];
2290
+ last_message?: {
2291
+ id: string;
2292
+ conversation_id: string;
2293
+ author_id: string;
2294
+ author?: {
2295
+ id: string;
2296
+ name: string;
2297
+ avatar?: string | undefined;
2298
+ avatar_url?: string | undefined;
2299
+ handle?: string | undefined;
2300
+ } | undefined;
2301
+ body?: string | undefined;
2302
+ reply_to_id?: string | null | undefined;
2303
+ reply_to?: {
2304
+ id: string;
2305
+ author_id: string;
2306
+ body?: string | null | undefined;
2307
+ } | null | undefined;
2308
+ shared_post?: {
2309
+ id: string;
2310
+ title: string;
2311
+ url: string;
2312
+ excerpt?: string | null | undefined;
2313
+ media_thumbnail?: string | null | undefined;
2314
+ author?: {
2315
+ id: string;
2316
+ name: string;
2317
+ avatar?: string | null | undefined;
2318
+ handle?: string | null | undefined;
2319
+ } | null | undefined;
2320
+ } | null | undefined;
2321
+ attachments: {
2322
+ id: string;
2323
+ name: string;
2324
+ url: string;
2325
+ type: string;
2326
+ size: number;
2327
+ thumbnail?: string | undefined;
2328
+ }[];
2329
+ reactions?: {
2330
+ reaction: string;
2331
+ count: number;
2332
+ users: {
2333
+ id: string;
2334
+ name: string;
2335
+ }[];
2336
+ }[] | undefined;
2337
+ meta: Record<string, unknown>;
2338
+ edited_at?: string | null | undefined;
2339
+ is_deleted: boolean;
2340
+ created_at: string;
2341
+ updated_at: string;
2342
+ } | undefined;
2343
+ last_message_at?: string | undefined;
2344
+ unread_count: number;
2345
+ is_muted: boolean;
2346
+ muted_until?: string | null | undefined;
2347
+ is_pinned: boolean;
2348
+ is_archived: boolean;
2349
+ created_at: string;
2350
+ other_user_id?: string | undefined;
2351
+ other_online?: boolean | undefined;
2352
+ other_presence_status?: PresenceStatus | undefined;
2353
+ }[];
2354
+ folders: {
2355
+ id: string;
2356
+ name: string;
2357
+ color?: string | null | undefined;
2358
+ icon?: string | null | undefined;
2359
+ sort_order: number;
2360
+ conversation_count: number;
2361
+ unread_count: number;
2362
+ created_at: string;
2363
+ updated_at: string;
2364
+ }[];
2365
+ foldersLoaded: boolean;
2366
+ activeFolderId: string | null;
2367
+ messages: Record<string, Message[]>;
2368
+ typingUsers: Record<string, TypingUser[]>;
2369
+ loading: boolean;
2370
+ error: string | null;
2371
+ conversationCursors: Record<string, string>;
2372
+ conversationHasMore: Record<string, boolean>;
2373
+ loadingMessages: Record<string, boolean>;
2374
+ lastFetch: number;
2375
+ searchResults: {
2376
+ id: string;
2377
+ conversation_id: string;
2378
+ author_id: string;
2379
+ author?: {
2380
+ id: string;
2381
+ name: string;
2382
+ avatar?: string | undefined;
2383
+ avatar_url?: string | undefined;
2384
+ handle?: string | undefined;
2385
+ } | undefined;
2386
+ body?: string | undefined;
2387
+ reply_to_id?: string | null | undefined;
2388
+ reply_to?: {
2389
+ id: string;
2390
+ author_id: string;
2391
+ body?: string | null | undefined;
2392
+ } | null | undefined;
2393
+ shared_post?: {
2394
+ id: string;
2395
+ title: string;
2396
+ url: string;
2397
+ excerpt?: string | null | undefined;
2398
+ media_thumbnail?: string | null | undefined;
2399
+ author?: {
2400
+ id: string;
2401
+ name: string;
2402
+ avatar?: string | null | undefined;
2403
+ handle?: string | null | undefined;
2404
+ } | null | undefined;
2405
+ } | null | undefined;
2406
+ attachments: {
2407
+ id: string;
2408
+ name: string;
2409
+ url: string;
2410
+ type: string;
2411
+ size: number;
2412
+ thumbnail?: string | undefined;
2413
+ }[];
2414
+ reactions?: {
2415
+ reaction: string;
2416
+ count: number;
2417
+ users: {
2418
+ id: string;
2419
+ name: string;
2420
+ }[];
2421
+ }[] | undefined;
2422
+ meta: Record<string, unknown>;
2423
+ edited_at?: string | null | undefined;
2424
+ is_deleted: boolean;
2425
+ created_at: string;
2426
+ updated_at: string;
2427
+ }[];
2428
+ searchLoading: boolean;
2429
+ backgroundPollRetryAfterUntil: number;
2430
+ backgroundPollTransientFailureCount: number;
2431
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
2432
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
2433
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
2434
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => (folderId: string) => Conversation[];
2435
+ hasMoreMessages: (state: {
2436
+ conversations: {
2437
+ id: string;
2438
+ type: "dm" | "group";
2439
+ title?: string | undefined;
2440
+ folder_id?: string | null | undefined;
2441
+ is_request?: boolean | undefined;
2442
+ created_by?: string | undefined;
2443
+ participants: {
2444
+ id: string;
2445
+ user_id: string;
2446
+ user?: {
2447
+ id: string;
2448
+ name: string;
2449
+ avatar?: string | undefined;
2450
+ avatar_url?: string | undefined;
2451
+ handle?: string | undefined;
2452
+ } | undefined;
2453
+ role: "admin" | "member";
2454
+ last_read_message_id?: string | undefined;
2455
+ muted_until?: string | undefined;
2456
+ joined_at: string;
2457
+ }[];
2458
+ last_message?: {
2459
+ id: string;
2460
+ conversation_id: string;
2461
+ author_id: string;
2462
+ author?: {
2463
+ id: string;
2464
+ name: string;
2465
+ avatar?: string | undefined;
2466
+ avatar_url?: string | undefined;
2467
+ handle?: string | undefined;
2468
+ } | undefined;
2469
+ body?: string | undefined;
2470
+ reply_to_id?: string | null | undefined;
2471
+ reply_to?: {
2472
+ id: string;
2473
+ author_id: string;
2474
+ body?: string | null | undefined;
2475
+ } | null | undefined;
2476
+ shared_post?: {
2477
+ id: string;
2478
+ title: string;
2479
+ url: string;
2480
+ excerpt?: string | null | undefined;
2481
+ media_thumbnail?: string | null | undefined;
2482
+ author?: {
2483
+ id: string;
2484
+ name: string;
2485
+ avatar?: string | null | undefined;
2486
+ handle?: string | null | undefined;
2487
+ } | null | undefined;
2488
+ } | null | undefined;
2489
+ attachments: {
2490
+ id: string;
2491
+ name: string;
2492
+ url: string;
2493
+ type: string;
2494
+ size: number;
2495
+ thumbnail?: string | undefined;
2496
+ }[];
2497
+ reactions?: {
2498
+ reaction: string;
2499
+ count: number;
2500
+ users: {
2501
+ id: string;
2502
+ name: string;
2503
+ }[];
2504
+ }[] | undefined;
2505
+ meta: Record<string, unknown>;
2506
+ edited_at?: string | null | undefined;
2507
+ is_deleted: boolean;
2508
+ created_at: string;
2509
+ updated_at: string;
2510
+ } | undefined;
2511
+ last_message_at?: string | undefined;
2512
+ unread_count: number;
2513
+ is_muted: boolean;
2514
+ muted_until?: string | null | undefined;
2515
+ is_pinned: boolean;
2516
+ is_archived: boolean;
2517
+ created_at: string;
2518
+ other_user_id?: string | undefined;
2519
+ other_online?: boolean | undefined;
2520
+ other_presence_status?: PresenceStatus | undefined;
2521
+ }[];
2522
+ requests: {
2523
+ id: string;
2524
+ type: "dm" | "group";
2525
+ title?: string | undefined;
2526
+ folder_id?: string | null | undefined;
2527
+ is_request?: boolean | undefined;
2528
+ created_by?: string | undefined;
2529
+ participants: {
2530
+ id: string;
2531
+ user_id: string;
2532
+ user?: {
2533
+ id: string;
2534
+ name: string;
2535
+ avatar?: string | undefined;
2536
+ avatar_url?: string | undefined;
2537
+ handle?: string | undefined;
2538
+ } | undefined;
2539
+ role: "admin" | "member";
2540
+ last_read_message_id?: string | undefined;
2541
+ muted_until?: string | undefined;
2542
+ joined_at: string;
2543
+ }[];
2544
+ last_message?: {
2545
+ id: string;
2546
+ conversation_id: string;
2547
+ author_id: string;
2548
+ author?: {
2549
+ id: string;
2550
+ name: string;
2551
+ avatar?: string | undefined;
2552
+ avatar_url?: string | undefined;
2553
+ handle?: string | undefined;
2554
+ } | undefined;
2555
+ body?: string | undefined;
2556
+ reply_to_id?: string | null | undefined;
2557
+ reply_to?: {
2558
+ id: string;
2559
+ author_id: string;
2560
+ body?: string | null | undefined;
2561
+ } | null | undefined;
2562
+ shared_post?: {
2563
+ id: string;
2564
+ title: string;
2565
+ url: string;
2566
+ excerpt?: string | null | undefined;
2567
+ media_thumbnail?: string | null | undefined;
2568
+ author?: {
2569
+ id: string;
2570
+ name: string;
2571
+ avatar?: string | null | undefined;
2572
+ handle?: string | null | undefined;
2573
+ } | null | undefined;
2574
+ } | null | undefined;
2575
+ attachments: {
2576
+ id: string;
2577
+ name: string;
2578
+ url: string;
2579
+ type: string;
2580
+ size: number;
2581
+ thumbnail?: string | undefined;
2582
+ }[];
2583
+ reactions?: {
2584
+ reaction: string;
2585
+ count: number;
2586
+ users: {
2587
+ id: string;
2588
+ name: string;
2589
+ }[];
2590
+ }[] | undefined;
2591
+ meta: Record<string, unknown>;
2592
+ edited_at?: string | null | undefined;
2593
+ is_deleted: boolean;
2594
+ created_at: string;
2595
+ updated_at: string;
2596
+ } | undefined;
2597
+ last_message_at?: string | undefined;
2598
+ unread_count: number;
2599
+ is_muted: boolean;
2600
+ muted_until?: string | null | undefined;
2601
+ is_pinned: boolean;
2602
+ is_archived: boolean;
2603
+ created_at: string;
2604
+ other_user_id?: string | undefined;
2605
+ other_online?: boolean | undefined;
2606
+ other_presence_status?: PresenceStatus | undefined;
2607
+ }[];
2608
+ folders: {
2609
+ id: string;
2610
+ name: string;
2611
+ color?: string | null | undefined;
2612
+ icon?: string | null | undefined;
2613
+ sort_order: number;
2614
+ conversation_count: number;
2615
+ unread_count: number;
2616
+ created_at: string;
2617
+ updated_at: string;
2618
+ }[];
2619
+ foldersLoaded: boolean;
2620
+ activeFolderId: string | null;
2621
+ messages: Record<string, Message[]>;
2622
+ typingUsers: Record<string, TypingUser[]>;
2623
+ loading: boolean;
2624
+ error: string | null;
2625
+ conversationCursors: Record<string, string>;
2626
+ conversationHasMore: Record<string, boolean>;
2627
+ loadingMessages: Record<string, boolean>;
2628
+ lastFetch: number;
2629
+ searchResults: {
2630
+ id: string;
2631
+ conversation_id: string;
2632
+ author_id: string;
2633
+ author?: {
2634
+ id: string;
2635
+ name: string;
2636
+ avatar?: string | undefined;
2637
+ avatar_url?: string | undefined;
2638
+ handle?: string | undefined;
2639
+ } | undefined;
2640
+ body?: string | undefined;
2641
+ reply_to_id?: string | null | undefined;
2642
+ reply_to?: {
2643
+ id: string;
2644
+ author_id: string;
2645
+ body?: string | null | undefined;
2646
+ } | null | undefined;
2647
+ shared_post?: {
2648
+ id: string;
2649
+ title: string;
2650
+ url: string;
2651
+ excerpt?: string | null | undefined;
2652
+ media_thumbnail?: string | null | undefined;
2653
+ author?: {
2654
+ id: string;
2655
+ name: string;
2656
+ avatar?: string | null | undefined;
2657
+ handle?: string | null | undefined;
2658
+ } | null | undefined;
2659
+ } | null | undefined;
2660
+ attachments: {
2661
+ id: string;
2662
+ name: string;
2663
+ url: string;
2664
+ type: string;
2665
+ size: number;
2666
+ thumbnail?: string | undefined;
2667
+ }[];
2668
+ reactions?: {
2669
+ reaction: string;
2670
+ count: number;
2671
+ users: {
2672
+ id: string;
2673
+ name: string;
2674
+ }[];
2675
+ }[] | undefined;
2676
+ meta: Record<string, unknown>;
2677
+ edited_at?: string | null | undefined;
2678
+ is_deleted: boolean;
2679
+ created_at: string;
2680
+ updated_at: string;
2681
+ }[];
2682
+ searchLoading: boolean;
2683
+ backgroundPollRetryAfterUntil: number;
2684
+ backgroundPollTransientFailureCount: number;
2685
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
2686
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
2687
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
2688
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => (conversationId: string) => boolean;
2689
+ isLoadingMessages: (state: {
2690
+ conversations: {
2691
+ id: string;
2692
+ type: "dm" | "group";
2693
+ title?: string | undefined;
2694
+ folder_id?: string | null | undefined;
2695
+ is_request?: boolean | undefined;
2696
+ created_by?: string | undefined;
2697
+ participants: {
2698
+ id: string;
2699
+ user_id: string;
2700
+ user?: {
2701
+ id: string;
2702
+ name: string;
2703
+ avatar?: string | undefined;
2704
+ avatar_url?: string | undefined;
2705
+ handle?: string | undefined;
2706
+ } | undefined;
2707
+ role: "admin" | "member";
2708
+ last_read_message_id?: string | undefined;
2709
+ muted_until?: string | undefined;
2710
+ joined_at: string;
2711
+ }[];
2712
+ last_message?: {
2713
+ id: string;
2714
+ conversation_id: string;
2715
+ author_id: string;
2716
+ author?: {
2717
+ id: string;
2718
+ name: string;
2719
+ avatar?: string | undefined;
2720
+ avatar_url?: string | undefined;
2721
+ handle?: string | undefined;
2722
+ } | undefined;
2723
+ body?: string | undefined;
2724
+ reply_to_id?: string | null | undefined;
2725
+ reply_to?: {
2726
+ id: string;
2727
+ author_id: string;
2728
+ body?: string | null | undefined;
2729
+ } | null | undefined;
2730
+ shared_post?: {
2731
+ id: string;
2732
+ title: string;
2733
+ url: string;
2734
+ excerpt?: string | null | undefined;
2735
+ media_thumbnail?: string | null | undefined;
2736
+ author?: {
2737
+ id: string;
2738
+ name: string;
2739
+ avatar?: string | null | undefined;
2740
+ handle?: string | null | undefined;
2741
+ } | null | undefined;
2742
+ } | null | undefined;
2743
+ attachments: {
2744
+ id: string;
2745
+ name: string;
2746
+ url: string;
2747
+ type: string;
2748
+ size: number;
2749
+ thumbnail?: string | undefined;
2750
+ }[];
2751
+ reactions?: {
2752
+ reaction: string;
2753
+ count: number;
2754
+ users: {
2755
+ id: string;
2756
+ name: string;
2757
+ }[];
2758
+ }[] | undefined;
2759
+ meta: Record<string, unknown>;
2760
+ edited_at?: string | null | undefined;
2761
+ is_deleted: boolean;
2762
+ created_at: string;
2763
+ updated_at: string;
2764
+ } | undefined;
2765
+ last_message_at?: string | undefined;
2766
+ unread_count: number;
2767
+ is_muted: boolean;
2768
+ muted_until?: string | null | undefined;
2769
+ is_pinned: boolean;
2770
+ is_archived: boolean;
2771
+ created_at: string;
2772
+ other_user_id?: string | undefined;
2773
+ other_online?: boolean | undefined;
2774
+ other_presence_status?: PresenceStatus | undefined;
2775
+ }[];
2776
+ requests: {
2777
+ id: string;
2778
+ type: "dm" | "group";
2779
+ title?: string | undefined;
2780
+ folder_id?: string | null | undefined;
2781
+ is_request?: boolean | undefined;
2782
+ created_by?: string | undefined;
2783
+ participants: {
2784
+ id: string;
2785
+ user_id: string;
2786
+ user?: {
2787
+ id: string;
2788
+ name: string;
2789
+ avatar?: string | undefined;
2790
+ avatar_url?: string | undefined;
2791
+ handle?: string | undefined;
2792
+ } | undefined;
2793
+ role: "admin" | "member";
2794
+ last_read_message_id?: string | undefined;
2795
+ muted_until?: string | undefined;
2796
+ joined_at: string;
2797
+ }[];
2798
+ last_message?: {
2799
+ id: string;
2800
+ conversation_id: string;
2801
+ author_id: string;
2802
+ author?: {
2803
+ id: string;
2804
+ name: string;
2805
+ avatar?: string | undefined;
2806
+ avatar_url?: string | undefined;
2807
+ handle?: string | undefined;
2808
+ } | undefined;
2809
+ body?: string | undefined;
2810
+ reply_to_id?: string | null | undefined;
2811
+ reply_to?: {
2812
+ id: string;
2813
+ author_id: string;
2814
+ body?: string | null | undefined;
2815
+ } | null | undefined;
2816
+ shared_post?: {
2817
+ id: string;
2818
+ title: string;
2819
+ url: string;
2820
+ excerpt?: string | null | undefined;
2821
+ media_thumbnail?: string | null | undefined;
2822
+ author?: {
2823
+ id: string;
2824
+ name: string;
2825
+ avatar?: string | null | undefined;
2826
+ handle?: string | null | undefined;
2827
+ } | null | undefined;
2828
+ } | null | undefined;
2829
+ attachments: {
2830
+ id: string;
2831
+ name: string;
2832
+ url: string;
2833
+ type: string;
2834
+ size: number;
2835
+ thumbnail?: string | undefined;
2836
+ }[];
2837
+ reactions?: {
2838
+ reaction: string;
2839
+ count: number;
2840
+ users: {
2841
+ id: string;
2842
+ name: string;
2843
+ }[];
2844
+ }[] | undefined;
2845
+ meta: Record<string, unknown>;
2846
+ edited_at?: string | null | undefined;
2847
+ is_deleted: boolean;
2848
+ created_at: string;
2849
+ updated_at: string;
2850
+ } | undefined;
2851
+ last_message_at?: string | undefined;
2852
+ unread_count: number;
2853
+ is_muted: boolean;
2854
+ muted_until?: string | null | undefined;
2855
+ is_pinned: boolean;
2856
+ is_archived: boolean;
2857
+ created_at: string;
2858
+ other_user_id?: string | undefined;
2859
+ other_online?: boolean | undefined;
2860
+ other_presence_status?: PresenceStatus | undefined;
2861
+ }[];
2862
+ folders: {
2863
+ id: string;
2864
+ name: string;
2865
+ color?: string | null | undefined;
2866
+ icon?: string | null | undefined;
2867
+ sort_order: number;
2868
+ conversation_count: number;
2869
+ unread_count: number;
2870
+ created_at: string;
2871
+ updated_at: string;
2872
+ }[];
2873
+ foldersLoaded: boolean;
2874
+ activeFolderId: string | null;
2875
+ messages: Record<string, Message[]>;
2876
+ typingUsers: Record<string, TypingUser[]>;
2877
+ loading: boolean;
2878
+ error: string | null;
2879
+ conversationCursors: Record<string, string>;
2880
+ conversationHasMore: Record<string, boolean>;
2881
+ loadingMessages: Record<string, boolean>;
2882
+ lastFetch: number;
2883
+ searchResults: {
2884
+ id: string;
2885
+ conversation_id: string;
2886
+ author_id: string;
2887
+ author?: {
2888
+ id: string;
2889
+ name: string;
2890
+ avatar?: string | undefined;
2891
+ avatar_url?: string | undefined;
2892
+ handle?: string | undefined;
2893
+ } | undefined;
2894
+ body?: string | undefined;
2895
+ reply_to_id?: string | null | undefined;
2896
+ reply_to?: {
2897
+ id: string;
2898
+ author_id: string;
2899
+ body?: string | null | undefined;
2900
+ } | null | undefined;
2901
+ shared_post?: {
2902
+ id: string;
2903
+ title: string;
2904
+ url: string;
2905
+ excerpt?: string | null | undefined;
2906
+ media_thumbnail?: string | null | undefined;
2907
+ author?: {
2908
+ id: string;
2909
+ name: string;
2910
+ avatar?: string | null | undefined;
2911
+ handle?: string | null | undefined;
2912
+ } | null | undefined;
2913
+ } | null | undefined;
2914
+ attachments: {
2915
+ id: string;
2916
+ name: string;
2917
+ url: string;
2918
+ type: string;
2919
+ size: number;
2920
+ thumbnail?: string | undefined;
2921
+ }[];
2922
+ reactions?: {
2923
+ reaction: string;
2924
+ count: number;
2925
+ users: {
2926
+ id: string;
2927
+ name: string;
2928
+ }[];
2929
+ }[] | undefined;
2930
+ meta: Record<string, unknown>;
2931
+ edited_at?: string | null | undefined;
2932
+ is_deleted: boolean;
2933
+ created_at: string;
2934
+ updated_at: string;
2935
+ }[];
2936
+ searchLoading: boolean;
2937
+ backgroundPollRetryAfterUntil: number;
2938
+ backgroundPollTransientFailureCount: number;
2939
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
2940
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
2941
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
2942
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => (conversationId: string) => boolean;
2943
+ requestConversations: (state: {
2944
+ conversations: {
2945
+ id: string;
2946
+ type: "dm" | "group";
2947
+ title?: string | undefined;
2948
+ folder_id?: string | null | undefined;
2949
+ is_request?: boolean | undefined;
2950
+ created_by?: string | undefined;
2951
+ participants: {
2952
+ id: string;
2953
+ user_id: string;
2954
+ user?: {
2955
+ id: string;
2956
+ name: string;
2957
+ avatar?: string | undefined;
2958
+ avatar_url?: string | undefined;
2959
+ handle?: string | undefined;
2960
+ } | undefined;
2961
+ role: "admin" | "member";
2962
+ last_read_message_id?: string | undefined;
2963
+ muted_until?: string | undefined;
2964
+ joined_at: string;
2965
+ }[];
2966
+ last_message?: {
2967
+ id: string;
2968
+ conversation_id: string;
2969
+ author_id: string;
2970
+ author?: {
2971
+ id: string;
2972
+ name: string;
2973
+ avatar?: string | undefined;
2974
+ avatar_url?: string | undefined;
2975
+ handle?: string | undefined;
2976
+ } | undefined;
2977
+ body?: string | undefined;
2978
+ reply_to_id?: string | null | undefined;
2979
+ reply_to?: {
2980
+ id: string;
2981
+ author_id: string;
2982
+ body?: string | null | undefined;
2983
+ } | null | undefined;
2984
+ shared_post?: {
2985
+ id: string;
2986
+ title: string;
2987
+ url: string;
2988
+ excerpt?: string | null | undefined;
2989
+ media_thumbnail?: string | null | undefined;
2990
+ author?: {
2991
+ id: string;
2992
+ name: string;
2993
+ avatar?: string | null | undefined;
2994
+ handle?: string | null | undefined;
2995
+ } | null | undefined;
2996
+ } | null | undefined;
2997
+ attachments: {
2998
+ id: string;
2999
+ name: string;
3000
+ url: string;
3001
+ type: string;
3002
+ size: number;
3003
+ thumbnail?: string | undefined;
3004
+ }[];
3005
+ reactions?: {
3006
+ reaction: string;
3007
+ count: number;
3008
+ users: {
3009
+ id: string;
3010
+ name: string;
3011
+ }[];
3012
+ }[] | undefined;
3013
+ meta: Record<string, unknown>;
3014
+ edited_at?: string | null | undefined;
3015
+ is_deleted: boolean;
3016
+ created_at: string;
3017
+ updated_at: string;
3018
+ } | undefined;
3019
+ last_message_at?: string | undefined;
3020
+ unread_count: number;
3021
+ is_muted: boolean;
3022
+ muted_until?: string | null | undefined;
3023
+ is_pinned: boolean;
3024
+ is_archived: boolean;
3025
+ created_at: string;
3026
+ other_user_id?: string | undefined;
3027
+ other_online?: boolean | undefined;
3028
+ other_presence_status?: PresenceStatus | undefined;
3029
+ }[];
3030
+ requests: {
3031
+ id: string;
3032
+ type: "dm" | "group";
3033
+ title?: string | undefined;
3034
+ folder_id?: string | null | undefined;
3035
+ is_request?: boolean | undefined;
3036
+ created_by?: string | undefined;
3037
+ participants: {
3038
+ id: string;
3039
+ user_id: string;
3040
+ user?: {
3041
+ id: string;
3042
+ name: string;
3043
+ avatar?: string | undefined;
3044
+ avatar_url?: string | undefined;
3045
+ handle?: string | undefined;
3046
+ } | undefined;
3047
+ role: "admin" | "member";
3048
+ last_read_message_id?: string | undefined;
3049
+ muted_until?: string | undefined;
3050
+ joined_at: string;
3051
+ }[];
3052
+ last_message?: {
3053
+ id: string;
3054
+ conversation_id: string;
3055
+ author_id: string;
3056
+ author?: {
3057
+ id: string;
3058
+ name: string;
3059
+ avatar?: string | undefined;
3060
+ avatar_url?: string | undefined;
3061
+ handle?: string | undefined;
3062
+ } | undefined;
3063
+ body?: string | undefined;
3064
+ reply_to_id?: string | null | undefined;
3065
+ reply_to?: {
3066
+ id: string;
3067
+ author_id: string;
3068
+ body?: string | null | undefined;
3069
+ } | null | undefined;
3070
+ shared_post?: {
3071
+ id: string;
3072
+ title: string;
3073
+ url: string;
3074
+ excerpt?: string | null | undefined;
3075
+ media_thumbnail?: string | null | undefined;
3076
+ author?: {
3077
+ id: string;
3078
+ name: string;
3079
+ avatar?: string | null | undefined;
3080
+ handle?: string | null | undefined;
3081
+ } | null | undefined;
3082
+ } | null | undefined;
3083
+ attachments: {
3084
+ id: string;
3085
+ name: string;
3086
+ url: string;
3087
+ type: string;
3088
+ size: number;
3089
+ thumbnail?: string | undefined;
3090
+ }[];
3091
+ reactions?: {
3092
+ reaction: string;
3093
+ count: number;
3094
+ users: {
3095
+ id: string;
3096
+ name: string;
3097
+ }[];
3098
+ }[] | undefined;
3099
+ meta: Record<string, unknown>;
3100
+ edited_at?: string | null | undefined;
3101
+ is_deleted: boolean;
3102
+ created_at: string;
3103
+ updated_at: string;
3104
+ } | undefined;
3105
+ last_message_at?: string | undefined;
3106
+ unread_count: number;
3107
+ is_muted: boolean;
3108
+ muted_until?: string | null | undefined;
3109
+ is_pinned: boolean;
3110
+ is_archived: boolean;
3111
+ created_at: string;
3112
+ other_user_id?: string | undefined;
3113
+ other_online?: boolean | undefined;
3114
+ other_presence_status?: PresenceStatus | undefined;
3115
+ }[];
3116
+ folders: {
3117
+ id: string;
3118
+ name: string;
3119
+ color?: string | null | undefined;
3120
+ icon?: string | null | undefined;
3121
+ sort_order: number;
3122
+ conversation_count: number;
3123
+ unread_count: number;
3124
+ created_at: string;
3125
+ updated_at: string;
3126
+ }[];
3127
+ foldersLoaded: boolean;
3128
+ activeFolderId: string | null;
3129
+ messages: Record<string, Message[]>;
3130
+ typingUsers: Record<string, TypingUser[]>;
3131
+ loading: boolean;
3132
+ error: string | null;
3133
+ conversationCursors: Record<string, string>;
3134
+ conversationHasMore: Record<string, boolean>;
3135
+ loadingMessages: Record<string, boolean>;
3136
+ lastFetch: number;
3137
+ searchResults: {
3138
+ id: string;
3139
+ conversation_id: string;
3140
+ author_id: string;
3141
+ author?: {
3142
+ id: string;
3143
+ name: string;
3144
+ avatar?: string | undefined;
3145
+ avatar_url?: string | undefined;
3146
+ handle?: string | undefined;
3147
+ } | undefined;
3148
+ body?: string | undefined;
3149
+ reply_to_id?: string | null | undefined;
3150
+ reply_to?: {
3151
+ id: string;
3152
+ author_id: string;
3153
+ body?: string | null | undefined;
3154
+ } | null | undefined;
3155
+ shared_post?: {
3156
+ id: string;
3157
+ title: string;
3158
+ url: string;
3159
+ excerpt?: string | null | undefined;
3160
+ media_thumbnail?: string | null | undefined;
3161
+ author?: {
3162
+ id: string;
3163
+ name: string;
3164
+ avatar?: string | null | undefined;
3165
+ handle?: string | null | undefined;
3166
+ } | null | undefined;
3167
+ } | null | undefined;
3168
+ attachments: {
3169
+ id: string;
3170
+ name: string;
3171
+ url: string;
3172
+ type: string;
3173
+ size: number;
3174
+ thumbnail?: string | undefined;
3175
+ }[];
3176
+ reactions?: {
3177
+ reaction: string;
3178
+ count: number;
3179
+ users: {
3180
+ id: string;
3181
+ name: string;
3182
+ }[];
3183
+ }[] | undefined;
3184
+ meta: Record<string, unknown>;
3185
+ edited_at?: string | null | undefined;
3186
+ is_deleted: boolean;
3187
+ created_at: string;
3188
+ updated_at: string;
3189
+ }[];
3190
+ searchLoading: boolean;
3191
+ backgroundPollRetryAfterUntil: number;
3192
+ backgroundPollTransientFailureCount: number;
3193
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
3194
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
3195
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
3196
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => Conversation[];
3197
+ requestCount: (state: {
3198
+ conversations: {
3199
+ id: string;
3200
+ type: "dm" | "group";
3201
+ title?: string | undefined;
3202
+ folder_id?: string | null | undefined;
3203
+ is_request?: boolean | undefined;
3204
+ created_by?: string | undefined;
3205
+ participants: {
3206
+ id: string;
3207
+ user_id: string;
3208
+ user?: {
3209
+ id: string;
3210
+ name: string;
3211
+ avatar?: string | undefined;
3212
+ avatar_url?: string | undefined;
3213
+ handle?: string | undefined;
3214
+ } | undefined;
3215
+ role: "admin" | "member";
3216
+ last_read_message_id?: string | undefined;
3217
+ muted_until?: string | undefined;
3218
+ joined_at: string;
3219
+ }[];
3220
+ last_message?: {
3221
+ id: string;
3222
+ conversation_id: string;
3223
+ author_id: string;
3224
+ author?: {
3225
+ id: string;
3226
+ name: string;
3227
+ avatar?: string | undefined;
3228
+ avatar_url?: string | undefined;
3229
+ handle?: string | undefined;
3230
+ } | undefined;
3231
+ body?: string | undefined;
3232
+ reply_to_id?: string | null | undefined;
3233
+ reply_to?: {
3234
+ id: string;
3235
+ author_id: string;
3236
+ body?: string | null | undefined;
3237
+ } | null | undefined;
3238
+ shared_post?: {
3239
+ id: string;
3240
+ title: string;
3241
+ url: string;
3242
+ excerpt?: string | null | undefined;
3243
+ media_thumbnail?: string | null | undefined;
3244
+ author?: {
3245
+ id: string;
3246
+ name: string;
3247
+ avatar?: string | null | undefined;
3248
+ handle?: string | null | undefined;
3249
+ } | null | undefined;
3250
+ } | null | undefined;
3251
+ attachments: {
3252
+ id: string;
3253
+ name: string;
3254
+ url: string;
3255
+ type: string;
3256
+ size: number;
3257
+ thumbnail?: string | undefined;
3258
+ }[];
3259
+ reactions?: {
3260
+ reaction: string;
3261
+ count: number;
3262
+ users: {
3263
+ id: string;
3264
+ name: string;
3265
+ }[];
3266
+ }[] | undefined;
3267
+ meta: Record<string, unknown>;
3268
+ edited_at?: string | null | undefined;
3269
+ is_deleted: boolean;
3270
+ created_at: string;
3271
+ updated_at: string;
3272
+ } | undefined;
3273
+ last_message_at?: string | undefined;
3274
+ unread_count: number;
3275
+ is_muted: boolean;
3276
+ muted_until?: string | null | undefined;
3277
+ is_pinned: boolean;
3278
+ is_archived: boolean;
3279
+ created_at: string;
3280
+ other_user_id?: string | undefined;
3281
+ other_online?: boolean | undefined;
3282
+ other_presence_status?: PresenceStatus | undefined;
3283
+ }[];
3284
+ requests: {
3285
+ id: string;
3286
+ type: "dm" | "group";
3287
+ title?: string | undefined;
3288
+ folder_id?: string | null | undefined;
3289
+ is_request?: boolean | undefined;
3290
+ created_by?: string | undefined;
3291
+ participants: {
3292
+ id: string;
3293
+ user_id: string;
3294
+ user?: {
3295
+ id: string;
3296
+ name: string;
3297
+ avatar?: string | undefined;
3298
+ avatar_url?: string | undefined;
3299
+ handle?: string | undefined;
3300
+ } | undefined;
3301
+ role: "admin" | "member";
3302
+ last_read_message_id?: string | undefined;
3303
+ muted_until?: string | undefined;
3304
+ joined_at: string;
3305
+ }[];
3306
+ last_message?: {
3307
+ id: string;
3308
+ conversation_id: string;
3309
+ author_id: string;
3310
+ author?: {
3311
+ id: string;
3312
+ name: string;
3313
+ avatar?: string | undefined;
3314
+ avatar_url?: string | undefined;
3315
+ handle?: string | undefined;
3316
+ } | undefined;
3317
+ body?: string | undefined;
3318
+ reply_to_id?: string | null | undefined;
3319
+ reply_to?: {
3320
+ id: string;
3321
+ author_id: string;
3322
+ body?: string | null | undefined;
3323
+ } | null | undefined;
3324
+ shared_post?: {
3325
+ id: string;
3326
+ title: string;
3327
+ url: string;
3328
+ excerpt?: string | null | undefined;
3329
+ media_thumbnail?: string | null | undefined;
3330
+ author?: {
3331
+ id: string;
3332
+ name: string;
3333
+ avatar?: string | null | undefined;
3334
+ handle?: string | null | undefined;
3335
+ } | null | undefined;
3336
+ } | null | undefined;
3337
+ attachments: {
3338
+ id: string;
3339
+ name: string;
3340
+ url: string;
3341
+ type: string;
3342
+ size: number;
3343
+ thumbnail?: string | undefined;
3344
+ }[];
3345
+ reactions?: {
3346
+ reaction: string;
3347
+ count: number;
3348
+ users: {
3349
+ id: string;
3350
+ name: string;
3351
+ }[];
3352
+ }[] | undefined;
3353
+ meta: Record<string, unknown>;
3354
+ edited_at?: string | null | undefined;
3355
+ is_deleted: boolean;
3356
+ created_at: string;
3357
+ updated_at: string;
3358
+ } | undefined;
3359
+ last_message_at?: string | undefined;
3360
+ unread_count: number;
3361
+ is_muted: boolean;
3362
+ muted_until?: string | null | undefined;
3363
+ is_pinned: boolean;
3364
+ is_archived: boolean;
3365
+ created_at: string;
3366
+ other_user_id?: string | undefined;
3367
+ other_online?: boolean | undefined;
3368
+ other_presence_status?: PresenceStatus | undefined;
3369
+ }[];
3370
+ folders: {
3371
+ id: string;
3372
+ name: string;
3373
+ color?: string | null | undefined;
3374
+ icon?: string | null | undefined;
3375
+ sort_order: number;
3376
+ conversation_count: number;
3377
+ unread_count: number;
3378
+ created_at: string;
3379
+ updated_at: string;
3380
+ }[];
3381
+ foldersLoaded: boolean;
3382
+ activeFolderId: string | null;
3383
+ messages: Record<string, Message[]>;
3384
+ typingUsers: Record<string, TypingUser[]>;
3385
+ loading: boolean;
3386
+ error: string | null;
3387
+ conversationCursors: Record<string, string>;
3388
+ conversationHasMore: Record<string, boolean>;
3389
+ loadingMessages: Record<string, boolean>;
3390
+ lastFetch: number;
3391
+ searchResults: {
3392
+ id: string;
3393
+ conversation_id: string;
3394
+ author_id: string;
3395
+ author?: {
3396
+ id: string;
3397
+ name: string;
3398
+ avatar?: string | undefined;
3399
+ avatar_url?: string | undefined;
3400
+ handle?: string | undefined;
3401
+ } | undefined;
3402
+ body?: string | undefined;
3403
+ reply_to_id?: string | null | undefined;
3404
+ reply_to?: {
3405
+ id: string;
3406
+ author_id: string;
3407
+ body?: string | null | undefined;
3408
+ } | null | undefined;
3409
+ shared_post?: {
3410
+ id: string;
3411
+ title: string;
3412
+ url: string;
3413
+ excerpt?: string | null | undefined;
3414
+ media_thumbnail?: string | null | undefined;
3415
+ author?: {
3416
+ id: string;
3417
+ name: string;
3418
+ avatar?: string | null | undefined;
3419
+ handle?: string | null | undefined;
3420
+ } | null | undefined;
3421
+ } | null | undefined;
3422
+ attachments: {
3423
+ id: string;
3424
+ name: string;
3425
+ url: string;
3426
+ type: string;
3427
+ size: number;
3428
+ thumbnail?: string | undefined;
3429
+ }[];
3430
+ reactions?: {
3431
+ reaction: string;
3432
+ count: number;
3433
+ users: {
3434
+ id: string;
3435
+ name: string;
3436
+ }[];
3437
+ }[] | undefined;
3438
+ meta: Record<string, unknown>;
3439
+ edited_at?: string | null | undefined;
3440
+ is_deleted: boolean;
3441
+ created_at: string;
3442
+ updated_at: string;
3443
+ }[];
3444
+ searchLoading: boolean;
3445
+ backgroundPollRetryAfterUntil: number;
3446
+ backgroundPollTransientFailureCount: number;
3447
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
3448
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
3449
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
3450
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => number;
3451
+ unreadRequestCount: (state: {
3452
+ conversations: {
3453
+ id: string;
3454
+ type: "dm" | "group";
3455
+ title?: string | undefined;
3456
+ folder_id?: string | null | undefined;
3457
+ is_request?: boolean | undefined;
3458
+ created_by?: string | undefined;
3459
+ participants: {
3460
+ id: string;
3461
+ user_id: string;
3462
+ user?: {
3463
+ id: string;
3464
+ name: string;
3465
+ avatar?: string | undefined;
3466
+ avatar_url?: string | undefined;
3467
+ handle?: string | undefined;
3468
+ } | undefined;
3469
+ role: "admin" | "member";
3470
+ last_read_message_id?: string | undefined;
3471
+ muted_until?: string | undefined;
3472
+ joined_at: string;
3473
+ }[];
3474
+ last_message?: {
3475
+ id: string;
3476
+ conversation_id: string;
3477
+ author_id: string;
3478
+ author?: {
3479
+ id: string;
3480
+ name: string;
3481
+ avatar?: string | undefined;
3482
+ avatar_url?: string | undefined;
3483
+ handle?: string | undefined;
3484
+ } | undefined;
3485
+ body?: string | undefined;
3486
+ reply_to_id?: string | null | undefined;
3487
+ reply_to?: {
3488
+ id: string;
3489
+ author_id: string;
3490
+ body?: string | null | undefined;
3491
+ } | null | undefined;
3492
+ shared_post?: {
3493
+ id: string;
3494
+ title: string;
3495
+ url: string;
3496
+ excerpt?: string | null | undefined;
3497
+ media_thumbnail?: string | null | undefined;
3498
+ author?: {
3499
+ id: string;
3500
+ name: string;
3501
+ avatar?: string | null | undefined;
3502
+ handle?: string | null | undefined;
3503
+ } | null | undefined;
3504
+ } | null | undefined;
3505
+ attachments: {
3506
+ id: string;
3507
+ name: string;
3508
+ url: string;
3509
+ type: string;
3510
+ size: number;
3511
+ thumbnail?: string | undefined;
3512
+ }[];
3513
+ reactions?: {
3514
+ reaction: string;
3515
+ count: number;
3516
+ users: {
3517
+ id: string;
3518
+ name: string;
3519
+ }[];
3520
+ }[] | undefined;
3521
+ meta: Record<string, unknown>;
3522
+ edited_at?: string | null | undefined;
3523
+ is_deleted: boolean;
3524
+ created_at: string;
3525
+ updated_at: string;
3526
+ } | undefined;
3527
+ last_message_at?: string | undefined;
3528
+ unread_count: number;
3529
+ is_muted: boolean;
3530
+ muted_until?: string | null | undefined;
3531
+ is_pinned: boolean;
3532
+ is_archived: boolean;
3533
+ created_at: string;
3534
+ other_user_id?: string | undefined;
3535
+ other_online?: boolean | undefined;
3536
+ other_presence_status?: PresenceStatus | undefined;
3537
+ }[];
3538
+ requests: {
3539
+ id: string;
3540
+ type: "dm" | "group";
3541
+ title?: string | undefined;
3542
+ folder_id?: string | null | undefined;
3543
+ is_request?: boolean | undefined;
3544
+ created_by?: string | undefined;
3545
+ participants: {
3546
+ id: string;
3547
+ user_id: string;
3548
+ user?: {
3549
+ id: string;
3550
+ name: string;
3551
+ avatar?: string | undefined;
3552
+ avatar_url?: string | undefined;
3553
+ handle?: string | undefined;
3554
+ } | undefined;
3555
+ role: "admin" | "member";
3556
+ last_read_message_id?: string | undefined;
3557
+ muted_until?: string | undefined;
3558
+ joined_at: string;
3559
+ }[];
3560
+ last_message?: {
3561
+ id: string;
3562
+ conversation_id: string;
3563
+ author_id: string;
3564
+ author?: {
3565
+ id: string;
3566
+ name: string;
3567
+ avatar?: string | undefined;
3568
+ avatar_url?: string | undefined;
3569
+ handle?: string | undefined;
3570
+ } | undefined;
3571
+ body?: string | undefined;
3572
+ reply_to_id?: string | null | undefined;
3573
+ reply_to?: {
3574
+ id: string;
3575
+ author_id: string;
3576
+ body?: string | null | undefined;
3577
+ } | null | undefined;
3578
+ shared_post?: {
3579
+ id: string;
3580
+ title: string;
3581
+ url: string;
3582
+ excerpt?: string | null | undefined;
3583
+ media_thumbnail?: string | null | undefined;
3584
+ author?: {
3585
+ id: string;
3586
+ name: string;
3587
+ avatar?: string | null | undefined;
3588
+ handle?: string | null | undefined;
3589
+ } | null | undefined;
3590
+ } | null | undefined;
3591
+ attachments: {
3592
+ id: string;
3593
+ name: string;
3594
+ url: string;
3595
+ type: string;
3596
+ size: number;
3597
+ thumbnail?: string | undefined;
3598
+ }[];
3599
+ reactions?: {
3600
+ reaction: string;
3601
+ count: number;
3602
+ users: {
3603
+ id: string;
3604
+ name: string;
3605
+ }[];
3606
+ }[] | undefined;
3607
+ meta: Record<string, unknown>;
3608
+ edited_at?: string | null | undefined;
3609
+ is_deleted: boolean;
3610
+ created_at: string;
3611
+ updated_at: string;
3612
+ } | undefined;
3613
+ last_message_at?: string | undefined;
3614
+ unread_count: number;
3615
+ is_muted: boolean;
3616
+ muted_until?: string | null | undefined;
3617
+ is_pinned: boolean;
3618
+ is_archived: boolean;
3619
+ created_at: string;
3620
+ other_user_id?: string | undefined;
3621
+ other_online?: boolean | undefined;
3622
+ other_presence_status?: PresenceStatus | undefined;
3623
+ }[];
3624
+ folders: {
3625
+ id: string;
3626
+ name: string;
3627
+ color?: string | null | undefined;
3628
+ icon?: string | null | undefined;
3629
+ sort_order: number;
3630
+ conversation_count: number;
3631
+ unread_count: number;
3632
+ created_at: string;
3633
+ updated_at: string;
3634
+ }[];
3635
+ foldersLoaded: boolean;
3636
+ activeFolderId: string | null;
3637
+ messages: Record<string, Message[]>;
3638
+ typingUsers: Record<string, TypingUser[]>;
3639
+ loading: boolean;
3640
+ error: string | null;
3641
+ conversationCursors: Record<string, string>;
3642
+ conversationHasMore: Record<string, boolean>;
3643
+ loadingMessages: Record<string, boolean>;
3644
+ lastFetch: number;
3645
+ searchResults: {
3646
+ id: string;
3647
+ conversation_id: string;
3648
+ author_id: string;
3649
+ author?: {
3650
+ id: string;
3651
+ name: string;
3652
+ avatar?: string | undefined;
3653
+ avatar_url?: string | undefined;
3654
+ handle?: string | undefined;
3655
+ } | undefined;
3656
+ body?: string | undefined;
3657
+ reply_to_id?: string | null | undefined;
3658
+ reply_to?: {
3659
+ id: string;
3660
+ author_id: string;
3661
+ body?: string | null | undefined;
3662
+ } | null | undefined;
3663
+ shared_post?: {
3664
+ id: string;
3665
+ title: string;
3666
+ url: string;
3667
+ excerpt?: string | null | undefined;
3668
+ media_thumbnail?: string | null | undefined;
3669
+ author?: {
3670
+ id: string;
3671
+ name: string;
3672
+ avatar?: string | null | undefined;
3673
+ handle?: string | null | undefined;
3674
+ } | null | undefined;
3675
+ } | null | undefined;
3676
+ attachments: {
3677
+ id: string;
3678
+ name: string;
3679
+ url: string;
3680
+ type: string;
3681
+ size: number;
3682
+ thumbnail?: string | undefined;
3683
+ }[];
3684
+ reactions?: {
3685
+ reaction: string;
3686
+ count: number;
3687
+ users: {
3688
+ id: string;
3689
+ name: string;
3690
+ }[];
3691
+ }[] | undefined;
3692
+ meta: Record<string, unknown>;
3693
+ edited_at?: string | null | undefined;
3694
+ is_deleted: boolean;
3695
+ created_at: string;
3696
+ updated_at: string;
3697
+ }[];
3698
+ searchLoading: boolean;
3699
+ backgroundPollRetryAfterUntil: number;
3700
+ backgroundPollTransientFailureCount: number;
3701
+ _pendingSendIds: Set<string> & Omit<Set<string>, keyof Set<any>>;
3702
+ _activeDetailSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
3703
+ _activeGlobalConversationSubscriptions: Set<string> & Omit<Set<string>, keyof Set<any>>;
3704
+ } & import("pinia").PiniaCustomStateProperties<MessagingState>) => number;
3705
+ }, {
3706
+ normalizeFolderAssignmentsState(): void;
3707
+ fetchFolders(): Promise<ConversationFolder[]>;
3708
+ createFolder(data: CreateFolderPayload): Promise<ConversationFolder>;
3709
+ updateFolder(id: string, data: UpdateFolderPayload): Promise<ConversationFolder>;
3710
+ deleteFolder(id: string): Promise<void>;
3711
+ reorderFolders(order: string[]): Promise<void>;
3712
+ assignToFolder(conversationId: string, folderId: string | null): Promise<void>;
3713
+ fetchConversations(cursor?: string, filter?: ConversationListFilter, folderId?: string, options?: FetchConversationsOptions): Promise<PaginatedResponse<Conversation>>;
3714
+ pollConversationsForUnread(): Promise<boolean>;
3715
+ fetchConversation(id: string): Promise<Conversation>;
3716
+ fetchRequests(cursor?: string): Promise<PaginatedResponse<Conversation>>;
3717
+ fetchMessages(conversationId: string, cursor?: string): Promise<PaginatedResponse<Message>>;
3718
+ sendMessage(conversationId: string, body?: string, attachments?: File[], replyToId?: string | null, replyToPreview?: ReplyToPreview | null, sharedPostId?: string | null): Promise<Message>;
3719
+ editMessage(conversationId: string, messageId: string, body: string): Promise<Message>;
3720
+ deleteMessage(conversationId: string, messageId: string): Promise<void>;
3721
+ markAsRead(conversationId: string): Promise<void>;
3722
+ markAllAsRead(): Promise<void>;
3723
+ sendTyping(conversationId: string, state?: "start" | "stop"): Promise<void>;
3724
+ muteConversation(conversationId: string, minutes: number): Promise<void>;
3725
+ unmuteConversation(conversationId: string): Promise<void>;
3726
+ updateConversationTitle(conversationId: string, title: string): Promise<void>;
3727
+ pinConversation(conversationId: string, pinned: boolean): Promise<void>;
3728
+ archiveConversation(conversationId: string, archived: boolean): Promise<void>;
3729
+ deleteConversation(conversationId: string): Promise<void>;
3730
+ createDMConversation(userId: string, initialMessage?: string): Promise<Conversation>;
3731
+ createGroupConversation(title: string, userIds: string[]): Promise<Conversation>;
3732
+ addParticipants(conversationId: string, userIds: string[]): Promise<void>;
3733
+ removeParticipant(conversationId: string, userId: string): Promise<void>;
3734
+ addMessage(rawMessage: Omit<Message, "attachments"> & {
3735
+ attachments: RawAttachment[] | Attachment[];
3736
+ }): void;
3737
+ updateMessage(message: Message): void;
3738
+ removeMessage(conversationId: string, messageId: string): void;
3739
+ toggleReaction(conversationId: string, messageId: string, reaction: ReactionType): Promise<void>;
3740
+ updateMessageReactions(conversationId: string, messageId: string, reactions: ReactionSummary[] | null | undefined): void;
3741
+ addTypingUser(conversationId: string, user: TypingUser): void;
3742
+ removeTypingUser(conversationId: string, userId: string): void;
3743
+ updateConversationLastMessage(conversationId: string, message: Message): void;
3744
+ updatePresenceForUser(userId: string, status: PresenceStatus): void;
3745
+ acceptRequest(conversationId: string): Promise<void>;
3746
+ declineRequest(conversationId: string): Promise<void>;
3747
+ searchConversations(query: string, filter?: ConversationListFilter, folderId?: string): Promise<Conversation[]>;
3748
+ searchMessages(conversationId: string, query: string): Promise<Message[]>;
3749
+ clearSearchResults(): void;
3750
+ clearError(): void;
3751
+ registerDetailSubscription(conversationId: string): void;
3752
+ unregisterDetailSubscription(conversationId: string): void;
3753
+ hasDetailSubscription(conversationId: string): boolean;
3754
+ registerGlobalConversationSubscription(conversationId: string): void;
3755
+ unregisterGlobalConversationSubscription(conversationId: string): void;
3756
+ hasGlobalConversationSubscription(conversationId: string): boolean;
3757
+ shouldRefresh(): boolean;
3758
+ reset(): void;
3759
+ }>;
3760
+ export {};