@wppconnect/wa-js 3.18.8 → 3.19.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 (47) hide show
  1. package/CHANGELOG.md +1 -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/getMigrationState.d.ts +52 -0
  12. package/dist/conn/functions/index.d.ts +1 -0
  13. package/dist/order/functions/accept.d.ts +58 -0
  14. package/dist/order/functions/decline.d.ts +53 -0
  15. package/dist/order/functions/index.d.ts +3 -0
  16. package/dist/order/functions/update.d.ts +77 -0
  17. package/dist/order/index.d.ts +1 -0
  18. package/dist/order/types.d.ts +119 -0
  19. package/dist/whatsapp/enums/ACK.d.ts +5 -3
  20. package/dist/whatsapp/enums/PinExpiryDurationOption.d.ts +25 -0
  21. package/dist/whatsapp/enums/index.d.ts +1 -0
  22. package/dist/whatsapp/functions/addAndSendMessageEdit.d.ts +2 -2
  23. package/dist/whatsapp/functions/addAndSendMsgToChat.d.ts +2 -2
  24. package/dist/whatsapp/functions/contactFunctions.d.ts +8 -8
  25. package/dist/whatsapp/functions/createChat.d.ts +2 -0
  26. package/dist/whatsapp/functions/getPhoneLangPref.d.ts +25 -0
  27. package/dist/whatsapp/functions/index.d.ts +3 -0
  28. package/dist/whatsapp/functions/isFilterExcludedFromSearchTreatmentInInboxFlow.d.ts +1 -1
  29. package/dist/whatsapp/functions/isLidMigrated.d.ts +1 -1
  30. package/dist/whatsapp/functions/msgFindQuery.d.ts +4 -2
  31. package/dist/whatsapp/functions/queryOrder.d.ts +8 -7
  32. package/dist/whatsapp/functions/sendOrderStatusMessageAsMerchant.d.ts +47 -0
  33. package/dist/whatsapp/functions/sendPinInChatMsg.d.ts +4 -8
  34. package/dist/whatsapp/functions/updateMessageTable.d.ts +18 -0
  35. package/dist/whatsapp/index.d.ts +1 -0
  36. package/dist/whatsapp/misc/MediaPrep.d.ts +3 -2
  37. package/dist/whatsapp/misc/UserPrefs.d.ts +26 -7
  38. package/dist/whatsapp/misc/UsernameGatingUtils.d.ts +26 -0
  39. package/dist/whatsapp/misc/Wid.d.ts +8 -0
  40. package/dist/whatsapp/misc/index.d.ts +1 -0
  41. package/dist/whatsapp/models/ChatModel.d.ts +4 -1
  42. package/dist/whatsapp/models/MsgModel.d.ts +17 -1
  43. package/dist/whatsapp/types.d.ts +21 -0
  44. package/dist/wppconnect-wa.js +1 -1
  45. package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
  46. package/eslint.config.mjs +108 -0
  47. package/package.json +9 -11
