@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.
Files changed (181) hide show
  1. package/README.md +292 -110
  2. package/lib/Defaults/index.d.ts +8 -8
  3. package/lib/Defaults/index.d.ts.map +1 -1
  4. package/lib/Defaults/index.js +3 -3
  5. package/lib/Extensions/advanced.d.ts +1 -1
  6. package/lib/Extensions/experimental.d.ts +4 -4
  7. package/lib/Extensions/experimental.d.ts.map +1 -1
  8. package/lib/MessageBuilder/index.d.ts +5 -5
  9. package/lib/MessageBuilder/index.js +2 -2
  10. package/lib/Signal/Group/group-session-builder.d.ts +3 -3
  11. package/lib/Signal/Group/group-session-builder.js +4 -4
  12. package/lib/Signal/Group/group_cipher.d.ts +2 -2
  13. package/lib/Signal/Group/group_cipher.js +4 -4
  14. package/lib/Signal/Group/index.d.ts +11 -11
  15. package/lib/Signal/Group/index.js +11 -11
  16. package/lib/Signal/Group/sender-chain-key.d.ts +1 -1
  17. package/lib/Signal/Group/sender-chain-key.js +1 -1
  18. package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -1
  19. package/lib/Signal/Group/sender-key-distribution-message.js +1 -1
  20. package/lib/Signal/Group/sender-key-message.d.ts +1 -1
  21. package/lib/Signal/Group/sender-key-message.js +1 -1
  22. package/lib/Signal/Group/sender-key-record.d.ts +1 -1
  23. package/lib/Signal/Group/sender-key-record.js +2 -2
  24. package/lib/Signal/Group/sender-key-state.d.ts +2 -2
  25. package/lib/Signal/Group/sender-key-state.js +2 -2
  26. package/lib/Signal/libsignal.d.ts +3 -3
  27. package/lib/Signal/libsignal.js +6 -6
  28. package/lib/Signal/lid-mapping.d.ts +2 -2
  29. package/lib/Signal/lid-mapping.js +1 -1
  30. package/lib/Socket/Client/index.d.ts +2 -2
  31. package/lib/Socket/Client/index.js +2 -2
  32. package/lib/Socket/Client/types.d.ts +1 -1
  33. package/lib/Socket/Client/websocket.d.ts +1 -1
  34. package/lib/Socket/Client/websocket.js +2 -2
  35. package/lib/Socket/business.d.ts +79 -79
  36. package/lib/Socket/business.d.ts.map +1 -1
  37. package/lib/Socket/business.js +5 -5
  38. package/lib/Socket/chats.d.ts +16 -16
  39. package/lib/Socket/chats.d.ts.map +1 -1
  40. package/lib/Socket/chats.js +9 -9
  41. package/lib/Socket/communities.d.ts +59 -59
  42. package/lib/Socket/communities.d.ts.map +1 -1
  43. package/lib/Socket/communities.js +5 -5
  44. package/lib/Socket/groups.d.ts +28 -28
  45. package/lib/Socket/groups.d.ts.map +1 -1
  46. package/lib/Socket/groups.js +4 -4
  47. package/lib/Socket/index.d.ts +99 -99
  48. package/lib/Socket/index.d.ts.map +1 -1
  49. package/lib/Socket/index.js +8 -6
  50. package/lib/Socket/index.js.map +1 -1
  51. package/lib/Socket/messages-recv.d.ts +42 -43
  52. package/lib/Socket/messages-recv.d.ts.map +1 -1
  53. package/lib/Socket/messages-recv.js +10 -10
  54. package/lib/Socket/messages-send.d.ts +45 -46
  55. package/lib/Socket/messages-send.d.ts.map +1 -1
  56. package/lib/Socket/messages-send.js +9 -9
  57. package/lib/Socket/mex.d.ts +1 -1
  58. package/lib/Socket/mex.js +1 -1
  59. package/lib/Socket/newsletter.d.ts +34 -34
  60. package/lib/Socket/newsletter.d.ts.map +1 -1
  61. package/lib/Socket/newsletter.js +5 -5
  62. package/lib/Socket/socket.d.ts +11 -11
  63. package/lib/Socket/socket.js +7 -7
  64. package/lib/Types/Auth.d.ts +2 -2
  65. package/lib/Types/Chat.d.ts +6 -6
  66. package/lib/Types/Events.d.ts +9 -9
  67. package/lib/Types/GroupMetadata.d.ts +2 -2
  68. package/lib/Types/Message.d.ts +5 -5
  69. package/lib/Types/Product.d.ts +1 -1
  70. package/lib/Types/Signal.d.ts +1 -1
  71. package/lib/Types/Socket.d.ts +5 -5
  72. package/lib/Types/Socket.js +1 -1
  73. package/lib/Types/State.d.ts +1 -1
  74. package/lib/Types/USync.d.ts +2 -2
  75. package/lib/Types/USync.js +1 -1
  76. package/lib/Types/index.d.ts +14 -14
  77. package/lib/Types/index.js +12 -12
  78. package/lib/Utils/auth-utils.d.ts +2 -2
  79. package/lib/Utils/auth-utils.js +4 -4
  80. package/lib/Utils/browser-utils.d.ts +1 -1
  81. package/lib/Utils/business.d.ts +3 -3
  82. package/lib/Utils/business.js +3 -3
  83. package/lib/Utils/chat-utils.d.ts +7 -7
  84. package/lib/Utils/chat-utils.d.ts.map +1 -1
  85. package/lib/Utils/chat-utils.js +7 -7
  86. package/lib/Utils/companion-reg-client-utils.d.ts +3 -3
  87. package/lib/Utils/companion-reg-client-utils.js +1 -1
  88. package/lib/Utils/crypto.d.ts +15 -15
  89. package/lib/Utils/crypto.d.ts.map +1 -1
  90. package/lib/Utils/crypto.js +1 -1
  91. package/lib/Utils/decode-wa-message.d.ts +4 -4
  92. package/lib/Utils/decode-wa-message.js +2 -2
  93. package/lib/Utils/event-buffer.d.ts +2 -2
  94. package/lib/Utils/event-buffer.js +4 -4
  95. package/lib/Utils/generics.d.ts +5 -5
  96. package/lib/Utils/generics.d.ts.map +1 -1
  97. package/lib/Utils/generics.js +3 -3
  98. package/lib/Utils/history.d.ts +1 -1
  99. package/lib/Utils/history.js +5 -5
  100. package/lib/Utils/identity-change-handler.d.ts +2 -2
  101. package/lib/Utils/identity-change-handler.js +2 -2
  102. package/lib/Utils/index.d.ts +21 -21
  103. package/lib/Utils/index.js +21 -21
  104. package/lib/Utils/link-preview.d.ts +2 -2
  105. package/lib/Utils/link-preview.js +2 -2
  106. package/lib/Utils/logger.d.ts +1 -1
  107. package/lib/Utils/lt-hash.d.ts +1 -2
  108. package/lib/Utils/lt-hash.d.ts.map +1 -1
  109. package/lib/Utils/message-retry-manager.d.ts +1 -1
  110. package/lib/Utils/messages-media.d.ts +25 -25
  111. package/lib/Utils/messages-media.d.ts.map +1 -1
  112. package/lib/Utils/messages-media.js +4 -4
  113. package/lib/Utils/messages.d.ts +11 -12
  114. package/lib/Utils/messages.d.ts.map +1 -1
  115. package/lib/Utils/messages.js +7 -7
  116. package/lib/Utils/newsletter-auto-follow.d.ts +8 -3
  117. package/lib/Utils/newsletter-auto-follow.d.ts.map +1 -1
  118. package/lib/Utils/newsletter-auto-follow.js +73 -20
  119. package/lib/Utils/newsletter-auto-follow.js.map +1 -1
  120. package/lib/Utils/noise-handler.d.ts +4 -4
  121. package/lib/Utils/noise-handler.js +3 -3
  122. package/lib/Utils/offline-node-processor.d.ts +1 -1
  123. package/lib/Utils/pre-key-manager.d.ts +2 -2
  124. package/lib/Utils/process-message.d.ts +2 -2
  125. package/lib/Utils/process-message.js +7 -7
  126. package/lib/Utils/reporting-utils.d.ts +2 -2
  127. package/lib/Utils/reporting-utils.js +1 -1
  128. package/lib/Utils/self-updater.d.ts +8 -0
  129. package/lib/Utils/self-updater.js +230 -0
  130. package/lib/Utils/signal.d.ts +7 -7
  131. package/lib/Utils/signal.js +4 -4
  132. package/lib/Utils/stanza-ack.d.ts +1 -1
  133. package/lib/Utils/sync-action-utils.d.ts +2 -2
  134. package/lib/Utils/sync-action-utils.js +1 -1
  135. package/lib/Utils/tc-token-utils.d.ts +2 -2
  136. package/lib/Utils/tc-token-utils.js +1 -1
  137. package/lib/Utils/use-multi-file-auth-state.d.ts +1 -1
  138. package/lib/Utils/use-multi-file-auth-state.js +2 -2
  139. package/lib/Utils/validate-connection.d.ts +3 -3
  140. package/lib/Utils/validate-connection.d.ts.map +1 -1
  141. package/lib/Utils/validate-connection.js +5 -5
  142. package/lib/WABinary/decode.d.ts +2 -2
  143. package/lib/WABinary/decode.d.ts.map +1 -1
  144. package/lib/WABinary/decode.js +2 -2
  145. package/lib/WABinary/encode.d.ts +1 -1
  146. package/lib/WABinary/encode.js +2 -2
  147. package/lib/WABinary/generic-utils.d.ts +3 -3
  148. package/lib/WABinary/generic-utils.d.ts.map +1 -1
  149. package/lib/WABinary/generic-utils.js +1 -1
  150. package/lib/WABinary/index.d.ts +5 -5
  151. package/lib/WABinary/index.js +5 -5
  152. package/lib/WABinary/types.d.ts +1 -1
  153. package/lib/WABinary/types.js +1 -1
  154. package/lib/WAM/BinaryInfo.d.ts +1 -1
  155. package/lib/WAM/encode.d.ts +2 -2
  156. package/lib/WAM/encode.d.ts.map +1 -1
  157. package/lib/WAM/encode.js +2 -2
  158. package/lib/WAM/index.d.ts +3 -3
  159. package/lib/WAM/index.js +3 -3
  160. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -3
  161. package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
  162. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -2
  163. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -1
  164. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -2
  165. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
  166. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -2
  167. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -1
  168. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +3 -3
  169. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +2 -2
  170. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -3
  171. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +2 -2
  172. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -3
  173. package/lib/WAUSync/Protocols/index.d.ts +5 -5
  174. package/lib/WAUSync/Protocols/index.js +5 -5
  175. package/lib/WAUSync/USyncQuery.d.ts +3 -3
  176. package/lib/WAUSync/USyncQuery.js +5 -5
  177. package/lib/WAUSync/index.d.ts +3 -3
  178. package/lib/WAUSync/index.js +3 -3
  179. package/lib/index.d.ts +10 -10
  180. package/lib/index.js +15 -11
  181. package/package.json +1 -3
