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
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { MsgKey } from '../../whatsapp';
16
+ import { MsgKey, OrderModel } from '../../whatsapp';
17
17
  /**
18
- * Get info of your sended order
18
+ * Get info of a order
19
19
  *
20
20
  * @example
21
21
  * ```javascript
@@ -24,4 +24,4 @@ import { MsgKey } from '../../whatsapp';
24
24
  *
25
25
  * @return Your current catalog
26
26
  */
27
- export declare function get(msgId: string | MsgKey): Promise<boolean>;
27
+ export declare function get(msgId: string | MsgKey): Promise<OrderModel>;
@@ -0,0 +1,25 @@
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
+ export declare function get(): Promise<{
17
+ about: string;
18
+ callAdd: string;
19
+ groupAdd: string;
20
+ lastSeen: string;
21
+ online: string;
22
+ profilePicture: string;
23
+ readReceipts: string;
24
+ status: string;
25
+ }>;
@@ -0,0 +1,38 @@
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
+ * Get the disallowed list to get the contacts who cannot see your privacy (this applies when enabled: my contacts, except...).
18
+ *
19
+ * @example
20
+ * ```javascript
21
+ * // get disalowed list for group Last seen
22
+ * const disalowed = WPP.privacy.getDisalowedList('last');
23
+ *
24
+ * // get disalowed list for profile
25
+ * const disalowed = WPP.privacy.getDisalowedList('profile');
26
+ *
27
+ * // get disalowed list for status
28
+ * const disalowed = WPP.privacy.getDisalowedList('status');
29
+ *
30
+ * // get disalowed list for group add
31
+ * const disalowed = WPP.privacy.getDisalowedList('groupadd');
32
+ *
33
+ * ```
34
+ *
35
+ * @category Privacy
36
+ */
37
+ import { PrivacyDisallowedListType } from '../../enums';
38
+ export declare function getDisallowedList(type: PrivacyDisallowedListType): Promise<string[] | null>;
@@ -0,0 +1,24 @@
1
+ /*!
2
+ * Copyright 2022 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 { get } from './get';
17
+ export { getDisallowedList } from './getDisallowedList';
18
+ export { setAbout } from './setAbout';
19
+ export { setAddGroup } from './setAddGroup';
20
+ export { setLastSeen } from './setLastSeen';
21
+ export { setOnline } from './setOnline';
22
+ export { setProfilePic } from './setProfilePic';
23
+ export { setReadReceipts } from './setReadReceipts';
24
+ export { setStatus } from './setStatus';
@@ -0,0 +1,29 @@
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 { PrivacyDisallowedListType } from '../../enums';
17
+ import { Wid } from '../../whatsapp';
18
+ export declare function prepareDisallowedList(type: PrivacyDisallowedListType, value: any, list?: {
19
+ id: string;
20
+ action: 'add' | 'remove';
21
+ }[]): Promise<{
22
+ ids: Wid[];
23
+ dhash: number | null;
24
+ idsFormatted: {
25
+ wid: Wid;
26
+ action: 'add' | 'remove';
27
+ }[];
28
+ allUsers: Wid[];
29
+ }>;
@@ -0,0 +1,25 @@
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
+ export declare enum setAboutTypes {
17
+ all = "all",
18
+ contacts = "contacts",
19
+ none = "none",
20
+ contact_blacklist = "contact_blacklist"
21
+ }
22
+ export declare function setAbout(value: setAboutTypes, disallowedList?: {
23
+ id: string;
24
+ action: 'add' | 'remove';
25
+ }[]): Promise<setAboutTypes>;
@@ -0,0 +1,24 @@
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
+ export declare enum setAddGroupTypes {
17
+ all = "all",
18
+ contacts = "contacts",
19
+ contact_blacklist = "contact_blacklist"
20
+ }
21
+ export declare function setAddGroup(value: setAddGroupTypes, disallowedList?: {
22
+ id: string;
23
+ action: 'add' | 'remove';
24
+ }[]): Promise<setAddGroupTypes>;
@@ -0,0 +1,25 @@
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
+ export declare enum setLastSeenTypes {
17
+ all = "all",
18
+ contacts = "contacts",
19
+ none = "none",
20
+ contact_blacklist = "contact_blacklist"
21
+ }
22
+ export declare function setLastSeen(value: setLastSeenTypes, disallowedList?: {
23
+ id: string;
24
+ action: 'add' | 'remove';
25
+ }[]): Promise<setLastSeenTypes>;
@@ -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
+ export declare enum setOnlineTypes {
17
+ all = "all",
18
+ match_last_seen = "match_last_seen"
19
+ }
20
+ export declare function setOnline(value: setOnlineTypes): Promise<setOnlineTypes>;
@@ -0,0 +1,25 @@
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
+ export declare enum setProfilePicTypes {
17
+ all = "all",
18
+ contacts = "contacts",
19
+ none = "none",
20
+ contact_blacklist = "contact_blacklist"
21
+ }
22
+ export declare function setProfilePic(value: setProfilePicTypes, disallowedList?: {
23
+ id: string;
24
+ action: 'add' | 'remove';
25
+ }[]): Promise<setProfilePicTypes>;
@@ -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
+ export declare enum setReadReceiptsTypes {
17
+ all = "all",
18
+ none = "none"
19
+ }
20
+ export declare function setReadReceipts(value: setReadReceiptsTypes): Promise<setReadReceiptsTypes>;
@@ -0,0 +1,22 @@
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 '../../whatsapp';
17
+ export declare enum setStatusTypes {
18
+ contact = "contact",
19
+ DENY_LIST = "deny-list",
20
+ ALLOW_LIST = "allow-list"
21
+ }
22
+ export declare function setStatus(value: setStatusTypes, list?: string[] | Wid[]): Promise<setStatusTypes>;
@@ -0,0 +1,16 @@
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
+ export * from './functions/';
@@ -15,6 +15,7 @@
15
15
  */
