talkyzap-wapp-api 1.0.3 → 1.0.5

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 (72) hide show
  1. package/CHANGELOG.md +1 -6
  2. package/README.md +57 -0
  3. package/dist/call/functions/end.d.ts +5 -5
  4. package/dist/cart/functions/add.d.ts +20 -0
  5. package/dist/cart/functions/clear.d.ts +16 -0
  6. package/dist/cart/functions/get.d.ts +27 -0
  7. package/dist/cart/functions/getThumbFromCart.d.ts +16 -0
  8. package/dist/cart/functions/index.d.ts +22 -0
  9. package/dist/cart/functions/remove.d.ts +17 -0
  10. package/dist/cart/functions/submit.d.ts +33 -0
  11. package/dist/cart/functions/update.d.ts +19 -0
  12. package/dist/cart/index.d.ts +16 -0
  13. package/dist/catalog/functions/getProductById.d.ts +24 -2
  14. package/dist/chat/events/eventTypes.d.ts +1 -1
  15. package/dist/chat/functions/closeChat.d.ts +26 -0
  16. package/dist/chat/functions/index.d.ts +4 -1
  17. package/dist/chat/functions/prepareMessageButtons.d.ts +1 -1
  18. package/dist/chat/functions/{sendOrderMessage.d.ts → sendChargeMessage.d.ts} +28 -7
  19. package/dist/chat/functions/sendGroupInviteMessage.d.ts +14 -0
  20. package/dist/chat/functions/sendPixKeyMessage.d.ts +53 -0
  21. package/dist/chat/functions/sendTextMessage.d.ts +1 -1
  22. package/dist/chat/functions/setInputText.d.ts +20 -0
  23. package/dist/conn/events/eventTypes.d.ts +2 -0
  24. package/dist/conn/events/index.d.ts +1 -0
  25. package/dist/conn/events/registerLogoutReasonEvent.d.ts +16 -0
  26. package/dist/enums.d.ts +6 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/order/functions/get.d.ts +3 -3
  29. package/dist/privacy/functions/get.d.ts +25 -0
  30. package/dist/privacy/functions/getDisallowedList.d.ts +38 -0
  31. package/dist/privacy/functions/index.d.ts +24 -0
  32. package/dist/privacy/functions/prepareDisallowedList.d.ts +29 -0
  33. package/dist/privacy/functions/setAbout.d.ts +25 -0
  34. package/dist/privacy/functions/setAddGroup.d.ts +24 -0
  35. package/dist/privacy/functions/setLastSeen.d.ts +25 -0
  36. package/dist/privacy/functions/setOnline.d.ts +20 -0
  37. package/dist/privacy/functions/setProfilePic.d.ts +25 -0
  38. package/dist/privacy/functions/setReadReceipts.d.ts +20 -0
  39. package/dist/privacy/functions/setStatus.d.ts +22 -0
  40. package/dist/privacy/index.d.ts +16 -0
  41. package/dist/status/functions/index.d.ts +1 -0
  42. package/dist/status/functions/remove.d.ts +17 -0
  43. package/dist/status/functions/sendRawStatus.d.ts +1 -0
  44. package/dist/status/functions/sendTextStatus.d.ts +0 -1
  45. package/dist/whatsapp/enums/LogoutReason.d.ts +25 -8
  46. package/dist/whatsapp/functions/{isLegitErrorStack.d.ts → STATUS_JID.d.ts} +2 -2
  47. package/dist/whatsapp/functions/addProductToCart.d.ts +23 -0
  48. package/dist/whatsapp/functions/createGroup.d.ts +17 -0
  49. package/dist/whatsapp/functions/createOrUpdateReactions.d.ts +1 -0
  50. package/dist/whatsapp/functions/createOrder.d.ts +24 -0
  51. package/dist/whatsapp/functions/encryptAndSendStatusMsg.d.ts +35 -0
  52. package/dist/whatsapp/functions/getErrorCodeFromLogoutReason.d.ts +20 -0
  53. package/dist/whatsapp/functions/getPrivacyDisallowedListTable.d.ts +27 -0
  54. package/dist/whatsapp/functions/getPushname.d.ts +10 -0
  55. package/dist/whatsapp/functions/getStatusList.d.ts +28 -0
  56. package/dist/whatsapp/functions/index.d.ts +12 -1
  57. package/dist/whatsapp/functions/queryOrder.d.ts +32 -0
  58. package/dist/whatsapp/functions/revokeStatus.d.ts +20 -0
  59. package/dist/whatsapp/functions/setPrivacyForOneCategory.d.ts +48 -0
  60. package/dist/whatsapp/functions/statusEnable.d.ts +19 -0
  61. package/dist/whatsapp/functions/updateCart.d.ts +20 -0
  62. package/dist/whatsapp/misc/ComposeBoxActions.d.ts +34 -0
  63. package/dist/whatsapp/misc/IsOfficialClient.d.ts +1 -0
  64. package/dist/whatsapp/misc/MsgKey.d.ts +1 -1
  65. package/dist/whatsapp/misc/Wid.d.ts +2 -0
  66. package/dist/whatsapp/misc/index.d.ts +1 -0
  67. package/dist/whatsapp/models/CartItemModel.d.ts +1 -0
  68. package/dist/whatsapp/models/index.d.ts +0 -1
  69. package/dist/wppconnect-wa.js +1 -1
  70. package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
  71. package/package.json +27 -27
  72. package/dist/whatsapp/models/CallParticipantModel.d.ts +0 -50
