talkyzap-wapp-api 1.0.5 → 1.0.6

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 CHANGED
@@ -1,4 +1,9 @@
1
- ## 3.9.1 (2024-09-05)
1
+ ## 3.10.1 (2024-09-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Fixed buttons for non beta user ([fbbf094](https://github.com/wppconnect-team/wa-js/commit/fbbf0948c93cb9ec19ac8a1c85f24c44d94824a5))
2
7
 
3
8
 
4
9
 
@@ -17,7 +17,7 @@ import { Wid } from '../../whatsapp';
17
17
  import { SendMsgResult } from '../../whatsapp/enums';
18
18
  export interface DeleteMessageReturn {
19
19
  id: string;
20
- sendMsgResult: Promise<SendMsgResult>;
20
+ sendMsgResult: SendMsgResult;
21
21
  isRevoked: boolean;
22
22
  isDeleted: boolean;
23
23
  isSentByMe: boolean;
@@ -39,10 +39,4 @@ export interface DeleteMessageReturn {
39
39
  *
40
40
  * @category Message
41
41
  */
42
- export declare function deleteMessage(chatId: string | Wid, id: string, deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn>;
43
- /**
44
- * Delete a list of messages
45
- *
46
- * @category Message
47
- */
48
- export declare function deleteMessage(chatId: string | Wid, ids: string[], deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn[]>;
42
+ export declare function deleteMessage(chatId: string | Wid, ids: string | string[], deleteMediaInDevice?: boolean, revoke?: boolean): Promise<DeleteMessageReturn | DeleteMessageReturn[]>;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
2
+ * Copyright 2024 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.
@@ -23,6 +23,9 @@ export type MessageButtonsTypes = {
23
23
  } | {
24
24
  url: string;
25
25
  text: string;
26
+ } | {
27
+ code: string;
28
+ text: string;
26
29
  };
27
30
  export interface MessageButtonsOptions {
28
31
  /**
@@ -33,17 +36,6 @@ export interface MessageButtonsOptions {
33
36
  * Title for buttons, only for text message
34
37
  */
35
38
  title?: string;
36
- /**
37
- * Set to use template buttons instead of reply buttons.
38
- * @default: undefined - auto detect
39
- * @deprecated
40
- */
41
- useTemplateButtons?: boolean | null;
42
- /**
43
- * Set to use interactive message instead of reply buttons.
44
- * @default: undefined - auto detect
45
- */
46
- useInteractiveMessage?: boolean | null;
47
39
  /**
48
40
  * Footer text for buttons
49
41
  */
@@ -25,6 +25,7 @@ export type TextMessageOptions = SendMessageOptions & MessageButtonsOptions & Li
25
25
  * });
26
26
  *
27
27
  * // With Buttons
28
+ * // Attention: The buttons are an alternative solution we found to make it work. There is no guarantee that they will continue functioning, or when they might stop: The only certainty is: They will stop, so use them responsibly.
28
29
  * WPP.chat.sendTextMessage('[number]@c.us', 'Hello', {
29
30
  * useInteractiveMessage: true, // False for legacy
30
31
  * buttons: [
@@ -41,7 +42,7 @@ export type TextMessageOptions = SendMessageOptions & MessageButtonsOptions & Li
41
42
  * text: 'Some text'
42
43
  * },
43
44
  * {
44
- * id: 'another id 2',
45
+ * code: '789890',
45
46
  * text: 'Another text'
46
47
  * }
47
48
  * ],
@@ -22,3 +22,11 @@ export declare function createFanoutMsgStanza(msg: MsgModel, data: any, proto: {
22
22
  }, devices: Wid[], options: {
23
23
  [key: string]: any;
24
24
  }): Promise<websocket.WapNode>;
25
+ export declare function createFanoutMsgStanza(message: {
26
+ type: string;
27
+ data: MsgModel;
28
+ }, proto: {
29
+ [key: string]: any;
30
+ }, devices: Wid[], options: {
31
+ [key: string]: any;
32
+ }, reporter: any, groupData?: any): Promise<websocket.WapNode>;