@denzy-official/baileys 1.0.8 → 1.0.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 (97) hide show
  1. package/lib/Socket/dugong.js +44 -3
  2. package/lib/Socket/messages-send.js +3 -1
  3. package/package.json +1 -1
  4. package/WAProto/index.d.ts +0 -55058
  5. package/WAProto/index.js +0 -169662
  6. package/WAProto/index.ts.ts +0 -53474
  7. package/lib/Defaults/index.d.ts +0 -52
  8. package/lib/Signal/Group/ciphertext-message.d.ts +0 -10
  9. package/lib/Signal/Group/group-session-builder.d.ts +0 -15
  10. package/lib/Signal/Group/group_cipher.d.ts +0 -18
  11. package/lib/Signal/Group/index.d.ts +0 -12
  12. package/lib/Signal/Group/keyhelper.d.ts +0 -11
  13. package/lib/Signal/Group/queue-job.d.ts +0 -2
  14. package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
  15. package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
  16. package/lib/Signal/Group/sender-key-message.d.ts +0 -19
  17. package/lib/Signal/Group/sender-key-name.d.ts +0 -18
  18. package/lib/Signal/Group/sender-key-record.d.ts +0 -31
  19. package/lib/Signal/Group/sender-key-state.d.ts +0 -39
  20. package/lib/Signal/Group/sender-message-key.d.ts +0 -12
  21. package/lib/Signal/libsignal.d.ts +0 -4
  22. package/lib/Socket/Client/index.d.ts +0 -3
  23. package/lib/Socket/Client/types.d.ts +0 -17
  24. package/lib/Socket/Client/websocket.d.ts +0 -14
  25. package/lib/Socket/business.d.ts +0 -173
  26. package/lib/Socket/chats.d.ts +0 -83
  27. package/lib/Socket/dugong.d.ts +0 -220
  28. package/lib/Socket/groups.d.ts +0 -125
  29. package/lib/Socket/index.d.ts +0 -173
  30. package/lib/Socket/messages-recv.d.ts +0 -162
  31. package/lib/Socket/messages-send.d.ts +0 -152
  32. package/lib/Socket/newsletter.d.ts +0 -137
  33. package/lib/Socket/socket.d.ts +0 -44
  34. package/lib/Socket/usync.d.ts +0 -37
  35. package/lib/Store/index.d.ts +0 -3
  36. package/lib/Store/make-in-memory-store.d.ts +0 -119
  37. package/lib/Store/make-ordered-dictionary.d.ts +0 -14
  38. package/lib/Store/object-repository.d.ts +0 -11
  39. package/lib/Types/Auth.d.ts +0 -104
  40. package/lib/Types/Call.d.ts +0 -14
  41. package/lib/Types/Chat.d.ts +0 -110
  42. package/lib/Types/Contact.d.ts +0 -24
  43. package/lib/Types/Events.d.ts +0 -200
  44. package/lib/Types/GroupMetadata.d.ts +0 -65
  45. package/lib/Types/Label.d.ts +0 -36
  46. package/lib/Types/LabelAssociation.d.ts +0 -30
  47. package/lib/Types/Message.d.ts +0 -401
  48. package/lib/Types/Newsletter.d.ts +0 -80
  49. package/lib/Types/Product.d.ts +0 -78
  50. package/lib/Types/Signal.d.ts +0 -57
  51. package/lib/Types/Socket.d.ts +0 -119
  52. package/lib/Types/State.d.ts +0 -27
  53. package/lib/Types/USync.d.ts +0 -25
  54. package/lib/Types/index.d.ts +0 -65
  55. package/lib/Utils/auth-utils.d.ts +0 -19
  56. package/lib/Utils/baileys-event-stream.d.ts +0 -17
  57. package/lib/Utils/business.d.ts +0 -23
  58. package/lib/Utils/chat-utils.d.ts +0 -71
  59. package/lib/Utils/crypto.d.ts +0 -41
  60. package/lib/Utils/decode-wa-message.d.ts +0 -36
  61. package/lib/Utils/event-buffer.d.ts +0 -36
  62. package/lib/Utils/generics.d.ts +0 -90
  63. package/lib/Utils/history.d.ts +0 -20
  64. package/lib/Utils/index.d.ts +0 -18
  65. package/lib/Utils/link-preview.d.ts +0 -21
  66. package/lib/Utils/logger.d.ts +0 -11
  67. package/lib/Utils/lt-hash.d.ts +0 -12
  68. package/lib/Utils/make-mutex.d.ts +0 -7
  69. package/lib/Utils/messages-media.d.ts +0 -120
  70. package/lib/Utils/messages.d.ts +0 -75
  71. package/lib/Utils/noise-handler.d.ts +0 -19
  72. package/lib/Utils/process-message.d.ts +0 -42
  73. package/lib/Utils/signal.d.ts +0 -33
  74. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -12
  75. package/lib/Utils/validate-connection.d.ts +0 -10
  76. package/lib/WABinary/constants.d.ts +0 -28
  77. package/lib/WABinary/decode.d.ts +0 -7
  78. package/lib/WABinary/encode.d.ts +0 -3
  79. package/lib/WABinary/generic-utils.d.ts +0 -15
  80. package/lib/WABinary/index.d.ts +0 -6
  81. package/lib/WABinary/jid-utils.d.ts +0 -37
  82. package/lib/WABinary/types.d.ts +0 -19
  83. package/lib/WAM/BinaryInfo.d.ts +0 -9
  84. package/lib/WAM/constants.d.ts +0 -39
  85. package/lib/WAM/encode.d.ts +0 -3
  86. package/lib/WAM/index.d.ts +0 -4
  87. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -9
  88. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -22
  89. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -12
  90. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -12
  91. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -25
  92. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -8
  93. package/lib/WAUSync/Protocols/index.d.ts +0 -4
  94. package/lib/WAUSync/USyncQuery.d.ts +0 -28
  95. package/lib/WAUSync/USyncUser.d.ts +0 -12
  96. package/lib/WAUSync/index.d.ts +0 -3
  97. package/lib/index.d.ts +0 -17
