angularsockets 1.4.3 → 1.4.5

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.
@@ -1,43 +1,270 @@
1
- import { Boom } from '@hapi/boom';
2
- import { SocketConfig } from '../Types';
3
- import { BinaryNode } from '../WABinary';
4
- import { WebSocketClient } from './Client';
5
- /**
6
- * Connects to WA servers and performs:
7
- * - simple queries (no retry mechanism, wait for connection establishment)
8
- * - listen to messages and emit events
9
- * - query phone connection
10
- */
11
- export declare const makeSocket: (config: SocketConfig) => {
12
- type: "md";
13
- ws: WebSocketClient;
14
- ev: import("../Types").BaileysEventEmitter & {
15
- process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): (() => void);
16
- buffer(): void;
17
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): ((...args: A) => Promise<T>);
18
- flush(force?: boolean): boolean;
19
- isBuffering(): boolean;
20
- };
21
- authState: {
22
- creds: import("../Types").AuthenticationCreds;
23
- keys: import("../Types").SignalKeyStoreWithTransaction;
24
- };
25
- signalRepository: import("../Types").SignalRepository;
26
- readonly user: import("../Types").Contact | undefined;
27
- generateMessageTag: () => string;
28
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
29
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<any>;
30
- waitForSocketOpen: () => Promise<void>;
31
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
32
- sendNode: (frame: BinaryNode) => Promise<void>;
33
- logout: (msg?: string) => Promise<void>;
34
- end: (error: Error | undefined) => void;
35
- onUnexpectedError: (err: Error | Boom, msg: string) => void;
36
- uploadPreKeys: (count?: number) => Promise<void>;
37
- uploadPreKeysToServerIfRequired: () => Promise<void>;
38
- requestPairingCode: (phoneNumber: any, pairKey?: string) => Promise<string>;
39
- /** Waits for the connection to WA to reach a state */
40
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
41
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
42
- };
43
- export type Socket = ReturnType<typeof makeSocket>;
1
+ // setup.d.ts by alip
2
+ import { proto } from '../../WAProto';
3
+
4
+ declare namespace NotForrAll {
5
+ interface MediaUploadOptions {
6
+ fileEncSha256?: Buffer;
7
+ mediaType?: string;
8
+ newsletter?: boolean;
9
+ }
10
+
11
+ type WAMediaUploadFunction = (
12
+ stream: Buffer | NodeJS.ReadableStream,
13
+ options?: MediaUploadOptions
14
+ ) => Promise<{ url: string; directPath: string; mediaKey: Buffer; fileEncSha256: Buffer; fileSha256: Buffer; fileLength: number }>;
15
+
16
+ interface WAMessageContentGenerationOptions {
17
+ upload?: WAMediaUploadFunction;
18
+ mediaCache?: any;
19
+ options?: any;
20
+ logger?: any;
21
+ }
22
+
23
+ interface StickerMessage {
24
+ url: string;
25
+ fileSha256: Buffer | string;
26
+ fileEncSha256: Buffer | string;
27
+ mediaKey: Buffer | string;
28
+ mimetype: string;
29
+ directPath: string;
30
+ fileLength: number | string;
31
+ mediaKeyTimestamp: number | string;
32
+ isAnimated?: boolean;
33
+ stickerSentTs?: number | string;
34
+ isAvatar?: boolean;
35
+ isAiSticker?: boolean;
36
+ isLottie?: boolean;
37
+ }
38
+
39
+ interface PaymentMessage {
40
+ amount: number;
41
+ currency?: string;
42
+ from?: string;
43
+ expiry?: number;
44
+ sticker?: { stickerMessage: StickerMessage };
45
+ note?: string;
46
+ background?: {
47
+ id?: string;
48
+ fileLength?: string;
49
+ width?: number;
50
+ height?: number;
51
+ mimetype?: string;
52
+ placeholderArgb?: number;
53
+ textArgb?: number;
54
+ subtextArgb?: number;
55
+ };
56
+ }
57
+
58
+ interface ProductMessage {
59
+ title: string;
60
+ description: string;
61
+ thumbnail: Buffer | { url: string };
62
+ productId: string;
63
+ retailerId: string;
64
+ url: string;
65
+ body?: string;
66
+ footer?: string;
67
+ buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
68
+ priceAmount1000?: number | null;
69
+ currencyCode?: string;
70
+ }
71
+
72
+ interface InteractiveMessage {
73
+ title: string;
74
+ footer?: string;
75
+ thumbnail?: string;
76
+ image?: string | Buffer | { url: string };
77
+ video?: string | Buffer | { url: string };
78
+ document?: Buffer;
79
+ mimetype?: string;
80
+ fileName?: string;
81
+ jpegThumbnail?: Buffer;
82
+ contextInfo?: {
83
+ mentionedJid?: string[];
84
+ forwardingScore?: number;
85
+ isForwarded?: boolean;
86
+ externalAdReply?: {
87
+ title?: string;
88
+ body?: string;
89
+ mediaType?: number;
90
+ thumbnailUrl?: string;
91
+ mediaUrl?: string;
92
+ sourceUrl?: string;
93
+ showAdAttribution?: boolean;
94
+ renderLargerThumbnail?: boolean;
95
+ [key: string]: any;
96
+ };
97
+ [key: string]: any;
98
+ };
99
+ externalAdReply?: {
100
+ title?: string;
101
+ body?: string;
102
+ mediaType?: number;
103
+ thumbnailUrl?: string;
104
+ mediaUrl?: string;
105
+ sourceUrl?: string;
106
+ showAdAttribution?: boolean;
107
+ renderLargerThumbnail?: boolean;
108
+ [key: string]: any;
109
+ };
110
+ buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
111
+ nativeFlowMessage?: {
112
+ messageParamsJson?: string;
113
+ buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
114
+ [key: string]: any;
115
+ };
116
+ }
117
+
118
+ interface AlbumItem {
119
+ image?: { url: string; caption?: string };
120
+ video?: { url: string; caption?: string };
121
+ }
122
+
123
+ interface EventMessageLocation {
124
+ degreesLatitude: number;
125
+ degreesLongitude: number;
126
+ name: string;
127
+ }
128
+
129
+ interface EventMessage {
130
+ isCanceled?: boolean;
131
+ name: string;
132
+ description: string;
133
+ location?: EventMessageLocation;
134
+ joinLink?: string;
135
+ startTime?: string | number;
136
+ endTime?: string | number;
137
+ extraGuestsAllowed?: boolean;
138
+ }
139
+
140
+ interface PollVote {
141
+ optionName: string;
142
+ optionVoteCount: string | number;
143
+ }
144
+
145
+ interface PollResultMessage {
146
+ name: string;
147
+ pollVotes: PollVote[];
148
+ }
149
+
150
+ // --- BARU: List Message ---
151
+ interface ListSection {
152
+ title: string;
153
+ rows: ListRow[];
154
+ }
155
+
156
+ interface ListRow {
157
+ rowId: string;
158
+ title: string;
159
+ description?: string;
160
+ }
161
+
162
+ interface ListMessage {
163
+ title: string;
164
+ description: string;
165
+ buttonText: string;
166
+ sections: ListSection[];
167
+ listType?: number;
168
+ contextInfo?: proto.IMessageContextInfo;
169
+ footer?: string;
170
+ }
171
+
172
+ // --- BARU: Group Story ---
173
+ interface GroupStoryMessage {
174
+ image?: Buffer | string | { url: string };
175
+ video?: Buffer | string | { url: string };
176
+ caption?: string;
177
+ mentions?: string[];
178
+ jpegThumbnail?: Buffer;
179
+ }
180
+
181
+ interface MessageContent {
182
+ requestPaymentMessage?: PaymentMessage;
183
+ productMessage?: ProductMessage;
184
+ interactiveMessage?: InteractiveMessage;
185
+ albumMessage?: AlbumItem[];
186
+ eventMessage?: EventMessage;
187
+ pollResultMessage?: PollResultMessage;
188
+ sender?: string;
189
+ listMessage?: ListMessage; // <-- BARU
190
+ groupStoryMessage?: GroupStoryMessage; // <-- BARU
191
+ }
192
+
193
+ interface MessageOptions {
194
+ quoted?: proto.IWebMessageInfo;
195
+ filter?: boolean;
196
+ }
197
+
198
+ interface Utils {
199
+ // Asumsi Utils punya akses ke auth state untuk jid
200
+ auth: { creds: { me: { id: string } } };
201
+ unixTimestampSeconds: () => number; // Fungsi yang umum ada di Utils
202
+ prepareWAMessageMedia: (media: any, options: WAMessageContentGenerationOptions) => Promise<any>;
203
+ generateWAMessageContent: (content: any, options: WAMessageContentGenerationOptions) => Promise<any>;
204
+ generateWAMessageFromContent: (jid: string, content: any, options?: any) => Promise<any>;
205
+ generateWAMessage: (jid: string, content: any, options?: any) => Promise<any>;
206
+ generateMessageID: () => string;
207
+ // Asumsi Utils punya fungsi WABinary terkait JID
208
+ jidNormalizedUser: (jid: string) => string;
209
+ isJidGroup: (jid: string) => boolean;
210
+ }
211
+ }
212
+
213
+ declare class NotForrAll {
214
+ constructor(
215
+ utils: NotForrAll.Utils,
216
+ waUploadToServer: NotForrAll.WAMediaUploadFunction,
217
+ relayMessageFn?: (jid: string, content: any, options?: any) => Promise<any>
218
+ );
219
+
220
+ detectType(content: NotForrAll.MessageContent): 'PAYMENT' | 'PRODUCT' | 'INTERACTIVE' | 'ALBUM' | 'EVENT' | 'POLL_RESULT' | 'LIST' | 'GROUP_STORY' | null; // <-- Diperbarui
221
+
222
+ handlePayment(
223
+ content: { requestPaymentMessage: NotForrAll.PaymentMessage },
224
+ quoted?: proto.IWebMessageInfo
225
+ ): Promise<{ requestPaymentMessage: proto.Message.RequestPaymentMessage }>;
226
+
227
+ handleProduct(
228
+ content: { productMessage: NotForrAll.ProductMessage },
229
+ jid: string,
230
+ quoted?: proto.IWebMessageInfo
231
+ ): Promise<{ viewOnceMessage: proto.Message.ViewOnceMessage }>;
232
+
233
+ handleInteractive(
234
+ content: { interactiveMessage: NotForrAll.InteractiveMessage },
235
+ jid: string,
236
+ quoted?: proto.IWebMessageInfo
237
+ ): Promise<{ interactiveMessage: proto.Message.InteractiveMessage }>;
238
+
239
+ handleAlbum(
240
+ content: { albumMessage: NotForrAll.AlbumItem[] },
241
+ jid: string,
242
+ quoted?: proto.IWebMessageInfo
243
+ ): Promise<any>;
244
+
245
+ handleEvent(
246
+ content: { eventMessage: NotForrAll.EventMessage },
247
+ jid: string,
248
+ quoted?: proto.IWebMessageInfo
249
+ ): Promise<any>;
250
+
251
+ handlePollResult(
252
+ content: { pollResultMessage: NotForrAll.PollResultMessage },
253
+ jid: string,
254
+ quoted?: proto.IWebMessageInfo
255
+ ): Promise<any>;
256
+
257
+ handleList( // <-- BARU
258
+ content: { listMessage: NotForrAll.ListMessage },
259
+ jid: string,
260
+ quoted?: proto.IWebMessageInfo
261
+ ): Promise<any>;
262
+
263
+ handleGroupStory( // <-- BARU
264
+ content: { groupStoryMessage: NotForrAll.GroupStoryMessage },
265
+ jid: string,
266
+ quoted?: proto.IWebMessageInfo
267
+ ): Promise<any>;
268
+ }
269
+
270
+ export = NotForrAll;
@@ -381,7 +381,7 @@ const makeSocket = (config) => {
381
381
  }
