@kelvdra/baileys 1.0.3 → 1.0.4

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 (109) hide show
  1. package/README.md +75 -1499
  2. package/lib/Defaults/index.d.ts +62 -0
  3. package/lib/Defaults/index.js +2 -2
  4. package/lib/Defaults/phonenumber-mcc.json +223 -0
  5. package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
  6. package/lib/Signal/Group/group-session-builder.d.ts +15 -0
  7. package/lib/Signal/Group/group_cipher.d.ts +17 -0
  8. package/lib/Signal/Group/index.d.ts +12 -0
  9. package/lib/Signal/Group/keyhelper.d.ts +11 -0
  10. package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
  11. package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
  12. package/lib/Signal/Group/sender-key-message.d.ts +19 -0
  13. package/lib/Signal/Group/sender-key-name.d.ts +18 -0
  14. package/lib/Signal/Group/sender-key-record.d.ts +31 -0
  15. package/lib/Signal/Group/sender-key-state.d.ts +39 -0
  16. package/lib/Signal/Group/sender-message-key.d.ts +12 -0
  17. package/lib/Signal/libsignal.d.ts +5 -0
  18. package/lib/Signal/lid-mapping.d.ts +23 -0
  19. package/lib/Socket/Client/index.d.ts +3 -0
  20. package/lib/Socket/Client/types.d.ts +16 -0
  21. package/lib/Socket/Client/websocket.d.ts +13 -0
  22. package/lib/Socket/business.d.ts +190 -0
  23. package/lib/Socket/chats.d.ts +100 -0
  24. package/lib/Socket/chats.js +14 -13
  25. package/lib/Socket/communities.d.ts +246 -0
  26. package/lib/Socket/groups.d.ts +139 -0
  27. package/lib/Socket/groups.js +2 -3
  28. package/lib/Socket/hydra.js +1 -2
  29. package/lib/Socket/index.d.ts +233 -0
  30. package/lib/Socket/messages-recv.d.ts +175 -0
  31. package/lib/Socket/messages-recv.js +325 -515
  32. package/lib/Socket/messages-send.d.ts +171 -0
  33. package/lib/Socket/messages-send.js +104 -467
  34. package/lib/Socket/mex.d.ts +3 -0
  35. package/lib/Socket/newsletter.d.ts +149 -0
  36. package/lib/Socket/socket.d.ts +53 -0
  37. package/lib/Socket/socket.js +52 -51
  38. package/lib/Store/index.d.ts +4 -0
  39. package/lib/Store/make-cache-manager-store.d.ts +14 -0
  40. package/lib/Store/make-in-memory-store.d.ts +123 -0
  41. package/lib/Store/make-ordered-dictionary.d.ts +12 -0
  42. package/lib/Store/object-repository.d.ts +10 -0
  43. package/lib/Types/Auth.d.ts +115 -0
  44. package/lib/Types/Bussines.d.ts +25 -0
  45. package/lib/Types/Call.d.ts +14 -0
  46. package/lib/Types/Chat.d.ts +123 -0
  47. package/lib/Types/Contact.d.ts +24 -0
  48. package/lib/Types/Events.d.ts +202 -0
  49. package/lib/Types/GroupMetadata.d.ts +67 -0
  50. package/lib/Types/Label.d.ts +47 -0
  51. package/lib/Types/LabelAssociation.d.ts +30 -0
  52. package/lib/Types/Message.d.ts +382 -0
  53. package/lib/Types/Newsletter.d.ts +135 -0
  54. package/lib/Types/Product.d.ts +79 -0
  55. package/lib/Types/Signal.d.ts +76 -0
  56. package/lib/Types/Socket.d.ts +133 -0
  57. package/lib/Types/State.d.ts +39 -0
  58. package/lib/Types/USync.d.ts +26 -0
  59. package/lib/Types/index.d.ts +65 -0
  60. package/lib/Utils/auth-utils.d.ts +19 -0
  61. package/lib/Utils/browser-utils.d.ts +4 -0
  62. package/lib/Utils/business.d.ts +23 -0
  63. package/lib/Utils/chat-utils.d.ts +70 -0
  64. package/lib/Utils/crypto.d.ts +41 -0
  65. package/lib/Utils/decode-wa-message.d.ts +48 -0
  66. package/lib/Utils/decode-wa-message.js +5 -7
  67. package/lib/Utils/event-buffer.d.ts +34 -0
  68. package/lib/Utils/generics.d.ts +90 -0
  69. package/lib/Utils/history.d.ts +19 -0
  70. package/lib/Utils/index.d.ts +19 -0
  71. package/lib/Utils/link-preview.d.ts +21 -0
  72. package/lib/Utils/logger.d.ts +12 -0
  73. package/lib/Utils/lt-hash.d.ts +13 -0
  74. package/lib/Utils/make-mutex.d.ts +8 -0
  75. package/lib/Utils/message-retry-manager.d.ts +82 -0
  76. package/lib/Utils/messages-media.d.ts +114 -0
  77. package/lib/Utils/messages-media.js +69 -33
  78. package/lib/Utils/messages.d.ts +89 -0
  79. package/lib/Utils/messages.js +42 -12
  80. package/lib/Utils/noise-handler.d.ts +20 -0
  81. package/lib/Utils/pre-key-manager.d.ts +28 -0
  82. package/lib/Utils/process-message.d.ts +60 -0
  83. package/lib/Utils/signal.d.ts +34 -0
  84. package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
  85. package/lib/Utils/validate-connection.d.ts +11 -0
  86. package/lib/WABinary/constants.d.ts +28 -0
  87. package/lib/WABinary/decode.d.ts +7 -0
  88. package/lib/WABinary/encode.d.ts +3 -0
  89. package/lib/WABinary/generic-utils.d.ts +15 -0
  90. package/lib/WABinary/generic-utils.js +7 -0
  91. package/lib/WABinary/index.d.ts +6 -0
  92. package/lib/WABinary/jid-utils.d.ts +48 -0
  93. package/lib/WABinary/types.d.ts +19 -0
  94. package/lib/WAM/BinaryInfo.d.ts +9 -0
  95. package/lib/WAM/constants.d.ts +40 -0
  96. package/lib/WAM/encode.d.ts +3 -0
  97. package/lib/WAM/index.d.ts +4 -0
  98. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
  99. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
  100. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
  101. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
  102. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +26 -0
  103. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
  104. package/lib/WAUSync/Protocols/index.d.ts +5 -0
  105. package/lib/WAUSync/USyncQuery.d.ts +29 -0
  106. package/lib/WAUSync/USyncUser.d.ts +13 -0
  107. package/lib/WAUSync/index.d.ts +4 -0
  108. package/lib/index.d.ts +13 -0
  109. package/package.json +3 -34
