@wppconnect/wa-js 2.9.0 → 2.11.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 (85) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/assert/assertProduct.d.ts +22 -0
  3. package/dist/assert/index.d.ts +1 -0
  4. package/dist/catalog/functions/addProductImage.d.ts +28 -0
  5. package/dist/catalog/functions/changeProductImage.d.ts +28 -0
  6. package/dist/catalog/functions/createCollection.d.ts +26 -0
  7. package/dist/catalog/functions/createProduct.d.ts +47 -0
  8. package/dist/catalog/functions/deleteCollection.d.ts +26 -0
  9. package/dist/catalog/functions/deleteProduct.d.ts +30 -0
  10. package/dist/catalog/functions/editCollection.d.ts +32 -0
  11. package/dist/catalog/functions/editProduct.d.ts +36 -0
  12. package/dist/catalog/functions/getCollections.d.ts +31 -0
  13. package/dist/catalog/functions/getProductById.d.ts +28 -0
  14. package/dist/catalog/functions/getProducts.d.ts +27 -0
  15. package/dist/catalog/functions/index.d.ts +14 -0
  16. package/dist/catalog/functions/removeProductImage.d.ts +29 -0
  17. package/dist/catalog/functions/setProductVisibility.d.ts +30 -0
  18. package/dist/catalog/functions/updateCartEnabled.d.ts +30 -0
  19. package/dist/chat/functions/canMarkPlayed.d.ts +27 -0
  20. package/dist/chat/functions/getMessages.d.ts +25 -0
  21. package/dist/chat/functions/getPlatformFromMessage.d.ts +34 -0
  22. package/dist/chat/functions/index.d.ts +3 -0
  23. package/dist/chat/functions/markPlayed.d.ts +27 -0
  24. package/dist/chat/functions/prepareMessageButtons.d.ts +1 -1
  25. package/dist/chat/functions/sendTextMessage.d.ts +31 -0
  26. package/dist/chat/functions/sendVCardContactMessage.d.ts +20 -0
  27. package/dist/chat/index.d.ts +1 -0
  28. package/dist/chat/patch.d.ts +16 -0
  29. package/dist/conn/functions/getPlatform.d.ts +25 -0
  30. package/dist/conn/functions/index.d.ts +2 -0
  31. package/dist/contact/functions/getBusinessProfile.d.ts +27 -0
  32. package/dist/contact/functions/index.d.ts +1 -0
  33. package/dist/labels/functions/getLabelById.d.ts +17 -0
  34. package/dist/labels/functions/index.d.ts +1 -0
  35. package/dist/profile/functions/editBusinessProfile.d.ts +177 -0
  36. package/dist/profile/functions/index.d.ts +2 -0
  37. package/dist/profile/functions/isBusiness.d.ts +24 -0
  38. package/dist/status/functions/index.d.ts +1 -0
  39. package/dist/status/functions/sendReadStatus.d.ts +25 -0
  40. package/dist/whatsapp/collections/CatalogCollection.d.ts +3 -1
  41. package/dist/whatsapp/contants/DROP_ATTR.d.ts +19 -0
  42. package/dist/whatsapp/contants/index.d.ts +16 -0
  43. package/dist/whatsapp/enums/CALL_STATES.d.ts +1 -0
  44. package/dist/whatsapp/enums/SendMsgResult.d.ts +1 -0
  45. package/dist/whatsapp/functions/addAndSendMsgToChat.d.ts +1 -0
  46. package/dist/whatsapp/functions/blockContact.d.ts +2 -0
  47. package/dist/whatsapp/functions/calculateFilehashFromBlob.d.ts +19 -0
  48. package/dist/whatsapp/functions/collections.d.ts +37 -0
  49. package/dist/whatsapp/functions/createMsgProtobuf.d.ts +1 -0
  50. package/dist/whatsapp/functions/editBusinessProfile.d.ts +20 -0
  51. package/dist/whatsapp/functions/encodeMaybeMediaType.d.ts +19 -0
  52. package/dist/whatsapp/functions/encryptAndSendGroupMsg.d.ts +1 -0
  53. package/dist/whatsapp/functions/encryptAndSendMsg.d.ts +1 -0
  54. package/dist/whatsapp/functions/fetchLinkPreview.d.ts +1 -0
  55. package/dist/whatsapp/functions/findChat.d.ts +1 -0
  56. package/dist/whatsapp/functions/genMinimalLinkPreview.d.ts +1 -0
  57. package/dist/whatsapp/functions/groupParticipants.d.ts +4 -0
  58. package/dist/whatsapp/functions/handleAck.d.ts +6 -0
  59. package/dist/whatsapp/functions/index.d.ts +6 -0
  60. package/dist/whatsapp/functions/markSeen.d.ts +9 -3
  61. package/dist/whatsapp/functions/mediaTypeFromProtobuf.d.ts +2 -1
  62. package/dist/whatsapp/functions/msgFindQuery.d.ts +2 -1
  63. package/dist/whatsapp/functions/productVisibilitySet.d.ts +21 -0
  64. package/dist/whatsapp/functions/products.d.ts +9 -0
  65. package/dist/whatsapp/functions/randomHex.d.ts +1 -0
  66. package/dist/whatsapp/functions/sendCallSignalingMsg.d.ts +3 -1
  67. package/dist/whatsapp/functions/sendClear.d.ts +1 -0
  68. package/dist/whatsapp/functions/sendDelete.d.ts +1 -0
  69. package/dist/whatsapp/functions/sendExitGroup.d.ts +1 -0
  70. package/dist/whatsapp/functions/sendReactionToMsg.d.ts +1 -0
  71. package/dist/whatsapp/functions/sendTextMsgToChat.d.ts +1 -0
  72. package/dist/whatsapp/functions/setArchive.d.ts +1 -0
  73. package/dist/whatsapp/functions/setPin.d.ts +2 -0
  74. package/dist/whatsapp/functions/typeAttributeFromProtobuf.d.ts +1 -0
  75. package/dist/whatsapp/functions/updateCartEnabled.d.ts +19 -0
  76. package/dist/whatsapp/index.d.ts +1 -0
  77. package/dist/whatsapp/misc/ChatPresence.d.ts +1 -0
  78. package/dist/whatsapp/misc/Locale.d.ts +1 -0
  79. package/dist/whatsapp/misc/ProductCatalogSession.d.ts +27 -0
  80. package/dist/whatsapp/misc/index.d.ts +1 -0
  81. package/dist/whatsapp/models/CatalogModel.d.ts +2 -0
  82. package/dist/whatsapp/models/ProductCollModel.d.ts +4 -0
  83. package/dist/whatsapp/models/ProductModel.d.ts +2 -1
  84. package/dist/wppconnect-wa.js +1 -1
  85. package/package.json +13 -13
