@vanzxy/baileys 1.3.6 → 1.3.8
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/README.md +1 -1
- package/WAProto/index.d.ts +9 -15871
- package/lib/Defaults/index.d.ts +7 -5
- package/lib/Defaults/index.js +4 -1
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -1
- package/lib/Signal/Group/group-session-builder.d.ts +0 -1
- package/lib/Signal/Group/group_cipher.d.ts +0 -1
- package/lib/Signal/Group/index.d.ts +0 -1
- package/lib/Signal/Group/keyhelper.d.ts +0 -1
- package/lib/Signal/Group/sender-chain-key.d.ts +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -1
- package/lib/Signal/Group/sender-key-message.d.ts +0 -1
- package/lib/Signal/Group/sender-key-name.d.ts +0 -1
- package/lib/Signal/Group/sender-key-record.d.ts +0 -1
- package/lib/Signal/Group/sender-key-state.d.ts +0 -1
- package/lib/Signal/Group/sender-message-key.d.ts +0 -1
- package/lib/Signal/libsignal.d.ts +0 -1
- package/lib/Signal/lid-mapping.d.ts +0 -1
- package/lib/Socket/Client/index.d.ts +0 -1
- package/lib/Socket/Client/types.d.ts +0 -1
- package/lib/Socket/Client/websocket.d.ts +0 -1
- package/lib/Socket/business.d.ts +7 -7
- package/lib/Socket/chats.d.ts +0 -1
- package/lib/Socket/communities.d.ts +7 -8
- package/lib/Socket/communities.js +4 -2
- package/lib/Socket/dugong.d.ts +117 -0
- package/lib/Socket/dugong.js +26 -1
- package/lib/Socket/groups.d.ts +1 -2
- package/lib/Socket/index.d.ts +7 -6
- package/lib/Socket/messages-recv.d.ts +7 -8
- package/lib/Socket/messages-send.d.ts +6 -7
- package/lib/Socket/mex.d.ts +0 -1
- package/lib/Socket/newsletter.d.ts +3 -5
- package/lib/Socket/newsletter.js +19 -19
- package/lib/Socket/socket.d.ts +0 -1
- package/lib/Store/index.d.ts +0 -1
- package/lib/Store/make-in-memory-store.d.ts +0 -1
- package/lib/Store/make-ordered-dictionary.d.ts +0 -1
- package/lib/Store/object-repository.d.ts +0 -1
- package/lib/Types/Auth.d.ts +115 -0
- package/lib/Types/Bussines.d.ts +24 -1
- package/lib/Types/Call.d.ts +14 -1
- package/lib/Types/Chat.d.ts +123 -1
- package/lib/Types/Contact.d.ts +25 -1
- package/lib/Types/Events.d.ts +255 -1
- package/lib/Types/GroupMetadata.d.ts +70 -1
- package/lib/Types/Label.d.ts +0 -1
- package/lib/Types/LabelAssociation.d.ts +0 -1
- package/lib/Types/Message.d.ts +8 -9
- package/lib/Types/Mex.d.ts +0 -1
- package/lib/Types/Product.d.ts +78 -1
- package/lib/Types/RichType.d.ts +0 -1
- package/lib/Types/Signal.d.ts +85 -0
- package/lib/Types/Socket.d.ts +135 -1
- package/lib/Types/State.d.ts +0 -1
- package/lib/Types/USync.d.ts +25 -1
- package/lib/Types/index.d.ts +65 -13
- package/lib/Utils/auth-utils.d.ts +0 -1
- package/lib/Utils/browser-utils.d.ts +1 -2
- package/lib/Utils/business.d.ts +0 -1
- package/lib/Utils/business.js +2 -1
- package/lib/Utils/chat-utils.d.ts +15 -17
- package/lib/Utils/chat-utils.js +15 -1
- package/lib/Utils/companion-reg-client-utils.d.ts +0 -1
- package/lib/Utils/crypto.d.ts +2 -1
- package/lib/Utils/decode-wa-message.d.ts +0 -1
- package/lib/Utils/decode-wa-message.js +1 -3
- package/lib/Utils/event-buffer.d.ts +1 -2
- package/lib/Utils/generics.d.ts +0 -1
- package/lib/Utils/generics.js +11 -9
- package/lib/Utils/history.d.ts +17 -3
- package/lib/Utils/identity-change-handler.d.ts +0 -1
- package/lib/Utils/index.d.ts +0 -1
- package/lib/Utils/link-preview.d.ts +0 -1
- package/lib/Utils/logger.d.ts +0 -1
- package/lib/Utils/lt-hash.d.ts +7 -2
- package/lib/Utils/lt-hash.js +21 -2
- package/lib/Utils/make-mutex.d.ts +0 -1
- package/lib/Utils/message-retry-manager.d.ts +0 -1
- package/lib/Utils/messages-media.d.ts +2 -4
- package/lib/Utils/messages.d.ts +5 -7
- package/lib/Utils/messages.js +30 -26
- package/lib/Utils/noise-handler.d.ts +0 -1
- package/lib/Utils/offline-node-processor.d.ts +0 -1
- package/lib/Utils/pre-key-manager.d.ts +0 -1
- package/lib/Utils/process-message.d.ts +3 -5
- package/lib/Utils/reporting-utils.d.ts +0 -1
- package/lib/Utils/rich-message-utils.d.ts +1 -2
- package/lib/Utils/signal.d.ts +0 -1
- package/lib/Utils/stanza-ack.d.ts +0 -1
- package/lib/Utils/sync-action-utils.d.ts +0 -1
- package/lib/Utils/tc-token-utils.d.ts +0 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -1
- package/lib/Utils/use-single-file-auth-state.d.ts +0 -1
- package/lib/Utils/use-single-file-auth-state.js +6 -1
- package/lib/Utils/use-sqlite-auth-state.d.ts +1 -1
- package/lib/Utils/use-sqlite-auth-state.js +12 -0
- package/lib/Utils/validate-connection.d.ts +4 -6
- package/lib/WABinary/constants.d.ts +0 -1
- package/lib/WABinary/decode.d.ts +0 -1
- package/lib/WABinary/encode.d.ts +0 -1
- package/lib/WABinary/generic-utils.d.ts +1 -4
- package/lib/WABinary/index.d.ts +0 -1
- package/lib/WABinary/jid-utils.d.ts +0 -1
- package/lib/WABinary/types.d.ts +18 -1
- package/lib/WAM/BinaryInfo.d.ts +0 -1
- package/lib/WAM/constants.d.ts +0 -1
- package/lib/WAM/encode.d.ts +0 -1
- package/lib/WAM/index.d.ts +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +8 -2
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/index.d.ts +2 -1
- package/lib/WAUSync/USyncQuery.d.ts +0 -1
- package/lib/WAUSync/USyncUser.d.ts +0 -1
- package/lib/WAUSync/index.d.ts +0 -1
- package/lib/index.d.ts +1 -1
- package/package.json +12 -7
- package/postinstall-banner.js +23 -0
- package/lib/Defaults/index.d.ts.map +0 -1
- package/lib/Defaults/index.js.map +0 -1
- package/lib/Signal/Group/ciphertext-message.d.ts.map +0 -1
- package/lib/Signal/Group/ciphertext-message.js.map +0 -1
- package/lib/Signal/Group/group-session-builder.d.ts.map +0 -1
- package/lib/Signal/Group/group-session-builder.js.map +0 -1
- package/lib/Signal/Group/group_cipher.d.ts.map +0 -1
- package/lib/Signal/Group/group_cipher.js.map +0 -1
- package/lib/Signal/Group/index.d.ts.map +0 -1
- package/lib/Signal/Group/index.js.map +0 -1
- package/lib/Signal/Group/keyhelper.d.ts.map +0 -1
- package/lib/Signal/Group/keyhelper.js.map +0 -1
- package/lib/Signal/Group/sender-chain-key.d.ts.map +0 -1
- package/lib/Signal/Group/sender-chain-key.js.map +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.js.map +0 -1
- package/lib/Signal/Group/sender-key-message.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-message.js.map +0 -1
- package/lib/Signal/Group/sender-key-name.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-name.js.map +0 -1
- package/lib/Signal/Group/sender-key-record.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-record.js.map +0 -1
- package/lib/Signal/Group/sender-key-state.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-state.js.map +0 -1
- package/lib/Signal/Group/sender-message-key.d.ts.map +0 -1
- package/lib/Signal/Group/sender-message-key.js.map +0 -1
- package/lib/Signal/libsignal.d.ts.map +0 -1
- package/lib/Signal/libsignal.js.map +0 -1
- package/lib/Signal/lid-mapping.d.ts.map +0 -1
- package/lib/Signal/lid-mapping.js.map +0 -1
- package/lib/Socket/Client/index.d.ts.map +0 -1
- package/lib/Socket/Client/index.js.map +0 -1
- package/lib/Socket/Client/types.d.ts.map +0 -1
- package/lib/Socket/Client/types.js.map +0 -1
- package/lib/Socket/Client/websocket.d.ts.map +0 -1
- package/lib/Socket/Client/websocket.js.map +0 -1
- package/lib/Socket/business.d.ts.map +0 -1
- package/lib/Socket/business.js.map +0 -1
- package/lib/Socket/chats.d.ts.map +0 -1
- package/lib/Socket/chats.js.map +0 -1
- package/lib/Socket/communities.d.ts.map +0 -1
- package/lib/Socket/communities.js.map +0 -1
- package/lib/Socket/groups.d.ts.map +0 -1
- package/lib/Socket/groups.js.map +0 -1
- package/lib/Socket/index.d.ts.map +0 -1
- package/lib/Socket/index.js.map +0 -1
- package/lib/Socket/messages-recv.d.ts.map +0 -1
- package/lib/Socket/messages-recv.js.map +0 -1
- package/lib/Socket/messages-send.d.ts.map +0 -1
- package/lib/Socket/messages-send.js.map +0 -1
- package/lib/Socket/mex.d.ts.map +0 -1
- package/lib/Socket/mex.js.map +0 -1
- package/lib/Socket/newsletter.d.ts.map +0 -1
- package/lib/Socket/newsletter.js.map +0 -1
- package/lib/Socket/socket.d.ts.map +0 -1
- package/lib/Socket/socket.js.map +0 -1
- package/lib/Store/index.d.ts.map +0 -1
- package/lib/Store/index.js.map +0 -1
- package/lib/Store/make-in-memory-store.d.ts.map +0 -1
- package/lib/Store/make-in-memory-store.js.map +0 -1
- package/lib/Store/make-ordered-dictionary.d.ts.map +0 -1
- package/lib/Store/make-ordered-dictionary.js.map +0 -1
- package/lib/Store/object-repository.d.ts.map +0 -1
- package/lib/Store/object-repository.js.map +0 -1
- package/lib/Types/Auth.d.ts.map +0 -1
- package/lib/Types/Auth.js.map +0 -1
- package/lib/Types/Bussines.d.ts.map +0 -1
- package/lib/Types/Bussines.js.map +0 -1
- package/lib/Types/Call.d.ts.map +0 -1
- package/lib/Types/Call.js.map +0 -1
- package/lib/Types/Chat.d.ts.map +0 -1
- package/lib/Types/Chat.js.map +0 -1
- package/lib/Types/Contact.d.ts.map +0 -1
- package/lib/Types/Contact.js.map +0 -1
- package/lib/Types/Events.d.ts.map +0 -1
- package/lib/Types/Events.js.map +0 -1
- package/lib/Types/GroupMetadata.d.ts.map +0 -1
- package/lib/Types/GroupMetadata.js.map +0 -1
- package/lib/Types/Label.d.ts.map +0 -1
- package/lib/Types/Label.js.map +0 -1
- package/lib/Types/LabelAssociation.d.ts.map +0 -1
- package/lib/Types/LabelAssociation.js.map +0 -1
- package/lib/Types/Message.d.ts.map +0 -1
- package/lib/Types/Message.js.map +0 -1
- package/lib/Types/Mex.d.ts.map +0 -1
- package/lib/Types/Mex.js.map +0 -1
- package/lib/Types/Product.d.ts.map +0 -1
- package/lib/Types/Product.js.map +0 -1
- package/lib/Types/RichType.d.ts.map +0 -1
- package/lib/Types/RichType.js.map +0 -1
- package/lib/Types/Signal.d.ts.map +0 -1
- package/lib/Types/Signal.js.map +0 -1
- package/lib/Types/Socket.d.ts.map +0 -1
- package/lib/Types/Socket.js.map +0 -1
- package/lib/Types/State.d.ts.map +0 -1
- package/lib/Types/State.js.map +0 -1
- package/lib/Types/USync.d.ts.map +0 -1
- package/lib/Types/USync.js.map +0 -1
- package/lib/Types/index.d.ts.map +0 -1
- package/lib/Types/index.js.map +0 -1
- package/lib/Utils/auth-utils.d.ts.map +0 -1
- package/lib/Utils/auth-utils.js.map +0 -1
- package/lib/Utils/browser-utils.d.ts.map +0 -1
- package/lib/Utils/browser-utils.js.map +0 -1
- package/lib/Utils/business.d.ts.map +0 -1
- package/lib/Utils/business.js.map +0 -1
- package/lib/Utils/chat-utils.d.ts.map +0 -1
- package/lib/Utils/chat-utils.js.map +0 -1
- package/lib/Utils/companion-reg-client-utils.d.ts.map +0 -1
- package/lib/Utils/companion-reg-client-utils.js.map +0 -1
- package/lib/Utils/crypto.d.ts.map +0 -1
- package/lib/Utils/crypto.js.map +0 -1
- package/lib/Utils/decode-wa-message.d.ts.map +0 -1
- package/lib/Utils/decode-wa-message.js.map +0 -1
- package/lib/Utils/event-buffer.d.ts.map +0 -1
- package/lib/Utils/event-buffer.js.map +0 -1
- package/lib/Utils/generics.d.ts.map +0 -1
- package/lib/Utils/generics.js.map +0 -1
- package/lib/Utils/history.d.ts.map +0 -1
- package/lib/Utils/history.js.map +0 -1
- package/lib/Utils/identity-change-handler.d.ts.map +0 -1
- package/lib/Utils/identity-change-handler.js.map +0 -1
- package/lib/Utils/index.d.ts.map +0 -1
- package/lib/Utils/index.js.map +0 -1
- package/lib/Utils/link-preview.d.ts.map +0 -1
- package/lib/Utils/link-preview.js.map +0 -1
- package/lib/Utils/logger.d.ts.map +0 -1
- package/lib/Utils/logger.js.map +0 -1
- package/lib/Utils/lt-hash.d.ts.map +0 -1
- package/lib/Utils/lt-hash.js.map +0 -1
- package/lib/Utils/make-mutex.d.ts.map +0 -1
- package/lib/Utils/make-mutex.js.map +0 -1
- package/lib/Utils/message-retry-manager.d.ts.map +0 -1
- package/lib/Utils/message-retry-manager.js.map +0 -1
- package/lib/Utils/messages-media.d.ts.map +0 -1
- package/lib/Utils/messages-media.js.map +0 -1
- package/lib/Utils/messages.d.ts.map +0 -1
- package/lib/Utils/messages.js.map +0 -1
- package/lib/Utils/noise-handler.d.ts.map +0 -1
- package/lib/Utils/noise-handler.js.map +0 -1
- package/lib/Utils/offline-node-processor.d.ts.map +0 -1
- package/lib/Utils/offline-node-processor.js.map +0 -1
- package/lib/Utils/pre-key-manager.d.ts.map +0 -1
- package/lib/Utils/pre-key-manager.js.map +0 -1
- package/lib/Utils/process-message.d.ts.map +0 -1
- package/lib/Utils/process-message.js.map +0 -1
- package/lib/Utils/reporting-utils.d.ts.map +0 -1
- package/lib/Utils/reporting-utils.js.map +0 -1
- package/lib/Utils/rich-message-utils.d.ts.map +0 -1
- package/lib/Utils/rich-message-utils.js.map +0 -1
- package/lib/Utils/signal.d.ts.map +0 -1
- package/lib/Utils/signal.js.map +0 -1
- package/lib/Utils/stanza-ack.d.ts.map +0 -1
- package/lib/Utils/stanza-ack.js.map +0 -1
- package/lib/Utils/sync-action-utils.d.ts.map +0 -1
- package/lib/Utils/sync-action-utils.js.map +0 -1
- package/lib/Utils/tc-token-utils.d.ts.map +0 -1
- package/lib/Utils/tc-token-utils.js.map +0 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-multi-file-auth-state.js.map +0 -1
- package/lib/Utils/use-single-file-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-single-file-auth-state.js.map +0 -1
- package/lib/Utils/use-sqlite-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-sqlite-auth-state.js.map +0 -1
- package/lib/Utils/validate-connection.d.ts.map +0 -1
- package/lib/Utils/validate-connection.js.map +0 -1
- package/lib/WABinary/constants.d.ts.map +0 -1
- package/lib/WABinary/constants.js.map +0 -1
- package/lib/WABinary/decode.d.ts.map +0 -1
- package/lib/WABinary/decode.js.map +0 -1
- package/lib/WABinary/encode.d.ts.map +0 -1
- package/lib/WABinary/encode.js.map +0 -1
- package/lib/WABinary/generic-utils.d.ts.map +0 -1
- package/lib/WABinary/generic-utils.js.map +0 -1
- package/lib/WABinary/index.d.ts.map +0 -1
- package/lib/WABinary/index.js.map +0 -1
- package/lib/WABinary/jid-utils.d.ts.map +0 -1
- package/lib/WABinary/jid-utils.js.map +0 -1
- package/lib/WABinary/types.d.ts.map +0 -1
- package/lib/WABinary/types.js.map +0 -1
- package/lib/WAM/BinaryInfo.d.ts.map +0 -1
- package/lib/WAM/BinaryInfo.js.map +0 -1
- package/lib/WAM/constants.d.ts.map +0 -1
- package/lib/WAM/constants.js.map +0 -1
- package/lib/WAM/encode.d.ts.map +0 -1
- package/lib/WAM/encode.js.map +0 -1
- package/lib/WAM/index.d.ts.map +0 -1
- package/lib/WAM/index.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/index.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/index.js.map +0 -1
- package/lib/WAUSync/USyncQuery.d.ts.map +0 -1
- package/lib/WAUSync/USyncQuery.js.map +0 -1
- package/lib/WAUSync/USyncUser.d.ts.map +0 -1
- package/lib/WAUSync/USyncUser.js.map +0 -1
- package/lib/WAUSync/index.d.ts.map +0 -1
- package/lib/WAUSync/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
|
@@ -1,2 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Contact } from './Contact.js';
|
|
2
|
+
import type { WAMessageAddressingMode } from './Message.js';
|
|
3
|
+
export type GroupParticipant = Contact & {
|
|
4
|
+
isAdmin?: boolean;
|
|
5
|
+
isSuperAdmin?: boolean;
|
|
6
|
+
admin?: 'admin' | 'superadmin' | null;
|
|
7
|
+
};
|
|
8
|
+
export type ParticipantAction = 'add' | 'remove' | 'promote' | 'demote' | 'modify';
|
|
9
|
+
export type RequestJoinAction = 'created' | 'revoked' | 'rejected';
|
|
10
|
+
export type RequestJoinMethod = 'invite_link' | 'linked_group_join' | 'non_admin_add' | undefined;
|
|
11
|
+
export interface GroupMetadata {
|
|
12
|
+
id: string;
|
|
13
|
+
notify?: string;
|
|
14
|
+
/** group uses 'lid' or 'pn' to send messages */
|
|
15
|
+
addressingMode?: WAMessageAddressingMode;
|
|
16
|
+
owner: string | undefined;
|
|
17
|
+
ownerPn?: string | undefined;
|
|
18
|
+
ownerUsername?: string | undefined;
|
|
19
|
+
owner_country_code?: string | undefined;
|
|
20
|
+
subject: string;
|
|
21
|
+
/** group subject owner */
|
|
22
|
+
subjectOwner?: string;
|
|
23
|
+
subjectOwnerPn?: string;
|
|
24
|
+
subjectOwnerUsername?: string;
|
|
25
|
+
/** group subject modification date */
|
|
26
|
+
subjectTime?: number;
|
|
27
|
+
creation?: number;
|
|
28
|
+
desc?: string;
|
|
29
|
+
descOwner?: string;
|
|
30
|
+
descOwnerPn?: string;
|
|
31
|
+
descOwnerUsername?: string;
|
|
32
|
+
descId?: string;
|
|
33
|
+
descTime?: number;
|
|
34
|
+
/** if this group is part of a community, it returns the jid of the community to which it belongs */
|
|
35
|
+
linkedParent?: string;
|
|
36
|
+
/** is set when the group only allows admins to change group settings */
|
|
37
|
+
restrict?: boolean;
|
|
38
|
+
/** is set when the group only allows admins to write messages */
|
|
39
|
+
announce?: boolean;
|
|
40
|
+
/** is set when the group also allows members to add participants */
|
|
41
|
+
memberAddMode?: boolean;
|
|
42
|
+
/** Request approval to join the group */
|
|
43
|
+
joinApprovalMode?: boolean;
|
|
44
|
+
/** is this a community */
|
|
45
|
+
isCommunity?: boolean;
|
|
46
|
+
/** is this the announce of a community */
|
|
47
|
+
isCommunityAnnounce?: boolean;
|
|
48
|
+
/** number of group participants */
|
|
49
|
+
size?: number;
|
|
50
|
+
participants: GroupParticipant[];
|
|
51
|
+
ephemeralDuration?: number;
|
|
52
|
+
inviteCode?: string;
|
|
53
|
+
/** the person who added you to group or changed some setting in group */
|
|
54
|
+
author?: string;
|
|
55
|
+
authorPn?: string;
|
|
56
|
+
authorUsername?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface WAGroupCreateResponse {
|
|
59
|
+
status: number;
|
|
60
|
+
gid?: string;
|
|
61
|
+
participants?: [{
|
|
62
|
+
[key: string]: {};
|
|
63
|
+
}];
|
|
64
|
+
}
|
|
65
|
+
export interface GroupModificationResponse {
|
|
66
|
+
status: number;
|
|
67
|
+
participants?: {
|
|
68
|
+
[key: string]: {};
|
|
69
|
+
};
|
|
70
|
+
}
|
|
2
71
|
//# sourceMappingURL=GroupMetadata.d.ts.map
|
package/lib/Types/Label.d.ts
CHANGED
package/lib/Types/Message.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export { proto as WAProto };
|
|
2
|
-
export const AssociationType:
|
|
3
|
-
export const ButtonHeaderType:
|
|
4
|
-
export const ButtonType:
|
|
5
|
-
export const CarouselCardType:
|
|
6
|
-
export const ListType:
|
|
7
|
-
export const ProtocolType:
|
|
8
|
-
export const WAMessageStubType:
|
|
9
|
-
export const WAMessageStatus:
|
|
2
|
+
export const AssociationType: any;
|
|
3
|
+
export const ButtonHeaderType: any;
|
|
4
|
+
export const ButtonType: any;
|
|
5
|
+
export const CarouselCardType: any;
|
|
6
|
+
export const ListType: any;
|
|
7
|
+
export const ProtocolType: any;
|
|
8
|
+
export const WAMessageStubType: any;
|
|
9
|
+
export const WAMessageStatus: any;
|
|
10
10
|
export const WAMessageAddressingMode: any;
|
|
11
11
|
import { proto } from '../../WAProto/index.js';
|
|
12
|
-
//# sourceMappingURL=Message.d.ts.map
|
package/lib/Types/Mex.d.ts
CHANGED
package/lib/Types/Product.d.ts
CHANGED
|
@@ -1,2 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
import type { WAMediaUpload } from './Message.js';
|
|
2
|
+
export type CatalogResult = {
|
|
3
|
+
data: {
|
|
4
|
+
paging: {
|
|
5
|
+
cursors: {
|
|
6
|
+
before: string;
|
|
7
|
+
after: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
data: any[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type ProductCreateResult = {
|
|
14
|
+
data: {
|
|
15
|
+
product: {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type CatalogStatus = {
|
|
19
|
+
status: string;
|
|
20
|
+
canAppeal: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type CatalogCollection = {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
products: Product[];
|
|
26
|
+
status: CatalogStatus;
|
|
27
|
+
};
|
|
28
|
+
export type ProductAvailability = 'in stock';
|
|
29
|
+
export type ProductBase = {
|
|
30
|
+
name: string;
|
|
31
|
+
retailerId?: string;
|
|
32
|
+
url?: string;
|
|
33
|
+
description: string;
|
|
34
|
+
price: number;
|
|
35
|
+
currency: string;
|
|
36
|
+
isHidden?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type ProductCreate = ProductBase & {
|
|
39
|
+
/** ISO country code for product origin. Set to undefined for no country */
|
|
40
|
+
originCountryCode: string | undefined;
|
|
41
|
+
/** images of the product */
|
|
42
|
+
images: WAMediaUpload[];
|
|
43
|
+
};
|
|
44
|
+
export type ProductUpdate = Omit<ProductCreate, 'originCountryCode'>;
|
|
45
|
+
export type Product = ProductBase & {
|
|
46
|
+
id: string;
|
|
47
|
+
imageUrls: {
|
|
48
|
+
[_: string]: string;
|
|
49
|
+
};
|
|
50
|
+
reviewStatus: {
|
|
51
|
+
[_: string]: string;
|
|
52
|
+
};
|
|
53
|
+
availability: ProductAvailability;
|
|
54
|
+
};
|
|
55
|
+
export type OrderPrice = {
|
|
56
|
+
currency: string;
|
|
57
|
+
total: number;
|
|
58
|
+
};
|
|
59
|
+
export type OrderProduct = {
|
|
60
|
+
id: string;
|
|
61
|
+
imageUrl: string;
|
|
62
|
+
name: string;
|
|
63
|
+
quantity: number;
|
|
64
|
+
currency: string;
|
|
65
|
+
price: number;
|
|
66
|
+
};
|
|
67
|
+
export type OrderDetails = {
|
|
68
|
+
price: OrderPrice;
|
|
69
|
+
products: OrderProduct[];
|
|
70
|
+
};
|
|
71
|
+
export type CatalogCursor = string;
|
|
72
|
+
export type GetCatalogOptions = {
|
|
73
|
+
/** cursor to start from */
|
|
74
|
+
cursor?: CatalogCursor;
|
|
75
|
+
/** number of products to fetch */
|
|
76
|
+
limit?: number;
|
|
77
|
+
jid?: string;
|
|
78
|
+
};
|
|
2
79
|
//# sourceMappingURL=Product.d.ts.map
|
package/lib/Types/RichType.d.ts
CHANGED
package/lib/Types/Signal.d.ts
CHANGED
|
@@ -1,2 +1,87 @@
|
|
|
1
|
+
import { proto } from '../../WAProto/index.js';
|
|
2
|
+
import type { LIDMappingStore } from '../Signal/lid-mapping.js';
|
|
3
|
+
type DecryptGroupSignalOpts = {
|
|
4
|
+
group: string;
|
|
5
|
+
authorJid: string;
|
|
6
|
+
msg: Uint8Array;
|
|
7
|
+
};
|
|
8
|
+
type ProcessSenderKeyDistributionMessageOpts = {
|
|
9
|
+
item: proto.Message.ISenderKeyDistributionMessage;
|
|
10
|
+
authorJid: string;
|
|
11
|
+
};
|
|
12
|
+
type DecryptSignalProtoOpts = {
|
|
13
|
+
jid: string;
|
|
14
|
+
type: 'pkmsg' | 'msg';
|
|
15
|
+
ciphertext: Uint8Array;
|
|
16
|
+
};
|
|
17
|
+
type EncryptMessageOpts = {
|
|
18
|
+
jid: string;
|
|
19
|
+
data: Uint8Array;
|
|
20
|
+
};
|
|
21
|
+
type EncryptGroupMessageOpts = {
|
|
22
|
+
group: string;
|
|
23
|
+
data: Uint8Array;
|
|
24
|
+
meId: string;
|
|
25
|
+
};
|
|
26
|
+
type GetSenderKeyDistributionMessageOpts = {
|
|
27
|
+
group: string;
|
|
28
|
+
meId: string;
|
|
29
|
+
};
|
|
30
|
+
type PreKey = {
|
|
31
|
+
keyId: number;
|
|
32
|
+
publicKey: Uint8Array;
|
|
33
|
+
};
|
|
34
|
+
type SignedPreKey = PreKey & {
|
|
35
|
+
signature: Uint8Array;
|
|
36
|
+
};
|
|
37
|
+
type E2ESession = {
|
|
38
|
+
registrationId: number;
|
|
39
|
+
identityKey: Uint8Array;
|
|
40
|
+
signedPreKey: SignedPreKey;
|
|
41
|
+
preKey?: PreKey;
|
|
42
|
+
};
|
|
43
|
+
type E2ESessionOpts = {
|
|
44
|
+
jid: string;
|
|
45
|
+
session: E2ESession;
|
|
46
|
+
};
|
|
47
|
+
export type SignalRepository = {
|
|
48
|
+
decryptGroupMessage(opts: DecryptGroupSignalOpts): Promise<Uint8Array>;
|
|
49
|
+
processSenderKeyDistributionMessage(opts: ProcessSenderKeyDistributionMessageOpts): Promise<void>;
|
|
50
|
+
decryptMessage(opts: DecryptSignalProtoOpts): Promise<Uint8Array>;
|
|
51
|
+
encryptMessage(opts: EncryptMessageOpts): Promise<{
|
|
52
|
+
type: 'pkmsg' | 'msg';
|
|
53
|
+
ciphertext: Uint8Array;
|
|
54
|
+
}>;
|
|
55
|
+
encryptGroupMessage(opts: EncryptGroupMessageOpts): Promise<{
|
|
56
|
+
senderKeyDistributionMessage: Uint8Array;
|
|
57
|
+
ciphertext: Uint8Array;
|
|
58
|
+
}>;
|
|
59
|
+
getSenderKeyDistributionMessage(opts: GetSenderKeyDistributionMessageOpts): Promise<Uint8Array>;
|
|
60
|
+
hasSenderKey(opts: GetSenderKeyDistributionMessageOpts): Promise<boolean>;
|
|
61
|
+
getSessionInfo(jid: string): Promise<{
|
|
62
|
+
baseKey: Uint8Array;
|
|
63
|
+
registrationId: number;
|
|
64
|
+
} | null>;
|
|
65
|
+
injectE2ESession(opts: E2ESessionOpts): Promise<void>;
|
|
66
|
+
validateSession(jid: string): Promise<{
|
|
67
|
+
exists: boolean;
|
|
68
|
+
reason?: string;
|
|
69
|
+
}>;
|
|
70
|
+
jidToSignalProtocolAddress(jid: string): string;
|
|
71
|
+
migrateSession(fromJid: string, toJid: string): Promise<{
|
|
72
|
+
migrated: number;
|
|
73
|
+
skipped: number;
|
|
74
|
+
total: number;
|
|
75
|
+
}>;
|
|
76
|
+
validateSession(jid: string): Promise<{
|
|
77
|
+
exists: boolean;
|
|
78
|
+
reason?: string;
|
|
79
|
+
}>;
|
|
80
|
+
deleteSession(jids: string[]): Promise<void>;
|
|
81
|
+
};
|
|
82
|
+
export interface SignalRepositoryWithLIDStore extends SignalRepository {
|
|
83
|
+
lidMapping: LIDMappingStore;
|
|
84
|
+
close?: () => void;
|
|
85
|
+
}
|
|
1
86
|
export {};
|
|
2
87
|
//# sourceMappingURL=Signal.d.ts.map
|
package/lib/Types/Socket.d.ts
CHANGED
|
@@ -1,2 +1,136 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Agent } from 'https';
|
|
2
|
+
import type { URL } from 'url';
|
|
3
|
+
import { proto } from '../../WAProto/index.js';
|
|
4
|
+
import type { ILogger } from '../Utils/logger.js';
|
|
5
|
+
import type { AuthenticationState, LIDMapping, SignalAuthState, TransactionCapabilityOptions } from './Auth.js';
|
|
6
|
+
import type { GroupMetadata } from './GroupMetadata.js';
|
|
7
|
+
import { type MediaConnInfo, type WAMessageKey } from './Message.js';
|
|
8
|
+
import type { SignalRepositoryWithLIDStore } from './Signal.js';
|
|
9
|
+
export type WAVersion = [number, number, number];
|
|
10
|
+
export type WABrowserDescription = [string, string, string];
|
|
11
|
+
export type CacheStore = {
|
|
12
|
+
/** get a cached key and change the stats */
|
|
13
|
+
get<T>(key: string): Promise<T> | T | undefined;
|
|
14
|
+
/** set a key in the cache */
|
|
15
|
+
set<T>(key: string, value: T): Promise<void> | void | number | boolean;
|
|
16
|
+
/** delete a key from the cache */
|
|
17
|
+
del(key: string): void | Promise<void> | number | boolean;
|
|
18
|
+
/** flush all data */
|
|
19
|
+
flushAll(): void | Promise<void>;
|
|
20
|
+
close?: () => void;
|
|
21
|
+
};
|
|
22
|
+
export type PossiblyExtendedCacheStore = CacheStore & {
|
|
23
|
+
mget?: <T>(keys: string[]) => Promise<Record<string, T | undefined>>;
|
|
24
|
+
mset?: <T>(entries: {
|
|
25
|
+
key: string;
|
|
26
|
+
value: T;
|
|
27
|
+
}[]) => Promise<void> | void | number | boolean;
|
|
28
|
+
mdel?: (keys: string[]) => void | Promise<void> | number | boolean;
|
|
29
|
+
};
|
|
30
|
+
export type PatchedMessageWithRecipientJID = proto.IMessage & {
|
|
31
|
+
recipientJid?: string;
|
|
32
|
+
};
|
|
33
|
+
export type SocketConfig = {
|
|
34
|
+
/** the WS url to connect to WA */
|
|
35
|
+
waWebSocketUrl: string | URL;
|
|
36
|
+
/** Fails the connection if the socket times out in this interval */
|
|
37
|
+
connectTimeoutMs: number;
|
|
38
|
+
/** Default timeout for queries, undefined for no timeout */
|
|
39
|
+
defaultQueryTimeoutMs: number | undefined;
|
|
40
|
+
/** ping-pong interval for WS connection */
|
|
41
|
+
keepAliveIntervalMs: number;
|
|
42
|
+
/** should baileys use the mobile api instead of the multi device api
|
|
43
|
+
* @deprecated This feature has been removed
|
|
44
|
+
*/
|
|
45
|
+
mobile?: boolean;
|
|
46
|
+
/** proxy agent */
|
|
47
|
+
agent?: Agent;
|
|
48
|
+
/** logger */
|
|
49
|
+
logger: ILogger;
|
|
50
|
+
/** version to connect with */
|
|
51
|
+
version: WAVersion;
|
|
52
|
+
/** override browser config */
|
|
53
|
+
browser: WABrowserDescription;
|
|
54
|
+
/** Initial pushName carried in the registration ClientPayload (used by mock servers for deterministic phone assignment). */
|
|
55
|
+
pushName?: string;
|
|
56
|
+
/** agent used for fetch requests -- uploading/downloading media */
|
|
57
|
+
fetchAgent?: Agent;
|
|
58
|
+
/** should the QR be printed in the terminal
|
|
59
|
+
* @deprecated This feature has been removed
|
|
60
|
+
*/
|
|
61
|
+
printQRInTerminal?: boolean;
|
|
62
|
+
/** should events be emitted for actions done by this socket connection */
|
|
63
|
+
emitOwnEvents: boolean;
|
|
64
|
+
/** custom upload hosts to upload media to */
|
|
65
|
+
customUploadHosts: MediaConnInfo['hosts'];
|
|
66
|
+
/** time to wait between sending new retry requests */
|
|
67
|
+
retryRequestDelayMs: number;
|
|
68
|
+
/** max retry count */
|
|
69
|
+
maxMsgRetryCount: number;
|
|
70
|
+
/** time to wait for the generation of the next QR in ms */
|
|
71
|
+
qrTimeout?: number;
|
|
72
|
+
/** provide an auth state object to maintain the auth state */
|
|
73
|
+
auth: AuthenticationState;
|
|
74
|
+
/** manage history processing with this control; by default will sync up everything */
|
|
75
|
+
shouldSyncHistoryMessage: (msg: proto.Message.IHistorySyncNotification) => boolean;
|
|
76
|
+
/** transaction capability options for SignalKeyStore */
|
|
77
|
+
transactionOpts: TransactionCapabilityOptions;
|
|
78
|
+
/** marks the client as online whenever the socket successfully connects */
|
|
79
|
+
markOnlineOnConnect: boolean;
|
|
80
|
+
/** alphanumeric country code (USA -> US) for the number used */
|
|
81
|
+
countryCode: string;
|
|
82
|
+
/** provide a cache to store media, so does not have to be re-uploaded */
|
|
83
|
+
mediaCache?: CacheStore;
|
|
84
|
+
/**
|
|
85
|
+
* map to store the retry counts for failed messages;
|
|
86
|
+
* used to determine whether to retry a message or not */
|
|
87
|
+
msgRetryCounterCache?: CacheStore;
|
|
88
|
+
/** provide a cache to store a user's device list */
|
|
89
|
+
userDevicesCache?: PossiblyExtendedCacheStore;
|
|
90
|
+
/** cache to store call offers */
|
|
91
|
+
callOfferCache?: CacheStore;
|
|
92
|
+
/** cache to track placeholder resends */
|
|
93
|
+
placeholderResendCache?: CacheStore;
|
|
94
|
+
/** width for link preview images */
|
|
95
|
+
linkPreviewImageThumbnailWidth: number;
|
|
96
|
+
/** Should Baileys ask the phone for full history, will be received async */
|
|
97
|
+
syncFullHistory: boolean;
|
|
98
|
+
/** Should baileys fire init queries automatically, default true */
|
|
99
|
+
fireInitQueries: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* generate a high quality link preview,
|
|
102
|
+
* entails uploading the jpegThumbnail to WA
|
|
103
|
+
* */
|
|
104
|
+
generateHighQualityLinkPreview: boolean;
|
|
105
|
+
/** Enable automatic session recreation for failed messages */
|
|
106
|
+
enableAutoSessionRecreation: boolean;
|
|
107
|
+
/** Enable recent message caching for retry handling */
|
|
108
|
+
enableRecentMessageCache: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Returns if a jid should be ignored,
|
|
111
|
+
* no event for that jid will be triggered.
|
|
112
|
+
* Messages from that jid will also not be decrypted
|
|
113
|
+
* */
|
|
114
|
+
shouldIgnoreJid: (jid: string) => boolean | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Optionally patch the message before sending out
|
|
117
|
+
* */
|
|
118
|
+
patchMessageBeforeSending: (msg: proto.IMessage, recipientJids?: string[]) => Promise<PatchedMessageWithRecipientJID[] | PatchedMessageWithRecipientJID> | PatchedMessageWithRecipientJID[] | PatchedMessageWithRecipientJID;
|
|
119
|
+
/** verify app state MACs */
|
|
120
|
+
appStateMacVerification: {
|
|
121
|
+
patch: boolean;
|
|
122
|
+
snapshot: boolean;
|
|
123
|
+
};
|
|
124
|
+
/** options for HTTP fetch requests */
|
|
125
|
+
options: RequestInit;
|
|
126
|
+
/**
|
|
127
|
+
* fetch a message from your store
|
|
128
|
+
* implement this so that messages failed to send
|
|
129
|
+
* (solves the "this message can take a while" issue) can be retried
|
|
130
|
+
* */
|
|
131
|
+
getMessage: (key: WAMessageKey) => Promise<proto.IMessage | undefined>;
|
|
132
|
+
/** cached group metadata, use to prevent redundant requests to WA & speed up msg sending */
|
|
133
|
+
cachedGroupMetadata: (jid: string) => Promise<GroupMetadata | undefined>;
|
|
134
|
+
makeSignalRepository: (auth: SignalAuthState, logger: ILogger, pnToLIDFunc?: (jids: string[]) => Promise<LIDMapping[] | undefined>) => SignalRepositoryWithLIDStore;
|
|
135
|
+
};
|
|
2
136
|
//# sourceMappingURL=Socket.d.ts.map
|
package/lib/Types/State.d.ts
CHANGED
package/lib/Types/USync.d.ts
CHANGED
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BinaryNode } from '../WABinary/index.js';
|
|
2
|
+
import { USyncUser } from '../WAUSync/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the interface for a USyncQuery protocol
|
|
5
|
+
*/
|
|
6
|
+
export interface USyncQueryProtocol {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the protocol
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Defines what goes inside the query part of a USyncQuery
|
|
13
|
+
*/
|
|
14
|
+
getQueryElement: () => BinaryNode;
|
|
15
|
+
/**
|
|
16
|
+
* Defines what goes inside the user part of a USyncQuery
|
|
17
|
+
*/
|
|
18
|
+
getUserElement: (user: USyncUser) => BinaryNode | null;
|
|
19
|
+
/**
|
|
20
|
+
* Parse the result of the query
|
|
21
|
+
* @param data Data from the result
|
|
22
|
+
* @returns Whatever the protocol is supposed to return
|
|
23
|
+
*/
|
|
24
|
+
parser: (data: BinaryNode) => unknown;
|
|
25
|
+
}
|
|
2
26
|
//# sourceMappingURL=USync.d.ts.map
|
package/lib/Types/index.d.ts
CHANGED
|
@@ -1,14 +1,66 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
|
|
1
|
+
export * from './Auth.js';
|
|
2
|
+
export * from './GroupMetadata.js';
|
|
3
|
+
export * from './Chat.js';
|
|
4
|
+
export * from './Contact.js';
|
|
5
|
+
export * from './State.js';
|
|
6
|
+
export * from './Message.js';
|
|
7
|
+
export * from './Socket.js';
|
|
8
|
+
export * from './Events.js';
|
|
9
|
+
export * from './Product.js';
|
|
10
|
+
export * from './Call.js';
|
|
11
|
+
export * from './Signal.js';
|
|
12
|
+
export * from './Mex.js';
|
|
13
|
+
import type { AuthenticationState } from './Auth.js';
|
|
14
|
+
import type { SocketConfig } from './Socket.js';
|
|
15
|
+
export type UserFacingSocketConfig = Partial<SocketConfig> & {
|
|
16
|
+
auth: AuthenticationState;
|
|
17
|
+
};
|
|
18
|
+
export type BrowsersMap = {
|
|
19
|
+
ubuntu(browser: string): [string, string, string];
|
|
20
|
+
macOS(browser: string): [string, string, string];
|
|
21
|
+
baileys(browser: string): [string, string, string];
|
|
22
|
+
windows(browser: string): [string, string, string];
|
|
23
|
+
android(browser: string): [string, string, string];
|
|
24
|
+
appropriate(browser: string): [string, string, string];
|
|
25
|
+
};
|
|
26
|
+
export declare enum DisconnectReason {
|
|
27
|
+
connectionClosed = 428,
|
|
28
|
+
connectionLost = 408,
|
|
29
|
+
connectionReplaced = 440,
|
|
30
|
+
timedOut = 408,
|
|
31
|
+
loggedOut = 401,
|
|
32
|
+
badSession = 500,
|
|
33
|
+
restartRequired = 515,
|
|
34
|
+
multideviceMismatch = 411,
|
|
35
|
+
forbidden = 403,
|
|
36
|
+
unavailableService = 503
|
|
37
|
+
}
|
|
38
|
+
export type WAInitResponse = {
|
|
39
|
+
ref: string;
|
|
40
|
+
ttl: number;
|
|
41
|
+
status: 200;
|
|
42
|
+
};
|
|
43
|
+
export type WABusinessHoursConfig = {
|
|
44
|
+
day_of_week: string;
|
|
45
|
+
mode: string;
|
|
46
|
+
open_time?: number;
|
|
47
|
+
close_time?: number;
|
|
48
|
+
};
|
|
49
|
+
export type WABusinessProfile = {
|
|
50
|
+
description: string;
|
|
51
|
+
email: string | undefined;
|
|
52
|
+
business_hours: {
|
|
53
|
+
timezone?: string;
|
|
54
|
+
config?: WABusinessHoursConfig[];
|
|
55
|
+
business_config?: WABusinessHoursConfig[];
|
|
56
|
+
};
|
|
57
|
+
website: string[];
|
|
58
|
+
category?: string;
|
|
59
|
+
wid?: string;
|
|
60
|
+
address?: string;
|
|
61
|
+
};
|
|
62
|
+
export type CurveKeyPair = {
|
|
63
|
+
private: Uint8Array;
|
|
64
|
+
public: Uint8Array;
|
|
65
|
+
};
|
|
14
66
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/Utils/business.d.ts
CHANGED
package/lib/Utils/business.js
CHANGED
|
@@ -5,6 +5,7 @@ import { tmpdir } from 'os';
|
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../WABinary/index.js';
|
|
7
7
|
import { generateMessageIDV2 } from './generics.js';
|
|
8
|
+
import logger from './logger.js';
|
|
8
9
|
import { getStream, getUrlFromDirectPath } from './messages-media.js';
|
|
9
10
|
export const parseCatalogNode = (node) => {
|
|
10
11
|
const catalogNode = getBinaryNodeChild(node, 'product_catalog');
|
|
@@ -209,7 +210,7 @@ export const uploadingNecessaryImages = async (images, waUploadToServer, timeout
|
|
|
209
210
|
fileEncSha256B64: sha,
|
|
210
211
|
timeoutMs
|
|
211
212
|
});
|
|
212
|
-
await fs.unlink(filePath).catch(err =>
|
|
213
|
+
await fs.unlink(filePath).catch(err => logger.warn({ err, filePath }, 'Vanz@Fix (bug 57): error deleting temp file')); // was console.log
|
|
213
214
|
return { url: getUrlFromDirectPath(directPath) };
|
|
214
215
|
}));
|
|
215
216
|
return results;
|