@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import { type GroupMetadata, type ParticipantAction, type SocketConfig, type WAMessageKey } from '../Types
|
|
3
|
-
import { type BinaryNode } from '../WABinary
|
|
2
|
+
import { type GroupMetadata, type ParticipantAction, type SocketConfig, type WAMessageKey } from '../Types';
|
|
3
|
+
import { type BinaryNode } from '../WABinary';
|
|
4
4
|
export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
5
5
|
communityMetadata: (jid: string) => Promise<GroupMetadata>;
|
|
6
6
|
communityCreate: (subject: string, body: string) => Promise<GroupMetadata | null>;
|
|
@@ -57,42 +57,50 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
57
57
|
communityFetchAllParticipating: () => Promise<{
|
|
58
58
|
[_: string]: GroupMetadata;
|
|
59
59
|
}>;
|
|
60
|
-
logger: import("../Utils/logger
|
|
61
|
-
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types
|
|
62
|
-
getCatalog: ({ jid, limit, cursor }: import("../Types
|
|
63
|
-
products: import("../Types
|
|
60
|
+
logger: import("../Utils/logger").ILogger;
|
|
61
|
+
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>;
|
|
62
|
+
getCatalog: ({ jid, limit, cursor }: import("../Types").GetCatalogOptions) => Promise<{
|
|
63
|
+
products: import("../Types").Product[];
|
|
64
64
|
nextPageCursor: string | undefined;
|
|
65
65
|
}>;
|
|
66
66
|
getCollections: (jid?: string, limit?: number) => Promise<{
|
|
67
|
-
collections: import("../Types
|
|
67
|
+
collections: import("../Types").CatalogCollection[];
|
|
68
68
|
}>;
|
|
69
|
-
productCreate: (create: import("../Types
|
|
69
|
+
productCreate: (create: import("../Types").ProductCreate) => Promise<import("../Types").Product>;
|
|
70
70
|
productDelete: (productIds: string[]) => Promise<{
|
|
71
71
|
deleted: number;
|
|
72
72
|
}>;
|
|
73
|
-
productUpdate: (productId: string, update: import("../Types
|
|
73
|
+
productUpdate: (productId: string, update: import("../Types").ProductUpdate) => Promise<import("../Types").Product>;
|
|
74
74
|
updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<any>;
|
|
75
|
-
updateCoverPhoto: (photo: import("../Types
|
|
75
|
+
updateCoverPhoto: (photo: import("../Types").WAMediaUpload) => Promise<number>;
|
|
76
76
|
removeCoverPhoto: (id: string) => Promise<any>;
|
|
77
77
|
sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
|
|
78
78
|
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
79
79
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
80
80
|
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
|
|
81
|
-
requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<import("../Types
|
|
82
|
-
messageRetryManager: import("../Utils
|
|
83
|
-
userDevicesCache: import("../Types
|
|
81
|
+
requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<import("../Types").WAMessage>) => Promise<string | undefined>;
|
|
82
|
+
messageRetryManager: import("../Utils").MessageRetryManager | null;
|
|
83
|
+
userDevicesCache: import("../Types").PossiblyExtendedCacheStore | import("@cacheable/node-cache").NodeCache<import("../WABinary").JidWithDevice[]>;
|
|
84
84
|
devicesMutex: {
|
|
85
85
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
86
86
|
};
|
|
87
87
|
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
|
|
88
88
|
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
89
|
-
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList, isSecret, protected: protectedDelivery, me: meOnly }: import("../Types
|
|
90
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types
|
|
91
|
-
sendReceipts: (keys: WAMessageKey[], type: import("../Types
|
|
89
|
+
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList, mediaType: mediaTypeOverride, messageType: messageTypeOverride, isSecret, protected: protectedDelivery, me: meOnly }: import("../Types").MessageRelayOptions) => Promise<string>;
|
|
90
|
+
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>;
|
|
91
|
+
sendReceipts: (keys: WAMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>;
|
|
92
92
|
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
93
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types
|
|
93
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
|
|
94
94
|
getMediaHost: () => string;
|
|
95
|
-
waUploadToServer: import("../Types
|
|
95
|
+
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
|
96
|
+
outboundResendCache: import("../Types").CacheStore | import("../Utils/ttl-cache.js").TTLCache<{
|
|
97
|
+
jid: string;
|
|
98
|
+
message: proto.IMessage;
|
|
99
|
+
}>;
|
|
100
|
+
sendHD: (jid: string, content: any, options?: any) => Promise<import("../Types").WAMessage>;
|
|
101
|
+
sendImgVid: (jid: string, content: any, options?: any) => Promise<import("../Types").WAMessage>;
|
|
102
|
+
sendStAudioMessage: (jid: string, content: any, options?: any) => Promise<import("../Types").WAMessage>;
|
|
103
|
+
setThemeGroup: (jid: string, content: any, options?: any) => Promise<import("../Types").WAMessage | import("../Utils/chat-theme.js").ChatThemeCatalog | undefined>;
|
|
96
104
|
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
97
105
|
[_: string]: string;
|
|
98
106
|
}>;
|
|
@@ -101,28 +109,196 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
101
109
|
nodes: BinaryNode[];
|
|
102
110
|
shouldIncludeDeviceIdentity: boolean;
|
|
103
111
|
}>;
|
|
104
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary
|
|
112
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary").JidWithDevice & {
|
|
105
113
|
jid: string;
|
|
106
114
|
})[]>;
|
|
107
115
|
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
108
|
-
updateMediaMessage: (message: import("../Types
|
|
109
|
-
sendMessage: (jid: string, content: import("../Types
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
updateMediaMessage: (message: import("../Types").WAMessage) => Promise<import("../Types").WAMessage>;
|
|
117
|
+
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAMessage | undefined>;
|
|
118
|
+
newsletterUpdateUserSetting: (jid: string, type: "FOLLOWER_NOTIFICATIONS" | "ADMIN_NOTIFICATIONS", muted: boolean) => Promise<{
|
|
119
|
+
id: any;
|
|
120
|
+
state: any;
|
|
121
|
+
}>;
|
|
122
|
+
newsletterSubscribed: (options?: {
|
|
123
|
+
fetchStatusMetadata?: boolean;
|
|
124
|
+
fetchWamoSub?: boolean;
|
|
125
|
+
}) => Promise<any>;
|
|
126
|
+
newsletterUpdateReactions: (jid: string, setting: string) => Promise<unknown>;
|
|
127
|
+
newsletterInsights: (jid: string, options?: {
|
|
128
|
+
metrics?: string[];
|
|
129
|
+
}) => Promise<any>;
|
|
130
|
+
newsletterEnforcements: (jid: string, locale?: string) => Promise<{
|
|
131
|
+
adminProfiles: any;
|
|
132
|
+
profilePictureDeletions: any;
|
|
133
|
+
suspensions: any;
|
|
134
|
+
violatingMessages: {
|
|
135
|
+
enforcementId: any;
|
|
136
|
+
createdAt: number | undefined;
|
|
137
|
+
violationCategory: any;
|
|
138
|
+
source: any;
|
|
139
|
+
appealState: any;
|
|
140
|
+
appealCreatedAt: number | undefined;
|
|
141
|
+
appealReasonOptions: any;
|
|
142
|
+
appealFormUrl: any;
|
|
143
|
+
policy: {
|
|
144
|
+
headline: any;
|
|
145
|
+
subtitle: any;
|
|
146
|
+
overview: any;
|
|
147
|
+
explanation: any;
|
|
148
|
+
adminDisclaimer: any;
|
|
149
|
+
} | undefined;
|
|
150
|
+
}[];
|
|
151
|
+
geoSuspensions: {
|
|
152
|
+
enforcementId: any;
|
|
153
|
+
createdAt: number | undefined;
|
|
154
|
+
violationCategory: any;
|
|
155
|
+
source: any;
|
|
156
|
+
appealState: any;
|
|
157
|
+
appealCreatedAt: number | undefined;
|
|
158
|
+
appealReasonOptions: any;
|
|
159
|
+
appealFormUrl: any;
|
|
160
|
+
policy: {
|
|
161
|
+
headline: any;
|
|
162
|
+
subtitle: any;
|
|
163
|
+
overview: any;
|
|
164
|
+
explanation: any;
|
|
165
|
+
adminDisclaimer: any;
|
|
166
|
+
} | undefined;
|
|
167
|
+
}[];
|
|
168
|
+
}>;
|
|
169
|
+
newsletterPendingAdminInvites: (jid: string) => Promise<any>;
|
|
170
|
+
newsletterQuestionResponseState: (jid: string, serverId: string | number, responseServerId: string | number, state: string) => Promise<any>;
|
|
171
|
+
newsletterSendPollVote: (jid: string, parentServerId: string | number, options: string | string[]) => Promise<{
|
|
172
|
+
id: string;
|
|
173
|
+
}>;
|
|
174
|
+
newsletterMyAddOns: (options?: {
|
|
175
|
+
limit?: number;
|
|
176
|
+
jid?: string;
|
|
177
|
+
}) => Promise<{
|
|
178
|
+
jid: string | undefined;
|
|
179
|
+
messages: {
|
|
180
|
+
serverId: number | undefined;
|
|
181
|
+
reaction: {
|
|
182
|
+
code: string | undefined;
|
|
183
|
+
t: number | undefined;
|
|
184
|
+
} | undefined;
|
|
185
|
+
pollVote: {
|
|
186
|
+
t: number | undefined;
|
|
187
|
+
hashes: string[];
|
|
188
|
+
} | undefined;
|
|
189
|
+
}[];
|
|
190
|
+
}[]>;
|
|
191
|
+
newsletterStatusMyAddOns: (options?: {
|
|
192
|
+
limit?: number;
|
|
193
|
+
jid?: string;
|
|
194
|
+
}) => Promise<{
|
|
195
|
+
jid: string | undefined;
|
|
196
|
+
messages: {
|
|
197
|
+
serverId: number | undefined;
|
|
198
|
+
reaction: {
|
|
199
|
+
code: string | undefined;
|
|
200
|
+
t: number | undefined;
|
|
201
|
+
} | undefined;
|
|
202
|
+
pollVote: {
|
|
203
|
+
t: number | undefined;
|
|
204
|
+
hashes: string[];
|
|
205
|
+
} | undefined;
|
|
206
|
+
}[];
|
|
207
|
+
}[]>;
|
|
208
|
+
sendNewsletterStatus: (jid: string, content: any, options?: import("../Utils/newsletter-status.js").NewsletterStatusSendOptions) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusSendResult>;
|
|
209
|
+
sendNewsletterStatusReaction: (jid: string, parentServerId: string | number, reaction: string, options?: Pick<import("../Utils/newsletter-status.js").NewsletterStatusSendOptions, "messageId" | "ackTimeoutMs">) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusStanzaResult>;
|
|
210
|
+
revokeNewsletterStatus: (jid: string, statusId: string, options?: Pick<import("../Utils/newsletter-status.js").NewsletterStatusSendOptions, "ackTimeoutMs">) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusStanzaResult>;
|
|
211
|
+
getNewsletterStatuses: (jid: string, options?: import("../Utils/newsletter-status.js").NewsletterStatusFetchOptions) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusList>;
|
|
212
|
+
getNewsletterStatusUpdates: (jid: string, options?: import("../Utils/newsletter-status.js").NewsletterStatusUpdatesFetchOptions) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusList>;
|
|
213
|
+
newsletterCanPostStatus: (jid: string) => Promise<{
|
|
214
|
+
canPost: boolean;
|
|
215
|
+
canPostMusic: boolean;
|
|
216
|
+
capabilities: string[];
|
|
217
|
+
}>;
|
|
218
|
+
newsletterAdminInfo: (jid: string) => Promise<{
|
|
219
|
+
id: any;
|
|
220
|
+
adminCount: any;
|
|
221
|
+
adminProfile: {
|
|
222
|
+
id: any;
|
|
223
|
+
name: any;
|
|
224
|
+
picture: {
|
|
225
|
+
id: any;
|
|
226
|
+
directPath: any;
|
|
227
|
+
} | undefined;
|
|
228
|
+
} | undefined;
|
|
229
|
+
adminProfilesEnabled: any;
|
|
230
|
+
}>;
|
|
231
|
+
newsletterPollVoters: (jid: string, serverId: string | number, options?: {
|
|
232
|
+
limit?: number;
|
|
233
|
+
voteHash?: string;
|
|
234
|
+
}) => Promise<any>;
|
|
235
|
+
newsletterReactionSenders: (jid: string, serverId: string | number) => Promise<any>;
|
|
236
|
+
newsletterPinMessages: (jid: string, serverIds: string | number | Array<string | number>) => Promise<any>;
|
|
237
|
+
newsletterUnpinMessages: (jid: string, serverIds: string | number | Array<string | number>) => Promise<any>;
|
|
238
|
+
newsletterReports: (locale?: string) => Promise<any>;
|
|
239
|
+
newsletterAppealReport: (reportId: string | number, reason: string) => Promise<any>;
|
|
240
|
+
newsletterAdminCapabilities: (jid: string) => Promise<any>;
|
|
241
|
+
newsletterLabelAiContent: (jid: string, serverId: string | number, messageType?: string) => Promise<any>;
|
|
242
|
+
newsletterLabelPaidPartnership: (jid: string, serverId: string | number, messageType?: string) => Promise<any>;
|
|
243
|
+
newsletterCreateAdminInvite: (jid: string, userJid: string) => Promise<any>;
|
|
244
|
+
newsletterRevokeAdminInvite: (jid: string, userJid: string) => Promise<any>;
|
|
245
|
+
newsletterAcceptAdminInvite: (jid: string) => Promise<any>;
|
|
246
|
+
newsletterDirectoryList: (options?: any) => Promise<any>;
|
|
247
|
+
newsletterDirectorySearch: (searchText: string, options?: any) => Promise<any>;
|
|
248
|
+
newsletterDirectoryCategories: (options?: any) => Promise<any>;
|
|
249
|
+
newsletterRecommended: (options?: any) => Promise<any>;
|
|
250
|
+
newsletterSimilar: (jid: string, options?: any) => Promise<any>;
|
|
251
|
+
newsletterFollowers: (jid: string, options?: any) => Promise<any>;
|
|
252
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
253
|
+
newsletterUpdate: (jid: string, updates: import("../Types").NewsletterUpdate) => Promise<unknown>;
|
|
112
254
|
newsletterSubscribers: (jid: string) => Promise<{
|
|
113
255
|
subscribers: number;
|
|
114
256
|
}>;
|
|
115
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types
|
|
257
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types").NewsletterMetadata | null>;
|
|
116
258
|
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
117
259
|
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
118
260
|
newsletterMute: (jid: string) => Promise<unknown>;
|
|
119
261
|
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
120
262
|
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
121
263
|
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
122
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types
|
|
264
|
+
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<unknown>;
|
|
123
265
|
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
124
266
|
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
125
267
|
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
268
|
+
newsletterFetchMessageUpdates: (jid: string, options?: {
|
|
269
|
+
count?: number;
|
|
270
|
+
since?: number;
|
|
271
|
+
before?: number;
|
|
272
|
+
after?: number;
|
|
273
|
+
}) => Promise<{
|
|
274
|
+
jid: string;
|
|
275
|
+
messages: any[];
|
|
276
|
+
}>;
|
|
277
|
+
newsletterQuestionResponses: (jid: string, serverId: string | number, options?: {
|
|
278
|
+
count?: number;
|
|
279
|
+
before?: number;
|
|
280
|
+
filter?: string;
|
|
281
|
+
searchText?: string;
|
|
282
|
+
}) => Promise<{
|
|
283
|
+
jid: any;
|
|
284
|
+
serverId: number;
|
|
285
|
+
responses: {
|
|
286
|
+
id: string | undefined;
|
|
287
|
+
t: number | undefined;
|
|
288
|
+
isSender: boolean;
|
|
289
|
+
responseServerId: string | undefined;
|
|
290
|
+
sender: {
|
|
291
|
+
lid: string | undefined;
|
|
292
|
+
notifyName: string | undefined;
|
|
293
|
+
pictureDirectPath: string | undefined;
|
|
294
|
+
};
|
|
295
|
+
replied: boolean;
|
|
296
|
+
starred: boolean;
|
|
297
|
+
message: {
|
|
298
|
+
[k: string]: any;
|
|
299
|
+
} | undefined;
|
|
300
|
+
}[];
|
|
301
|
+
}>;
|
|
126
302
|
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
127
303
|
duration: string;
|
|
128
304
|
} | null>;
|
|
@@ -165,10 +341,38 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
165
341
|
profilePicPrivacyToken: boolean;
|
|
166
342
|
lidTrustedTokenIssueToLid: boolean;
|
|
167
343
|
};
|
|
344
|
+
fetchProps: ({ full }?: {
|
|
345
|
+
full?: boolean;
|
|
346
|
+
}) => Promise<Record<string, string>>;
|
|
347
|
+
getServerProps: ({ refresh }?: {
|
|
348
|
+
refresh?: boolean;
|
|
349
|
+
}) => Promise<Record<string, string>>;
|
|
350
|
+
findUserId: (jid: string) => Promise<{
|
|
351
|
+
lid: string | null;
|
|
352
|
+
phoneNumber: string;
|
|
353
|
+
} | {
|
|
354
|
+
lid: string;
|
|
355
|
+
phoneNumber: string | null;
|
|
356
|
+
}>;
|
|
357
|
+
checkAccountHealth: (jid: string) => Promise<{
|
|
358
|
+
jid: string;
|
|
359
|
+
exists: boolean;
|
|
360
|
+
isBusiness: boolean;
|
|
361
|
+
verifiedName: string | null;
|
|
362
|
+
about: string | null;
|
|
363
|
+
hasProfilePhoto: boolean;
|
|
364
|
+
self: {
|
|
365
|
+
capped?: boolean;
|
|
366
|
+
warned?: boolean;
|
|
367
|
+
unlimited?: boolean;
|
|
368
|
+
remaining?: number | null;
|
|
369
|
+
} | null;
|
|
370
|
+
notes: string[];
|
|
371
|
+
}>;
|
|
168
372
|
createCallLink: (type: "audio" | "video", event?: {
|
|
169
373
|
startTime: number;
|
|
170
374
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
171
|
-
getBotListV2: () => Promise<import("../Types
|
|
375
|
+
getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
|
|
172
376
|
messageMutex: {
|
|
173
377
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
174
378
|
};
|
|
@@ -181,15 +385,15 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
181
385
|
notificationMutex: {
|
|
182
386
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
183
387
|
};
|
|
184
|
-
upsertMessage: (msg: import("../Types
|
|
185
|
-
appPatch: (patchCreate: import("../Types
|
|
186
|
-
sendPresenceUpdate: (type: import("../Types
|
|
388
|
+
upsertMessage: (msg: import("../Types").WAMessage, type: import("../Types").MessageUpsertType) => Promise<void>;
|
|
389
|
+
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
|
|
390
|
+
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string) => Promise<void>;
|
|
187
391
|
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
188
392
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
189
393
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
190
394
|
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
191
395
|
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
192
|
-
updateProfilePicture: (jid: string, content: import("../Types
|
|
396
|
+
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload, dimensions?: {
|
|
193
397
|
width?: number;
|
|
194
398
|
height?: number;
|
|
195
399
|
full?: boolean;
|
|
@@ -200,22 +404,22 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
200
404
|
updateProfileName: (name: string) => Promise<void>;
|
|
201
405
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
202
406
|
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
203
|
-
updateCallPrivacy: (value: import("../Types
|
|
204
|
-
updateMessagesPrivacy: (value: import("../Types
|
|
205
|
-
updateLastSeenPrivacy: (value: import("../Types
|
|
206
|
-
updateOnlinePrivacy: (value: import("../Types
|
|
207
|
-
updateProfilePicturePrivacy: (value: import("../Types
|
|
208
|
-
updateStatusPrivacy: (value: import("../Types
|
|
209
|
-
updateReadReceiptsPrivacy: (value: import("../Types
|
|
210
|
-
updateGroupsAddPrivacy: (value: import("../Types
|
|
407
|
+
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
|
|
408
|
+
updateMessagesPrivacy: (value: import("../Types").WAPrivacyMessagesValue) => Promise<void>;
|
|
409
|
+
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
410
|
+
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
|
411
|
+
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
412
|
+
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
413
|
+
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
|
414
|
+
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
|
|
211
415
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
212
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types
|
|
416
|
+
getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
|
|
213
417
|
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
214
|
-
chatModify: (mod: import("../Types
|
|
418
|
+
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
215
419
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
216
420
|
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
217
421
|
removeContact: (jid: string) => Promise<void>;
|
|
218
|
-
placeholderResendCache: import("../Types
|
|
422
|
+
placeholderResendCache: import("../Types").CacheStore;
|
|
219
423
|
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
220
424
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
221
425
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
@@ -227,10 +431,75 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
227
431
|
}[], star: boolean) => Promise<void>;
|
|
228
432
|
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
229
433
|
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
434
|
+
getUsername: () => Promise<{
|
|
435
|
+
username: any;
|
|
436
|
+
state: any;
|
|
437
|
+
pin: any;
|
|
438
|
+
}>;
|
|
439
|
+
setUsername: (username?: string, options?: {
|
|
440
|
+
reserved?: boolean;
|
|
441
|
+
sessionId?: string;
|
|
442
|
+
source?: string;
|
|
443
|
+
}) => Promise<boolean>;
|
|
444
|
+
removeUsername: () => Promise<boolean>;
|
|
445
|
+
checkUsernameAvailability: (username: string, options?: {
|
|
446
|
+
sessionId?: string;
|
|
447
|
+
source?: string;
|
|
448
|
+
}) => Promise<{
|
|
449
|
+
available: boolean;
|
|
450
|
+
suggestions: any;
|
|
451
|
+
response: any;
|
|
452
|
+
}>;
|
|
453
|
+
setUsernamePin: (pin: string) => Promise<boolean>;
|
|
454
|
+
removeUsernamePin: () => Promise<boolean>;
|
|
455
|
+
updateTextStatus: (text: string, options?: {
|
|
456
|
+
ephemeralDurationSec?: number;
|
|
457
|
+
emoji?: string;
|
|
458
|
+
}) => Promise<any>;
|
|
459
|
+
fetchTextStatus: (jids: string | string[]) => Promise<any>;
|
|
460
|
+
fetchAbout: (jid: string) => Promise<{
|
|
461
|
+
jid: string;
|
|
462
|
+
status: any;
|
|
463
|
+
response: any;
|
|
464
|
+
}>;
|
|
465
|
+
fetchUserNotices: (since?: number) => Promise<{
|
|
466
|
+
id: string | undefined;
|
|
467
|
+
stage: string | undefined;
|
|
468
|
+
t: string | undefined;
|
|
469
|
+
version: string | undefined;
|
|
470
|
+
type: string | undefined;
|
|
471
|
+
}[]>;
|
|
472
|
+
updateUserNoticeStage: (noticeId: string | number, stage: string | number) => Promise<void>;
|
|
473
|
+
fetchOptOutList: (options?: {
|
|
474
|
+
category?: string;
|
|
475
|
+
dhash?: string;
|
|
476
|
+
}) => Promise<{
|
|
477
|
+
[key: string]: string;
|
|
478
|
+
}[]>;
|
|
479
|
+
updateOptOut: (input: {
|
|
480
|
+
jid: string;
|
|
481
|
+
category: string;
|
|
482
|
+
action: string;
|
|
483
|
+
dhash?: string;
|
|
484
|
+
reason?: string;
|
|
485
|
+
entryPoint?: string;
|
|
486
|
+
signupId?: string;
|
|
487
|
+
duration?: number;
|
|
488
|
+
}) => Promise<void>;
|
|
489
|
+
fetchPushSettings: () => Promise<{
|
|
490
|
+
[key: string]: string;
|
|
491
|
+
}>;
|
|
492
|
+
fetchServerLinkPreview: (url: string) => Promise<any>;
|
|
493
|
+
reportSpam: (jid: string, options?: import("../Types").SpamReportOptions) => Promise<{
|
|
494
|
+
jid: string | undefined;
|
|
495
|
+
flow: string | undefined;
|
|
496
|
+
reported: boolean;
|
|
497
|
+
node: BinaryNode;
|
|
498
|
+
}>;
|
|
230
499
|
type: "md";
|
|
231
500
|
ws: import("./Client/websocket.js").WebSocketClient;
|
|
232
|
-
ev: import("../Types
|
|
233
|
-
process(handler: (events: Partial<import("../Types
|
|
501
|
+
ev: import("../Types").BaileysEventEmitter & {
|
|
502
|
+
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
234
503
|
buffer(): void;
|
|
235
504
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
236
505
|
flush(): boolean;
|
|
@@ -238,11 +507,11 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
238
507
|
destroy(): void;
|
|
239
508
|
};
|
|
240
509
|
authState: {
|
|
241
|
-
creds: import("../Types
|
|
242
|
-
keys: import("../Types
|
|
510
|
+
creds: import("../Types").AuthenticationCreds;
|
|
511
|
+
keys: import("../Types").SignalKeyStoreWithTransaction;
|
|
243
512
|
};
|
|
244
|
-
signalRepository: import("../Types
|
|
245
|
-
user: import("../Types
|
|
513
|
+
signalRepository: import("../Types").SignalRepositoryWithLIDStore;
|
|
514
|
+
user: import("../Types").Contact | undefined;
|
|
246
515
|
generateMessageTag: () => string;
|
|
247
516
|
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
248
517
|
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
@@ -258,18 +527,31 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
258
527
|
digestKeyBundle: () => Promise<void>;
|
|
259
528
|
rotateSignedPreKey: () => Promise<void>;
|
|
260
529
|
requestPairingCode: (phoneNumber: string, customPairingCode?: string | null) => Promise<string>;
|
|
530
|
+
cancelPairingCode: () => boolean;
|
|
261
531
|
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
262
532
|
sendUnifiedSession: () => Promise<void>;
|
|
263
533
|
wamBuffer: import("../index.js").BinaryInfo;
|
|
264
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types
|
|
534
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
265
535
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
266
536
|
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
267
537
|
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
268
538
|
jid: string;
|
|
269
539
|
exists: boolean;
|
|
270
540
|
}[] | undefined>;
|
|
271
|
-
|
|
272
|
-
|
|
541
|
+
onWhatsAppUsername: (...usernames: Array<string | {
|
|
542
|
+
username?: string;
|
|
543
|
+
pin?: string;
|
|
544
|
+
usernameKey?: string;
|
|
545
|
+
}>) => Promise<{
|
|
546
|
+
jid: string;
|
|
547
|
+
exists: boolean;
|
|
548
|
+
}[]>;
|
|
549
|
+
getUsernames: (...jids: string[]) => Promise<{
|
|
550
|
+
jid: string;
|
|
551
|
+
username: unknown;
|
|
552
|
+
}[]>;
|
|
553
|
+
fetchAccountReachoutTimelock: () => Promise<import("../Types").ReachoutTimelockState>;
|
|
554
|
+
fetchNewChatMessageCap: () => Promise<import("../Types").NewChatMessageCapInfo>;
|
|
273
555
|
};
|
|
274
556
|
export declare const extractCommunityMetadata: (result: BinaryNode) => GroupMetadata;
|
|
275
557
|
//# sourceMappingURL=communities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../src/Socket/communities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EACN,KAAK,aAAa,EAElB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,YAAY,EAEjB,MAAM,UAAU,CAAA;AAGjB,OAAO,EACN,KAAK,UAAU,EAMf,MAAM,aAAa,CAAA;AAGpB,eAAO,MAAM,qBAAqB,GAAI,QAAQ,YAAY;6BAenB,MAAM;+BA8EV,MAAM,QAAQ,MAAM;oCAqCf,MAAM,gBAAgB,MAAM,EAAE,sBAAsB,MAAM;yBAoBrE,MAAM;kCASG,MAAM,WAAW,MAAM;mCAStB,MAAM,sBAAsB,MAAM;qCAehC,MAAM,sBAAsB,MAAM;sCASjC,MAAM;;;;;;;;;;;4CAsCA,MAAM;;;8CAWJ,MAAM,gBAAgB,MAAM,EAAE,UAAU,SAAS,GAAG,QAAQ;;;;uCAwBnE,MAAM,gBAAgB,MAAM,EAAE,UAAU,iBAAiB;;;;;sCAiB1D,MAAM,gBAAgB,MAAM;+BAenC,MAAM;iCAKJ,MAAM;kCAKL,MAAM;IAM1C;;;;;OAKG;4CAC2C,MAAM,cAAc,MAAM;IAOxE;;;;OAIG;;mCAsDkC,MAAM;oCAIL,MAAM,uBAAuB,MAAM;kCAOnE,MAAM,WACF,cAAc,GAAG,kBAAkB,GAAG,QAAQ,GAAG,UAAU;kCAIjC,MAAM,QAAQ,WAAW,GAAG,gBAAgB;qCAGzC,MAAM,QAAQ,IAAI,GAAG,KAAK
|
|
1
|
+
{"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../src/Socket/communities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EACN,KAAK,aAAa,EAElB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,YAAY,EAEjB,MAAM,UAAU,CAAA;AAGjB,OAAO,EACN,KAAK,UAAU,EAMf,MAAM,aAAa,CAAA;AAGpB,eAAO,MAAM,qBAAqB,GAAI,QAAQ,YAAY;6BAenB,MAAM;+BA8EV,MAAM,QAAQ,MAAM;oCAqCf,MAAM,gBAAgB,MAAM,EAAE,sBAAsB,MAAM;yBAoBrE,MAAM;kCASG,MAAM,WAAW,MAAM;mCAStB,MAAM,sBAAsB,MAAM;qCAehC,MAAM,sBAAsB,MAAM;sCASjC,MAAM;;;;;;;;;;;4CAsCA,MAAM;;;8CAWJ,MAAM,gBAAgB,MAAM,EAAE,UAAU,SAAS,GAAG,QAAQ;;;;uCAwBnE,MAAM,gBAAgB,MAAM,EAAE,UAAU,iBAAiB;;;;;sCAiB1D,MAAM,gBAAgB,MAAM;+BAenC,MAAM;iCAKJ,MAAM;kCAKL,MAAM;IAM1C;;;;;OAKG;4CAC2C,MAAM,cAAc,MAAM;IAOxE;;;;OAIG;;mCAsDkC,MAAM;oCAIL,MAAM,uBAAuB,MAAM;kCAOnE,MAAM,WACF,cAAc,GAAG,kBAAkB,GAAG,QAAQ,GAAG,UAAU;kCAIjC,MAAM,QAAQ,WAAW,GAAG,gBAAgB;qCAGzC,MAAM,QAAQ,IAAI,GAAG,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAzL9B,CAAA;oBAAuB,CAAC;;;;eAuBK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAuNy4H,CAAC;WAAa,CAAC;;;;;;;;;;;;;;;;aAA8F,CAAC;WAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA1CviI,CAAC;gBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA0CmgQ,CAAC;aAAe,CAAC;cAAgB,CAAC;aAAe,CAAC;;;;;;aAAo6B,CAAC;cAAgB,CAAC;cAAgB,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAA6hR,CAAC;;;eArFpijB,CAAC;;;;;;;;;;;;;;;;;kBAgCZ,CAAC;kBAAkB,CAAA;qBACtD,CAAC;qBACf,CAAF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAhGmC,CAAC;cAAgB,CAAC;YAC7C,CAAC;eACT,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiJ63nB,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;;;;;;;;;;;;;;;;;0DA5Z9hnC,GAAG,0BAClB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkR4C,CAAC;WAAa,CAAC;mBAC5D,CAAC;;;;;;;;;;;CA0FT,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,QAAQ,UAAU,kBA2C1D,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import { WAMessageStubType } from '../Types
|
|
3
|
-
import { generateMessageID, generateMessageIDV2, unixTimestampSeconds } from '../Utils
|
|
4
|
-
import logger from '../Utils/logger
|
|
5
|
-
import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, jidEncode, jidNormalizedUser } from '../WABinary
|
|
6
|
-
import { makeBusinessSocket } from './business
|
|
2
|
+
import { WAMessageStubType } from '../Types';
|
|
3
|
+
import { generateMessageID, generateMessageIDV2, unixTimestampSeconds } from '../Utils';
|
|
4
|
+
import logger from '../Utils/logger';
|
|
5
|
+
import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, jidEncode, jidNormalizedUser } from '../WABinary';
|
|
6
|
+
import { makeBusinessSocket } from './business';
|
|
7
7
|
export const makeCommunitiesSocket = (config) => {
|
|
8
8
|
const sock = makeBusinessSocket(config);
|
|
9
9
|
const { authState, ev, query, upsertMessage } = sock;
|