@queenanya/baileys 7.3.5 → 7.3.6
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/lib/Utils/generics.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare const printQRIfNecessaryListener: (ev: BaileysEventEmitter, logge
|
|
|
54
54
|
* utility that fetches latest baileys version from the main branch.
|
|
55
55
|
* Use to ensure your WA connection is always on the latest version
|
|
56
56
|
*/
|
|
57
|
-
export declare const
|
|
57
|
+
export declare const fetchLatestBaileysVersion: (options?: AxiosRequestConfig<any>) => Promise<{
|
|
58
58
|
version: number[];
|
|
59
59
|
isLatest: boolean;
|
|
60
60
|
error?: undefined;
|
|
@@ -67,7 +67,7 @@ export declare const fetchLatestBaileysVersion2: (options?: AxiosRequestConfig<a
|
|
|
67
67
|
* utility that fetches latest baileys version from the master branch.
|
|
68
68
|
* Use to ensure your WA connection is always on the latest version
|
|
69
69
|
*/
|
|
70
|
-
export declare const
|
|
70
|
+
export declare const fetchLatestBaileysVersion2: (options?: AxiosRequestConfig<any>) => Promise<{
|
|
71
71
|
version: WAVersion;
|
|
72
72
|
isLatest: boolean;
|
|
73
73
|
error?: undefined;
|
package/lib/Utils/generics.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.bytesToCrockford = exports.trimUndefined = exports.isWABusinessPlatform = exports.getCodeFromWSError = exports.getCallStatusFromNode = exports.getErrorCodeFromStreamError = exports.getStatusFromReceiptType = exports.generateMdTagPrefix = exports.fetchLatestWaWebVersion = exports.
|
|
6
|
+
exports.bytesToCrockford = exports.trimUndefined = exports.isWABusinessPlatform = exports.getCodeFromWSError = exports.getCallStatusFromNode = exports.getErrorCodeFromStreamError = exports.getStatusFromReceiptType = exports.generateMdTagPrefix = exports.fetchLatestWaWebVersion = exports.fetchLatestBaileysVersion2 = exports.fetchLatestBaileysVersion = exports.printQRIfNecessaryListener = exports.bindWaitForConnectionUpdate = exports.bindWaitForEvent = exports.generateMessageID = exports.generateMessageIDV3 = exports.generateMessageIDV2 = exports.promiseTimeout = exports.delayCancellable = exports.delay = exports.debouncedTimeout = exports.unixTimestampSeconds = exports.toNumber = exports.encodeBigEndian = exports.generateRegistrationId = exports.encodeNewsletterMessage = exports.encodeWAMessage = exports.unpadRandomMax16 = exports.writeRandomPadMax16 = exports.getKeyAuthor = exports.BufferJSON = exports.getPlatformId = exports.Browsers = void 0;
|
|
7
7
|
const boom_1 = require("@hapi/boom");
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
9
|
const crypto_1 = require("crypto");
|
|
@@ -241,7 +241,7 @@ exports.printQRIfNecessaryListener = printQRIfNecessaryListener;
|
|
|
241
241
|
* utility that fetches latest baileys version from the main branch.
|
|
242
242
|
* Use to ensure your WA connection is always on the latest version
|
|
243
243
|
*/
|
|
244
|
-
const
|
|
244
|
+
const fetchLatestBaileysVersion = async (options = {}) => {
|
|
245
245
|
try {
|
|
246
246
|
const result = await axios_1.default.get('https://raw.githubusercontent.com/wppconnect-team/wa-version/main/versions.json', {
|
|
247
247
|
...options,
|
|
@@ -262,12 +262,12 @@ const fetchLatestBaileysVersion2 = async (options = {}) => {
|
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
|
-
exports.
|
|
265
|
+
exports.fetchLatestBaileysVersion = fetchLatestBaileysVersion;
|
|
266
266
|
/**
|
|
267
267
|
* utility that fetches latest baileys version from the master branch.
|
|
268
268
|
* Use to ensure your WA connection is always on the latest version
|
|
269
269
|
*/
|
|
270
|
-
const
|
|
270
|
+
const fetchLatestBaileysVersion2 = async (options = {}) => {
|
|
271
271
|
const URL = 'https://raw.githubusercontent.com/WhiskeySockets/Baileys/master/src/Defaults/baileys-version.json';
|
|
272
272
|
try {
|
|
273
273
|
const result = await axios_1.default.get(URL, {
|
|
@@ -287,7 +287,7 @@ const fetchLatestBaileysVersion = async (options = {}) => {
|
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
};
|
|
290
|
-
exports.
|
|
290
|
+
exports.fetchLatestBaileysVersion2 = fetchLatestBaileysVersion2;
|
|
291
291
|
/**
|
|
292
292
|
* A utility that fetches the latest web version of whatsapp.
|
|
293
293
|
* Use to ensure your WA connection is always on the latest version
|
|
@@ -203,7 +203,7 @@ const generateProfilePictureFull = async (img) => {
|
|
|
203
203
|
hight = hight / ratio;
|
|
204
204
|
img = cropped.quality(100).resize(width, hight).getBufferAsync(MIME_JPEG);
|
|
205
205
|
return {
|
|
206
|
-
img: await
|
|
206
|
+
img: await cropped.quality(100).resize(width, hight).getBufferAsync(MIME_JPEG),
|
|
207
207
|
};
|
|
208
208
|
};
|
|
209
209
|
exports.generateProfilePictureFull = generateProfilePictureFull;
|
|
@@ -251,7 +251,7 @@ const changeprofileFull = async (img) => {
|
|
|
251
251
|
hight = hight / ratio;
|
|
252
252
|
img = cropped.quality(100).resize(width, hight).getBufferAsync(MIME_JPEG);
|
|
253
253
|
return {
|
|
254
|
-
img: await
|
|
254
|
+
img: await cropped.quality(100).resize(width, hight).getBufferAsync(MIME_JPEG),
|
|
255
255
|
};
|
|
256
256
|
};
|
|
257
257
|
exports.changeprofileFull = changeprofileFull;
|