@wppconnect/wa-js 2.10.0 → 2.10.1

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 (36) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/chat/functions/prepareMessageButtons.d.ts +1 -1
  3. package/dist/whatsapp/contants/DROP_ATTR.d.ts +19 -0
  4. package/dist/whatsapp/contants/index.d.ts +16 -0
  5. package/dist/whatsapp/enums/CALL_STATES.d.ts +1 -0
  6. package/dist/whatsapp/enums/SendMsgResult.d.ts +1 -0
  7. package/dist/whatsapp/functions/addAndSendMsgToChat.d.ts +1 -0
  8. package/dist/whatsapp/functions/blockContact.d.ts +2 -0
  9. package/dist/whatsapp/functions/createMsgProtobuf.d.ts +1 -0
  10. package/dist/whatsapp/functions/encodeMaybeMediaType.d.ts +19 -0
  11. package/dist/whatsapp/functions/encryptAndSendGroupMsg.d.ts +1 -0
  12. package/dist/whatsapp/functions/encryptAndSendMsg.d.ts +1 -0
  13. package/dist/whatsapp/functions/fetchLinkPreview.d.ts +1 -0
  14. package/dist/whatsapp/functions/findChat.d.ts +1 -0
  15. package/dist/whatsapp/functions/genMinimalLinkPreview.d.ts +1 -0
  16. package/dist/whatsapp/functions/groupParticipants.d.ts +4 -0
  17. package/dist/whatsapp/functions/handleAck.d.ts +6 -0
  18. package/dist/whatsapp/functions/index.d.ts +1 -0
  19. package/dist/whatsapp/functions/markSeen.d.ts +7 -2
  20. package/dist/whatsapp/functions/mediaTypeFromProtobuf.d.ts +1 -0
  21. package/dist/whatsapp/functions/products.d.ts +4 -0
  22. package/dist/whatsapp/functions/randomHex.d.ts +1 -0
  23. package/dist/whatsapp/functions/sendCallSignalingMsg.d.ts +3 -1
  24. package/dist/whatsapp/functions/sendClear.d.ts +1 -0
  25. package/dist/whatsapp/functions/sendDelete.d.ts +1 -0
  26. package/dist/whatsapp/functions/sendExitGroup.d.ts +1 -0
  27. package/dist/whatsapp/functions/sendReactionToMsg.d.ts +1 -0
  28. package/dist/whatsapp/functions/sendTextMsgToChat.d.ts +1 -0
  29. package/dist/whatsapp/functions/setArchive.d.ts +1 -0
  30. package/dist/whatsapp/functions/setPin.d.ts +2 -0
  31. package/dist/whatsapp/functions/typeAttributeFromProtobuf.d.ts +1 -0
  32. package/dist/whatsapp/index.d.ts +1 -0
  33. package/dist/whatsapp/misc/ChatPresence.d.ts +1 -0
  34. package/dist/whatsapp/misc/Locale.d.ts +1 -0
  35. package/dist/wppconnect-wa.js +1 -1
  36. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ ## 2.10.1 (2022-08-09)
2
+
1
3
  # 2.10.0 (2022-08-04)
2
4
 
3
5
  # 2.9.0 (2022-07-31)