@@ -1,220 +0,0 @@
1
- // dugong.d.ts
2
- // baileys by denzy
3
- import { proto } from '../../WAProto';
4
-
5
- declare namespace kikyy {
6
- interface MediaUploadOptions {
7
- fileEncSha256?: Buffer;
8
- mediaType?: string;
9
- newsletter?: boolean;
10
- }
11
-
12
- type WAMediaUploadFunction = (
13
- stream: Buffer | NodeJS.ReadableStream,
14
- options?: MediaUploadOptions
15
- ) => Promise<{ url: string; directPath: string }>;
16
-
17
- interface WAMessageContentGenerationOptions {
18
- upload?: WAMediaUploadFunction;
19
- mediaCache?: any;
20
- options?: any;
21
- logger?: any;
22
- }
23
-
24
- interface StickerMessage {
25
- url: string;
26
- fileSha256: Buffer | string;
27
- fileEncSha256: Buffer | string;
28
- mediaKey: Buffer | string;
29
- mimetype: string;
30
- directPath: string;
31
- fileLength: number | string;
32
- mediaKeyTimestamp: number | string;
33
- isAnimated?: boolean;
34
- stickerSentTs?: number | string;
35
- isAvatar?: boolean;
36
- isAiSticker?: boolean;
37
- isLottie?: boolean;
38
- }
39
-
40
- interface PaymentMessage {
41
- amount: number;
42
- currency?: string;
43
- from?: string;
44
- expiry?: number;
45
- sticker?: { stickerMessage: StickerMessage };
46
- note?: string;
47
- background?: {
48
- id?: string;
49
- fileLength?: string;
50
- width?: number;
51
- height?: number;
52
- mimetype?: string;
53
- placeholderArgb?: number;
54
- textArgb?: number;
55
- subtextArgb?: number;
56
- };
57
- }
58
-
59
- interface ProductMessage {
60
- title: string;
61
- description: string;
62
- thumbnail: Buffer | { url: string };
63
- productId: string;
64
- retailerId: string;
65
- url: string;
66
- body?: string;
67
- footer?: string;
68
- buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
69
- priceAmount1000?: number | null;
70
- currencyCode?: string;
71
- }
72
-
73
- interface InteractiveMessage {
74
- title: string;
75
- footer?: string;
76
- thumbnail?: string;
77
- image?: string | Buffer | { url: string };
78
- video?: string | Buffer | { url: string };
79
- document?: Buffer;
80
- mimetype?: string;
81
- fileName?: string;
82
- jpegThumbnail?: Buffer; // Hanya Buffer saja
83
- contextInfo?: {
84
- mentionedJid?: string[];
85
- forwardingScore?: number;
86
- isForwarded?: boolean;
87
- externalAdReply?: {
88
- title?: string;
89
- body?: string;
90
- mediaType?: number;
91
- thumbnailUrl?: string;
92
- mediaUrl?: string;
93
- sourceUrl?: string;
94
- showAdAttribution?: boolean;
95
- renderLargerThumbnail?: boolean;
96
- [key: string]: any;
97
- };
98
- [key: string]: any;
99
- };
100
- externalAdReply?: {
101
- title?: string;
102
- body?: string;
103
- mediaType?: number;
104
- thumbnailUrl?: string;
105
- mediaUrl?: string;
106
- sourceUrl?: string;
107
- showAdAttribution?: boolean;
108
- renderLargerThumbnail?: boolean;
109
- [key: string]: any;
110
- };
111
- buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
112
- nativeFlowMessage?: {
113
- messageParamsJson?: string;
114
- buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
115
- [key: string]: any;
116
- };
117
- }
118
-
119
- interface AlbumItem {
120
- image?: { url: string; caption?: string };
121
- video?: { url: string; caption?: string };
122
- }
123
-
124
- interface EventMessageLocation {
125
- degreesLatitude: number;
126
- degreesLongitude: number;
127
- name: string;
128
- }
129
-
130
- interface EventMessage {
131
- isCanceled?: boolean;
132
- name: string;
133
- description: string;
134
- location?: EventMessageLocation;
135
- joinLink?: string;
136
- startTime?: string | number;
137
- endTime?: string | number;
138
- extraGuestsAllowed?: boolean;
139
- }
140
-
141
- interface PollVote {
142
- optionName: string;
143
- optionVoteCount: string | number;
144
- }
145
-
146
- interface PollResultMessage {
147
- name: string;
148
- pollVotes: PollVote[];
149
- }
150
-
151
- interface MessageContent {
152
- requestPaymentMessage?: PaymentMessage;
153
- productMessage?: ProductMessage;
154
- interactiveMessage?: InteractiveMessage;
155
- albumMessage?: AlbumItem[];
156
- eventMessage?: EventMessage;
157
- pollResultMessage?: PollResultMessage;
158
- sender?: string;
159
- }
160
-
161
- interface MessageOptions {
162
- quoted?: proto.IWebMessageInfo;
163
- filter?: boolean;
164
- }
165
-
166
- interface Utils {
167
- prepareWAMessageMedia: (media: any, options: WAMessageContentGenerationOptions) => Promise<any>;
168
- generateWAMessageContent: (content: any, options: WAMessageContentGenerationOptions) => Promise<any>;
169
- generateWAMessageFromContent: (jid: string, content: any, options?: any) => Promise<any>;
170
- generateWAMessage: (jid: string, content: any, options?: any) => Promise<any>;
171
- generateMessageID: () => string;
172
- }
173
- }
174
-
175
- declare class kikyy {
176
- constructor(
177
- utils: kikyy.Utils,
178
- waUploadToServer: kikyy.WAMediaUploadFunction,
179
- relayMessageFn?: (jid: string, content: any, options?: any) => Promise<any>
180
- );
181
-
182
- detectType(content: kikyy.MessageContent): 'PAYMENT' | 'PRODUCT' | 'INTERACTIVE' | 'ALBUM' | 'EVENT' | 'POLL_RESULT' | null;
183
-
184
- handlePayment(
185
- content: { requestPaymentMessage: kikyy.PaymentMessage },
186
- quoted?: proto.IWebMessageInfo
187
- ): Promise<{ requestPaymentMessage: proto.Message.RequestPaymentMessage }>;
188
-
189
- handleProduct(
190
- content: { productMessage: kikyy.ProductMessage },
191
- jid: string,
192
- quoted?: proto.IWebMessageInfo
193
- ): Promise<{ viewOnceMessage: proto.Message.ViewOnceMessage }>;
194
-
195
- handleInteractive(
196
- content: { interactiveMessage: kikyy.InteractiveMessage },
197
- jid: string,
198
- quoted?: proto.IWebMessageInfo
199
- ): Promise<{ interactiveMessage: proto.Message.InteractiveMessage }>;
200
-
201
- handleAlbum(
202
- content: { albumMessage: kikyy.AlbumItem[] },
203
- jid: string,
204
- quoted?: proto.IWebMessageInfo
205
- ): Promise<any>;
206
-
207
- handleEvent(
208
- content: { eventMessage: kikyy.EventMessage },
209
- jid: string,
210
- quoted?: proto.IWebMessageInfo
211
- ): Promise<any>;
212
-
213
- handlePollResult(
214
- content: { pollResultMessage: kikyy.PollResultMessage },
215
- jid: string,
216
- quoted?: proto.IWebMessageInfo
217
- ): Promise<any>;
218
- }
219
-
220
- export = kikyy;
@@ -1,125 +0,0 @@
1
- // baileys by denzy
2
- import { proto } from '../../WAProto';
3
- import { GroupMetadata, ParticipantAction, SocketConfig, WAMessageKey } from '../Types';
4
- import { BinaryNode } from '../WABinary';
5
- export declare const makeGroupsSocket: (config: SocketConfig) => {
6
- groupQuery: (jid: string, type: "get" | "set", content: BinaryNode[]) => Promise<any>;
7
- groupMetadata: (jid: string) => Promise<GroupMetadata>;
8
- groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
9
- groupLeave: (id: string) => Promise<void>;
10
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
11
- groupRequestParticipantsList: (jid: string) => Promise<{
12
- [key: string]: string;
13
- }[]>;
14
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
15
- status: string;
16
- jid: string;
17
- }[]>;
18
- groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
19
- status: string;
20
- jid: string;
21
- content: BinaryNode;
22
- }[]>;
23
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
24
- groupInviteCode: (jid: string) => Promise<string | undefined>;
25
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
26
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
27
- /**
28
- * revoke a v4 invite for someone
29
- * @param groupJid group jid
30
- * @param invitedJid jid of person you invited
31
- * @returns true if successful
32
- */
33
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
34
- /**
35
- * accept a GroupInviteMessage
36
- * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
37
- * @param inviteMessage the message to accept
38
- */
39
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
40
- groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
41
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
42
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
43
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
44
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
45
- groupFetchAllParticipating: () => Promise<{
46
- [_: string]: GroupMetadata;
47
- }>;
48
- getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
49
- processingMutex: {
50
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
51
- };
52
- fetchPrivacySettings: (force?: boolean) => Promise<{
53
- [_: string]: string;
54
- }>;
55
- upsertMessage: (msg: import("../Types").WAMessage, type: import("../Types").MessageUpsertType) => Promise<void>;
56
- appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
57
- sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string) => Promise<void>;
58
- presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
59
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
60
- onWhatsApp: (...jids: string[]) => Promise<{
61
- jid: string;
62
- exists: unknown;
63
- lid: unknown;
64
- }[] | undefined>;
65
- fetchBlocklist: () => Promise<string[]>;
66
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
67
- fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
68
- updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
69
- removeProfilePicture: (jid: string) => Promise<void>;
70
- updateProfileStatus: (status: string) => Promise<void>;
71
- updateProfileName: (name: string) => Promise<void>;
72
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
73
- updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
74
- updateMessagesPrivacy: (value: import("../Types").WAPrivacyMessagesValue) => Promise<void>;
75
- updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
76
- updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
77
- updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
78
- updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
79
- updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
80
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
81
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
82
- getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
83
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
84
- chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
85
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
86
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
87
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
88
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
89
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
90
- star: (jid: string, messages: {
91
- id: string;
92
- fromMe?: boolean;
93
- }[], star: boolean) => Promise<void>;
94
- executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>;
95
- type: "md";
96
- ws: import("./Client").WebSocketClient;
97
- ev: import("../Types").BaileysEventEmitter & {
98
- process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): (() => void);
99
- buffer(): void;
100
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): ((...args: A) => Promise<T>);
101
- flush(force?: boolean): boolean;
102
- isBuffering(): boolean;
103
- };
104
- authState: {
105
- creds: import("../Types").AuthenticationCreds;
106
- keys: import("../Types").SignalKeyStoreWithTransaction;
107
- };
108
- signalRepository: import("../Types").SignalRepository;
109
- user: import("../Types").Contact | undefined;
110
- generateMessageTag: () => string;
111
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
112
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<any>;
113
- waitForSocketOpen: () => Promise<void>;
114
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
115
- sendNode: (frame: BinaryNode) => Promise<void>;
116
- logout: (msg?: string) => Promise<void>;
117
- end: (error: Error | undefined) => void;
118
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
119
- uploadPreKeys: (count?: number) => Promise<void>;
120
- uploadPreKeysToServerIfRequired: () => Promise<void>;
121
- requestPairingCode: (phoneNumber: any, pairKey?: string) => Promise<string>;
122
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
123
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
124
- };
125
- export declare const extractGroupMetadata: (result: BinaryNode) => GroupMetadata;
@@ -1,173 +0,0 @@
1
- // baileys by denzy
2
- import { UserFacingSocketConfig } from '../Types';
3
- declare const makeWASocket: (config: UserFacingSocketConfig) => {
4
- logger: import("../Utils/logger").ILogger;
5
- getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>;
6
- getCatalog: ({ jid, limit, cursor }: import("../Types").GetCatalogOptions) => Promise<{
7
- products: import("../Types").Product[];
8
- nextPageCursor: string | undefined;
9
- }>;
10
- getCollections: (jid?: string, limit?: number) => Promise<{
11
- collections: import("../Types").CatalogCollection[];
12
- }>;
13
- productCreate: (create: import("../Types").ProductCreate) => Promise<import("../Types").Product>;
14
- productDelete: (productIds: string[]) => Promise<{
15
- deleted: number;
16
- }>;
17
- productUpdate: (productId: string, update: import("../Types").ProductUpdate) => Promise<import("../Types").Product>;
18
- sendMessageAck: ({ tag, attrs, content }: import("..").BinaryNode, errorCode?: number) => Promise<void>;
19
- sendRetryRequest: (node: import("..").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
20
- rejectCall: (callId: string, callFrom: string) => Promise<void>;
21
- offerCall: (toJid: string, isVideo?: boolean) => Promise<{
22
- callId: string;
23
- toJid: string;
24
- isVideo: boolean;
25
- }>;
26
- fetchMessageHistory: (count: number, oldestMsgKey: import("../Types").WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
27
- requestPlaceholderResend: (messageKey: import("../Types").WAMessageKey) => Promise<string | undefined>;
28
- getPrivacyTokens: (jids: string[]) => Promise<any>;
29
- assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
30
- relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>;
31
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>;
32
- sendReceipts: (keys: import("../Types").WAMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>;
33
- readMessages: (keys: import("../Types").WAMessageKey[]) => Promise<void>;
34
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
35
- waUploadToServer: import("../Types").WAMediaUploadFunction;
36
- fetchPrivacySettings: (force?: boolean) => Promise<{
37
- [_: string]: string;
38
- }>;
39
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("..").JidWithDevice[]>;
40
- createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: import("..").BinaryNode["attrs"]) => Promise<{
41
- nodes: import("..").BinaryNode[];
42
- shouldIncludeDeviceIdentity: boolean;
43
- }>;
44
- sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
45
- updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>;
46
- sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo>;
47
- subscribeNewsletterUpdates: (jid: string) => Promise<{
48
- duration: string;
49
- }>;
50
- newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>;
51
- newsletterUpdateDescription: (jid: string, description?: string) => Promise<void>;
52
- newsletterUpdateName: (jid: string, name: string) => Promise<void>;
53
- newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
54
- newsletterRemovePicture: (jid: string) => Promise<void>;
55
- newsletterUnfollow: (jid: string) => Promise<void>;
56
- newsletterFollow: (jid: string) => Promise<void>;
57
- newsletterUnmute: (jid: string) => Promise<void>;
58
- newsletterMute: (jid: string) => Promise<void>;
59
- newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise<import("../Types").NewsletterMetadata>;
60
- newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole) => Promise<import("../Types").NewsletterMetadata>;
61
- newsletterAdminCount: (jid: string) => Promise<number>;
62
- newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
63
- newsletterDemote: (jid: string, user: string) => Promise<void>;
64
- newsletterDelete: (jid: string) => Promise<void>;
65
- newsletterReactMessage: (jid: string, server_id: string, code?: string) => Promise<void>;
66
- newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
67
- newsletterFetchUpdates: (jid: string, count: number, after?: number, since?: number) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
68
- groupQuery: (jid: string, type: "get" | "set", content: import("..").BinaryNode[]) => Promise<any>;
69
- groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
70
- groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
71
- groupLeave: (id: string) => Promise<void>;
72
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
73
- groupRequestParticipantsList: (jid: string) => Promise<{
74
- [key: string]: string;
75
- }[]>;
76
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
77
- status: string;
78
- jid: string;
79
- }[]>;
80
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
81
- status: string;
82
- jid: string;
83
- content: import("..").BinaryNode;
84
- }[]>;
85
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
86
- groupInviteCode: (jid: string) => Promise<string | undefined>;
87
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
88
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
89
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
90
- groupAcceptInviteV4: (key: string | import("../Types").WAMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<any>;
91
- groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
92
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
93
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
94
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
95
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
96
- groupFetchAllParticipating: () => Promise<{
97
- [_: string]: import("../Types").GroupMetadata;
98
- }>;
99
- getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
100
- processingMutex: {
101
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
102
- };
103
- upsertMessage: (msg: import("../Types").WAMessage, type: import("../Types").MessageUpsertType) => Promise<void>;
104
- appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
105
- sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string) => Promise<void>;
106
- presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
107
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
108
- onWhatsApp: (...jids: string[]) => Promise<{
109
- jid: string;
110
- exists: unknown;
111
- lid: unknown;
112
- }[] | undefined>;
113
- fetchBlocklist: () => Promise<string[]>;
114
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
115
- fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
116
- updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
117
- removeProfilePicture: (jid: string) => Promise<void>;
118
- updateProfileStatus: (status: string) => Promise<void>;
119
- updateProfileName: (name: string) => Promise<void>;
120
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
121
- updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
122
- updateMessagesPrivacy: (value: import("../Types").WAPrivacyMessagesValue) => 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").WAPrivacyGroupAddValue) => Promise<void>;
129
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
130
- getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
131
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
132
- chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
133
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => 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;
141
- }[], star: boolean) => Promise<void>;
142
- executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>;
143
- type: "md";
144
- ws: import("./Client").WebSocketClient;
145
- ev: import("../Types").BaileysEventEmitter & {
146
- process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): (() => void);
147
- buffer(): void;
148
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): ((...args: A) => Promise<T>);
149
- flush(force?: boolean): boolean;
150
- isBuffering(): boolean;
151
- };
152
- authState: {
153
- creds: import("../Types").AuthenticationCreds;
154
- keys: import("../Types").SignalKeyStoreWithTransaction;
155
- };
156
- signalRepository: import("../Types").SignalRepository;
157
- user: import("../Types").Contact | undefined;
158
- generateMessageTag: () => string;
159
- query: (node: import("..").BinaryNode, timeoutMs?: number) => Promise<any>;
160
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<any>;
161
- waitForSocketOpen: () => Promise<void>;
162
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
163
- sendNode: (frame: import("..").BinaryNode) => Promise<void>;
164
- logout: (msg?: string) => Promise<void>;
165
- end: (error: Error | undefined) => void;
166
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
167
- uploadPreKeys: (count?: number) => Promise<void>;
168
- uploadPreKeysToServerIfRequired: () => Promise<void>;
169
- requestPairingCode: (phoneNumber: any, pairKey?: string) => Promise<string>;
170
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
171
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
172
- };
173
- export default makeWASocket;