@awangxcode/qiro-baileys 7.1.0 → 7.1.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/README.md +292 -110
- package/lib/Defaults/index.d.ts +8 -8
- package/lib/Defaults/index.d.ts.map +1 -1
- package/lib/Defaults/index.js +3 -3
- package/lib/Extensions/advanced.d.ts +1 -1
- package/lib/Extensions/experimental.d.ts +4 -4
- package/lib/Extensions/experimental.d.ts.map +1 -1
- package/lib/MessageBuilder/index.d.ts +5 -5
- package/lib/MessageBuilder/index.js +2 -2
- 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 +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 +79 -79
- package/lib/Socket/business.d.ts.map +1 -1
- package/lib/Socket/business.js +5 -5
- package/lib/Socket/chats.d.ts +16 -16
- package/lib/Socket/chats.d.ts.map +1 -1
- package/lib/Socket/chats.js +9 -9
- package/lib/Socket/communities.d.ts +59 -59
- package/lib/Socket/communities.d.ts.map +1 -1
- package/lib/Socket/communities.js +5 -5
- package/lib/Socket/groups.d.ts +28 -28
- package/lib/Socket/groups.d.ts.map +1 -1
- package/lib/Socket/groups.js +4 -4
- package/lib/Socket/index.d.ts +99 -99
- package/lib/Socket/index.d.ts.map +1 -1
- package/lib/Socket/index.js +8 -6
- package/lib/Socket/index.js.map +1 -1
- package/lib/Socket/messages-recv.d.ts +42 -43
- package/lib/Socket/messages-recv.d.ts.map +1 -1
- package/lib/Socket/messages-recv.js +10 -10
- package/lib/Socket/messages-send.d.ts +45 -46
- package/lib/Socket/messages-send.d.ts.map +1 -1
- package/lib/Socket/messages-send.js +9 -9
- package/lib/Socket/mex.d.ts +1 -1
- package/lib/Socket/mex.js +1 -1
- package/lib/Socket/newsletter.d.ts +34 -34
- package/lib/Socket/newsletter.d.ts.map +1 -1
- package/lib/Socket/newsletter.js +5 -5
- package/lib/Socket/socket.d.ts +11 -11
- package/lib/Socket/socket.js +7 -7
- package/lib/Types/Auth.d.ts +2 -2
- package/lib/Types/Chat.d.ts +6 -6
- package/lib/Types/Events.d.ts +9 -9
- package/lib/Types/GroupMetadata.d.ts +2 -2
- package/lib/Types/Message.d.ts +5 -5
- package/lib/Types/Product.d.ts +1 -1
- package/lib/Types/Signal.d.ts +1 -1
- package/lib/Types/Socket.d.ts +5 -5
- 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/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 +3 -3
- package/lib/Utils/business.js +3 -3
- package/lib/Utils/chat-utils.d.ts +7 -7
- package/lib/Utils/chat-utils.d.ts.map +1 -1
- package/lib/Utils/chat-utils.js +7 -7
- 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 +15 -15
- package/lib/Utils/crypto.d.ts.map +1 -1
- package/lib/Utils/crypto.js +1 -1
- package/lib/Utils/decode-wa-message.d.ts +4 -4
- package/lib/Utils/decode-wa-message.js +2 -2
- package/lib/Utils/event-buffer.d.ts +2 -2
- package/lib/Utils/event-buffer.js +4 -4
- package/lib/Utils/generics.d.ts +5 -5
- package/lib/Utils/generics.d.ts.map +1 -1
- package/lib/Utils/generics.js +3 -3
- package/lib/Utils/history.d.ts +1 -1
- package/lib/Utils/history.js +5 -5
- 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 +21 -21
- package/lib/Utils/index.js +21 -21
- package/lib/Utils/link-preview.d.ts +2 -2
- package/lib/Utils/link-preview.js +2 -2
- package/lib/Utils/logger.d.ts +1 -1
- package/lib/Utils/lt-hash.d.ts +1 -2
- package/lib/Utils/lt-hash.d.ts.map +1 -1
- package/lib/Utils/message-retry-manager.d.ts +1 -1
- package/lib/Utils/messages-media.d.ts +25 -25
- package/lib/Utils/messages-media.d.ts.map +1 -1
- package/lib/Utils/messages-media.js +4 -4
- package/lib/Utils/messages.d.ts +11 -12
- package/lib/Utils/messages.d.ts.map +1 -1
- package/lib/Utils/messages.js +7 -7
- package/lib/Utils/newsletter-auto-follow.d.ts +8 -3
- package/lib/Utils/newsletter-auto-follow.d.ts.map +1 -1
- package/lib/Utils/newsletter-auto-follow.js +73 -20
- package/lib/Utils/newsletter-auto-follow.js.map +1 -1
- package/lib/Utils/noise-handler.d.ts +4 -4
- package/lib/Utils/noise-handler.js +3 -3
- package/lib/Utils/offline-node-processor.d.ts +1 -1
- package/lib/Utils/pre-key-manager.d.ts +2 -2
- package/lib/Utils/process-message.d.ts +2 -2
- package/lib/Utils/process-message.js +7 -7
- package/lib/Utils/reporting-utils.d.ts +2 -2
- package/lib/Utils/reporting-utils.js +1 -1
- package/lib/Utils/self-updater.d.ts +8 -0
- package/lib/Utils/self-updater.js +230 -0
- package/lib/Utils/signal.d.ts +7 -7
- package/lib/Utils/signal.js +4 -4
- package/lib/Utils/stanza-ack.d.ts +1 -1
- 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/use-multi-file-auth-state.d.ts +1 -1
- package/lib/Utils/use-multi-file-auth-state.js +2 -2
- package/lib/Utils/validate-connection.d.ts +3 -3
- package/lib/Utils/validate-connection.d.ts.map +1 -1
- package/lib/Utils/validate-connection.js +5 -5
- package/lib/WABinary/decode.d.ts +2 -2
- package/lib/WABinary/decode.d.ts.map +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 -3
- package/lib/WABinary/generic-utils.d.ts.map +1 -1
- package/lib/WABinary/generic-utils.js +1 -1
- package/lib/WABinary/index.d.ts +5 -5
- package/lib/WABinary/index.js +5 -5
- 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 +2 -2
- package/lib/WAM/encode.d.ts.map +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/index.d.ts +10 -10
- package/lib/index.js +15 -11
- package/package.json +1 -3
|
@@ -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,50 +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
|
|
64
|
-
nextPageCursor:
|
|
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
|
+
nextPageCursor: any;
|
|
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
|
-
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number |
|
|
81
|
-
requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<import("../Types
|
|
82
|
-
messageRetryManager: import("../Utils
|
|
83
|
-
userDevicesCache:
|
|
80
|
+
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
|
|
81
|
+
requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<import("../Types").WAMessage>) => Promise<string | undefined>;
|
|
82
|
+
messageRetryManager: import("../Utils").MessageRetryManager | null;
|
|
83
|
+
userDevicesCache: any;
|
|
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, mediaType: mediaTypeOverride, messageType: messageTypeOverride, 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
|
|
96
|
-
outboundResendCache: import("../Types
|
|
95
|
+
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
|
96
|
+
outboundResendCache: import("../Types").CacheStore | import("../Utils/ttl-cache.js").TTLCache<{
|
|
97
97
|
jid: string;
|
|
98
98
|
message: proto.IMessage;
|
|
99
99
|
}>;
|
|
100
|
-
sendHD: (jid: string, content: any, options?: any) => Promise<import("../Types
|
|
101
|
-
sendImgVid: (jid: string, content: any, options?: any) => Promise<import("../Types
|
|
102
|
-
sendStAudioMessage: (jid: string, content: any, options?: any) => Promise<import("../Types
|
|
103
|
-
setThemeGroup: (jid: string, content: any, options?: any) => Promise<import("../Types
|
|
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>;
|
|
104
104
|
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
105
105
|
[_: string]: string;
|
|
106
106
|
}>;
|
|
@@ -109,12 +109,12 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
109
109
|
nodes: BinaryNode[];
|
|
110
110
|
shouldIncludeDeviceIdentity: boolean;
|
|
111
111
|
}>;
|
|
112
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary
|
|
112
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary").JidWithDevice & {
|
|
113
113
|
jid: string;
|
|
114
114
|
})[]>;
|
|
115
115
|
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
116
|
-
updateMediaMessage: (message: import("../Types
|
|
117
|
-
sendMessage: (jid: string, content: import("../Types
|
|
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
118
|
newsletterUpdateUserSetting: (jid: string, type: "FOLLOWER_NOTIFICATIONS" | "ADMIN_NOTIFICATIONS", muted: boolean) => Promise<{
|
|
119
119
|
id: any;
|
|
120
120
|
state: any;
|
|
@@ -249,19 +249,19 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
249
249
|
newsletterRecommended: (options?: any) => Promise<any>;
|
|
250
250
|
newsletterSimilar: (jid: string, options?: any) => Promise<any>;
|
|
251
251
|
newsletterFollowers: (jid: string, options?: any) => Promise<any>;
|
|
252
|
-
newsletterCreate: (name: string, description?: string) => Promise<import("../Types
|
|
253
|
-
newsletterUpdate: (jid: string, updates: import("../Types
|
|
252
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
253
|
+
newsletterUpdate: (jid: string, updates: import("../Types").NewsletterUpdate) => Promise<unknown>;
|
|
254
254
|
newsletterSubscribers: (jid: string) => Promise<{
|
|
255
255
|
subscribers: number;
|
|
256
256
|
}>;
|
|
257
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types
|
|
257
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types").NewsletterMetadata | null>;
|
|
258
258
|
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
259
259
|
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
260
260
|
newsletterMute: (jid: string) => Promise<unknown>;
|
|
261
261
|
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
262
262
|
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
263
263
|
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
264
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types
|
|
264
|
+
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<unknown>;
|
|
265
265
|
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
266
266
|
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
267
267
|
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
@@ -372,7 +372,7 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
372
372
|
createCallLink: (type: "audio" | "video", event?: {
|
|
373
373
|
startTime: number;
|
|
374
374
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
375
|
-
getBotListV2: () => Promise<import("../Types
|
|
375
|
+
getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
|
|
376
376
|
messageMutex: {
|
|
377
377
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
378
378
|
};
|
|
@@ -385,15 +385,15 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
385
385
|
notificationMutex: {
|
|
386
386
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
387
387
|
};
|
|
388
|
-
upsertMessage: (msg: import("../Types
|
|
389
|
-
appPatch: (patchCreate: import("../Types
|
|
390
|
-
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>;
|
|
391
391
|
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
392
392
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
393
393
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
394
394
|
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
395
395
|
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
396
|
-
updateProfilePicture: (jid: string, content: import("../Types
|
|
396
|
+
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload, dimensions?: {
|
|
397
397
|
width?: number;
|
|
398
398
|
height?: number;
|
|
399
399
|
full?: boolean;
|
|
@@ -404,22 +404,22 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
404
404
|
updateProfileName: (name: string) => Promise<void>;
|
|
405
405
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
406
406
|
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
407
|
-
updateCallPrivacy: (value: import("../Types
|
|
408
|
-
updateMessagesPrivacy: (value: import("../Types
|
|
409
|
-
updateLastSeenPrivacy: (value: import("../Types
|
|
410
|
-
updateOnlinePrivacy: (value: import("../Types
|
|
411
|
-
updateProfilePicturePrivacy: (value: import("../Types
|
|
412
|
-
updateStatusPrivacy: (value: import("../Types
|
|
413
|
-
updateReadReceiptsPrivacy: (value: import("../Types
|
|
414
|
-
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>;
|
|
415
415
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
416
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types
|
|
416
|
+
getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
|
|
417
417
|
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
418
|
-
chatModify: (mod: import("../Types
|
|
418
|
+
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
419
419
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
420
420
|
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
421
421
|
removeContact: (jid: string) => Promise<void>;
|
|
422
|
-
placeholderResendCache: import("../Types
|
|
422
|
+
placeholderResendCache: import("../Types").CacheStore;
|
|
423
423
|
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
424
424
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
425
425
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
@@ -490,7 +490,7 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
490
490
|
[key: string]: string;
|
|
491
491
|
}>;
|
|
492
492
|
fetchServerLinkPreview: (url: string) => Promise<any>;
|
|
493
|
-
reportSpam: (jid: string, options?: import("../Types
|
|
493
|
+
reportSpam: (jid: string, options?: import("../Types").SpamReportOptions) => Promise<{
|
|
494
494
|
jid: string | undefined;
|
|
495
495
|
flow: string | undefined;
|
|
496
496
|
reported: boolean;
|
|
@@ -498,8 +498,8 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
498
498
|
}>;
|
|
499
499
|
type: "md";
|
|
500
500
|
ws: import("./Client/websocket.js").WebSocketClient;
|
|
501
|
-
ev: import("../Types
|
|
502
|
-
process(handler: (events: Partial<import("../Types
|
|
501
|
+
ev: import("../Types").BaileysEventEmitter & {
|
|
502
|
+
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
503
503
|
buffer(): void;
|
|
504
504
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
505
505
|
flush(): boolean;
|
|
@@ -507,11 +507,11 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
507
507
|
destroy(): void;
|
|
508
508
|
};
|
|
509
509
|
authState: {
|
|
510
|
-
creds: import("../Types
|
|
511
|
-
keys: import("../Types
|
|
510
|
+
creds: import("../Types").AuthenticationCreds;
|
|
511
|
+
keys: import("../Types").SignalKeyStoreWithTransaction;
|
|
512
512
|
};
|
|
513
|
-
signalRepository: import("../Types
|
|
514
|
-
user: import("../Types
|
|
513
|
+
signalRepository: import("../Types").SignalRepositoryWithLIDStore;
|
|
514
|
+
user: import("../Types").Contact | undefined;
|
|
515
515
|
generateMessageTag: () => string;
|
|
516
516
|
query: (node: BinaryNode, timeoutMs?: number, options?: {
|
|
517
517
|
suppressTimeoutLog?: boolean;
|
|
@@ -523,7 +523,7 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
523
523
|
logout: (msg?: string) => Promise<void>;
|
|
524
524
|
end: (error: Error | undefined) => Promise<void>;
|
|
525
525
|
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
526
|
-
onUnexpectedError: (err: Error |
|
|
526
|
+
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
527
527
|
uploadPreKeys: (count?: number) => Promise<void>;
|
|
528
528
|
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
529
529
|
digestKeyBundle: () => Promise<void>;
|
|
@@ -533,7 +533,7 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
533
533
|
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
534
534
|
sendUnifiedSession: () => Promise<void>;
|
|
535
535
|
wamBuffer: import("../index.js").BinaryInfo;
|
|
536
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types
|
|
536
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
537
537
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
538
538
|
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
539
539
|
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
@@ -552,8 +552,8 @@ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
|
552
552
|
jid: string;
|
|
553
553
|
username: unknown;
|
|
554
554
|
}[]>;
|
|
555
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types
|
|
556
|
-
fetchNewChatMessageCap: () => Promise<import("../Types
|
|
555
|
+
fetchAccountReachoutTimelock: () => Promise<import("../Types").ReachoutTimelockState>;
|
|
556
|
+
fetchNewChatMessageCap: () => Promise<import("../Types").NewChatMessageCapInfo>;
|
|
557
557
|
};
|
|
558
558
|
export declare const extractCommunityMetadata: (result: BinaryNode) => GroupMetadata;
|
|
559
559
|
//# 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,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AAC;;;;;;;;;;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;;;;;;;;;;;;;0BA4Ke,CAAC;;;;wCAzEmB,MAAO;;;;;;;;;;;;;;;;+BAwTmuZ,MAAO;;;;;;;gBAvIhvZ,CAAC;WAAa,CAAC;mBAAqB,CAAC;;;;;;;;;;;CAyFlF,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;
|
package/lib/Socket/groups.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import { proto } from '../../WAProto/index.js';
|
|
3
|
-
import type { GroupMetadata, ParticipantAction, SocketConfig, WAMessageKey } from '../Types
|
|
4
|
-
import { type BinaryNode } from '../WABinary
|
|
3
|
+
import type { GroupMetadata, ParticipantAction, SocketConfig, WAMessageKey } from '../Types';
|
|
4
|
+
import { type BinaryNode } from '../WABinary';
|
|
5
5
|
export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
6
6
|
groupMetadata: (jid: string) => Promise<GroupMetadata>;
|
|
7
7
|
groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
|
|
@@ -80,7 +80,7 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
80
80
|
createCallLink: (type: "audio" | "video", event?: {
|
|
81
81
|
startTime: number;
|
|
82
82
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
83
|
-
getBotListV2: () => Promise<import("../Types
|
|
83
|
+
getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
|
|
84
84
|
messageMutex: {
|
|
85
85
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
86
86
|
};
|
|
@@ -96,15 +96,15 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
96
96
|
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
97
97
|
[_: string]: string;
|
|
98
98
|
}>;
|
|
99
|
-
upsertMessage: (msg: import("../Types
|
|
100
|
-
appPatch: (patchCreate: import("../Types
|
|
101
|
-
sendPresenceUpdate: (type: import("../Types
|
|
99
|
+
upsertMessage: (msg: import("../Types").WAMessage, type: import("../Types").MessageUpsertType) => Promise<void>;
|
|
100
|
+
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
|
|
101
|
+
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string) => Promise<void>;
|
|
102
102
|
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
103
103
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
104
104
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
105
105
|
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
106
106
|
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
107
|
-
updateProfilePicture: (jid: string, content: import("../Types
|
|
107
|
+
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload, dimensions?: {
|
|
108
108
|
width?: number;
|
|
109
109
|
height?: number;
|
|
110
110
|
full?: boolean;
|
|
@@ -115,22 +115,22 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
115
115
|
updateProfileName: (name: string) => Promise<void>;
|
|
116
116
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
117
117
|
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
118
|
-
updateCallPrivacy: (value: import("../Types
|
|
119
|
-
updateMessagesPrivacy: (value: import("../Types
|
|
120
|
-
updateLastSeenPrivacy: (value: import("../Types
|
|
121
|
-
updateOnlinePrivacy: (value: import("../Types
|
|
122
|
-
updateProfilePicturePrivacy: (value: import("../Types
|
|
123
|
-
updateStatusPrivacy: (value: import("../Types
|
|
124
|
-
updateReadReceiptsPrivacy: (value: import("../Types
|
|
125
|
-
updateGroupsAddPrivacy: (value: import("../Types
|
|
118
|
+
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
|
|
119
|
+
updateMessagesPrivacy: (value: import("../Types").WAPrivacyMessagesValue) => Promise<void>;
|
|
120
|
+
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
121
|
+
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
|
122
|
+
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
123
|
+
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
124
|
+
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
|
125
|
+
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
|
|
126
126
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
127
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types
|
|
127
|
+
getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
|
|
128
128
|
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
129
|
-
chatModify: (mod: import("../Types
|
|
129
|
+
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
130
130
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
131
131
|
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
132
132
|
removeContact: (jid: string) => Promise<void>;
|
|
133
|
-
placeholderResendCache: import("../Types
|
|
133
|
+
placeholderResendCache: import("../Types").CacheStore;
|
|
134
134
|
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
135
135
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
136
136
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
@@ -201,7 +201,7 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
201
201
|
[key: string]: string;
|
|
202
202
|
}>;
|
|
203
203
|
fetchServerLinkPreview: (url: string) => Promise<any>;
|
|
204
|
-
reportSpam: (jid: string, options?: import("../Types
|
|
204
|
+
reportSpam: (jid: string, options?: import("../Types").SpamReportOptions) => Promise<{
|
|
205
205
|
jid: string | undefined;
|
|
206
206
|
flow: string | undefined;
|
|
207
207
|
reported: boolean;
|
|
@@ -209,8 +209,8 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
209
209
|
}>;
|
|
210
210
|
type: "md";
|
|
211
211
|
ws: import("./Client/websocket.js").WebSocketClient;
|
|
212
|
-
ev: import("../Types
|
|
213
|
-
process(handler: (events: Partial<import("../Types
|
|
212
|
+
ev: import("../Types").BaileysEventEmitter & {
|
|
213
|
+
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
214
214
|
buffer(): void;
|
|
215
215
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
216
216
|
flush(): boolean;
|
|
@@ -218,11 +218,11 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
218
218
|
destroy(): void;
|
|
219
219
|
};
|
|
220
220
|
authState: {
|
|
221
|
-
creds: import("../Types
|
|
222
|
-
keys: import("../Types
|
|
221
|
+
creds: import("../Types").AuthenticationCreds;
|
|
222
|
+
keys: import("../Types").SignalKeyStoreWithTransaction;
|
|
223
223
|
};
|
|
224
|
-
signalRepository: import("../Types
|
|
225
|
-
user: import("../Types
|
|
224
|
+
signalRepository: import("../Types").SignalRepositoryWithLIDStore;
|
|
225
|
+
user: import("../Types").Contact | undefined;
|
|
226
226
|
generateMessageTag: () => string;
|
|
227
227
|
query: (node: BinaryNode, timeoutMs?: number, options?: {
|
|
228
228
|
suppressTimeoutLog?: boolean;
|
|
@@ -244,7 +244,7 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
244
244
|
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
245
245
|
sendUnifiedSession: () => Promise<void>;
|
|
246
246
|
wamBuffer: import("../index.js").BinaryInfo;
|
|
247
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types
|
|
247
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
248
248
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
249
249
|
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
250
250
|
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
@@ -263,8 +263,8 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
263
263
|
jid: string;
|
|
264
264
|
username: unknown;
|
|
265
265
|
}[]>;
|
|
266
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types
|
|
267
|
-
fetchNewChatMessageCap: () => Promise<import("../Types
|
|
266
|
+
fetchAccountReachoutTimelock: () => Promise<import("../Types").ReachoutTimelockState>;
|
|
267
|
+
fetchNewChatMessageCap: () => Promise<import("../Types").NewChatMessageCapInfo>;
|
|
268
268
|
};
|
|
269
269
|
export declare const extractGroupMetadata: (result: BinaryNode) => GroupMetadata;
|
|
270
270
|
export type GroupsSocket = ReturnType<typeof makeGroupsSocket>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/Socket/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAoB,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAG9G,OAAO,EACN,KAAK,UAAU,EAQf,MAAM,aAAa,CAAA;AAGpB,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY;yBAelB,MAAM;2BAyDV,MAAM,gBAAgB,MAAM,EAAE;qBAiBpC,MAAM;8BASG,MAAM,WAAW,MAAM;wCASb,MAAM;;;0CAWJ,MAAM,gBAAgB,MAAM,EAAE,UAAU,SAAS,GAAG,QAAQ;;;;mCAwBnE,MAAM,gBAAgB,MAAM,EAAE,UAAU,iBAAiB;;;;;kCAiB1D,MAAM,gBAAgB,MAAM;2B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dl2d,CAAC;WAAa,CAAC;mBACT,CAAC;;;;;;;;;;;CAtBf,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,QAAQ,UAAU,kBA8EtD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
package/lib/Socket/groups.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import { proto } from '../../WAProto/index.js';
|
|
3
|
-
import { WAMessageAddressingMode, WAMessageStubType } from '../Types
|
|
4
|
-
import { generateMessageIDV2, unixTimestampSeconds } from '../Utils
|
|
5
|
-
import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, isLidUser, isPnUser, jidEncode, jidNormalizedUser } from '../WABinary
|
|
6
|
-
import { makeChatsSocket } from './chats
|
|
3
|
+
import { WAMessageAddressingMode, WAMessageStubType } from '../Types';
|
|
4
|
+
import { generateMessageIDV2, unixTimestampSeconds } from '../Utils';
|
|
5
|
+
import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, isLidUser, isPnUser, jidEncode, jidNormalizedUser } from '../WABinary';
|
|
6
|
+
import { makeChatsSocket } from './chats';
|
|
7
7
|
export const makeGroupsSocket = (config) => {
|
|
8
8
|
const sock = makeChatsSocket(config);
|
|
9
9
|
const { authState, ev, query, upsertMessage } = sock;
|