@@ -15,6 +15,7 @@
15
15
  */
16
16
  export * from './addAndSendMessageEdit';
17
17
  export * from './addAndSendMsgToChat';
18
+ export * from './addProductToCart';
18
19
  export * from './addToLabelCollection';
19
20
  export * from './blockContact';
20
21
  export * from './calculateFilehashFromBlob';
@@ -29,6 +30,7 @@ export * from './createFanoutMsgStanza';
29
30
  export * from './createGroup';
30
31
  export * from './createMsgProtobuf';
31
32
  export * from './createNewsletterQuery';
33
+ export * from './createOrder';
32
34
  export * from './createOrUpdateReactions';
33
35
  export * from './currencyForCountryShortcode';
34
36
  export * from './deleteNewsletter';
@@ -38,6 +40,7 @@ export * from './encodeMaybeMediaType';
38
40
  export * from './encryptAndSendGroupMsg';
39
41
  export * from './encryptAndSendMsg';
40
42
  export * from './encryptAndSendSenderKeyMsg';
43
+ export * from './encryptAndSendStatusMsg';
41
44
  export * from './encryptMsgProtobuf';
42
45
  export * from './fetchLinkPreview';
43
46
  export * from './findChat';
@@ -54,6 +57,7 @@ export * from './getCommunityParticipants';
54
57
  export * from './getCountryShortcodeByPhone';
55
58
  export * from './getCurrentLid';
56
59
  export * from './getEphemeralFields';
60
+ export * from './getErrorCodeFromLogoutReason';
57
61
  export * from './getFanOutList';
58
62
  export * from './getGroupSenderKeyList';
59
63
  export * from './getGroupSizeLimit';
@@ -64,10 +68,12 @@ export * from './getNextLabelId';
64
68
  export * from './getNumChatsPinned';
65
69
  export * from './getOrderInfo';
66
70
  export * from './getParticipants';
71
+ export * from './getPrivacyDisallowedListTable';
67
72
  export * from './getPushname';
68
73
  export * from './getQuotedMsgObj';
69
74
  export * from './getReactions';
70
75
  export * from './getSearchContext';
76
+ export * from './getStatusList';
71
77
  export * from './getTableVotes';
72
78
  export * from './getVotes';
73
79
  export * from './getWhatsAppWebExternalBetaJoinedIdb';
@@ -78,7 +84,6 @@ export * from './handleSingleMsg';
78
84
  export * from './initializeAltDeviceLinking';