16
16
  export { get } from './get';
17
17
  export { getMyStatus } from './getMyStatus';
18
+ export { remove } from './remove';
18
19
  export { ImageStatusOptions, sendImageStatus } from './sendImageStatus';
19
20
  export { sendRawStatus, SendStatusOptions } from './sendRawStatus';
20
21
  export { sendReadStatus } from './sendReadStatus';
@@ -0,0 +1,17 @@
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 { MsgKey } from '../../whatsapp';
17
+ export declare function remove(msgId: string | MsgKey): Promise<boolean>;
@@ -18,5 +18,6 @@ import { MsgKey } from '../../whatsapp';
18
18
  export interface SendStatusOptions {
19
19
  waitForAck?: boolean;
20
20
  messageId?: string | MsgKey;
21
+ caption?: string;
21
22
  }
22
23
  export declare function sendRawStatus(message: Chat.RawMessage, options?: SendStatusOptions): Promise<Chat.SendMessageReturn>;
@@ -18,7 +18,6 @@ import { SendStatusOptions } from './sendRawStatus';
18
18
  export interface TextStatusOptions extends SendStatusOptions {
19
19
  font?: TextFontStyle;
20
20
  backgroundColor?: string | number;
21
- textColor?: string | number;
22
21
  }
23
22
  /**
24
23
  * Send a text message to status stories
@@ -16,15 +16,32 @@
16
16
  /** @whatsapp 83578
17
17
  * @whatsapp 88950 >= 2.2218.4
18
18
  * @whatsapp 788950 >= 2.2222.8
19
+ * @whatsapp WAWebLogoutReasonConstants >= 2.3000.x
19
20
  */
20
21
  export declare enum LogoutReason {
21
- USER_INITIATED = "user_initiated",
22
- SYNCD_FAILURE = "syncd_failure",
23
- CRITICAL_SYNC_TIMEOUT = "critical_sync_timeout",
24
- UNKNOWN_COMPANION = "unknown_companion",
25
- CLIENT_VERSION_OUTDATED = "client_version_outdated",
26
- SYNCD_ERROR_DURING_BOOTSTRAP = "syncd_error_during_bootstrap",
27
- ACCOUNT_SYNC_ERROR = "account_sync_error",
28
- CLIENT_FATAL_ERROR = "client_fatal_error",
22
+ UserInitiated = "user_initiated",
23
+ SyncdFailure = "syncd_failure",
24
+ InvalidAdvStatus = "invalid_adv_status",
25
+ CriticalSyncTimeout = "critical_sync_timeout",
26
+ SyncdTimeout = "syncd_timeout",
27
+ HistorySyncTimeout = "history_sync_timeout",
28
+ AccountSyncTimeout = "account_sync_timeout",
29
+ MDOptOut = "md_opt_out",
30
+ UnknownCompanion = "unknown_companion",
31
+ ClientVersionOutdated = "client_version_outdated",
32
+ SyncdErrorDuringBootstrap = "syncd_error_during_bootstrap",
33
+ AccountSyncError = "account_sync_error",
34
+ ClientFatalError = "client_fatal_error",
35
+ StorageQuotaExceeded = "storage_quota_exceeded",
36
+ PrimaryIdentityKeyChange = "primary_identity_key_change",
37
+ MissingEncSalt = "missing_enc_salt",
38
+ MissingScreenLockSalt = "missing_screen_lock_salt",
39
+ AccountLocked = "account_locked",
29
40
  UNKNOWN = "unknown"
30
41
  }
42
+ export declare enum LOGOUT_REASON_CODE {
43
+ CLIENT_FATAL = "0",
44
+ SYNC_FAIL = "1",
45
+ INITIAL_HISTORY_SYNC_TIMEOUT = "2",
46
+ ACCOUNT_LOCKED = "3"
47
+ }
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /**
17
- * @whatsapp 525438
17
+ * @whatsapp WAJids
18
18
  */
