@wppconnect/wa-js 2.10.0 → 2.11.1
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 +2 -350
- package/dist/assert/assertProduct.d.ts +22 -0
- package/dist/assert/index.d.ts +1 -0
- package/dist/catalog/functions/addProductImage.d.ts +28 -0
- package/dist/catalog/functions/changeProductImage.d.ts +28 -0
- package/dist/catalog/functions/createCollection.d.ts +26 -0
- package/dist/catalog/functions/createProduct.d.ts +47 -0
- package/dist/catalog/functions/deleteCollection.d.ts +26 -0
- package/dist/catalog/functions/deleteProduct.d.ts +30 -0
- package/dist/catalog/functions/editCollection.d.ts +32 -0
- package/dist/catalog/functions/editProduct.d.ts +36 -0
- package/dist/catalog/functions/getCollections.d.ts +31 -0
- package/dist/catalog/functions/getProductById.d.ts +28 -0
- package/dist/catalog/functions/getProducts.d.ts +27 -0
- package/dist/catalog/functions/index.d.ts +14 -0
- package/dist/catalog/functions/removeProductImage.d.ts +29 -0
- package/dist/catalog/functions/setProductVisibility.d.ts +30 -0
- package/dist/catalog/functions/updateCartEnabled.d.ts +30 -0
- package/dist/chat/functions/canMarkPlayed.d.ts +27 -0
- package/dist/chat/functions/getMessages.d.ts +25 -0
- package/dist/chat/functions/getPlatformFromMessage.d.ts +34 -0
- package/dist/chat/functions/index.d.ts +3 -0
- package/dist/chat/functions/markPlayed.d.ts +27 -0
- package/dist/chat/functions/prepareMessageButtons.d.ts +1 -1
- package/dist/{config.d.ts → config/Config.d.ts} +2 -3
- package/dist/config/defaultConfig.d.ts +17 -0
- package/dist/config/eventTypes.d.ts +25 -0
- package/dist/config/index.d.ts +23 -0
- package/dist/contact/functions/getBusinessProfile.d.ts +27 -0
- package/dist/contact/functions/index.d.ts +1 -0
- package/dist/eventEmitter/eventTypes.d.ts +3 -1
- package/dist/eventEmitter/index.d.ts +41 -41
- package/dist/index.d.ts +1 -1
- package/dist/labels/functions/getLabelById.d.ts +17 -0
- package/dist/labels/functions/index.d.ts +1 -0
- package/dist/profile/functions/editBusinessProfile.d.ts +177 -0
- package/dist/profile/functions/index.d.ts +1 -0
- package/dist/status/functions/index.d.ts +1 -0
- package/dist/status/functions/sendReadStatus.d.ts +25 -0
- package/dist/whatsapp/collections/CatalogCollection.d.ts +3 -1
- package/dist/whatsapp/contants/DROP_ATTR.d.ts +19 -0
- package/dist/whatsapp/contants/index.d.ts +16 -0
- package/dist/whatsapp/enums/CALL_STATES.d.ts +1 -0
- package/dist/whatsapp/enums/SendMsgResult.d.ts +1 -0
- package/dist/whatsapp/functions/addAndSendMsgToChat.d.ts +1 -0
- package/dist/whatsapp/functions/blockContact.d.ts +2 -0
- package/dist/whatsapp/functions/calculateFilehashFromBlob.d.ts +19 -0
- package/dist/whatsapp/functions/collections.d.ts +37 -0
- package/dist/whatsapp/functions/createMsgProtobuf.d.ts +1 -0
- package/dist/whatsapp/functions/editBusinessProfile.d.ts +20 -0
- package/dist/whatsapp/functions/encodeMaybeMediaType.d.ts +19 -0
- package/dist/whatsapp/functions/encryptAndSendGroupMsg.d.ts +1 -0
- package/dist/whatsapp/functions/encryptAndSendMsg.d.ts +1 -0
- package/dist/whatsapp/functions/fetchLinkPreview.d.ts +1 -0
- package/dist/whatsapp/functions/findChat.d.ts +1 -0
- package/dist/whatsapp/functions/genMinimalLinkPreview.d.ts +1 -0
- package/dist/whatsapp/functions/groupParticipants.d.ts +4 -0
- package/dist/whatsapp/functions/handleAck.d.ts +6 -0
- package/dist/whatsapp/functions/index.d.ts +6 -0
- package/dist/whatsapp/functions/markSeen.d.ts +9 -3
- package/dist/whatsapp/functions/mediaTypeFromProtobuf.d.ts +1 -0
- package/dist/whatsapp/functions/msgFindQuery.d.ts +2 -1
- package/dist/whatsapp/functions/productVisibilitySet.d.ts +21 -0
- package/dist/whatsapp/functions/products.d.ts +9 -0
- package/dist/whatsapp/functions/randomHex.d.ts +1 -0
- package/dist/whatsapp/functions/sendCallSignalingMsg.d.ts +3 -1
- package/dist/whatsapp/functions/sendClear.d.ts +1 -0
- package/dist/whatsapp/functions/sendDelete.d.ts +1 -0
- package/dist/whatsapp/functions/sendExitGroup.d.ts +1 -0
- package/dist/whatsapp/functions/sendReactionToMsg.d.ts +1 -0
- package/dist/whatsapp/functions/sendTextMsgToChat.d.ts +1 -0
- package/dist/whatsapp/functions/setArchive.d.ts +1 -0
- package/dist/whatsapp/functions/setPin.d.ts +2 -0
- package/dist/whatsapp/functions/typeAttributeFromProtobuf.d.ts +1 -0
- package/dist/whatsapp/functions/updateCartEnabled.d.ts +19 -0
- package/dist/whatsapp/index.d.ts +1 -0
- package/dist/whatsapp/misc/ChatPresence.d.ts +1 -0
- package/dist/whatsapp/misc/Locale.d.ts +1 -0
- package/dist/whatsapp/misc/ProductCatalogSession.d.ts +27 -0
- package/dist/whatsapp/misc/index.d.ts +1 -0
- package/dist/whatsapp/models/CatalogModel.d.ts +2 -0
- package/dist/whatsapp/models/ProductCollModel.d.ts +4 -0
- package/dist/whatsapp/models/ProductModel.d.ts +2 -1
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +14 -14
|
@@ -0,0 +1,28 @@
|
|
|
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 { ProductModel } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves product by id
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* // Retrieve data of product
|
|
23
|
+
* await WPP.catalog.getProductById('5521985565656@c.us', '68685985868923');
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @category Catalog
|
|
27
|
+
*/
|
|
28
|
+
export declare function getProductById(chatId: string, productId: number): Promise<ProductModel>;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
* Retrieves product by contact id
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* Get products of catalogs
|
|
21
|
+
* ```javascript
|
|
22
|
+
* await WPP.catalog.getProducts('5521985625689@c.us', 10);
|
|
23
|
+
* ```
|
|
24
|
+
* @return A array with products
|
|
25
|
+
* @category Catalog
|
|
26
|
+
*/
|
|
27
|
+
export declare function getProducts(chatId: string, qnt: number): Promise<any[]>;
|
|
@@ -13,4 +13,18 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
export { addProductImage } from './addProductImage';
|
|
17
|
+
export { changeProductImage } from './changeProductImage';
|
|
18
|
+
export { createCollection } from './createCollection';
|
|
19
|
+
export { createProduct } from './createProduct';
|
|
20
|
+
export { deleteCollection } from './deleteCollection';
|
|
21
|
+
export { delProducts } from './deleteProduct';
|
|
22
|
+
export { editCollection } from './editCollection';
|
|
23
|
+
export { editProduct } from './editProduct';
|
|
24
|
+
export { getCollections } from './getCollections';
|
|
16
25
|
export { getMyCatalog } from './getMyCatalog';
|
|
26
|
+
export { getProductById } from './getProductById';
|
|
27
|
+
export { getProducts } from './getProducts';
|
|
28
|
+
export { removeProductImage } from './removeProductImage';
|
|
29
|
+
export { setProductVisibility } from './setProductVisibility';
|
|
30
|
+
export { updateCartEnabled } from './updateCartEnabled';
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { ProductModel } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Remove image on product
|
|
19
|
+
* This function remove additional images of product
|
|
20
|
+
* for change main image use @changeProductImage
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```javascript
|
|
24
|
+
* await WPP.catalog.removeProductImage('68685985868923', '0');
|
|
25
|
+
* ```
|
|
26
|
+
* @param index - Index of array additionalImageCdnUrl
|
|
27
|
+
* @category Catalog
|
|
28
|
+
*/
|
|
29
|
+
export declare function removeProductImage(productId: string, index: string): Promise<ProductModel>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Get your current catalog
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* // Set product visibility hidden
|
|
22
|
+
* const myCatalog = await WPP.catalog.setProductVisibility(54985569989897, true);
|
|
23
|
+
* ```
|
|
24
|
+
* // Set product visible
|
|
25
|
+
* const myCatalog = await WPP.catalog.setProductVisibility(54985569989897, false);
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @return Return sucess of product visibility set
|
|
29
|
+
*/
|
|
30
|
+
export declare function setProductVisibility(productId: any, isHidden: boolean): Promise<any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Get your current catalog
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* // Set product visibility hidden
|
|
22
|
+
* const myCatalog = await WPP.catalog.setProductVisibility(54985569989897, true);
|
|
23
|
+
* ```
|
|
24
|
+
* // Set product visible
|
|
25
|
+
* const myCatalog = await WPP.catalog.setProductVisibility(54985569989897, false);
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @return Return sucess of product visibility set
|
|
29
|
+
*/
|
|
30
|
+
export declare function updateCartEnabled(enabled: boolean): Promise<any>;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { Stringable } from '../../types';
|
|
17
|
+
import { MsgKey, MsgModel } from '../../whatsapp';
|
|
18
|
+
/**
|
|
19
|
+
* Get if message can played
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```javascript
|
|
23
|
+
* WPP.chat.canMarkPlayed('[message_id]');
|
|
24
|
+
* ```
|
|
25
|
+
* @category Message
|
|
26
|
+
*/
|
|
27
|
+
export declare function canMarkPlayed(messageId: string | MsgKey | MsgModel | Stringable): Promise<any>;
|
|
@@ -20,6 +20,7 @@ export interface GetMessagesOptions {
|
|
|
20
20
|
direction?: 'after' | 'before';
|
|
21
21
|
id?: string;
|
|
22
22
|
onlyUnread?: boolean;
|
|
23
|
+
media?: 'url' | 'document' | 'all' | 'image';
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Fetch messages from a chat
|
|
@@ -54,6 +55,30 @@ export interface GetMessagesOptions {
|
|
|
54
55
|
* direction: 'before',
|
|
55
56
|
* id: '<full message id>'
|
|
56
57
|
* });
|
|
58
|
+
*
|
|
59
|
+
* // Only media messages (url, document and links)
|
|
60
|
+
* WPP.chat.getMessages('[number]@c.us', {
|
|
61
|
+
* count: 20,
|
|
62
|
+
* media: 'all',
|
|
63
|
+
* });
|
|
64
|
+
*
|
|
65
|
+
* // Only image messages
|
|
66
|
+
* WPP.chat.getMessages('[number]@c.us', {
|
|
67
|
+
* count: 20,
|
|
68
|
+
* media: 'image',
|
|
69
|
+
* });
|
|
70
|
+
*
|
|
71
|
+
* // Only document messages
|
|
72
|
+
* WPP.chat.getMessages('[number]@c.us', {
|
|
73
|
+
* count: 20,
|
|
74
|
+
* media: 'document',
|
|
75
|
+
* });
|
|
76
|
+
*
|
|
77
|
+
* // Only link (url) messages
|
|
78
|
+
* WPP.chat.getMessages('[number]@c.us', {
|
|
79
|
+
* count: 20,
|
|
80
|
+
* media: 'url',
|
|
81
|
+
* });
|
|
57
82
|
* ```
|
|
58
83
|
* @category Message
|
|
59
84
|
* @return {RawMessage[]} List of raw messages
|
|
@@ -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 { Stringable } from '../../types';
|
|
17
|
+
import { MsgKey, MsgModel } from '../../whatsapp';
|
|
18
|
+
/**
|
|
19
|
+
* Get the platform message from message ID
|
|
20
|
+
*
|
|
21
|
+
* The platform can be:
|
|
22
|
+
* * android
|
|
23
|
+
* * iphone
|
|
24
|
+
* * web
|
|
25
|
+
* * unknown
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```javascript
|
|
29
|
+
* // to get platform from a message
|
|
30
|
+
* const platform = WPP.chat.getPlatformFromMessage('[message_id]');
|
|
31
|
+
* ```
|
|
32
|
+
* @category Message
|
|
33
|
+
*/
|
|
34
|
+
export declare function getPlatformFromMessage(messageId: string | MsgKey | MsgModel | Stringable): 'android' | 'iphone' | 'web' | 'unknown';
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export { archive, unarchive } from './archive';
|
|
17
|
+
export { canMarkPlayed } from './canMarkPlayed';
|
|
17
18
|
export { canMute } from './canMute';
|
|
18
19
|
export { clear } from './clear';
|
|
19
20
|
export { delete } from './delete';
|
|
@@ -25,12 +26,14 @@ export { get } from './get';
|
|
|
25
26
|
export { getLastSeen } from './getLastSeen';
|
|
26
27
|
export { getMessageById } from './getMessageById';
|
|
27
28
|
export { getMessages, GetMessagesOptions } from './getMessages';
|
|
29
|
+
export { getPlatformFromMessage } from './getPlatformFromMessage';
|
|
28
30
|
export { ChatListOptions, list } from './list';
|
|
29
31
|
export { markIsComposing } from './markIsComposing';
|
|
30
32
|
export { markIsPaused } from './markIsPaused';
|
|
31
33
|
export { markIsRead } from './markIsRead';
|
|
32
34
|
export { markIsRecording } from './markIsRecording';
|
|
33
35
|
export { markIsUnread } from './markIsUnread';
|
|
36
|
+
export { markPlayed } from './markPlayed';
|
|
34
37
|
export { mute } from './mute';
|
|
35
38
|
export { openChatAt } from './openChatAt';
|
|
36
39
|
export { openChatBottom } from './openChatBottom';
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { Stringable } from '../../types';
|
|
17
|
+
import { MsgKey, MsgModel } from '../../whatsapp';
|
|
18
|
+
/**
|
|
19
|
+
* Mark message as played
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```javascript
|
|
23
|
+
* WPP.chat.markPlayed('[message_id]');
|
|
24
|
+
* ```
|
|
25
|
+
* @category Message
|
|
26
|
+
*/
|
|
27
|
+
export declare function markPlayed(messageId: string | MsgKey | MsgModel | Stringable): Promise<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2022 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.
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
export interface Config {
|
|
31
|
+
[key: string | symbol]: any;
|
|
31
32
|
/**
|
|
32
33
|
* Set the device name connected, false to disable
|
|
33
34
|
* @default 'WPPConnect'
|
|
@@ -60,5 +61,3 @@ export interface Config {
|
|
|
60
61
|
*/
|
|
61
62
|
poweredBy: string | null;
|
|
62
63
|
}
|
|
63
|
-
export declare const defaultConfig: Config;
|
|
64
|
-
export declare const config: Config;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { Config } from './Config';
|
|
17
|
+
export declare const defaultConfig: Config;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
import { Config } from './Config';
|
|
17
|
+
export interface ConfigEventTypes {
|
|
18
|
+
'config.update': {
|
|
19
|
+
config: Config;
|
|
20
|
+
key: string | number | symbol;
|
|
21
|
+
path: (string | number | symbol)[];
|
|
22
|
+
target: any;
|
|
23
|
+
value: any;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import { Config } from './Config';
|
|
17
|
+
export { Config } from './Config';
|
|
18
|
+
declare global {
|
|
19
|
+
interface Window {
|
|
20
|
+
WPPConfig: Config;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const config: Config;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { BusinessProfileModel, Wid } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Get the current text status
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* const url = await WPP.contact.getBusinessProfile('[number]@c.us');
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @category Contact
|
|
26
|
+
*/
|
|
27
|
+
export declare function getBusinessProfile(contactId: string | Wid): Promise<BusinessProfileModel>;
|
|
@@ -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 { getBusinessProfile } from './getBusinessProfile';
|
|
16
17
|
export { getProfilePictureUrl } from './getProfilePictureUrl';
|
|
17
18
|
export { getStatus } from './getStatus';
|
|
18
19
|
export { ContactListOptions, list } from './list';
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { BlocklistEventTypes } from '../blocklist/events/eventTypes';
|
|
17
17
|
import { CallEventTypes } from '../call/events/eventTypes';
|
|
18
18
|
import { ChatEventTypes } from '../chat/events/eventTypes';
|
|
19
|
+
import { ConfigEventTypes } from '../config/eventTypes';
|
|
19
20
|
import { ConnEventTypes } from '../conn/events/eventTypes';
|
|
20
21
|
import { GroupEventTypes } from '../group/events/eventTypes';
|
|
21
22
|
import { StatusEventTypes } from '../status/events/eventTypes';
|
|
@@ -23,8 +24,9 @@ import { WebpackEvents } from '../webpack/eventTypes';
|
|
|
23
24
|
export { BlocklistEventTypes } from '../blocklist/events/eventTypes';
|
|
24
25
|
export { CallEventTypes } from '../call/events/eventTypes';
|
|
25
26
|
export { ChatEventTypes } from '../chat/events/eventTypes';
|
|
27
|
+
export { ConfigEventTypes } from '../config/eventTypes';
|
|
26
28
|
export { ConnEventTypes } from '../conn/events/eventTypes';
|
|
27
29
|
export { GroupEventTypes } from '../group/events/eventTypes';
|
|
28
30
|
export { StatusEventTypes } from '../status/events/eventTypes';
|
|
29
31
|
export { WebpackEvents } from '../webpack/eventTypes';
|
|
30
|
-
export declare type EventTypes = BlocklistEventTypes & CallEventTypes & ChatEventTypes & ConnEventTypes & GroupEventTypes & StatusEventTypes & WebpackEvents;
|
|
32
|
+
export declare type EventTypes = BlocklistEventTypes & CallEventTypes & ChatEventTypes & ConfigEventTypes & ConnEventTypes & GroupEventTypes & StatusEventTypes & WebpackEvents;
|