@wppconnect-team/wppconnect 1.37.6 → 1.37.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## <small>1.37.7 (2025-11-25)</small>
2
+
3
+ - Merge pull request #2624 from wppconnect-team/manfe/bump-wa-js-versions ([eb652cf](https://github.com/wppconnect-team/wppconnect/commit/eb652cf)), closes [#2624](https://github.com/wppconnect-team/wppconnect/issues/2624)
4
+
1
5
  ## <small>1.37.6 (2025-11-11)</small>
2
6
 
3
7
  - [update] version whatsapp web (#2609) ([cf04c5d](https://github.com/wppconnect-team/wppconnect/commit/cf04c5d)), closes [#2609](https://github.com/wppconnect-team/wppconnect/issues/2609)
@@ -135,5 +135,11 @@ export declare class HostLayer {
135
135
  * @category Host
136
136
  * @returns Build constants information
137
137
  */
138
- getBuildConstants(): Promise<string>;
138
+ getBuildConstants(): Promise<import("@wppconnect/wa-js/dist/conn").BuildConstants>;
139
+ /**
140
+ * Check if the account has been migrated to LID
141
+ * @category Host
142
+ * @returns true if the account has been migrated to LID, false otherwise
143
+ */
144
+ isLidMigrated(): Promise<boolean>;
139
145
  }
@@ -821,6 +821,21 @@ var HostLayer = /** @class */ (function () {
821
821
  });
822
822
  });
823
823
  };
824
+ /**
825
+ * Check if the account has been migrated to LID
826
+ * @category Host
827
+ * @returns true if the account has been migrated to LID, false otherwise
828
+ */
829
+ HostLayer.prototype.isLidMigrated = function () {
830
+ return __awaiter(this, void 0, void 0, function () {
831
+ return __generator(this, function (_a) {
832
+ switch (_a.label) {
833
+ case 0: return [4 /*yield*/, (0, helpers_1.evaluateAndReturn)(this.page, function () { return WPP.whatsapp.functions.isLidMigrated(); })];
834
+ case 1: return [2 /*return*/, _a.sent()];
835
+ }
836
+ });
837
+ });
838
+ };
824
839
  return HostLayer;
825
840
  }());
826
841
  exports.HostLayer = HostLayer;
@@ -107,7 +107,7 @@ export declare class SenderLayer extends ListenerLayer {
107
107
  }): Promise<{
108
108
  ack: number;
109
109
  id: string;
110
- sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
110
+ sendMsgResult: import("@wppconnect/wa-js/dist/chat").SendMsgResultObject;
111
111
  }>;