@@ -0,0 +1,190 @@
1
+ import type { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig, WAMediaUpload } from '../Types/index.js';
2
+ import type { UpdateBussinesProfileProps } from '../Types/Bussines.js';
3
+ import { type BinaryNode } from '../WABinary/index.js';
4
+ export declare const makeBusinessSocket: (config: SocketConfig) => {
5
+ logger: import("../Utils/logger.js").ILogger;
6
+ getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../index.js").OrderDetails>;
7
+ getCatalog: ({ jid, limit, cursor }: GetCatalogOptions) => Promise<{
8
+ products: import("../index.js").Product[];
9
+ nextPageCursor: string | undefined;
10
+ }>;
11
+ getCollections: (jid?: string, limit?: number) => Promise<{
12
+ collections: import("../index.js").CatalogCollection[];
13
+ }>;
14
+ productCreate: (create: ProductCreate) => Promise<import("../index.js").Product>;
15
+ productDelete: (productIds: string[]) => Promise<{
16
+ deleted: number;
17
+ }>;
18
+ productUpdate: (productId: string, update: ProductUpdate) => Promise<import("../index.js").Product>;
19
+ updateBussinesProfile: (args: UpdateBussinesProfileProps) => Promise<any>;
20
+ updateCoverPhoto: (photo: WAMediaUpload) => Promise<number>;
21
+ removeCoverPhoto: (id: string) => Promise<any>;
22
+ sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number) => Promise<void>;
23
+ sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
24
+ rejectCall: (callId: string, callFrom: string) => Promise<void>;
25
+ fetchMessageHistory: (count: number, oldestMsgKey: import("../index.js").WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
26
+ requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey) => Promise<string | undefined>;
27
+ messageRetryManager: import("../index.js").MessageRetryManager | null;
28
+ getPrivacyTokens: (jids: string[]) => Promise<any>;
29
+ assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
30
+ relayMessage: (jid: string, message: import("../index.js").proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../index.js").MessageRelayOptions) => Promise<string>;
31
+ sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
32
+ sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
33
+ readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
34
+ refreshMediaConn: (forceGet?: boolean) => Promise<import("../index.js").MediaConnInfo>;
35
+ waUploadToServer: import("../index.js").WAMediaUploadFunction;
36
+ fetchPrivacySettings: (force?: boolean) => Promise<{
37
+ [_: string]: string;
38
+ }>;
39
+ sendPeerDataOperationMessage: (pdoMessage: import("../index.js").proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
40
+ createParticipantNodes: (recipientJids: string[], message: import("../index.js").proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: import("../index.js").proto.IMessage) => Promise<{
41
+ nodes: BinaryNode[];
42
+ shouldIncludeDeviceIdentity: boolean;
43
+ }>;
44
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../index.js").JidWithDevice & {
45
+ jid: string;
46
+ })[]>;
47
+ updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
48
+ sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: import("../index.js").MiscMessageGenerationOptions) => Promise<import("../index.js").WAMessage | undefined>;
49
+ newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
50
+ newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<unknown>;
51
+ newsletterSubscribers: (jid: string) => Promise<{
52
+ subscribers: number;
53
+ }>;
54
+ newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
55
+ newsletterFollow: (jid: string) => Promise<unknown>;
56
+ newsletterUnfollow: (jid: string) => Promise<unknown>;
57
+ newsletterMute: (jid: string) => Promise<unknown>;
58
+ newsletterUnmute: (jid: string) => Promise<unknown>;
59
+ newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
60
+ newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
61
+ newsletterUpdatePicture: (jid: string, content: WAMediaUpload) => Promise<unknown>;
62
+ newsletterRemovePicture: (jid: string) => Promise<unknown>;
63
+ newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
64
+ newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
65
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
66
+ duration: string;
67
+ } | null>;
68
+ newsletterAdminCount: (jid: string) => Promise<number>;
69
+ newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
70
+ newsletterDemote: (jid: string, userJid: string) => Promise<void>;
71
+ newsletterDelete: (jid: string) => Promise<void>;
72
+ groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
73
+ groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").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: "approve" | "reject") => Promise<{
80
+ status: string;
81
+ jid: string | undefined;
82
+ }[]>;
83
+ groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
84
+ status: string;
85
+ jid: string | undefined;
86
+ content: BinaryNode;
87
+ }[]>;
88
+ groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
89
+ groupInviteCode: (jid: string) => Promise<string | undefined>;
90
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>;
91
+ groupAcceptInvite: (code: string) => Promise<string | undefined>;
92
+ groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
93
+ groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
94
+ groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
95
+ groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
96
+ groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
97
+ groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
98
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
99
+ groupFetchAllParticipating: () => Promise<{
100
+ [_: string]: import("../index.js").GroupMetadata;
101
+ }>;
102
+ createCallLink: (type: "audio" | "video", event?: {
103
+ startTime: number;
104
+ }, timeoutMs?: number) => Promise<string | undefined>;
105
+ getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
106
+ processingMutex: {
107
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
108
+ };
109
+ upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
110
+ appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<void>;
111
+ sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
112
+ presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
113
+ profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
114
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
115
+ fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
116
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
117
+ updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
118
+ width: number;
119
+ height: number;
120
+ }) => Promise<void>;
121
+ removeProfilePicture: (jid: string) => Promise<void>;
122
+ updateProfileStatus: (status: string) => Promise<void>;
123
+ updateProfileName: (name: string) => Promise<void>;
124
+ updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
125
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
126
+ updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
127
+ updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
128
+ updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
129
+ updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
130
+ updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
131
+ updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
132
+ updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
133
+ updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
134
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
135
+ getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
136
+ resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
137
+ chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
138
+ cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
139
+ addOrEditContact: (jid: string, contact: import("../index.js").proto.SyncActionValue.IContactAction) => Promise<void>;
140
+ removeContact: (jid: string) => Promise<void>;
141
+ addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
142
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
143
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
144
+ addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
145
+ removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
146
+ star: (jid: string, messages: {
147
+ id: string;
148
+ fromMe?: boolean;
149
+ }[], star: boolean) => Promise<void>;
150
+ addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
151
+ removeQuickReply: (timestamp: string) => Promise<void>;
152
+ type: "md";
153
+ ws: import("./Client/index.js").WebSocketClient;
154
+ ev: import("../index.js").BaileysEventEmitter & {
155
+ process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
156
+ buffer(): void;
157
+ createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
158
+ flush(): boolean;
159
+ isBuffering(): boolean;
160
+ };
161
+ authState: {
162
+ creds: import("../index.js").AuthenticationCreds;
163
+ keys: import("../index.js").SignalKeyStoreWithTransaction;
164
+ };
165
+ signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
166
+ user: import("../index.js").Contact | undefined;
167
+ generateMessageTag: () => string;
168
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
169
+ waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
170
+ waitForSocketOpen: () => Promise<void>;
171
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
172
+ sendNode: (frame: BinaryNode) => Promise<void>;
173
+ logout: (msg?: string) => Promise<void>;
174
+ end: (error: Error | undefined) => void;
175
+ onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
176
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
177
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
178
+ digestKeyBundle: () => Promise<void>;
179
+ rotateSignedPreKey: () => Promise<void>;
180
+ requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
181
+ wamBuffer: import("../index.js").BinaryInfo;
182
+ waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
183
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
184
+ executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
185
+ onWhatsApp: (...phoneNumber: string[]) => Promise<{
186
+ jid: string;
187
+ exists: boolean;
188
+ }[] | undefined>;
189
+ };
190
+ //# sourceMappingURL=business.d.ts.map
@@ -0,0 +1,100 @@
1
+ import { Boom } from '@hapi/boom';
2
+ import { proto } from '../../WAProto/index.js';
3
+ import type { BotListInfo, ChatModification, MessageUpsertType, SocketConfig, WABusinessProfile, WAMediaUpload, WAMessage, WAPatchCreate, WAPresence, WAPrivacyCallValue, WAPrivacyGroupAddValue, WAPrivacyMessagesValue, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue } from '../Types/index.js';
4
+ import type { QuickReplyAction } from '../Types/Bussines.js';
5
+ import type { LabelActionBody } from '../Types/Label.js';
6
+ import { type BinaryNode } from '../WABinary/index.js';
7
+ import { USyncQuery } from '../WAUSync/index.js';
8
+ export declare const makeChatsSocket: (config: SocketConfig) => {
9
+ createCallLink: (type: "audio" | "video", event?: {
10
+ startTime: number;
11
+ }, timeoutMs?: number) => Promise<string | undefined>;
12
+ getBotListV2: () => Promise<BotListInfo[]>;
13
+ processingMutex: {
14
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
15
+ };
16
+ fetchPrivacySettings: (force?: boolean) => Promise<{
17
+ [_: string]: string;
18
+ }>;
19
+ upsertMessage: (msg: WAMessage, type: MessageUpsertType) => Promise<void>;
20
+ appPatch: (patchCreate: WAPatchCreate) => Promise<void>;
21
+ sendPresenceUpdate: (type: WAPresence, toJid?: string) => Promise<void>;
22
+ presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
23
+ profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
24
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
25
+ fetchStatus: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
26
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
27
+ updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
28
+ width: number;
29
+ height: number;
30
+ }) => Promise<void>;
31
+ removeProfilePicture: (jid: string) => Promise<void>;
32
+ updateProfileStatus: (status: string) => Promise<void>;
33
+ updateProfileName: (name: string) => Promise<void>;
34
+ updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
35
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
36
+ updateCallPrivacy: (value: WAPrivacyCallValue) => Promise<void>;
37
+ updateMessagesPrivacy: (value: WAPrivacyMessagesValue) => Promise<void>;
38
+ updateLastSeenPrivacy: (value: WAPrivacyValue) => Promise<void>;
39
+ updateOnlinePrivacy: (value: WAPrivacyOnlineValue) => Promise<void>;
40
+ updateProfilePicturePrivacy: (value: WAPrivacyValue) => Promise<void>;
41
+ updateStatusPrivacy: (value: WAPrivacyValue) => Promise<void>;
42
+ updateReadReceiptsPrivacy: (value: WAReadReceiptsValue) => Promise<void>;
43
+ updateGroupsAddPrivacy: (value: WAPrivacyGroupAddValue) => Promise<void>;
44
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
45
+ getBusinessProfile: (jid: string) => Promise<WABusinessProfile | void>;
46
+ resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
47
+ chatModify: (mod: ChatModification, jid: string) => Promise<void>;
48
+ cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
49
+ addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
50
+ removeContact: (jid: string) => Promise<void>;
51
+ addLabel: (jid: string, labels: LabelActionBody) => Promise<void>;
52
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
53
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
54
+ addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
55
+ removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
56
+ star: (jid: string, messages: {
57
+ id: string;
58
+ fromMe?: boolean;
59
+ }[], star: boolean) => Promise<void>;
60
+ addOrEditQuickReply: (quickReply: QuickReplyAction) => Promise<void>;
61
+ removeQuickReply: (timestamp: string) => Promise<void>;
62
+ type: "md";
63
+ ws: import("./Client/websocket.js").WebSocketClient;
64
+ ev: import("../Types/index.js").BaileysEventEmitter & {
65
+ process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
66
+ buffer(): void;
67
+ createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
68
+ flush(): boolean;
69
+ isBuffering(): boolean;
70
+ };
71
+ authState: {
72
+ creds: import("../Types/index.js").AuthenticationCreds;
73
+ keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
74
+ };
75
+ signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
76
+ user: import("../Types/index.js").Contact | undefined;
77
+ generateMessageTag: () => string;
78
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
79
+ waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
80
+ waitForSocketOpen: () => Promise<void>;
81
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
82
+ sendNode: (frame: BinaryNode) => Promise<void>;
83
+ logout: (msg?: string) => Promise<void>;
84
+ end: (error: Error | undefined) => void;
85
+ onUnexpectedError: (err: Error | Boom, msg: string) => void;
86
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
87
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
88
+ digestKeyBundle: () => Promise<void>;
89
+ rotateSignedPreKey: () => Promise<void>;
90
+ requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
91
+ wamBuffer: import("../index.js").BinaryInfo;
92
+ waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
93
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
94
+ executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
95
+ onWhatsApp: (...phoneNumber: string[]) => Promise<{
96
+ jid: string;
97
+ exists: boolean;
98
+ }[] | undefined>;
99
+ };
100
+ //# sourceMappingURL=chats.d.ts.map
@@ -166,25 +166,26 @@ export const makeChatsSocket = (config) => {
166
166
  }