@@ -18,6 +18,37 @@ export declare type TextMessageOptions = SendMessageOptions & MessageButtonsOpti
18
18
  /**
19
19
  * Send a text message
20
20
  *
21
+ * @example
22
+ * ```javascript
23
+ * WPP.chat.sendTextMessage('[number]@c.us', 'Hello new contact', {
24
+ * createChat: true
25
+ * });
26
+ *
27
+ * // With Buttons
28
+ * WPP.chat.sendTextMessage('[number]@c.us', 'Hello', {
29
+ * useTemplateButtons: true, // False for legacy
30
+ * buttons: [
31
+ * {
32
+ * url: 'https://wppconnect.io/',
33
+ * text: 'WPPConnect Site'
34
+ * },
35
+ * {
36
+ * phoneNumber: '+55 11 22334455',
37
+ * text: 'Call me'
38
+ * },
39
+ * {
40
+ * id: 'your custom id 1',
41
+ * text: 'Some text'
42
+ * },
43
+ * {
44
+ * id: 'another id 2',
45
+ * text: 'Another text'
46
+ * }
47
+ * ],
48
+ * title: 'Title text', // Optional
49
+ * footer: 'Footer text' // Optional
50
+ * });
51
+ * ```
21
52
  * @category Message
22
53
  */