@@ -0,0 +1,119 @@
1
+ /*!
2
+ * Copyright 2025 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 { MsgKey } from '../whatsapp';
17
+ /**
18
+ * Order item information
19
+ */
20
+ export interface OrderItem {
21
+ id: string;
22
+ name: string;
23
+ amount: number;
24
+ quantity: number;
25
+ isCustomItem?: boolean;
26
+ isQuantitySet?: boolean;
27
+ }
28
+ /**
29
+ * Order information structure
30
+ */
31
+ export interface OrderInfo {
32
+ items: OrderItem[];
33
+ totalAmount: number;
34
+ subtotal: number;
35
+ tax?: number;
36
+ shipping?: number;
37
+ discount?: number;
38
+ currency: string;
39
+ }
40
+ /**
41
+ * Options for updating an order status
42
+ */
43
+ export interface UpdateOrderOptions {
44
+ /** The message ID or message key of the order message */
45
+ msgId: string | MsgKey;
46
+ /** The new order status */
47
+ orderStatus: OrderStatus;
48
+ /** Optional note to include with the status update */
49
+ orderNote?: string;
50
+ /** The decimal offset for amount values (default: 2 for cents) */
51
+ offset?: number;
52
+ /** Reference ID for the order */
53
+ referenceId?: string;
54
+ /** Optional payment status update */
55
+ paymentStatus?: PaymentStatus;
56
+ /** Optional payment method */
57
+ paymentMethod?: string;
58
+ }
59
+ /**
60
+ * Order status values from WhatsApp's OrderStatus enum
61
+ * Based on WAWebOrderStatus module
62
+ */
63
+ export declare enum OrderStatus {
64
+ /** Order is pending confirmation */
65
+ Pending = "pending",
66
+ /** Order is being processed */
67
+ Processing = "processing",
68
+ /** Order has been partially shipped */
69
+ PartiallyShipped = "partially_shipped",
70
+ /** Order has been shipped */
71
+ Shipped = "shipped",
72
+ /** Order is complete */
73
+ Complete = "completed",
74
+ /** Order has been canceled */
75
+ Canceled = "canceled",
76
+ /** Payment has been requested */
77
+ PaymentRequested = "payment_requested",
78
+ /** Order is being prepared for shipping */
79
+ PreparingToShip = "preparing_to_ship",
80
+ /** Order has been delivered */
81
+ Delivered = "delivered",
82
+ /** Order has been confirmed */
83
+ Confirmed = "confirmed",
84
+ /** Order delivery is delayed */
85
+ Delayed = "delayed",
86
+ /** Order has failed */
87
+ Failed = "failed",
88
+ /** Order is out for delivery */
89
+ OutForDelivery = "out_for_delivery",
90
+ /** Order has been refunded */
91
+ Refunded = "refunded"
92
+ }
93
+ /**
94
+ * Payment status values from WhatsApp's OrderPaymentStatus enum
95
+ * Based on WAWebOrderPaymentStatus module
96
+ */
97
+ export declare enum PaymentStatus {
98
+ /** Payment is pending */
99
+ Pending = "pending",
100
+ /** Payment has been captured/completed */
101
+ Captured = "captured",
102
+ /** Payment has failed */
103
+ Failed = "failed",
104
+ /** Payment has been canceled */
105
+ Canceled = "canceled"
106
+ }
107
+ /**
108
+ * Order message status from Message$OrderMessage$OrderStatus protobuf enum
109
+ * This controls the UI state (whether "Accept Order" button is shown)
110
+ * Based on WAWebProtobufsE2E.pb.Message$OrderMessage$OrderStatus
111
+ */
112
+ export declare enum OrderMessageStatus {
113
+ /** Initial order inquiry state - shows "Accept Order" button */
114
+ INQUIRY = 1,
115
+ /** Order accepted by merchant - hides "Accept Order" button */
116
+ ACCEPTED = 2,
117
+ /** Order declined by merchant */
118
+ DECLINED = 3
119
+ }
@@ -13,9 +13,11 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- /** @whatsapp 35470
17
- * @whatsapp 69618 >= 2.2204.13
18
- * @whatsapp 535470 >= 2.2222.8
16
+ /**
17
+ * Versions when this enum was added/modified/revalidated:
18
+ * @whatsapp >= 2.2204.13
19
+ * @whatsapp >= 2.2222.8
20
+ * @whatsapp >= 2.3000.1029594945
19
21
  */