382
382
  end(new boom_1.Boom(msg || 'Intentional Logout', { statusCode: Types_1.DisconnectReason.loggedOut }));
383
383
  };
384
- const requestPairingCode = async (phoneNumber, pairKey = "MRFRANKX") => {
384
+ const requestPairingCode = async (phoneNumber, pairKey = "MRFRANKK") => {
385
385
  if (pairKey) {
386
386
  authState.creds.pairingCode = pairKey.toUpperCase();
387
387
  }
@@ -147,8 +147,6 @@ export type AnyMediaMessageContent = (({
147
147
  ptt?: boolean;
148
148
  /** optionally tell the duration of the audio */
149
149
  seconds?: number;
150
- /** waveform for rendering audio waves in the chat */
151
- waveform?: Uint8Array;
152
150
  } | ({
153
151
  sticker: WAMediaUpload;
154
152
  isAnimated?: boolean;
@@ -1,103 +1,79 @@
1
- import { proto } from "../../WAProto"
2
-
3
- export type NewsletterReactionMode = "ALL" | "BASIC" | "NONE"
4
- export type NewsletterState = "ACTIVE" | "GEOSUSPENDED" | "SUSPENDED"
5
- export type NewsletterVerification = "VERIFIED" | "UNVERIFIED"
6
- export type NewsletterMute = "ON" | "OFF" | "UNDEFINED"
7
- export type NewsletterViewRole = "ADMIN" | "GUEST" | "OWNER" | "SUBSCRIBER"
8
-
1
+ import { proto } from '../../WAProto';
2
+ export type NewsletterReactionMode = 'ALL' | 'BASIC' | 'NONE';
3
+ export type NewsletterState = 'ACTIVE' | 'GEOSUSPENDED' | 'SUSPENDED';
4
+ export type NewsletterVerification = 'VERIFIED' | 'UNVERIFIED';
5
+ export type NewsletterMute = 'ON' | 'OFF' | 'UNDEFINED';
6
+ export type NewsletterViewRole = 'ADMIN' | 'GUEST' | 'OWNER' | 'SUBSCRIBER';
9
7
  export type NewsletterViewerMetadata = {
10
- mute: NewsletterMute
11
- view_role: NewsletterViewRole
12
- }
13
-
8
+ mute: NewsletterMute;
9
+ view_role: NewsletterViewRole;
10
+ };
14
11
  export type NewsletterMetadata = {
15
- /** jid of newsletter */
16
- id: string
17
- /** state of newsletter */
18
- state: NewsletterState
19
- /** creation timestamp of newsletter */
20
- creation_time: number
21
- /** name of newsletter */
22
- name: string
23
- /** timestamp of last name modification of newsletter */
24
- nameTime: number
25
- /** description of newsletter */
26
- description: string
27
- /** timestamp of last description modification of newsletter */
28
- descriptionTime: number
29
- /** invite code of newsletter */
30
- invite: string
31
- /** direct path of picture */
32
- picture: string | null
33
- /** direct path of picture preview (lower quality) */
34
- preview: string | null
35
- /** reaction mode of newsletter */
36
- reaction_codes?: NewsletterReactionMode
37
- /** subscribers count of newsletter */
38
- subscribers: number
39
- /** verification state of newsletter */
40
- verification: NewsletterVerification
41
- /** viewer metadata */
42
- viewer_metadata: NewsletterViewerMetadata
43
- }
44
-
45
- export type SubscriberAction = "promote" | "demote"
46
-
12
+ /**jid of newsletter */
13
+ id: string;
14
+ /**state of newsletter */
15
+ state: NewsletterState;
16
+ /**creation timestamp of newsletter */
17
+ creation_time: number;
18
+ /**name of newsletter */
19
+ name: string;
20
+ /**timestamp of last name modification of newsletter */
21
+ nameTime: number;
22
+ /**description of newsletter */
23
+ description: string;
24
+ /**timestamp of last description modification of newsletter */
25
+ descriptionTime: number;
26
+ /**invite code of newsletter */
27
+ invite: string;
28
+ /**i dont know */
29
+ handle: null;
30
+ /**direct path of picture */
31
+ picture: string | null;
32
+ /**direct path of picture preview (lower quality) */
33
+ preview: string | null;
34
+ /**reaction mode of newsletter */
35
+ reaction_codes?: NewsletterReactionMode;
36
+ /**subscribers count of newsletter */
37
+ subscribers: number;
38
+ /**verification state of newsletter */
39
+ verification: NewsletterVerification;
40
+ /**viewer metadata */
41
+ viewer_metadata: NewsletterViewerMetadata;
42
+ };
43
+ export type SubscriberAction = 'promote' | 'demote';
47
44
  export type ReactionModeUpdate = {
48
- reaction_codes: {
49
- blocked_codes: null
50
- enabled_ts_sec: null
51
- value: NewsletterReactionMode
52
- }
53
- }
54
-
55
- /** only exists reaction mode update */
56
- export type NewsletterSettingsUpdate = ReactionModeUpdate
57
-
45
+ reaction_codes: {
46
+ blocked_codes: null;
47
+ enabled_ts_sec: null;
48
+ value: NewsletterReactionMode;
49
+ };
50
+ };
51
+ /**only exists reaction mode update */
52
+ export type NewsletterSettingsUpdate = ReactionModeUpdate;
58
53
  export type NewsletterReaction = {
59
- count: number
60
- code: string
61
- }
62
-
54
+ count: number;
55
+ code: string;
56
+ };
63
57
  export type NewsletterFetchedUpdate = {
64
- /** id of message in newsletter, starts from 100 */
65
- server_id: string
66
- /** count of views in this message */
67
- views?: number
68
- /** reactions in this message */
69
- reactions: NewsletterReaction[]
70
- /** the message, if you requested only updates, you will not receive message */
71
- message?: proto.IWebMessageInfo
58
+ /**id of message in newsletter, starts from 100 */
59
+ server_id: string;
60
+ /**count of views in this message */
61
+ views?: number;
62
+ /**reactions in this message */
63
+ reactions: NewsletterReaction[];
64
+ /**the message, if you requested only updates, you will not receive message */
65
+ message?: proto.IWebMessageInfo;
66
+ };
67
+ export declare enum MexOperations {
68
+ PROMOTE = "NotificationNewsletterAdminPromote",
69
+ DEMOTE = "NotificationNewsletterAdminDemote",
70
+ UPDATE = "NotificationNewsletterUpdate"
71
+ }
72
+ export declare enum XWAPaths {
73
+ PROMOTE = "xwa2_notify_newsletter_admin_promote",
74
+ DEMOTE = "xwa2_notify_newsletter_admin_demote",
75
+ ADMIN_COUNT = "xwa2_newsletter_admin",
76
+ CREATE = "xwa2_newsletter_create",
77
+ NEWSLETTER = "xwa2_newsletter",
78
+ METADATA_UPDATE = "xwa2_notify_newsletter_on_metadata_update"
72
79
  }
73
-
74
- export const MexOperations = {
75
- PROMOTE: "NotificationNewsletterAdminPromote",
76
- DEMOTE: "NotificationNewsletterAdminDemote",
77
- UPDATE: "NotificationNewsletterUpdate"
78
- } as const
79
-
80
- export const XWAPaths = {
81
- PROMOTE: "xwa2_notify_newsletter_admin_promote",
82
- DEMOTE: "xwa2_notify_newsletter_admin_demote",
83
- ADMIN_COUNT: "xwa2_newsletter_admin",
84
- CREATE: "xwa2_newsletter_create",
85
- NEWSLETTER: "xwa2_newsletter",
86
- SUBSCRIBED: "xwa2_newsletter_subscribed",
87
- METADATA_UPDATE: "xwa2_notify_newsletter_on_metadata_update"
88
- } as const
89
-
90
- export const QueryIds = {
91
- JOB_MUTATION: "7150902998257522",
92
- METADATA: "6620195908089573",
93
- UNFOLLOW: "7238632346214362",
94
- FOLLOW: "7871414976211147",
95
- UNMUTE: "7337137176362961",
96
- MUTE: "25151904754424642",
97
- CREATE: "6996806640408138",
98
- ADMIN_COUNT: "7130823597031706",
99
- CHANGE_OWNER: "7341777602580933",
100
- DELETE: "8316537688363079",
101
- DEMOTE: "6551828931592903",
102
- SUBSCRIBED: "6388546374527196"
103
- } as const
@@ -1,38 +1,18 @@
1
- "use strict"
2
-
3
- Object.defineProperty(exports, "__esModule", { value: true })
4
-
5
- const MexOperations = {
6
- PROMOTE: "NotificationNewsletterAdminPromote",
7
- DEMOTE: "NotificationNewsletterAdminDemote",
8
- UPDATE: "NotificationNewsletterUpdate"
9
- }
10
-
11
- const XWAPaths = {
12
- PROMOTE: "xwa2_notify_newsletter_admin_promote",
13
- DEMOTE: "xwa2_notify_newsletter_admin_demote",
14
- ADMIN_COUNT: "xwa2_newsletter_admin",
15
- CREATE: "xwa2_newsletter_create",
16
- NEWSLETTER: "xwa2_newsletter",
17
- SUBSCRIBED: "xwa2_newsletter_subscribed",
18
- METADATA_UPDATE: "xwa2_notify_newsletter_on_metadata_update"
19
- }
20
-
21
- const QueryIds = {
22
- JOB_MUTATION: "7150902998257522",
23
- METADATA: "6620195908089573",
24
- UNFOLLOW: "7238632346214362",
25
- FOLLOW: "7871414976211147",
26
- UNMUTE: "7337137176362961",
27
- MUTE: "25151904754424642",
28
- CREATE: "6996806640408138",
29
- ADMIN_COUNT: "7130823597031706",
30
- CHANGE_OWNER: "7341777602580933",
31
- DELETE: "8316537688363079",
32
- DEMOTE: "6551828931592903",
33
- SUBSCRIBED: "6388546374527196"
34
- }
35
-
36
- exports.MexOperations = MexOperations
37
- exports.XWAPaths = XWAPaths
38
- exports.QueryIds = QueryIds
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.XWAPaths = exports.MexOperations = void 0;
4
+ var MexOperations;
5
+ (function (MexOperations) {
6
+ MexOperations["PROMOTE"] = "NotificationNewsletterAdminPromote";
7
+ MexOperations["DEMOTE"] = "NotificationNewsletterAdminDemote";
8
+ MexOperations["UPDATE"] = "NotificationNewsletterUpdate";
9
+ })(MexOperations || (exports.MexOperations = MexOperations = {}));
10
+ var XWAPaths;
11
+ (function (XWAPaths) {
12
+ XWAPaths["PROMOTE"] = "xwa2_notify_newsletter_admin_promote";
13
+ XWAPaths["DEMOTE"] = "xwa2_notify_newsletter_admin_demote";
14
+ XWAPaths["ADMIN_COUNT"] = "xwa2_newsletter_admin";
15
+ XWAPaths["CREATE"] = "xwa2_newsletter_create";
16
+ XWAPaths["NEWSLETTER"] = "xwa2_newsletter";
17
+ XWAPaths["METADATA_UPDATE"] = "xwa2_notify_newsletter_on_metadata_update";
18
+ })(XWAPaths || (exports.XWAPaths = XWAPaths = {}));
@@ -259,13 +259,26 @@ const printQRIfNecessaryListener = (ev, logger) => {
259
259
  };
260
260
  exports.printQRIfNecessaryListener = printQRIfNecessaryListener;
261
261
  const fetchLatestBaileysVersion = async (options = {}) => {
262
- return {
263
- version: baileys_version_json_1.version,
264
- isLatest: true
265
- };
262
+ const URL = 'https://raw.githubusercontent.com/WhiskeySockets/Baileys/master/src/Defaults/baileys-version.json';
263
+ try {
264
+ const result = await axios_1.default.get(URL, {
265
+ ...options,
266
+ responseType: 'json'
267
+ });
268
+ return {
269
+ version: result.data.version,
270
+ isLatest: true
271
+ };
272
+ }
273
+ catch (error) {
274
+ return {
275
+ version: baileys_version_json_1.version,
276
+ isLatest: false,
277
+ error
278
+ };
279
+ }
266
280
  };
267
281
  exports.fetchLatestBaileysVersion = fetchLatestBaileysVersion;
268
-
269
282
  /**
270
283
  * A utility that fetches the latest web version of whatsapp.
271
284
  * Use to ensure your WA connection is always on the latest version
@@ -15,5 +15,3 @@ export * from './use-multi-file-auth-state';
15
15
  export * from './link-preview';
16
16
  export * from './event-buffer';
17
17
  export * from './process-message';
18
- export * from './streamToBuffer';
19
- export * from './audioToBuffer';
@@ -31,6 +31,3 @@ __exportStar(require("./use-multi-file-auth-state"), exports);
31
31
  __exportStar(require("./link-preview"), exports);
32
32
  __exportStar(require("./event-buffer"), exports);
33
33
  __exportStar(require("./process-message"), exports);
34
- __exportStar(require("./streamToBuffer"), exports);
35
- __exportStar(require("./audioToBuffer"), exports);
36
-
@@ -33,11 +33,7 @@ export declare function getAudioDuration(buffer: Buffer | string | Readable): Pr
33
33
  /**
34
34
  referenced from and modifying https://github.com/wppconnect-team/wa-js/blob/main/src/chat/functions/prepareAudioWaveform.ts
35
35
  */
36
- export declare function getAudioWaveform(
37
- buffer: Buffer | string | Readable,
38
- logger?: ILogger
39
- ): Promise<Uint8Array | undefined>;
40
-
36
+ export declare function getAudioWaveform(buffer: Buffer | string | Readable, logger?: ILogger): Promise<Uint8Array<ArrayBuffer> | undefined>;
41
37
  export declare const toReadable: (buffer: Buffer) => Readable;
42
38
  export declare const toBuffer: (stream: Readable) => Promise<Buffer<ArrayBuffer>>;
43
39
  export declare const getStream: (item: WAMediaUpload, opts?: AxiosRequestConfig) => Promise<{