23
54
  export declare function sendTextMessage(chatId: any, content: any, options?: TextMessageOptions): Promise<SendMessageReturn>;
@@ -21,7 +21,27 @@ export interface VCardContact {
21
21
  }
22
22
  /**
23
23
  * Send a VCard as message
24
+ * @example
25
+ * ```javascript
26
+ * // single contact
27
+ * WPP.chat.sendVCardContactMessage('[number]@c.us', {
28
+ * id: '123456@c.us',
29
+ * name: 'The Contact Name'
30
+ * });
24
31
  *
32
+ * // multiple contacts
33
+ * WPP.chat.sendVCardContactMessage('[number]@c.us', [
34
+ * {
35
+ * id: '123456@c.us',
36
+ * name: 'The Contact Name'
37
+ * },
38
+ * {
39
+ * id: '456789@c.us',
40
+ * name: 'Another Contact'
41
+ * },
42
+ * ]);
43
+ *
44
+ * ```
25
45
  * @category Message
26
46
  */
27
47
  export declare function sendVCardContactMessage(chatId: any, contacts: string | Wid | VCardContact | (string | Wid | VCardContact)[], options?: SendMessageOptions): Promise<SendMessageReturn>;
@@ -14,6 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import './events';
17
+ import './patch';
17
18
  export * from './defaultSendMessageOptions';
18
19
  export * from './functions';
19
20
  export * from './types';
@@ -0,0 +1,16 @@
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 {};
@@ -0,0 +1,25 @@
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
+ /**
17
+ * Check what's device platform is connected
18
+ * @returns android | iphone | wp
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * const getPlatform = WPP.conn.getPlatform();
23
+ * ```
24
+ */
25
+ export declare function getPlatform(): any;
@@ -16,9 +16,11 @@
16
16
  export { getAuthCode } from './getAuthCode';
17
17
  export { getMyDeviceId } from './getMyDeviceId';
18
18
  export { getMyUserId } from './getMyUserId';
19
+ export { getPlatform } from './getPlatform';
19
20
  export { isAuthenticated } from './isAuthenticated';
20
21
  export { isIdle } from './isIdle';
21
22
  export { isMainLoaded } from './isMainLoaded';
23
+ export { isMainReady } from './isMainReady';
22
24
  export { isMultiDevice } from './isMultiDevice';
23
25
  export { logout } from './logout';
24
26
  export { refreshQR } from './refreshQR';
@@ -0,0 +1,27 @@
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 { BusinessProfileModel, Wid } from '../../whatsapp';
17
+ /**
18
+ * Get the current text status
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * const url = await WPP.contact.getBusinessProfile('[number]@c.us');
23
+ * ```
24
+ *
25
+ * @category Contact
26
+ */
27
+ export declare function getBusinessProfile(contactId: string | Wid): Promise<BusinessProfileModel>;
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export { getBusinessProfile } from './getBusinessProfile';
16
17
  export { getProfilePictureUrl } from './getProfilePictureUrl';
17
18
  export { getStatus } from './getStatus';
18
19
  export { ContactListOptions, list } from './list';
@@ -0,0 +1,17 @@
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
+ import { Label } from '..';
17
+ export declare function getLabelById(labelId: string): Promise<Label>;
@@ -19,5 +19,6 @@ export { colorIsInLabelPalette } from './colorIsInLabelPalette';
19
19
  export { deleteAllLabels } from './deleteAllLabels';
20
20
  export { deleteLabel, DeleteLabelReturn } from './deleteLabel';
21
21
  export { getAllLabels } from './getAllLabels';
22
+ export { getLabelById } from './getLabelById';
22
23
  export { getLabelColorPalette } from './getLabelColorPalette';
23
24
  export { getNewLabelColor } from './getNewLabelColor';
