@wppconnect/wa-js 2.26.1 → 2.27.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/dist/chat/functions/get.d.ts +1 -1
  3. package/dist/chat/functions/index.d.ts +1 -0
  4. package/dist/chat/functions/sendFileMessage.d.ts +4 -5
  5. package/dist/chat/functions/sendScheduledCallMessage.d.ts +40 -0
  6. package/dist/chat/types.d.ts +12 -0
  7. package/dist/index.d.ts +1 -0
  8. package/dist/newsletter/functions/create.d.ts +42 -0
  9. package/dist/newsletter/functions/destroy.d.ts +26 -0
  10. package/dist/newsletter/functions/edit.d.ts +58 -0
  11. package/dist/newsletter/functions/ensureNewsletter.d.ts +17 -0
  12. package/dist/newsletter/functions/index.d.ts +19 -0
  13. package/dist/newsletter/functions/mute.d.ts +33 -0
  14. package/dist/newsletter/index.d.ts +16 -0
  15. package/dist/webpack/index.d.ts +1 -0
  16. package/dist/whatsapp/functions/createNewsletterQuery.d.ts +23 -0
  17. package/dist/whatsapp/functions/deleteNewsletter.d.ts +19 -0
  18. package/dist/whatsapp/functions/editNewsletterMetadataAction.d.ts +28 -0
  19. package/dist/whatsapp/functions/encryptAndSendMsg.d.ts +13 -1
  20. package/dist/whatsapp/functions/encryptAndSendSenderKeyMsg.d.ts +34 -0
  21. package/dist/whatsapp/functions/index.d.ts +11 -0
  22. package/dist/whatsapp/functions/msgDataFromMsgModel.d.ts +19 -0
  23. package/dist/whatsapp/functions/muteNewsletter.d.ts +19 -0
  24. package/dist/whatsapp/functions/queryNewsletterMetadataByJid.d.ts +32 -0
  25. package/dist/whatsapp/functions/sendNewsletterMessageJob.d.ts +28 -0
  26. package/dist/whatsapp/functions/unmuteNewsletter.d.ts +19 -0
  27. package/dist/whatsapp/functions/updateNewsletterMsgRecord.d.ts +20 -0
  28. package/dist/whatsapp/functions/uploadMedia.d.ts +19 -0
  29. package/dist/whatsapp/models/ChatModel.d.ts +1 -0
  30. package/dist/whatsapp/models/MsgModel.d.ts +1 -0
  31. package/dist/whatsapp/stores.d.ts +5 -1
  32. package/dist/wppconnect-wa.js +1 -1
  33. package/package.json +16 -16
package/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## 2.26.1 (2023-09-13)
1
+ # 2.27.0 (2023-10-08)
2
+
3
+
4
+ ### Features
5
+
6
+ * Added newsletter functions (close [#1365](https://github.com/wppconnect-team/wa-js/issues/1365)) ([#1386](https://github.com/wppconnect-team/wa-js/issues/1386)) ([b0bab71](https://github.com/wppconnect-team/wa-js/commit/b0bab717f9370a0be9767c6500df697cce083415))
2
7
 
3
8
 
4
9
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
2
+ * Copyright 2023 WPPConnect Team
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -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: 'ptv',
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 | PushToVideoMessageOptions): Promise<SendMessageReturn>;
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>;
@@ -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;
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';
@@ -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
  /**
@@ -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(message: MsgModel): Promise<any>;
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>;
@@ -26,12 +26,16 @@ export * from './contactFunctions';
26
26
  export * from './createFanoutMsgStanza';
27
27
  export * from './createGroup';
28
28
  export * from './createMsgProtobuf';
29
+ export * from './createNewsletterQuery';
29
30
  export * from './createOrUpdateReactions';
30
31
  export * from './currencyForCountryShortcode';
32
+ export * from './deleteNewsletter';
31
33
  export * from './editBusinessProfile';
34
+ export * from './editNewsletterMetadataAction';
32
35
  export * from './encodeMaybeMediaType';
33
36
  export * from './encryptAndSendGroupMsg';
34
37
  export * from './encryptAndSendMsg';
38
+ export * from './encryptAndSendSenderKeyMsg';
35
39
  export * from './encryptMsgProtobuf';
36
40
  export * from './fetchLinkPreview';
37
41
  export * from './findChat';
@@ -69,7 +73,9 @@ export * from './joinGroupViaInvite';
69
73
  export * from './markSeen';
70
74
  export * from './mediaTypeFromProtobuf';
71
75
  export * from './membershipApprovalRequestAction';
76
+ export * from './msgDataFromMsgModel';
72
77
  export * from './msgFindQuery';
78
+ export * from './muteNewsletter';
73
79
  export * from './processRawAudioVideo';
74
80
  export * from './processRawMedia';
75
81
  export * from './processRawSticker';
@@ -78,6 +84,7 @@ export * from './productVisibilitySet';
78
84
  export * from './profilePic';
79
85
  export * from './queryAllGroups';
80
86
  export * from './queryGroupInviteCode';
87
+ export * from './queryNewsletterMetadataByJid';
81
88
  export * from './randomHex';
82
89
  export * from './randomId';
83
90
  export * from './resetGroupInviteCode';
@@ -88,6 +95,7 @@ export * from './sendDelete';
88
95
  export * from './sendExitGroup';
89
96
  export * from './sendGroupParticipants';
90
97
  export * from './sendJoinGroupViaInvite';
98
+ export * from './sendNewsletterMessageJob';
91
99
  export * from './sendQueryExists';
92
100
  export * from './sendQueryGroupInvite';
93
101
  export * from './sendQueryGroupInviteCode';
@@ -102,9 +110,12 @@ export * from './status';
102
110
  export * from './syncABPropsTask';
103
111
  export * from './typeAttributeFromProtobuf';
104
112
  export * from './unixTime';
113
+ export * from './unmuteNewsletter';
105
114
  export * from './updateCartEnabled';
106
115
  export * from './updateDBForGroupAction';
116
+ export * from './updateNewsletterMsgRecord';
107
117
  export * from './updateParticipants';
118
+ export * from './uploadMedia';
108
119
  export * from './uploadProductImage';
109
120
  export * from './uploadThumbnail';
110
121
  export * from './upsertVotes';
@@ -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
+ import { MsgModel } from '../models';
17
+ /** @whatsapp 678794
18
+ */
19
+ export declare function msgDataFromMsgModel(msg: MsgModel): Promise<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 736062
18
+ */
19
+ export declare function muteNewsletter(newsletterIds: string[]): Promise<boolean>;
@@ -0,0 +1,32 @@
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 657987
18
+ */
19
+ export declare function queryNewsletterMetadataByJid(jid: string, attributes: {
20
+ picture?: boolean;
21
+ subscribers?: boolean;
22
+ verification?: boolean;
23
+ description?: boolean;
24
+ inviteLink?: boolean;
25
+ name?: boolean;
26
+ creationTime?: boolean;
27
+ handle?: boolean;
28
+ privacy?: boolean;
29
+ linkedAccounts?: boolean;
30
+ membership?: boolean;
31
+ state?: boolean;
32
+ }): 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
+ /** @whatsapp 397995
17
+ */
18
+ export declare function sendNewsletterMessageJob(data: {
19
+ msgData: any;
20
+ newsletterJid: string;
21
+ type: string;
22
+ }): Promise<{
23
+ ack: {
24
+ t: number;
25
+ };
26
+ serverId: number;
27
+ success: boolean;
28
+ }>;