talkyzap-wapp-api 1.0.13 → 1.0.15

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 (34) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +1 -1
  3. package/dist/assert/assertColor.d.ts +4 -4
  4. package/dist/cart/functions/submit.d.ts +0 -16
  5. package/dist/chat/functions/sendFileMessage.d.ts +2 -2
  6. package/dist/conn/functions/setLimit.d.ts +2 -0
  7. package/dist/contact/functions/index.d.ts +2 -0
  8. package/dist/contact/functions/queryExists.d.ts +1 -0
  9. package/dist/contact/functions/remove.d.ts +27 -0
  10. package/dist/contact/functions/save.d.ts +33 -0
  11. package/dist/eventEmitter/index.d.ts +25 -25
  12. package/dist/profile/functions/editBusinessProfile.d.ts +60 -26
  13. package/dist/whatsapp/functions/canSaveAsMyContacts.d.ts +20 -0
  14. package/dist/whatsapp/functions/contactFunctions.d.ts +5 -0
  15. package/dist/whatsapp/functions/createChatRecord.d.ts +38 -0
  16. package/dist/whatsapp/functions/deleteContactAction.d.ts +19 -0
  17. package/dist/whatsapp/functions/fetchMexGroupInviteCode.d.ts +22 -0
  18. package/dist/whatsapp/functions/findChat.d.ts +1 -1
  19. package/dist/whatsapp/functions/getPhoneNumber.d.ts +20 -0
  20. package/dist/whatsapp/functions/index.d.ts +10 -2
  21. package/dist/whatsapp/functions/isLidMigrated.d.ts +19 -0
  22. package/dist/whatsapp/functions/productVisibilitySet.d.ts +1 -1
  23. package/dist/whatsapp/functions/saveContactAction.d.ts +26 -0
  24. package/dist/whatsapp/functions/sendQueryGroupInvite.d.ts +35 -32
  25. package/dist/whatsapp/functions/shouldHaveAccountLid.d.ts +19 -0
  26. package/dist/whatsapp/functions/toUserLid.d.ts +20 -0
  27. package/dist/whatsapp/misc/ApiContact.d.ts +41 -0
  28. package/dist/whatsapp/misc/ServerPropsConstants.d.ts +30 -0
  29. package/dist/whatsapp/misc/UserPrefs.d.ts +6 -1
  30. package/dist/whatsapp/misc/WidFactory.d.ts +3 -0
  31. package/dist/whatsapp/misc/index.d.ts +3 -1
  32. package/dist/wppconnect-wa.js +1 -1
  33. package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
  34. package/package.json +17 -17
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2024 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 WAWebDeleteContactAction >= 2.3000.0
18
+ */
19
+ export declare function deleteContactAction(number: string): Promise<void>;
@@ -0,0 +1,22 @@
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 '..';
17
+ /**
18
+ * @whatsapp WAWebMexFetchGroupInviteCodeJob
19
+ */
20
+ export declare function fetchMexGroupInviteCode(groupId: Wid): Promise<{
21
+ inviteCode: string;
22
+ }>;
@@ -19,4 +19,4 @@ import { ChatModel } from '../models';
19
19
  * @whatsapp 650101 >= 2.2222.8
20
20
  * @whatsapp 211739 >= 2.2228.4
21
21
  */
22
- export declare function findChat(wid: Wid): Promise<ChatModel>;
22
+ export declare function findChat(wid: Wid, type: 'createChat' | 'chatListUtils' | 'username_contactless_search'): Promise<ChatModel>;
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Copyright 2024 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
+ /**
18
+ * @whatsapp WAWebApiContact
19
+ */
20
+ export declare function getPhoneNumber(wid: Wid): any;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2023 WPPConnect Team
2
+ * Copyright 2025 WPPConnect Team
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -22,12 +22,14 @@ export * from './calculateFilehashFromBlob';
22
22
  export * from './canEditCaption';
23
23
  export * from './canEditMsg';
24
24
  export * from './canReplyMsg';
25
+ export * from './canSaveAsMyContacts';
25
26
  export * from './changeOptInStatusForExternalWebBeta';