112
112
  /**
113
113
  * Sends image message
@@ -130,7 +130,7 @@ export declare class SenderLayer extends ListenerLayer {
130
130
  }): Promise<{
131
131
  ack: number;
132
132
  id: string;
133
- sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
133
+ sendMsgResult: import("@wppconnect/wa-js/dist/chat").SendMsgResultObject;
134
134
  }>;
135
135
  /**
136
136
  * Sends message with thumbnail
@@ -174,7 +174,7 @@ export declare class SenderLayer extends ListenerLayer {
174
174
  sendPttFromBase64(to: string, base64: string, filename: string, caption?: string, quotedMessageId?: string, messageId?: string, isPtt?: boolean): Promise<{
175
175
  ack: number;
176
176
  id: string;
177
- sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
177
+ sendMsgResult: import("@wppconnect/wa-js/dist/chat").SendMsgResultObject;
178
178
  }>;
179
179
  /**
180
180
  * Sends ptt audio from path
@@ -271,7 +271,7 @@ export declare class SenderLayer extends ListenerLayer {
271
271
  sendVideoAsGif(to: string, filePath: string, filename?: string, caption?: string): Promise<{
272
272
  ack: number;
273
273
  id: string;
274
- sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
274
+ sendMsgResult: import("@wppconnect/wa-js/dist/chat").SendMsgResultObject;
275
275
  }>;
276
276
  /**
277
277
  * Sends a video to given chat as a gif, with caption or not, using base64
@@ -284,7 +284,7 @@ export declare class SenderLayer extends ListenerLayer {
284
284
  sendVideoAsGifFromBase64(to: string, base64: string, filename: string, caption?: string, quotedMessageId?: string): Promise<{
285
285
  ack: number;
286
286
  id: string;
287
- sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
287
+ sendMsgResult: import("@wppconnect/wa-js/dist/chat").SendMsgResultObject;
288
288
  }>;
289
289
  /**
290
290
  * Sends a video to given chat as a gif, with caption or not, using base64
@@ -297,7 +297,7 @@ export declare class SenderLayer extends ListenerLayer {
297
297
  sendGif(to: string, filePath: string, filename?: string, caption?: string): Promise<{
298
298
  ack: number;
299
299
  id: string;
300
- sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
300
+ sendMsgResult: import("@wppconnect/wa-js/dist/chat").SendMsgResultObject;
301
301
  }>;
302
302
  /**
303
303
  * Sends a video to given chat as a gif, with caption or not, using base64
@@ -310,7 +310,7 @@ export declare class SenderLayer extends ListenerLayer {
310
310
  sendGifFromBase64(to: string, base64: string, filename: string, caption?: string): Promise<{
311
311
  ack: number;
312
312
  id: string;
313
- sendMsgResult: import("@wppconnect/wa-js/dist/whatsapp/enums").SendMsgResult;
313
+ sendMsgResult: import("@wppconnect/wa-js/dist/chat").SendMsgResultObject;
314
314
  }>;
315
315
  /**
316
316
  * Sends contact card to iven chat id
@@ -420,7 +420,7 @@ export declare class SenderLayer extends ListenerLayer {
420
420
  unreadCount: number;
421
421
  }>;
422
422
  /**
423
- * Sets a audio or image view once. Marks message as played
423
+ * Sets an audio or image view once. Marks message as played
424
424
  * @category Chat
425
425
  * @param msgId Message id: xxxxx@us.c
426
426
  */
