@wppconnect/wa-js 3.15.1 → 3.16.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 +6 -1
- package/dist/assert/assertColor.d.ts +4 -4
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/sendCatalogMessage.d.ts +43 -0
- package/dist/whatsapp/functions/contactFunctions.d.ts +4 -0
- package/dist/whatsapp/misc/Wid.d.ts +1 -0
- package/dist/whatsapp/models/ContactModel.d.ts +5 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# 3.16.0 (2024-12-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Added WPP.chat.sendCatalogMessage (close [#2550](https://github.com/wppconnect-team/wa-js/issues/2550)) ([95e0592](https://github.com/wppconnect-team/wa-js/commit/95e05923d15af4ef5e9eee2cf6d98bae380a2f9c))
|
|
2
7
|
|
|
3
8
|
|
|
4
9
|
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { WPPError } from '../util';
|
|
17
17
|
export declare class InvalidColor extends WPPError {
|
|
18
|
-
readonly color?:
|
|
18
|
+
readonly color?: string | number | {
|
|
19
19
|
_serialized: string;
|
|
20
|
-
}
|
|
21
|
-
constructor(color?:
|
|
20
|
+
} | undefined;
|
|
21
|
+
constructor(color?: string | number | {
|
|
22
22
|
_serialized: string;
|
|
23
|
-
}
|
|
23
|
+
} | undefined);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Return the color in positive decimal
|
|
@@ -56,6 +56,7 @@ export { LinkPreviewOptions, prepareLinkPreview } from './prepareLinkPreview';
|
|
|
56
56
|
export { MessageButtonsOptions, prepareMessageButtons, } from './prepareMessageButtons';
|
|
57
57
|
export { prepareRawMessage } from './prepareRawMessage';
|
|
58
58
|
export { requestPhoneNumber } from './requestPhoneNumber';
|
|
59
|
+
export { sendCatalogMessage } from './sendCatalogMessage';
|
|
59
60
|
export { OrderItems, OrderMessageOptions, sendChargeMessage, } from './sendChargeMessage';
|
|
60
61
|
export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
|
|
61
62
|
export { sendEventMessage } from './sendEventMessage';
|
|
@@ -0,0 +1,43 @@
|
|
|
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 '../../whatsapp';
|
|
17
|
+
import { SendMessageOptions, SendMessageReturn } from '..';
|
|
18
|
+
export interface CatalogMessageOptions extends SendMessageOptions {
|
|
19
|
+
jpegThumbnail?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
textMessage?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Send catalog message
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```javascript
|
|
29
|
+
* WPP.chat.sendCatalogMessage(
|
|
30
|
+
* '[number]@c.us',
|
|
31
|
+
* '[number]@c.us',
|
|
32
|
+
* {
|
|
33
|
+
* title: 'My Catalog',
|
|
34
|
+
* description: 'This is my catalog',
|
|
35
|
+
* textMessage: 'Check out my catalog',
|
|
36
|
+
* jpegThumbnail: 'data:image/jpeg;base64,...'
|
|
37
|
+
* }
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @category Message
|
|
42
|
+
*/
|
|
43
|
+
export declare function sendCatalogMessage(chatToSend: string | Wid, chatFromCatalog: string | Wid, opts: CatalogMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -58,6 +58,10 @@ export declare function getIsGroup(contact: ContactModel): any;
|
|
|
58
58
|
* @whatsapp 660666 >= 2.2327.4
|
|
59
59
|
*/
|
|
60
60
|
export declare function getIsBroadcast(contact: ContactModel): any;
|
|
61
|
+
/**
|
|
62
|
+
* @whatsapp 660666 >= 2.2327.4
|
|
63
|
+
*/
|
|
64
|
+
export declare function getIsNewsletter(contact: ContactModel): any;
|
|
61
65
|
/**
|
|
62
66
|
* @whatsapp 660666 >= 2.2327.4
|
|
63
67
|
*/
|