26
27
  export * from './checkChatExistedOrCreate';
27
28
  export * from './collections';
28
29
  export * from './colorIndexToHex';
29
30
  export * from './contactFunctions';
30
31
  export * from './createChat';
32
+ export * from './createChatRecord';
31
33
  export * from './createEventCallLink';
32
34
  export * from './createFanoutMsgStanza';
33
35
  export * from './createGroup';
@@ -36,6 +38,7 @@ export * from './createNewsletterQuery';
36
38
  export * from './createOrder';
37
39
  export * from './createOrUpdateReactions';
38
40
  export * from './currencyForCountryShortcode';
41
+ export * from './deleteContactAction';
39
42
  export * from './deleteNewsletter';
40
43
  export * from './editBusinessProfile';
41
44
  export * from './editNewsletterMetadataAction';
@@ -46,6 +49,7 @@ export * from './encryptAndSendSenderKeyMsg';
46
49
  export * from './encryptAndSendStatusMsg';
47
50
  export * from './encryptMsgProtobuf';
48
51
  export * from './fetchLinkPreview';
52
+ export * from './fetchMexGroupInviteCode';
49
53
  export * from './findChat';
50
54
  export * from './findCommonGroups';
51
55
  export * from './findFirstWebLink';
@@ -76,6 +80,7 @@ export * from './getNextLabelId';
76
80
  export * from './getNumChatsPinned';
77
81
  export * from './getOrderInfo';
78
82
  export * from './getParticipants';
83
+ export * from './getPhoneNumber';
79
84
  export * from './getPrivacyDisallowedListTable';
80
85
  export * from './getPushname';
81
86
  export * from './getQuotedMsgObj';
@@ -94,13 +99,13 @@ export * from './initializeAltDeviceLinking';
94
99
  export * from './isAnimatedWebp';
95
100
  export * from './isAuthenticated';
96
101
  export * from './isFilterExcludedFromSearchTreatmentInInboxFlow';
102
+ export * from './isLidMigrated';
97
103
  export * from './isRegistered';
98
104
  export * from './isUnreadTypeMsg';
99
105
  export * from './isWid';
100
106
  export * from './joinGroupViaInvite';
101
107
  export * from './keepMessage';
102
108
  export * from './labelAddAction';
103
- export * from './labelAddAction';
104
109
  export * from './markSeen';
105
110
  export * from './mediaTypeFromProtobuf';
106
111
  export * from './membershipApprovalRequestAction';
@@ -122,6 +127,7 @@ export * from './randomId';
122
127
  export * from './removeStatusMessage';
123
128
  export * from './resetGroupInviteCode';
124
129
  export * from './revokeStatus';
130
+ export * from './saveContactAction';
125
131
  export * from './selectChatForOneOnOneMessage';
126
132
  export * from './sendClear';
127
133
  export * from './sendCreateCommunity';
@@ -143,11 +149,13 @@ export * from './setGroup';
143
149
  export * from './setPin';
144
150
  export * from './setPrivacyForOneCategory';
145
151
  export * from './setPushname';
152
+ export * from './shouldHaveAccountLid';
146
153
  export * from './status';
147
154
  export * from './STATUS_JID';
148
155
  export * from './statusEnable';
149
156
  export * from './subscribePresence';
150
157
  export * from './syncABPropsTask';
158
+ export * from './toUserLid';
151
159
  export * from './typeAttributeFromProtobuf';
152
160
  export * from './unixTime';
153
161
  export * from './unmuteNewsletter';
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2024 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 WAWebLidMigrationUtils >= 2.3000.x
18
+ */
19
+ export declare function isLidMigrated(): boolean;
@@ -18,4 +18,4 @@ export interface ProductVisibilitySetParams {
18
18
  productId: number;
19
19
  }
20
20
  /** @whatsapp 621374 >= 2.2228.14 */