167
167
  };
168
168
  /** update the profile picture for yourself or a group */
169
- const updateProfilePicture = async (jid, content, dimensions) => {
170
- let targetJid;
169
+ const updateProfilePicture = async (jid, content) => {
170
+ let targetJid
171
+
171
172
  if (!jid) {
172
- throw new Boom('Illegal no-jid profile update. Please specify either your ID or the ID of the chat you wish to update');
173
+ throw new Boom('Illegal no-jid profile update. Please specify either your ID or the ID of the chat you wish to update')
173
174
  }
175
+
174
176
  if (jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me.id)) {
175
- targetJid = jidNormalizedUser(jid); // in case it is someone other than us
176
- }
177
- else {
178
- targetJid = undefined;
177
+ targetJid = jidNormalizedUser(jid) // in case it is someone other than us
179
178
  }
180
- const { img } = await generateProfilePicture(content, dimensions);
179
+
180
+ const { img } = await generateProfilePicture(content)
181
+
181
182
  await query({
182
183
  tag: 'iq',
183
184
  attrs: {
185
+ target: targetJid,
184
186
  to: S_WHATSAPP_NET,
185
187
  type: 'set',
186
- xmlns: 'w:profile:picture',
187
- ...(targetJid ? { target: targetJid } : {})
188
+ xmlns: 'w:profile:picture'
188
189
  },
189
190
  content: [
190
191
  {
@@ -193,8 +194,8 @@ export const makeChatsSocket = (config) => {
193
194
  content: img
194
195
  }
195
196
  ]
196
- });
197
- };
197
+ })
198
+ }
198
199
  /** remove the profile picture for yourself or a group */