@@ -438,7 +438,7 @@ export declare class SenderLayer extends ListenerLayer {
438
438
  * ```
439
439
  * @category Chat
440
440
  * @param to Chat Id
441
- * @param duration Duration um miliseconds
441
+ * @param duration Duration in milliseconds
442
442
  */
443
443
  startTyping(to: string, duration?: number): Promise<void>;
444
444
  /**
@@ -451,7 +451,7 @@ export declare class SenderLayer extends ListenerLayer {
451
451
  * Starts recording ('Recording...' state)
452
452
  * @example
453
453
  * ```javascript
454
- * // Keep sending recording state, use stopRecoring to finish
454
+ * // Keep sending recording state, use `stopRecording` to finish
455
455
  * await client.startRecording('[number]@c.us');
456
456
  *
457
457
  * // Keep sending typing state for 5 seconds
@@ -459,15 +459,22 @@ export declare class SenderLayer extends ListenerLayer {
459
459
  * ```
460
460
  * @category Chat
461
461
  * @param to Chat Id
462
- * @param duration Duration um miliseconds
462
+ * @param duration Duration in milliseconds
463
463
  */
464
464
  startRecording(to: string, duration?: number): Promise<void>;
465
465
  /**
466
466
  * Stops recording ('Recording...' state)
467
+ * @deprecated please use {@link stopRecording} this function will be removed in future releases
467
468
  * @category Chat
468
469
  * @param to Chat Id
469
470
  */
470
471
  stopRecoring(to: string): Promise<void>;
472
+ /**
473
+ * Stops recording ('Recording...' state)
474
+ * @category Chat
475
+ * @param to Chat Id
476
+ */
477
+ stopRecording(to: string): Promise<void>;
471
478
  /**
472
479
  * Update your online presence
473
480
  * @category Chat
@@ -559,18 +566,18 @@ export declare class SenderLayer extends ListenerLayer {
559
566
  * ```
560
567
  * @category Chat
561
568
  * @param to Chat Id
562
- * @param duration Duration um miliseconds
569
+ * @param duration Duration in milliseconds
563
570
  */
564
571
  sendReactionToMessage(msgId: string, reaction: string | false): Promise<{
565
572
  sendMsgResult: string;
566
573
  }>;
567
574
  /**
568
- * Send a order message
575
+ * Send an order message
569
576
  * To send (prices, tax, shipping or discount), for example: USD 12.90, send them without dots or commas, like: 12900
570
577
  *
571
578
  * @example
572
579
  * ```javascript
573
- * // Send Order with a product
580
+ * // Send an order with a product
574
581
  * client.sendOrderMessage('[number]@c.us', [
575
582
  * { type: 'product', id: '67689897878', qnt: 2 },
576
583
  * { type: 'product', id: '37878774457', qnt: 1 },
@@ -1201,7 +1201,7 @@ var SenderLayer = /** @class */ (function (_super) {
1201
1201
  });
1202
1202
  };
1203
1203
  /**
1204
- * Sets a audio or image view once. Marks message as played
1204
+ * Sets an audio or image view once. Marks message as played
1205
1205
  * @category Chat
1206
1206
  * @param msgId Message id: xxxxx@us.c
1207
1207
  */
@@ -1225,7 +1225,7 @@ var SenderLayer = /** @class */ (function (_super) {
1225
1225
  * ```
1226
1226
  * @category Chat
1227
1227
  * @param to Chat Id
1228
- * @param duration Duration um miliseconds
1228
+ * @param duration Duration in milliseconds
1229
1229
  */
1230
1230
  SenderLayer.prototype.startTyping = function (to, duration) {
1231
1231
  return __awaiter(this, void 0, void 0, function () {
@@ -1261,7 +1261,7 @@ var SenderLayer = /** @class */ (function (_super) {
1261
1261
  * Starts recording ('Recording...' state)
1262
1262
  * @example
1263
1263
  * ```javascript
1264
- * // Keep sending recording state, use stopRecoring to finish
1264
+ * // Keep sending recording state, use `stopRecording` to finish
1265
1265
  * await client.startRecording('[number]@c.us');
1266
1266
  *
1267
1267
  * // Keep sending typing state for 5 seconds
@@ -1269,7 +1269,7 @@ var SenderLayer = /** @class */ (function (_super) {
1269
1269
  * ```
1270
1270
  * @category Chat
1271
1271
  * @param to Chat Id
1272
- * @param duration Duration um miliseconds
1272
+ * @param duration Duration in milliseconds
1273
1273
  */
1274
1274
  SenderLayer.prototype.startRecording = function (to, duration) {
1275
1275
  return __awaiter(this, void 0, void 0, function () {
@@ -1286,6 +1286,7 @@ var SenderLayer = /** @class */ (function (_super) {
1286
1286
  };
1287
1287
  /**
1288
1288
  * Stops recording ('Recording...' state)
1289
+ * @deprecated please use {@link stopRecording} this function will be removed in future releases
1289
1290
  * @category Chat
1290
1291
  * @param to Chat Id
1291
1292
  */
@@ -1301,6 +1302,23 @@ var SenderLayer = /** @class */ (function (_super) {
1301
1302
  });
1302
1303
  });
1303
1304
  };
1305
+ /**
1306
+ * Stops recording ('Recording...' state)
1307
+ * @category Chat
1308
+ * @param to Chat Id
1309
+ */
1310
+ SenderLayer.prototype.stopRecording = function (to) {
1311
+ return __awaiter(this, void 0, void 0, function () {
1312
+ return __generator(this, function (_a) {
1313
+ return [2 /*return*/, (0, helpers_1.evaluateAndReturn)(this.page, function (_a) {
1314
+ var to = _a.to;
1315
+ return WPP.chat.markIsPaused(to);
1316
+ }, {
1317
+ to: to,
1318
+ })];
1319
+ });
1320
+ });
1321
+ };
1304
1322
  /**
1305
1323
  * Update your online presence
1306
1324
  * @category Chat
@@ -1507,7 +1525,7 @@ var SenderLayer = /** @class */ (function (_super) {
1507
1525
  * ```
1508
1526
  * @category Chat
1509
1527
  * @param to Chat Id
1510
- * @param duration Duration um miliseconds
1528
+ * @param duration Duration in milliseconds
1511
1529
  */
1512
1530
  SenderLayer.prototype.sendReactionToMessage = function (msgId, reaction) {
1513
1531
  return __awaiter(this, void 0, void 0, function () {
@@ -1523,12 +1541,12 @@ var SenderLayer = /** @class */ (function (_super) {
1523
1541
  });
1524
1542
  };
1525
1543
  /**
1526
- * Send a order message
1544
+ * Send an order message
1527
1545
  * To send (prices, tax, shipping or discount), for example: USD 12.90, send them without dots or commas, like: 12900
1528
1546
  *
1529
1547
  * @example
1530
1548
  * ```javascript
1531
- * // Send Order with a product
1549
+ * // Send an order with a product
1532
1550
  * client.sendOrderMessage('[number]@c.us', [
1533
1551
  * { type: 'product', id: '67689897878', qnt: 2 },
1534
1552
  * { type: 'product', id: '37878774457', qnt: 1 },
@@ -1,6 +1,6 @@
1
1
  export declare enum GroupNotificationType {
2
2
  Add = "add",
3
- Inivite = "invite",
3
+ Invite = "invite",
4
4
  Remove = "remove",
5
5
  Leave = "leave",
6
6
  Subject = "subject",
@@ -20,7 +20,7 @@ exports.GroupNotificationType = void 0;
20
20
  var GroupNotificationType;
21
21
  (function (GroupNotificationType) {
22
22
  GroupNotificationType["Add"] = "add";
23
- GroupNotificationType["Inivite"] = "invite";
23
+ GroupNotificationType["Invite"] = "invite";
24
24
  GroupNotificationType["Remove"] = "remove";
25
25
  GroupNotificationType["Leave"] = "leave";
26
26
  GroupNotificationType["Subject"] = "subject";
@@ -11,9 +11,9 @@ export declare enum StatusFind {
11
11
  */
12
12
  browserClose = "browserClose",
13
13
  /**
14
- * Client has disconnected in to mobile.
14
+ * Client has disconnected to the mobile device.
15
15
  */
16
- desconnectedMobile = "desconnectedMobile",
16
+ disconnectedMobile = "disconnectedMobile",
17
17
  /**
18
18
  * Client is ready to send and receive messages.
19
19
  */
@@ -31,9 +31,9 @@ var StatusFind;
31
31
  */
32
32
  StatusFind["browserClose"] = "browserClose";
33
33
  /**
34
- * Client has disconnected in to mobile.
34
+ * Client has disconnected to the mobile device.
35
35
  */
36
- StatusFind["desconnectedMobile"] = "desconnectedMobile";
36
+ StatusFind["disconnectedMobile"] = "disconnectedMobile";
37
37
  /**
38
38
  * Client is ready to send and receive messages.
39
39
  */
@@ -1,7 +1,7 @@
1
- import { Wid } from './wid';
2
1
  import { Chat } from './chat';
3
2
  import { Contact } from './contact';
4
3
  import { MessageType } from './enum';
4
+ import { Wid } from './wid';
5
5
  /** available during the `onMessage` event */
6
6
  export interface Message {
7
7
  id: string;
@@ -98,6 +98,23 @@ export interface Message {
98
98
  recipients?: string[];
99
99
  /** exists for image and video types {@link GroupNotificationType} */
100
100
  caption?: string;
101
+ ctwaContext?: {
102
+ conversionSource?: string;
103
+ conversionData?: object;
104
+ sourceUrl?: string;
105
+ description?: string;
106
+ title?: string;
107
+ thumbnail?: string;
108
+ thumbnailUrl?: string;
109
+ mediaType?: number;
110
+ adContextPreviewDismissed?: boolean;
111
+ sourceApp?: string;
112
+ greetingMessageBody?: string;
113
+ automatedGreetingMessageShown?: boolean;
114
+ sourceId?: string;
115
+ originalImageUrl?: string;
116
+ mediaUrl?: string;
117
+ };
101
118
  }
102
119
  export interface MediaData {
103
120
  type: string;
@@ -219,7 +219,7 @@ var Whatsapp = /** @class */ (function (_super) {
219
219
  return __generator(this, function (_a) {
220
220
  if (this.statusFind) {
221
221
  try {
222
- this.statusFind('desconnectedMobile', session);
222
+ this.statusFind('disconnectedMobile', session);
223
223
  }
224
224
  catch (error) { }
225
225
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wppconnect-team/wppconnect",
3
- "version": "1.37.6",
3
+ "version": "1.37.7",
4
4
  "description": "WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination... 😀🤔💭",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -65,7 +65,7 @@
65
65
  "@types/atob": "^2.1.4",
66
66
  "@types/mime-types": "^3.0.1",
67
67
  "@types/mocha": "^10.0.10",
68
- "@types/node": "^24.10.0",
68
+ "@types/node": "^24.10.1",
69
69
  "@types/shelljs": "^0.8.17",
70
70
  "@types/tmp": "^0.2.6",
71
71
  "@types/ws": "^8.18.1",
@@ -84,19 +84,19 @@
84
84
  "prettier": "^2.8.8",
85
85
  "pretty-quick": "^4.2.2",
86
86
  "regenerator-runtime": "^0.14.1",
87
- "release-it": "^19.0.5",
87
+ "release-it": "^19.0.6",
88
88
  "shx": "^0.4.0",
89
89
  "ts-node": "^10.9.2",
90
90
  "typedoc": "^0.28.14",
91
91
  "typescript": "^5.9.3",
92
- "webpack": "^5.102.1",
92
+ "webpack": "^5.103.0",
93
93
  "webpack-cli": "^6.0.1"
94
94
  },
95
95
  "dependencies": {
96
- "@wppconnect/wa-js": "^3.18.8",
97
- "@wppconnect/wa-version": "^1.5.2614",
96
+ "@wppconnect/wa-js": "^3.19.2",
97
+ "@wppconnect/wa-version": "^1.5.2714",
98
98
  "atob": "^2.1.2",
99
- "axios": "^1.13.1",
99
+ "axios": "^1.13.2",
100
100
  "boxen": "^5.1.2",
101
101
  "catch-exit": "^2.0.0",
102
102
  "chalk": "~4.1.2",
@@ -107,8 +107,8 @@
107
107
  "latest-version": "^5.1.0",
108
108
  "logform": "^2.7.0",
109
109
  "lookpath": "^1.2.3",
110
- "mime-types": "^3.0.1",
111
- "puppeteer": "^24.27.0",
110
+ "mime-types": "^3.0.2",
111
+ "puppeteer": "^24.31.0",
112
112
  "puppeteer-extra": "^3.3.6",
113
113
  "puppeteer-extra-plugin-stealth": "^2.11.2",
114
114
  "puppeteer-extra-plugin-user-data-dir": "^2.4.1",
@@ -117,14 +117,14 @@
117
117
  "reflect-metadata": "^0.2.1",
118
118
  "rimraf": "^3.0.2",
119
119
  "sanitize-filename": "^1.6.3",
120
- "sharp": "0.34.4",
120
+ "sharp": "0.34.5",
121
121
  "tmp": "^0.2.5",
122
122
  "tree-kill": "^1.2.2",
123
123
  "winston": "^3.18.3",
124
124
  "ws": "^8.18.3"
125
125
  },
126
126
  "optionalDependencies": {
127
- "@img/sharp-win32-x64": "^0.34.3",
127
+ "@img/sharp-win32-x64": "^0.34.5",
128
128
  "fsevents": "^2.3.3"
129
129
  },
130
130
  "directories": {