21
- export declare function productVisibilitySet(params: ProductVisibilitySetParams[]): any;
21
+ export declare function productVisibilitySet(productId: string, isHidden: boolean): any;
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright 2024 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 WAWebSaveContactAction >= 2.3000.0
18
+ */
19
+ /**
20
+ * @param user 5521980809090
21
+ * @param userToDelete 5521980809090
22
+ * @param name Contact Name
23
+ * @param surname Contact Surname
24
+ * @param syncToAddressbook Sync to Addressbook boolean
25
+ */
26
+ export declare function saveContactAction(userToCreate: string, userToDelete: string | null, name?: any, surname?: any, syncToAddressbook?: boolean): Promise<undefined>;
@@ -15,40 +15,43 @@
15
15
  */
16
16
  import { Wid } from '..';
17
17
  export interface QueryGroupInviteResult {
18
- announce: boolean;
19
- creation: number;
20
- /** description of the group; linebreaks are formatted using `"\n"` */
21
- desc: string;
22
- descId: string;
23
- descOwner?: Wid;
24
- descTime: number;
25
- id: Wid;
26
- noFrequentlyForwarded: boolean;
27
- owner?: Wid;
28
- parent: boolean;
29
- participants: {
18
+ groupInfo: {
19
+ announce: boolean;
20
+ creation: number;
21
+ /** description of the group; linebreaks are formatted using `"\n"` */
22
+ desc: string;
23
+ descId: string;
24
+ descOwner?: Wid;
25
+ descTime: number;
30
26
  id: Wid;
31
- isAdmin: boolean;
32
- isSuperAdmin: boolean;
33
- }[];
34
- pvId?: string;
35
- restrict: boolean;
36
- /** how many members the group currently has */
37
- size: number;
27
+ noFrequentlyForwarded: boolean;
28
+ owner?: Wid;
29
+ parent: boolean;
30
+ participants: {
31
+ id: Wid;
32
+ isAdmin: boolean;
33
+ isSuperAdmin: boolean;
34
+ }[];
35
+ pvId?: string;
36
+ restrict: boolean;
37
+ /** how many members the group currently has */
38
+ size: number;
39
+ status: number;
40
+ /** title of the group */
41
+ subject: string;
42
+ subjectOwner?: Wid;
43
+ subjectTime: number;
44
+ support: boolean;
45
+ suspended: boolean;
46
+ isParentGroup: boolean;
47
+ isParentGroupClosed: boolean;
48
+ defaultSubgroup: boolean;
49
+ generalSubgroup: boolean;
50
+ membershipApprovalMode: boolean;
51
+ isLidAddressingMode: boolean;
52
+ generalChatAutoAddDisabled: boolean;
53
+ };
38
54
  status: number;
39
- /** title of the group */
40
- subject: string;
41
- subjectOwner?: Wid;
42
- subjectTime: number;
43
- support: boolean;
44
- suspended: boolean;
45
- isParentGroup: boolean;
46
- isParentGroupClosed: boolean;
47
- defaultSubgroup: boolean;
48
- generalSubgroup: boolean;
49
- membershipApprovalMode: boolean;
50
- isLidAddressingMode: boolean;
51
- generalChatAutoAddDisabled: boolean;
52
55
  }