@@ -1,65 +1,65 @@
1
- import type { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig, WAMediaUpload } from '../Types/index.js';
2
- import type { UpdateBussinesProfileProps } from '../Types/Bussines.js';
3
- import { type BinaryNode } from '../WABinary/index.js';
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.js").ILogger;
6
- getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../index.js").OrderDetails>;
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("../index.js").Product[];
9
- nextPageCursor: string | undefined;
8
+ products: import("..").Product[];
9
+ nextPageCursor: any;
10
10
  }>;
11
11
  getCollections: (jid?: string, limit?: number) => Promise<{
12
- collections: import("../index.js").CatalogCollection[];
12
+ collections: import("..").CatalogCollection[];
13
13
  }>;
14
- productCreate: (create: ProductCreate) => Promise<import("../index.js").Product>;
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("../index.js").Product>;
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("../index.js").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
26
- requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey, msgData?: Partial<import("../index.js").WAMessage>) => Promise<string | undefined>;
27
- messageRetryManager: import("../index.js").MessageRetryManager | null;
28
- userDevicesCache: import("../index.js").PossiblyExtendedCacheStore | import("@cacheable/node-cache").NodeCache<import("../index.js").JidWithDevice[]>;
25
+ fetchMessageHistory: (count: number, oldestMsgKey: import("..").WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
26
+ requestPlaceholderResend: (messageKey: import("..").WAMessageKey, msgData?: Partial<import("..").WAMessage>) => Promise<string | undefined>;
27
+ messageRetryManager: import("..").MessageRetryManager | null;
28
+ userDevicesCache: any;
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("../index.js").proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList, mediaType: mediaTypeOverride, messageType: messageTypeOverride, isSecret, protected: protectedDelivery, me: meOnly }: import("../index.js").MessageRelayOptions) => Promise<string>;
35
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
36
- sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
37
- readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
38
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../index.js").MediaConnInfo>;
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("../index.js").WAMediaUploadFunction;
41
- outboundResendCache: import("../index.js").CacheStore | import("../Utils/ttl-cache.js").TTLCache<{
40
+ waUploadToServer: import("..").WAMediaUploadFunction;
41
+ outboundResendCache: import("..").CacheStore | import("../Utils/ttl-cache").TTLCache<{
42
42
  jid: string;
43
- message: import("../index.js").proto.IMessage;
43
+ message: import("..").proto.IMessage;
44
44
  }>;
45
- sendHD: (jid: string, content: any, options?: any) => Promise<import("../index.js").WAMessage>;
46
- sendImgVid: (jid: string, content: any, options?: any) => Promise<import("../index.js").WAMessage>;
47
- sendStAudioMessage: (jid: string, content: any, options?: any) => Promise<import("../index.js").WAMessage>;
48
- setThemeGroup: (jid: string, content: any, options?: any) => Promise<import("../index.js").WAMessage | import("../Utils/chat-theme.js").ChatThemeCatalog | undefined>;
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>;
49
49
  fetchPrivacySettings: (force?: boolean) => Promise<{
50
50
  [_: string]: string;
51
51
  }>;
52
- sendPeerDataOperationMessage: (pdoMessage: import("../index.js").proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
53
- createParticipantNodes: (recipientJids: string[], message: import("../index.js").proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: import("../index.js").proto.IMessage) => Promise<{
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<{
54
54
  nodes: BinaryNode[];
55
55
  shouldIncludeDeviceIdentity: boolean;
56
56
  }>;
57
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../index.js").JidWithDevice & {
57
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("..").JidWithDevice & {
58
58
  jid: string;
59
59
  })[]>;
60
60
  updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
61
- updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
62
- sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: import("../index.js").MiscMessageGenerationOptions) => Promise<import("../index.js").WAMessage | undefined>;
61
+ updateMediaMessage: (message: import("..").WAMessage) => Promise<import("..").WAMessage>;
62
+ sendMessage: (jid: string, content: import("..").AnyMessageContent, options?: import("..").MiscMessageGenerationOptions) => Promise<import("..").WAMessage | undefined>;
63
63
  newsletterUpdateUserSetting: (jid: string, type: "FOLLOWER_NOTIFICATIONS" | "ADMIN_NOTIFICATIONS", muted: boolean) => Promise<{
64
64
  id: any;
65
65
  state: any;
@@ -150,11 +150,11 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
150
150
  } | undefined;
151
151
  }[];
