@jkt48connect-corp/baileys 7.2.7 → 7.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +838 -94
  3. package/WAProto/WAProto.proto +969 -88
  4. package/WAProto/index.js +124901 -74525
  5. package/lib/Defaults/baileys-version.json +1 -1
  6. package/lib/Defaults/index.js +5 -3
  7. package/lib/Defaults/phonenumber-mcc.json +221 -221
  8. package/lib/Signal/libsignal.js +18 -9
  9. package/lib/Socket/groups.js +1 -1
  10. package/lib/Socket/messages-recv.js +310 -151
  11. package/lib/Socket/messages-send.js +269 -36
  12. package/lib/Socket/newsletter.js +3 -3
  13. package/lib/Socket/registration.js +7 -7
  14. package/lib/Socket/socket.js +7 -3
  15. package/lib/Store/make-in-memory-store.js +13 -11
  16. package/lib/Types/Label.js +1 -1
  17. package/lib/Types/LabelAssociation.js +1 -1
  18. package/lib/Types/Newsletter.js +3 -3
  19. package/lib/Types/index.js +1 -1
  20. package/lib/Utils/auth-utils.js +3 -3
  21. package/lib/Utils/business.js +2 -2
  22. package/lib/Utils/chat-utils.js +41 -20
  23. package/lib/Utils/crypto.js +35 -23
  24. package/lib/Utils/decode-wa-message.js +43 -15
  25. package/lib/Utils/generics.js +32 -16
  26. package/lib/Utils/history.js +3 -0
  27. package/lib/Utils/index.js +0 -1
  28. package/lib/Utils/messages-media.js +38 -47
  29. package/lib/Utils/messages.js +430 -12
  30. package/lib/Utils/process-message.js +2 -2
  31. package/lib/Utils/use-multi-file-auth-state.js +17 -3
  32. package/lib/Utils/validate-connection.js +12 -23
  33. package/lib/WABinary/decode.js +17 -7
  34. package/lib/WABinary/encode.js +33 -17
  35. package/lib/WABinary/generic-utils.js +2 -2
  36. package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
  37. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
  38. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
  39. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
  40. package/lib/WAUSync/Protocols/index.js +20 -0
  41. package/lib/WAUSync/USyncQuery.js +79 -0
  42. package/lib/WAUSync/USyncUser.js +22 -0
  43. package/lib/WAUSync/index.js +19 -0
  44. package/lib/index.js +4 -1
  45. package/package.json +15 -10
  46. package/WAProto/index.d.ts +0 -37016
  47. package/lib/Defaults/index.d.ts +0 -283
  48. package/lib/Signal/libsignal.d.ts +0 -3
  49. package/lib/Socket/Client/abstract-socket-client.d.ts +0 -17
  50. package/lib/Socket/Client/index.d.ts +0 -3
  51. package/lib/Socket/Client/mobile-socket-client.d.ts +0 -13
  52. package/lib/Socket/Client/web-socket-client.d.ts +0 -12
  53. package/lib/Socket/business.d.ts +0 -170
  54. package/lib/Socket/chats.d.ts +0 -80
  55. package/lib/Socket/community.d.ts +0 -219
  56. package/lib/Socket/community.js +0 -354
  57. package/lib/Socket/groups.d.ts +0 -114
  58. package/lib/Socket/index.d.ts +0 -172
  59. package/lib/Socket/messages-recv.d.ts +0 -158
  60. package/lib/Socket/messages-send.d.ts +0 -147
  61. package/lib/Socket/newsletter.d.ts +0 -133
  62. package/lib/Socket/registration.d.ts +0 -267
  63. package/lib/Socket/socket.d.ts +0 -43
  64. package/lib/Store/index.d.ts +0 -3
  65. package/lib/Store/make-cache-manager-store.d.ts +0 -13
  66. package/lib/Store/make-in-memory-store.d.ts +0 -118
  67. package/lib/Store/make-ordered-dictionary.d.ts +0 -13
  68. package/lib/Store/object-repository.d.ts +0 -10
  69. package/lib/Types/Auth.d.ts +0 -110
  70. package/lib/Types/Call.d.ts +0 -13
  71. package/lib/Types/Chat.d.ts +0 -102
  72. package/lib/Types/Contact.d.ts +0 -19
  73. package/lib/Types/Events.d.ts +0 -157
  74. package/lib/Types/GroupMetadata.d.ts +0 -54
  75. package/lib/Types/Label.d.ts +0 -35
  76. package/lib/Types/LabelAssociation.d.ts +0 -29
  77. package/lib/Types/Message.d.ts +0 -273
  78. package/lib/Types/Newsletter.d.ts +0 -92
  79. package/lib/Types/Product.d.ts +0 -78
  80. package/lib/Types/Signal.d.ts +0 -57
  81. package/lib/Types/Socket.d.ts +0 -111
  82. package/lib/Types/State.d.ts +0 -27
  83. package/lib/Types/index.d.ts +0 -57
  84. package/lib/Utils/auth-utils.d.ts +0 -18
  85. package/lib/Utils/baileys-event-stream.d.ts +0 -16
  86. package/lib/Utils/business.d.ts +0 -22
  87. package/lib/Utils/chat-utils.d.ts +0 -71
  88. package/lib/Utils/crypto.d.ts +0 -41
  89. package/lib/Utils/decode-wa-message.d.ts +0 -19
  90. package/lib/Utils/event-buffer.d.ts +0 -35
  91. package/lib/Utils/generics.d.ts +0 -97
  92. package/lib/Utils/history.d.ts +0 -15
  93. package/lib/Utils/index.d.ts +0 -18
  94. package/lib/Utils/link-preview.d.ts +0 -21
  95. package/lib/Utils/logger.d.ts +0 -4
  96. package/lib/Utils/lt-hash.d.ts +0 -12
  97. package/lib/Utils/make-mutex.d.ts +0 -7
  98. package/lib/Utils/messages-media.d.ts +0 -116
  99. package/lib/Utils/messages.d.ts +0 -77
  100. package/lib/Utils/noise-handler.d.ts +0 -21
  101. package/lib/Utils/process-message.d.ts +0 -41
  102. package/lib/Utils/signal.d.ts +0 -32
  103. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -12
  104. package/lib/Utils/use-single-file-auth-statev2.d.ts +0 -12
  105. package/lib/Utils/use-single-file-auth-statev2.js +0 -75
  106. package/lib/Utils/validate-connection.d.ts +0 -11
  107. package/lib/WABinary/constants.d.ts +0 -27
  108. package/lib/WABinary/decode.d.ts +0 -7
  109. package/lib/WABinary/encode.d.ts +0 -3
  110. package/lib/WABinary/generic-utils.d.ts +0 -15
  111. package/lib/WABinary/index.d.ts +0 -5
  112. package/lib/WABinary/jid-utils.d.ts +0 -31
  113. package/lib/WABinary/types.d.ts +0 -18
  114. package/lib/WAM/BinaryInfo.d.ts +0 -17
  115. package/lib/WAM/constants.d.ts +0 -38
  116. package/lib/WAM/encode.d.ts +0 -3
  117. package/lib/WAM/index.d.ts +0 -3
  118. package/lib/index.d.ts +0 -11