53
56
  /** @whatsapp 10790
54
57
  * @whatsapp 810790 >= 2.2222.8
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2024 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 WAWebLidMigrationUtils >= 2.3000.x
18
+ */
19
+ export declare function shouldHaveAccountLid(): boolean;
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Copyright 2024 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
+ /**
18
+ * @whatsapp WAWebLidMigrationUtils >= 2.3000.x
19
+ */
20
+ export declare function toUserLid(wid: Wid): Wid;
@@ -0,0 +1,41 @@
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 './Wid';
17
+ /** @whatsapp WAWebApiContact
18
+ */
19
+ export declare namespace ApiContact {
20
+ function checkPnToLidMapping(a?: any, b?: any): any;
21
+ function clearLidPnMappingCache(): any;
22
+ function createOrMergeAddressBookContacts(a?: any): any;
23
+ function deleteAddressBookContacts(a?: any): any;
24
+ function getAccountLidFromChat(a?: any): Wid;
25
+ function getAllLidContacts(): Wid[];
26
+ function getAlternateDeviceWid(a?: any): Wid;
27
+ function getAlternateUserWid(a?: any): Wid;
28
+ function getContactHash(a?: any): any;
29
+ function getContactRecord(a?: any): any;
30
+ function getContactUsername(a?: any): any;
31
+ function getCurrentLid(a?: any): any;
32
+ function getCurrentLidDevice(a?: any): any;
33
+ function getLatestLid(a?: any): any;
34
+ function getPhoneNumber(wid: Wid): Wid;
35
+ function getPnIfLidIsLatestMapping(a?: any): any;
36
+ function hasLidMapping(a?: any): any;
37
+ function isAddressBookContact(a?: any): any;
38
+ function setNotAddressBookContacts(a?: any): any;
39
+ function updateContactAdvHostedType(a?: any, b?: any): any;
40
+ function updateLidMetadata(a?: any, b?: any): any;
41
+ }
@@ -0,0 +1,30 @@
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 WAWebServerPropConstants
18
+ */
19
+ interface ServerPropsModel {
20
+ MMS_VCARD_AUTODOWNLOAD_SIZE_KB: number;
21
+ VCARD_AS_DOCUMENT_SIZE_KB: number;
22
+ VCARD_MAX_SIZE_KB: number;
23
+ MULTICAST_LIMIT_GLOBAL: number;
24
+ PTT_PLAYBACK_SPEED_HIDE_DELAY: number;
25
+ DEFAULT_MAX_FILE_SIZE_BYTES: number;
26
+ MAX_FILE_SIZE_BYTES: number;
27
+ UNINITIALIZED_VALUE_WEB_BIZ_PROFILE_OPTIONS: number;
28
+ }
29
+ export declare const ServerPropsConstants: ServerPropsModel;
30
+ export {};
@@ -18,6 +18,7 @@ import { Wid } from './Wid';
18
18
  * @whatsapp 459857 >= 2.2310.5
19
19
  */
20
20
  export declare namespace UserPrefs {
21
+ function getMeDevicePn(...args: any[]): any;
21
22
  function assertGetMe(): Wid;
22
23
  function assertGetMeUser(): Wid;
23
24
  function clearGetMaybeMeUserCache(...args: any[]): any;
@@ -25,7 +26,6 @@ export declare namespace UserPrefs {
25
26
  function getMaybeMeLid(...args: any[]): any;
26
27
  function getMaybeMeLidUser(...args: any[]): any;
27
28
  function getMaybeMeUser(): Wid;
28
- function getMe(...args: any[]): any;
29
29
  function getMePNandLIDWids(...args: any[]): any;
30
30
  function getMeUser(): Wid;
31
31
  function isMeAccount(...args: any[]): any;
@@ -36,4 +36,9 @@ export declare namespace UserPrefs {
36
36
  function setMe(...args: any[]): any;
37
37
  function setMeDisplayName(...args: any[]): any;
38
38
  function setMeLid(...args: any[]): any;
39
+ /**
40
+ * @deprecated
41
+ * @whatsapp 498050 >= 2.3000.1026
42
+ **/
43
+ function getMe(...args: any[]): any;
39
44
  }
@@ -29,5 +29,8 @@ export declare namespace WidFactory {
29
29
  function isWidlike(wid: any): wid is Wid;
30
30
  function toChatWid(wid: Wid): Wid;
31
31
  function toUserWid(wid: Wid): Wid;
32
+ function toGroupWid(wid: Wid): Wid;
32
33
  function userJidToUserWid(wid: string): Wid;
34
+ function toUserLidOrThrow(wid: Wid): Wid;
35
+ function toUserWidOrThrow(wid: Wid): Wid;
33
36
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
2
+ * Copyright 2025 WPPConnect Team
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -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 * from './ApiContact';
16
17
  export * from './Base64';
17
18
  export * from './Browser';
18
19
  export * from './ChatPresence';
@@ -36,6 +37,7 @@ export * from './NetworkStatus';
36
37
  export * from './OpaqueData';
37
38
  export * from './ProductCatalogSession';
38
39
  export * from './ServerProps';
40
+ export * from './ServerPropsConstants';
39
41
  export * from './Socket';
40
42
  export * from './Stream';
41
43
  export * from './UserPrefs';