@awangxcode/qiro-baileys 7.0.0-rc25.6 → 7.0.0-rc26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +1445 -1041
- package/WAProto/WAProto.proto +4 -0
- package/WAProto/index.d.ts +4067 -243
- package/WAProto/index.js +74957 -43330
- package/assets/branding/qiro-logo.svg +24 -0
- package/assets/branding/qiro-mark.png +0 -0
- package/assets/branding/qiro-mark.svg +34 -0
- package/assets/branding/qiro-social-preview.png +0 -0
- package/lib/Defaults/index.d.ts +16 -1
- package/lib/Defaults/index.d.ts.map +1 -1
- package/lib/Defaults/index.js +43 -10
- package/lib/Defaults/index.js.map +1 -1
- package/lib/Extensions/advanced.d.ts +1 -1
- package/lib/Extensions/experimental.d.ts +1 -3
- package/lib/Extensions/experimental.d.ts.map +1 -1
- package/lib/Extensions/experimental.js +0 -2
- package/lib/Extensions/experimental.js.map +1 -1
- package/lib/MessageBuilder/index.d.ts +5 -5
- package/lib/MessageBuilder/index.d.ts.map +1 -1
- package/lib/MessageBuilder/index.js +12 -3
- package/lib/MessageBuilder/index.js.map +1 -1
- package/lib/Signal/Group/group-session-builder.d.ts +3 -3
- package/lib/Signal/Group/group-session-builder.js +4 -4
- package/lib/Signal/Group/group_cipher.d.ts +2 -2
- package/lib/Signal/Group/group_cipher.js +4 -4
- package/lib/Signal/Group/index.d.ts +11 -11
- package/lib/Signal/Group/index.js +11 -11
- package/lib/Signal/Group/sender-chain-key.d.ts +1 -1
- package/lib/Signal/Group/sender-chain-key.js +1 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -1
- package/lib/Signal/Group/sender-key-distribution-message.js +1 -1
- package/lib/Signal/Group/sender-key-message.d.ts +1 -1
- package/lib/Signal/Group/sender-key-message.js +1 -1
- package/lib/Signal/Group/sender-key-record.d.ts +1 -1
- package/lib/Signal/Group/sender-key-record.js +2 -2
- package/lib/Signal/Group/sender-key-state.d.ts +2 -2
- package/lib/Signal/Group/sender-key-state.js +2 -2
- package/lib/Signal/libsignal.d.ts +3 -3
- package/lib/Signal/libsignal.js +6 -6
- package/lib/Signal/lid-mapping.d.ts +2 -2
- package/lib/Signal/lid-mapping.js +4 -4
- package/lib/Signal/lid-mapping.js.map +1 -1
- package/lib/Socket/Client/index.d.ts +2 -2
- package/lib/Socket/Client/index.js +2 -2
- package/lib/Socket/Client/types.d.ts +1 -1
- package/lib/Socket/Client/websocket.d.ts +1 -1
- package/lib/Socket/Client/websocket.js +2 -2
- package/lib/Socket/business.d.ts +347 -65
- package/lib/Socket/business.d.ts.map +1 -1
- package/lib/Socket/business.js +5 -5
- package/lib/Socket/chats.d.ts +129 -16
- package/lib/Socket/chats.d.ts.map +1 -1
- package/lib/Socket/chats.js +293 -18
- package/lib/Socket/chats.js.map +1 -1
- package/lib/Socket/communities.d.ts +332 -50
- package/lib/Socket/communities.d.ts.map +1 -1
- package/lib/Socket/communities.js +5 -5
- package/lib/Socket/groups.d.ts +133 -27
- package/lib/Socket/groups.d.ts.map +1 -1
- package/lib/Socket/groups.js +4 -4
- package/lib/Socket/index.d.ts +366 -84
- package/lib/Socket/index.d.ts.map +1 -1
- package/lib/Socket/index.js +8 -5
- package/lib/Socket/index.js.map +1 -1
- package/lib/Socket/messages-recv.d.ts +324 -41
- package/lib/Socket/messages-recv.d.ts.map +1 -1
- package/lib/Socket/messages-recv.js +81 -30
- package/lib/Socket/messages-recv.js.map +1 -1
- package/lib/Socket/messages-send.d.ts +340 -44
- package/lib/Socket/messages-send.d.ts.map +1 -1
- package/lib/Socket/messages-send.js +171 -35
- package/lib/Socket/messages-send.js.map +1 -1
- package/lib/Socket/mex.d.ts +1 -1
- package/lib/Socket/mex.js +1 -1
- package/lib/Socket/newsletter.d.ts +324 -39
- package/lib/Socket/newsletter.d.ts.map +1 -1
- package/lib/Socket/newsletter.js +345 -5
- package/lib/Socket/newsletter.js.map +1 -1
- package/lib/Socket/socket.d.ts +24 -11
- package/lib/Socket/socket.d.ts.map +1 -1
- package/lib/Socket/socket.js +89 -36
- package/lib/Socket/socket.js.map +1 -1
- package/lib/Store/index.d.ts +4 -0
- package/lib/Store/index.js +4 -0
- package/lib/Store/make-in-memory-store.d.ts +63 -0
- package/lib/Store/make-in-memory-store.js +397 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/make-ordered-dictionary.js +79 -0
- package/lib/Store/object-repository.d.ts +11 -0
- package/lib/Store/object-repository.js +24 -0
- package/lib/Types/Auth.d.ts +2 -2
- package/lib/Types/Chat.d.ts +19 -6
- package/lib/Types/Chat.d.ts.map +1 -1
- package/lib/Types/Chat.js +7 -0
- package/lib/Types/Chat.js.map +1 -1
- package/lib/Types/Events.d.ts +9 -9
- package/lib/Types/GroupMetadata.d.ts +2 -2
- package/lib/Types/Message.d.ts +70 -6
- package/lib/Types/Message.d.ts.map +1 -1
- package/lib/Types/Message.js +11 -0
- package/lib/Types/Message.js.map +1 -1
- package/lib/Types/Mex.d.ts +68 -39
- package/lib/Types/Mex.d.ts.map +1 -1
- package/lib/Types/Mex.js +66 -0
- package/lib/Types/Mex.js.map +1 -1
- package/lib/Types/Product.d.ts +1 -1
- package/lib/Types/Signal.d.ts +1 -1
- package/lib/Types/Socket.d.ts +50 -5
- package/lib/Types/Socket.d.ts.map +1 -1
- package/lib/Types/Socket.js +1 -1
- package/lib/Types/State.d.ts +1 -1
- package/lib/Types/USync.d.ts +2 -2
- package/lib/Types/USync.js +1 -1
- package/lib/Types/index.d.ts +14 -14
- package/lib/Types/index.js +12 -12
- package/lib/Utils/audio-sticker.d.ts +14 -0
- package/lib/Utils/audio-sticker.js +172 -0
- package/lib/Utils/auth-store.d.ts +30 -0
- package/lib/Utils/auth-store.js +77 -0
- package/lib/Utils/auth-utils.d.ts +2 -2
- package/lib/Utils/auth-utils.js +4 -4
- package/lib/Utils/browser-utils.d.ts +1 -1
- package/lib/Utils/business.d.ts +2 -2
- package/lib/Utils/business.js +3 -3
- package/lib/Utils/chat-theme.d.ts +34 -0
- package/lib/Utils/chat-theme.js +336 -0
- package/lib/Utils/chat-utils.d.ts +3 -3
- package/lib/Utils/chat-utils.js +9 -9
- package/lib/Utils/chat-utils.js.map +1 -1
- package/lib/Utils/companion-reg-client-utils.d.ts +3 -3
- package/lib/Utils/companion-reg-client-utils.js +1 -1
- package/lib/Utils/crypto.d.ts +1 -1
- package/lib/Utils/crypto.js +1 -1
- package/lib/Utils/decode-wa-message.d.ts +18 -4
- package/lib/Utils/decode-wa-message.d.ts.map +1 -1
- package/lib/Utils/decode-wa-message.js +57 -2
- package/lib/Utils/decode-wa-message.js.map +1 -1
- package/lib/Utils/event-buffer.d.ts +4 -3
- package/lib/Utils/event-buffer.d.ts.map +1 -1
- package/lib/Utils/event-buffer.js +7 -8
- package/lib/Utils/event-buffer.js.map +1 -1
- package/lib/Utils/generics.d.ts +5 -4
- package/lib/Utils/generics.d.ts.map +1 -1
- package/lib/Utils/generics.js +13 -22
- package/lib/Utils/generics.js.map +1 -1
- package/lib/Utils/group-metadata-cache.d.ts +4 -0
- package/lib/Utils/group-metadata-cache.js +25 -0
- package/lib/Utils/history.d.ts +1 -1
- package/lib/Utils/history.js +6 -6
- package/lib/Utils/history.js.map +1 -1
- package/lib/Utils/html-app.d.ts +19 -0
- package/lib/Utils/html-app.js +96 -0
- package/lib/Utils/html-multiplayer.d.ts +10 -0
- package/lib/Utils/html-multiplayer.js +94 -0
- package/lib/Utils/identity-change-handler.d.ts +2 -2
- package/lib/Utils/identity-change-handler.js +2 -2
- package/lib/Utils/index.d.ts +46 -21
- package/lib/Utils/index.d.ts.map +1 -1
- package/lib/Utils/index.js +48 -21
- package/lib/Utils/index.js.map +1 -1
- package/lib/Utils/link-preview-metadata.d.ts +47 -0
- package/lib/Utils/link-preview-metadata.js +88 -0
- package/lib/Utils/link-preview.d.ts +2 -2
- package/lib/Utils/link-preview.js +2 -2
- package/lib/Utils/message-retry-manager.d.ts +1 -1
- package/lib/Utils/messages-media.d.ts +35 -6
- package/lib/Utils/messages-media.d.ts.map +1 -1
- package/lib/Utils/messages-media.js +69 -22
- package/lib/Utils/messages-media.js.map +1 -1
- package/lib/Utils/messages.d.ts +45 -5
- package/lib/Utils/messages.d.ts.map +1 -1
- package/lib/Utils/messages.js +123 -32
- package/lib/Utils/messages.js.map +1 -1
- package/lib/Utils/modern-messages.d.ts +150 -0
- package/lib/Utils/modern-messages.js +496 -0
- package/lib/Utils/native-flow.d.ts +11 -0
- package/lib/Utils/native-flow.js +116 -0
- package/lib/Utils/newsletter-status.d.ts +158 -0
- package/lib/Utils/newsletter-status.js +651 -0
- package/lib/Utils/noise-handler.d.ts +3 -3
- package/lib/Utils/noise-handler.js +3 -3
- package/lib/Utils/offline-node-processor.d.ts +1 -1
- package/lib/Utils/optional-media.d.ts +3 -0
- package/lib/Utils/optional-media.js +46 -0
- package/lib/Utils/payment-messages.d.ts +38 -0
- package/lib/Utils/payment-messages.js +160 -0
- package/lib/Utils/pre-key-manager.d.ts +2 -2
- package/lib/Utils/process-message.d.ts +13 -2
- package/lib/Utils/process-message.d.ts.map +1 -1
- package/lib/Utils/process-message.js +87 -7
- package/lib/Utils/process-message.js.map +1 -1
- package/lib/Utils/reporting-utils.d.ts +2 -2
- package/lib/Utils/reporting-utils.js +1 -1
- package/lib/Utils/scheduled-message.d.ts +51 -0
- package/lib/Utils/scheduled-message.js +113 -0
- package/lib/Utils/sender-key-memory.d.ts +19 -0
- package/lib/Utils/sender-key-memory.js +51 -0
- package/lib/Utils/signal.d.ts +4 -4
- package/lib/Utils/signal.js +4 -4
- package/lib/Utils/stanza-ack.d.ts +1 -1
- package/lib/Utils/status-stickers.d.ts +127 -0
- package/lib/Utils/status-stickers.js +261 -0
- package/lib/Utils/sync-action-utils.d.ts +2 -2
- package/lib/Utils/sync-action-utils.js +1 -1
- package/lib/Utils/tc-token-utils.d.ts +2 -2
- package/lib/Utils/tc-token-utils.js +1 -1
- package/lib/Utils/ttl-cache.d.ts +29 -0
- package/lib/Utils/ttl-cache.js +121 -0
- package/lib/Utils/use-mongo-auth-state.d.ts +22 -0
- package/lib/Utils/use-mongo-auth-state.js +68 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +2 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -1
- package/lib/Utils/use-multi-file-auth-state.js +28 -15
- package/lib/Utils/use-multi-file-auth-state.js.map +1 -1
- package/lib/Utils/use-mysql-auth-state.d.ts +20 -0
- package/lib/Utils/use-mysql-auth-state.js +80 -0
- package/lib/Utils/use-nekodb-auth.d.ts +19 -0
- package/lib/Utils/use-nekodb-auth.js +111 -0
- package/lib/Utils/use-postgres-auth-state.d.ts +20 -0
- package/lib/Utils/use-postgres-auth-state.js +80 -0
- package/lib/Utils/use-redis-auth-state.d.ts +20 -0
- package/lib/Utils/use-redis-auth-state.js +90 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +11 -0
- package/lib/Utils/use-single-file-auth-state.js +109 -0
- package/lib/Utils/use-sqlite-auth-state.d.ts +13 -0
- package/lib/Utils/use-sqlite-auth-state.js +121 -0
- package/lib/Utils/username.d.ts +12 -0
- package/lib/Utils/username.js +59 -0
- package/lib/Utils/validate-connection.d.ts +2 -2
- package/lib/Utils/validate-connection.js +5 -5
- package/lib/Utils/voice-recognition.d.ts +53 -0
- package/lib/Utils/voice-recognition.js +219 -0
- package/lib/VoIP/audio-feeder.d.ts +24 -0
- package/lib/VoIP/audio-feeder.js +276 -0
- package/lib/VoIP/index.d.ts +93 -0
- package/lib/VoIP/index.js +998 -0
- package/lib/VoIP/relay-transport.d.ts +5 -0
- package/lib/VoIP/relay-transport.js +824 -0
- package/lib/VoIP/signaling.d.ts +11 -0
- package/lib/VoIP/signaling.js +1099 -0
- package/lib/VoIP/types.d.ts +2 -0
- package/lib/VoIP/types.js +12 -0
- package/lib/VoIP/video-feeder.d.ts +24 -0
- package/lib/VoIP/video-feeder.js +276 -0
- package/lib/VoIP/wasm-engine.d.ts +26 -0
- package/lib/VoIP/wasm-engine.js +1318 -0
- package/lib/VoIP/worker-bootstrap.js +1022 -0
- package/lib/WABinary/decode.d.ts +1 -1
- package/lib/WABinary/decode.js +2 -2
- package/lib/WABinary/encode.d.ts +1 -1
- package/lib/WABinary/encode.js +2 -2
- package/lib/WABinary/generic-utils.d.ts +3 -1
- package/lib/WABinary/generic-utils.d.ts.map +1 -1
- package/lib/WABinary/generic-utils.js +3 -1
- package/lib/WABinary/generic-utils.js.map +1 -1
- package/lib/WABinary/index.d.ts +5 -5
- package/lib/WABinary/index.js +5 -5
- package/lib/WABinary/jid-utils.d.ts +2 -0
- package/lib/WABinary/jid-utils.d.ts.map +1 -1
- package/lib/WABinary/jid-utils.js +3 -1
- package/lib/WABinary/jid-utils.js.map +1 -1
- package/lib/WABinary/types.d.ts +1 -1
- package/lib/WABinary/types.js +1 -1
- package/lib/WAM/BinaryInfo.d.ts +1 -1
- package/lib/WAM/encode.d.ts +1 -1
- package/lib/WAM/encode.js +2 -2
- package/lib/WAM/index.d.ts +3 -3
- package/lib/WAM/index.js +3 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +2 -2
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +2 -2
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/index.d.ts +5 -5
- package/lib/WAUSync/Protocols/index.js +5 -5
- package/lib/WAUSync/USyncQuery.d.ts +3 -3
- package/lib/WAUSync/USyncQuery.js +5 -5
- package/lib/WAUSync/index.d.ts +3 -3
- package/lib/WAUSync/index.js +3 -3
- package/lib/extensions/awang-MessageBuilder.js +1 -1
- package/lib/index.d.ts +14 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +15 -11
- package/lib/index.js.map +1 -1
- package/package.json +78 -31
- package/MIGRASI-QIRO-BAILEYS-RC25.md +0 -102
- package/QIRO-BAILEYS-RC25.md +0 -168
- package/THIRD_PARTY_NOTICES.md +0 -49
- /package/{engine-requirements.js → config/engine-requirements.js} +0 -0
package/lib/Socket/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { UserFacingSocketConfig } from '../Types
|
|
1
|
+
import type { UserFacingSocketConfig } from '../Types';
|
|
2
2
|
declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
3
|
-
communityMetadata: (jid: string) => Promise<import("
|
|
4
|
-
communityCreate: (subject: string, body: string) => Promise<import("
|
|
5
|
-
communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<import("
|
|
3
|
+
communityMetadata: (jid: string) => Promise<import("..").GroupMetadata>;
|
|
4
|
+
communityCreate: (subject: string, body: string) => Promise<import("..").GroupMetadata | null>;
|
|
5
|
+
communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<import("..").GroupMetadata | null>;
|
|
6
6
|
communityLeave: (id: string) => Promise<void>;
|
|
7
7
|
communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
8
8
|
communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
@@ -25,91 +25,267 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
25
25
|
status: string;
|
|
26
26
|
jid: string | undefined;
|
|
27
27
|
}[]>;
|
|
28
|
-
communityParticipantsUpdate: (jid: string, participants: string[], action: import("
|
|
28
|
+
communityParticipantsUpdate: (jid: string, participants: string[], action: import("..").ParticipantAction) => Promise<{
|
|
29
29
|
status: string;
|
|
30
30
|
jid: string | undefined;
|
|
31
|
-
content: import("
|
|
31
|
+
content: import("..").BinaryNode;
|
|
32
32
|
}[]>;
|
|
33
33
|
communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
34
34
|
communityInviteCode: (jid: string) => Promise<string | undefined>;
|
|
35
35
|
communityRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
36
36
|
communityAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
37
37
|
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
|
|
38
|
-
communityAcceptInviteV4: (key: string | import("
|
|
39
|
-
communityGetInviteInfo: (code: string) => Promise<import("
|
|
38
|
+
communityAcceptInviteV4: (key: string | import("..").WAMessageKey, inviteMessage: import("..").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
39
|
+
communityGetInviteInfo: (code: string) => Promise<import("..").GroupMetadata>;
|
|
40
40
|
communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
41
41
|
communitySettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
42
42
|
communityMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
43
43
|
communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
44
44
|
communityFetchAllParticipating: () => Promise<{
|
|
45
|
-
[_: string]: import("
|
|
45
|
+
[_: string]: import("..").GroupMetadata;
|
|
46
46
|
}>;
|
|
47
|
-
logger: import("../Utils/logger
|
|
48
|
-
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("
|
|
49
|
-
getCatalog: ({ jid, limit, cursor }: import("
|
|
50
|
-
products: import("
|
|
47
|
+
logger: import("../Utils/logger").ILogger;
|
|
48
|
+
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("..").OrderDetails>;
|
|
49
|
+
getCatalog: ({ jid, limit, cursor }: import("..").GetCatalogOptions) => Promise<{
|
|
50
|
+
products: import("..").Product[];
|
|
51
51
|
nextPageCursor: string | undefined;
|
|
52
52
|
}>;
|
|
53
53
|
getCollections: (jid?: string, limit?: number) => Promise<{
|
|
54
|
-
collections: import("
|
|
54
|
+
collections: import("..").CatalogCollection[];
|
|
55
55
|
}>;
|
|
56
|
-
productCreate: (create: import("
|
|
56
|
+
productCreate: (create: import("..").ProductCreate) => Promise<import("..").Product>;
|
|
57
57
|
productDelete: (productIds: string[]) => Promise<{
|
|
58
58
|
deleted: number;
|
|
59
59
|
}>;
|
|
60
|
-
productUpdate: (productId: string, update: import("
|
|
61
|
-
updateBussinesProfile: (args: import("../Types/Bussines
|
|
62
|
-
updateCoverPhoto: (photo: import("
|
|
60
|
+
productUpdate: (productId: string, update: import("..").ProductUpdate) => Promise<import("..").Product>;
|
|
61
|
+
updateBussinesProfile: (args: import("../Types/Bussines").UpdateBussinesProfileProps) => Promise<any>;
|
|
62
|
+
updateCoverPhoto: (photo: import("..").WAMediaUpload) => Promise<number>;
|
|
63
63
|
removeCoverPhoto: (id: string) => Promise<any>;
|
|
64
|
-
sendMessageAck: (node: import("
|
|
65
|
-
sendRetryRequest: (node: import("
|
|
64
|
+
sendMessageAck: (node: import("..").BinaryNode, errorCode?: number) => Promise<void>;
|
|
65
|
+
sendRetryRequest: (node: import("..").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
66
66
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
67
|
-
fetchMessageHistory: (count: number, oldestMsgKey: import("
|
|
68
|
-
requestPlaceholderResend: (messageKey: import("
|
|
69
|
-
messageRetryManager: import("
|
|
70
|
-
userDevicesCache: import("
|
|
67
|
+
fetchMessageHistory: (count: number, oldestMsgKey: import("..").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
|
|
68
|
+
requestPlaceholderResend: (messageKey: import("..").WAMessageKey, msgData?: Partial<import("..").WAMessage>) => Promise<string | undefined>;
|
|
69
|
+
messageRetryManager: import("..").MessageRetryManager | null;
|
|
70
|
+
userDevicesCache: import("..").PossiblyExtendedCacheStore | import("@cacheable/node-cache").NodeCache<import("..").JidWithDevice[]>;
|
|
71
71
|
devicesMutex: {
|
|
72
72
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
73
73
|
};
|
|
74
74
|
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
|
|
75
75
|
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
76
|
-
relayMessage: (jid: string, message: import("
|
|
77
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("
|
|
78
|
-
sendReceipts: (keys: import("
|
|
79
|
-
readMessages: (keys: import("
|
|
80
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("
|
|
76
|
+
relayMessage: (jid: string, message: import("..").proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList, mediaType: mediaTypeOverride, messageType: messageTypeOverride, isSecret, protected: protectedDelivery, me: meOnly }: import("..").MessageRelayOptions) => Promise<string>;
|
|
77
|
+
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("..").MessageReceiptType) => Promise<void>;
|
|
78
|
+
sendReceipts: (keys: import("..").WAMessageKey[], type: import("..").MessageReceiptType) => Promise<void>;
|
|
79
|
+
readMessages: (keys: import("..").WAMessageKey[]) => Promise<void>;
|
|
80
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<import("..").MediaConnInfo>;
|
|
81
81
|
getMediaHost: () => string;
|
|
82
|
-
waUploadToServer: import("
|
|
82
|
+
waUploadToServer: import("..").WAMediaUploadFunction;
|
|
83
|
+
outboundResendCache: import("..").CacheStore | import("../Utils/ttl-cache").TTLCache<{
|
|
84
|
+
jid: string;
|
|
85
|
+
message: import("..").proto.IMessage;
|
|
86
|
+
}>;
|
|
87
|
+
sendHD: (jid: string, content: any, options?: any) => Promise<import("..").WAMessage>;
|
|
88
|
+
sendImgVid: (jid: string, content: any, options?: any) => Promise<import("..").WAMessage>;
|
|
89
|
+
sendStAudioMessage: (jid: string, content: any, options?: any) => Promise<import("..").WAMessage>;
|
|
90
|
+
setThemeGroup: (jid: string, content: any, options?: any) => Promise<import("..").WAMessage | import("../Utils/chat-theme").ChatThemeCatalog | undefined>;
|
|
83
91
|
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
84
92
|
[_: string]: string;
|
|
85
93
|
}>;
|
|
86
|
-
sendPeerDataOperationMessage: (pdoMessage: import("
|
|
87
|
-
createParticipantNodes: (recipientJids: string[], message: import("
|
|
88
|
-
nodes: import("
|
|
94
|
+
sendPeerDataOperationMessage: (pdoMessage: import("..").proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
95
|
+
createParticipantNodes: (recipientJids: string[], message: import("..").proto.IMessage, extraAttrs?: import("..").BinaryNode["attrs"], dsmMessage?: import("..").proto.IMessage) => Promise<{
|
|
96
|
+
nodes: import("..").BinaryNode[];
|
|
89
97
|
shouldIncludeDeviceIdentity: boolean;
|
|
90
98
|
}>;
|
|
91
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("
|
|
99
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("..").JidWithDevice & {
|
|
92
100
|
jid: string;
|
|
93
101
|
})[]>;
|
|
94
102
|
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
95
|
-
updateMediaMessage: (message: import("
|
|
96
|
-
sendMessage: (jid: string, content: import("
|
|
97
|
-
|
|
98
|
-
|
|
103
|
+
updateMediaMessage: (message: import("..").WAMessage) => Promise<import("..").WAMessage>;
|
|
104
|
+
sendMessage: (jid: string, content: import("..").AnyMessageContent, options?: import("..").MiscMessageGenerationOptions) => Promise<import("..").WAMessage | undefined>;
|
|
105
|
+
newsletterUpdateUserSetting: (jid: string, type: "FOLLOWER_NOTIFICATIONS" | "ADMIN_NOTIFICATIONS", muted: boolean) => Promise<{
|
|
106
|
+
id: any;
|
|
107
|
+
state: any;
|
|
108
|
+
}>;
|
|
109
|
+
newsletterSubscribed: (options?: {
|
|
110
|
+
fetchStatusMetadata?: boolean;
|
|
111
|
+
fetchWamoSub?: boolean;
|
|
112
|
+
}) => Promise<any>;
|
|
113
|
+
newsletterUpdateReactions: (jid: string, setting: string) => Promise<unknown>;
|
|
114
|
+
newsletterInsights: (jid: string, options?: {
|
|
115
|
+
metrics?: string[];
|
|
116
|
+
}) => Promise<any>;
|
|
117
|
+
newsletterEnforcements: (jid: string, locale?: string) => Promise<{
|
|
118
|
+
adminProfiles: any;
|
|
119
|
+
profilePictureDeletions: any;
|
|
120
|
+
suspensions: any;
|
|
121
|
+
violatingMessages: {
|
|
122
|
+
enforcementId: any;
|
|
123
|
+
createdAt: number | undefined;
|
|
124
|
+
violationCategory: any;
|
|
125
|
+
source: any;
|
|
126
|
+
appealState: any;
|
|
127
|
+
appealCreatedAt: number | undefined;
|
|
128
|
+
appealReasonOptions: any;
|
|
129
|
+
appealFormUrl: any;
|
|
130
|
+
policy: {
|
|
131
|
+
headline: any;
|
|
132
|
+
subtitle: any;
|
|
133
|
+
overview: any;
|
|
134
|
+
explanation: any;
|
|
135
|
+
adminDisclaimer: any;
|
|
136
|
+
} | undefined;
|
|
137
|
+
}[];
|
|
138
|
+
geoSuspensions: {
|
|
139
|
+
enforcementId: any;
|
|
140
|
+
createdAt: number | undefined;
|
|
141
|
+
violationCategory: any;
|
|
142
|
+
source: any;
|
|
143
|
+
appealState: any;
|
|
144
|
+
appealCreatedAt: number | undefined;
|
|
145
|
+
appealReasonOptions: any;
|
|
146
|
+
appealFormUrl: any;
|
|
147
|
+
policy: {
|
|
148
|
+
headline: any;
|
|
149
|
+
subtitle: any;
|
|
150
|
+
overview: any;
|
|
151
|
+
explanation: any;
|
|
152
|
+
adminDisclaimer: any;
|
|
153
|
+
} | undefined;
|
|
154
|
+
}[];
|
|
155
|
+
}>;
|
|
156
|
+
newsletterPendingAdminInvites: (jid: string) => Promise<any>;
|
|
157
|
+
newsletterQuestionResponseState: (jid: string, serverId: string | number, responseServerId: string | number, state: string) => Promise<any>;
|
|
158
|
+
newsletterSendPollVote: (jid: string, parentServerId: string | number, options: string | string[]) => Promise<{
|
|
159
|
+
id: string;
|
|
160
|
+
}>;
|
|
161
|
+
newsletterMyAddOns: (options?: {
|
|
162
|
+
limit?: number;
|
|
163
|
+
jid?: string;
|
|
164
|
+
}) => Promise<{
|
|
165
|
+
jid: string | undefined;
|
|
166
|
+
messages: {
|
|
167
|
+
serverId: number | undefined;
|
|
168
|
+
reaction: {
|
|
169
|
+
code: string | undefined;
|
|
170
|
+
t: number | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
pollVote: {
|
|
173
|
+
t: number | undefined;
|
|
174
|
+
hashes: string[];
|
|
175
|
+
} | undefined;
|
|
176
|
+
}[];
|
|
177
|
+
}[]>;
|
|
178
|
+
newsletterStatusMyAddOns: (options?: {
|
|
179
|
+
limit?: number;
|
|
180
|
+
jid?: string;
|
|
181
|
+
}) => Promise<{
|
|
182
|
+
jid: string | undefined;
|
|
183
|
+
messages: {
|
|
184
|
+
serverId: number | undefined;
|
|
185
|
+
reaction: {
|
|
186
|
+
code: string | undefined;
|
|
187
|
+
t: number | undefined;
|
|
188
|
+
} | undefined;
|
|
189
|
+
pollVote: {
|
|
190
|
+
t: number | undefined;
|
|
191
|
+
hashes: string[];
|
|
192
|
+
} | undefined;
|
|
193
|
+
}[];
|
|
194
|
+
}[]>;
|
|
195
|
+
sendNewsletterStatus: (jid: string, content: any, options?: import("../Utils/newsletter-status").NewsletterStatusSendOptions) => Promise<import("../Utils/newsletter-status").NewsletterStatusSendResult>;
|
|
196
|
+
sendNewsletterStatusReaction: (jid: string, parentServerId: string | number, reaction: string, options?: Pick<import("../Utils/newsletter-status").NewsletterStatusSendOptions, "messageId" | "ackTimeoutMs">) => Promise<import("../Utils/newsletter-status").NewsletterStatusStanzaResult>;
|
|
197
|
+
revokeNewsletterStatus: (jid: string, statusId: string, options?: Pick<import("../Utils/newsletter-status").NewsletterStatusSendOptions, "ackTimeoutMs">) => Promise<import("../Utils/newsletter-status").NewsletterStatusStanzaResult>;
|
|
198
|
+
getNewsletterStatuses: (jid: string, options?: import("../Utils/newsletter-status").NewsletterStatusFetchOptions) => Promise<import("../Utils/newsletter-status").NewsletterStatusList>;
|
|
199
|
+
getNewsletterStatusUpdates: (jid: string, options?: import("../Utils/newsletter-status").NewsletterStatusUpdatesFetchOptions) => Promise<import("../Utils/newsletter-status").NewsletterStatusList>;
|
|
200
|
+
newsletterCanPostStatus: (jid: string) => Promise<{
|
|
201
|
+
canPost: boolean;
|
|
202
|
+
canPostMusic: boolean;
|
|
203
|
+
capabilities: string[];
|
|
204
|
+
}>;
|
|
205
|
+
newsletterAdminInfo: (jid: string) => Promise<{
|
|
206
|
+
id: any;
|
|
207
|
+
adminCount: any;
|
|
208
|
+
adminProfile: {
|
|
209
|
+
id: any;
|
|
210
|
+
name: any;
|
|
211
|
+
picture: {
|
|
212
|
+
id: any;
|
|
213
|
+
directPath: any;
|
|
214
|
+
} | undefined;
|
|
215
|
+
} | undefined;
|
|
216
|
+
adminProfilesEnabled: any;
|
|
217
|
+
}>;
|
|
218
|
+
newsletterPollVoters: (jid: string, serverId: string | number, options?: {
|
|
219
|
+
limit?: number;
|
|
220
|
+
voteHash?: string;
|
|
221
|
+
}) => Promise<any>;
|
|
222
|
+
newsletterReactionSenders: (jid: string, serverId: string | number) => Promise<any>;
|
|
223
|
+
newsletterPinMessages: (jid: string, serverIds: string | number | Array<string | number>) => Promise<any>;
|
|
224
|
+
newsletterUnpinMessages: (jid: string, serverIds: string | number | Array<string | number>) => Promise<any>;
|
|
225
|
+
newsletterReports: (locale?: string) => Promise<any>;
|
|
226
|
+
newsletterAppealReport: (reportId: string | number, reason: string) => Promise<any>;
|
|
227
|
+
newsletterAdminCapabilities: (jid: string) => Promise<any>;
|
|
228
|
+
newsletterLabelAiContent: (jid: string, serverId: string | number, messageType?: string) => Promise<any>;
|
|
229
|
+
newsletterLabelPaidPartnership: (jid: string, serverId: string | number, messageType?: string) => Promise<any>;
|
|
230
|
+
newsletterCreateAdminInvite: (jid: string, userJid: string) => Promise<any>;
|
|
231
|
+
newsletterRevokeAdminInvite: (jid: string, userJid: string) => Promise<any>;
|
|
232
|
+
newsletterAcceptAdminInvite: (jid: string) => Promise<any>;
|
|
233
|
+
newsletterDirectoryList: (options?: any) => Promise<any>;
|
|
234
|
+
newsletterDirectorySearch: (searchText: string, options?: any) => Promise<any>;
|
|
235
|
+
newsletterDirectoryCategories: (options?: any) => Promise<any>;
|
|
236
|
+
newsletterRecommended: (options?: any) => Promise<any>;
|
|
237
|
+
newsletterSimilar: (jid: string, options?: any) => Promise<any>;
|
|
238
|
+
newsletterFollowers: (jid: string, options?: any) => Promise<any>;
|
|
239
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("..").NewsletterMetadata>;
|
|
240
|
+
newsletterUpdate: (jid: string, updates: import("..").NewsletterUpdate) => Promise<unknown>;
|
|
99
241
|
newsletterSubscribers: (jid: string) => Promise<{
|
|
100
242
|
subscribers: number;
|
|
101
243
|
}>;
|
|
102
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("
|
|
244
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("..").NewsletterMetadata | null>;
|
|
103
245
|
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
104
246
|
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
105
247
|
newsletterMute: (jid: string) => Promise<unknown>;
|
|
106
248
|
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
107
249
|
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
108
250
|
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
109
|
-
newsletterUpdatePicture: (jid: string, content: import("
|
|
251
|
+
newsletterUpdatePicture: (jid: string, content: import("..").WAMediaUpload) => Promise<unknown>;
|
|
110
252
|
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
111
253
|
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
112
254
|
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
255
|
+
newsletterFetchMessageUpdates: (jid: string, options?: {
|
|
256
|
+
count?: number;
|
|
257
|
+
since?: number;
|
|
258
|
+
before?: number;
|
|
259
|
+
after?: number;
|
|
260
|
+
}) => Promise<{
|
|
261
|
+
jid: string;
|
|
262
|
+
messages: any[];
|
|
263
|
+
}>;
|
|
264
|
+
newsletterQuestionResponses: (jid: string, serverId: string | number, options?: {
|
|
265
|
+
count?: number;
|
|
266
|
+
before?: number;
|
|
267
|
+
filter?: string;
|
|
268
|
+
searchText?: string;
|
|
269
|
+
}) => Promise<{
|
|
270
|
+
jid: any;
|
|
271
|
+
serverId: number;
|
|
272
|
+
responses: {
|
|
273
|
+
id: string | undefined;
|
|
274
|
+
t: number | undefined;
|
|
275
|
+
isSender: boolean;
|
|
276
|
+
responseServerId: string | undefined;
|
|
277
|
+
sender: {
|
|
278
|
+
lid: string | undefined;
|
|
279
|
+
notifyName: string | undefined;
|
|
280
|
+
pictureDirectPath: string | undefined;
|
|
281
|
+
};
|
|
282
|
+
replied: boolean;
|
|
283
|
+
starred: boolean;
|
|
284
|
+
message: {
|
|
285
|
+
[k: string]: any;
|
|
286
|
+
} | undefined;
|
|
287
|
+
}[];
|
|
288
|
+
}>;
|
|
113
289
|
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
114
290
|
duration: string;
|
|
115
291
|
} | null>;
|
|
@@ -117,8 +293,8 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
117
293
|
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
118
294
|
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
119
295
|
newsletterDelete: (jid: string) => Promise<void>;
|
|
120
|
-
groupMetadata: (jid: string) => Promise<import("
|
|
121
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("
|
|
296
|
+
groupMetadata: (jid: string) => Promise<import("..").GroupMetadata>;
|
|
297
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("..").GroupMetadata>;
|
|
122
298
|
groupLeave: (id: string) => Promise<void>;
|
|
123
299
|
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
124
300
|
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
@@ -128,34 +304,62 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
128
304
|
status: string;
|
|
129
305
|
jid: string | undefined;
|
|
130
306
|
}[]>;
|
|
131
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("
|
|
307
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("..").ParticipantAction) => Promise<{
|
|
132
308
|
status: string;
|
|
133
309
|
jid: string | undefined;
|
|
134
|
-
content: import("
|
|
310
|
+
content: import("..").BinaryNode;
|
|
135
311
|
}[]>;
|
|
136
312
|
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
137
313
|
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
138
314
|
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
139
315
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
140
316
|
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
141
|
-
groupAcceptInviteV4: (key: string | import("
|
|
142
|
-
groupGetInviteInfo: (code: string) => Promise<import("
|
|
317
|
+
groupAcceptInviteV4: (key: string | import("..").WAMessageKey, inviteMessage: import("..").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
318
|
+
groupGetInviteInfo: (code: string) => Promise<import("..").GroupMetadata>;
|
|
143
319
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
144
320
|
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
145
321
|
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
146
322
|
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
147
323
|
groupFetchAllParticipating: () => Promise<{
|
|
148
|
-
[_: string]: import("
|
|
324
|
+
[_: string]: import("..").GroupMetadata;
|
|
149
325
|
}>;
|
|
150
326
|
serverProps: {
|
|
151
327
|
privacyTokenOn1to1: boolean;
|
|
152
328
|
profilePicPrivacyToken: boolean;
|
|
153
329
|
lidTrustedTokenIssueToLid: boolean;
|
|
154
330
|
};
|
|
331
|
+
fetchProps: ({ full }?: {
|
|
332
|
+
full?: boolean;
|
|
333
|
+
}) => Promise<Record<string, string>>;
|
|
334
|
+
getServerProps: ({ refresh }?: {
|
|
335
|
+
refresh?: boolean;
|
|
336
|
+
}) => Promise<Record<string, string>>;
|
|
337
|
+
findUserId: (jid: string) => Promise<{
|
|
338
|
+
lid: string | null;
|
|
339
|
+
phoneNumber: string;
|
|
340
|
+
} | {
|
|
341
|
+
lid: string;
|
|
342
|
+
phoneNumber: string | null;
|
|
343
|
+
}>;
|
|
344
|
+
checkAccountHealth: (jid: string) => Promise<{
|
|
345
|
+
jid: string;
|
|
346
|
+
exists: boolean;
|
|
347
|
+
isBusiness: boolean;
|
|
348
|
+
verifiedName: string | null;
|
|
349
|
+
about: string | null;
|
|
350
|
+
hasProfilePhoto: boolean;
|
|
351
|
+
self: {
|
|
352
|
+
capped?: boolean;
|
|
353
|
+
warned?: boolean;
|
|
354
|
+
unlimited?: boolean;
|
|
355
|
+
remaining?: number | null;
|
|
356
|
+
} | null;
|
|
357
|
+
notes: string[];
|
|
358
|
+
}>;
|
|
155
359
|
createCallLink: (type: "audio" | "video", event?: {
|
|
156
360
|
startTime: number;
|
|
157
361
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
158
|
-
getBotListV2: () => Promise<import("
|
|
362
|
+
getBotListV2: () => Promise<import("..").BotListInfo[]>;
|
|
159
363
|
messageMutex: {
|
|
160
364
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
161
365
|
};
|
|
@@ -168,15 +372,15 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
168
372
|
notificationMutex: {
|
|
169
373
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
170
374
|
};
|
|
171
|
-
upsertMessage: (msg: import("
|
|
172
|
-
appPatch: (patchCreate: import("
|
|
173
|
-
sendPresenceUpdate: (type: import("
|
|
375
|
+
upsertMessage: (msg: import("..").WAMessage, type: import("..").MessageUpsertType) => Promise<void>;
|
|
376
|
+
appPatch: (patchCreate: import("..").WAPatchCreate) => Promise<void>;
|
|
377
|
+
sendPresenceUpdate: (type: import("..").WAPresence, toJid?: string) => Promise<void>;
|
|
174
378
|
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
175
379
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
176
380
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
177
|
-
fetchStatus: (...jids: string[]) => Promise<import("
|
|
178
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("
|
|
179
|
-
updateProfilePicture: (jid: string, content: import("
|
|
381
|
+
fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
|
|
382
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
|
|
383
|
+
updateProfilePicture: (jid: string, content: import("..").WAMediaUpload, dimensions?: {
|
|
180
384
|
width?: number;
|
|
181
385
|
height?: number;
|
|
182
386
|
full?: boolean;
|
|
@@ -187,23 +391,23 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
187
391
|
updateProfileName: (name: string) => Promise<void>;
|
|
188
392
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
189
393
|
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
190
|
-
updateCallPrivacy: (value: import("
|
|
191
|
-
updateMessagesPrivacy: (value: import("
|
|
192
|
-
updateLastSeenPrivacy: (value: import("
|
|
193
|
-
updateOnlinePrivacy: (value: import("
|
|
194
|
-
updateProfilePicturePrivacy: (value: import("
|
|
195
|
-
updateStatusPrivacy: (value: import("
|
|
196
|
-
updateReadReceiptsPrivacy: (value: import("
|
|
197
|
-
updateGroupsAddPrivacy: (value: import("
|
|
394
|
+
updateCallPrivacy: (value: import("..").WAPrivacyCallValue) => Promise<void>;
|
|
395
|
+
updateMessagesPrivacy: (value: import("..").WAPrivacyMessagesValue) => Promise<void>;
|
|
396
|
+
updateLastSeenPrivacy: (value: import("..").WAPrivacyValue) => Promise<void>;
|
|
397
|
+
updateOnlinePrivacy: (value: import("..").WAPrivacyOnlineValue) => Promise<void>;
|
|
398
|
+
updateProfilePicturePrivacy: (value: import("..").WAPrivacyValue) => Promise<void>;
|
|
399
|
+
updateStatusPrivacy: (value: import("..").WAPrivacyValue) => Promise<void>;
|
|
400
|
+
updateReadReceiptsPrivacy: (value: import("..").WAReadReceiptsValue) => Promise<void>;
|
|
401
|
+
updateGroupsAddPrivacy: (value: import("..").WAPrivacyGroupAddValue) => Promise<void>;
|
|
198
402
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
199
|
-
getBusinessProfile: (jid: string) => Promise<import("
|
|
403
|
+
getBusinessProfile: (jid: string) => Promise<import("..").WABusinessProfile | void>;
|
|
200
404
|
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
201
|
-
chatModify: (mod: import("
|
|
405
|
+
chatModify: (mod: import("..").ChatModification, jid: string) => Promise<void>;
|
|
202
406
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
203
|
-
addOrEditContact: (jid: string, contact: import("
|
|
407
|
+
addOrEditContact: (jid: string, contact: import("..").proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
204
408
|
removeContact: (jid: string) => Promise<void>;
|
|
205
|
-
placeholderResendCache: import("
|
|
206
|
-
addLabel: (jid: string, labels: import("../Types/Label
|
|
409
|
+
placeholderResendCache: import("..").CacheStore;
|
|
410
|
+
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>;
|
|
207
411
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
208
412
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
209
413
|
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
@@ -212,12 +416,77 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
212
416
|
id: string;
|
|
213
417
|
fromMe?: boolean;
|
|
214
418
|
}[], star: boolean) => Promise<void>;
|
|
215
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines
|
|
419
|
+
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>;
|
|
216
420
|
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
421
|
+
getUsername: () => Promise<{
|
|
422
|
+
username: any;
|
|
423
|
+
state: any;
|
|
424
|
+
pin: any;
|
|
425
|
+
}>;
|
|
426
|
+
setUsername: (username?: string, options?: {
|
|
427
|
+
reserved?: boolean;
|
|
428
|
+
sessionId?: string;
|
|
429
|
+
source?: string;
|
|
430
|
+
}) => Promise<boolean>;
|
|
431
|
+
removeUsername: () => Promise<boolean>;
|
|
432
|
+
checkUsernameAvailability: (username: string, options?: {
|
|
433
|
+
sessionId?: string;
|
|
434
|
+
source?: string;
|
|
435
|
+
}) => Promise<{
|
|
436
|
+
available: boolean;
|
|
437
|
+
suggestions: any;
|
|
438
|
+
response: any;
|
|
439
|
+
}>;
|
|
440
|
+
setUsernamePin: (pin: string) => Promise<boolean>;
|
|
441
|
+
removeUsernamePin: () => Promise<boolean>;
|
|
442
|
+
updateTextStatus: (text: string, options?: {
|
|
443
|
+
ephemeralDurationSec?: number;
|
|
444
|
+
emoji?: string;
|
|
445
|
+
}) => Promise<any>;
|
|
446
|
+
fetchTextStatus: (jids: string | string[]) => Promise<any>;
|
|
447
|
+
fetchAbout: (jid: string) => Promise<{
|
|
448
|
+
jid: string;
|
|
449
|
+
status: any;
|
|
450
|
+
response: any;
|
|
451
|
+
}>;
|
|
452
|
+
fetchUserNotices: (since?: number) => Promise<{
|
|
453
|
+
id: string | undefined;
|
|
454
|
+
stage: string | undefined;
|
|
455
|
+
t: string | undefined;
|
|
456
|
+
version: string | undefined;
|
|
457
|
+
type: string | undefined;
|
|
458
|
+
}[]>;
|
|
459
|
+
updateUserNoticeStage: (noticeId: string | number, stage: string | number) => Promise<void>;
|
|
460
|
+
fetchOptOutList: (options?: {
|
|
461
|
+
category?: string;
|
|
462
|
+
dhash?: string;
|
|
463
|
+
}) => Promise<{
|
|
464
|
+
[key: string]: string;
|
|
465
|
+
}[]>;
|
|
466
|
+
updateOptOut: (input: {
|
|
467
|
+
jid: string;
|
|
468
|
+
category: string;
|
|
469
|
+
action: string;
|
|
470
|
+
dhash?: string;
|
|
471
|
+
reason?: string;
|
|
472
|
+
entryPoint?: string;
|
|
473
|
+
signupId?: string;
|
|
474
|
+
duration?: number;
|
|
475
|
+
}) => Promise<void>;
|
|
476
|
+
fetchPushSettings: () => Promise<{
|
|
477
|
+
[key: string]: string;
|
|
478
|
+
}>;
|
|
479
|
+
fetchServerLinkPreview: (url: string) => Promise<any>;
|
|
480
|
+
reportSpam: (jid: string, options?: import("..").SpamReportOptions) => Promise<{
|
|
481
|
+
jid: string | undefined;
|
|
482
|
+
flow: string | undefined;
|
|
483
|
+
reported: boolean;
|
|
484
|
+
node: import("..").BinaryNode;
|
|
485
|
+
}>;
|
|
217
486
|
type: "md";
|
|
218
|
-
ws: import("./Client
|
|
219
|
-
ev: import("
|
|
220
|
-
process(handler: (events: Partial<import("
|
|
487
|
+
ws: import("./Client").WebSocketClient;
|
|
488
|
+
ev: import("..").BaileysEventEmitter & {
|
|
489
|
+
process(handler: (events: Partial<import("..").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
221
490
|
buffer(): void;
|
|
222
491
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
223
492
|
flush(): boolean;
|
|
@@ -225,17 +494,17 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
225
494
|
destroy(): void;
|
|
226
495
|
};
|
|
227
496
|
authState: {
|
|
228
|
-
creds: import("
|
|
229
|
-
keys: import("
|
|
497
|
+
creds: import("..").AuthenticationCreds;
|
|
498
|
+
keys: import("..").SignalKeyStoreWithTransaction;
|
|
230
499
|
};
|
|
231
|
-
signalRepository: import("
|
|
232
|
-
user: import("
|
|
500
|
+
signalRepository: import("..").SignalRepositoryWithLIDStore;
|
|
501
|
+
user: import("..").Contact | undefined;
|
|
233
502
|
generateMessageTag: () => string;
|
|
234
|
-
query: (node: import("
|
|
503
|
+
query: (node: import("..").BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
235
504
|
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
236
505
|
waitForSocketOpen: () => Promise<void>;
|
|
237
506
|
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
238
|
-
sendNode: (frame: import("
|
|
507
|
+
sendNode: (frame: import("..").BinaryNode) => Promise<void>;
|
|
239
508
|
logout: (msg?: string) => Promise<void>;
|
|
240
509
|
end: (error: Error | undefined) => Promise<void>;
|
|
241
510
|
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
@@ -245,18 +514,31 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
245
514
|
digestKeyBundle: () => Promise<void>;
|
|
246
515
|
rotateSignedPreKey: () => Promise<void>;
|
|
247
516
|
requestPairingCode: (phoneNumber: string, customPairingCode?: string | null) => Promise<string>;
|
|
248
|
-
|
|
517
|
+
cancelPairingCode: () => boolean;
|
|
518
|
+
updateServerTimeOffset: ({ attrs }: import("..").BinaryNode) => void;
|
|
249
519
|
sendUnifiedSession: () => Promise<void>;
|
|
250
|
-
wamBuffer: import("
|
|
251
|
-
waitForConnectionUpdate: (check: (u: Partial<import("
|
|
520
|
+
wamBuffer: import("..").BinaryInfo;
|
|
521
|
+
waitForConnectionUpdate: (check: (u: Partial<import("..").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
252
522
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
253
|
-
executeUSyncQuery: (usyncQuery: import("
|
|
523
|
+
executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>;
|
|
254
524
|
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
255
525
|
jid: string;
|
|
256
526
|
exists: boolean;
|
|
257
527
|
}[] | undefined>;
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
528
|
+
onWhatsAppUsername: (...usernames: Array<string | {
|
|
529
|
+
username?: string;
|
|
530
|
+
pin?: string;
|
|
531
|
+
usernameKey?: string;
|
|
532
|
+
}>) => Promise<{
|
|
533
|
+
jid: string;
|
|
534
|
+
exists: boolean;
|
|
535
|
+
}[]>;
|
|
536
|
+
getUsernames: (...jids: string[]) => Promise<{
|
|
537
|
+
jid: string;
|
|
538
|
+
username: unknown;
|
|
539
|
+
}[]>;
|
|
540
|
+
fetchAccountReachoutTimelock: () => Promise<import("..").ReachoutTimelockState>;
|
|
541
|
+
fetchNewChatMessageCap: () => Promise<import("..").NewChatMessageCapInfo>;
|
|
542
|
+
} & import("..").AdvancedSocketMethods & import("..").ExperimentalSocketMethods;
|
|
261
543
|
export default makeWASocket;
|
|
262
544
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Socket/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Socket/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAOtD,QAAA,MAAM,YAAY,GAAI,QAAQ,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgBmkK,CAAC;oBAAuB,CAAC;;;;eAAyqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAAiiX,CAAC;WAAa,CAAC;;;;;;;;;;;;;;;;aAA8F,CAAC;WAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAAryL,CAAC;gBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAAiwT,CAAC;aAAe,CAAC;cAAgB,CAAC;aAAe,CAAC;;;;;;aAAo6B,CAAC;cAAgB,CAAC;cAAgB,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAA6hR,CAAC;;;eAAx6pB,CAAC;;;;;;;;;;;;;;;;;kBAAyuC,CAAC;kBAAiB,CAAC;qBAAoB,CAAC;qBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAAtrG,CAAC;cAAgB,CAAC;YAAc,CAAC;eAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA8hyB,CAAC;;;;;;;;;;gBAA6kX,CAAC;iBAAoB,CAAC;cAAgB,CAAC;;;;iBAAqhB,CAAC;cAAgB,CAAC;;;;;;;;;4BAA+gC,CAAC;aAAe,CAAC;;;;;;;;;;;;;;;;;gBAA84D,CAAC;aAAe,CAAC;;;;;;;;aAA6gB,CAAC;cAAgB,CAAC;kBAAoB,CAAC;gBAAkB,CAAC;gBAAkB,CAAC;;;;;;;;;;;;;;;;;0DAAjugD,GAAG,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAitP,CAAC;WAAa,CAAC;mBAAqB,CAAC;;;;;;;;;;;+EAHv/Q,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/lib/Socket/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { DEFAULT_CONNECTION_CONFIG } from '../Defaults
|
|
2
|
-
import { makeCommunitiesSocket } from './communities
|
|
3
|
-
import { attachAdvancedSocketMethods } from '../Extensions/advanced
|
|
4
|
-
import { attachExperimentalSocketMethods } from '../Extensions/experimental
|
|
1
|
+
import { DEFAULT_CONNECTION_CONFIG } from '../Defaults';
|
|
2
|
+
import { makeCommunitiesSocket } from './communities';
|
|
3
|
+
import { attachAdvancedSocketMethods } from '../Extensions/advanced';
|
|
4
|
+
import { attachExperimentalSocketMethods } from '../Extensions/experimental';
|
|
5
|
+
import { bindVoiceRecognition } from '../Utils/voice-recognition.js';
|
|
5
6
|
// export the last socket layer
|
|
6
7
|
const makeWASocket = (config) => {
|
|
7
8
|
const newConfig = {
|
|
@@ -14,7 +15,9 @@ const makeWASocket = (config) => {
|
|
|
14
15
|
if (config.enableRecentMessageCache === undefined)
|
|
15
16
|
newConfig.enableRecentMessageCache = false;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
const socket = attachExperimentalSocketMethods(attachAdvancedSocketMethods(makeCommunitiesSocket(newConfig), newConfig.autoBizNode !== false));
|
|
19
|
+
bindVoiceRecognition(socket, newConfig);
|
|
20
|
+
return socket;
|
|
18
21
|
};
|
|
19
22
|
export default makeWASocket;
|
|
20
23
|
//# sourceMappingURL=index.js.map
|