@@ -0,0 +1,177 @@
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 { BusinessProfileModel } from '../../whatsapp';
17
+ /**
18
+ * Update your business profile
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * await WPP.profile.editBusinessProfile({description: 'New description for profile'});
23
+ * ```
24
+ *
25
+ * ```javascript
26
+ * await WPP.profile.editBusinessProfile({categories: {
27
+ id: "133436743388217",
28
+ localized_display_name: "Artes e entretenimento",
29
+ not_a_biz: false,
30
+ }});
31
+ * ```
32
+ *
33
+ * ```javascript
34
+ * await WPP.profile.editBusinessProfile({adress: 'Street 01, New York'});
35
+ * ```
36
+ *
37
+ * ```javascript
38
+ * await WPP.profile.editBusinessProfile({adress: 'Street 01, New York'});
39
+ * ```
40
+ *
41
+ * ```javascript
42
+ * await WPP.profile.editBusinessProfile({email: 'test@test.com.br'});
43
+ * ```
44
+ *
45
+ * Change website of profile (max 2 sites)
46
+ * ```javascript
47
+ * await WPP.profile.editBusinessProfile({website: [
48
+ "https://www.wppconnect.io",
49
+ "https://www.teste2.com.br",
50
+ ]});
51
+ * ```
52
+ *
53
+ * Change businessHours for Specific Hours
54
+ * ```javascript
55
+ * await WPP.profile.editBusinessProfile({ businessHours: {
56
+ * {
57
+ tue: {
58
+ mode: "specific_hours",
59
+ hours: [
60
+ [
61
+ 540,
62
+ 1080,
63
+ ],
64
+ ],
65
+ },
66
+ wed: {
67
+ mode: "specific_hours",
68
+ hours: [
69
+ [
70
+ 540,
71
+ 1080,
72
+ ],
73
+ ],
74
+ },
75
+ thu: {
76
+ mode: "specific_hours",
77
+ hours: [
78
+ [
79
+ 540,
80
+ 1080,
81
+ ],
82
+ ],
83
+ },
84
+ fri: {
85
+ mode: "specific_hours",
86
+ hours: [
87
+ [
88
+ 540,
89
+ 1080,
90
+ ],
91
+ ],
92
+ },
93
+ sat: {
94
+ mode: "specific_hours",
95
+ hours: [
96
+ [
97
+ 540,
98
+ 1080,
99
+ ],
100
+ ],
101
+ },
102
+ sun: {
103
+ mode: "specific_hours",
104
+ hours: [
105
+ [
106
+ 540,
107
+ 1080,
108
+ ],
109
+ ],
110
+ },
111
+ }
112
+ },
113
+ timezone: "America/Sao_Paulo"
114
+ });
115
+ *
116
+ * Change businessHours for Always Opened
117
+ * ```javascript
118
+ * await WPP.profile.editBusinessProfile({ businessHours: {
119
+ {
120
+ mon: {
121
+ mode: "open_24h",
122
+ },
123
+ tue: {
124
+ mode: "open_24h",
125
+ },
126
+ wed: {
127
+ mode: "open_24h",
128
+ },
129
+ thu: {
130
+ mode: "open_24h",
131
+ },
132
+ fri: {
133
+ mode: "open_24h",
134
+ },
135
+ sat: {
136
+ mode: "open_24h",
137
+ },
138
+ sun: {
139
+ mode: "open_24h",
140
+ },
141
+ }
142
+ timezone: "America/Sao_Paulo"
143
+ });
144
+ *
145
+ * Change businessHours for Appointment Only
146
+ * ```javascript
147
+ * await WPP.profile.editBusinessProfile({ businessHours: { {
148
+ mon: {
149
+ mode: "appointment_only",
150
+ },
151
+ tue: {
152
+ mode: "appointment_only",
153
+ },
154
+ wed: {
155
+ mode: "appointment_only",
156
+ },
157
+ thu: {
158
+ mode: "appointment_only",
159
+ },
160
+ fri: {
161
+ mode: "appointment_only",
162
+ },
163
+ sat: {
164
+ mode: "appointment_only",
165
+ },
166
+ sun: {
167
+ mode: "appointment_only",
168
+ },
169
+ }
170
+ timezone: "America/Sao_Paulo"
171
+ });
172
+ *
173
+ *
174
+ * ```
175
+ * @category Profile
176
+ */
177
+ export declare function editBusinessProfile(params: BusinessProfileModel): Promise<any>;
@@ -13,6 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export { editBusinessProfile } from './editBusinessProfile';
16
17
  export { getMyStatus } from './getMyStatus';