199
200
  const removeProfilePicture = async (jid) => {
200
201
  let targetJid;
@@ -961,4 +962,4 @@ export const makeChatsSocket = (config) => {
961
962
  removeQuickReply
962
963
  };
963
964
  };
964
- //# sourceMappingURL=chats.js.map
965
+ //# sourceMappingURL=chats.js.map
@@ -0,0 +1,246 @@
1
+ import { proto } from '../../WAProto/index.js';
2
+ import { type GroupMetadata, type ParticipantAction, type SocketConfig, type WAMessageKey } from '../Types/index.js';
3
+ import { type BinaryNode } from '../WABinary/index.js';
4
+ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
5
+ communityMetadata: (jid: string) => Promise<GroupMetadata>;
6
+ communityCreate: (subject: string, body: string) => Promise<GroupMetadata | null>;
7
+ communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<GroupMetadata | null>;
8
+ communityLeave: (id: string) => Promise<void>;
9
+ communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
10
+ communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
11
+ communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
12
+ communityFetchLinkedGroups: (jid: string) => Promise<{
13
+ communityJid: string;
14
+ isCommunity: boolean;
15
+ linkedGroups: {
16
+ id: string | undefined;
17
+ subject: string;
18
+ creation: number | undefined;
19
+ owner: string | undefined;
20
+ size: number | undefined;
21
+ }[];
22
+ }>;
23
+ communityRequestParticipantsList: (jid: string) => Promise<{
24
+ [key: string]: string;
25
+ }[]>;
26
+ communityRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
27
+ status: string;
28
+ jid: string | undefined;
29
+ }[]>;
30
+ communityParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
31
+ status: string;
32
+ jid: string | undefined;
33
+ content: BinaryNode;
34
+ }[]>;
35
+ communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
36
+ communityInviteCode: (jid: string) => Promise<string | undefined>;
37
+ communityRevokeInvite: (jid: string) => Promise<string | undefined>;
38
+ communityAcceptInvite: (code: string) => Promise<string | undefined>;
39
+ /**
40
+ * revoke a v4 invite for someone
41
+ * @param communityJid community jid
42
+ * @param invitedJid jid of person you invited
43
+ * @returns true if successful
44
+ */
45
+ communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
46
+ /**
47
+ * accept a CommunityInviteMessage
48
+ * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
49
+ * @param inviteMessage the message to accept
50
+ */
51
+ communityAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
52
+ communityGetInviteInfo: (code: string) => Promise<GroupMetadata>;
53
+ communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
54
+ communitySettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
55
+ communityMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
56
+ communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
57
+ communityFetchAllParticipating: () => Promise<{
58
+ [_: string]: GroupMetadata;
59
+ }>;
60
+ logger: import("../Utils/logger.js").ILogger;
61
+ getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types/index.js").OrderDetails>;
62
+ getCatalog: ({ jid, limit, cursor }: import("../Types/index.js").GetCatalogOptions) => Promise<{
63
+ products: import("../Types/index.js").Product[];
64
+ nextPageCursor: string | undefined;
65
+ }>;
66
+ getCollections: (jid?: string, limit?: number) => Promise<{
67
+ collections: import("../Types/index.js").CatalogCollection[];
68
+ }>;
69
+ productCreate: (create: import("../Types/index.js").ProductCreate) => Promise<import("../Types/index.js").Product>;
70
+ productDelete: (productIds: string[]) => Promise<{
71
+ deleted: number;
72
+ }>;
73
+ productUpdate: (productId: string, update: import("../Types/index.js").ProductUpdate) => Promise<import("../Types/index.js").Product>;
74
+ updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<any>;
75
+ updateCoverPhoto: (photo: import("../Types/index.js").WAMediaUpload) => Promise<number>;
76
+ removeCoverPhoto: (id: string) => Promise<any>;
77
+ sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number) => Promise<void>;
78
+ sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
79
+ rejectCall: (callId: string, callFrom: string) => Promise<void>;
80
+ fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
81
+ requestPlaceholderResend: (messageKey: WAMessageKey) => Promise<string | undefined>;
82
+ messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
83
+ getPrivacyTokens: (jids: string[]) => Promise<any>;
84
+ assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
85
+ relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types/index.js").MessageRelayOptions) => Promise<string>;
86
+ sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types/index.js").MessageReceiptType) => Promise<void>;
87
+ sendReceipts: (keys: WAMessageKey[], type: import("../Types/index.js").MessageReceiptType) => Promise<void>;
88
+ readMessages: (keys: WAMessageKey[]) => Promise<void>;
89
+ refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types/index.js").MediaConnInfo>;
90
+ waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
91
+ fetchPrivacySettings: (force?: boolean) => Promise<{
92
+ [_: string]: string;
93
+ }>;
94
+ sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
95
+ createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
96
+ nodes: BinaryNode[];
97
+ shouldIncludeDeviceIdentity: boolean;
98
+ }>;
99
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary/index.js").JidWithDevice & {
100
+ jid: string;
101
+ })[]>;
102
+ updateMediaMessage: (message: import("../Types/index.js").WAMessage) => Promise<import("../Types/index.js").WAMessage>;
103
+ sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<import("../Types/index.js").WAMessage | undefined>;
104
+ newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
105
+ newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
106
+ newsletterSubscribers: (jid: string) => Promise<{
107
+ subscribers: number;
108
+ }>;
109
+ newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
110
+ newsletterFollow: (jid: string) => Promise<unknown>;
111
+ newsletterUnfollow: (jid: string) => Promise<unknown>;
112
+ newsletterMute: (jid: string) => Promise<unknown>;
113
+ newsletterUnmute: (jid: string) => Promise<unknown>;
114
+ newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
115
+ newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
116
+ newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
117
+ newsletterRemovePicture: (jid: string) => Promise<unknown>;
118
+ newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
119
+ newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
120
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
121
+ duration: string;
122
+ } | null>;
123
+ newsletterAdminCount: (jid: string) => Promise<number>;
124
+ newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
125
+ newsletterDemote: (jid: string, userJid: string) => Promise<void>;
126
+ newsletterDelete: (jid: string) => Promise<void>;
127
+ groupMetadata: (jid: string) => Promise<GroupMetadata>;
128
+ groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
129
+ groupLeave: (id: string) => Promise<void>;
130
+ groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
131
+ groupRequestParticipantsList: (jid: string) => Promise<{
132
+ [key: string]: string;
133
+ }[]>;
134
+ groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
135
+ status: string;
136
+ jid: string | undefined;
137
+ }[]>;
138
+ groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
139
+ status: string;
140
+ jid: string | undefined;
141
+ content: BinaryNode;
142
+ }[]>;
143
+ groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
144
+ groupInviteCode: (jid: string) => Promise<string | undefined>;
145
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>;
146
+ groupAcceptInvite: (code: string) => Promise<string | undefined>;
147
+ groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
148
+ groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
149
+ groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
150
+ groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
151
+ groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
152
+ groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
153
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
154
+ groupFetchAllParticipating: () => Promise<{
155
+ [_: string]: GroupMetadata;
156
+ }>;
157
+ createCallLink: (type: "audio" | "video", event?: {
158
+ startTime: number;
159
+ }, timeoutMs?: number) => Promise<string | undefined>;
160
+ getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
161
+ processingMutex: {
162
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
163
+ };
164
+ upsertMessage: (msg: import("../Types/index.js").WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
165
+ appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
166
+ sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
167
+ presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
168
+ profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
169
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
170
+ fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
171
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
172
+ updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
173
+ width: number;
174
+ height: number;
175
+ }) => Promise<void>;
176
+ removeProfilePicture: (jid: string) => Promise<void>;
177
+ updateProfileStatus: (status: string) => Promise<void>;
178
+ updateProfileName: (name: string) => Promise<void>;
179
+ updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
180
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
181
+ updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
182
+ updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
183
+ updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
184
+ updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
185
+ updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
186
+ updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
187
+ updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
188
+ updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
189
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
190
+ getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
191
+ resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
192
+ chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
193
+ cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
194
+ addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
195
+ removeContact: (jid: string) => Promise<void>;
196
+ addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
197
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
198
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
199
+ addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
200
+ removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
201
+ star: (jid: string, messages: {
202
+ id: string;
203
+ fromMe?: boolean;
204
+ }[], star: boolean) => Promise<void>;
205
+ addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
206
+ removeQuickReply: (timestamp: string) => Promise<void>;
207
+ type: "md";
208
+ ws: import("./Client/websocket.js").WebSocketClient;
209
+ ev: import("../Types/index.js").BaileysEventEmitter & {
210
+ process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
211
+ buffer(): void;
212
+ createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
213
+ flush(): boolean;
214
+ isBuffering(): boolean;
215
+ };
216
+ authState: {
217
+ creds: import("../Types/index.js").AuthenticationCreds;
218
+ keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
219
+ };
220
+ signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
221
+ user: import("../Types/index.js").Contact | undefined;
222
+ generateMessageTag: () => string;
223
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
224
+ waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
225
+ waitForSocketOpen: () => Promise<void>;
226
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
227
+ sendNode: (frame: BinaryNode) => Promise<void>;
228
+ logout: (msg?: string) => Promise<void>;
229
+ end: (error: Error | undefined) => void;
230
+ onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
231
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
232
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
233
+ digestKeyBundle: () => Promise<void>;
234
+ rotateSignedPreKey: () => Promise<void>;
235
+ requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
236
+ wamBuffer: import("../index.js").BinaryInfo;
237
+ waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
238
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
239
+ executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
240
+ onWhatsApp: (...phoneNumber: string[]) => Promise<{
241
+ jid: string;
242
+ exists: boolean;
243
+ }[] | undefined>;
244
+ };
245
+ export declare const extractCommunityMetadata: (result: BinaryNode) => GroupMetadata;
246
+ //# sourceMappingURL=communities.d.ts.map