@@ -37,7 +37,7 @@ export interface MessageButtonsOptions {
37
37
  * Set to use template buttons instead of reply buttons.
38
38
  * @default: undefined - auto detect
39
39
  */
40
- useTemplateButtons?: boolean;
40
+ useTemplateButtons?: boolean | null;
41
41
  /**
42
42
  * Footer text for buttons
43
43
  */
@@ -0,0 +1,19 @@
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
+ /**
17
+ * @whatsapp 831914
18
+ */
19
+ export declare const DROP_ATTR: any;
@@ -0,0 +1,16 @@
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
+ export * from './DROP_ATTR';
@@ -16,6 +16,7 @@
16
16
  /**
17
17
  * @whatsapp 49835
18
18
  * @whatsapp 749835 >= 2.2222.8
19
+ * @whatsapp 873297 >= 2.2230.8
19
20
  */
20
21
  export declare enum CALL_STATES {
21
22
  INCOMING_RING = "INCOMING_RING",
@@ -15,6 +15,7 @@
15
15
  */
16
16
  /** @whatsapp 13705
17
17
  * @whatsapp 413705 >= 2.2222.8
18
+ * @whatsapp 20551 >= 2.2228.4
18
19
  */
19
20
  export declare enum SendMsgResult {
20
21
  OK = "OK",
@@ -17,5 +17,6 @@ import { SendMsgResult } from '../enums';
17
17
  import { ChatModel, ModelPropertiesContructor, MsgModel } from '../models';
18
18
  /** @whatsapp 75887
19
19
  * @whatsapp 975887 >= 2.2222.8
20
+ * @whatsapp 623631 >= 2.2228.4
20
21
  */
21
22
  export declare function addAndSendMsgToChat(chat: ChatModel, message: ModelPropertiesContructor<MsgModel>): Promise<[Promise<MsgModel>, Promise<SendMsgResult>]>;
@@ -16,9 +16,11 @@
16
16
  import { ContactModel } from '../models';
17
17
  /** @whatsapp 80140
18
18
  * @whatsapp 780140 >= 2.2222.8
19
+ * @whatsapp 48826 >= 2.2228.4
19
20
  */
20
21
  export declare function blockContact(contact: ContactModel): Promise<void>;
21
22
  /** @whatsapp 80140
22
23
  * @whatsapp 780140 >= 2.2222.8
24
+ * @whatsapp 48826 >= 2.2228.4
23
25
  */
24
26
  export declare function unblockContact(contact: ContactModel): Promise<void>;
@@ -16,6 +16,7 @@
16
16
  import { MsgModel } from '..';
17
17
  /** @whatsapp 6565
18
18
  * @whatsapp 606565 >= 2.2222.8
19
+ * @whatsapp 615947 >= 2.2228.4
19
20
  */
20
21
  export declare function createMsgProtobuf(e: MsgModel, t?: {
21
22
  [key: string]: any;
@@ -0,0 +1,19 @@
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
+ /**
17
+ * @whatsapp 760210
18
+ */
19
+ export declare function encodeMaybeMediaType(type: string): string | undefined;
@@ -17,5 +17,6 @@ import { MsgModel } from '../models';
17
17
  /**
18
18
  * @whatsapp 51974
19
19
  * @whatsapp 951974 >= 2.2222.8
20
+ * @whatsapp 677020 >= 2.2228.4
20
21
  */
21
22
  export declare function encryptAndSendGroupMsg(message: MsgModel, protobuf: any): Promise<any>;
@@ -17,5 +17,6 @@ import { MsgModel } from '../models';
17
17
  /**
18
18
  * @whatsapp 95547
19
19
  * @whatsapp 695547 >= 2.2222.8
20
+ * @whatsapp 925080 >= 2.2228.4
20
21
  */
21
22
  export declare function encryptAndSendMsg(message: MsgModel): Promise<any>;
@@ -28,5 +28,6 @@ export interface LinkPreviewResult {
28
28
  /** @whatsapp 19146
29
29
  * @whatsapp 75820 >= 2.2204.13
30
30
  * @whatsapp 519146 >= 2.2222.8
31
+ * @whatsapp 632590 >= 2.2228.4
31
32
  */
32
33
  export declare function fetchLinkPreview(url: string): Promise<null | LinkPreviewResult>;
@@ -17,5 +17,6 @@ import { Wid } from '..';
17
17
  import { ChatModel } from '../models';
18
18
  /** @whatsapp 50101
19
19
  * @whatsapp 650101 >= 2.2222.8
20
+ * @whatsapp 211739 >= 2.2228.4
20
21
  */
21
22
  export declare function findChat(wid: Wid): Promise<ChatModel>;
@@ -17,6 +17,7 @@ import { LinkPreviewResult } from './fetchLinkPreview';
17
17
  /**
18
18
  * @whatsapp 92375
19
19
  * @whatsapp 692375 >= 2.2222.8
20
+ * @whatsapp 321120 >= 2.2228.4
20
21
  */
21
22
  export declare function genMinimalLinkPreview(data: {
22
23
  anchor: undefined;
@@ -16,17 +16,21 @@
16
16
  import { ChatModel, ParticipantModel } from '..';
17
17
  /** @whatsapp 89389
18
18
  * @whatsapp 389389 >= 2.2222.8
19
+ * @whatsapp 815562 >= 2.2228.4
19
20
  */
20
21
  export declare function addParticipants(group: ChatModel, participants: ParticipantModel[]): Promise<void>;
21
22
  /** @whatsapp 89389
22
23
  * @whatsapp 389389 >= 2.2222.8
24
+ * @whatsapp 815562 >= 2.2228.4
23
25
  */
24
26
  export declare function removeParticipants(group: ChatModel, participants: ParticipantModel[]): Promise<void>;
25
27
  /** @whatsapp 89389
26
28
  * @whatsapp 389389 >= 2.2222.8
29
+ * @whatsapp 815562 >= 2.2228.4
27
30
  */
28
31
  export declare function promoteParticipants(group: ChatModel, participants: ParticipantModel[]): Promise<void>;
29
32
  /** @whatsapp 89389
30
33
  * @whatsapp 389389 >= 2.2222.8
34
+ * @whatsapp 815562 >= 2.2228.4
31
35
  */
32
36
  export declare function demoteParticipants(group: ChatModel, participants: ParticipantModel[]): Promise<void>;
@@ -31,29 +31,35 @@ export interface SimpleAckData {
31
31
  * @whatsapp 90756
32
32
  * @deprecated
33
33
  * @whatsapp 590756 >= 2.2222.8
34
+ * @whatsapp 585294 >= 2.2230.8
34
35
  */
35
36
  export declare function handleStatusSimpleAck(ackData: SimpleAckData): Promise<any>;
36
37
  /**
37
38
  * @whatsapp 48309
38
39
  * @deprecated
39
40
  * @whatsapp 648309 >= 2.2222.8
41
+ * @whatsapp 471873 >= 2.2230.8
40
42
  */
41
43
  export declare function handleChatSimpleAck(ackData: SimpleAckData): Promise<any>;
42
44
  /**
43
45
  * @whatsapp 84947
44
46
  * @deprecated
45
47
  * @whatsapp 284947 >= 2.2222.8
48
+ * @whatsapp 359554 >= 2.2230.8
46
49
  */
47
50
  export declare function handleGroupSimpleAck(ackData: SimpleAckData): Promise<any>;
48
51
  /** @whatsapp 90756
49
52
  * @whatsapp 590756 >= 2.2222.8
53
+ * @whatsapp 585294 >= 2.2230.8
50
54
  */
51
55
  export declare function handleStatusSimpleReceipt(ackData: SimpleAckData): Promise<any>;
52
56
  /** @whatsapp 48309
53
57
  * @whatsapp 648309 >= 2.2222.8
58
+ * @whatsapp 471873 >= 2.2230.8
54
59
  */
55
60
  export declare function handleChatSimpleReceipt(ackData: SimpleAckData): Promise<any>;
56
61
  /** @whatsapp 84947
57
62
  * @whatsapp 284947 >= 2.2222.8
63
+ * @whatsapp 359554 >= 2.2230.8
58
64
  */
59
65
  export declare function handleGroupSimpleReceipt(ackData: SimpleAckData): Promise<any>;
@@ -17,6 +17,7 @@ export * from './addAndSendMsgToChat';
17
17
  export * from './blockContact';
18
18
  export * from './createMsgProtobuf';
19
19
  export * from './createOrUpdateReactions';
20
+ export * from './encodeMaybeMediaType';
20
21
  export * from './encryptAndSendGroupMsg';
21
22
  export * from './encryptAndSendMsg';
22
23
  export * from './fetchLinkPreview';
@@ -14,12 +14,17 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { ChatModel, MsgModel } from '../models';
17
- /** @whatsapp 9609 */
17
+ /** @whatsapp 9609
18
+ * @whatsapp 561498 >= 2.2228.4
19
+ */
18
20
  export declare function markUnread(chat: ChatModel, whenAvailable: boolean): Promise<ChatModel>;
19
- /** @whatsapp 9609 */
21
+ /** @whatsapp 9609
22
+ * @whatsapp 561498 >= 2.2228.4
23
+ */
20
24
  export declare function sendSeen(chat: ChatModel, whenAvailable: boolean): Promise<ChatModel>;
21
25
  /** @whatsapp 30734
22
26
  * @whatsapp 730734 >= 2.2222.8
27
+ * @whatsapp 242050 >= 2.2228.4
23
28
  */
24
29
  export declare function markPlayed(msg: MsgModel): Promise<void>;
25
30
  /**
@@ -16,6 +16,7 @@
16
16
  /** @whatsapp 95318
17
17
  * @whatsapp 58853 >= 2.2218.4
18
18
  * @whatsapp 458853 >= 2.2222.8
19
+ * @whatsapp 760210 >= 2.2228.4
19
20
  */
20
21
  export declare function mediaTypeFromProtobuf(protoMessage: {
21
22
  [key: string]: any;
@@ -18,17 +18,21 @@ import { ProductModel } from '..';
18
18
  export declare function createBusinessCatalog(): Promise<any>;
19
19
  /** @whatsapp 96519
20
20
  * @whatsapp 196519 >= 2.2222.8
21
+ * @whatsapp 895697 >= 2.2228.4
21
22
  */
22
23
  export declare function addProduct(product: ProductModel, imageWidth?: number, imageHeight?: number): Promise<any>;
23
24
  /** @whatsapp 96519
24
25
  * @whatsapp 196519 >= 2.2222.8
26
+ * @whatsapp 895697 >= 2.2228.4
25
27
  */
26
28
  export declare function editProduct(product: ProductModel, imageWidth?: number, imageHeight?: number): Promise<any>;
27
29
  /** @whatsapp 96519
28
30
  * @whatsapp 196519 >= 2.2222.8
31
+ * @whatsapp 895697 >= 2.2228.4
29
32
  */
30
33
  export declare function deleteProducts(productIds: string[]): Promise<any>;
31
34
  /** @whatsapp 96519
32
35
  * @whatsapp 196519 >= 2.2222.8
36
+ * @whatsapp 895697 >= 2.2228.4
33
37
  */
34
38
  export declare function sendProductToChat(...args: any[]): Promise<any>;
@@ -15,5 +15,6 @@
15
15
  */
16
16
  /**
17
17
  * @whatsapp 832678
18
+ * @whatsapp 787614 >= 2.2228.4
18
19
  */
19
20
  export declare function randomHex(size: number): string;
@@ -13,7 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- /** @whatsapp 56981 */
16
+ /** @whatsapp 56981
17
+ * @whatsapp 383674 >= 2.2228.4
18
+ */
17
19
  export declare function sendCallSignalingMsg(data: {
18
20
  common: {
19
21
  type?: string;
@@ -16,5 +16,6 @@
16
16
  import { ChatModel } from '..';
17
17
  /** @whatsapp 83802
18
18
  * @whatsapp 483802 >= 2.2222.8
19
+ * @whatsapp 382019 >= 2.2228.4
19
20
  */
20
21
  export declare function sendClear(chat: ChatModel, keepStarred?: boolean): Promise<void>;
@@ -16,5 +16,6 @@
16
16
  import { ChatModel } from '..';
17
17
  /** @whatsapp 20052
18
18
  * @whatsapp 920052 >= 2.2222.8
19
+ * @whatsapp 43125 >= 2.2228.4
19
20
  */
20
21
  export declare function sendDelete(chat: ChatModel): Promise<void>;
@@ -16,5 +16,6 @@
16
16
  import { ChatModel } from '..';
17
17
  /** @whatsapp 5501
18
18
  * @whatsapp 605501 >= 2.2222.8
19
+ * @whatsapp 525510 >= 2.2228.4
19
20
  */
20
21
  export declare function sendExitGroup(group: ChatModel): Promise<void>;
@@ -16,5 +16,6 @@
16
16
  import { MsgModel } from '../models';
17
17
  /** @whatsapp 21357
18
18
  * @whatsapp 621357 >= 2.2222.8
19
+ * @whatsapp 805687 >= 2.2228.4
19
20
  */
20
21
  export declare function sendReactionToMsg(msg: MsgModel, reactionText: string): Promise<string>;
@@ -15,5 +15,6 @@
15
15
  */
16
16
  /** @whatsapp 5524
17
17
  * @whatsapp 105524 >= 2.2222.8
18
+ * @whatsapp 781845 >= 2.2228.4
18
19
  */
19
20
  export declare function sendTextMsgToChat(chat: any, message: any, options: any): Promise<string>;
@@ -17,5 +17,6 @@ import { ChatModel } from '../models';
17
17
  /**
18
18
  * @whatsapp 59992
19
19
  * @whatsapp 259992 >= 2.2222.8
20
+ * @whatsapp 503153 >= 2.2228.4
20
21
  */
21
22
  export declare function setArchive(chat: ChatModel, archive: boolean, id?: string): Promise<void>;
@@ -17,5 +17,7 @@ import { ChatModel } from '../models';
17
17
  /**
18
18
  * @whatsapp 10236
19
19
  * @whatsapp 510236 >= 2.2222.8
20
+ * @whatsapp 742348 >= 2.2228.4
21
+ * @whatsapp 456180 >= 2.2230.8
20
22
  */
21
23
  export declare function setPin(chat: ChatModel, pin: boolean): Promise<void>;
@@ -15,6 +15,7 @@
15
15
  */
16
16
  /** @whatsapp 93650
17
17
  * @whatsapp 193650 >= 2.2222.8
18
+ * @whatsapp 985947 >= 2.2228.4
18
19
  */
19
20
  export declare function typeAttributeFromProtobuf(protoMessage: {
20
21
  [key: string]: any;
@@ -14,6 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export * from './collections';
17
+ export * as contants from './contants';
17
18
  export * as enums from './enums';
18
19
  export { _moduleIdMap } from './exportModule';
19
20
  export * as functions from './functions';
@@ -16,6 +16,7 @@
16
16
  import { ChatModel } from '..';
17
17
  /** @whatsapp 371
18
18
  * @whatsapp 800371 >= 2.2222.8
19
+ * @whatsapp 366517 >= 2.2228.4
19
20
  */
20
21
  export declare namespace ChatPresence {
21
22
  function markComposing(chat: ChatModel): Promise<void>;
@@ -18,6 +18,7 @@ declare class LocaleClass {
18
18
  /** @whatsapp 14296
19
19
  * @whatsapp 43725 >= 2.2204.13
20
20
  * @whatsapp 914296 >= 2.2222.8
21
+ * @whatsapp 568064 >= 2.2230.8
21
22
  */
22
23
  export declare const Locale: LocaleClass;
23
24
  export {};