20
22
  export declare enum ACK {
21
23
  MD_DOWNGRADE = -7,
@@ -0,0 +1,25 @@
1
+ /*!
2
+ * Copyright 2025 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
+ /** @whatsapp WAWebPinMsgConstants >= 2.3000.1029839609
17
+ */
18
+ export declare enum PinExpiryDurationOption {
19
+ FiveSeconds = "FiveSeconds",
20
+ FifteenSeconds = "FifteenSeconds",
21
+ OneMinute = "OneMinute",
22
+ OneDay = "OneDay",
23
+ SevenDays = "SevenDays",
24
+ ThirtyDays = "ThirtyDays"
25
+ }
@@ -21,4 +21,5 @@ export * from './LogoutReason';
21
21
  export * from './MSG_TYPE';
22
22
  export * from './OUTWARD_TYPES';
23
23
  export * from './PIN_STATE';
24
+ export * from './PinExpiryDurationOption';
24
25
  export * from './SendMsgResult';
@@ -13,8 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { SendMsgResult } from '../enums';
17
16
  import { ModelPropertiesContructor, MsgModel } from '../models';
17
+ import { SendMsgResultObject } from '../types';
18
18
  /** @whatsapp 375399
19
19
  */
20
- export declare function addAndSendMessageEdit(editMsg: MsgModel, message: ModelPropertiesContructor<MsgModel>): Promise<[Promise<MsgModel>, Promise<SendMsgResult>]>;
20
+ export declare function addAndSendMessageEdit(editMsg: MsgModel, message: ModelPropertiesContructor<MsgModel>): Promise<[Promise<MsgModel>, Promise<SendMsgResultObject>]>;
@@ -13,10 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { SendMsgResult } from '../enums';
17
16
  import { ChatModel, ModelPropertiesContructor, MsgModel } from '../models';
17
+ import { SendMsgResultObject } from '../types';
18
18
  /** @whatsapp 75887
19
19
  * @whatsapp 975887 >= 2.2222.8
20
20
  * @whatsapp 623631 >= 2.2228.4
21
21
  */
22
- export declare function addAndSendMsgToChat(chat: ChatModel, message: ModelPropertiesContructor<MsgModel>): Promise<[Promise<MsgModel>, Promise<SendMsgResult>]>;
22
+ export declare function addAndSendMsgToChat(chat: ChatModel, message: ModelPropertiesContructor<MsgModel>): Promise<[Promise<MsgModel>, Promise<SendMsgResultObject>]>;
@@ -14,10 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { ContactModel } from '../models';
17
- /**
18
- * @whatsapp 660666 >= 2.2327.4
19
- */
20
- export declare function getMentionName(contact: ContactModel): string;
21
17
  /**
22
18
  * @whatsapp 660666 >= 2.2327.4
23
19
  */
@@ -78,10 +74,6 @@ export declare function getIsSupportAccount(contact: ContactModel): any;
78
74
  * @whatsapp 660666 >= 2.2327.4
79
75
  */
80
76
  export declare function getIsWAContact(contact: ContactModel): any;
81
- /**
82
- * @whatsapp 660666 >= 2.2327.4
83
- */
84
- export declare function getIsMyContact(contact: ContactModel): boolean;
85
77
  /**
86
78
  * @whatsapp 660666 >= 2.2327.4
87
79
  */
@@ -147,3 +139,11 @@ export declare function getFormattedName(contact: ContactModel): any;
147
139
  * @whatsapp 714574 >= 2.2327.4
148
140
  */
149
141
  export declare function getFormattedUser(contact: ContactModel): any;
142
+ /**
143
+ * @whatsapp >= 2.3000.1030318976 (last check)
144
+ */
145
+ export declare function getIsMyContact(contact: ContactModel): boolean;
146
+ /**
147
+ * @whatsapp >= 2.3000.1030318976 (last check)
148
+ */
149
+ export declare function getMentionName(contact: ContactModel): string;
@@ -15,5 +15,7 @@
15
15
  */
16
16
  /**
17
17
  * @whatsapp WAWebCreateChat >= 2.3000.0
18
+ * findChat internally uses this function to create a new chat
19
+ * to create a chat use Chat.findChat(wid) instead
18
20
  */
19
21
  export declare function createChat(chatParams: any, context: any, options: any, extra: any): Promise<any>;
@@ -0,0 +1,25 @@
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
+ * Get phone language preference
18
+ * @whatsapp WAWebUserPrefsLocales
19
+ */
20
+ export declare function getPhoneLangPref(): string | null;
21
+ /**
22
+ * Set phone language preference
23
+ * @whatsapp WAWebUserPrefsLocales
24
+ */
25
+ export declare function setPhoneLangPref(locale: string): void;
@@ -81,6 +81,7 @@ export * from './getNextLabelId';
81
81
  export * from './getNumChatsPinned';
82
82
  export * from './getOrderInfo';
83
83
  export * from './getParticipants';
84
+ export * from './getPhoneLangPref';
84
85
  export * from './getPhoneNumber';
85
86
  export * from './getPrivacyDisallowedListTable';
86
87
  export * from './getPushname';
@@ -138,6 +139,7 @@ export * from './sendExitGroup';
138
139
  export * from './sendGroupParticipants';
139
140
  export * from './sendJoinGroupViaInvite';
140
141
  export * from './sendNewsletterMessageJob';
142
+ export * from './sendOrderStatusMessageAsMerchant';
141
143
  export * from './sendPinInChatMsg';
142
144
  export * from './sendQueryExists';
143
145
  export * from './sendQueryGroupInvite';
@@ -163,6 +165,7 @@ export * from './unmuteNewsletter';
163
165
  export * from './updateCart';
164
166
  export * from './updateCartEnabled';
165
167
  export * from './updateDBForGroupAction';
168
+ export * from './updateMessageTable';
166
169
  export * from './updateNewsletterMsgRecord';
167
170
  export * from './updateParticipants';
168
171
  export * from './uploadMedia';
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare function isFilterExcludedFromSearchTreatmentInInboxFlow(type?: string): void;
16
+ export declare function isFilterExcludedFromSearchTreatmentInInboxFlow(type?: string): boolean;
@@ -16,4 +16,4 @@
16
16
  /**
17
17
  * @whatsapp WAWebLidMigrationUtils >= 2.3000.x
18
18
  */
19
- export declare function isLidMigrated(): boolean | (() => any);
19
+ export declare function isLidMigrated(): boolean;
@@ -24,5 +24,7 @@ export interface MsgFindQueryParams {
24
24
  participant?: any;
25
25
  media?: 'url' | 'document';
26
26
  }
27
- /** @whatsapp 76581 */
28
- export declare function msgFindQuery(direction: 'after' | 'before' | 'media', params: MsgFindQueryParams): Promise<ModelPropertiesContructor<MsgModel>[] | any>;
27
+ /**
28
+ * @whatsapp WAWebDBMessageFindLocal >= 2.3000.1029x
29
+ */
30
+ export declare function msgFindQuery(type: 'after' | 'before' | 'call_log' | 'event' | 'media' | 'search' | 'star', params: MsgFindQueryParams): Promise<ModelPropertiesContructor<MsgModel>[] | any>;
@@ -19,14 +19,15 @@ export declare function queryOrder(productId: string, imageWidth: number, imageH
19
19
  createdAt: number;
20
20
  products: {
21
21
  id: string;
22
- price: number;
23
- thumbnailId: string;
24
- thumbnailUrl: string;
25
- currency: string;
22
+ price: number | null;
23
+ thumbnailId: string | null;
24
+ thumbnailUrl: string | null;
25
+ currency: string | null;
26
26
  name: string;
27
- quantity: number;
27
+ quantity: number | null;
28
+ properties: [string, string][];
28
29
  }[];
29
- subtotal: number;
30
- total: number;
30
+ subtotal: number | null;
31
+ total: number | null;
31
32
  tax: number | null;
32
33
  }>;
@@ -0,0 +1,47 @@
1
+ /*!
2
+ * Copyright 2025 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 interface SendOrderStatusParams {
17
+ chat: any;
18
+ sellerJid: string | any;
19
+ orderInfo: {
20
+ items: Array<{
21
+ id: string;
22
+ name: string;
23
+ amount: number;
24
+ quantity: number;
25
+ isCustomItem?: boolean;
26
+ isQuantitySet?: boolean;
27
+ }>;
28
+ totalAmount: number;
29
+ subtotal: number;
30
+ tax?: number;
31
+ shipping?: number;
32
+ discount?: number;
33
+ currency: string;
34
+ referenceId?: string;
35
+ };
36
+ orderNote?: string;
37
+ orderStatus: string;
38
+ offset: number;
39
+ paymentStatus: string;
40
+ paymentMethod?: string;
41
+ contextInfo?: any;
42
+ }
43
+ /**
44
+ * Function to send order status update message as merchant
45
+ * @internal
46
+ */
47
+ export declare function sendOrderStatusMessageAsMerchant(params: SendOrderStatusParams): Promise<any>;
@@ -13,13 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { SendMsgResult } from '../enums';
17
- import { PIN_STATE } from '../enums/PIN_STATE';
16
+ import { ACK, PIN_STATE, PinExpiryDurationOption } from '../enums';
18
17
  import { MsgModel } from '../models';
19
- /** @whatsapp WAWebSendPinMessageAction >= 2.3000.1012170943
18
+ import { SendMsgResultObject } from '../types';
19
+ /** @whatsapp WAWebSendPinMessageAction >= 2.3000.1029839609
20
20
  */
21
- export declare function sendPinInChatMsg(msg: MsgModel, type: PIN_STATE, time?: number, d?: any): Promise<{
22
- count: number;
23
- messageSendResult: SendMsgResult;
24
- t: number;
25
- }>;
21
+ export declare function sendPinInChatMsg(msg: MsgModel, type: PIN_STATE, pinExpiryOption?: PinExpiryDurationOption, ack?: ACK): Promise<SendMsgResultObject | null>;
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * Copyright 2025 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 { MsgKey } from '../misc';
17
+ /** @whatsapp WAWebDBUpdateMessageTable */
18
+ export declare function updateMessageTable(msgKey: MsgKey, updateFields: Record<string, any>): Promise<void>;
@@ -22,4 +22,5 @@ export * from './misc';
22
22
  export * from './models';
23
23
  export * as multidevice from './multidevice';
24
24
  export * from './stores';
25
+ export * from './types';
25
26
  export * as websocket from './websocket';
@@ -14,7 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { ChatModel, MediaDataModel, ModelPropertiesContructor, MsgModel } from '..';
17
- import { OUTWARD_TYPES, SendMsgResult } from '../enums';
17
+ import { OUTWARD_TYPES } from '../enums';
18
+ import { SendMsgResultObject } from '../types';
18
19
  import { OpaqueData } from '.';
19
20
  /** @whatsapp 78986
20
21
  * @whatsapp 778986 >= 2.2222.8
@@ -43,7 +44,7 @@ export declare namespace MediaPrep {
43
44
  forwardedFromWeb?: boolean;
44
45
  ctwaContext?: any;
45
46
  isViewOnce?: boolean;
46
- }): Promise<SendMsgResult>;
47
+ }): Promise<SendMsgResultObject>;
47
48
  waitForPrep(): Promise<MediaDataModel>;
48
49
  }
49
50
  }
@@ -15,28 +15,43 @@
15
15
  */
16
16
  import { Wid } from './Wid';
17
17
  /**
18
- * @whatsapp 459857 >= 2.2310.5
18
+ * @whatsapp >= 2.3000
19
19
  */
20
20
  export declare namespace UserPrefs {
21
- function getMaybeMeDevicePn(...args: any[]): any;
22
- function assertGetMe(): Wid;
23
- function assertGetMeUser(): Wid;
21
+ function clearGetMaybeLidUserCache(...args: any[]): any;
24
22
  function clearGetMaybeMePnUserCache(...args: any[]): any;
25
- function getMaybeMeDisplayName(...args: any[]): any;
26
23
  function getMaybeMeDeviceLid(...args: any[]): any;
24
+ function getMaybeMeDevicePn(...args: any[]): any;
25
+ function getMaybeMeDisplayName(...args: any[]): any;
27
26
  function getMaybeMeLidUser(...args: any[]): any;
28
27
  function getMaybeMePnUser(): Wid;
29
28
  function getMaybeMeUser(): Wid;
30
- function getMePNandLIDWids(...args: any[]): any;
31
- function getMeUser(): Wid;
29
+ function getMeDeviceLidOrThrow(...args: any[]): any;
30
+ function getMeDevicePnOrThrow(...args: any[]): any;
31
+ function getMeDisplayNameOrThrow(...args: any[]): any;
32
+ function getMeLidUserOrThrow(...args: any[]): any;
33
+ function getMePNandLIDWids(...args: any[]): [Wid | undefined, Wid | undefined];
34
+ function getMePnUserOrThrow(...args: any[]): any;
35
+ function getUnknownId(...args: any[]): any;
32
36
  function isMeAccount(...args: any[]): any;
37
+ function isMeAccountNonLid(...args: any[]): any;
33
38
  function isMeDevice(...args: any[]): any;
34
39
  function isMePrimary(...args: any[]): any;
35
40
  function isMePrimaryNonLid(...args: any[]): any;
41
+ function isMeUser(...args: any[]): any;
36
42
  function isSerializedWidMe(...args: any[]): any;
37
43
  function setMe(...args: any[]): any;
38
44
  function setMeDisplayName(...args: any[]): any;
39
45
  function setMeLid(...args: any[]): any;
46
+ function setUnknownId(...args: any[]): any;
47
+ /**
48
+ * @deprecated
49
+ */
50
+ function assertGetMe(): Wid;
51
+ /**
52
+ * @deprecated
53
+ */
54
+ function assertGetMeUser(): Wid;
40
55
  /**
41
56
  * @deprecated
42
57
  */
@@ -45,6 +60,10 @@ export declare namespace UserPrefs {
45
60
  * @deprecated
46
61
  */
47
62
  function getMeDevicePn(...args: any[]): any;
63
+ /**
64
+ * @deprecated
65
+ */
66
+ function getMeUser(): Wid;
48
67
  /**
49
68
  * @deprecated
50
69
  */
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright 2025 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 WAWebUsernameGatingUtils
18
+ */
19
+ export declare namespace UsernameGatingUtils {
20
+ /**
21
+ * Check if username feature is supported
22
+ * @whatsapp >= 2.3000.1030318976
23
+ * @returns true if username feature is supported
24
+ */
25
+ function usernameSupported(): boolean;
26
+ }
@@ -41,6 +41,14 @@ export declare class Wid {
41
41
  isServer(): boolean;
42
42
  isStatusV3(): boolean;
43
43
  isStatus(): boolean;
44
+ /**
45
+ * @whatsapp >= 2.3000.1029594945
46
+ * this.server==="c.us" ||
47
+ * this.server==="lid" ||
48
+ * this.server==="bot" ||
49
+ * this.server==="hosted" || (probably used for cloud api)
50
+ * this.server==="hosted.lid" (probably used for cloud api)
51
+ */
44
52
  isUser(): boolean;
45
53
  isLid(): boolean;
46
54
  isUserNotPSA(): boolean;
@@ -43,6 +43,7 @@ export * from './ServerProps';
43
43
  export * from './ServerPropsConstants';
44
44
  export * from './Socket';
45
45
  export * from './Stream';
46
+ export * from './UsernameGatingUtils';
46
47
  export * from './UserPrefs';
47
48
  export * from './USyncQuery';
48
49
  export * from './USyncUser';
@@ -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;
@@ -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
+ }