@wppconnect/wa-js 3.6.0 → 3.8.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.
- package/CHANGELOG.md +6 -1
- package/dist/cart/functions/add.d.ts +20 -0
- package/dist/cart/functions/clear.d.ts +16 -0
- package/dist/cart/functions/get.d.ts +27 -0
- package/dist/cart/functions/getThumbFromCart.d.ts +16 -0
- package/dist/cart/functions/index.d.ts +22 -0
- package/dist/cart/functions/remove.d.ts +17 -0
- package/dist/cart/functions/submit.d.ts +33 -0
- package/dist/cart/functions/update.d.ts +19 -0
- package/dist/cart/index.d.ts +16 -0
- package/dist/catalog/functions/getProductById.d.ts +24 -2
- package/dist/chat/functions/index.d.ts +2 -1
- package/dist/chat/functions/{sendOrderMessage.d.ts → sendChargeMessage.d.ts} +7 -7
- package/dist/chat/functions/setInputText.d.ts +20 -0
- package/dist/enums.d.ts +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/privacy/functions/get.d.ts +25 -0
- package/dist/privacy/functions/getDisallowedList.d.ts +38 -0
- package/dist/privacy/functions/index.d.ts +24 -0
- package/dist/privacy/functions/prepareDisallowedList.d.ts +29 -0
- package/dist/privacy/functions/setAbout.d.ts +25 -0
- package/dist/privacy/functions/setAddGroup.d.ts +24 -0
- package/dist/privacy/functions/setLastSeen.d.ts +25 -0
- package/dist/privacy/functions/setOnline.d.ts +20 -0
- package/dist/privacy/functions/setProfilePic.d.ts +25 -0
- package/dist/privacy/functions/setReadReceipts.d.ts +20 -0
- package/dist/privacy/functions/setStatus.d.ts +22 -0
- package/dist/privacy/index.d.ts +16 -0
- package/dist/whatsapp/functions/addProductToCart.d.ts +23 -0
- package/dist/whatsapp/functions/createOrder.d.ts +24 -0
- package/dist/whatsapp/functions/getPrivacyDisallowedListTable.d.ts +27 -0
- package/dist/whatsapp/functions/getPushname.d.ts +10 -0
- package/dist/whatsapp/functions/getStatusList.d.ts +28 -0
- package/dist/whatsapp/functions/index.d.ts +6 -0
- package/dist/whatsapp/functions/setPrivacyForOneCategory.d.ts +48 -0
- package/dist/whatsapp/functions/updateCart.d.ts +20 -0
- package/dist/whatsapp/misc/ComposeBoxActions.d.ts +34 -0
- package/dist/whatsapp/misc/MsgKey.d.ts +1 -1
- package/dist/whatsapp/misc/index.d.ts +1 -0
- package/dist/whatsapp/models/CartItemModel.d.ts +1 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +14 -14
|
@@ -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>;
|
|
@@ -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,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>;
|
|
@@ -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';
|
|
@@ -66,10 +68,12 @@ export * from './getNextLabelId';
|
|
|
66
68
|
export * from './getNumChatsPinned';
|
|
67
69
|
export * from './getOrderInfo';
|
|
68
70
|
export * from './getParticipants';
|
|
71
|
+
export * from './getPrivacyDisallowedListTable';
|
|
69
72
|
export * from './getPushname';
|
|
70
73
|
export * from './getQuotedMsgObj';
|
|
71
74
|
export * from './getReactions';
|
|
72
75
|
export * from './getSearchContext';
|
|
76
|
+
export * from './getStatusList';
|
|
73
77
|
export * from './getTableVotes';
|
|
74
78
|
export * from './getVotes';
|
|
75
79
|
export * from './getWhatsAppWebExternalBetaJoinedIdb';
|
|
@@ -126,6 +130,7 @@ export * from './sendTextMsgToChat';
|
|
|
126
130
|
export * from './setArchive';
|
|
127
131
|
export * from './setGroup';
|
|
128
132
|
export * from './setPin';
|
|
133
|
+
export * from './setPrivacyForOneCategory';
|
|
129
134
|
export * from './setPushname';
|
|
130
135
|
export * from './status';
|
|
131
136
|
export * from './STATUS_JID';
|
|
@@ -134,6 +139,7 @@ export * from './syncABPropsTask';
|
|
|
134
139
|
export * from './typeAttributeFromProtobuf';
|
|
135
140
|
export * from './unixTime';
|
|
136
141
|
export * from './unmuteNewsletter';
|
|
142
|
+
export * from './updateCart';
|
|
137
143
|
export * from './updateCartEnabled';
|
|
138
144
|
export * from './updateDBForGroupAction';
|
|
139
145
|
export * from './updateNewsletterMsgRecord';
|
|
@@ -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,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;
|