@@ -1,114 +0,0 @@
1
- /// <reference types="node" />
2
- import { proto } from '../../WAProto';
3
- import { GroupMetadata, ParticipantAction, SocketConfig } from '../Types';
4
- import { BinaryNode } from '../WABinary';
5
- export declare const makeGroupsSocket: (config: SocketConfig) => {
6
- groupMetadata: (jid: string) => Promise<GroupMetadata>;
7
- groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
8
- groupLeave: (id: string) => Promise<void>;
9
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
10
- groupRequestParticipantsList: (jid: string) => Promise<{
11
- [key: string]: string;
12
- }[]>;
13
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: 'approve' | 'reject') => Promise<{
14
- status: string;
15
- jid: string;
16
- }[]>;
17
- groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
18
- status: string;
19
- jid: string;
20
- content: BinaryNode;
21
- }[]>;
22
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
23
- groupInviteCode: (jid: string) => Promise<string | undefined>;
24
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
25
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
26
- /**
27
- * accept a GroupInviteMessage
28
- * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
29
- * @param inviteMessage the message to accept
30
- */
31
- groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
32
- groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
33
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
34
- groupSettingUpdate: (jid: string, setting: 'announcement' | 'not_announcement' | 'locked' | 'unlocked') => Promise<void>;
35
- groupMemberAddMode: (jid: string, mode: 'admin_add' | 'all_member_add') => Promise<void>;
36
- groupJoinApprovalMode: (jid: string, mode: 'on' | 'off') => Promise<void>;
37
- groupFetchAllParticipating: () => Promise<{
38
- [_: string]: GroupMetadata;
39
- }>;
40
- processingMutex: {
41
- mutex<T>(code: () => T | Promise<T>): Promise<T>;
42
- };
43
- fetchPrivacySettings: (force?: boolean) => Promise<{
44
- [_: string]: string;
45
- }>;
46
- upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>;
47
- appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
48
- sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>;
49
- presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>;
50
- profilePictureUrl: (jid: string, type?: "image" | "preview", timeoutMs?: number | undefined) => Promise<string | undefined>;
51
- onWhatsApp: (...jids: string[]) => Promise<{
52
- exists: boolean;
53
- jid: string;
54
- }[]>;
55
- fetchBlocklist: () => Promise<string[]>;
56
- fetchStatus: (jid: string) => Promise<{
57
- status: string | undefined;
58
- setAt: Date;
59
- } | undefined>;
60
- updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
61
- removeProfilePicture: (jid: string) => Promise<void>;
62
- updateProfileStatus: (status: string) => Promise<void>;
63
- updateProfileName: (name: string) => Promise<void>;
64
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
65
- updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
66
- updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
67
- updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
68
- updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
69
- updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
70
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
71
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
72
- getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
73
- resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
74
- chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
75
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
76
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
77
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
78
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
79
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
80
- star: (jid: string, messages: {
81
- id: string;
82
- fromMe?: boolean | undefined;
83
- }[], star: boolean) => Promise<void>;
84
- type: "md";
85
- ws: any;
86
- ev: import("../Types").BaileysEventEmitter & {
87
- process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
88
- buffer(): void;
89
- createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>;
90
- flush(force?: boolean | undefined): boolean;
91
- isBuffering(): boolean;
92
- };
93
- authState: {
94
- creds: import("../Types").AuthenticationCreds;
95
- keys: import("../Types").SignalKeyStoreWithTransaction;
96
- };
97
- signalRepository: import("../Types").SignalRepository;
98
- user: import("../Types").Contact | undefined;
99
- generateMessageTag: () => string;
100
- query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>;
101
- waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
102
- waitForSocketOpen: () => Promise<void>;
103
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
104
- sendNode: (frame: BinaryNode) => Promise<void>;
105
- logout: (msg?: string | undefined) => Promise<void>;
106
- end: (error: Error | undefined) => void;
107
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void;
108
- uploadPreKeys: (count?: number) => Promise<void>;
109
- uploadPreKeysToServerIfRequired: () => Promise<void>;
110
- requestPairingCode: (phoneNumber: string) => Promise<string>;
111
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
112
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>;
113
- };
114
- export declare const extractGroupMetadata: (result: BinaryNode) => GroupMetadata;
@@ -1,172 +0,0 @@
1
- /// <reference types="node" />
2
- import { UserFacingSocketConfig } from '../Types';
3
- declare const makeWASocket: (config: UserFacingSocketConfig) => {
4
- register: (code: string) => Promise<import("./registration").ExistsResponse>;
5
- requestRegistrationCode: (registrationOptions?: import("./registration").RegistrationOptions | undefined) => Promise<import("./registration").ExistsResponse>;
6
- logger: import("pino").Logger<import("pino").LoggerOptions>;
7
- getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>;
8
- getCatalog: ({ jid, limit, cursor }: import("../Types").GetCatalogOptions) => Promise<{
9
- products: import("../Types").Product[];
10
- nextPageCursor: string | undefined;
11
- }>;
12
- getCollections: (jid?: string | undefined, limit?: number) => Promise<{
13
- collections: import("../Types").CatalogCollection[];
14
- }>;
15
- productCreate: (create: import("../Types").ProductCreate) => Promise<import("../Types").Product>;
16
- productDelete: (productIds: string[]) => Promise<{
17
- deleted: number;
18
- }>;
19
- productUpdate: (productId: string, update: import("../Types").ProductUpdate) => Promise<import("../Types").Product>;
20
- sendMessageAck: ({ tag, attrs, content }: import("../index").BinaryNode) => Promise<void>;
21
- sendRetryRequest: (node: import("../index").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
22
- offerCall: (toJid: string, isVideo?: boolean) => Promise<{
23
- id: string;
24
- to: string;
25
- }>;
26
- rejectCall: (callId: string, callFrom: string) => Promise<void>;
27
- getPrivacyTokens: (jids: string[]) => Promise<import("../index").BinaryNode>;
28
- assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
29
- relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>;
30
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>;
31
- sendReceipts: (keys: import("../Types").WAProto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>;
32
- getButtonArgs: (message: import("../Types").WAProto.IMessage) => {
33
- [key: string]: string;
34
- };
35
- readMessages: (keys: import("../Types").WAProto.IMessageKey[]) => Promise<void>;
36
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
37
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../index").JidWithDevice[]>;
38
- createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
39
- [key: string]: string;
40
- } | undefined) => Promise<{
41
- nodes: import("../index").BinaryNode[];
42
- shouldIncludeDeviceIdentity: boolean;
43
- }>;
44
- waUploadToServer: import("../Types").WAMediaUploadFunction;
45
- fetchPrivacySettings: (force?: boolean) => Promise<{
46
- [_: string]: string;
47
- }>;
48
- updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>;
49
- sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>;
50
- subscribeNewsletterUpdates: (jid: string) => Promise<{
51
- duration: string;
52
- }>;
53
- newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>;
54
- newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
55
- newsletterUpdateName: (jid: string, name: string) => Promise<void>;
56
- newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
57
- newsletterRemovePicture: (jid: string) => Promise<void>;
58
- newsletterUnfollow: (jid: string) => Promise<void>;
59
- newsletterFollow: (jid: string) => Promise<void>;
60
- newsletterUnmute: (jid: string) => Promise<void>;
61
- newsletterMute: (jid: string) => Promise<void>;
62
- newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
63
- newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
64
- newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
65
- newsletterAdminCount: (jid: string) => Promise<number>;
66
- newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
67
- newsletterDemote: (jid: string, user: string) => Promise<void>;
68
- newsletterDelete: (jid: string) => Promise<void>;
69
- newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
70
- newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
71
- newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
72
- groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
73
- groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
74
- groupLeave: (id: string) => Promise<void>;
75
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
76
- groupRequestParticipantsList: (jid: string) => Promise<{
77
- [key: string]: string;
78
- }[]>;
79
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
80
- status: string;
81
- jid: string;
82
- }[]>;
83
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
84
- status: string;
85
- jid: string;
86
- content: import("../index").BinaryNode;
87
- }[]>;
88
- groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
89
- groupInviteCode: (jid: string) => Promise<string | undefined>;
90
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
91
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
92
- groupAcceptInviteV4: (key: string | import("../Types").WAProto.IMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>;
93
- groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
94
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
95
- groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
96
- groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>;
97
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
98
- groupFetchAllParticipating: () => Promise<{
99
- [_: string]: import("../Types").GroupMetadata;
100
- }>;
101
- processingMutex: {
102
- mutex<T>(code: () => T | Promise<T>): Promise<T>;
103
- };
104
- upsertMessage: (msg: import("../Types").WAProto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>;
105
- appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
106
- sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>;
107
- presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>;
108
- profilePictureUrl: (jid: string, type?: "image" | "preview", timeoutMs?: number | undefined) => Promise<string | undefined>;
109
- onWhatsApp: (...jids: string[]) => Promise<{
110
- exists: boolean;
111
- jid: string;
112
- }[]>;
113
- fetchBlocklist: () => Promise<string[]>;
114
- fetchStatus: (jid: string) => Promise<{
115
- status: string | undefined;
116
- setAt: Date;
117
- } | undefined>;
118
- updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
119
- removeProfilePicture: (jid: string) => Promise<void>;
120
- updateProfileStatus: (status: string) => Promise<void>;
121
- updateProfileName: (name: string) => Promise<void>;
122
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
123
- updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
124
- updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
125
- updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
126
- updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
127
- updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
128
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
129
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
130
- getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
131
- resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
132
- chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
133
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
134
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
135
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
136
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
137
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
138
- star: (jid: string, messages: {
139
- id: string;
140
- fromMe?: boolean | undefined;
141
- }[], star: boolean) => Promise<void>;
142
- type: "md";
143
- ws: any;
144
- ev: import("../Types").BaileysEventEmitter & {
145
- process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
146
- buffer(): void;
147
- createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>;
148
- flush(force?: boolean | undefined): boolean;
149
- isBuffering(): boolean;
150
- };
151
- authState: {
152
- creds: import("../Types").AuthenticationCreds;
153
- keys: import("../Types").SignalKeyStoreWithTransaction;
154
- };
155
- signalRepository: import("../Types").SignalRepository;
156
- user: import("../Types").Contact | undefined;
157
- generateMessageTag: () => string;
158
- query: (node: import("../index").BinaryNode, timeoutMs?: number | undefined) => Promise<import("../index").BinaryNode>;
159
- waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
160
- waitForSocketOpen: () => Promise<void>;
161
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
162
- sendNode: (frame: import("../index").BinaryNode) => Promise<void>;
163
- logout: (msg?: string | undefined) => Promise<void>;
164
- end: (error: Error | undefined) => void;
165
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void;
166
- uploadPreKeys: (count?: number) => Promise<void>;
167
- uploadPreKeysToServerIfRequired: () => Promise<void>;
168
- requestPairingCode: (phoneNumber: string) => Promise<string>;
169
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
170
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<import("../index").BinaryNode>;
171
- };
172
- export default makeWASocket;
@@ -1,158 +0,0 @@
1
- /// <reference types="node" />
2
- import { Boom } from '@hapi/boom';
3
- import { proto } from '../../WAProto';
4
- import { MessageReceiptType, MessageRelayOptions, SocketConfig } from '../Types';
5
- import { BinaryNode } from '../WABinary';
6
- export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
7
- sendMessageAck: ({ tag, attrs, content }: BinaryNode) => Promise<void>;
8
- sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
9
- offerCall: (toJid: string, isVideo?: boolean) => Promise<{
10
- id: string;
11
- to: string;
12
- }>;
13
- rejectCall: (callId: string, callFrom: string) => Promise<void>;
14
- getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
15
- assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
16
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
17
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
18
- sendReceipts: (keys: proto.IMessageKey[], type: MessageReceiptType) => Promise<void>;
19
- getButtonArgs: (message: proto.IMessage) => {
20
- [key: string]: string;
21
- };
22
- readMessages: (keys: proto.IMessageKey[]) => Promise<void>;
23
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
24
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>;
25
- createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: {
26
- [key: string]: string;
27
- } | undefined) => Promise<{
28
- nodes: BinaryNode[];
29
- shouldIncludeDeviceIdentity: boolean;
30
- }>;
31
- waUploadToServer: import("../Types").WAMediaUploadFunction;
32
- fetchPrivacySettings: (force?: boolean) => Promise<{
33
- [_: string]: string;
34
- }>;
35
- updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
36
- sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
37
- subscribeNewsletterUpdates: (jid: string) => Promise<{
38
- duration: string;
39
- }>;
40
- newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>;
41
- newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
42
- newsletterUpdateName: (jid: string, name: string) => Promise<void>;
43
- newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
44
- newsletterRemovePicture: (jid: string) => Promise<void>;
45
- newsletterUnfollow: (jid: string) => Promise<void>;
46
- newsletterFollow: (jid: string) => Promise<void>;
47
- newsletterUnmute: (jid: string) => Promise<void>;
48
- newsletterMute: (jid: string) => Promise<void>;
49
- newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
50
- newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
51
- newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
52
- newsletterAdminCount: (jid: string) => Promise<number>;
53
- newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
54
- newsletterDemote: (jid: string, user: string) => Promise<void>;
55
- newsletterDelete: (jid: string) => Promise<void>;
56
- newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
57
- newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
58
- newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
59
- groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
60
- groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
61
- groupLeave: (id: string) => Promise<void>;
62
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
63
- groupRequestParticipantsList: (jid: string) => Promise<{
64
- [key: string]: string;
65
- }[]>;
66
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
67
- status: string;
68
- jid: string;
69
- }[]>;
70
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
71
- status: string;
72
- jid: string;
73
- content: BinaryNode;
74
- }[]>;
75
- groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
76
- groupInviteCode: (jid: string) => Promise<string | undefined>;
77
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
78
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
79
- groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
80
- groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
81
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
82
- groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
83
- groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>;
84
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
85
- groupFetchAllParticipating: () => Promise<{
86
- [_: string]: import("../Types").GroupMetadata;
87
- }>;
88
- processingMutex: {
89
- mutex<T>(code: () => T | Promise<T>): Promise<T>;
90
- };
91
- upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>;
92
- appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
93
- sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>;
94
- presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>;
95
- profilePictureUrl: (jid: string, type?: "image" | "preview", timeoutMs?: number | undefined) => Promise<string | undefined>;
96
- onWhatsApp: (...jids: string[]) => Promise<{
97
- exists: boolean;
98
- jid: string;
99
- }[]>;
100
- fetchBlocklist: () => Promise<string[]>;
101
- fetchStatus: (jid: string) => Promise<{
102
- status: string | undefined;
103
- setAt: Date;
104
- } | undefined>;
105
- updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
106
- removeProfilePicture: (jid: string) => Promise<void>;
107
- updateProfileStatus: (status: string) => Promise<void>;
108
- updateProfileName: (name: string) => Promise<void>;
109
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
110
- updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
111
- updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
112
- updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
113
- updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
114
- updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
115
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
116
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
117
- getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
118
- resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
119
- chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
120
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
121
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
122
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
123
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
124
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
125
- star: (jid: string, messages: {
126
- id: string;
127
- fromMe?: boolean | undefined;
128
- }[], star: boolean) => Promise<void>;
129
- type: "md";
130
- ws: any;
131
- ev: import("../Types").BaileysEventEmitter & {
132
- process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
133
- buffer(): void;
134
- createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>;
135
- flush(force?: boolean | undefined): boolean;
136
- isBuffering(): boolean;
137
- };
138
- authState: {
139
- creds: import("../Types").AuthenticationCreds;
140
- keys: import("../Types").SignalKeyStoreWithTransaction;
141
- };
142
- signalRepository: import("../Types").SignalRepository;
143
- user: import("../Types").Contact | undefined;
144
- generateMessageTag: () => string;
145
- query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>;
146
- waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
147
- waitForSocketOpen: () => Promise<void>;
148
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
149
- sendNode: (frame: BinaryNode) => Promise<void>;
150
- logout: (msg?: string | undefined) => Promise<void>;
151
- end: (error: Error | undefined) => void;
152
- onUnexpectedError: (err: Error | Boom<any>, msg: string) => void;
153
- uploadPreKeys: (count?: number) => Promise<void>;
154
- uploadPreKeysToServerIfRequired: () => Promise<void>;
155
- requestPairingCode: (phoneNumber: string) => Promise<string>;
156
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
157
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>;
158
- };
@@ -1,147 +0,0 @@
1
- /// <reference types="node" />
2
- import { Boom } from '@hapi/boom';
3
- import { proto } from '../../WAProto';
4
- import { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types';
5
- import { BinaryNode, JidWithDevice } from '../WABinary';
6
- export declare const makeMessagesSocket: (config: SocketConfig) => {
7
- getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
8
- assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
9
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
10
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
11
- sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
12
- getButtonArgs: (message: proto.IMessage) => BinaryNode['attrs'];
13
- readMessages: (keys: WAMessageKey[]) => Promise<void>;
14
- refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
15
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<JidWithDevice[]>;
16
- createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode['attrs']) => Promise<{
17
- nodes: BinaryNode[];
18
- shouldIncludeDeviceIdentity: boolean;
19
- }>;
20
- waUploadToServer: import("../Types").WAMediaUploadFunction;
21
- fetchPrivacySettings: (force?: boolean) => Promise<{
22
- [_: string]: string;
23
- }>;
24
- updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
25
- sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
26
- subscribeNewsletterUpdates: (jid: string) => Promise<{
27
- duration: string;
28
- }>;
29
- newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>;
30
- newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
31
- newsletterUpdateName: (jid: string, name: string) => Promise<void>;
32
- newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
33
- newsletterRemovePicture: (jid: string) => Promise<void>;
34
- newsletterUnfollow: (jid: string) => Promise<void>;
35
- newsletterFollow: (jid: string) => Promise<void>;
36
- newsletterUnmute: (jid: string) => Promise<void>;
37
- newsletterMute: (jid: string) => Promise<void>;
38
- newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
39
- newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
40
- newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
41
- newsletterAdminCount: (jid: string) => Promise<number>;
42
- newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
43
- newsletterDemote: (jid: string, user: string) => Promise<void>;
44
- newsletterDelete: (jid: string) => Promise<void>;
45
- newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
46
- newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
47
- newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
48
- groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
49
- groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
50
- groupLeave: (id: string) => Promise<void>;
51
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
52
- groupRequestParticipantsList: (jid: string) => Promise<{
53
- [key: string]: string;
54
- }[]>;
55
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
56
- status: string;
57
- jid: string;
58
- }[]>;
59
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
60
- status: string;
61
- jid: string;
62
- content: BinaryNode;
63
- }[]>;
64
- groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
65
- groupInviteCode: (jid: string) => Promise<string | undefined>;
66
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
67
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
68
- groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
69
- groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
70
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
71
- groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
72
- groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>;
73
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
74
- groupFetchAllParticipating: () => Promise<{
75
- [_: string]: import("../Types").GroupMetadata;
76
- }>;
77
- processingMutex: {
78
- mutex<T>(code: () => T | Promise<T>): Promise<T>;
79
- };
80
- upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>;
81
- appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
82
- sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>;
83
- presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>;
84
- profilePictureUrl: (jid: string, type?: "image" | "preview", timeoutMs?: number | undefined) => Promise<string | undefined>;
85
- onWhatsApp: (...jids: string[]) => Promise<{
86
- exists: boolean;
87
- jid: string;
88
- }[]>;
89
- fetchBlocklist: () => Promise<string[]>;
90
- fetchStatus: (jid: string) => Promise<{
91
- status: string | undefined;
92
- setAt: Date;
93
- } | undefined>;
94
- updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
95
- removeProfilePicture: (jid: string) => Promise<void>;
96
- updateProfileStatus: (status: string) => Promise<void>;
97
- updateProfileName: (name: string) => Promise<void>;
98
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
99
- updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
100
- updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
101
- updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
102
- updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
103
- updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
104
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
105
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
106
- getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
107
- resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
108
- chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
109
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
110
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
111
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
112
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
113
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
114
- star: (jid: string, messages: {
115
- id: string;
116
- fromMe?: boolean | undefined;
117
- }[], star: boolean) => Promise<void>;
118
- type: "md";
119
- ws: any;
120
- ev: import("../Types").BaileysEventEmitter & {
121
- process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
122
- buffer(): void;
123
- createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>;
124
- flush(force?: boolean | undefined): boolean;
125
- isBuffering(): boolean;
126
- };
127
- authState: {
128
- creds: import("../Types").AuthenticationCreds;
129
- keys: import("../Types").SignalKeyStoreWithTransaction;
130
- };
131
- signalRepository: import("../Types").SignalRepository;
132
- user: import("../Types").Contact | undefined;
133
- generateMessageTag: () => string;
134
- query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>;
135
- waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
136
- waitForSocketOpen: () => Promise<void>;
137
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
138
- sendNode: (frame: BinaryNode) => Promise<void>;
139
- logout: (msg?: string | undefined) => Promise<void>;
140
- end: (error: Error | undefined) => void;
141
- onUnexpectedError: (err: Error | Boom<any>, msg: string) => void;
142
- uploadPreKeys: (count?: number) => Promise<void>;
143
- uploadPreKeysToServerIfRequired: () => Promise<void>;
144
- requestPairingCode: (phoneNumber: string) => Promise<string>;
145
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
146
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>;
147
- };