79
85
  export * from './isAnimatedWebp';
80
86
  export * from './isAuthenticated';
81
- export * from './isLegitErrorStack';
82
87
  export * from './isRegistered';
83
88
  export * from './isUnreadTypeMsg';
84
89
  export * from './isWid';
@@ -101,9 +106,11 @@ export * from './profilePic';
101
106
  export * from './queryAllGroups';
102
107
  export * from './queryGroupInviteCode';
103
108
  export * from './queryNewsletterMetadataByJid';
109
+ export * from './queryOrder';
104
110
  export * from './randomHex';
105
111
  export * from './randomId';
106
112
  export * from './resetGroupInviteCode';
113
+ export * from './revokeStatus';
107
114
  export * from './sendClear';
108
115
  export * from './sendCreateCommunity';
109
116
  export * from './sendCreateGroup';
@@ -122,12 +129,16 @@ export * from './sendTextMsgToChat';
122
129
  export * from './setArchive';
123
130
  export * from './setGroup';
124
131
  export * from './setPin';
132
+ export * from './setPrivacyForOneCategory';
125
133
  export * from './setPushname';
126
134
  export * from './status';
135
+ export * from './STATUS_JID';
136
+ export * from './statusEnable';
127
137
  export * from './syncABPropsTask';
128
138
  export * from './typeAttributeFromProtobuf';
129
139
  export * from './unixTime';
130
140
  export * from './unmuteNewsletter';
141
+ export * from './updateCart';
131
142
  export * from './updateCartEnabled';
132
143
  export * from './updateDBForGroupAction';
133
144
  export * from './updateNewsletterMsgRecord';
@@ -0,0 +1,32 @@
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
+ /** @whatsapp WAWebBizQueryOrderJob >= 2.30000.0 */
17
+ export declare function queryOrder(productId: string, imageWidth: number, imageHeight: number, token: string, e?: any): Promise<{
18
+ currency: string;
19
+ createdAt: number;
20
+ products: {
21
+ id: string;
22
+ price: number;
23
+ thumbnailId: string;
24
+ thumbnailUrl: string;
25
+ currency: string;
26
+ name: string;
27
+ quantity: number;
28
+ }[];
29
+ subtotal: number;
30
+ total: number;
31
+ tax: number | null;
32
+ }>;
@@ -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 { ChatModel, MsgModel } from '../models';
17
+ /**
18
+ * @whatsapp WAWebRevokeStatusAction
19
+ */
20
+ export declare function revokeStatus(chat: ChatModel, msg: MsgModel): Promise<any>;
@@ -0,0 +1,48 @@
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
+ /** @whatsapp WAWebSetPrivacyForOneCategoryAction >= 2.3000.0
18
+ */
19
+ /** For set privacy who can you see your last seen, profile pic, or status */
20
+ export declare function setPrivacyForOneCategory(attrs: {
21
+ name: 'last' | 'profile' | 'status';
22
+ value: 'contacts' | 'all' | 'contact_blacklist' | 'none';
23
+ users?: {
24
+ action: 'add' | 'remove';
25
+ wid: Wid;
26
+ }[];
27
+ dhash?: any;
28
+ }, disallowedList?: Wid[]): Promise<void>;
29
+ /** set privacy for who has permission to add a group */
30
+ export declare function setPrivacyForOneCategory(attrs: {
31
+ name: 'groupadd';
32
+ value: 'contacts' | 'all' | 'contact_blacklist';
33
+ users?: {
34
+ action: 'add' | 'remove';
35
+ wid: Wid;
36
+ }[];
37
+ dhash?: any;
38
+ }, disallowedList?: Wid[]): Promise<void>;
39
+ /** For set privacy who can you see your last online */
40
+ export declare function setPrivacyForOneCategory(attrs: {
41
+ name: 'online';
42
+ value: 'all' | 'match_last_seen';
43
+ }): Promise<void>;
44
+ /** For set privacy who can you see your read receipts */
45
+ export declare function setPrivacyForOneCategory(attrs: {
46
+ name: 'readreceipts';
47
+ value: 'all' | 'none';
48
+ }): Promise<void>;
@@ -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 WAWebStatusSendGatingUtils >= 2.3000.0
18
+ */
19
+ export declare function primaryFeatureEnabled(key: string): 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 { CartModel } from '../models';
17
+ /**
18
+ * @whatsapp 990553
19
+ */
20
+ export declare function updateCart(cart: CartModel, c?: number): Promise<void>;
@@ -0,0 +1,34 @@
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 { ChatModel } from '..';
17
+ import { EventEmitter } from '.';
18
+ /** @whatsapp 88102
19
+ * @whatsapp 81572 >= 2.2218.4
20
+ * @whatsapp 781572 >= 2.2222.8
21
+ */
22
+ export declare class ComposeBoxActionsClass extends EventEmitter {
23
+ focus(e?: any, t?: any): void;
24
+ send(e?: any, t?: any): void;
25
+ paste(e?: any, t?: any): void;
26
+ sendPaste(e?: any, t?: any): void;
27
+ toggleQuickReplies(e?: any, t?: any): void;
28
+ addMsgSendingLogAttributes(e?: any, t?: any): void;
29
+ setCtwaContextLinkData(e?: any, t?: any): void;
30
+ setTextContent(chat: ChatModel, text: string): void;
31
+ }
32
+ /** @whatsapp WAWebComposeBoxActions >= 2.3000.0
33
+ */
34
+ export declare const ComposeBoxActions: ComposeBoxActionsClass;
@@ -18,4 +18,5 @@
18
18
  */