19
- export declare function isLegitErrorStack(): boolean;
19
+ export declare const STATUS_JID: string;
@@ -0,0 +1,23 @@
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 { ProductModel } from '../models';
17
+ export declare function addProductToCart(product: ProductModel): Promise<{
18
+ newCount: number;
19
+ status: 'SUCCESS' | 'QUANTITY_LIMIT_REACHED';
20
+ totalCartCount: number;
21
+ }>;
22
+ export declare function updateProductQuantityCart(product: ProductModel, quantity: number): Promise<any>;
23
+ export declare function deleteProductFromCart(chatId: string, productId: string): Promise<any>;
@@ -26,3 +26,20 @@ export declare function createGroup(groupName: string, participants: Wid[], ephe
26
26
  invite_code_exp: string | null;
27
27
  }[];
28
28
  }>;
29
+ export declare function createGroup(options: {
30
+ title: string;
31
+ ephemeralDuration: number;
32
+ restrict: boolean;
33
+ announce: boolean;
34
+ membershipApprovalMode: boolean;
35
+ memberAddMode: boolean;
36
+ parentGroupId?: Wid;
37
+ }, participants: Wid[]): Promise<{
38
+ wid: Wid;
39
+ participants: {
40
+ wid: Wid;
41
+ error: string;
42
+ invite_code: string | null;
43
+ invite_code_exp: string | null;
44
+ }[];
45
+ }>;
@@ -25,5 +25,6 @@ export interface ReactionData {
25
25
  }
26
26
  /** @whatsapp 7394
27
27
  * @whatsapp 307394 >= 2.2222.8
28
+ * @whatsapp WAWebReactionsMsgAction >= 2.3000.x
28
29
  */
29
30
  export declare function createOrUpdateReactions(data: ReactionData[]): Promise<any>;
@@ -0,0 +1,24 @@
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 990553
19
+ */
20
+ export declare function createOrder(wid: Wid, cartItems?: any): Promise<{
21
+ id: number;
22
+ token: any;
23
+ price?: any;
24
+ }>;
@@ -0,0 +1,35 @@
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 { MsgKey, Wid } from '../misc';
17
+ import { MsgModel } from '../models';
18
+ /**
19
+ * @whatsapp WAWebEncryptAndSendStatusMsg
20
+ */
21
+ export declare function encryptAndSendStatusMsg(msg: {
22
+ msg: {
23
+ type: string;
24
+ data: MsgModel;
25
+ };
26
+ data: {
27
+ ack: number;
28
+ author?: Wid;
29
+ from: Wid;
30
+ id: MsgKey;
31
+ subtype?: string;
32
+ to: Wid;
33
+ type: string;
34
+ };
35
+ }, proto: any, report: any): Promise<any>;
@@ -0,0 +1,20 @@
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 { LOGOUT_REASON_CODE, LogoutReason } from '../enums';
17
+ /**
18
+ * @whatsapp WAWebLogoutReason >= 2.3000.x
19
+ */
20
+ export declare function getErrorCodeFromLogoutReason(type: LogoutReason): LOGOUT_REASON_CODE | null;
@@ -0,0 +1,27 @@
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
+ declare class DisallowedListTable {
17
+ get(type: 'status' | 'groupadd' | 'last' | 'profile'): Promise<{
18
+ dhash: number;
19
+ disallowedList: string[];
20
+ id: 'status' | 'groupadd' | 'last' | 'profile';
21
+ } | null>;
22
+ }
23
+ /**
24
+ * @whatsapp WAWebSchemaPrivacyDisallowedList >= 2.3000.0
25
+ */
26
+ export declare function getPrivacyDisallowedListTable(): DisallowedListTable;
27
+ export {};
@@ -15,5 +15,15 @@
15
15
  */
16
16
  /**
17
17
  * @whatsapp 135963 >= 2.2310.5
18
+ * @whatsapp WAWebUserPrefsGeneral >= 2.3000.0
18
19
  */
19
20
  export declare function getPushname(): string;
21
+ export declare function getUserPrivacySettings(): {
22
+ about: string;
23
+ callAdd: string;
24
+ groupAdd: string;
25
+ lastSeen: string;
26
+ online: string;
27
+ profilePicture: string;
28
+ readReceipts: string;
29
+ };
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * Copyright 2023 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 WAWebUserPrefsStatus >= 2.3000.0
18
+ */
19
+ export declare function getStatusAllowList(): Promise<any>;
20
+ export declare function getStatusContacts(): Promise<any>;
21
+ export declare function getStatusDenyList(): Promise<any>;
22
+ export declare function getStatusList(): Promise<any>;
23
+ export declare function getStatusPrivacySetting(): Promise<any>;
24
+ export declare function getStatusPrivacySettingConfig(): Promise<any>;
25
+ export declare function setStatusPrivacyConfig(attributes?: {
26
+ setting: 'contact' | 'deny-list' | 'allow-list';
27
+ list: Wid[];
28
+ }): Promise<any>;