@wppconnect/wa-js 2.26.1 → 2.28.0
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 +1 -1
- package/dist/chat/functions/get.d.ts +1 -1
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/sendFileMessage.d.ts +4 -5
- package/dist/chat/functions/sendScheduledCallMessage.d.ts +40 -0
- package/dist/chat/types.d.ts +12 -0
- package/dist/conn/functions/genLinkDeviceCodeForPhoneNumber.d.ts +30 -0
- package/dist/conn/functions/index.d.ts +1 -0
- package/dist/contact/functions/getCommonGroups.d.ts +27 -0
- package/dist/contact/functions/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/newsletter/functions/create.d.ts +42 -0
- package/dist/newsletter/functions/destroy.d.ts +26 -0
- package/dist/newsletter/functions/edit.d.ts +58 -0
- package/dist/newsletter/functions/ensureNewsletter.d.ts +17 -0
- package/dist/newsletter/functions/index.d.ts +19 -0
- package/dist/newsletter/functions/mute.d.ts +33 -0
- package/dist/newsletter/index.d.ts +16 -0
- package/dist/webpack/index.d.ts +1 -0
- package/dist/whatsapp/functions/createFanoutMsgStanza.d.ts +1 -1
- package/dist/whatsapp/functions/createNewsletterQuery.d.ts +23 -0
- package/dist/whatsapp/functions/deleteNewsletter.d.ts +19 -0
- package/dist/whatsapp/functions/editNewsletterMetadataAction.d.ts +28 -0
- package/dist/whatsapp/functions/encryptAndSendMsg.d.ts +13 -1
- package/dist/whatsapp/functions/encryptAndSendSenderKeyMsg.d.ts +34 -0
- package/dist/whatsapp/functions/findCommonGroups.d.ts +21 -0
- package/dist/whatsapp/functions/genLinkDeviceCodeForPhoneNumber.d.ts +19 -0
- package/dist/whatsapp/functions/index.d.ts +14 -0
- package/dist/whatsapp/functions/initializeAltDeviceLinking.d.ts +19 -0
- package/dist/whatsapp/functions/msgDataFromMsgModel.d.ts +19 -0
- package/dist/whatsapp/functions/muteNewsletter.d.ts +19 -0
- package/dist/whatsapp/functions/queryNewsletterMetadataByJid.d.ts +32 -0
- package/dist/whatsapp/functions/sendNewsletterMessageJob.d.ts +28 -0
- package/dist/whatsapp/functions/unmuteNewsletter.d.ts +19 -0
- package/dist/whatsapp/functions/updateNewsletterMsgRecord.d.ts +20 -0
- package/dist/whatsapp/functions/uploadMedia.d.ts +19 -0
- package/dist/whatsapp/models/ChatModel.d.ts +1 -0
- package/dist/whatsapp/models/MsgModel.d.ts +1 -0
- package/dist/whatsapp/stores.d.ts +5 -1
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +22 -22
package/CHANGELOG.md
CHANGED
|
@@ -59,6 +59,7 @@ export { LocationMessageOptions, sendLocationMessage, } from './sendLocationMess
|
|
|
59
59
|
export { sendOrderMessage } from './sendOrderMessage';
|
|
60
60
|
export { sendRawMessage } from './sendRawMessage';
|
|
61
61
|
export { sendReactionToMessage } from './sendReactionToMessage';
|
|
62
|
+
export { sendScheduledCallMessage } from './sendScheduledCallMessage';
|
|
62
63
|
export { sendTextMessage, TextMessageOptions } from './sendTextMessage';
|
|
63
64
|
export { sendVCardContactMessage, VCardContact, } from './sendVCardContactMessage';
|
|
64
65
|
export { starMessage, StarMessageReturn } from './starMessage';
|
|
@@ -73,9 +73,6 @@ export interface AudioMessageOptions extends FileMessageOptions {
|
|
|
73
73
|
*/
|
|
74
74
|
waveform?: boolean;
|
|
75
75
|
}
|
|
76
|
-
export interface PushToVideoMessageOptions extends FileMessageOptions {
|
|
77
|
-
type: 'ptv';
|
|
78
|
-
}
|
|
79
76
|
export interface DocumentMessageOptions extends FileMessageOptions, MessageButtonsOptions {
|
|
80
77
|
type: 'document';
|
|
81
78
|
}
|
|
@@ -89,6 +86,7 @@ export interface StickerMessageOptions extends FileMessageOptions {
|
|
|
89
86
|
export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsOptions {
|
|
90
87
|
type: 'video';
|
|
91
88
|
isGif?: boolean;
|
|
89
|
+
isPtv?: boolean;
|
|
92
90
|
}
|
|
93
91
|
/**
|
|
94
92
|
* Send a file message, that can be an audio, document, image, sticker or video
|
|
@@ -172,11 +170,12 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
172
170
|
* '[number]@c.us',
|
|
173
171
|
* 'data:application/msword;base64,<a long base64 file...>',
|
|
174
172
|
* {
|
|
175
|
-
* type: '
|
|
173
|
+
* type: 'video',
|
|
174
|
+
* isPtv: true,
|
|
176
175
|
* }
|
|
177
176
|
* );
|
|
178
177
|
* ```
|
|
179
178
|
* @category Message
|
|
180
179
|
* @return {SendMessageReturn} The result
|
|
181
180
|
*/
|
|
182
|
-
export declare function sendFileMessage(chatId: any, content: string | Blob | File, options: AutoDetectMessageOptions | AudioMessageOptions | DocumentMessageOptions | ImageMessageOptions | VideoMessageOptions | StickerMessageOptions
|
|
181
|
+
export declare function sendFileMessage(chatId: any, content: string | Blob | File, options: AutoDetectMessageOptions | AudioMessageOptions | DocumentMessageOptions | ImageMessageOptions | VideoMessageOptions | StickerMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
import { SendMessageOptions, SendMessageReturn } from '..';
|
|
17
|
+
export declare enum SCHEDULED_CALL_TYPE {
|
|
18
|
+
UNKNOWN = 0,
|
|
19
|
+
VOICE = 1,
|
|
20
|
+
VIDEO = 2
|
|
21
|
+
}
|
|
22
|
+
export interface ScheduledCallMessageOptions extends SendMessageOptions {
|
|
23
|
+
scheduledTimestampMs: number | string;
|
|
24
|
+
callType: 'video' | 'voice' | SCHEDULED_CALL_TYPE;
|
|
25
|
+
title: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Send a scheduled call message
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```javascript
|
|
32
|
+
* WPP.chat.sendScheduledCallMessage('[number]@c.us', {
|
|
33
|
+
* title: "Title of event"
|
|
34
|
+
* callType: 'voice'
|
|
35
|
+
* scheduledTimestampMs: 1696084222000
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
* @category Message
|
|
39
|
+
*/
|
|
40
|
+
export declare function sendScheduledCallMessage(chatId: any, options: ScheduledCallMessageOptions): Promise<SendMessageReturn>;
|
package/dist/chat/types.d.ts
CHANGED
|
@@ -95,6 +95,18 @@ export interface SendMessageOptions {
|
|
|
95
95
|
* ```
|
|
96
96
|
*/
|
|
97
97
|
waitForAck?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Delay some time (in ms) before sending message
|
|
100
|
+
* While delaying, Typing Status is used to look like a human interaction
|
|
101
|
+
* @default 0
|
|
102
|
+
* @example
|
|
103
|
+
* ```javascript
|
|
104
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'Delay with typing', {
|
|
105
|
+
* delay: 4000
|
|
106
|
+
* })
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
delay?: number;
|
|
98
110
|
}
|
|
99
111
|
export interface SendMessageReturn {
|
|
100
112
|
id: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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
|
+
* Alternative login method using code
|
|
18
|
+
* Get the Link Device Code for Authentication using the phone number
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* const code = await WPP.conn.genLinkDeviceCodeForPhoneNumber('[number]');
|
|
23
|
+
*
|
|
24
|
+
* // Disable push notification
|
|
25
|
+
* const code = await WPP.conn.genLinkDeviceCodeForPhoneNumber('[number]', false);
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @category Conn
|
|
29
|
+
*/
|
|
30
|
+
export declare function genLinkDeviceCodeForPhoneNumber(phone: string, sendPushNotification?: boolean): Promise<string>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
export { genLinkDeviceCodeForPhoneNumber } from './genLinkDeviceCodeForPhoneNumber';
|
|
16
17
|
export { getAuthCode } from './getAuthCode';
|
|
17
18
|
export { getHistorySyncProgress, HistorySyncProgress, } from './getHistorySyncProgress';
|
|
18
19
|
export { getMyDeviceId } from './getMyDeviceId';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Get all commons groups for the contact
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* const groups_ids = await WPP.contact.getCommonGroups('[number]@c.us');
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @category Contact
|
|
26
|
+
*/
|
|
27
|
+
export declare function getCommonGroups(wid: Wid | string): Promise<Wid[]>;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export { getBusinessProfile } from './getBusinessProfile';
|
|
17
|
+
export { getCommonGroups } from './getCommonGroups';
|
|
17
18
|
export { getProfilePictureUrl } from './getProfilePictureUrl';
|
|
18
19
|
export { getStatus } from './getStatus';
|
|
19
20
|
export { ContactListOptions, list } from './list';
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * as labels from './labels';
|
|
|
33
33
|
export * as profile from './profile';
|
|
34
34
|
export * as status from './status';
|
|
35
35
|
export * as util from './util';
|
|
36
|
+
export * as newsletter from './newsletter';
|
|
36
37
|
export * as whatsapp from './whatsapp';
|
|
37
38
|
export * as order from './order';
|
|
38
39
|
export { emit, emitAsync, eventNames, getMaxListeners, hasListeners, listenTo, listenerCount, listeners, listenersAny, many, off, offAny, on, onAny, once, prependAny, prependListener, prependMany, prependOnceListener, removeAllListeners, removeListener, setMaxListeners, stopListeningTo, waitFor, } from './eventEmitter';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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
|
+
export interface ResultCreateNewsletter {
|
|
17
|
+
idJid: string;
|
|
18
|
+
inviteCode: string;
|
|
19
|
+
inviteLink: string;
|
|
20
|
+
name: string;
|
|
21
|
+
state: string;
|
|
22
|
+
subscribersCount: number;
|
|
23
|
+
description: string | null;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Create a newsletter
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```javascript
|
|
31
|
+
* // To edit name
|
|
32
|
+
* WPP.newsletter.create('Name for your newsletter', {
|
|
33
|
+
* description: 'Description for that',
|
|
34
|
+
* picture: '<base64_string',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
* @category Newsletter
|
|
38
|
+
*/
|
|
39
|
+
export declare function create(name: string, opts: {
|
|
40
|
+
description?: string;
|
|
41
|
+
picture?: string;
|
|
42
|
+
}): Promise<ResultCreateNewsletter>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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
|
+
* Delete a newsletter
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* const code = WPP.newsletter.destroy('[newsletter-id]@newsletter');
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @category Newsletter
|
|
25
|
+
*/
|
|
26
|
+
export declare function destroy(id: string): Promise<boolean>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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
|
+
export interface ResultCreateNewsletter {
|
|
17
|
+
idJid: string;
|
|
18
|
+
inviteCode: string;
|
|
19
|
+
inviteLink: string;
|
|
20
|
+
name: string;
|
|
21
|
+
state: string;
|
|
22
|
+
subscribersCount: number;
|
|
23
|
+
description: string | null;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Edit the newsletter data
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```javascript
|
|
31
|
+
* // To edit name
|
|
32
|
+
* const code = WPP.newsletter.edit('[newsletter-id]@newsletter', {
|
|
33
|
+
* name: 'New Name'
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* // To edit description
|
|
37
|
+
* const code = WPP.newsletter.edit('[newsletter-id]@newsletter', {
|
|
38
|
+
* description: 'New description'
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* // To change picture
|
|
42
|
+
* const code = WPP.newsletter.edit('[newsletter-id]@newsletter', {
|
|
43
|
+
* picture: '<base64_image>'
|
|
44
|
+
* });
|
|
45
|
+
*
|
|
46
|
+
* // To remove picture
|
|
47
|
+
* const code = WPP.newsletter.edit('[newsletter-id]@newsletter', {
|
|
48
|
+
* picture: null
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @category Newsletter
|
|
53
|
+
*/
|
|
54
|
+
export declare function edit(newsletterId: string, opts: {
|
|
55
|
+
name?: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
picture?: string;
|
|
58
|
+
}): Promise<ResultCreateNewsletter>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { Wid } from '../../whatsapp';
|
|
17
|
+
export declare function ensureNewsletter(newsletterId: string | Wid): Promise<import("../../whatsapp").ChatModel>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 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
|
+
export { create } from './create';
|
|
17
|
+
export { destroy } from './destroy';
|
|
18
|
+
export { edit } from './edit';
|
|
19
|
+
export { mute } from './mute';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 { ChatModel } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Mute and unmute a newsletter
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Mute
|
|
22
|
+
* ```javascript
|
|
23
|
+
* WPP.newsletter.mute('[newsletter-id]@newsletter', true);
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* // Unmute
|
|
27
|
+
* ```javascript
|
|
28
|
+
* WPP.newsletter.mute('[newsletter-id]@newsletter', false);
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @category Newsletter
|
|
32
|
+
*/
|
|
33
|
+
export declare function mute(newsletterId: string, value?: boolean): Promise<ChatModel>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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
|
+
export * from './functions';
|
package/dist/webpack/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare let isReady: boolean;
|
|
|
27
27
|
export declare let isFullReady: boolean;
|
|
28
28
|
export declare function onInjected(listener: () => void, delay?: number): void;
|
|
29
29
|
export declare function onReady(listener: () => void, delay?: number): void;
|
|
30
|
+
export declare function onFullReady(listener: () => void, delay?: number): void;
|
|
30
31
|
export type SearchModuleCondition = (module: any, moduleId: string) => boolean;
|
|
31
32
|
export declare let webpackRequire: (<T = any>(moduleId: string) => T) & {
|
|
32
33
|
/**
|
|
@@ -17,7 +17,7 @@ import { MsgModel, websocket, Wid } from '..';
|
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
|
-
export declare function createFanoutMsgStanza(msg: MsgModel, proto: {
|
|
20
|
+
export declare function createFanoutMsgStanza(msg: MsgModel, data: any, proto: {
|
|
21
21
|
[key: string]: any;
|
|
22
22
|
}, devices: Wid[], options: {
|
|
23
23
|
[key: string]: any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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
|
+
* @whatsapp 874705
|
|
18
|
+
*/
|
|
19
|
+
export declare function createNewsletterQuery(opts: {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string | null;
|
|
22
|
+
picture: string | null;
|
|
23
|
+
}): any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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
|
+
* @whatsapp 698436
|
|
18
|
+
*/
|
|
19
|
+
export declare function deleteNewsletter(id: string): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 { ChatModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 172365
|
|
19
|
+
*/
|
|
20
|
+
export declare function editNewsletterMetadataAction(newsletter: ChatModel, editAtts: {
|
|
21
|
+
editName?: boolean;
|
|
22
|
+
editDescription?: boolean;
|
|
23
|
+
editPicture?: boolean;
|
|
24
|
+
}, data: {
|
|
25
|
+
name?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
picture?: string | null;
|
|
28
|
+
}): any;
|
|
@@ -13,10 +13,22 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { MsgKey, Wid } from '../misc';
|
|
16
17
|
import { MsgModel } from '../models';
|
|
17
18
|
/**
|
|
18
19
|
* @whatsapp 95547
|
|
19
20
|
* @whatsapp 695547 >= 2.2222.8
|
|
20
21
|
* @whatsapp 925080 >= 2.2228.4
|
|
21
22
|
*/
|
|
22
|
-
export declare function encryptAndSendMsg(
|
|
23
|
+
export declare function encryptAndSendMsg(msg: {
|
|
24
|
+
type: string;
|
|
25
|
+
data: MsgModel;
|
|
26
|
+
}, data: {
|
|
27
|
+
ack: number;
|
|
28
|
+
author?: Wid;
|
|
29
|
+
from: Wid;
|
|
30
|
+
id: MsgKey;
|
|
31
|
+
subtype?: string;
|
|
32
|
+
to: Wid;
|
|
33
|
+
type: string;
|
|
34
|
+
}, report: any): Promise<any>;
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
import { MsgKey, Wid } from '../misc';
|
|
17
|
+
import { MsgModel } from '../models';
|
|
18
|
+
/**
|
|
19
|
+
* @whatsapp 95547
|
|
20
|
+
* @whatsapp 695547 >= 2.2222.8
|
|
21
|
+
* @whatsapp 925080 >= 2.2228.4
|
|
22
|
+
*/
|
|
23
|
+
export declare function encryptAndSendSenderKeyMsg(msg: {
|
|
24
|
+
type: string;
|
|
25
|
+
data: MsgModel;
|
|
26
|
+
}, data: {
|
|
27
|
+
ack: number;
|
|
28
|
+
author?: Wid;
|
|
29
|
+
from: Wid;
|
|
30
|
+
id: MsgKey;
|
|
31
|
+
subtype?: string;
|
|
32
|
+
to: Wid;
|
|
33
|
+
type: string;
|
|
34
|
+
}, proto: any, skGroup: any, options: any, report: any, other: any): Promise<any>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 { BaseCollection } from '../collections';
|
|
17
|
+
import { ChatModel, ContactModel } from '../models';
|
|
18
|
+
/**
|
|
19
|
+
* @whatsapp 714574
|
|
20
|
+
*/
|
|
21
|
+
export declare function findCommonGroups(wid: ContactModel): Promise<BaseCollection<ChatModel>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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
|
+
* @whatsapp 61777
|
|
18
|
+
*/
|
|
19
|
+
export declare function genLinkDeviceCodeForPhoneNumber(phone: string, pushNotification: boolean): Promise<string>;
|