@wppconnect/wa-js 3.18.5 → 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 +6 -1
- package/dist/chat/functions/sendFileMessage.d.ts +13 -0
- package/dist/util/index.d.ts +1 -0
- package/dist/util/isUrl.d.ts +21 -0
- package/dist/whatsapp/functions/createGroup.d.ts +12 -2
- package/dist/whatsapp/functions/isLidMigrated.d.ts +1 -1
- package/dist/whatsapp/misc/WidFactory.d.ts +1 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
## 3.18.
|
|
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
|
package/dist/util/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -17,7 +17,15 @@ import { Wid } from '..';
|
|
|
17
17
|
/**
|
|
18
18
|
* @whatsapp 247355
|
|
19
19
|
*/
|
|
20
|
-
export declare function createGroup(
|
|
20
|
+
export declare function createGroup(options: {
|
|
21
|
+
title: string;
|
|
22
|
+
ephemeralDuration: number;
|
|
23
|
+
restrict: boolean;
|
|
24
|
+
announce: boolean;
|
|
25
|
+
membershipApprovalMode: boolean;
|
|
26
|
+
memberAddMode: boolean;
|
|
27
|
+
parentGroupId?: Wid;
|
|
28
|
+
}, participants: Wid[]): Promise<{
|
|
21
29
|
wid: Wid;
|
|
22
30
|
participants: {
|
|
23
31
|
wid: Wid;
|
|
@@ -34,7 +42,9 @@ export declare function createGroup(options: {
|
|
|
34
42
|
membershipApprovalMode: boolean;
|
|
35
43
|
memberAddMode: boolean;
|
|
36
44
|
parentGroupId?: Wid;
|
|
37
|
-
}, participants:
|
|
45
|
+
}, participants: {
|
|
46
|
+
phoneNumber: Wid;
|
|
47
|
+
}[]): Promise<{
|
|
38
48
|
wid: Wid;
|
|
39
49
|
participants: {
|
|
40
50
|
wid: Wid;
|
|
@@ -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;
|