@dongdev/fca-unofficial 3.0.0 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,700 +1,746 @@
1
- declare module '@dongdev/fca-unofficial' {
2
- import type EventEmitter from "events";
3
- import type { Duplex, Readable, Transform } from "stream";
4
-
5
- // ============================================================================
6
- // Type Definitions
7
- // ============================================================================
8
-
9
- type ReadableStream = Readable | Duplex | Transform;
10
-
11
- // ============================================================================
12
- // Login Function
13
- // ============================================================================
14
-
15
- function login(
16
- credentials: Partial<{
17
- email: string;
18
- password: string;
19
- appState: AppstateData;
20
- Cookie?: string | string[] | Record<string, string>;
21
- }>,
22
- options: Partial<IFCAU_Options>,
23
- callback: (err: Error | null, api: IFCAU_API) => void
24
- ): void;
25
- function login(
26
- credentials: Partial<{
27
- email: string;
28
- password: string;
29
- appState: AppstateData;
30
- Cookie?: string | string[] | Record<string, string>;
31
- }>,
32
- options: Partial<IFCAU_Options>
33
- ): Promise<IFCAU_API>;
34
- function login(
35
- credentials: Partial<{
36
- email: string;
37
- password: string;
38
- appState: AppstateData;
39
- Cookie?: string | string[] | Record<string, string>;
40
- }>,
41
- callback: (err: Error | null, api: IFCAU_API) => void
42
- ): void;
43
- function login(
44
- credentials: Partial<{
45
- email: string;
46
- password: string;
47
- appState: AppstateData;
48
- Cookie?: string | string[] | Record<string, string>;
49
- }>
50
- ): Promise<IFCAU_API>;
51
-
52
- export default login;
53
- export { login };
54
-
55
- // ============================================================================
56
- // Core Types
57
- // ============================================================================
58
-
59
- export type Cookie = {
60
- key: string;
61
- value: string;
62
- domain: string;
63
- path?: string;
64
- hostOnly?: boolean;
65
- creation?: string;
66
- lastAccessed?: string;
67
- };
68
-
69
- export type AppstateData = {
70
- appState: Cookie[];
71
- };
72
-
73
- export type MessageObject = {
74
- body: string;
75
- sticker?: string;
76
- attachment?: ReadableStream | ReadableStream[];
77
- url?: string;
78
- emoji?: string;
79
- emojiSize?: string;
80
- mentions?: {
81
- tag: string;
82
- id: string;
83
- fromIndex?: number;
84
- }[];
85
- location?: {
86
- latitude: number;
87
- longitude: number;
88
- current?: boolean;
89
- };
90
- };
91
-
92
- // ============================================================================
93
- // Send Message Function
94
- // ============================================================================
95
-
96
- function sendMessage(
97
- message: string | MessageObject,
98
- threadID: string | string[],
99
- callback?: (err?: Error, data?: { threadID: string; messageID: string; timestamp: number }) => void,
100
- replyMessageID?: string,
101
- isGroup?: boolean
102
- ): Promise<{ threadID: string; messageID: string; timestamp: number }>;
103
- function sendMessage(
104
- message: string | MessageObject,
105
- threadID: string | string[],
106
- replyMessageID?: string,
107
- isGroup?: boolean
108
- ): Promise<{ threadID: string; messageID: string; timestamp: number }>;
109
-
110
- // ============================================================================
111
- // API Interface
112
- // ============================================================================
113
-
114
- export type IFCAU_API = {
115
- // Group Management
116
- addUserToGroup: (userID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
117
- removeUserFromGroup: (userID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
118
- createNewGroup: (participantIDs: string[], groupTitle?: string, callback?: (err: Error, threadID: string) => void) => Promise<string>;
119
-
120
- // Admin & Permissions
121
- changeAdminStatus: (threadID: string, adminIDs: string | string[], adminStatus: boolean, callback?: (err?: Error) => void) => Promise<void>;
122
- changeApprovalMode: (approvalMode: 0 | 1, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
123
-
124
- // Thread Management
125
- changeArchivedStatus: (threadOrThreads: string | string[], archive: boolean, callback?: (err?: Error) => void) => Promise<void>;
126
- changeBlockedStatus: (userID: string, blocked: boolean, callback?: (err?: Error) => void) => Promise<void>;
127
- changeGroupImage: (image: ReadableStream, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
128
- changeNickname: (nickname: string, threadID: string, participantID: string, callback?: (err?: Error) => void) => Promise<void>;
129
- changeThreadColor: (color: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
130
- changeThreadEmoji: (emoji: string | null, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
131
- setTitle: (newTitle: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
132
- deleteThread: (threadOrThreads: string | string[], callback?: (err?: Error) => void) => Promise<void>;
133
- muteThread: (threadID: string, muteSeconds: number, callback?: (err?: Error) => void) => Promise<void>;
134
-
135
- // Messages
136
- sendMessage: typeof sendMessage;
137
- editMessage: (text: string, messageID: string, callback?: (err?: Error) => void) => Promise<void>;
138
- deleteMessage: (messageOrMessages: string | string[], callback?: (err?: Error) => void) => Promise<void>;
139
- unsendMessage: (messageID: string, callback?: (err?: Error) => void) => Promise<void>;
140
- unsendMessageMqtt: (messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
141
- forwardMessage: (messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
142
- forwardAttachment: (attachmentID: string, userOrUsers: string | string[], callback?: (err?: Error) => void) => Promise<void>;
143
- pinMessage: (pinMode: boolean, messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
144
-
145
- // Reactions & Interactions
146
- setMessageReaction: (reaction: string, messageID: string, callback?: (err?: Error) => void, forceCustomReaction?: boolean) => Promise<void>;
147
- setMessageReactionMqtt: (reaction: string, messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
148
- sendTypingIndicator: (threadID: string, callback?: (err?: Error) => void) => Promise<void>;
149
- sendTypingIndicatorMqtt: (isTyping: boolean, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
150
-
151
- // Polls
152
- createPoll: (title: string, threadID: string, options?: { [item: string]: boolean }, callback?: (err?: Error) => void) => Promise<void>;
153
-
154
- // Read & Delivery Status
155
- markAsRead: (threadID: string, read?: boolean, callback?: (err?: Error) => void) => Promise<void>;
156
- markAsReadAll: (callback?: (err?: Error) => void) => Promise<void>;
157
- markAsDelivered: (threadID: string, messageID: string, callback?: (err?: Error) => void) => Promise<void>;
158
- markAsSeen: (seenTimestamp?: number, callback?: (err?: Error) => void) => Promise<void>;
159
-
160
- // Thread Information
161
- getThreadInfo: (threadID: string, callback?: (err: Error | null, thread: IFCAU_Thread) => void) => Promise<IFCAU_Thread>;
162
- getThreadList: (limit: number, timestamp: number | null, tags: string[], callback?: (err: Error | null, threads: IFCAU_ThreadList) => void) => Promise<IFCAU_ThreadList>;
163
- getThreadHistory: (threadID: string, amount: number, time?: number, callback?: (err: Error | null, messages: any[]) => void) => Promise<any[]>;
164
- getThreadPictures: (threadID: string, offset: number, limit: number, callback?: (err: Error | null, pictures: string[]) => void) => Promise<string[]>;
165
-
166
- // User Information
167
- getUserInfo: (userOrUsers: string | string[], callback?: (err: Error | null, users: { [id: string]: IFCAU_User }) => void) => Promise<{ [id: string]: IFCAU_User }>;
168
- getUserID: (name: string, callback?: (err: Error | null, obj: IFCAU_UserIDResponse) => void) => Promise<IFCAU_UserIDResponse>;
169
- getFriendsList: (callback?: (err: Error | null, friends: IFCAU_Friend[]) => void) => Promise<IFCAU_Friend[]>;
170
- getCurrentUserID: () => string;
171
-
172
- // Utilities
173
- getAppState: () => any;
174
- getEmojiUrl: (c: string, size: number, pixelRatio: number) => string;
175
- resolvePhotoUrl: (photoID: string, callback?: (err: Error | null, url: string) => void) => Promise<string>;
176
- threadColors: {
177
- [color: string]: string;
178
- };
179
-
180
- // Message Requests
181
- handleMessageRequest: (threadOrThreads: string | string[], accept: boolean, callback?: (err?: Error) => void) => Promise<void>;
182
-
183
- // Event Listeners
184
- listen: (callback?: (err: Error | null, message: IFCAU_ListenMessage) => void) => EventEmitter;
185
- listenMqtt: (callback?: (err: Error | null, message: IFCAU_ListenMessage) => void) => EventEmitter & { stopListening: (callback?: () => void) => void };
186
-
187
- // Configuration & Session
188
- setOptions: (options: Partial<IFCAU_Options>) => void;
189
- logout: (callback?: (err?: Error) => void) => Promise<void>;
190
- };
191
-
192
- // ============================================================================
193
- // Listen Message Types
194
- // ============================================================================
195
-
196
- export type IFCAU_ListenMessage =
197
- | {
198
- type: "message";
199
- attachments: IFCAU_Attachment[];
200
- args: string[];
201
- body: string;
202
- isGroup: boolean;
203
- mentions: { [id: string]: string };
204
- messageID: string;
205
- senderID: string;
206
- threadID: string;
207
- isUnread: boolean;
208
- participantIDs: string[];
209
- }
210
- | {
211
- type: "event";
212
- author: string;
213
- logMessageBody: string;
214
- logMessageData: {
215
- image: {
216
- attachmentID: string;
217
- width: number;
218
- height: number;
219
- url: string;
220
- };
221
- };
222
- logMessageType: "log:thread-image";
223
- threadID: string;
224
- }
225
- | {
226
- type: "event";
227
- author: string;
228
- logMessageBody: string;
229
- logMessageData: {
230
- addedParticipants: {
231
- fanoutPolicy: string;
232
- firstName: string;
233
- fullName: string;
234
- groupJoinStatus: string;
235
- initialFolder: string;
236
- initialFolderId: {
237
- systemFolderId: string;
238
- };
239
- lastUnsubscribeTimestampMs: string;
240
- userFbId: string;
241
- isMessengerUser: boolean;
242
- }[];
243
- };
244
- logMessageType: "log:subscribe";
245
- threadID: string;
246
- participantIDs: string[];
247
- }
248
- | {
249
- type: "event";
250
- author: string;
251
- logMessageBody: string;
252
- logMessageData: { leftParticipantFbId: string };
253
- logMessageType: "log:unsubscribe";
254
- threadID: string;
255
- participantIDs: string[];
256
- }
257
- | {
258
- type: "event";
259
- author: string;
260
- logMessageBody: string;
261
- logMessageData: { name: string };
262
- logMessageType: "log:thread-name";
263
- threadID: string;
264
- participantIDs: string[];
265
- }
266
- | {
267
- type: "event";
268
- author: string;
269
- logMessageBody: string;
270
- logMessageData: {
271
- theme_color: string;
272
- gradient?: string;
273
- should_show_icon: string;
274
- theme_id: string;
275
- accessibility_label: string;
276
- theme_name_with_subtitle: string;
277
- theme_emoji?: string;
278
- };
279
- logMessageType: "log:thread-color";
280
- threadID: string;
281
- participantIDs: string[];
282
- }
283
- | {
284
- type: "event";
285
- author: string;
286
- logMessageBody: string;
287
- logMessageData: {
288
- thread_quick_reaction_instruction_key_id: string;
289
- thread_quick_reaction_emoji: string;
290
- thread_quick_reaction_emoji_url: string;
291
- };
292
- logMessageType: "log:thread-icon";
293
- threadID: string;
294
- participantIDs: string[];
295
- }
296
- | {
297
- type: "event";
298
- author: string;
299
- logMessageBody: string;
300
- logMessageData: {
301
- nickname: string;
302
- participant_id: string;
303
- };
304
- logMessageType: "log:user-nickname";
305
- threadID: string;
306
- participantIDs: string[];
307
- }
308
- | {
309
- type: "event";
310
- author: string;
311
- logMessageBody: string;
312
- logMessageData: {
313
- THREAD_CATEGORY: string;
314
- TARGET_ID: string;
315
- ADMIN_TYPE: string;
316
- ADMIN_EVENT: 'add_admin' | 'remove_admin';
317
- };
318
- logMessageType: "log:thread-admins";
319
- threadID: string;
320
- participantIDs: string[];
321
- }
322
- | {
323
- type: "event";
324
- author: string;
325
- logMessageBody: string;
326
- logMessageData: {
327
- removed_option_ids: string;
328
- question_json: string;
329
- event_type: 'question_creation' | 'update_vote' | 'add_unvoted_option' | 'multiple_updates';
330
- added_option_ids: string;
331
- new_option_texts: string;
332
- new_option_ids: string;
333
- question_id: string;
334
- };
335
- logMessageType: "log:thread-poll";
336
- threadID: string;
337
- participantIDs: string[];
338
- }
339
- | {
340
- type: "event";
341
- author: string;
342
- logMessageBody: string;
343
- logMessageData: { APPROVAL_MODE: '0' | '1'; THREAD_CATEGORY: string };
344
- logMessageType: "log:thread-approval-mode";
345
- threadID: string;
346
- participantIDs: string[];
347
- }
348
- | {
349
- type: "event";
350
- author: string;
351
- logMessageBody: string;
352
- logMessageData: any;
353
- logMessageType: "log:thread-call";
354
- threadID: string;
355
- participantIDs: string[];
356
- }
357
- | {
358
- type: "typ";
359
- from: string;
360
- fromMobile: boolean;
361
- isTyping: boolean;
362
- threadID: string;
363
- }
364
- | {
365
- type: "read";
366
- threadID: string;
367
- time: number;
368
- }
369
- | {
370
- type: "read_receipt";
371
- reader: string;
372
- threadID: string;
373
- time: number;
374
- }
375
- | {
376
- type: "message_reaction";
377
- threadID: string;
378
- messageID: string;
379
- reaction: string;
380
- senderID: string;
381
- userID: string;
382
- reactionTimestamp: number;
383
- }
384
- | {
385
- type: "presence";
386
- statuses: number;
387
- timestamp: number;
388
- userID: string;
389
- }
390
- | {
391
- type: "message_unsend";
392
- threadID: string;
393
- senderID: string;
394
- messageID: string;
395
- deletionTimestamp: number;
396
- }
397
- | {
398
- type: "message_reply";
399
- attachments: IFCAU_Attachment[];
400
- args: string[];
401
- body: string;
402
- isGroup: boolean;
403
- mentions: { [id: string]: string };
404
- messageID: string;
405
- senderID: string;
406
- threadID: string;
407
- isUnread: boolean;
408
- participantIDs: string[];
409
- messageReply: {
410
- attachments: IFCAU_Attachment[];
411
- body: string;
412
- isGroup: boolean;
413
- mentions: { [id: string]: string };
414
- messageID: string;
415
- senderID: string;
416
- threadID: string;
417
- isUnread: boolean;
418
- };
419
- };
420
-
421
- // ============================================================================
422
- // Attachment Types
423
- // ============================================================================
424
-
425
- export type IFCAU_Attachment =
426
- | {
427
- type: "sticker";
428
- ID: string;
429
- url: string;
430
- packID: string;
431
- spriteUrl: string;
432
- spriteUrl2x: string;
433
- width: number;
434
- height: number;
435
- caption: string;
436
- description: string;
437
- frameCount: number;
438
- frameRate: number;
439
- framesPerRow: number;
440
- framesPerCol: number;
441
- }
442
- | {
443
- type: "file";
444
- ID: string;
445
- filename: string;
446
- url: string;
447
- isMalicious: boolean;
448
- contentType: string;
449
- }
450
- | {
451
- type: "photo";
452
- ID: string;
453
- filename: string;
454
- thumbnailUrl: string;
455
- previewUrl: string;
456
- previewWidth: number;
457
- previewHeight: number;
458
- largePreviewUrl: string;
459
- largePreviewWidth: number;
460
- largePreviewHeight: number;
461
- url: string;
462
- width: number;
463
- height: number;
464
- }
465
- | {
466
- type: "animated_image";
467
- ID: string;
468
- filename: string;
469
- previewUrl: string;
470
- previewWidth: number;
471
- previewHeight: number;
472
- url: string;
473
- width: number;
474
- height: number;
475
- }
476
- | {
477
- type: "video";
478
- ID: string;
479
- filename: string;
480
- previewUrl: string;
481
- previewWidth: number;
482
- previewHeight: number;
483
- url: string;
484
- width: number;
485
- height: number;
486
- duration: number;
487
- videoType: string;
488
- }
489
- | {
490
- type: "audio";
491
- ID: string;
492
- filename: string;
493
- audioType: string;
494
- duration: number;
495
- url: string;
496
- isVoiceMail: boolean;
497
- }
498
- | {
499
- type: "location";
500
- ID: string;
501
- latitude: number;
502
- longitude: number;
503
- image: string;
504
- width: number;
505
- height: number;
506
- url: string;
507
- address: string;
508
- }
509
- | {
510
- type: "share";
511
- ID: string;
512
- url: string;
513
- title: string;
514
- description: string;
515
- source: string;
516
- image: string;
517
- width: number;
518
- height: number;
519
- playable: boolean;
520
- duration: number;
521
- playableUrl: string;
522
- subattachments: any;
523
- properties: any;
524
- };
525
-
526
- // ============================================================================
527
- // User Types
528
- // ============================================================================
529
-
530
- export type IFCAU_User = {
531
- name: string;
532
- firstName?: string;
533
- vanity?: string;
534
- thumbSrc: string;
535
- profileUrl: string | null;
536
- gender?: number;
537
- type: string;
538
- isFriend?: boolean;
539
- isBirthday: boolean;
540
- searchToken: any;
541
- alternateName?: string;
542
- };
543
-
544
- export type IFCAU_UserIDResponse = {
545
- userID: string;
546
- photoUrl: string;
547
- indexRank: number;
548
- name: string;
549
- isVerified: boolean;
550
- profileUrl: string;
551
- category: string;
552
- score: number;
553
- type: string;
554
- }[];
555
-
556
- export type IFCAU_Friend = {
557
- alternativeName: string;
558
- firstName: string;
559
- gender: string;
560
- userID: string;
561
- isFriend: boolean;
562
- fullName: string;
563
- profilePicture: string;
564
- type: string;
565
- profileUrl: string;
566
- vanity: string;
567
- isBirthday: boolean;
568
- };
569
-
570
- // ============================================================================
571
- // Thread Types
572
- // ============================================================================
573
-
574
- export type IFCAU_Thread = {
575
- threadID: string;
576
- participantIDs: string[];
577
- threadName: string;
578
- userInfo: (IFCAU_User & { id: string })[];
579
- nicknames: { [id: string]: string } | null;
580
- unreadCount: number;
581
- messageCount: number;
582
- imageSrc: string;
583
- timestamp: number;
584
- muteUntil: number | null;
585
- isGroup: boolean;
586
- isSubscribed: boolean;
587
- folder: 'INBOX' | 'ARCHIVE' | string;
588
- isArchived: boolean;
589
- cannotReplyReason: string | null;
590
- lastReadTimestamp: number;
591
- emoji: string | null;
592
- color: string | null;
593
- adminIDs: string[];
594
- approvalMode: boolean;
595
- approvalQueue: { inviterID: string; requesterID: string; timestamp: string }[];
596
- };
597
-
598
- export type IFCAU_ThreadList = {
599
- threadID: string;
600
- name: string;
601
- unreadCount: number;
602
- messageCount: number;
603
- imageSrc: string;
604
- emoji: string | null;
605
- color: string | null;
606
- nicknames: { userid: string; nickname: string }[];
607
- muteUntil: number | null;
608
- participants: IFCAU_ThreadList_Participants[];
609
- adminIDs: string[];
610
- folder: "INBOX" | "ARCHIVED" | "PENNDING" | "OTHER" | string;
611
- isGroup: boolean;
612
- customizationEnabled: boolean;
613
- participantAddMode: string;
614
- reactionMuteMode: string;
615
- isArchived: boolean;
616
- isSubscribed: boolean;
617
- timestamp: number;
618
- snippet: string;
619
- snippetAttachments: string;
620
- snippetSender: string;
621
- lastMessageTimestamp: number;
622
- listReadTimestamp: number | null;
623
- cannotReplyReason: string | null;
624
- approvalMode: string;
625
- }[];
626
-
627
- export type IFCAU_ThreadList_Participants =
628
- | {
629
- accountType: "User";
630
- userID: string;
631
- name: string;
632
- shortName: string;
633
- gender: string;
634
- url: string;
635
- profilePicture: string;
636
- username: string | null;
637
- isViewerFriend: boolean;
638
- isMessengerUser: boolean;
639
- isVerified: boolean;
640
- isMessageBlockedByViewer: boolean;
641
- isViewerCoworker: boolean;
642
- }
643
- | {
644
- accountType: "Page";
645
- userID: string;
646
- name: string;
647
- url: string;
648
- profilePicture: string;
649
- username: string | null;
650
- acceptMessengerUserFeedback: boolean;
651
- isMessengerUser: boolean;
652
- isVerified: boolean;
653
- isMessengerPlatformBot: boolean;
654
- isMessageBlockedByViewer: boolean;
655
- }
656
- | {
657
- accountType: "ReducedMessagingActor";
658
- userID: string;
659
- name: string;
660
- url: string;
661
- profilePicture: string;
662
- username: string | null;
663
- acceptMessengerUserFeedback: boolean;
664
- isMessageBlockedByViewer: boolean;
665
- }
666
- | {
667
- accountType: "UnavailableMessagingActor";
668
- userID: string;
669
- name: string;
670
- url: null;
671
- profilePicture: string;
672
- username: null;
673
- acceptMessengerUserFeedback: boolean;
674
- isMessageBlockedByViewer: boolean;
675
- }
676
- | {
677
- accountType: string;
678
- userID: string;
679
- name: string;
680
- };
681
-
682
- // ============================================================================
683
- // Options Type
684
- // ============================================================================
685
-
686
- export type IFCAU_Options = {
687
- pauseLog: boolean;
688
- logLevel: "silly" | "verbose" | "info" | "http" | "warn" | "error" | "silent";
689
- selfListen: boolean;
690
- listenEvents: boolean;
691
- pageID: string;
692
- updatePresence: boolean;
693
- forceLogin: boolean;
694
- userAgent: string;
695
- autoMarkDelivery: boolean;
696
- autoMarkRead: boolean;
697
- proxy: string;
698
- online: boolean;
699
- };
700
- }
1
+ declare module '@dongdev/fca-unofficial' {
2
+ import type EventEmitter from "events";
3
+ import type { Duplex, Readable, Transform } from "stream";
4
+
5
+ // ============================================================================
6
+ // Type Definitions
7
+ // ============================================================================
8
+
9
+ type ReadableStream = Readable | Duplex | Transform;
10
+
11
+ // ============================================================================
12
+ // Login Function
13
+ // ============================================================================
14
+
15
+ function login(
16
+ credentials: Partial<{
17
+ email: string;
18
+ password: string;
19
+ appState: AppstateData;
20
+ Cookie?: string | string[] | Record<string, string>;
21
+ }>,
22
+ options: Partial<IFCAU_Options>,
23
+ callback: (err: Error | null, api: IFCAU_API) => void
24
+ ): void;
25
+ function login(
26
+ credentials: Partial<{
27
+ email: string;
28
+ password: string;
29
+ appState: AppstateData;
30
+ Cookie?: string | string[] | Record<string, string>;
31
+ }>,
32
+ options: Partial<IFCAU_Options>
33
+ ): Promise<IFCAU_API>;
34
+ function login(
35
+ credentials: Partial<{
36
+ email: string;
37
+ password: string;
38
+ appState: AppstateData;
39
+ Cookie?: string | string[] | Record<string, string>;
40
+ }>,
41
+ callback: (err: Error | null, api: IFCAU_API) => void
42
+ ): void;
43
+ function login(
44
+ credentials: Partial<{
45
+ email: string;
46
+ password: string;
47
+ appState: AppstateData;
48
+ Cookie?: string | string[] | Record<string, string>;
49
+ }>
50
+ ): Promise<IFCAU_API>;
51
+
52
+ export default login;
53
+ export { login };
54
+
55
+ // ============================================================================
56
+ // Core Types
57
+ // ============================================================================
58
+
59
+ export type Cookie = {
60
+ key: string;
61
+ value: string;
62
+ domain: string;
63
+ path?: string;
64
+ hostOnly?: boolean;
65
+ creation?: string;
66
+ lastAccessed?: string;
67
+ };
68
+
69
+ export type AppstateData = {
70
+ appState: Cookie[];
71
+ };
72
+
73
+ export type MessageObject = {
74
+ body: string;
75
+ sticker?: string;
76
+ attachment?: ReadableStream | ReadableStream[];
77
+ url?: string;
78
+ emoji?: string;
79
+ emojiSize?: string;
80
+ mentions?: {
81
+ tag: string;
82
+ id: string;
83
+ fromIndex?: number;
84
+ }[];
85
+ location?: {
86
+ latitude: number;
87
+ longitude: number;
88
+ current?: boolean;
89
+ };
90
+ };
91
+
92
+ // ============================================================================
93
+ // Send Message Function
94
+ // ============================================================================
95
+
96
+ function sendMessage(
97
+ message: string | MessageObject,
98
+ threadID: string | string[],
99
+ callback?: (err?: Error, data?: { threadID: string; messageID: string; timestamp: number }) => void,
100
+ replyMessageID?: string,
101
+ isGroup?: boolean
102
+ ): Promise<{ threadID: string; messageID: string; timestamp: number }>;
103
+ function sendMessage(
104
+ message: string | MessageObject,
105
+ threadID: string | string[],
106
+ replyMessageID?: string,
107
+ isGroup?: boolean
108
+ ): Promise<{ threadID: string; messageID: string; timestamp: number }>;
109
+
110
+ // ============================================================================
111
+ // API Interface
112
+ // ============================================================================
113
+
114
+ export type IFCAU_API = {
115
+ // Group Management
116
+ addUserToGroup: (userID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
117
+ removeUserFromGroup: (userID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
118
+ createNewGroup: (participantIDs: string[], groupTitle?: string, callback?: (err: Error, threadID: string) => void) => Promise<string>;
119
+
120
+ // Admin & Permissions
121
+ changeAdminStatus: (threadID: string, adminIDs: string | string[], adminStatus: boolean, callback?: (err?: Error) => void) => Promise<void>;
122
+ changeApprovalMode: (approvalMode: 0 | 1, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
123
+
124
+ // Thread Management
125
+ changeArchivedStatus: (threadOrThreads: string | string[], archive: boolean, callback?: (err?: Error) => void) => Promise<void>;
126
+ changeBlockedStatus: (userID: string, blocked: boolean, callback?: (err?: Error) => void) => Promise<void>;
127
+ changeGroupImage: (image: ReadableStream, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
128
+ changeNickname: (nickname: string, threadID: string, participantID: string, callback?: (err?: Error) => void) => Promise<void>;
129
+ changeThreadColor: (color: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
130
+ changeThreadEmoji: (emoji: string | null, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
131
+ setTitle: (newTitle: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
132
+ deleteThread: (threadOrThreads: string | string[], callback?: (err?: Error) => void) => Promise<void>;
133
+ muteThread: (threadID: string, muteSeconds: number, callback?: (err?: Error) => void) => Promise<void>;
134
+
135
+ // Messages
136
+ sendMessage: typeof sendMessage;
137
+ editMessage: (text: string, messageID: string, callback?: (err?: Error) => void) => Promise<void>;
138
+ deleteMessage: (messageOrMessages: string | string[], callback?: (err?: Error) => void) => Promise<void>;
139
+ unsendMessage: (messageID: string, callback?: (err?: Error) => void) => Promise<void>;
140
+ unsendMessageMqtt: (messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
141
+ forwardMessage: (messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
142
+ forwardAttachment: (attachmentID: string, userOrUsers: string | string[], callback?: (err?: Error) => void) => Promise<void>;
143
+ pinMessage: (pinMode: boolean, messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
144
+
145
+ // Reactions & Interactions
146
+ setMessageReaction: (reaction: string, messageID: string, callback?: (err?: Error) => void, forceCustomReaction?: boolean) => Promise<void>;
147
+ setMessageReactionMqtt: (reaction: string, messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
148
+ sendTypingIndicator: (threadID: string, callback?: (err?: Error) => void) => Promise<void>;
149
+ sendTypingIndicatorMqtt: (isTyping: boolean, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
150
+
151
+ // Polls
152
+ createPoll: (title: string, threadID: string, options?: { [item: string]: boolean }, callback?: (err?: Error) => void) => Promise<void>;
153
+
154
+ // Read & Delivery Status
155
+ markAsRead: (threadID: string, read?: boolean, callback?: (err?: Error) => void) => Promise<void>;
156
+ markAsReadAll: (callback?: (err?: Error) => void) => Promise<void>;
157
+ markAsDelivered: (threadID: string, messageID: string, callback?: (err?: Error) => void) => Promise<void>;
158
+ markAsSeen: (seenTimestamp?: number, callback?: (err?: Error) => void) => Promise<void>;
159
+
160
+ // Thread Information
161
+ getThreadInfo: (threadID: string, callback?: (err: Error | null, thread: IFCAU_Thread) => void) => Promise<IFCAU_Thread>;
162
+ getThreadList: (limit: number, timestamp: number | null, tags: string[], callback?: (err: Error | null, threads: IFCAU_ThreadList) => void) => Promise<IFCAU_ThreadList>;
163
+ getThreadHistory: (threadID: string, amount: number, time?: number, callback?: (err: Error | null, messages: any[]) => void) => Promise<any[]>;
164
+ getThreadPictures: (threadID: string, offset: number, limit: number, callback?: (err: Error | null, pictures: string[]) => void) => Promise<string[]>;
165
+
166
+ // User Information
167
+ getUserInfo: (userOrUsers: string | string[], callback?: (err: Error | null, users: { [id: string]: IFCAU_User }) => void) => Promise<{ [id: string]: IFCAU_User }>;
168
+ getUserID: (name: string, callback?: (err: Error | null, obj: IFCAU_UserIDResponse) => void) => Promise<IFCAU_UserIDResponse>;
169
+ getFriendsList: (callback?: (err: Error | null, friends: IFCAU_Friend[]) => void) => Promise<IFCAU_Friend[]>;
170
+ getCurrentUserID: () => string;
171
+
172
+ // Utilities
173
+ getAppState: () => any;
174
+ getEmojiUrl: (c: string, size: number, pixelRatio: number) => string;
175
+ resolvePhotoUrl: (photoID: string, callback?: (err: Error | null, url: string) => void) => Promise<string>;
176
+ threadColors: {
177
+ [color: string]: string;
178
+ };
179
+
180
+ // Message Requests
181
+ handleMessageRequest: (threadOrThreads: string | string[], accept: boolean, callback?: (err?: Error) => void) => Promise<void>;
182
+
183
+ // Event Listeners
184
+ listen: (callback?: (err: Error | null, message: IFCAU_ListenMessage) => void) => EventEmitter;
185
+ listenMqtt: (callback?: (err: Error | null, message: IFCAU_ListenMessage) => void) => EventEmitter & { stopListening: (callback?: () => void) => void };
186
+
187
+ // Middleware System
188
+ useMiddleware: (middleware: IFCAU_Middleware | string, fn?: IFCAU_Middleware) => () => void;
189
+ removeMiddleware: (identifier: string | IFCAU_Middleware) => boolean;
190
+ clearMiddleware: () => void;
191
+ listMiddleware: () => string[];
192
+ setMiddlewareEnabled: (name: string, enabled: boolean) => boolean;
193
+ readonly middlewareCount: number;
194
+
195
+ // Configuration & Session
196
+ setOptions: (options: Partial<IFCAU_Options>) => void;
197
+ logout: (callback?: (err?: Error) => void) => Promise<void>;
198
+
199
+ // Message Scheduler
200
+ scheduler: {
201
+ scheduleMessage: (message: string | MessageObject, threadID: string | string[], when: Date | number | string, options?: { replyMessageID?: string; isGroup?: boolean; callback?: (err?: Error) => void }) => string;
202
+ cancelScheduledMessage: (id: string) => boolean;
203
+ getScheduledMessage: (id: string) => IFCAU_ScheduledMessage | null;
204
+ listScheduledMessages: () => IFCAU_ScheduledMessage[];
205
+ cancelAllScheduledMessages: () => number;
206
+ getScheduledCount: () => number;
207
+ cleanup: () => void;
208
+ };
209
+
210
+ // Auto-save AppState
211
+ enableAutoSaveAppState: (options?: { filePath?: string; interval?: number; saveOnLogin?: boolean }) => () => void;
212
+ };
213
+
214
+ // ============================================================================
215
+ // Listen Message Types
216
+ // ============================================================================
217
+
218
+ export type IFCAU_ListenMessage =
219
+ | {
220
+ type: "message";
221
+ attachments: IFCAU_Attachment[];
222
+ args: string[];
223
+ body: string;
224
+ isGroup: boolean;
225
+ mentions: { [id: string]: string };
226
+ messageID: string;
227
+ senderID: string;
228
+ threadID: string;
229
+ isUnread: boolean;
230
+ participantIDs: string[];
231
+ }
232
+ | {
233
+ type: "event";
234
+ author: string;
235
+ logMessageBody: string;
236
+ logMessageData: {
237
+ image: {
238
+ attachmentID: string;
239
+ width: number;
240
+ height: number;
241
+ url: string;
242
+ };
243
+ };
244
+ logMessageType: "log:thread-image";
245
+ threadID: string;
246
+ }
247
+ | {
248
+ type: "event";
249
+ author: string;
250
+ logMessageBody: string;
251
+ logMessageData: {
252
+ addedParticipants: {
253
+ fanoutPolicy: string;
254
+ firstName: string;
255
+ fullName: string;
256
+ groupJoinStatus: string;
257
+ initialFolder: string;
258
+ initialFolderId: {
259
+ systemFolderId: string;
260
+ };
261
+ lastUnsubscribeTimestampMs: string;
262
+ userFbId: string;
263
+ isMessengerUser: boolean;
264
+ }[];
265
+ };
266
+ logMessageType: "log:subscribe";
267
+ threadID: string;
268
+ participantIDs: string[];
269
+ }
270
+ | {
271
+ type: "event";
272
+ author: string;
273
+ logMessageBody: string;
274
+ logMessageData: { leftParticipantFbId: string };
275
+ logMessageType: "log:unsubscribe";
276
+ threadID: string;
277
+ participantIDs: string[];
278
+ }
279
+ | {
280
+ type: "event";
281
+ author: string;
282
+ logMessageBody: string;
283
+ logMessageData: { name: string };
284
+ logMessageType: "log:thread-name";
285
+ threadID: string;
286
+ participantIDs: string[];
287
+ }
288
+ | {
289
+ type: "event";
290
+ author: string;
291
+ logMessageBody: string;
292
+ logMessageData: {
293
+ theme_color: string;
294
+ gradient?: string;
295
+ should_show_icon: string;
296
+ theme_id: string;
297
+ accessibility_label: string;
298
+ theme_name_with_subtitle: string;
299
+ theme_emoji?: string;
300
+ };
301
+ logMessageType: "log:thread-color";
302
+ threadID: string;
303
+ participantIDs: string[];
304
+ }
305
+ | {
306
+ type: "event";
307
+ author: string;
308
+ logMessageBody: string;
309
+ logMessageData: {
310
+ thread_quick_reaction_instruction_key_id: string;
311
+ thread_quick_reaction_emoji: string;
312
+ thread_quick_reaction_emoji_url: string;
313
+ };
314
+ logMessageType: "log:thread-icon";
315
+ threadID: string;
316
+ participantIDs: string[];
317
+ }
318
+ | {
319
+ type: "event";
320
+ author: string;
321
+ logMessageBody: string;
322
+ logMessageData: {
323
+ nickname: string;
324
+ participant_id: string;
325
+ };
326
+ logMessageType: "log:user-nickname";
327
+ threadID: string;
328
+ participantIDs: string[];
329
+ }
330
+ | {
331
+ type: "event";
332
+ author: string;
333
+ logMessageBody: string;
334
+ logMessageData: {
335
+ THREAD_CATEGORY: string;
336
+ TARGET_ID: string;
337
+ ADMIN_TYPE: string;
338
+ ADMIN_EVENT: 'add_admin' | 'remove_admin';
339
+ };
340
+ logMessageType: "log:thread-admins";
341
+ threadID: string;
342
+ participantIDs: string[];
343
+ }
344
+ | {
345
+ type: "event";
346
+ author: string;
347
+ logMessageBody: string;
348
+ logMessageData: {
349
+ removed_option_ids: string;
350
+ question_json: string;
351
+ event_type: 'question_creation' | 'update_vote' | 'add_unvoted_option' | 'multiple_updates';
352
+ added_option_ids: string;
353
+ new_option_texts: string;
354
+ new_option_ids: string;
355
+ question_id: string;
356
+ };
357
+ logMessageType: "log:thread-poll";
358
+ threadID: string;
359
+ participantIDs: string[];
360
+ }
361
+ | {
362
+ type: "event";
363
+ author: string;
364
+ logMessageBody: string;
365
+ logMessageData: { APPROVAL_MODE: '0' | '1'; THREAD_CATEGORY: string };
366
+ logMessageType: "log:thread-approval-mode";
367
+ threadID: string;
368
+ participantIDs: string[];
369
+ }
370
+ | {
371
+ type: "event";
372
+ author: string;
373
+ logMessageBody: string;
374
+ logMessageData: any;
375
+ logMessageType: "log:thread-call";
376
+ threadID: string;
377
+ participantIDs: string[];
378
+ }
379
+ | {
380
+ type: "typ";
381
+ from: string;
382
+ fromMobile: boolean;
383
+ isTyping: boolean;
384
+ threadID: string;
385
+ }
386
+ | {
387
+ type: "read";
388
+ threadID: string;
389
+ time: number;
390
+ }
391
+ | {
392
+ type: "read_receipt";
393
+ reader: string;
394
+ threadID: string;
395
+ time: number;
396
+ }
397
+ | {
398
+ type: "message_reaction";
399
+ threadID: string;
400
+ messageID: string;
401
+ reaction: string;
402
+ senderID: string;
403
+ userID: string;
404
+ reactionTimestamp: number;
405
+ }
406
+ | {
407
+ type: "presence";
408
+ statuses: number;
409
+ timestamp: number;
410
+ userID: string;
411
+ }
412
+ | {
413
+ type: "message_unsend";
414
+ threadID: string;
415
+ senderID: string;
416
+ messageID: string;
417
+ deletionTimestamp: number;
418
+ }
419
+ | {
420
+ type: "message_reply";
421
+ attachments: IFCAU_Attachment[];
422
+ args: string[];
423
+ body: string;
424
+ isGroup: boolean;
425
+ mentions: { [id: string]: string };
426
+ messageID: string;
427
+ senderID: string;
428
+ threadID: string;
429
+ isUnread: boolean;
430
+ participantIDs: string[];
431
+ messageReply: {
432
+ attachments: IFCAU_Attachment[];
433
+ body: string;
434
+ isGroup: boolean;
435
+ mentions: { [id: string]: string };
436
+ messageID: string;
437
+ senderID: string;
438
+ threadID: string;
439
+ isUnread: boolean;
440
+ };
441
+ };
442
+
443
+ // ============================================================================
444
+ // Attachment Types
445
+ // ============================================================================
446
+
447
+ export type IFCAU_Attachment =
448
+ | {
449
+ type: "sticker";
450
+ ID: string;
451
+ url: string;
452
+ packID: string;
453
+ spriteUrl: string;
454
+ spriteUrl2x: string;
455
+ width: number;
456
+ height: number;
457
+ caption: string;
458
+ description: string;
459
+ frameCount: number;
460
+ frameRate: number;
461
+ framesPerRow: number;
462
+ framesPerCol: number;
463
+ }
464
+ | {
465
+ type: "file";
466
+ ID: string;
467
+ filename: string;
468
+ url: string;
469
+ isMalicious: boolean;
470
+ contentType: string;
471
+ }
472
+ | {
473
+ type: "photo";
474
+ ID: string;
475
+ filename: string;
476
+ thumbnailUrl: string;
477
+ previewUrl: string;
478
+ previewWidth: number;
479
+ previewHeight: number;
480
+ largePreviewUrl: string;
481
+ largePreviewWidth: number;
482
+ largePreviewHeight: number;
483
+ url: string;
484
+ width: number;
485
+ height: number;
486
+ }
487
+ | {
488
+ type: "animated_image";
489
+ ID: string;
490
+ filename: string;
491
+ previewUrl: string;
492
+ previewWidth: number;
493
+ previewHeight: number;
494
+ url: string;
495
+ width: number;
496
+ height: number;
497
+ }
498
+ | {
499
+ type: "video";
500
+ ID: string;
501
+ filename: string;
502
+ previewUrl: string;
503
+ previewWidth: number;
504
+ previewHeight: number;
505
+ url: string;
506
+ width: number;
507
+ height: number;
508
+ duration: number;
509
+ videoType: string;
510
+ }
511
+ | {
512
+ type: "audio";
513
+ ID: string;
514
+ filename: string;
515
+ audioType: string;
516
+ duration: number;
517
+ url: string;
518
+ isVoiceMail: boolean;
519
+ }
520
+ | {
521
+ type: "location";
522
+ ID: string;
523
+ latitude: number;
524
+ longitude: number;
525
+ image: string;
526
+ width: number;
527
+ height: number;
528
+ url: string;
529
+ address: string;
530
+ }
531
+ | {
532
+ type: "share";
533
+ ID: string;
534
+ url: string;
535
+ title: string;
536
+ description: string;
537
+ source: string;
538
+ image: string;
539
+ width: number;
540
+ height: number;
541
+ playable: boolean;
542
+ duration: number;
543
+ playableUrl: string;
544
+ subattachments: any;
545
+ properties: any;
546
+ };
547
+
548
+ // ============================================================================
549
+ // User Types
550
+ // ============================================================================
551
+
552
+ export type IFCAU_User = {
553
+ name: string;
554
+ firstName?: string;
555
+ vanity?: string;
556
+ thumbSrc: string;
557
+ profileUrl: string | null;
558
+ gender?: number;
559
+ type: string;
560
+ isFriend?: boolean;
561
+ isBirthday: boolean;
562
+ searchToken: any;
563
+ alternateName?: string;
564
+ };
565
+
566
+ export type IFCAU_UserIDResponse = {
567
+ userID: string;
568
+ photoUrl: string;
569
+ indexRank: number;
570
+ name: string;
571
+ isVerified: boolean;
572
+ profileUrl: string;
573
+ category: string;
574
+ score: number;
575
+ type: string;
576
+ }[];
577
+
578
+ export type IFCAU_Friend = {
579
+ alternativeName: string;
580
+ firstName: string;
581
+ gender: string;
582
+ userID: string;
583
+ isFriend: boolean;
584
+ fullName: string;
585
+ profilePicture: string;
586
+ type: string;
587
+ profileUrl: string;
588
+ vanity: string;
589
+ isBirthday: boolean;
590
+ };
591
+
592
+ // ============================================================================
593
+ // Thread Types
594
+ // ============================================================================
595
+
596
+ export type IFCAU_Thread = {
597
+ threadID: string;
598
+ participantIDs: string[];
599
+ threadName: string;
600
+ userInfo: (IFCAU_User & { id: string })[];
601
+ nicknames: { [id: string]: string } | null;
602
+ unreadCount: number;
603
+ messageCount: number;
604
+ imageSrc: string;
605
+ timestamp: number;
606
+ muteUntil: number | null;
607
+ isGroup: boolean;
608
+ isSubscribed: boolean;
609
+ folder: 'INBOX' | 'ARCHIVE' | string;
610
+ isArchived: boolean;
611
+ cannotReplyReason: string | null;
612
+ lastReadTimestamp: number;
613
+ emoji: string | null;
614
+ color: string | null;
615
+ adminIDs: string[];
616
+ approvalMode: boolean;
617
+ approvalQueue: { inviterID: string; requesterID: string; timestamp: string }[];
618
+ };
619
+
620
+ export type IFCAU_ThreadList = {
621
+ threadID: string;
622
+ name: string;
623
+ unreadCount: number;
624
+ messageCount: number;
625
+ imageSrc: string;
626
+ emoji: string | null;
627
+ color: string | null;
628
+ nicknames: { userid: string; nickname: string }[];
629
+ muteUntil: number | null;
630
+ participants: IFCAU_ThreadList_Participants[];
631
+ adminIDs: string[];
632
+ folder: "INBOX" | "ARCHIVED" | "PENNDING" | "OTHER" | string;
633
+ isGroup: boolean;
634
+ customizationEnabled: boolean;
635
+ participantAddMode: string;
636
+ reactionMuteMode: string;
637
+ isArchived: boolean;
638
+ isSubscribed: boolean;
639
+ timestamp: number;
640
+ snippet: string;
641
+ snippetAttachments: string;
642
+ snippetSender: string;
643
+ lastMessageTimestamp: number;
644
+ listReadTimestamp: number | null;
645
+ cannotReplyReason: string | null;
646
+ approvalMode: string;
647
+ }[];
648
+
649
+ export type IFCAU_ThreadList_Participants =
650
+ | {
651
+ accountType: "User";
652
+ userID: string;
653
+ name: string;
654
+ shortName: string;
655
+ gender: string;
656
+ url: string;
657
+ profilePicture: string;
658
+ username: string | null;
659
+ isViewerFriend: boolean;
660
+ isMessengerUser: boolean;
661
+ isVerified: boolean;
662
+ isMessageBlockedByViewer: boolean;
663
+ isViewerCoworker: boolean;
664
+ }
665
+ | {
666
+ accountType: "Page";
667
+ userID: string;
668
+ name: string;
669
+ url: string;
670
+ profilePicture: string;
671
+ username: string | null;
672
+ acceptMessengerUserFeedback: boolean;
673
+ isMessengerUser: boolean;
674
+ isVerified: boolean;
675
+ isMessengerPlatformBot: boolean;
676
+ isMessageBlockedByViewer: boolean;
677
+ }
678
+ | {
679
+ accountType: "ReducedMessagingActor";
680
+ userID: string;
681
+ name: string;
682
+ url: string;
683
+ profilePicture: string;
684
+ username: string | null;
685
+ acceptMessengerUserFeedback: boolean;
686
+ isMessageBlockedByViewer: boolean;
687
+ }
688
+ | {
689
+ accountType: "UnavailableMessagingActor";
690
+ userID: string;
691
+ name: string;
692
+ url: null;
693
+ profilePicture: string;
694
+ username: null;
695
+ acceptMessengerUserFeedback: boolean;
696
+ isMessageBlockedByViewer: boolean;
697
+ }
698
+ | {
699
+ accountType: string;
700
+ userID: string;
701
+ name: string;
702
+ };
703
+
704
+ // ============================================================================
705
+ // Middleware Types
706
+ // ============================================================================
707
+
708
+ export type IFCAU_Middleware = (event: IFCAU_ListenMessage, next: (err?: Error | false | null) => void) => void | Promise<void> | false | null;
709
+
710
+ // ============================================================================
711
+ // Scheduler Types
712
+ // ============================================================================
713
+
714
+ export type IFCAU_ScheduledMessage = {
715
+ id: string;
716
+ message: string | MessageObject;
717
+ threadID: string | string[];
718
+ timestamp: number;
719
+ createdAt: number;
720
+ options: {
721
+ replyMessageID?: string;
722
+ isGroup?: boolean;
723
+ callback?: (err?: Error) => void;
724
+ };
725
+ timeUntilSend: number;
726
+ };
727
+
728
+ // ============================================================================
729
+ // Options Type
730
+ // ============================================================================
731
+
732
+ export type IFCAU_Options = {
733
+ pauseLog: boolean;
734
+ logLevel: "silly" | "verbose" | "info" | "http" | "warn" | "error" | "silent";
735
+ selfListen: boolean;
736
+ listenEvents: boolean;
737
+ pageID: string;
738
+ updatePresence: boolean;
739
+ forceLogin: boolean;
740
+ userAgent: string;
741
+ autoMarkDelivery: boolean;
742
+ autoMarkRead: boolean;
743
+ proxy: string;
744
+ online: boolean;
745
+ };
746
+ }