@wppconnect/wa-js 2.1.0 → 2.1.3
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 +22 -0
- package/dist/chat/functions/getMessageById.d.ts +0 -2
- package/dist/chat/functions/sendFileMessage.d.ts +1 -0
- package/dist/chat/functions/sendListMessage.d.ts +6 -2
- package/dist/labels/types.d.ts +1 -0
- package/dist/whatsapp/collections/LabelCollection.d.ts +2 -4
- package/dist/whatsapp/misc/MediaPrep.d.ts +2 -1
- package/dist/whatsapp/models/LabelModel.d.ts +5 -4
- package/dist/whatsapp/models/MsgModel.d.ts +2 -0
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 2.1.3 (2022-04-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## 2.1.2 (2022-04-29)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* Added missing footer and title option for WPP.chat.sendListMessage ([19401b3](https://github.com/wppconnect-team/wa-js/commit/19401b3a9e13ef8f1869355a30feea0fb3092da6))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 2.1.1 (2022-04-27)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* Added missing footer option for WPP.chat.sendFileMessage ([623c57f](https://github.com/wppconnect-team/wa-js/commit/623c57fe0460437663519148c7201885c1354a84))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
1
23
|
# 2.1.0 (2022-04-27)
|
|
2
24
|
|
|
3
25
|
|
|
@@ -31,5 +31,3 @@ import { MsgKey, MsgModel } from '../../whatsapp';
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function getMessageById(id: string | MsgKey): Promise<MsgModel>;
|
|
33
33
|
export declare function getMessageById(ids: (string | MsgKey)[]): Promise<MsgModel[]>;
|
|
34
|
-
export declare function getMessageById(notUsed: any, id: string): Promise<MsgModel>;
|
|
35
|
-
export declare function getMessageById(notUsed: any, ids: string[]): Promise<MsgModel[]>;
|
|
@@ -17,6 +17,8 @@ import { SendMessageOptions, SendMessageReturn } from '..';
|
|
|
17
17
|
export interface ListMessageOptions extends SendMessageOptions {
|
|
18
18
|
buttonText: string;
|
|
19
19
|
description: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
footer?: string;
|
|
20
22
|
sections: Array<{
|
|
21
23
|
title: string;
|
|
22
24
|
rows: Array<{
|
|
@@ -32,8 +34,10 @@ export interface ListMessageOptions extends SendMessageOptions {
|
|
|
32
34
|
* @example
|
|
33
35
|
* ```javascript
|
|
34
36
|
* WPP.chat.sendListMessage('[number]@c.us', {
|
|
35
|
-
* buttonText: 'Click Me!',
|
|
36
|
-
* description: "Hello it's list message",
|
|
37
|
+
* buttonText: 'Click Me!', //required
|
|
38
|
+
* description: "Hello it's list message", //required
|
|
39
|
+
* title: 'Hello user', //optional
|
|
40
|
+
* footer: 'Click and choose one', //optional
|
|
37
41
|
* sections: [{
|
|
38
42
|
* title: 'Section 1',
|
|
39
43
|
* rows: [{
|
package/dist/labels/types.d.ts
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ChatModel, LabelModel } from '../models';
|
|
17
|
-
import {
|
|
17
|
+
import { BaseCollection } from './BaseCollection';
|
|
18
18
|
/** @whatsapp 16770 */
|
|
19
|
-
export declare class LabelCollection extends
|
|
19
|
+
export declare class LabelCollection extends BaseCollection<LabelModel> {
|
|
20
20
|
static model: LabelModel;
|
|
21
21
|
static staleCollection?: any;
|
|
22
22
|
static resumeOnAvailable?: any;
|
|
@@ -31,8 +31,6 @@ export declare class LabelCollection extends Collection<LabelModel> {
|
|
|
31
31
|
getNewLabelColor(): any;
|
|
32
32
|
getLabelColorPalette(): any;
|
|
33
33
|
handleRemove(e?: any): any;
|
|
34
|
-
onResume(): any;
|
|
35
|
-
sync(e?: any): any;
|
|
36
34
|
updateChecksum(e?: any): any;
|
|
37
35
|
getLabelsForModel(e?: any, t?: any): any;
|
|
38
36
|
_find(): any;
|
|
@@ -29,9 +29,10 @@ export declare namespace MediaPrep {
|
|
|
29
29
|
constructor(type: OUTWARD_TYPES, p: any);
|
|
30
30
|
sendToChat(e: ChatModel, options: {
|
|
31
31
|
caption?: string;
|
|
32
|
+
footer?: string;
|
|
32
33
|
quotedMsg?: MsgModel;
|
|
33
34
|
productMsgOptions?: ModelPropertiesContructor<MsgModel>;
|
|
34
|
-
type?:
|
|
35
|
+
type?: null | string;
|
|
35
36
|
mentionedJidList?: any;
|
|
36
37
|
isForwarded?: boolean;
|
|
37
38
|
forwardingScore?: any;
|
|
@@ -15,16 +15,17 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
|
|
17
17
|
interface Props {
|
|
18
|
-
id
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
colorIndex?: number;
|
|
21
|
+
color?: number;
|
|
21
22
|
count?: any;
|
|
22
23
|
}
|
|
23
24
|
interface Session {
|
|
24
25
|
stale?: any;
|
|
25
26
|
}
|
|
26
27
|
interface Derived {
|
|
27
|
-
hexColor
|
|
28
|
+
hexColor: string;
|
|
28
29
|
}
|
|
29
30
|
/** @whatsapp 8803 */
|
|
30
31
|
export declare interface LabelModel extends ModelProxy<Props, Session, Derived> {
|