@dongdev/fca-unofficial 2.0.8 → 2.0.10

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 DELETED
@@ -1,618 +0,0 @@
1
- // Origin: NOCOM-BOT/mod_fbmsg_legacy
2
-
3
- declare module '@dongdev/fca-unofficial' {
4
- import type { Readable, Duplex, Transform } from "stream";
5
- import type EventEmitter from "events";
6
-
7
- type ReadableStream = Readable | Duplex | Transform;
8
- function login(credentials: Partial<{
9
- email: string,
10
- password: string,
11
- appState: AppstateData
12
- }>, options: Partial<IFCAU_Options>, callback: (err: Error | null, api: IFCAU_API) => void): void;
13
- function login(credentials: Partial<{
14
- email: string,
15
- password: string,
16
- appState: AppstateData
17
- }>, options: Partial<IFCAU_Options>): Promise<IFCAU_API>;
18
- function login(credentials: Partial<{
19
- email: string,
20
- password: string,
21
- appState: AppstateData
22
- }>, callback: (err: Error | null, api: IFCAU_API) => void): void;
23
- function login(credentials: Partial<{
24
- email: string,
25
- password: string,
26
- appState: AppstateData
27
- }>): Promise<IFCAU_API>;
28
-
29
- export default login;
30
-
31
- export type Cookie = {
32
- key: string,
33
- value: string,
34
- domain: string,
35
- path?: string,
36
- hostOnly?: boolean,
37
- creation?: string,
38
- lastAccessed?: string
39
- }
40
-
41
- export type AppstateData = {
42
- appState: Cookie[]
43
- }
44
-
45
- export type MessageObject = {
46
- body: string,
47
- sticker?: string,
48
- attachment?: ReadableStream | ReadableStream[],
49
- url?: string,
50
- emoji?: string,
51
- emojiSize?: string,
52
- mentions?: {
53
- tag: string,
54
- id: string,
55
- fromIndex?: number
56
- }[],
57
- location?: {
58
- latitude: number,
59
- longitude: number,
60
- current?: boolean
61
- }
62
- }
63
-
64
- function sendMessage(
65
- message: string | MessageObject,
66
- threadID: string | string[],
67
- callback?: (err?: Error, data?: { threadID: string, messageID: string, timestamp: number }) => void,
68
- replyMessageID?: string,
69
- isGroup?: boolean
70
- ): Promise<{ threadID: string, messageID: string, timestamp: number }>;
71
- function sendMessage(
72
- message: string | MessageObject,
73
- threadID: string | string[],
74
- replyMessageID?: string,
75
- isGroup?: boolean
76
- ): Promise<{ threadID: string, messageID: string, timestamp: number }>;
77
-
78
- export type IFCAU_API = {
79
- addUserToGroup: (userID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
80
- changeAdminStatus: (threadID: string, adminIDs: string | string[], adminStatus: boolean, callback?: (err?: Error) => void) => Promise<void>,
81
- changeApprovalMode: (approvalMode: 0 | 1, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
82
- changeArchivedStatus: (threadOrThreads: string | string[], archive: boolean, callback?: (err?: Error) => void) => Promise<void>,
83
- changeBlockedStatus: (userID: string, blocked: boolean, callback?: (err?: Error) => void) => Promise<void>,
84
- changeBlockedStatusMqtt: (userID: string, status: boolean, type: string?, callback?: (err?: Error) => void) => Promise<void>,
85
- changeGroupImage: (image: ReadableStream, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
86
- changeNickname: (nickname: string, threadID: string, pariticipantID: string, callback?: (err?: Error) => void) => Promise<void>,
87
- changeThreadColor: (color: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
88
- changeThreadEmoji: (emoji: string | null, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
89
- createNewGroup: (participantIDs: string[], groupTitle?: string, callback?: (err: Error, threadID: string) => void) => Promise<string>,
90
- createPoll: (title: string, threadID: string, options?: { [item: string]: boolean }, callback?: (err?: Error) => void) => Promise<void>,
91
- createPollMqtt: (title: string, options?: { [item: string]: boolean }, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
92
- deleteMessage: (messageOrMessages: string | string[], callback?: (err?: Error) => void) => Promise<void>,
93
- deleteThread: (threadOrThreads: string | string[], callback?: (err?: Error) => void) => Promise<void>,
94
- editMessage: (text: string, messageID: string, callback?: (err?: Error) => void) => Promise<void>,
95
- forwardAttachment: (attachmentID: string, userOrUsers: string | string[], callback?: (err?: Error) => void) => Promise<void>,
96
- forwardMessage: (messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
97
- getAppState: () => any,
98
- getCurrentUserID: () => string,
99
- getEmojiUrl: (c: string, size: number, pixelRatio: number) => string,
100
- getFriendsList: (callback?: (err: Error | null, friends: IFCAU_Friend[]) => void) => Promise<IFCAU_Friend[]>,
101
- getThreadHistory: (threadID: string, amount: number, time?: number, callback?: (err: Error | null, messages: any[]) => void) => Promise<any[]>,
102
- getThreadInfo: (threadID: string, callback?: (err: Error | null, thread: IFCAU_Thread) => void) => Promise<IFCAU_Thread>,
103
- getThreadList: (limit: number, timestamp: number | null, tags: string[], callback?: (err: Error | null, threads: IFCAU_ThreadList) => void) => Promise<IFCAU_ThreadList>,
104
- getThreadPictures: (threadID: string, offset: number, limit: number, callback?: (err: Error | null, pictures: string[]) => void) => Promise<string[]>,
105
- getUserID: (name: string, callback?: (err: Error | null, obj: IFCAU_UserIDResponse) => void) => Promise<IFCAU_UserIDResponse>,
106
- getUserInfo: (userOrUsers: string | string[], callback?: (err: Error | null, users: { [id: string]: IFCAU_User }) => void) => Promise<{ [id: string]: IFCAU_User }>,
107
- threadColors: {
108
- [color: string]: string
109
- },
110
- handleMessageRequest(threadOrThreads: string | string[], accept: boolean, callback: (err?: Error) => void): Promise<void>;
111
- listen(callback?: (err: Error | null, message: IFCAU_ListenMessage) => void): EventEmitter;
112
- listenMqtt(callback?: (err: Error | null, message: IFCAU_ListenMessage) => void): EventEmitter & { stopListening: (callback?: () => void) => void };
113
- logout: (callback?: (err?: Error) => void) => Promise<void>,
114
- markAsDelivered(threadID: string, messageID: string, callback?: (err?: Error) => void): Promise<void>,
115
- markAsRead(threadID: string, read?: boolean, callback?: (err?: Error) => void): Promise<void>,
116
- markAsReadAll: (callback?: (err?: Error) => void) => Promise<void>,
117
- markAsSeen(seenTimestamp?: number, callback?: (err?: Error) => void): Promise<void>,
118
- muteThread: (threadID: string, muteSeconds: number, callback?: (err?: Error) => void) => Promise<void>,
119
- pinMessage: (pinMode: boolean, messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
120
- removeUserFromGroup: (userID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
121
- resolvePhotoUrl: (photoID: string, callback?: (err: Error | null, url: string) => void) => Promise<string>,
122
- sendMessage: typeof sendMessage,
123
- sendTypingIndicator: (threadID: string, callback?: (err?: Error) => void) => Promise<void>,
124
- sendTypingIndicatorMqtt: (isTyping: boolean, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
125
- setMessageReaction: (reaction: string, messageID: string, callback?: (err?: Error) => void, forceCustomReaction?: boolean) => Promise<void>,
126
- setMessageReactionMqtt: (reaction: string, messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
127
- setOptions: (options: Partial<IFCAU_Options>) => void,
128
- setTitle: (newTitle: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
129
- setTheme: (themeID?: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
130
- unsendMessage: (messageID: string, callback?: (err?: Error) => void) => Promise<void>,
131
- unsendMessageMqtt: (messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>,
132
- }
133
-
134
- export type IFCAU_ListenMessage =
135
- {
136
- type: "message",
137
- attachments: IFCAU_Attachment[],
138
- args: string[],
139
- body: string,
140
- isGroup: boolean,
141
- mentions: { [id: string]: string },
142
- messageID: string,
143
- senderID: string,
144
- threadID: string,
145
- isUnread: boolean,
146
- participantIDs: string[]
147
- } |
148
- {
149
- type: "event",
150
- author: string,
151
- logMessageBody: string,
152
- logMessageData: {
153
- image: {
154
- attachmentID: string,
155
- width: number,
156
- height: number,
157
- url: string
158
- }
159
- },
160
- logMessageType: "log:thread-image",
161
- threadID: string
162
- } |
163
- {
164
- type: "event",
165
- author: string,
166
- logMessageBody: string,
167
- logMessageData: {
168
- addedParticipants: {
169
- fanoutPolicy: string,
170
- firstName: string,
171
- fullName: string,
172
- groupJoinStatus: string,
173
- initialFolder: string,
174
- initialFolderId: {
175
- systemFolderId: string,
176
- },
177
- lastUnsubscribeTimestampMs: string,
178
- userFbId: string,
179
- isMessengerUser: boolean
180
- }[],
181
- },
182
- logMessageType: "log:subscribe",
183
- threadID: string,
184
- participantIDs: string[]
185
- } |
186
- {
187
- type: "event",
188
- author: string,
189
- logMessageBody: string,
190
- logMessageData: { leftParticipantFbId: string },
191
- logMessageType: "log:unsubscribe",
192
- threadID: string,
193
- participantIDs: string[]
194
- } |
195
- {
196
- type: "event",
197
- author: string,
198
- logMessageBody: string,
199
- logMessageData: { name: string },
200
- logMessageType: "log:thread-name",
201
- threadID: string,
202
- participantIDs: string[]
203
- } |
204
- {
205
- type: "event",
206
- author: string,
207
- logMessageBody: string,
208
- logMessageData: {
209
- theme_color: string,
210
- gradient?: string,
211
- should_show_icon: string,
212
- theme_id: string,
213
- accessibility_label: string,
214
- theme_name_with_subtitle: string,
215
- theme_emoji?: string
216
- },
217
- logMessageType: "log:thread-color",
218
- threadID: string,
219
- participantIDs: string[]
220
- } |
221
- {
222
- type: "event",
223
- author: string,
224
- logMessageBody: string,
225
- logMessageData: {
226
- thread_quick_reaction_instruction_key_id: string,
227
- thread_quick_reaction_emoji: string,
228
- thread_quick_reaction_emoji_url: string
229
- },
230
- logMessageType: "log:thread-icon",
231
- threadID: string,
232
- participantIDs: string[]
233
- } |
234
- {
235
- type: "event",
236
- author: string,
237
- logMessageBody: string,
238
- logMessageData: {
239
- nickname: string,
240
- participant_id: string
241
- },
242
- logMessageType: "log:user-nickname",
243
- threadID: string,
244
- participantIDs: string[]
245
- } |
246
- {
247
- type: "event",
248
- author: string,
249
- logMessageBody: string,
250
- logMessageData: {
251
- THREAD_CATEGORY: string,
252
- TARGET_ID: string,
253
- ADMIN_TYPE: string,
254
- ADMIN_EVENT: 'add_admin' | 'remove_admin'
255
- },
256
- logMessageType: "log:thread-admins",
257
- threadID: string,
258
- participantIDs: string[]
259
- } |
260
- {
261
- type: "event",
262
- author: string,
263
- logMessageBody: string,
264
- logMessageData: {
265
- removed_option_ids: string,
266
- question_json: string,
267
- event_type: 'question_creation' | 'update_vote' | 'add_unvoted_option' | 'multiple_updates',
268
- added_option_ids: string,
269
- new_option_texts: string,
270
- new_option_ids: string,
271
- question_id: string,
272
- },
273
- logMessageType: "log:thread-poll",
274
- threadID: string,
275
- participantIDs: string[]
276
- } |
277
- {
278
- type: "event",
279
- author: string,
280
- logMessageBody: string,
281
- logMessageData: { APPROVAL_MODE: '0' | '1', THREAD_CATEGORY: string },
282
- logMessageType: "log:thread-approval-mode",
283
- threadID: string,
284
- participantIDs: string[]
285
- } |
286
- {
287
- type: "event",
288
- author: string,
289
- logMessageBody: string,
290
- logMessageData: any,
291
- logMessageType: "log:thread-call",
292
- threadID: string,
293
- participantIDs: string[]
294
- } |
295
- {
296
- type: "typ",
297
- from: string,
298
- fromMobile: boolean,
299
- isTyping: boolean,
300
- threadID: string
301
- } |
302
- {
303
- type: "read",
304
- threadID: string,
305
- time: number,
306
- } |
307
- {
308
- type: "read_receipt",
309
- reader: string,
310
- threadID: string,
311
- time: number
312
- } | {
313
- type: "message_reaction",
314
- threadID: string,
315
- messageID: string,
316
- reaction: string,
317
- senderID: string,
318
- userID: string,
319
- reactionTimestamp: number
320
- } | {
321
- type: "presence",
322
- statuses: number,
323
- timestamp: number,
324
- userID: string
325
- } | {
326
- type: "message_unsend",
327
- threadID: string,
328
- senderID: string,
329
- messageID: string,
330
- deletionnTimestamp: number
331
- } | {
332
- type: "message_reply"
333
- attachments: IFCAU_Attachment[],
334
- args: string[],
335
- body: string,
336
- isGroup: boolean,
337
- mentions: { [id: string]: string },
338
- messageID: string,
339
- senderID: string,
340
- threadID: string,
341
- isUnread: boolean,
342
- participantIDs: string[],
343
- messageReply: {
344
- attachments: IFCAU_Attachment[],
345
- body: string,
346
- isGroup: boolean,
347
- mentions: { [id: string]: string },
348
- messageID: string,
349
- senderID: string,
350
- threadID: string,
351
- isUnread: boolean
352
- }
353
- };
354
-
355
- export type IFCAU_Attachment =
356
- {
357
- type: "sticker",
358
- ID: string,
359
- url: string,
360
- packID: string,
361
- spriteUrl: string,
362
- spriteUrl2x: string,
363
- width: number,
364
- height: number,
365
- caption: string,
366
- description: string,
367
- frameCount: number,
368
- frameRate: number,
369
- framesPerRow: number,
370
- framesPerCol: number
371
- } |
372
- {
373
- type: "file",
374
- ID: string,
375
- filename: string,
376
- url: string,
377
- isMalicious: boolean,
378
- contentType: string
379
- } |
380
- {
381
- type: "photo",
382
- ID: string,
383
- filename: string,
384
- thumbnailUrl: string,
385
- previewUrl: string,
386
- previewWidth: number,
387
- previewHeight: number,
388
- largePreviewUrl: string,
389
- largePreviewWidth: number,
390
- largePreviewHeight: number,
391
- url: string,
392
- width: number,
393
- height: number
394
- } |
395
- {
396
- type: "animated_image",
397
- ID: string,
398
- filename: string,
399
- previewUrl: string,
400
- previewWidth: number,
401
- previewHeight: number,
402
- url: string,
403
- width: number,
404
- height: number
405
- } |
406
- {
407
- type: "video",
408
- ID: string,
409
- filename: string,
410
- previewUrl: string,
411
- previewWidth: number,
412
- previewHeight: number,
413
- url: string,
414
- width: number,
415
- height: number
416
- duration: number,
417
- videoType: string
418
- } |
419
- {
420
- type: "audio",
421
- ID: string,
422
- filename: string,
423
- audioType: string,
424
- duration: number,
425
- url: string,
426
- isVoiceMail: boolean
427
- } |
428
- {
429
- type: "location",
430
- ID: string,
431
- latitude: number,
432
- longitude: number,
433
- image: string,
434
- width: number,
435
- height: number,
436
- url: string,
437
- address: string
438
- } |
439
- {
440
- type: "share",
441
- ID: string,
442
- url: string,
443
- title: string,
444
- description: string,
445
- source: string,
446
- image: string,
447
- width: number,
448
- height: number,
449
- playable: boolean,
450
- duration: number,
451
- playableUrl: string,
452
- subattachments: any,
453
- properties: any
454
- }
455
-
456
- export type IFCAU_User = {
457
- name: string,
458
- firstName?: string,
459
- vanity?: string,
460
- thumbSrc: string,
461
- profileUrl: string | null,
462
- gender?: number,
463
- type: string,
464
- isFriend?: boolean,
465
- isBirthday: boolean,
466
- searchToken: any,
467
- alternateName?: string
468
- }
469
-
470
- export type IFCAU_UserIDResponse = {
471
- userID: string,
472
- photoUrl: string,
473
- indexRank: number,
474
- name: string,
475
- isVerified: boolean,
476
- profileUrl: string,
477
- category: string,
478
- score: number,
479
- type: string
480
- }[];
481
-
482
- export type IFCAU_Options = {
483
- pauseLog: boolean,
484
- logLevel: "silly" | "verbose" | "info" | "http" | "warn" | "error" | "silent",
485
- selfListen: boolean,
486
- listenEvents: boolean,
487
- pageID: string,
488
- updatePresence: boolean,
489
- forceLogin: boolean,
490
- userAgent: string,
491
- autoMarkDelivery: boolean,
492
- autoMarkRead: boolean,
493
- proxy: string,
494
- online: boolean
495
- }
496
-
497
- export type IFCAU_Friend = {
498
- alternativeName: string,
499
- firstName: string,
500
- gender: string,
501
- userID: string,
502
- isFriend: boolean,
503
- fullName: string,
504
- profilePicture: string,
505
- type: string,
506
- profileUrl: string,
507
- vanity: string,
508
- isBirthday: boolean
509
- }
510
-
511
- export type IFCAU_Thread = {
512
- threadID: string,
513
- participantIDs: string[],
514
- threadName: string,
515
- userInfo: (IFCAU_User & { id: string })[],
516
- nicknames: { [id: string]: string } | null,
517
- unreadCount: number,
518
- messageCount: number,
519
- imageSrc: string,
520
- timestamp: number,
521
- muteUntil: number | null,
522
- isGroup: boolean,
523
- isSubscribed: boolean,
524
- folder: 'INBOX' | 'ARCHIVE' | string,
525
- isArchived: boolean,
526
- cannotReplyReason: string | null,
527
- lastReadTimestamp: number,
528
- emoji: string | null,
529
- color: string | null,
530
- adminIDs: string[],
531
- approvalMode: boolean,
532
- approvalQueue: { inviterID: string, requesterID: string, timestamp: string }[]
533
- }
534
-
535
- export type IFCAU_ThreadList = {
536
- threadID: string,
537
- name: string,
538
- unreadCount: number,
539
- messageCount: number,
540
- imageSrc: string,
541
- emoji: string | null,
542
- color: string | null,
543
- nicknames: { userid: string, nickname: string }[],
544
- muteUntil: number | null,
545
- participants: IFCAU_ThreadList_Participants[],
546
- adminIDs: string[],
547
- folder: "INBOX" | "ARCHIVED" | "PENNDING" | "OTHER" | string,
548
- isGroup: boolean,
549
- customizationEnabled: boolean,
550
- participantAddMode: string,
551
- reactionMuteMode: string,
552
- isArchived: boolean,
553
- isSubscribed: boolean,
554
- timestamp: number,
555
- snippet: string,
556
- snippetAttachments: string
557
- snippetSender: string,
558
- lastMessageTimestamp: number,
559
- listReadTimestamp: number | null,
560
- cannotReplyReason: string | null,
561
- approvalMode: string
562
- }[]
563
-
564
- export type IFCAU_ThreadList_Participants =
565
- {
566
- accountType: "User",
567
- userID: string,
568
- name: string,
569
- shortName: string,
570
- gender: string,
571
- url: string,
572
- profilePicture: string,
573
- username: string | null,
574
- isViewerFriend: boolean,
575
- isMessengerUser: boolean,
576
- isVerified: boolean,
577
- isMessageBlockedByViewer: boolean,
578
- isViewerCoworker: boolean
579
- } |
580
- {
581
- accountType: "Page",
582
- userID: string,
583
- name: string,
584
- url: string,
585
- profilePicture: string,
586
- username: string | null,
587
- acceptMessengerUserFeedback: boolean,
588
- isMessengerUser: boolean,
589
- isVerified: boolean,
590
- isMessengerPlatformBot: boolean,
591
- isMessageBlockedByViewer: boolean,
592
- } |
593
- {
594
- accountType: "ReducedMessagingActor",
595
- userID: string,
596
- name: string,
597
- url: string,
598
- profilePicture: string,
599
- username: string | null,
600
- acceptMessengerUserFeedback: boolean,
601
- isMessageBlockedByViewer: boolean
602
- } |
603
- {
604
- accountType: "UnavailableMessagingActor",
605
- userID: string,
606
- name: string,
607
- url: null,
608
- profilePicture: string,
609
- username: null,
610
- acceptMessengerUserFeedback: boolean,
611
- isMessageBlockedByViewer: boolean
612
- } |
613
- {
614
- accountType: string,
615
- userID: string,
616
- name: string
617
- };
618
- }
package/module/config.js DELETED
@@ -1,34 +0,0 @@
1
- const fs = require("fs");
2
- const path = require("path");
3
- const logger = require("../func/logger");
4
- const defaultConfig = {
5
- autoUpdate: true,
6
- mqtt: { enabled: true, reconnectInterval: 3600 },
7
- autoLogin: true,
8
- credentials: { email: "", password: "", twofactor: "" }
9
- };
10
-
11
- function loadConfig() {
12
- const configPath = path.join(process.cwd(), "fca-config.json");
13
- let config;
14
- if (!fs.existsSync(configPath)) {
15
- try {
16
- fs.writeFileSync(configPath, JSON.stringify(defaultConfig, null, 2));
17
- config = defaultConfig;
18
- } catch (err) {
19
- logger(`Error writing config file: ${err.message}`, "error");
20
- config = defaultConfig;
21
- }
22
- } else {
23
- try {
24
- const fileContent = fs.readFileSync(configPath, "utf8");
25
- config = Object.assign({}, defaultConfig, JSON.parse(fileContent));
26
- } catch (err) {
27
- logger(`Error reading config file: ${err.message}`, "error");
28
- config = defaultConfig;
29
- }
30
- }
31
- return { config, configPath };
32
- }
33
-
34
- module.exports = { loadConfig, defaultConfig };
package/module/login.js DELETED
@@ -1,47 +0,0 @@
1
- "use strict";
2
- const { getType } = require("../src/utils/format");
3
- const { setOptions } = require("./options");
4
- const { loadConfig } = require("./config");
5
- const { config } = loadConfig();
6
- if (config.autoUpdate) require("../func/checkUpdate").checkAndUpdateVersion(() => {});
7
- global.fca = { config };
8
- const loginHelper = require("./loginHelper");
9
-
10
- function login(loginData, options, callback) {
11
- if (getType(options) === "Function" || getType(options) === "AsyncFunction") {
12
- callback = options;
13
- options = {};
14
- }
15
- const globalOptions = {
16
- selfListen: false,
17
- selfListenEvent: false,
18
- listenEvents: false,
19
- listenTyping: false,
20
- updatePresence: false,
21
- forceLogin: false,
22
- autoMarkDelivery: true,
23
- autoMarkRead: false,
24
- autoReconnect: true,
25
- online: true,
26
- emitReady: false,
27
- userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
28
- };
29
- setOptions(globalOptions, options);
30
- let prCallback = null;
31
- if (getType(callback) !== "Function" && getType(callback) !== "AsyncFunction") {
32
- let rejectFunc = null;
33
- let resolveFunc = null;
34
- var returnPromise = new Promise(function (resolve, reject) {
35
- resolveFunc = resolve;
36
- rejectFunc = reject;
37
- });
38
- prCallback = function (error, api) {
39
- if (error) return rejectFunc(error);
40
- return resolveFunc(api);
41
- };
42
- callback = prCallback;
43
- }
44
- loginHelper(loginData.appState, loginData.Cookie,loginData.email, loginData.password, globalOptions, callback, prCallback);
45
- return returnPromise;
46
- }
47
- module.exports = login;