19
19
  export declare namespace IsOfficialClient {
20
20
  let isOfficialClient: boolean;
21
+ function isUnofficialStanzaId(id: string): boolean;
21
22
  }
@@ -43,5 +43,5 @@ export declare class MsgKey {
43
43
  /**
44
44
  * @whatsapp >= 2.2208.7
45
45
  */
46
- static newId(): string;
46
+ static newId(): Promise<string>;
47
47
  }
@@ -38,6 +38,7 @@ export declare class Wid {
38
38
  isPSA(): boolean;
39
39
  isServer(): boolean;
40
40
  isStatusV3(): boolean;
41
+ isStatus(): boolean;
41
42
  isUser(): boolean;
42
43
  isLid(): boolean;
43
44
  isUserNotPSA(): boolean;
@@ -60,6 +61,7 @@ export declare class Wid {
60
61
  static isPSA(wid: string | Wid): boolean;
61
62
  static isServer(wid: string | Wid): boolean;
62
63
  static isStatusV3(wid: string | Wid): boolean;
64
+ static isStatus(wid: string | Wid): boolean;
63
65
  static isUser(wid: string | Wid): boolean;
64
66
  static isLid(wid: string | Wid): boolean;
65
67
  static isWid(wid: string | Wid): boolean;
@@ -17,6 +17,7 @@ export * from './Base64';
17
17
  export * from './Browser';
18
18
  export * from './ChatPresence';
19
19
  export * from './Cmd';
20
+ export * from './ComposeBoxActions';
20
21
  export * from './Conn';
21
22
  export * from './Constants';
22
23
  export * from './EventEmitter';
@@ -19,6 +19,7 @@ interface Props {
19
19
  id?: any;
20
20
  priceAmount1000?: any;
21
21
  currency?: any;
22
+ name?: string;
22
23
  quantity?: any;
23
24
  imageHash?: any;
24
25
  imageCdnUrl?: any;
@@ -19,7 +19,6 @@ export * from './BlocklistModel';
19
19
  export * from './BusinessCategoriesResultModel';
20
20
  export * from './BusinessProfileModel';
21
21
  export * from './CallModel';
22
- export * from './CallParticipantModel';
23
22
  export * from './CartItemModel';
24
23
  export * from './CartModel';
25
24
  export * from './CatalogModel';