@awangxcode/qiro-baileys 7.0.0-rc25.5 → 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 +1443 -1033
- 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/business.d.ts
CHANGED
|
@@ -1,63 +1,205 @@
|
|
|
1
|
-
import type { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig, WAMediaUpload } from '../Types
|
|
2
|
-
import type { UpdateBussinesProfileProps } from '../Types/Bussines
|
|
3
|
-
import { type BinaryNode } from '../WABinary
|
|
1
|
+
import type { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig, WAMediaUpload } from '../Types';
|
|
2
|
+
import type { UpdateBussinesProfileProps } from '../Types/Bussines';
|
|
3
|
+
import { type BinaryNode } from '../WABinary';
|
|
4
4
|
export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
5
|
-
logger: import("../Utils/logger
|
|
6
|
-
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("
|
|
5
|
+
logger: import("../Utils/logger").ILogger;
|
|
6
|
+
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("..").OrderDetails>;
|
|
7
7
|
getCatalog: ({ jid, limit, cursor }: GetCatalogOptions) => Promise<{
|
|
8
|
-
products: import("
|
|
8
|
+
products: import("..").Product[];
|
|
9
9
|
nextPageCursor: string | undefined;
|
|
10
10
|
}>;
|
|
11
11
|
getCollections: (jid?: string, limit?: number) => Promise<{
|
|
12
|
-
collections: import("
|
|
12
|
+
collections: import("..").CatalogCollection[];
|
|
13
13
|
}>;
|
|
14
|
-
productCreate: (create: ProductCreate) => Promise<import("
|
|
14
|
+
productCreate: (create: ProductCreate) => Promise<import("..").Product>;
|
|
15
15
|
productDelete: (productIds: string[]) => Promise<{
|
|
16
16
|
deleted: number;
|
|
17
17
|
}>;
|
|
18
|
-
productUpdate: (productId: string, update: ProductUpdate) => Promise<import("
|
|
18
|
+
productUpdate: (productId: string, update: ProductUpdate) => Promise<import("..").Product>;
|
|
19
19
|
updateBussinesProfile: (args: UpdateBussinesProfileProps) => Promise<any>;
|
|
20
20
|
updateCoverPhoto: (photo: WAMediaUpload) => Promise<number>;
|
|
21
21
|
removeCoverPhoto: (id: string) => Promise<any>;
|
|
22
22
|
sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
|
|
23
23
|
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
24
24
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
25
|
-
fetchMessageHistory: (count: number, oldestMsgKey: import("
|
|
26
|
-
requestPlaceholderResend: (messageKey: import("
|
|
27
|
-
messageRetryManager: import("
|
|
28
|
-
userDevicesCache: import("
|
|
25
|
+
fetchMessageHistory: (count: number, oldestMsgKey: import("..").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
|
|
26
|
+
requestPlaceholderResend: (messageKey: import("..").WAMessageKey, msgData?: Partial<import("..").WAMessage>) => Promise<string | undefined>;
|
|
27
|
+
messageRetryManager: import("..").MessageRetryManager | null;
|
|
28
|
+
userDevicesCache: import("..").PossiblyExtendedCacheStore | import("@cacheable/node-cache").NodeCache<import("..").JidWithDevice[]>;
|
|
29
29
|
devicesMutex: {
|
|
30
30
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
31
31
|
};
|
|
32
32
|
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
|
|
33
33
|
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
34
|
-
relayMessage: (jid: string, message: import("
|
|
35
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("
|
|
36
|
-
sendReceipts: (keys: import("
|
|
37
|
-
readMessages: (keys: import("
|
|
38
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("
|
|
34
|
+
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>;
|
|
35
|
+
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("..").MessageReceiptType) => Promise<void>;
|
|
36
|
+
sendReceipts: (keys: import("..").WAMessageKey[], type: import("..").MessageReceiptType) => Promise<void>;
|
|
37
|
+
readMessages: (keys: import("..").WAMessageKey[]) => Promise<void>;
|
|
38
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<import("..").MediaConnInfo>;
|
|
39
39
|
getMediaHost: () => string;
|
|
40
|
-
waUploadToServer: import("
|
|
40
|
+
waUploadToServer: import("..").WAMediaUploadFunction;
|
|
41
|
+
outboundResendCache: import("..").CacheStore | import("../Utils/ttl-cache").TTLCache<{
|
|
42
|
+
jid: string;
|
|
43
|
+
message: import("..").proto.IMessage;
|
|
44
|
+
}>;
|
|
45
|
+
sendHD: (jid: string, content: any, options?: any) => Promise<import("..").WAMessage>;
|
|
46
|
+
sendImgVid: (jid: string, content: any, options?: any) => Promise<import("..").WAMessage>;
|
|
47
|
+
sendStAudioMessage: (jid: string, content: any, options?: any) => Promise<import("..").WAMessage>;
|
|
48
|
+
setThemeGroup: (jid: string, content: any, options?: any) => Promise<import("..").WAMessage | import("../Utils/chat-theme").ChatThemeCatalog | undefined>;
|
|
41
49
|
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
42
50
|
[_: string]: string;
|
|
43
51
|
}>;
|
|
44
|
-
sendPeerDataOperationMessage: (pdoMessage: import("
|
|
45
|
-
createParticipantNodes: (recipientJids: string[], message: import("
|
|
52
|
+
sendPeerDataOperationMessage: (pdoMessage: import("..").proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
53
|
+
createParticipantNodes: (recipientJids: string[], message: import("..").proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: import("..").proto.IMessage) => Promise<{
|
|
46
54
|
nodes: BinaryNode[];
|
|
47
55
|
shouldIncludeDeviceIdentity: boolean;
|
|
48
56
|
}>;
|
|
49
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("
|
|
57
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("..").JidWithDevice & {
|
|
50
58
|
jid: string;
|
|
51
59
|
})[]>;
|
|
52
60
|
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
53
|
-
updateMediaMessage: (message: import("
|
|
54
|
-
sendMessage: (jid: string, content: import("
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
updateMediaMessage: (message: import("..").WAMessage) => Promise<import("..").WAMessage>;
|
|
62
|
+
sendMessage: (jid: string, content: import("..").AnyMessageContent, options?: import("..").MiscMessageGenerationOptions) => Promise<import("..").WAMessage | undefined>;
|
|
63
|
+
newsletterUpdateUserSetting: (jid: string, type: "FOLLOWER_NOTIFICATIONS" | "ADMIN_NOTIFICATIONS", muted: boolean) => Promise<{
|
|
64
|
+
id: any;
|
|
65
|
+
state: any;
|
|
66
|
+
}>;
|
|
67
|
+
newsletterSubscribed: (options?: {
|
|
68
|
+
fetchStatusMetadata?: boolean;
|
|
69
|
+
fetchWamoSub?: boolean;
|
|
70
|
+
}) => Promise<any>;
|
|
71
|
+
newsletterUpdateReactions: (jid: string, setting: string) => Promise<unknown>;
|
|
72
|
+
newsletterInsights: (jid: string, options?: {
|
|
73
|
+
metrics?: string[];
|
|
74
|
+
}) => Promise<any>;
|
|
75
|
+
newsletterEnforcements: (jid: string, locale?: string) => Promise<{
|
|
76
|
+
adminProfiles: any;
|
|
77
|
+
profilePictureDeletions: any;
|
|
78
|
+
suspensions: any;
|
|
79
|
+
violatingMessages: {
|
|
80
|
+
enforcementId: any;
|
|
81
|
+
createdAt: number | undefined;
|
|
82
|
+
violationCategory: any;
|
|
83
|
+
source: any;
|
|
84
|
+
appealState: any;
|
|
85
|
+
appealCreatedAt: number | undefined;
|
|
86
|
+
appealReasonOptions: any;
|
|
87
|
+
appealFormUrl: any;
|
|
88
|
+
policy: {
|
|
89
|
+
headline: any;
|
|
90
|
+
subtitle: any;
|
|
91
|
+
overview: any;
|
|
92
|
+
explanation: any;
|
|
93
|
+
adminDisclaimer: any;
|
|
94
|
+
} | undefined;
|
|
95
|
+
}[];
|
|
96
|
+
geoSuspensions: {
|
|
97
|
+
enforcementId: any;
|
|
98
|
+
createdAt: number | undefined;
|
|
99
|
+
violationCategory: any;
|
|
100
|
+
source: any;
|
|
101
|
+
appealState: any;
|
|
102
|
+
appealCreatedAt: number | undefined;
|
|
103
|
+
appealReasonOptions: any;
|
|
104
|
+
appealFormUrl: any;
|
|
105
|
+
policy: {
|
|
106
|
+
headline: any;
|
|
107
|
+
subtitle: any;
|
|
108
|
+
overview: any;
|
|
109
|
+
explanation: any;
|
|
110
|
+
adminDisclaimer: any;
|
|
111
|
+
} | undefined;
|
|
112
|
+
}[];
|
|
113
|
+
}>;
|
|
114
|
+
newsletterPendingAdminInvites: (jid: string) => Promise<any>;
|
|
115
|
+
newsletterQuestionResponseState: (jid: string, serverId: string | number, responseServerId: string | number, state: string) => Promise<any>;
|
|
116
|
+
newsletterSendPollVote: (jid: string, parentServerId: string | number, options: string | string[]) => Promise<{
|
|
117
|
+
id: string;
|
|
118
|
+
}>;
|
|
119
|
+
newsletterMyAddOns: (options?: {
|
|
120
|
+
limit?: number;
|
|
121
|
+
jid?: string;
|
|
122
|
+
}) => Promise<{
|
|
123
|
+
jid: string | undefined;
|
|
124
|
+
messages: {
|
|
125
|
+
serverId: number | undefined;
|
|
126
|
+
reaction: {
|
|
127
|
+
code: string | undefined;
|
|
128
|
+
t: number | undefined;
|
|
129
|
+
} | undefined;
|
|
130
|
+
pollVote: {
|
|
131
|
+
t: number | undefined;
|
|
132
|
+
hashes: string[];
|
|
133
|
+
} | undefined;
|
|
134
|
+
}[];
|
|
135
|
+
}[]>;
|
|
136
|
+
newsletterStatusMyAddOns: (options?: {
|
|
137
|
+
limit?: number;
|
|
138
|
+
jid?: string;
|
|
139
|
+
}) => Promise<{
|
|
140
|
+
jid: string | undefined;
|
|
141
|
+
messages: {
|
|
142
|
+
serverId: number | undefined;
|
|
143
|
+
reaction: {
|
|
144
|
+
code: string | undefined;
|
|
145
|
+
t: number | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
pollVote: {
|
|
148
|
+
t: number | undefined;
|
|
149
|
+
hashes: string[];
|
|
150
|
+
} | undefined;
|
|
151
|
+
}[];
|
|
152
|
+
}[]>;
|
|
153
|
+
sendNewsletterStatus: (jid: string, content: any, options?: import("../Utils/newsletter-status").NewsletterStatusSendOptions) => Promise<import("../Utils/newsletter-status").NewsletterStatusSendResult>;
|
|
154
|
+
sendNewsletterStatusReaction: (jid: string, parentServerId: string | number, reaction: string, options?: Pick<import("../Utils/newsletter-status").NewsletterStatusSendOptions, "messageId" | "ackTimeoutMs">) => Promise<import("../Utils/newsletter-status").NewsletterStatusStanzaResult>;
|
|
155
|
+
revokeNewsletterStatus: (jid: string, statusId: string, options?: Pick<import("../Utils/newsletter-status").NewsletterStatusSendOptions, "ackTimeoutMs">) => Promise<import("../Utils/newsletter-status").NewsletterStatusStanzaResult>;
|
|
156
|
+
getNewsletterStatuses: (jid: string, options?: import("../Utils/newsletter-status").NewsletterStatusFetchOptions) => Promise<import("../Utils/newsletter-status").NewsletterStatusList>;
|
|
157
|
+
getNewsletterStatusUpdates: (jid: string, options?: import("../Utils/newsletter-status").NewsletterStatusUpdatesFetchOptions) => Promise<import("../Utils/newsletter-status").NewsletterStatusList>;
|
|
158
|
+
newsletterCanPostStatus: (jid: string) => Promise<{
|
|
159
|
+
canPost: boolean;
|
|
160
|
+
canPostMusic: boolean;
|
|
161
|
+
capabilities: string[];
|
|
162
|
+
}>;
|
|
163
|
+
newsletterAdminInfo: (jid: string) => Promise<{
|
|
164
|
+
id: any;
|
|
165
|
+
adminCount: any;
|
|
166
|
+
adminProfile: {
|
|
167
|
+
id: any;
|
|
168
|
+
name: any;
|
|
169
|
+
picture: {
|
|
170
|
+
id: any;
|
|
171
|
+
directPath: any;
|
|
172
|
+
} | undefined;
|
|
173
|
+
} | undefined;
|
|
174
|
+
adminProfilesEnabled: any;
|
|
175
|
+
}>;
|
|
176
|
+
newsletterPollVoters: (jid: string, serverId: string | number, options?: {
|
|
177
|
+
limit?: number;
|
|
178
|
+
voteHash?: string;
|
|
179
|
+
}) => Promise<any>;
|
|
180
|
+
newsletterReactionSenders: (jid: string, serverId: string | number) => Promise<any>;
|
|
181
|
+
newsletterPinMessages: (jid: string, serverIds: string | number | Array<string | number>) => Promise<any>;
|
|
182
|
+
newsletterUnpinMessages: (jid: string, serverIds: string | number | Array<string | number>) => Promise<any>;
|
|
183
|
+
newsletterReports: (locale?: string) => Promise<any>;
|
|
184
|
+
newsletterAppealReport: (reportId: string | number, reason: string) => Promise<any>;
|
|
185
|
+
newsletterAdminCapabilities: (jid: string) => Promise<any>;
|
|
186
|
+
newsletterLabelAiContent: (jid: string, serverId: string | number, messageType?: string) => Promise<any>;
|
|
187
|
+
newsletterLabelPaidPartnership: (jid: string, serverId: string | number, messageType?: string) => Promise<any>;
|
|
188
|
+
newsletterCreateAdminInvite: (jid: string, userJid: string) => Promise<any>;
|
|
189
|
+
newsletterRevokeAdminInvite: (jid: string, userJid: string) => Promise<any>;
|
|
190
|
+
newsletterAcceptAdminInvite: (jid: string) => Promise<any>;
|
|
191
|
+
newsletterDirectoryList: (options?: any) => Promise<any>;
|
|
192
|
+
newsletterDirectorySearch: (searchText: string, options?: any) => Promise<any>;
|
|
193
|
+
newsletterDirectoryCategories: (options?: any) => Promise<any>;
|
|
194
|
+
newsletterRecommended: (options?: any) => Promise<any>;
|
|
195
|
+
newsletterSimilar: (jid: string, options?: any) => Promise<any>;
|
|
196
|
+
newsletterFollowers: (jid: string, options?: any) => Promise<any>;
|
|
197
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("..").NewsletterMetadata>;
|
|
198
|
+
newsletterUpdate: (jid: string, updates: import("..").NewsletterUpdate) => Promise<unknown>;
|
|
57
199
|
newsletterSubscribers: (jid: string) => Promise<{
|
|
58
200
|
subscribers: number;
|
|
59
201
|
}>;
|
|
60
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("
|
|
202
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("..").NewsletterMetadata | null>;
|
|
61
203
|
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
62
204
|
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
63
205
|
newsletterMute: (jid: string) => Promise<unknown>;
|
|
@@ -68,6 +210,40 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
68
210
|
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
69
211
|
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
70
212
|
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
213
|
+
newsletterFetchMessageUpdates: (jid: string, options?: {
|
|
214
|
+
count?: number;
|
|
215
|
+
since?: number;
|
|
216
|
+
before?: number;
|
|
217
|
+
after?: number;
|
|
218
|
+
}) => Promise<{
|
|
219
|
+
jid: string;
|
|
220
|
+
messages: any[];
|
|
221
|
+
}>;
|
|
222
|
+
newsletterQuestionResponses: (jid: string, serverId: string | number, options?: {
|
|
223
|
+
count?: number;
|
|
224
|
+
before?: number;
|
|
225
|
+
filter?: string;
|
|
226
|
+
searchText?: string;
|
|
227
|
+
}) => Promise<{
|
|
228
|
+
jid: any;
|
|
229
|
+
serverId: number;
|
|
230
|
+
responses: {
|
|
231
|
+
id: string | undefined;
|
|
232
|
+
t: number | undefined;
|
|
233
|
+
isSender: boolean;
|
|
234
|
+
responseServerId: string | undefined;
|
|
235
|
+
sender: {
|
|
236
|
+
lid: string | undefined;
|
|
237
|
+
notifyName: string | undefined;
|
|
238
|
+
pictureDirectPath: string | undefined;
|
|
239
|
+
};
|
|
240
|
+
replied: boolean;
|
|
241
|
+
starred: boolean;
|
|
242
|
+
message: {
|
|
243
|
+
[k: string]: any;
|
|
244
|
+
} | undefined;
|
|
245
|
+
}[];
|
|
246
|
+
}>;
|
|
71
247
|
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
72
248
|
duration: string;
|
|
73
249
|
} | null>;
|
|
@@ -75,8 +251,8 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
75
251
|
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
76
252
|
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
77
253
|
newsletterDelete: (jid: string) => Promise<void>;
|
|
78
|
-
groupMetadata: (jid: string) => Promise<import("
|
|
79
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("
|
|
254
|
+
groupMetadata: (jid: string) => Promise<import("..").GroupMetadata>;
|
|
255
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("..").GroupMetadata>;
|
|
80
256
|
groupLeave: (id: string) => Promise<void>;
|
|
81
257
|
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
82
258
|
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
@@ -86,7 +262,7 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
86
262
|
status: string;
|
|
87
263
|
jid: string | undefined;
|
|
88
264
|
}[]>;
|
|
89
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("
|
|
265
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("..").ParticipantAction) => Promise<{
|
|
90
266
|
status: string;
|
|
91
267
|
jid: string | undefined;
|
|
92
268
|
content: BinaryNode;
|
|
@@ -96,24 +272,52 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
96
272
|
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
97
273
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
98
274
|
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
99
|
-
groupAcceptInviteV4: (key: string | import("
|
|
100
|
-
groupGetInviteInfo: (code: string) => Promise<import("
|
|
275
|
+
groupAcceptInviteV4: (key: string | import("..").WAMessageKey, inviteMessage: import("..").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
276
|
+
groupGetInviteInfo: (code: string) => Promise<import("..").GroupMetadata>;
|
|
101
277
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
102
278
|
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
103
279
|
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
104
280
|
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
105
281
|
groupFetchAllParticipating: () => Promise<{
|
|
106
|
-
[_: string]: import("
|
|
282
|
+
[_: string]: import("..").GroupMetadata;
|
|
107
283
|
}>;
|
|
108
284
|
serverProps: {
|
|
109
285
|
privacyTokenOn1to1: boolean;
|
|
110
286
|
profilePicPrivacyToken: boolean;
|
|
111
287
|
lidTrustedTokenIssueToLid: boolean;
|
|
112
288
|
};
|
|
289
|
+
fetchProps: ({ full }?: {
|
|
290
|
+
full?: boolean;
|
|
291
|
+
}) => Promise<Record<string, string>>;
|
|
292
|
+
getServerProps: ({ refresh }?: {
|
|
293
|
+
refresh?: boolean;
|
|
294
|
+
}) => Promise<Record<string, string>>;
|
|
295
|
+
findUserId: (jid: string) => Promise<{
|
|
296
|
+
lid: string | null;
|
|
297
|
+
phoneNumber: string;
|
|
298
|
+
} | {
|
|
299
|
+
lid: string;
|
|
300
|
+
phoneNumber: string | null;
|
|
301
|
+
}>;
|
|
302
|
+
checkAccountHealth: (jid: string) => Promise<{
|
|
303
|
+
jid: string;
|
|
304
|
+
exists: boolean;
|
|
305
|
+
isBusiness: boolean;
|
|
306
|
+
verifiedName: string | null;
|
|
307
|
+
about: string | null;
|
|
308
|
+
hasProfilePhoto: boolean;
|
|
309
|
+
self: {
|
|
310
|
+
capped?: boolean;
|
|
311
|
+
warned?: boolean;
|
|
312
|
+
unlimited?: boolean;
|
|
313
|
+
remaining?: number | null;
|
|
314
|
+
} | null;
|
|
315
|
+
notes: string[];
|
|
316
|
+
}>;
|
|
113
317
|
createCallLink: (type: "audio" | "video", event?: {
|
|
114
318
|
startTime: number;
|
|
115
319
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
116
|
-
getBotListV2: () => Promise<import("
|
|
320
|
+
getBotListV2: () => Promise<import("..").BotListInfo[]>;
|
|
117
321
|
messageMutex: {
|
|
118
322
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
119
323
|
};
|
|
@@ -126,14 +330,14 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
126
330
|
notificationMutex: {
|
|
127
331
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
128
332
|
};
|
|
129
|
-
upsertMessage: (msg: import("
|
|
130
|
-
appPatch: (patchCreate: import("
|
|
131
|
-
sendPresenceUpdate: (type: import("
|
|
333
|
+
upsertMessage: (msg: import("..").WAMessage, type: import("..").MessageUpsertType) => Promise<void>;
|
|
334
|
+
appPatch: (patchCreate: import("..").WAPatchCreate) => Promise<void>;
|
|
335
|
+
sendPresenceUpdate: (type: import("..").WAPresence, toJid?: string) => Promise<void>;
|
|
132
336
|
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
133
337
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
134
338
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
135
|
-
fetchStatus: (...jids: string[]) => Promise<import("
|
|
136
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("
|
|
339
|
+
fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
|
|
340
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
|
|
137
341
|
updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
|
|
138
342
|
width?: number;
|
|
139
343
|
height?: number;
|
|
@@ -145,23 +349,23 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
145
349
|
updateProfileName: (name: string) => Promise<void>;
|
|
146
350
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
147
351
|
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
148
|
-
updateCallPrivacy: (value: import("
|
|
149
|
-
updateMessagesPrivacy: (value: import("
|
|
150
|
-
updateLastSeenPrivacy: (value: import("
|
|
151
|
-
updateOnlinePrivacy: (value: import("
|
|
152
|
-
updateProfilePicturePrivacy: (value: import("
|
|
153
|
-
updateStatusPrivacy: (value: import("
|
|
154
|
-
updateReadReceiptsPrivacy: (value: import("
|
|
155
|
-
updateGroupsAddPrivacy: (value: import("
|
|
352
|
+
updateCallPrivacy: (value: import("..").WAPrivacyCallValue) => Promise<void>;
|
|
353
|
+
updateMessagesPrivacy: (value: import("..").WAPrivacyMessagesValue) => Promise<void>;
|
|
354
|
+
updateLastSeenPrivacy: (value: import("..").WAPrivacyValue) => Promise<void>;
|
|
355
|
+
updateOnlinePrivacy: (value: import("..").WAPrivacyOnlineValue) => Promise<void>;
|
|
356
|
+
updateProfilePicturePrivacy: (value: import("..").WAPrivacyValue) => Promise<void>;
|
|
357
|
+
updateStatusPrivacy: (value: import("..").WAPrivacyValue) => Promise<void>;
|
|
358
|
+
updateReadReceiptsPrivacy: (value: import("..").WAReadReceiptsValue) => Promise<void>;
|
|
359
|
+
updateGroupsAddPrivacy: (value: import("..").WAPrivacyGroupAddValue) => Promise<void>;
|
|
156
360
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
157
|
-
getBusinessProfile: (jid: string) => Promise<import("
|
|
361
|
+
getBusinessProfile: (jid: string) => Promise<import("..").WABusinessProfile | void>;
|
|
158
362
|
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
159
|
-
chatModify: (mod: import("
|
|
363
|
+
chatModify: (mod: import("..").ChatModification, jid: string) => Promise<void>;
|
|
160
364
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
161
|
-
addOrEditContact: (jid: string, contact: import("
|
|
365
|
+
addOrEditContact: (jid: string, contact: import("..").proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
162
366
|
removeContact: (jid: string) => Promise<void>;
|
|
163
|
-
placeholderResendCache: import("
|
|
164
|
-
addLabel: (jid: string, labels: import("../Types/Label
|
|
367
|
+
placeholderResendCache: import("..").CacheStore;
|
|
368
|
+
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>;
|
|
165
369
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
166
370
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
167
371
|
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
@@ -170,12 +374,77 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
170
374
|
id: string;
|
|
171
375
|
fromMe?: boolean;
|
|
172
376
|
}[], star: boolean) => Promise<void>;
|
|
173
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines
|
|
377
|
+
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>;
|
|
174
378
|
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
379
|
+
getUsername: () => Promise<{
|
|
380
|
+
username: any;
|
|
381
|
+
state: any;
|
|
382
|
+
pin: any;
|
|
383
|
+
}>;
|
|
384
|
+
setUsername: (username?: string, options?: {
|
|
385
|
+
reserved?: boolean;
|
|
386
|
+
sessionId?: string;
|
|
387
|
+
source?: string;
|
|
388
|
+
}) => Promise<boolean>;
|
|
389
|
+
removeUsername: () => Promise<boolean>;
|
|
390
|
+
checkUsernameAvailability: (username: string, options?: {
|
|
391
|
+
sessionId?: string;
|
|
392
|
+
source?: string;
|
|
393
|
+
}) => Promise<{
|
|
394
|
+
available: boolean;
|
|
395
|
+
suggestions: any;
|
|
396
|
+
response: any;
|
|
397
|
+
}>;
|
|
398
|
+
setUsernamePin: (pin: string) => Promise<boolean>;
|
|
399
|
+
removeUsernamePin: () => Promise<boolean>;
|
|
400
|
+
updateTextStatus: (text: string, options?: {
|
|
401
|
+
ephemeralDurationSec?: number;
|
|
402
|
+
emoji?: string;
|
|
403
|
+
}) => Promise<any>;
|
|
404
|
+
fetchTextStatus: (jids: string | string[]) => Promise<any>;
|
|
405
|
+
fetchAbout: (jid: string) => Promise<{
|
|
406
|
+
jid: string;
|
|
407
|
+
status: any;
|
|
408
|
+
response: any;
|
|
409
|
+
}>;
|
|
410
|
+
fetchUserNotices: (since?: number) => Promise<{
|
|
411
|
+
id: string | undefined;
|
|
412
|
+
stage: string | undefined;
|
|
413
|
+
t: string | undefined;
|
|
414
|
+
version: string | undefined;
|
|
415
|
+
type: string | undefined;
|
|
416
|
+
}[]>;
|
|
417
|
+
updateUserNoticeStage: (noticeId: string | number, stage: string | number) => Promise<void>;
|
|
418
|
+
fetchOptOutList: (options?: {
|
|
419
|
+
category?: string;
|
|
420
|
+
dhash?: string;
|
|
421
|
+
}) => Promise<{
|
|
422
|
+
[key: string]: string;
|
|
423
|
+
}[]>;
|
|
424
|
+
updateOptOut: (input: {
|
|
425
|
+
jid: string;
|
|
426
|
+
category: string;
|
|
427
|
+
action: string;
|
|
428
|
+
dhash?: string;
|
|
429
|
+
reason?: string;
|
|
430
|
+
entryPoint?: string;
|
|
431
|
+
signupId?: string;
|
|
432
|
+
duration?: number;
|
|
433
|
+
}) => Promise<void>;
|
|
434
|
+
fetchPushSettings: () => Promise<{
|
|
435
|
+
[key: string]: string;
|
|
436
|
+
}>;
|
|
437
|
+
fetchServerLinkPreview: (url: string) => Promise<any>;
|
|
438
|
+
reportSpam: (jid: string, options?: import("..").SpamReportOptions) => Promise<{
|
|
439
|
+
jid: string | undefined;
|
|
440
|
+
flow: string | undefined;
|
|
441
|
+
reported: boolean;
|
|
442
|
+
node: BinaryNode;
|
|
443
|
+
}>;
|
|
175
444
|
type: "md";
|
|
176
|
-
ws: import("./Client
|
|
177
|
-
ev: import("
|
|
178
|
-
process(handler: (events: Partial<import("
|
|
445
|
+
ws: import("./Client").WebSocketClient;
|
|
446
|
+
ev: import("..").BaileysEventEmitter & {
|
|
447
|
+
process(handler: (events: Partial<import("..").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
179
448
|
buffer(): void;
|
|
180
449
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
181
450
|
flush(): boolean;
|
|
@@ -183,11 +452,11 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
183
452
|
destroy(): void;
|
|
184
453
|
};
|
|
185
454
|
authState: {
|
|
186
|
-
creds: import("
|
|
187
|
-
keys: import("
|
|
455
|
+
creds: import("..").AuthenticationCreds;
|
|
456
|
+
keys: import("..").SignalKeyStoreWithTransaction;
|
|
188
457
|
};
|
|
189
|
-
signalRepository: import("
|
|
190
|
-
user: import("
|
|
458
|
+
signalRepository: import("..").SignalRepositoryWithLIDStore;
|
|
459
|
+
user: import("..").Contact | undefined;
|
|
191
460
|
generateMessageTag: () => string;
|
|
192
461
|
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
193
462
|
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
@@ -203,17 +472,30 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
203
472
|
digestKeyBundle: () => Promise<void>;
|
|
204
473
|
rotateSignedPreKey: () => Promise<void>;
|
|
205
474
|
requestPairingCode: (phoneNumber: string, customPairingCode?: string | null) => Promise<string>;
|
|
475
|
+
cancelPairingCode: () => boolean;
|
|
206
476
|
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
207
477
|
sendUnifiedSession: () => Promise<void>;
|
|
208
|
-
wamBuffer: import("
|
|
209
|
-
waitForConnectionUpdate: (check: (u: Partial<import("
|
|
478
|
+
wamBuffer: import("..").BinaryInfo;
|
|
479
|
+
waitForConnectionUpdate: (check: (u: Partial<import("..").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
210
480
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
211
|
-
executeUSyncQuery: (usyncQuery: import("
|
|
481
|
+
executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>;
|
|
212
482
|
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
213
483
|
jid: string;
|
|
214
484
|
exists: boolean;
|
|
215
485
|
}[] | undefined>;
|
|
216
|
-
|
|
217
|
-
|
|
486
|
+
onWhatsAppUsername: (...usernames: Array<string | {
|
|
487
|
+
username?: string;
|
|
488
|
+
pin?: string;
|
|
489
|
+
usernameKey?: string;
|
|
490
|
+
}>) => Promise<{
|
|
491
|
+
jid: string;
|
|
492
|
+
exists: boolean;
|
|
493
|
+
}[]>;
|
|
494
|
+
getUsernames: (...jids: string[]) => Promise<{
|
|
495
|
+
jid: string;
|
|
496
|
+
username: unknown;
|
|
497
|
+
}[]>;
|
|
498
|
+
fetchAccountReachoutTimelock: () => Promise<import("..").ReachoutTimelockState>;
|
|
499
|
+
fetchNewChatMessageCap: () => Promise<import("..").NewChatMessageCapInfo>;
|
|
218
500
|
};
|
|
219
501
|
//# sourceMappingURL=business.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../src/Socket/business.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC5G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAUnE,OAAO,EAAE,KAAK,UAAU,EAAqC,MAAM,aAAa,CAAA;AAIhF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY;;+BA8Od,MAAM,eAAe,MAAM;yCAjGjB,iBAAiB;;;;2BAmD/B,MAAM;;;4BAkIL,aAAa;gCAwCT,MAAM,EAAE;;;+BA9ET,MAAM,UAAU,aAAa;kCAxR1B,0BAA0B;8BA2E9B,aAAa;2BAoChB,MAAM
|
|
1
|
+
{"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../src/Socket/business.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC5G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAUnE,OAAO,EAAE,KAAK,UAAU,EAAqC,MAAM,aAAa,CAAA;AAIhF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY;;+BA8Od,MAAM,eAAe,MAAM;yCAjGjB,iBAAiB;;;;2BAmD/B,MAAM;;;4BAkIL,aAAa;gCAwCT,MAAM,EAAE;;;+BA9ET,MAAM,UAAU,aAAa;kCAxR1B,0BAA0B;8BA2E9B,aAAa;2BAoChB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAkL1B,CAAC;oBAEV,CAAC;;;;eA8B0D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAoFw8T,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;;;;;;;;;;;;;;;;;0DA9W7mzC,GAAD,0BAEE,GAAL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA4WioC,CAAC;WAAa,CAAC;mBAAqB,CAAC;;;;;;;;;;;CADxqC,CAAA"}
|
package/lib/Socket/business.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getRawMediaUploadData } from '../Utils
|
|
2
|
-
import { parseCatalogNode, parseCollectionsNode, parseOrderDetailsNode, parseProductNode, toProductNode, uploadingNecessaryImagesOfProduct } from '../Utils/business
|
|
3
|
-
import { jidNormalizedUser, S_WHATSAPP_NET } from '../WABinary
|
|
4
|
-
import { getBinaryNodeChild } from '../WABinary/generic-utils
|
|
5
|
-
import { makeMessagesRecvSocket } from './messages-recv
|
|
1
|
+
import { getRawMediaUploadData } from '../Utils';
|
|
2
|
+
import { parseCatalogNode, parseCollectionsNode, parseOrderDetailsNode, parseProductNode, toProductNode, uploadingNecessaryImagesOfProduct } from '../Utils/business';
|
|
3
|
+
import { jidNormalizedUser, S_WHATSAPP_NET } from '../WABinary';
|
|
4
|
+
import { getBinaryNodeChild } from '../WABinary/generic-utils';
|
|
5
|
+
import { makeMessagesRecvSocket } from './messages-recv';
|
|
6
6
|
export const makeBusinessSocket = (config) => {
|
|
7
7
|
const sock = makeMessagesRecvSocket(config);
|
|
8
8
|
const { authState, query, waUploadToServer } = sock;
|