@wppconnect/wa-js 2.7.2 → 2.8.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 (181) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/config.d.ts +10 -0
  3. package/dist/contact/functions/getStatus.d.ts +1 -1
  4. package/dist/eventEmitter/eventEmitter.d.ts +5 -1
  5. package/dist/group/functions/addParticipants.d.ts +20 -1
  6. package/dist/group/functions/index.d.ts +1 -0
  7. package/dist/group/functions/setIcon.d.ts +31 -0
  8. package/dist/profile/functions/index.d.ts +1 -0
  9. package/dist/profile/functions/setMyProfilePicture.d.ts +32 -0
  10. package/dist/status/functions/index.d.ts +2 -0
  11. package/dist/status/functions/sendImageStatus.d.ts +26 -0
  12. package/dist/status/functions/sendVideoStatus.d.ts +26 -0
  13. package/dist/util/index.d.ts +1 -0
  14. package/dist/{profile/functions/queryExists.d.ts → util/resizeImage.d.ts} +2 -5
  15. package/dist/whatsapp/collections/AggReactionsCollection.d.ts +3 -1
  16. package/dist/whatsapp/collections/BaseCollection.d.ts +4 -2
  17. package/dist/whatsapp/collections/BlocklistCollection.d.ts +3 -1
  18. package/dist/whatsapp/collections/BusinessCategoriesResultCollection.d.ts +3 -1
  19. package/dist/whatsapp/collections/BusinessProfileCollection.d.ts +3 -1
  20. package/dist/whatsapp/collections/CallCollection.d.ts +1 -0
  21. package/dist/whatsapp/collections/CartCollection.d.ts +3 -1
  22. package/dist/whatsapp/collections/CartItemCollection.d.ts +3 -1
  23. package/dist/whatsapp/collections/CatalogCollection.d.ts +3 -1
  24. package/dist/whatsapp/collections/ChatCollection.d.ts +3 -1
  25. package/dist/whatsapp/collections/ChatstateCollection.d.ts +3 -1
  26. package/dist/whatsapp/collections/Collection.d.ts +6 -2
  27. package/dist/whatsapp/collections/ContactCollection.d.ts +5 -4
  28. package/dist/whatsapp/collections/EmojiVariantCollection.d.ts +3 -1
  29. package/dist/whatsapp/collections/GroupMetadataCollection.d.ts +3 -1
  30. package/dist/whatsapp/collections/LabelCollection.d.ts +3 -1
  31. package/dist/whatsapp/collections/LabelItemCollection.d.ts +3 -1
  32. package/dist/whatsapp/collections/LiveLocationCollection.d.ts +3 -1
  33. package/dist/whatsapp/collections/MsgCollection.d.ts +3 -1
  34. package/dist/whatsapp/collections/MsgInfoCollection.d.ts +3 -1
  35. package/dist/whatsapp/collections/OrderCollection.d.ts +3 -1
  36. package/dist/whatsapp/collections/OrderItemCollection.d.ts +3 -1
  37. package/dist/whatsapp/collections/ParticipantCollection.d.ts +1 -0
  38. package/dist/whatsapp/collections/PresenceCollection.d.ts +3 -1
  39. package/dist/whatsapp/collections/ProductCollCollection.d.ts +3 -1
  40. package/dist/whatsapp/collections/ProductCollection.d.ts +3 -1
  41. package/dist/whatsapp/collections/ProductImageCollection.d.ts +3 -1
  42. package/dist/whatsapp/collections/ProfilePicThumbCollection.d.ts +3 -1
  43. package/dist/whatsapp/collections/QuickReplyCollection.d.ts +3 -1
  44. package/dist/whatsapp/collections/ReactionsCollection.d.ts +3 -1
  45. package/dist/whatsapp/collections/ReactionsSendersCollection.d.ts +3 -1
  46. package/dist/whatsapp/collections/RecentEmojiCollection.d.ts +3 -1
  47. package/dist/whatsapp/collections/RecentStickerCollection.d.ts +1 -0
  48. package/dist/whatsapp/collections/StarredMsgCollection.d.ts +3 -1
  49. package/dist/whatsapp/collections/StatusV3Collection.d.ts +3 -1
  50. package/dist/whatsapp/collections/StickerCollection.d.ts +3 -1
  51. package/dist/whatsapp/collections/StickerPackCollection.d.ts +1 -0
  52. package/dist/whatsapp/collections/StickerSearchCollection.d.ts +3 -1
  53. package/dist/whatsapp/collections/TemplateButtonCollection.d.ts +3 -1
  54. package/dist/whatsapp/enums/ACK.d.ts +3 -0
  55. package/dist/whatsapp/enums/CALL_STATES.d.ts +1 -0
  56. package/dist/whatsapp/enums/GROUP_SETTING_TYPE.d.ts +1 -0
  57. package/dist/whatsapp/enums/LogoutReason.d.ts +1 -0
  58. package/dist/whatsapp/enums/MSG_TYPE.d.ts +2 -0
  59. package/dist/whatsapp/enums/SendMsgResult.d.ts +3 -1
  60. package/dist/whatsapp/functions/addAndSendMsgToChat.d.ts +3 -1
  61. package/dist/whatsapp/functions/blockContact.d.ts +6 -2
  62. package/dist/whatsapp/functions/createMsgProtobuf.d.ts +3 -1
  63. package/dist/whatsapp/functions/createOrUpdateReactions.d.ts +3 -1
  64. package/dist/whatsapp/functions/encryptAndSendGroupMsg.d.ts +1 -0
  65. package/dist/whatsapp/functions/encryptAndSendMsg.d.ts +1 -0
  66. package/dist/whatsapp/functions/fetchLinkPreview.d.ts +1 -0
  67. package/dist/whatsapp/functions/findChat.d.ts +3 -1
  68. package/dist/whatsapp/functions/findFirstWebLink.d.ts +1 -0
  69. package/dist/whatsapp/functions/genMinimalLinkPreview.d.ts +1 -0
  70. package/dist/whatsapp/functions/generateVideoThumbsAndDuration.d.ts +2 -1
  71. package/dist/whatsapp/functions/getFanOutList.d.ts +2 -0
  72. package/dist/whatsapp/functions/getGroupSenderKeyList.d.ts +6 -0
  73. package/dist/whatsapp/functions/getOrGenerate.d.ts +1 -0
  74. package/dist/whatsapp/functions/groupParticipants.d.ts +12 -4
  75. package/dist/whatsapp/functions/handleAck.d.ts +12 -3
  76. package/dist/whatsapp/functions/index.d.ts +2 -0
  77. package/dist/whatsapp/functions/isAuthenticated.d.ts +2 -0
  78. package/dist/whatsapp/functions/markSeen.d.ts +3 -1
  79. package/dist/whatsapp/functions/mediaTypeFromProtobuf.d.ts +1 -0
  80. package/dist/whatsapp/functions/products.d.ts +12 -4
  81. package/dist/whatsapp/functions/profilePic.d.ts +7 -1
  82. package/dist/whatsapp/functions/randomId.d.ts +1 -0
  83. package/dist/whatsapp/functions/sendClear.d.ts +3 -1
  84. package/dist/whatsapp/functions/sendDelete.d.ts +3 -1
  85. package/dist/whatsapp/functions/sendExitGroup.d.ts +3 -1
  86. package/dist/whatsapp/functions/sendGroupParticipants.d.ts +42 -0
  87. package/dist/whatsapp/functions/sendJoinGroupViaInvite.d.ts +3 -1
  88. package/dist/whatsapp/functions/sendQueryGroupInvite.d.ts +3 -1
  89. package/dist/whatsapp/functions/sendReactionToMsg.d.ts +3 -1
  90. package/dist/whatsapp/functions/sendRevokeGroupInviteCode.d.ts +3 -1
  91. package/dist/whatsapp/functions/sendTextMsgToChat.d.ts +3 -1
  92. package/dist/whatsapp/functions/setArchive.d.ts +1 -0
  93. package/dist/whatsapp/functions/setGroup.d.ts +9 -3
  94. package/dist/whatsapp/functions/setPin.d.ts +1 -0
  95. package/dist/whatsapp/functions/status.d.ts +2 -0
  96. package/dist/whatsapp/functions/typeAttributeFromProtobuf.d.ts +3 -1
  97. package/dist/whatsapp/functions/updateParticipants.d.ts +27 -0
  98. package/dist/whatsapp/functions/uploadProductImage.d.ts +3 -1
  99. package/dist/whatsapp/functions/uploadThumbnail.d.ts +1 -0
  100. package/dist/whatsapp/misc/Base64.d.ts +3 -1
  101. package/dist/whatsapp/misc/Browser.d.ts +1 -0
  102. package/dist/whatsapp/misc/ChatPresence.d.ts +3 -1
  103. package/dist/whatsapp/misc/Cmd.d.ts +2 -0
  104. package/dist/whatsapp/misc/Conn.d.ts +3 -1
  105. package/dist/whatsapp/misc/Constants.d.ts +1 -0
  106. package/dist/whatsapp/misc/EventEmitter.d.ts +1 -0
  107. package/dist/whatsapp/misc/Features.d.ts +1 -0
  108. package/dist/whatsapp/misc/ImageUtils.d.ts +1 -0
  109. package/dist/whatsapp/misc/Locale.d.ts +1 -0
  110. package/dist/whatsapp/misc/MediaBlobCache.d.ts +6 -2
  111. package/dist/whatsapp/misc/MediaEntry.d.ts +2 -1
  112. package/dist/whatsapp/misc/MediaObject.d.ts +3 -1
  113. package/dist/whatsapp/misc/MediaObjectUtil.d.ts +3 -1
  114. package/dist/whatsapp/misc/MediaPrep.d.ts +3 -1
  115. package/dist/whatsapp/misc/MediaUtils.d.ts +3 -1
  116. package/dist/whatsapp/misc/MsgKey.d.ts +1 -0
  117. package/dist/whatsapp/misc/MsgLoadState.d.ts +6 -2
  118. package/dist/whatsapp/misc/OpaqueData.d.ts +6 -2
  119. package/dist/whatsapp/misc/Socket.d.ts +3 -1
  120. package/dist/whatsapp/misc/Stream.d.ts +3 -1
  121. package/dist/whatsapp/misc/UserPrefs.d.ts +1 -0
  122. package/dist/whatsapp/misc/VCard.d.ts +1 -0
  123. package/dist/whatsapp/misc/Wap.d.ts +2 -0
  124. package/dist/whatsapp/misc/Wid.d.ts +1 -0
  125. package/dist/whatsapp/misc/WidFactory.d.ts +1 -0
  126. package/dist/whatsapp/models/AggReactionsModel.d.ts +2 -0
  127. package/dist/whatsapp/models/AttachMediaModel.d.ts +6 -2
  128. package/dist/whatsapp/models/BlocklistModel.d.ts +6 -2
  129. package/dist/whatsapp/models/BusinessCategoriesResultModel.d.ts +6 -2
  130. package/dist/whatsapp/models/BusinessProfileModel.d.ts +6 -2
  131. package/dist/whatsapp/models/CallModel.d.ts +2 -0
  132. package/dist/whatsapp/models/CallParticipantModel.d.ts +2 -0
  133. package/dist/whatsapp/models/CartItemModel.d.ts +6 -2
  134. package/dist/whatsapp/models/CartModel.d.ts +6 -2
  135. package/dist/whatsapp/models/CatalogModel.d.ts +6 -2
  136. package/dist/whatsapp/models/ChatPreferenceModel.d.ts +6 -2
  137. package/dist/whatsapp/models/ChatstateModel.d.ts +6 -2
  138. package/dist/whatsapp/models/ConnModel.d.ts +6 -2
  139. package/dist/whatsapp/models/ContactModel.d.ts +6 -2
  140. package/dist/whatsapp/models/ConversionTupleModel.d.ts +6 -2
  141. package/dist/whatsapp/models/EmojiVariantModel.d.ts +6 -2
  142. package/dist/whatsapp/models/GroupMetadataModel.d.ts +6 -2
  143. package/dist/whatsapp/models/LabelItemModel.d.ts +6 -2
  144. package/dist/whatsapp/models/LabelModel.d.ts +6 -2
  145. package/dist/whatsapp/models/LiveLocationParticipantModel.d.ts +6 -2
  146. package/dist/whatsapp/models/MediaDataModel.d.ts +6 -2
  147. package/dist/whatsapp/models/Model.d.ts +3 -1
  148. package/dist/whatsapp/models/ModelChatBase.d.ts +3 -1
  149. package/dist/whatsapp/models/MsgButtonReplyMsgModel.d.ts +6 -2
  150. package/dist/whatsapp/models/MsgInfoModel.d.ts +6 -2
  151. package/dist/whatsapp/models/MuteModel.d.ts +6 -2
  152. package/dist/whatsapp/models/OrderItemModel.d.ts +6 -2
  153. package/dist/whatsapp/models/OrderModel.d.ts +6 -2
  154. package/dist/whatsapp/models/ParticipantModel.d.ts +6 -2
  155. package/dist/whatsapp/models/PresenceModel.d.ts +6 -2
  156. package/dist/whatsapp/models/ProductCollModel.d.ts +6 -2
  157. package/dist/whatsapp/models/ProductImageModel.d.ts +6 -2
  158. package/dist/whatsapp/models/ProductMessageListModel.d.ts +6 -2
  159. package/dist/whatsapp/models/ProductModel.d.ts +6 -2
  160. package/dist/whatsapp/models/ProfilePicThumbModel.d.ts +6 -2
  161. package/dist/whatsapp/models/QuickReplyModel.d.ts +6 -2
  162. package/dist/whatsapp/models/ReactionsModel.d.ts +2 -0
  163. package/dist/whatsapp/models/ReactionsSendersModel.d.ts +2 -0
  164. package/dist/whatsapp/models/RecentStickerModel.d.ts +6 -2
  165. package/dist/whatsapp/models/ReplyButtonModel.d.ts +6 -2
  166. package/dist/whatsapp/models/StatusModel.d.ts +6 -2
  167. package/dist/whatsapp/models/StatusV3Model.d.ts +9 -5
  168. package/dist/whatsapp/models/StickerModel.d.ts +2 -0
  169. package/dist/whatsapp/models/StickerPackModel.d.ts +6 -2
  170. package/dist/whatsapp/models/StreamModel.d.ts +6 -2
  171. package/dist/whatsapp/models/TemplateButtonModel.d.ts +6 -2
  172. package/dist/whatsapp/models/UnreadMentionModel.d.ts +6 -2
  173. package/dist/whatsapp/models/WebCallModel.d.ts +2 -0
  174. package/dist/whatsapp/multidevice/adv.d.ts +1 -0
  175. package/dist/whatsapp/multidevice/waNoiseInfo.d.ts +1 -0
  176. package/dist/whatsapp/multidevice/waSignalStore.d.ts +1 -0
  177. package/dist/whatsapp/stores.d.ts +76 -25
  178. package/dist/wppconnect-wa.js +1 -1
  179. package/dist/wppconnect-wa.js.LICENSE.txt +10 -0
  180. package/package.json +20 -19
  181. package/dist/eventEmitter/index.d.ts +0 -195
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 2.8.1 (2022-07-11)
2
+
3
+ ### Bug Fixes
4
+
5
+ - Fixed WPP.chat.markIsUnread function (wppconnect-team/wppconnect[#1196](https://github.com/wppconnect-team/wa-js/issues/1196)) ([db7195e](https://github.com/wppconnect-team/wa-js/commit/db7195ee15a4e12c7a6b6a06bcb6bb711f59659b))
6
+
7
+ # 2.8.0 (2022-06-28)
8
+
9
+ ### Features
10
+
11
+ - Added googleAnalyticsUserProperty options ([f425767](https://github.com/wppconnect-team/wa-js/commit/f425767f0b30d95b24a15fca8ab7c269d4e3240d))
12
+
13
+ ## 2.7.3 (2022-06-18)
14
+
1
15
  ## 2.7.2 (2022-06-17)
2
16
 
3
17
  ### Bug Fixes
package/dist/config.d.ts CHANGED
@@ -45,10 +45,20 @@ export interface Config {
45
45
  * Google Analytics Id
46
46
  */
47
47
  googleAnalyticsId: string | null;
48
+ /**
49
+ * Google Analytics Id
50
+ */
51
+ googleAnalyticsUserProperty: {
52
+ [key: string]: string | number | boolean;
53
+ };
48
54
  /**
49
55
  * Link Preview API servers
50
56
  */
51
57
  linkPreviewApiServers: string[] | null;
58
+ /**
59
+ * Project name for google analytics
60
+ */
61
+ poweredBy: string | null;
52
62
  }
53
63
  export declare const defaultConfig: Config;
54
64
  export declare const config: Config;
@@ -24,4 +24,4 @@ import { Wid } from '../../whatsapp';
24
24
  *
25
25
  * @category Chat
26
26
  */
27
- export declare function getStatus(contactId: string | Wid): Promise<import("../../whatsapp").StatusModel>;
27
+ export declare function getStatus(contactId: string | Wid): Promise<string | null>;
@@ -13,7 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { CancelablePromise, ConstructorOptions, event, EventAndListener, EventEmitter2, eventNS, GeneralEventEmitter, Listener, ListenerFn, ListenToOptions, OnceOptions, WaitForFilter, WaitForOptions } from 'eventemitter2';
16
+ import { CancelablePromise, ConstructorOptions, event, EventAndListener, EventEmitter2, eventNS, GeneralEventEmitter, Listener, ListenerFn, ListenToOptions, OnceOptions, WaitForOptions } from 'eventemitter2';
17
+ interface WaitForFilter {
18
+ (...values: any[]): boolean;
19
+ }
17
20
  export interface OnOptions {
18
21
  /**
19
22
  * invoke the listener in async mode using setImmediate (fallback to setTimeout if not available) or process.nextTick depending on the nextTick option.
@@ -167,3 +170,4 @@ export declare class EventEmitter<EventData> {
167
170
  static once(emitter: EventEmitter2, event: string, options?: OnceOptions): CancelablePromise<any[]>;
168
171
  static defaultMaxListeners: number;
169
172
  }
173
+ export {};
@@ -14,4 +14,23 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { Wid } from '../../whatsapp';
17
- export declare function addParticipants(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): Promise<void>;
17
+ /**
18
+ * Add one or more participants to a group
19
+ *
20
+ * The method return a object with the result of each participant as the key
21
+ *
22
+ * @example
23
+ * ```javascript
24
+ * await WPP.group.addParticipants('[group@g.us]', [number@c.us]);
25
+ * ```
26
+ *
27
+ * @category Group
28
+ */
29
+ export declare function addParticipants(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): Promise<{
30
+ [key: `${number}@c.us`]: {
31
+ code: number;
32
+ message: string;
33
+ invite_code: string | null;
34
+ invite_code_exp: number | null;
35
+ };
36
+ }>;
@@ -35,5 +35,6 @@ export { promoteParticipants } from './promoteParticipants';
35
35
  export { removeParticipants } from './removeParticipants';
36
36
  export { revokeInviteCode } from './revokeInviteCode';
37
37
  export { setDescription } from './setDescription';
38
+ export { setIcon } from './setIcon';
38
39
  export { GroupProperty, setProperty } from './setProperty';
39
40
  export { setSubject } from './setSubject';
@@ -0,0 +1,31 @@
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 '../../whatsapp';
17
+ /**
18
+ * Set the group icon (group profile picture)
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * await WPP.group.setIcon('[group@g.us]', 'data:image/jpeg;base64,.....');
23
+ * ```
24
+ */
25
+ export declare function setIcon(groupId: string | Wid, content: string): Promise<{
26
+ eurl: string;
27
+ status: number;
28
+ tag: string;
29
+ token: string;
30
+ _duplicate: boolean;
31
+ }>;
@@ -14,4 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export { getMyStatus } from './getMyStatus';
17
+ export { setMyProfilePicture } from './setMyProfilePicture';
17
18
  export { setMyStatus } from './setMyStatus';
@@ -0,0 +1,32 @@
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
+ * Update your profile picture
18
+ *
19
+ * @example
20
+ * ```javascript
21
+ * await WPP.profile.setMyProfilePicture('data:image/jpeg;base64,.....');
22
+ * ```
23
+ *
24
+ * @category Chat
25
+ */
26
+ export declare function setMyProfilePicture(content: string): Promise<{
27
+ eurl: string;
28
+ status: number;
29
+ tag: string;
30
+ token: string;
31
+ _duplicate: boolean;
32
+ }>;
@@ -15,5 +15,7 @@
15
15
  */
16
16
  export { get } from './get';
17
17
  export { getMyStatus } from './getMyStatus';
18
+ export { ImageStatusOptions, sendImageStatus } from './sendImageStatus';
18
19
  export { sendRawStatus, SendStatusOptions } from './sendRawStatus';
19
20
  export { sendTextStatus, TextStatusOptions } from './sendTextStatus';
21
+ export { sendVideoStatus, VideoStatusOptions } from './sendVideoStatus';
@@ -0,0 +1,26 @@
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 { SendStatusOptions } from './sendRawStatus';
17
+ export declare type ImageStatusOptions = SendStatusOptions;
18
+ /**
19
+ * Send a image message to status stories
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * WPP.status.sendImageStatus('data:image/jpeg;base64,<a long base64 file...>');
24
+ * ```
25
+ */
26
+ export declare function sendImageStatus(content: any, options?: ImageStatusOptions): Promise<any>;
@@ -0,0 +1,26 @@
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 { SendStatusOptions } from './sendRawStatus';
17
+ export declare type VideoStatusOptions = SendStatusOptions;
18
+ /**
19
+ * Send a video message to status stories
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * WPP.status.sendVideoStatus('data:video/mp4;base64,<a long base64 file...>');
24
+ * ```
25
+ */
26
+ export declare function sendVideoStatus(content: any, options?: VideoStatusOptions): Promise<any>;
@@ -21,5 +21,6 @@ export * from './errors';
21
21
  export * from './fetchDataFromPNG';
22
22
  export * from './getVideoInfoFromBuffer';
23
23
  export * from './isBase64';
24
+ export * from './resizeImage';
24
25
  export * from './types';
25
26
  export * from './wrapFunction';
@@ -13,8 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Wid } from '../../whatsapp';
17
- export declare function queryExists(contactId: string | Wid): Promise<{
18
- wid: Wid;
19
- biz: boolean;
20
- } | null | undefined>;
16
+ import Compressor from 'compressorjs';
17
+ export declare function resizeImage(blob: Blob, options?: Compressor.Options): Promise<Blob | File>;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { AggReactionsModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 81130 */
18
+ /** @whatsapp 81130
19
+ * @whatsapp 981130 >= 2.2222.8
20
+ */
19
21
  export declare class AggReactionsCollection extends Collection<AggReactionsModel> {
20
22
  static model: AggReactionsModel;
21
23
  static comparator(): number;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { Stringable } from '../../types';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 1255 */
18
+ /** @whatsapp 1255
19
+ * @whatsapp 801255 >= 2.2222.8
20
+ */
19
21
  export declare class BaseCollection<C, A = C | C[]> extends Collection<C> {
20
22
  static cachePolicy: {
21
23
  id: string;
@@ -38,7 +40,7 @@ export declare class BaseCollection<C, A = C | C[]> extends Collection<C> {
38
40
  set?: boolean;
39
41
  }): Promise<C>;
40
42
  handle(values: A): void;
41
- gadd(id: C | Stringable): C;
43
+ gadd(id: C | Stringable, options?: any): C;
42
44
  gaddUp(id: C | Stringable): C;
43
45
  delete(): void;
44
46
  isStateStale(id: Stringable): boolean;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { BlocklistModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 32826 */
18
+ /** @whatsapp 32826
19
+ * @whatsapp 132826 >= 2.2222.8
20
+ */
19
21
  export declare class BlocklistCollection extends Collection<BlocklistModel> {
20
22
  static model: BlocklistModel;
21
23
  blockContact(e?: any): any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { BusinessCategoriesResultModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 3754 */
18
+ /** @whatsapp 3754
19
+ * @whatsapp 203754 >= 2.2222.8
20
+ */
19
21
  export declare class BusinessCategoriesResultCollection extends Collection<BusinessCategoriesResultModel> {
20
22
  static model: BusinessCategoriesResultModel;
21
23
  static staleCollection?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { BusinessProfileModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 93581 */
18
+ /** @whatsapp 93581
19
+ * @whatsapp 493581 >= 2.2222.8
20
+ */
19
21
  export declare class BusinessProfileCollection extends Collection<BusinessProfileModel> {
20
22
  static model: BusinessProfileModel;
21
23
  static staleCollection?: any;
@@ -17,6 +17,7 @@ import { CallModel } from '../models';
17
17
  import { Collection } from './Collection';
18
18
  /** @whatsapp 60868
19
19
  * @whatsapp 31218 >= 2.2204.13
20
+ * @whatsapp 160868 >= 2.2222.8
20
21
  */
21
22
  export declare class CallCollection extends Collection<CallModel> {
22
23
  static model: CallModel;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { CartModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 12392 */
18
+ /** @whatsapp 12392
19
+ * @whatsapp 612392 >= 2.2222.8
20
+ */
19
21
  export declare class CartCollection extends Collection<CartModel> {
20
22
  static model: CartModel;
21
23
  static cachePolicy?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { CartItemModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 57037 */
18
+ /** @whatsapp 57037
19
+ * @whatsapp 457037 >= 2.2222.8
20
+ */
19
21
  export declare class CartItemCollection extends Collection<CartItemModel> {
20
22
  static model: CartItemModel;
21
23
  }
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { CatalogModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 99989 */
18
+ /** @whatsapp 99989
19
+ * @whatsapp 599989 >= 2.2222.8
20
+ */
19
21
  export declare class CatalogCollection extends Collection<CatalogModel> {
20
22
  static model: CatalogModel;
21
23
  static staleCollection?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ChatModel } from '../models';
17
17
  import { BaseCollection } from './BaseCollection';
18
- /** @whatsapp 69951 */
18
+ /** @whatsapp 69951
19
+ * @whatsapp 669951 >= 2.2222.8
20
+ */
19
21
  export declare class ChatCollection extends BaseCollection<ChatModel> {
20
22
  static model: ChatModel;
21
23
  static comparator(): any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ChatstateModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 30000 */
18
+ /** @whatsapp 30000
19
+ * @whatsapp 330000 >= 2.2222.8
20
+ */
19
21
  export declare class ChatstateCollection extends Collection<ChatstateModel> {
20
22
  static model: ChatstateModel;
21
23
  }
@@ -21,10 +21,14 @@ interface Option {
21
21
  merge: boolean;
22
22
  remove: boolean;
23
23
  }
24
- /** @whatsapp 31727 */
24
+ /** @whatsapp 31727
25
+ * @whatsapp 631727 >= 2.2222.8
26
+ */
25
27
  export declare interface Collection<M> extends EventEmitter, Pick<Array<M>, 'indexOf' | 'lastIndexOf' | 'every' | 'some' | 'forEach' | 'map' | 'filter' | 'reduce' | 'slice'> {
26
28
  }
27
- /** @whatsapp 31727 */
29
+ /** @whatsapp 31727
30
+ * @whatsapp 631727 >= 2.2222.8
31
+ */
28
32
  export declare class Collection<M, A = M | M[]> extends EventEmitter {
29
33
  static model: any;
30
34
  static comparator: (a: any, b: any) => number;
@@ -14,11 +14,12 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { ContactModel } from '../models';
17
- import { Collection } from './Collection';
18
- /** @whatsapp 19380 */
19
- export declare class ContactCollection extends Collection<ContactModel> {
17
+ import { BaseCollection } from './BaseCollection';
18
+ /** @whatsapp 19380
19
+ * @whatsapp 719380 >= 2.2222.8
20
+ */
21
+ export declare class ContactCollection extends BaseCollection<ContactModel> {
20
22
  static model: ContactModel;
21
- static cachePolicy?: any;
22
23
  checksum?: any;
23
24
  ensureSorted(): any;
24
25
  contactAdded(e?: any): any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { EmojiVariantModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 13185 */
18
+ /** @whatsapp 13185
19
+ * @whatsapp 513185 >= 2.2222.8
20
+ */
19
21
  export declare class EmojiVariantCollection extends Collection<EmojiVariantModel> {
20
22
  static model: EmojiVariantModel;
21
23
  static cachePolicy?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { GroupMetadataModel } from '../models';
17
17
  import { BaseCollection } from '.';
18
- /** @whatsapp 63928 */
18
+ /** @whatsapp 63928
19
+ * @whatsapp 963928 >= 2.2222.8
20
+ */
19
21
  export declare class GroupMetadataCollection extends BaseCollection<GroupMetadataModel> {
20
22
  static model: GroupMetadataModel;
21
23
  handlePendingInvite(): any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ChatModel, LabelModel } from '../models';
17
17
  import { BaseCollection } from './BaseCollection';
18
- /** @whatsapp 16770 */
18
+ /** @whatsapp 16770
19
+ * @whatsapp 316770 >= 2.2222.8
20
+ */
19
21
  export declare class LabelCollection extends BaseCollection<LabelModel> {
20
22
  static model: LabelModel;
21
23
  static staleCollection?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { LabelItemModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 34741 */
18
+ /** @whatsapp 34741
19
+ * @whatsapp 634741 >= 2.2222.8
20
+ */
19
21
  export declare class LabelItemCollection extends Collection<LabelItemModel> {
20
22
  static model: LabelItemModel;
21
23
  }
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { LiveLocationModel } from '../models';
17
17
  import { BaseCollection } from '.';
18
- /** @whatsapp 85865 */
18
+ /** @whatsapp 85865
19
+ * @whatsapp 985865 >= 2.2222.8
20
+ */
19
21
  export declare class LiveLocationCollection extends BaseCollection<LiveLocationModel> {
20
22
  static model: LiveLocationModel;
21
23
  static staleCollection?: any;
@@ -16,7 +16,9 @@
16
16
  import { Wid } from '..';
17
17
  import { ModelPropertiesContructor, MsgModel } from '../models';
18
18
  import { BaseCollection } from './BaseCollection';
19
- /** @whatsapp 59871 */
19
+ /** @whatsapp 59871
20
+ * @whatsapp 559871 >= 2.2222.8
21
+ */
20
22
  export declare class MsgCollection extends BaseCollection<MsgModel> {
21
23
  static model: MsgModel;
22
24
  lastReceivedReceipt?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { MsgInfoModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 17972 */
18
+ /** @whatsapp 17972
19
+ * @whatsapp 617972 >= 2.2222.8
20
+ */
19
21
  export declare class MsgInfoCollection extends Collection<MsgInfoModel> {
20
22
  static model: MsgInfoModel;
21
23
  static staleCollection?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { OrderModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 84312 */
18
+ /** @whatsapp 84312
19
+ * @whatsapp 584312 >= 2.2222.8
20
+ */
19
21
  export declare class OrderCollection extends Collection<OrderModel> {
20
22
  static model: OrderModel;
21
23
  static staleCollection?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { OrderItemModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 23412 */
18
+ /** @whatsapp 23412
19
+ * @whatsapp 823412 >= 2.2222.8
20
+ */
19
21
  export declare class OrderItemCollection extends Collection<OrderItemModel> {
20
22
  static model: OrderItemModel;
21
23
  }
@@ -17,6 +17,7 @@ import { ParticipantModel } from '../models';
17
17
  import { Collection } from './Collection';
18
18
  /** @whatsapp 96091
19
19
  * @whatsapp 54311 >= 2.2212.8
20
+ * @whatsapp 754311 >= 2.2222.8
20
21
  */
21
22
  export declare class ParticipantCollection extends Collection<ParticipantModel> {
22
23
  static model: ParticipantModel;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { PresenceModel } from '../models';
17
17
  import { BaseCollection } from './BaseCollection';
18
- /** @whatsapp 68315 */
18
+ /** @whatsapp 68315
19
+ * @whatsapp 868315 >= 2.2222.8
20
+ */
19
21
  export declare class PresenceCollection extends BaseCollection<PresenceModel> {
20
22
  static model: PresenceModel;
21
23
  static staleCollection?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ProductCollModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 12496 */
18
+ /** @whatsapp 12496
19
+ * @whatsapp 912496 >= 2.2222.8
20
+ */
19
21
  export declare class ProductCollCollection extends Collection<ProductCollModel> {
20
22
  static model: ProductCollModel;
21
23
  static staleCollection?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ProductModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 5641 */
18
+ /** @whatsapp 5641
19
+ * @whatsapp 105641 >= 2.2222.8
20
+ */
19
21
  export declare class ProductCollection extends Collection<ProductModel> {
20
22
  static model: ProductModel;
21
23
  getProductModels(e?: boolean): any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ProductImageModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 7514 */
18
+ /** @whatsapp 7514
19
+ * @whatsapp 307514 >= 2.2222.8
20
+ */
19
21
  export declare class ProductImageCollection extends Collection<ProductImageModel> {
20
22
  static model: ProductImageModel;
21
23
  }
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ProfilePicThumbModel } from '../models';
17
17
  import { BaseCollection } from './BaseCollection';
18
- /** @whatsapp 82039 */
18
+ /** @whatsapp 82039
19
+ * @whatsapp 582039 >= 2.2222.8
20
+ */
19
21
  export declare class ProfilePicThumbCollection extends BaseCollection<ProfilePicThumbModel> {
20
22
  static model: ProfilePicThumbModel;
21
23
  static staleCollection?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { QuickReplyModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 99662 */
18
+ /** @whatsapp 99662
19
+ * @whatsapp 999662 >= 2.2222.8
20
+ */
19
21
  export declare class QuickReplyCollection extends Collection<QuickReplyModel> {
20
22
  static model: QuickReplyModel;
21
23
  checksum?: any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ReactionsModel } from '../models';
17
17
  import { BaseCollection } from './BaseCollection';
18
- /** @whatsapp 57162 */
18
+ /** @whatsapp 57162
19
+ * @whatsapp 257162 >= 2.2222.8
20
+ */
19
21
  export declare class ReactionsCollection extends BaseCollection<ReactionsModel> {
20
22
  static model: ReactionsModel;
21
23
  static comparator(): any;
@@ -15,7 +15,9 @@
15
15
  */
16
16
  import { ReactionsModel, ReactionsSendersModel } from '../models';
17
17
  import { Collection } from './Collection';
18
- /** @whatsapp 81130 */
18
+ /** @whatsapp 81130
19
+ * @whatsapp 981130 >= 2.2222.8
20
+ */
19
21
  export declare class ReactionsSendersCollection extends Collection<ReactionsModel> {
20
22
  static model: ReactionsSendersModel;
21
23
  static comparator(): number;