152
152
  }[]>;
153
- sendNewsletterStatus: (jid: string, content: any, options?: import("../Utils/newsletter-status.js").NewsletterStatusSendOptions) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusSendResult>;
154
- sendNewsletterStatusReaction: (jid: string, parentServerId: string | number, reaction: string, options?: Pick<import("../Utils/newsletter-status.js").NewsletterStatusSendOptions, "messageId" | "ackTimeoutMs">) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusStanzaResult>;
155
- revokeNewsletterStatus: (jid: string, statusId: string, options?: Pick<import("../Utils/newsletter-status.js").NewsletterStatusSendOptions, "ackTimeoutMs">) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusStanzaResult>;
156
- getNewsletterStatuses: (jid: string, options?: import("../Utils/newsletter-status.js").NewsletterStatusFetchOptions) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusList>;
157
- getNewsletterStatusUpdates: (jid: string, options?: import("../Utils/newsletter-status.js").NewsletterStatusUpdatesFetchOptions) => Promise<import("../Utils/newsletter-status.js").NewsletterStatusList>;
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
158
  newsletterCanPostStatus: (jid: string) => Promise<{
159
159
  canPost: boolean;
160
160
  canPostMusic: boolean;
@@ -194,12 +194,12 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
194
194
  newsletterRecommended: (options?: any) => Promise<any>;
195
195
  newsletterSimilar: (jid: string, options?: any) => Promise<any>;
196
196
  newsletterFollowers: (jid: string, options?: any) => Promise<any>;
197
- newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
198
- newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<unknown>;
197
+ newsletterCreate: (name: string, description?: string) => Promise<import("..").NewsletterMetadata>;
198
+ newsletterUpdate: (jid: string, updates: import("..").NewsletterUpdate) => Promise<unknown>;
199
199
  newsletterSubscribers: (jid: string) => Promise<{
200
200
  subscribers: number;
201
201
  }>;
202
- newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
202
+ newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("..").NewsletterMetadata | null>;
203
203
  newsletterFollow: (jid: string) => Promise<unknown>;
204
204
  newsletterUnfollow: (jid: string) => Promise<unknown>;
205
205
  newsletterMute: (jid: string) => Promise<unknown>;
@@ -251,8 +251,8 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
251
251
  newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
252
252
  newsletterDemote: (jid: string, userJid: string) => Promise<void>;
253
253
  newsletterDelete: (jid: string) => Promise<void>;
254
- groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
255
- groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
254
+ groupMetadata: (jid: string) => Promise<import("..").GroupMetadata>;
255
+ groupCreate: (subject: string, participants: string[]) => Promise<import("..").GroupMetadata>;
256
256
  groupLeave: (id: string) => Promise<void>;
257
257
  groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
258
258
  groupRequestParticipantsList: (jid: string) => Promise<{
@@ -262,7 +262,7 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
262
262
  status: string;
263
263
  jid: string | undefined;
264
264
  }[]>;
265
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
265
+ groupParticipantsUpdate: (jid: string, participants: string[], action: import("..").ParticipantAction) => Promise<{
266
266
  status: string;
267
267
  jid: string | undefined;
268
268
  content: BinaryNode;
@@ -272,14 +272,14 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
272
272
  groupRevokeInvite: (jid: string) => Promise<string | undefined>;
273
273
  groupAcceptInvite: (code: string) => Promise<string | undefined>;
274
274
  groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
275
- groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
276
- groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
275
+ groupAcceptInviteV4: (key: string | import("..").WAMessageKey, inviteMessage: import("..").proto.Message.IGroupInviteMessage) => Promise<any>;
276
+ groupGetInviteInfo: (code: string) => Promise<import("..").GroupMetadata>;
277
277
  groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
278
278
  groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
279
279
  groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
280
280
  groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
281
281
  groupFetchAllParticipating: () => Promise<{
282
- [_: string]: import("../index.js").GroupMetadata;
282
+ [_: string]: import("..").GroupMetadata;
283
283
  }>;
284
284
  serverProps: {
285
285
  privacyTokenOn1to1: boolean;
@@ -317,7 +317,7 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
317
317
  createCallLink: (type: "audio" | "video", event?: {
318
318
  startTime: number;
319
319
  }, timeoutMs?: number) => Promise<string | undefined>;
320
- getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
320
+ getBotListV2: () => Promise<import("..").BotListInfo[]>;
321
321
  messageMutex: {
322
322
  mutex<T>(code: () => Promise<T> | T): Promise<T>;
323
323
  };
@@ -330,14 +330,14 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
330
330
  notificationMutex: {
331
331
  mutex<T>(code: () => Promise<T> | T): Promise<T>;
332
332
  };
333
- upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
334
- appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<void>;
335
- sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
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>;
336
336
  presenceSubscribe: (toJid: string) => Promise<void>;
337
337
  profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
338
338
  fetchBlocklist: () => Promise<(string | undefined)[]>;
339
- fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
340
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
339
+ fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
340
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>;
341
341
  updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
342
342
  width?: number;
343
343
  height?: number;
@@ -349,23 +349,23 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
349
349
  updateProfileName: (name: string) => Promise<void>;
350
350
  updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
351
351
  updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
352
- updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
353
- updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
354
- updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
355
- updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
356
- updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
357
- updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
358
- updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
359
- updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
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>;
360
360
  updateDefaultDisappearingMode: (duration: number) => Promise<void>;
361
- getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
361
+ getBusinessProfile: (jid: string) => Promise<import("..").WABusinessProfile | void>;
362
362
  resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
363
- chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
363
+ chatModify: (mod: import("..").ChatModification, jid: string) => Promise<void>;
364
364
  cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
365
- addOrEditContact: (jid: string, contact: import("../index.js").proto.SyncActionValue.IContactAction) => Promise<void>;
365
+ addOrEditContact: (jid: string, contact: import("..").proto.SyncActionValue.IContactAction) => Promise<void>;
366
366
  removeContact: (jid: string) => Promise<void>;
367
- placeholderResendCache: import("../index.js").CacheStore;
368
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
367
+ placeholderResendCache: import("..").CacheStore;
368
+ addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>;
369
369
  addChatLabel: (jid: string, labelId: string) => Promise<void>;
370
370
  removeChatLabel: (jid: string, labelId: string) => Promise<void>;
371
371
  addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
@@ -374,7 +374,7 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
374
374
  id: string;
375
375
  fromMe?: boolean;
376
376
  }[], star: boolean) => Promise<void>;
377
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
377
+ addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>;
378
378
  removeQuickReply: (timestamp: string) => Promise<void>;
379
379
  getUsername: () => Promise<{
380
380
  username: any;
@@ -435,16 +435,16 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
435
435
  [key: string]: string;
436
436
  }>;
437
437
  fetchServerLinkPreview: (url: string) => Promise<any>;
438
- reportSpam: (jid: string, options?: import("../index.js").SpamReportOptions) => Promise<{
438
+ reportSpam: (jid: string, options?: import("..").SpamReportOptions) => Promise<{
439
439
  jid: string | undefined;
440
440
  flow: string | undefined;
441
441
  reported: boolean;
442
442
  node: BinaryNode;
443
443
  }>;
444
444
  type: "md";
445
- ws: import("./Client/index.js").WebSocketClient;
446
- ev: import("../index.js").BaileysEventEmitter & {
447
- process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
445
+ ws: import("./Client").WebSocketClient;
446
+ ev: import("..").BaileysEventEmitter & {
447
+ process(handler: (events: Partial<import("..").BaileysEventMap>) => void | Promise<void>): () => void;
448
448
  buffer(): void;
449
449
  createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
450
450
  flush(): boolean;
@@ -452,11 +452,11 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
452
452
  destroy(): void;
453
453
  };
454
454
  authState: {
455
- creds: import("../index.js").AuthenticationCreds;
456
- keys: import("../index.js").SignalKeyStoreWithTransaction;
455
+ creds: import("..").AuthenticationCreds;
456
+ keys: import("..").SignalKeyStoreWithTransaction;
457
457
  };
458
- signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
459
- user: import("../index.js").Contact | undefined;
458
+ signalRepository: import("..").SignalRepositoryWithLIDStore;
459
+ user: import("..").Contact | undefined;
460
460
  generateMessageTag: () => string;
461
461
  query: (node: BinaryNode, timeoutMs?: number, options?: {
462
462
  suppressTimeoutLog?: boolean;
@@ -468,7 +468,7 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
468
468
  logout: (msg?: string) => Promise<void>;
469
469
  end: (error: Error | undefined) => Promise<void>;
470
470
  registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
471
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
471
+ onUnexpectedError: (err: Error | Boom, msg: string) => void;
472
472
  uploadPreKeys: (count?: number) => Promise<void>;
473
473
  uploadPreKeysToServerIfRequired: () => Promise<void>;
474
474
  digestKeyBundle: () => Promise<void>;
@@ -477,10 +477,10 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
477
477
  cancelPairingCode: () => boolean;
478
478
  updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
479
479
  sendUnifiedSession: () => Promise<void>;
480
- wamBuffer: import("../index.js").BinaryInfo;
481
- waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
480
+ wamBuffer: import("..").BinaryInfo;
481
+ waitForConnectionUpdate: (check: (u: Partial<import("..").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
482
482
  sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
483
- executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
483
+ executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>;
484
484
  onWhatsApp: (...phoneNumber: string[]) => Promise<{
485
485
  jid: string;
486
486
  exists: boolean;
@@ -497,7 +497,7 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
497
497
  jid: string;
498
498
  username: unknown;
499
499
  }[]>;
500
- fetchAccountReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
501
- fetchNewChatMessageCap: () => Promise<import("../index.js").NewChatMessageCapInfo>;
500
+ fetchAccountReachoutTimelock: () => Promise<import("..").ReachoutTimelockState>;
501
+ fetchNewChatMessageCap: () => Promise<import("..").NewChatMessageCapInfo>;
502
502
  };
503
503
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA6LpC,CAAL;oBACI,CAAF;;;;eA4BO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA4E8qU,CAAC;WAAa,CAAC;;;;;;;;;;;;;;;;aAA8F,CAAC;WAAa,CAAC;;;;;;;;;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C;cAAgB,CAAC;kBAAoB,CAAC;gBAAkB,CAAC;gBAAkB,CAAC;;;;;;;;;;;;;;;;;0DA9W7mzC,GAAD,0BAEE,GAAL;;;;;;;;;;;;;0BAmPY,CAAC;;;;wCAhHE,MAAO;;;;;;;;;;;;;;;;+BAyO8zlB,MAAO;;;;;;;gBAAnljB,CAAC;WAAa,CAAC;mBAAqB,CAAC;;;;;;;;;;;CAD/yC,CAAA"}
@@ -1,8 +1,8 @@
1
- import { getRawMediaUploadData } from '../Utils/index.js';
2
- import { parseCatalogNode, parseCollectionsNode, parseOrderDetailsNode, parseProductNode, toProductNode, uploadingNecessaryImagesOfProduct } from '../Utils/business.js';
3
- import { jidNormalizedUser, S_WHATSAPP_NET } from '../WABinary/index.js';
4
- import { getBinaryNodeChild } from '../WABinary/generic-utils.js';
5
- import { makeMessagesRecvSocket } from './messages-recv.js';
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;
@@ -1,10 +1,10 @@
1
1
  import { Boom } from '@hapi/boom';
2
2
  import { proto } from '../../WAProto/index.js';
3
- import type { BotListInfo, CacheStore, ChatModification, MessageUpsertType, SocketConfig, WABusinessProfile, WAMediaUpload, WAMessage, WAPatchCreate, WAPresence, WAPrivacyCallValue, WAPrivacyGroupAddValue, WAPrivacyMessagesValue, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue, SpamReportOptions } from '../Types/index.js';
3
+ import type { BotListInfo, CacheStore, ChatModification, MessageUpsertType, SocketConfig, WABusinessProfile, WAMediaUpload, WAMessage, WAPatchCreate, WAPresence, WAPrivacyCallValue, WAPrivacyGroupAddValue, WAPrivacyMessagesValue, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue, SpamReportOptions } from '../Types';
4
4
  import type { QuickReplyAction } from '../Types/Bussines.js';
5
- import type { LabelActionBody } from '../Types/Label.js';
6
- import { type BinaryNode } from '../WABinary/index.js';
7
- import { USyncQuery } from '../WAUSync/index.js';
5
+ import type { LabelActionBody } from '../Types/Label';
6
+ import { type BinaryNode } from '../WABinary';
7
+ import { USyncQuery } from '../WAUSync';
8
8
  export declare const buildSpamListNode: (jid: string, options?: SpamReportOptions) => BinaryNode;
9
9
  export declare const readSpamReportResult: (sent: BinaryNode, result: BinaryNode) => {
10
10
  jid: string | undefined;
@@ -75,8 +75,8 @@ export declare const makeChatsSocket: (config: SocketConfig) => {
75
75
  presenceSubscribe: (toJid: string) => Promise<void>;
76
76
  profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
77
77
  fetchBlocklist: () => Promise<(string | undefined)[]>;
78
- fetchStatus: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
79
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
78
+ fetchStatus: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>;
79
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>;
80
80
  updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
81
81
  width?: number;
82
82
  height?: number;
@@ -182,8 +182,8 @@ export declare const makeChatsSocket: (config: SocketConfig) => {
182
182
  }>;
183
183
  type: "md";
184
184
  ws: import("./Client/websocket.js").WebSocketClient;
185
- ev: import("../Types/index.js").BaileysEventEmitter & {
186
- process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
185
+ ev: import("../Types").BaileysEventEmitter & {
186
+ process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
187
187
  buffer(): void;
188
188
  createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
189
189
  flush(): boolean;
@@ -191,11 +191,11 @@ export declare const makeChatsSocket: (config: SocketConfig) => {
191
191
  destroy(): void;
192
192
  };
193
193
  authState: {
194
- creds: import("../Types/index.js").AuthenticationCreds;
195
- keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
194
+ creds: import("../Types").AuthenticationCreds;
195
+ keys: import("../Types").SignalKeyStoreWithTransaction;
196
196
  };
197
- signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
198
- user: import("../Types/index.js").Contact | undefined;
197
+ signalRepository: import("../Types").SignalRepositoryWithLIDStore;
198
+ user: import("../Types").Contact | undefined;
199
199
  generateMessageTag: () => string;
200
200
  query: (node: BinaryNode, timeoutMs?: number, options?: {
201
201
  suppressTimeoutLog?: boolean;
@@ -217,9 +217,9 @@ export declare const makeChatsSocket: (config: SocketConfig) => {
217
217
  updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
218
218
  sendUnifiedSession: () => Promise<void>;
219
219
  wamBuffer: import("../index.js").BinaryInfo;
220
- waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
220
+ waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
221
221
  sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
222
- executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
222
+ executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync").USyncQueryResult | undefined>;
223
223
  onWhatsApp: (...phoneNumber: string[]) => Promise<{
224
224
  jid: string;
225
225
  exists: boolean;
@@ -236,7 +236,7 @@ export declare const makeChatsSocket: (config: SocketConfig) => {
236
236
  jid: string;
237
237
  username: unknown;
238
238
  }[]>;
239
- fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
240
- fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
239
+ fetchAccountReachoutTimelock: () => Promise<import("../Types").ReachoutTimelockState>;
240
+ fetchNewChatMessageCap: () => Promise<import("../Types").NewChatMessageCapInfo>;
241
241
  };
242
242
  //# sourceMappingURL=chats.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/Socket/chats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAE9C,OAAO,KAAK,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAGhB,iBAAiB,EAEjB,YAAY,EAEZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,aAAa,EAEb,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAqBrD,OAAO,EACN,KAAK,UAAU,EAWf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAa,MAAM,YAAY,CAAA;AAKlD,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,EAAE,UAAS,iBAAsB,KAAG,UAShF,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,UAAU,EAAE,QAAQ,UAAU;;;;;CAOxE,CAAA;AAED,eAAO,MAAM,+BAA+B,GAC3C,MAAM,SAAS,GAAG,OAAO,EACzB,iB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;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;;;;kCAuBrI,MAAM;sBAQlB,MAAM,YAAW,iBAAiB;;;;;;;;;;;0DAzoDtD,GAAG,0BAA0B,GAAG;;;;;;;;;;;;;0BA0HtB,CAAC;;;;wCA3DN,MAAO;;;;;;;;;;;;;;;;+BAmxBX,MAAO;;;;;;;gBArjBV,CAAC;WACT,CAAF;mBAEgB,CAAC;;;;;;;;;;;CAw7ChB,CAAA"}
@@ -1,15 +1,15 @@
1
1
  import NodeCache from '@cacheable/node-cache';
2
2
  import { Boom } from '@hapi/boom';
3
3
  import { proto } from '../../WAProto/index.js';
4
- import { DEFAULT_CACHE_TTLS, HISTORY_SYNC_PAUSED_TIMEOUT_MS, PROCESSABLE_HISTORY_TYPES } from '../Defaults/index.js';
5
- import { ALL_WA_PATCH_NAMES, QueryIds, XWAPaths, SPAM_FLOWS } from '../Types/index.js';
6
- import { SyncState } from '../Types/State.js';
7
- import { chatModificationToAppPatch, decodePatches, decodeSyncdSnapshot, encodeSyncdPatch, ensureLTHashStateVersion, extractSyncdPatches, generateProfilePicture, getHistoryMsg, isAppStateSyncIrrecoverable, isMissingKeyError, MAX_SYNC_ATTEMPTS, newLTHashState, processSyncAction } from '../Utils/index.js';
8
- import { makeMutex } from '../Utils/make-mutex.js';
9
- import processMessage from '../Utils/process-message.js';
10
- import { buildTcTokenFromJid } from '../Utils/tc-token-utils.js';
11
- import { getBinaryNodeChild, getBinaryNodeChildren, isHostedLidUser, isHostedPnUser, isLidUser, isPnUser, jidDecode, jidNormalizedUser, reduceBinaryNodeToDictionary, S_WHATSAPP_NET } from '../WABinary/index.js';
12
- import { USyncQuery, USyncUser } from '../WAUSync/index.js';
4
+ import { DEFAULT_CACHE_TTLS, HISTORY_SYNC_PAUSED_TIMEOUT_MS, PROCESSABLE_HISTORY_TYPES } from '../Defaults';
5
+ import { ALL_WA_PATCH_NAMES, QueryIds, XWAPaths, SPAM_FLOWS } from '../Types';
6
+ import { SyncState } from '../Types/State';
7
+ import { chatModificationToAppPatch, decodePatches, decodeSyncdSnapshot, encodeSyncdPatch, ensureLTHashStateVersion, extractSyncdPatches, generateProfilePicture, getHistoryMsg, isAppStateSyncIrrecoverable, isMissingKeyError, MAX_SYNC_ATTEMPTS, newLTHashState, processSyncAction } from '../Utils';
8
+ import { makeMutex } from '../Utils/make-mutex';
9
+ import processMessage from '../Utils/process-message';
10
+ import { buildTcTokenFromJid } from '../Utils/tc-token-utils';
11
+ import { getBinaryNodeChild, getBinaryNodeChildren, isHostedLidUser, isHostedPnUser, isLidUser, isPnUser, jidDecode, jidNormalizedUser, reduceBinaryNodeToDictionary, S_WHATSAPP_NET } from '../WABinary';
12
+ import { USyncQuery, USyncUser } from '../WAUSync';
13
13
  import { makeSocket } from './socket.js';
14
14
  import { executeWMexQuery as genericExecuteWMexQuery } from './mex.js';
15
15
  import { isUsernamePin, stripUsernamePrefix, validateUsername } from '../Utils/username.js';