@wppconnect/wa-js 3.18.6 → 3.18.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,4 +1,9 @@
1
- ## 3.18.6 (2025-09-26)
1
+ ## 3.18.7 (2025-10-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Fixed WidFactory.createUserWid ([#2948](https://github.com/wppconnect-team/wa-js/issues/2948)) ([043b38a](https://github.com/wppconnect-team/wa-js/commit/043b38a623ce295e8acabfd054ac6b72292455ba))
2
7
 
3
8
 
4
9
 
@@ -179,6 +179,19 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
179
179
  * isPtv: true,
180
180
  * }
181
181
  * );
182
+ *
183
+ * // Media using Link, the link must be public accessible
184
+ * // CORS must be enabled on the server and available for all domains
185
+ * // (Access-Control-Allow-Origin: *)
186
+ * // If the server does not have CORS enabled, you can use a public CORS proxy
187
+ * WPP.chat.sendFileMessage(
188
+ * '[number]@c.us',
189
+ * 'https://example.com/image.jpg',
190
+ * {
191
+ * type: 'image',
192
+ * caption: 'My image from URL', // Optional
193
+ * }
194
+ * );
182
195
  * ```
183
196
  * @category Message
184
197
  * @return {SendMessageReturn} The result
@@ -23,6 +23,7 @@ export * from './fetchDataFromPNG';
23
23
  export * from './generateOrderUniqueId';
24
24
  export * from './getVideoInfoFromBuffer';
25
25
  export * from './isBase64';
26
+ export * from './isUrl';
26
27
  export * from './resizeImage';
27
28
  export * from './types';
28
29
  export * from './wrapFunction';
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Copyright 2021 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Check if a string is a valid HTTP or HTTPS URL
18
+ * @param url The string to check
19
+ * @returns true if the string is a valid HTTP/HTTPS URL, false otherwise
20
+ */
21
+ export declare function isUrl(url: string): boolean;
@@ -16,4 +16,4 @@
16
16
  /**
17
17
  * @whatsapp WAWebLidMigrationUtils >= 2.3000.x
18
18
  */
19
- export declare function isLidMigrated(): boolean;
19
+ export declare function isLidMigrated(): boolean | (() => any);
@@ -22,6 +22,7 @@ export declare namespace WidFactory {
22
22
  function createDeviceWid(wid: string): Wid;
23
23
  function createDeviceWidFromUserAndDevice(user: string, device: string): Wid;
24
24
  function createUserWid(user: string, server?: string): Wid;
25
+ function createUserWidOrThrow(user: string, server?: string): Wid;
25
26
  function createWid(wid: string): Wid;
26
27
  function createWidFromWidLike(wid: string | {
27
28
  _serialized: string;