@wppconnect/wa-js 3.18.8 → 3.19.2

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 (52) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/README.md +78 -26
  3. package/dist/chat/functions/getMessages.d.ts +7 -0
  4. package/dist/chat/functions/list.d.ts +4 -0
  5. package/dist/chat/functions/openChatAt.d.ts +1 -1
  6. package/dist/chat/functions/openChatBottom.d.ts +1 -1
  7. package/dist/chat/functions/openChatFromUnread.d.ts +1 -1
  8. package/dist/chat/functions/pinMsg.d.ts +19 -5
  9. package/dist/chat/functions/sendTextMessage.d.ts +2 -3
  10. package/dist/chat/types.d.ts +4 -3
  11. package/dist/conn/functions/getBuildConstants.d.ts +31 -2
  12. package/dist/conn/functions/getMigrationState.d.ts +52 -0
  13. package/dist/conn/functions/index.d.ts +2 -1
  14. package/dist/contact/functions/save.d.ts +6 -2
  15. package/dist/order/functions/accept.d.ts +58 -0
  16. package/dist/order/functions/decline.d.ts +53 -0
  17. package/dist/order/functions/index.d.ts +3 -0
  18. package/dist/order/functions/update.d.ts +77 -0
  19. package/dist/order/index.d.ts +1 -0
  20. package/dist/order/types.d.ts +119 -0
  21. package/dist/whatsapp/enums/ACK.d.ts +5 -3
  22. package/dist/whatsapp/enums/PinExpiryDurationOption.d.ts +25 -0
  23. package/dist/whatsapp/enums/index.d.ts +1 -0
  24. package/dist/whatsapp/functions/addAndSendMessageEdit.d.ts +2 -2
  25. package/dist/whatsapp/functions/addAndSendMsgToChat.d.ts +2 -2
  26. package/dist/whatsapp/functions/contactFunctions.d.ts +8 -8
  27. package/dist/whatsapp/functions/createChat.d.ts +2 -0
  28. package/dist/whatsapp/functions/deleteContactAction.d.ts +39 -0
  29. package/dist/whatsapp/functions/getPhoneLangPref.d.ts +25 -0
  30. package/dist/whatsapp/functions/index.d.ts +3 -0
  31. package/dist/whatsapp/functions/isFilterExcludedFromSearchTreatmentInInboxFlow.d.ts +1 -1
  32. package/dist/whatsapp/functions/isLidMigrated.d.ts +1 -1
  33. package/dist/whatsapp/functions/msgFindQuery.d.ts +4 -2
  34. package/dist/whatsapp/functions/queryOrder.d.ts +8 -7
  35. package/dist/whatsapp/functions/saveContactAction.d.ts +21 -2
  36. package/dist/whatsapp/functions/sendOrderStatusMessageAsMerchant.d.ts +47 -0
  37. package/dist/whatsapp/functions/sendPinInChatMsg.d.ts +4 -8
  38. package/dist/whatsapp/functions/updateMessageTable.d.ts +18 -0
  39. package/dist/whatsapp/index.d.ts +1 -0
  40. package/dist/whatsapp/misc/MediaPrep.d.ts +3 -2
  41. package/dist/whatsapp/misc/UserPrefs.d.ts +26 -7
  42. package/dist/whatsapp/misc/UsernameGatingUtils.d.ts +26 -0
  43. package/dist/whatsapp/misc/Wid.d.ts +8 -0
  44. package/dist/whatsapp/misc/index.d.ts +1 -0
  45. package/dist/whatsapp/models/ChatModel.d.ts +4 -1
  46. package/dist/whatsapp/models/ContactModel.d.ts +1 -0
  47. package/dist/whatsapp/models/MsgModel.d.ts +17 -1
  48. package/dist/whatsapp/types.d.ts +21 -0
  49. package/dist/wppconnect-wa.js +1 -1
  50. package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
  51. package/eslint.config.mjs +108 -0
  52. package/package.json +11 -13
@@ -23,7 +23,7 @@ interface Props extends PropsChatBase {
23
23
  lastReceivedKey?: MsgKey;
24
24
  t?: number;
25
25
  unreadCount: number;
26
- archive?: any;
26
+ archive?: boolean;
27
27
  isReadOnly: boolean;
28
28
  isAnnounceGrpRestrict: boolean;
29
29
  modifyTag?: any;
@@ -65,7 +65,10 @@ interface Session extends SessionChatBase {
65
65
  composeQuotedMsg?: any;
66
66
  composeQuotedMsgRemoteJid?: any;
67
67
  quotedMsgAdminGroupJid?: any;
68
+ groupSafetyChecked?: boolean;
68
69
  groupMetadata?: GroupMetadataModel;
70
+ groupType?: any;
71
+ newsletterMetadata?: any;
69
72
  presence?: any;
70
73
  mute: MuteModel;
71
74
  contact?: any;
@@ -32,6 +32,7 @@ interface Props {
32
32
  labels?: string[];
33
33
  disappearingModeDuration?: any;
34
34
  disappearingModeSettingTimestamp?: any;
35
+ username?: string;
35
36
  }
36
37
  interface Session {
37
38
  stale?: any;
@@ -198,7 +198,23 @@ interface Props {
198
198
  broadcastParticipants?: any;
199
199
  broadcastEphSettings?: any;
200
200
  broadcastId?: any;
201
- ctwaContext?: any;
201
+ ctwaContext?: {
202
+ conversionSource?: string;
203
+ conversionData?: object;
204
+ sourceUrl?: string;
205
+ description?: string;
206
+ title?: string;
207
+ thumbnail?: string;
208
+ thumbnailUrl?: string;
209
+ mediaType?: number;
210
+ adContextPreviewDismissed?: boolean;
211
+ sourceApp?: string;
212
+ greetingMessageBody?: string;
213
+ automatedGreetingMessageShown?: boolean;
214
+ sourceId?: string;
215
+ originalImageUrl?: string;
216
+ mediaUrl?: string;
217
+ };
202
218
  list?: {
203
219
  buttonText: string;
204
220
  description: string;
@@ -0,0 +1,21 @@
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 { SendMsgResult } from './enums';
17
+ export interface SendMsgResultObject {
18
+ messageSendResult: SendMsgResult;
19
+ t?: number;
20
+ count?: number | null;
21
+ }