@wppconnect/wa-js 3.1.1 → 3.2.1
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/README.md +1 -1
- package/dist/chat/functions/prepareMessageButtons.d.ts +6 -0
- package/dist/chat/functions/sendFileMessage.d.ts +2 -0
- package/dist/newsletter/functions/getSubscribers.d.ts +26 -0
- package/dist/newsletter/functions/index.d.ts +1 -0
- package/dist/whatsapp/collections/StatusCollection.d.ts +4 -1
- package/dist/whatsapp/functions/getNewsletterSubscribers.d.ts +34 -0
- package/dist/whatsapp/functions/index.d.ts +1 -0
- package/dist/whatsapp/functions/sendNewsletterMessageJob.d.ts +4 -1
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
## 3.
|
|
1
|
+
## 3.2.1 (2024-04-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Fixed send some messages ([#1876](https://github.com/wppconnect-team/wa-js/issues/1876)) ([f063fa3](https://github.com/wppconnect-team/wa-js/commit/f063fa39fb0062c0542ee91f08c59755c91e3b7d))
|
|
2
7
|
|
|
3
8
|
|
|
4
9
|
|
package/README.md
CHANGED
|
@@ -36,8 +36,14 @@ export interface MessageButtonsOptions {
|
|
|
36
36
|
/**
|
|
37
37
|
* Set to use template buttons instead of reply buttons.
|
|
38
38
|
* @default: undefined - auto detect
|
|
39
|
+
* @deprecated
|
|
39
40
|
*/
|
|
40
41
|
useTemplateButtons?: boolean | null;
|
|
42
|
+
/**
|
|
43
|
+
* Set to use interactive message instead of reply buttons.
|
|
44
|
+
* @default: undefined - auto detect
|
|
45
|
+
*/
|
|
46
|
+
useInteractiveMesssage?: boolean | null;
|
|
41
47
|
/**
|
|
42
48
|
* Footer text for buttons
|
|
43
49
|
*/
|
|
@@ -44,6 +44,7 @@ export interface AutoDetectMessageOptions extends FileMessageOptions {
|
|
|
44
44
|
export interface AudioMessageOptions extends FileMessageOptions {
|
|
45
45
|
type: 'audio';
|
|
46
46
|
isPtt?: boolean;
|
|
47
|
+
isViewOnce?: boolean;
|
|
47
48
|
/**
|
|
48
49
|
* Send an audio message as a PTT with waveform
|
|
49
50
|
*
|
|
@@ -87,6 +88,7 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
87
88
|
type: 'video';
|
|
88
89
|
isGif?: boolean;
|
|
89
90
|
isPtv?: boolean;
|
|
91
|
+
isViewOnce?: boolean;
|
|
90
92
|
}
|
|
91
93
|
/**
|
|
92
94
|
* Send a file message, that can be an audio, document, image, sticker or video
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2024 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
|
+
* Get subscribers of a newsletters
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* const code = WPP.newsletter.getSubscribers('[newsletter-id]@newsletter');
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @category Newsletter
|
|
25
|
+
*/
|
|
26
|
+
export declare function getSubscribers(id: string): Promise<any>;
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
import { Wid } from '../misc';
|
|
17
17
|
import { StatusModel } from '../models';
|
|
18
18
|
import { BaseCollection } from '.';
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* @whatsapp 46133
|
|
21
|
+
* @whatsapp WAWebTextStatusCollection >= 2.3000.1013010908
|
|
22
|
+
* */
|
|
20
23
|
export declare class StatusCollection extends BaseCollection<StatusModel> {
|
|
21
24
|
static model: StatusModel;
|
|
22
25
|
static idClass: typeof Wid;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2024 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
|
+
import { Wid } from '../misc';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 276084
|
|
19
|
+
*/
|
|
20
|
+
export declare function getNewsletterSubscribers(jid: string, param2: number, view: 'LIMITED'): Promise<{
|
|
21
|
+
subscribers: {
|
|
22
|
+
id: Wid;
|
|
23
|
+
isContact?: boolean;
|
|
24
|
+
isGroup?: boolean;
|
|
25
|
+
isOnline?: boolean;
|
|
26
|
+
isUser?: boolean;
|
|
27
|
+
shortname?: string;
|
|
28
|
+
state?: string;
|
|
29
|
+
displayName?: string;
|
|
30
|
+
phoneNumber?: string;
|
|
31
|
+
subscribeTime?: number;
|
|
32
|
+
t: number;
|
|
33
|
+
}[];
|
|
34
|
+
}>;
|
|
@@ -58,6 +58,7 @@ export * from './getGroupSenderKeyList';
|
|
|
58
58
|
export * from './getGroupSizeLimit';
|
|
59
59
|
export * from './getHistorySyncProgress';
|
|
60
60
|
export * from './getMembershipApprovalRequests';
|
|
61
|
+
export * from './getNewsletterSubscribers';
|
|
61
62
|
export * from './getNextLabelId';
|
|
62
63
|
export * from './getNumChatsPinned';
|
|
63
64
|
export * from './getOrderInfo';
|
|
@@ -13,12 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { MsgModel } from '../models';
|
|
16
17
|
/** @whatsapp 397995
|
|
17
18
|
*/
|
|
18
19
|
export declare function sendNewsletterMessageJob(data: {
|
|
19
|
-
msgData
|
|
20
|
+
msgData?: any;
|
|
21
|
+
msg?: MsgModel;
|
|
20
22
|
newsletterJid: string;
|
|
21
23
|
type: string;
|
|
24
|
+
editType?: 'media' | 'text';
|
|
22
25
|
}): Promise<{
|
|
23
26
|
ack: {
|
|
24
27
|
t: number;
|