18
+ export { isBusiness } from './isBusiness';
17
19
  export { setMyProfilePicture } from './setMyProfilePicture';
18
20
  export { setMyStatus } from './setMyStatus';
@@ -0,0 +1,24 @@
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
+ * Return the current logged user is Bussiness or not
18
+ *
19
+ * @example
20
+ * ```javascript
21
+ * WPP.profile.isBusiness();
22
+ * ```
23
+ */
24
+ export declare function isBusiness(): boolean | undefined;
@@ -17,5 +17,6 @@ export { get } from './get';
17
17
  export { getMyStatus } from './getMyStatus';
18
18
  export { ImageStatusOptions, sendImageStatus } from './sendImageStatus';
19
19
  export { sendRawStatus, SendStatusOptions } from './sendRawStatus';
20
+ export { sendReadStatus } from './sendReadStatus';
20
21
  export { sendTextStatus, TextStatusOptions } from './sendTextStatus';
21
22
  export { sendVideoStatus, VideoStatusOptions } from './sendVideoStatus';
@@ -0,0 +1,25 @@
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
+ import { Wid } from '../../whatsapp';
17
+ /**
18
+ * Mark status as read/seen
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * WPP.status.sendReadStatus('[phone_number]@c.us', 'false_status@broadcast_3A169E0FD4BC6E92212F_5521526232927@c.us');
23
+ * ```
24
+ */
25
+ export declare function sendReadStatus(chatId: string | Wid, statusId: string): Promise<any>;
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { Wid } from '../misc';
16
17
  import { CatalogModel } from '../models';
17
18
  import { Collection } from './Collection';
18
19
  /** @whatsapp 99989
@@ -25,9 +26,10 @@ export declare class CatalogCollection extends Collection<CatalogModel> {
25
26
  findProduct(e?: {
26
27
  catalogWid: any;
27
28
  productId: any;
28
- productMsgMediaData: any;
29
+ productMsgMediaData?: any;
29
30
  }): any;
30
31
  findCarouselCatalog(e?: any): any;
31
32
  findNextProductPage(e?: any): any;
32
33
  findCollectionMembership(e?: any, t?: any): any;
34
+ _queryCatalog(e?: CatalogModel, t?: Wid, n?: any, r?: any, a?: any, o?: any): any;
33
35
  }
@@ -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>;
@@ -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
+ /**
17
+ * @whatsapp 818309 >= 2.2228.14
18
+ */
19
+ export declare function calculateFilehashFromBlob(file: Blob): Promise<string>;
@@ -0,0 +1,37 @@
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 '../misc';
17
+ /** @whatsapp 409465 >= 2.2228.14
18
+ */
19
+ export declare function createCollection(...args: any[]): Promise<any>;
20
+ /** @whatsapp 409465 >= 2.2228.14
21
+ */
22
+ export declare function deleteCollection(id: string, sessionId: string): Promise<any>;
23
+ /** @whatsapp 409465 >= 2.2228.14
24
+ */
25
+ export declare function editCollection(collectionId: string, collectionName: string | undefined, collectionBoolea: boolean, productsToAdd: string[], productsToRemove: string[], sessionId: string): Promise<any>;
26
+ export interface QueryCollectionsIQtParams {
27
+ afterCursor?: string;
28
+ catalogWid?: Wid;
29
+ directConnectionEncryptedInfo?: any;
30
+ height?: 100;
31
+ width?: 100;
32
+ limit: number;
33
+ productsCount?: number;
34
+ }
35
+ /** @whatsapp 409465 >= 2.2228.14
36
+ */
37
+ export declare function queryCollectionsIQ(params: QueryCollectionsIQtParams): any;
@@ -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,20 @@
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 { BusinessProfileModel } from '../models';
17
+ /**
18
+ * @whatsapp 461561
19
+ */
20
+ export declare function editBusinessProfile(arguments: BusinessProfileModel): Promise<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>;