@wppconnect/wa-js 1.2.0 → 1.2.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 +9 -0
- package/dist/chat/functions/canMute.d.ts +1 -1
- package/dist/chat/functions/getMessageById.d.ts +2 -2
- package/dist/chat/functions/getMessages.d.ts +3 -3
- package/dist/chat/functions/markIsComposing.d.ts +2 -2
- package/dist/chat/functions/markIsPaused.d.ts +1 -1
- package/dist/chat/functions/markIsRead.d.ts +1 -1
- package/dist/chat/functions/markIsRecording.d.ts +2 -2
- package/dist/chat/functions/markIsUnread.d.ts +1 -1
- package/dist/chat/functions/mute.d.ts +3 -3
- package/dist/chat/functions/openChatAt.d.ts +1 -1
- package/dist/chat/functions/openChatBottom.d.ts +1 -1
- package/dist/chat/functions/openChatFromUnread.d.ts +1 -1
- package/dist/chat/functions/prepareLinkPreview.d.ts +2 -2
- package/dist/chat/functions/sendFileMessage.d.ts +5 -5
- package/dist/chat/functions/sendListMessage.d.ts +1 -1
- package/dist/chat/functions/unmute.d.ts +1 -1
- package/dist/chat/types.d.ts +8 -8
- package/dist/contact/functions/getStatus.d.ts +1 -1
- package/dist/contact/functions/queryExists.d.ts +1 -1
- package/dist/group/functions/getInviteCode.d.ts +1 -1
- package/dist/group/functions/getParticipants.d.ts +1 -1
- package/dist/group/functions/leave.d.ts +1 -1
- package/dist/group/functions/revokeInviteCode.d.ts +1 -1
- package/dist/group/functions/setDescription.d.ts +1 -1
- package/dist/group/functions/setProperty.d.ts +8 -8
- package/dist/group/functions/setSubject.d.ts +1 -1
- package/dist/labels/functions/addOrRemoveLabels.d.ts +1 -1
- package/dist/whatsapp/functions/randomId.d.ts +1 -3
- package/dist/whatsapp/misc/Constants.d.ts +1 -58
- package/dist/whatsapp/misc/MsgKey.d.ts +5 -1
- package/dist/whatsapp/misc/Wid.d.ts +1 -1
- package/dist/whatsapp/misc/WidFactory.d.ts +1 -1
- package/dist/whatsapp/models/Model.d.ts +2 -2
- package/dist/whatsapp/models/StickerModel.d.ts +2 -2
- package/dist/whatsapp/multidevice/adv.d.ts +1 -1
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -20,10 +20,10 @@ import { MsgKey, MsgModel } from '../../whatsapp';
|
|
|
20
20
|
* @example
|
|
21
21
|
* ```javascript
|
|
22
22
|
* // Single message
|
|
23
|
-
* WPP.chat.getMessageById('true_
|
|
23
|
+
* WPP.chat.getMessageById('true_[number]@c.us_ABCDEF');
|
|
24
24
|
*
|
|
25
25
|
* // List of messages
|
|
26
|
-
* WPP.chat.getMessageById(['true_
|
|
26
|
+
* WPP.chat.getMessageById(['true_[number]@c.us_ABCDEF', 'false_[number]@c.us_789456']);
|
|
27
27
|
* ```
|
|
28
28
|
*
|
|
29
29
|
* @category Message
|
|
@@ -26,17 +26,17 @@ export interface GetMessagesOptions {
|
|
|
26
26
|
* @example
|
|
27
27
|
* ```javascript
|
|
28
28
|
* // Some messages
|
|
29
|
-
* WPP.chat.getMessages('
|
|
29
|
+
* WPP.chat.getMessages('[number]@c.us', {
|
|
30
30
|
* count: 20,
|
|
31
31
|
* });
|
|
32
32
|
*
|
|
33
33
|
* // All messages
|
|
34
|
-
* WPP.chat.getMessages('
|
|
34
|
+
* WPP.chat.getMessages('[number]@c.us', {
|
|
35
35
|
* count: -1,
|
|
36
36
|
* });
|
|
37
37
|
*
|
|
38
38
|
* // 20 messages before specific message
|
|
39
|
-
* WPP.chat.getMessages('
|
|
39
|
+
* WPP.chat.getMessages('[number]@c.us', {
|
|
40
40
|
* count: 20,
|
|
41
41
|
* direction: 'before',
|
|
42
42
|
* id: '<full message id>'
|
|
@@ -21,10 +21,10 @@ import { Wid } from '../../whatsapp';
|
|
|
21
21
|
* @example
|
|
22
22
|
* ```javascript
|
|
23
23
|
* // Mark is composing
|
|
24
|
-
* WPP.chat.markIsComposing('
|
|
24
|
+
* WPP.chat.markIsComposing('[number]@c.us');
|
|
25
25
|
*
|
|
26
26
|
* // Mark is composing for 5 seconds
|
|
27
|
-
* WPP.chat.markIsComposing('
|
|
27
|
+
* WPP.chat.markIsComposing('[number]@c.us', 5000);
|
|
28
28
|
* ```
|
|
29
29
|
* @category Chat
|
|
30
30
|
*/
|
|
@@ -21,10 +21,10 @@ import { Wid } from '../../whatsapp';
|
|
|
21
21
|
* @example
|
|
22
22
|
* ```javascript
|
|
23
23
|
* // Mark is recording
|
|
24
|
-
* WPP.chat.markIsRecording('
|
|
24
|
+
* WPP.chat.markIsRecording('[number]@c.us');
|
|
25
25
|
*
|
|
26
26
|
* // Mark is recording for 5 seconds
|
|
27
|
-
* WPP.chat.markIsRecording('
|
|
27
|
+
* WPP.chat.markIsRecording('[number]@c.us', 5000);
|
|
28
28
|
* ```
|
|
29
29
|
* @category Chat
|
|
30
30
|
*/
|
|
@@ -22,14 +22,14 @@ import { Wid } from '../../whatsapp';
|
|
|
22
22
|
* @example
|
|
23
23
|
* ```javascript
|
|
24
24
|
* // Mute for 60 seconds
|
|
25
|
-
* WPP.chat.mute('
|
|
25
|
+
* WPP.chat.mute('[number]@c.us', {duration: 60});
|
|
26
26
|
*
|
|
27
27
|
* // Mute util 2021-01-01
|
|
28
|
-
* WPP.chat.mute('
|
|
28
|
+
* WPP.chat.mute('[number]@c.us', {expiration: 1641006000});
|
|
29
29
|
*
|
|
30
30
|
* // or using date
|
|
31
31
|
* const expiration = new Date('2022-01-01 00:00:00');
|
|
32
|
-
* WPP.chat.mute('
|
|
32
|
+
* WPP.chat.mute('[number]@c.us', {expiration: expiration});
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
35
35
|
* @category Chat
|
|
@@ -23,10 +23,10 @@ export interface LinkPreviewOptions {
|
|
|
23
23
|
* @example
|
|
24
24
|
* ```javascript
|
|
25
25
|
* // Automatic detection
|
|
26
|
-
* WPP.chat.sendTextMessage('
|
|
26
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'See https://www.youtube.com/watch?v=v1PBptSDIh8');
|
|
27
27
|
*
|
|
28
28
|
* // Overriding the title and description
|
|
29
|
-
* WPP.chat.sendTextMessage('
|
|
29
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'See https://www.youtube.com/watch?v=v1PBptSDIh8', {
|
|
30
30
|
* linkPreview: {
|
|
31
31
|
* title: 'Another text',
|
|
32
32
|
* description: 'Another description'
|
|
@@ -49,7 +49,7 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
49
49
|
* ```javascript
|
|
50
50
|
* // Single document
|
|
51
51
|
* WPP.chat.sendFileMessage(
|
|
52
|
-
* '
|
|
52
|
+
* '[number]@c.us',
|
|
53
53
|
* 'data:image/jpeg;base64,<a long base64 file...>',
|
|
54
54
|
* {
|
|
55
55
|
* type: 'document',
|
|
@@ -61,7 +61,7 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
61
61
|
*
|
|
62
62
|
* // Image with view once
|
|
63
63
|
* WPP.chat.sendFileMessage(
|
|
64
|
-
* '
|
|
64
|
+
* '[number]@c.us',
|
|
65
65
|
* 'data:image/jpeg;base64,<a long base64 file...>',
|
|
66
66
|
* {
|
|
67
67
|
* type: 'image',
|
|
@@ -72,7 +72,7 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
72
72
|
*
|
|
73
73
|
* // PTT audio
|
|
74
74
|
* WPP.chat.sendFileMessage(
|
|
75
|
-
* '
|
|
75
|
+
* '[number]@c.us',
|
|
76
76
|
* 'data:audio/mp3;base64,<a long base64 file...>',
|
|
77
77
|
* {
|
|
78
78
|
* type: 'audio',
|
|
@@ -82,7 +82,7 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
82
82
|
*
|
|
83
83
|
* // Image with view buttons
|
|
84
84
|
* WPP.chat.sendFileMessage(
|
|
85
|
-
* '
|
|
85
|
+
* '[number]@c.us',
|
|
86
86
|
* 'data:image/jpeg;base64,<a long base64 file...>',
|
|
87
87
|
* {
|
|
88
88
|
* type: 'image',
|
|
@@ -103,7 +103,7 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
103
103
|
*
|
|
104
104
|
* // Image as Sticker
|
|
105
105
|
* WPP.chat.sendFileMessage(
|
|
106
|
-
* '
|
|
106
|
+
* '[number]@c.us',
|
|
107
107
|
* 'data:image/png;base64,<a long base64 file...>',
|
|
108
108
|
* {
|
|
109
109
|
* type: 'sticker'
|
|
@@ -31,7 +31,7 @@ export interface ListMessageOptions extends SendMessageOptions {
|
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* ```javascript
|
|
34
|
-
* WPP.chat.sendListMessage('
|
|
34
|
+
* WPP.chat.sendListMessage('[number]@c.us', {
|
|
35
35
|
* buttonText: 'Click Me!',
|
|
36
36
|
* description: "Hello it's list message",
|
|
37
37
|
* sections: [{
|
package/dist/chat/types.d.ts
CHANGED
|
@@ -23,20 +23,20 @@ export interface SendMessageOptions {
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```javascript
|
|
26
|
-
* WPP.chat.sendTextMessage('
|
|
26
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'Hello new contact', {
|
|
27
27
|
* createChat: true
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
createChat?: boolean;
|
|
32
32
|
/**
|
|
33
|
-
* Automatic detect and add the mentioned contacts with
|
|
33
|
+
* Automatic detect and add the mentioned contacts with @[number]
|
|
34
34
|
*
|
|
35
35
|
* @default true
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* ```javascript
|
|
39
|
-
* WPP.chat.sendTextMessage('
|
|
39
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'Hello @123 and @456', {
|
|
40
40
|
* detectMentioned: true
|
|
41
41
|
* });
|
|
42
42
|
* ```
|
|
@@ -49,7 +49,7 @@ export interface SendMessageOptions {
|
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
51
|
* ```javascript
|
|
52
|
-
* WPP.chat.sendTextMessage('
|
|
52
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'Replying your message', {
|
|
53
53
|
* markIsRead: true
|
|
54
54
|
* });
|
|
55
55
|
* ```
|
|
@@ -65,7 +65,7 @@ export interface SendMessageOptions {
|
|
|
65
65
|
*
|
|
66
66
|
* @example
|
|
67
67
|
* ```javascript
|
|
68
|
-
* WPP.chat.sendTextMessage('
|
|
68
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'Hello @123 and @456', {
|
|
69
69
|
* mentionedList: ['123@c.us', '456@c.us']
|
|
70
70
|
* })
|
|
71
71
|
* ```
|
|
@@ -76,8 +76,8 @@ export interface SendMessageOptions {
|
|
|
76
76
|
*
|
|
77
77
|
* @example
|
|
78
78
|
* ```javascript
|
|
79
|
-
* WPP.chat.sendTextMessage('
|
|
80
|
-
* quotedMsg: 'true_
|
|
79
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'This is a reply', {
|
|
80
|
+
* quotedMsg: 'true_[number]@c.us_3EB0F435D95D32C4C638'
|
|
81
81
|
* })
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
@@ -89,7 +89,7 @@ export interface SendMessageOptions {
|
|
|
89
89
|
*
|
|
90
90
|
* @example
|
|
91
91
|
* ```javascript
|
|
92
|
-
* WPP.chat.sendTextMessage('
|
|
92
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'Wait for sent', {
|
|
93
93
|
* waitForAck: true
|
|
94
94
|
* })
|
|
95
95
|
* ```
|
|
@@ -38,7 +38,7 @@ export interface QueryExistsResult {
|
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* ```javascript
|
|
41
|
-
* const result = await WPP.contact.queryExists('
|
|
41
|
+
* const result = await WPP.contact.queryExists('[number]@c.us');
|
|
42
42
|
* console.log(result.wid); // Correct ID
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
@@ -19,7 +19,7 @@ import { Wid } from '../../whatsapp';
|
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```javascript
|
|
22
|
-
* const code = WPP.group.getInviteCode('
|
|
22
|
+
* const code = WPP.group.getInviteCode('[group-id]@g.us');
|
|
23
23
|
* const link = 'https://chat.whatsapp.com/' + code;
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
@@ -19,7 +19,7 @@ import { Wid } from '../../whatsapp';
|
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```javascript
|
|
22
|
-
* WPP.group.getParticipants('
|
|
22
|
+
* WPP.group.getParticipants('[group-id]@g.us');
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
export declare function getParticipants(groupId: string | Wid): Promise<import("../../whatsapp").ParticipantModel[]>;
|
|
@@ -19,7 +19,7 @@ import { Wid } from '../../whatsapp';
|
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```javascript
|
|
22
|
-
* const code = WPP.group.revokeInviteCode('
|
|
22
|
+
* const code = WPP.group.revokeInviteCode('[group-id]@g.us');
|
|
23
23
|
* const link = 'https://chat.whatsapp.com/' + code;
|
|
24
24
|
* ```
|
|
25
25
|
*
|
|
@@ -19,7 +19,7 @@ import { Wid } from '../../whatsapp';
|
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```javascript
|
|
22
|
-
* await WPP.group.setDescription('
|
|
22
|
+
* await WPP.group.setDescription('[group-id]@g.us', 'new group description');
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
25
|
* @category Group
|
|
@@ -25,28 +25,28 @@ export declare enum GroupProperty {
|
|
|
25
25
|
* @example
|
|
26
26
|
* ```javascript
|
|
27
27
|
* // Only admins can send message
|
|
28
|
-
* await WPP.group.setProperty('
|
|
28
|
+
* await WPP.group.setProperty('[group-id]@g.us', 'announcement', true);
|
|
29
29
|
*
|
|
30
30
|
* // All can send message
|
|
31
|
-
* await WPP.group.setProperty('
|
|
31
|
+
* await WPP.group.setProperty('[group-id]@g.us', 'announcement', false);
|
|
32
32
|
*
|
|
33
33
|
* // Disatble temporary messages
|
|
34
|
-
* await WPP.group.setProperty('
|
|
34
|
+
* await WPP.group.setProperty('[group-id]@g.us', 'ephemeral', 0);
|
|
35
35
|
*
|
|
36
36
|
* // Enable temporary messages for 24 hours
|
|
37
|
-
* await WPP.group.setProperty('
|
|
37
|
+
* await WPP.group.setProperty('[group-id]@g.us', 'ephemeral', 86400);
|
|
38
38
|
*
|
|
39
39
|
* // Enable temporary messages for 7 days
|
|
40
|
-
* await WPP.group.setProperty('
|
|
40
|
+
* await WPP.group.setProperty('[group-id]@g.us', 'ephemeral', 604800);
|
|
41
41
|
*
|
|
42
42
|
* // Enable temporary messages for 90 days
|
|
43
|
-
* await WPP.group.setProperty('
|
|
43
|
+
* await WPP.group.setProperty('[group-id]@g.us', 'ephemeral', 7776000);
|
|
44
44
|
*
|
|
45
45
|
* // Only admins can edit group properties
|
|
46
|
-
* await WPP.group.setProperty('
|
|
46
|
+
* await WPP.group.setProperty('[group-id]@g.us', 'restrict', true);
|
|
47
47
|
*
|
|
48
48
|
* // All can edit group properties
|
|
49
|
-
* await WPP.group.setProperty('
|
|
49
|
+
* await WPP.group.setProperty('[group-id]@g.us', 'restrict', false);
|
|
50
50
|
* ```
|
|
51
51
|
*
|
|
52
52
|
* @category Group
|
|
@@ -23,7 +23,7 @@ export interface AddOrRemoveLabelsOptions {
|
|
|
23
23
|
* @example
|
|
24
24
|
* ```javascript
|
|
25
25
|
* await WPP.labels.addOrRemoveLabels(
|
|
26
|
-
* ['
|
|
26
|
+
* ['[number]@c.us','[number]@c.us'],
|
|
27
27
|
* [{labelId:'76', type:'add'},{labelId:'75', type:'remove'}]
|
|
28
28
|
* )
|
|
29
29
|
* ```
|
|
@@ -13,7 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/** @whatsapp
|
|
16
|
+
/** @whatsapp 65212 */
|
|
17
17
|
export declare function randomMessageId(): string;
|
|
18
|
-
/** @whatsapp 15860 */
|
|
19
|
-
export declare function randomId(): string;
|
|
@@ -13,90 +13,33 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/** @whatsapp
|
|
16
|
+
/** @whatsapp 64369 */
|
|
17
17
|
export declare const Constants: {
|
|
18
18
|
IMG_THUMB_MAX_EDGE: 100;
|
|
19
19
|
DOC_THUMB_MAX_EDGE: 480;
|
|
20
20
|
VIDEO_THUMB_MAX_EDGE: 480;
|
|
21
21
|
MAX_PORTRAIT_MEDIA_CAPTION_LENGTH: 500;
|
|
22
22
|
MAX_FILES: 30;
|
|
23
|
-
STICKER_DIMENSION: 512;
|
|
24
|
-
STICKER_BORDER_WIDTH: 8;
|
|
25
|
-
STICKER_PADDING: 36;
|
|
26
|
-
STICKER_LIST_ITEM_HEIGHT: 156;
|
|
27
|
-
STICKER_MAKER_IMAGE_PADDING: 20;
|
|
28
|
-
STICKER_PACK_FETCH_TIMEOUT: 86400;
|
|
29
23
|
MEDIA_EDITOR_OUTLINE_TENSION: 0.4;
|
|
30
24
|
MMS_THUMBNAIL_UPLOAD_TIMEOUT: 3e3;
|
|
31
25
|
FREQUENTLY_FORWARDED_SENTINEL: 127;
|
|
32
26
|
MAX_SMB_LABEL_COUNT: 20;
|
|
33
|
-
FB_CLB_TOKEN: '1063127757113399|745146ffa34413f9dbb5469f5370b7af';
|
|
34
|
-
FB_CLB_CHECK_URL: 'https://crashlogs.whatsapp.net/wa_fls_upload_check';
|
|
35
|
-
FB_CLB_URL: 'https://crashlogs.whatsapp.net/wa_clb_data';
|
|
36
|
-
FAKE_USER_AGENT: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36';
|
|
37
27
|
WA_COMMERCE_POLICY_URL: 'https://www.whatsapp.com/policies/commerce-policy';
|
|
38
|
-
SEND_UNAVAILABLE_WAIT: 15e3;
|
|
39
|
-
SEND_PAUSED_WAIT: 2500;
|
|
40
|
-
LOG_UPLOAD_INTERVAL: 36e5;
|
|
41
|
-
REVOKE_WINDOW: 4096;
|
|
42
|
-
REVOKE_WINDOW_V2: 216e3;
|
|
43
|
-
REVOKE_WINDOW_V2_RECEIVER_MARGIN: 43200;
|
|
44
28
|
MAX_TXT_MSG_SIZE: 65536;
|
|
45
|
-
INITIAL_PAGE_SIZE: 768;
|
|
46
|
-
FREQUENTLY_FORWARDED_INITIAL_PAGE_SIZE: 308;
|
|
47
|
-
SUBSEQUENT_PAGE_SIZE: 3072;
|
|
48
|
-
OVERFLOWING_PAGE_THRESHOLD: 0.1;
|
|
49
29
|
GROUP_DESCRIPTION_INFO_PANEL_TRUNC_LENGTH: 100;
|
|
50
30
|
BUSINESS_DESCRIPTION_INFO_PANEL_TRUNC_LENGTH: 200;
|
|
51
|
-
GROUP_DESCRIPTION_LENGTH: 0;
|
|
52
|
-
FTS_MIN_CHARS: 2;
|
|
53
|
-
FTS_TTL: 6e4;
|
|
54
|
-
FTS_TYPING_DELAY: 300;
|
|
55
|
-
FTS_NUM_RESULTS: 30;
|
|
56
|
-
HSM_ASPECT_RATIO: 1.91;
|
|
57
|
-
TEMPLATE_DOC_MIME_TYPES: 1;
|
|
58
31
|
TEMPLATE_URL_START: 64;
|
|
59
32
|
TEMPLATE_URL_END: 32;
|
|
60
33
|
SQUELCH_RESET_VALUE: -1;
|
|
61
|
-
COOKIE_REF: 'ref';
|
|
62
|
-
COOKIE_TOK: 'tok';
|
|
63
|
-
MIN_PIC_SIDE: 192;
|
|
64
|
-
MAX_PIC_SIDE: 640;
|
|
65
|
-
PROF_PIC_THUMB_SIDE: 96;
|
|
66
34
|
MAX_CAPTION_LENGTH: 1024;
|
|
67
35
|
REACTION_CONTENT_MAX_LENGTH: 30;
|
|
68
36
|
MAX_CART_MESSAGE_LENGTH: 1024;
|
|
69
|
-
MAX_PRODUCT_SUBTITLE_LENGTH: 70;
|
|
70
|
-
MAX_REPLY_PRODUCT_TITLE_LENGTH: 40;
|
|
71
|
-
MAX_REPLY_PRODUCT_DESC_LENGTH: 95;
|
|
72
|
-
ALBUM_MIN_SIZE: 4;
|
|
73
|
-
ALBUM_MAX_SIZE: 102;
|
|
74
|
-
ALBUM_MAX_HEIGHT: 168;
|
|
75
|
-
ALBUM_PADDING: 3;
|
|
76
|
-
PRESENCE_COMPOSING_TIMEOUT: 25e3;
|
|
77
|
-
PRESENCE_RESEND_WAIT: 1e4;
|
|
78
|
-
IMAGE_MIMES: 'image/*';
|
|
79
|
-
VIDEO_MIMES: 'video/mp4,video/3gpp,video/quicktime';
|
|
80
|
-
MAX_STATUS_LENGTH: 139;
|
|
81
37
|
MAX_PUSHNAME_LENGTH: 25;
|
|
82
38
|
KEY_BUNDLE_TYPE: '';
|
|
83
39
|
NEW_MSG_SENT: 'new_msg_sent';
|
|
84
40
|
ONE_BY_ONE_TRANS_GIF: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
|
85
|
-
GROUP_INVITE_LINK_URL: 'https://chat.whatsapp.com/';
|
|
86
|
-
WHATSAPP_ORIGIN: 'https://whatsapp.com';
|
|
87
|
-
WHATSAPP_GRAPHQL_ENDPOINT: 'https://graph.whatsapp.com/graphql';
|
|
88
|
-
WHATSAPP_GRAPHQL_ACCESS_TOKEN: 'WA|438455091201276|159a64e893c734301a4db315bba22e04';
|
|
89
|
-
PRODUCT_INQUIRY_TYPE: 'product_inquiry';
|
|
90
|
-
SPEEDY_RESUME_MAX_CHATS: 5e3;
|
|
91
|
-
LAYOUT_2COLUMNS_MAX_WIDTH: 1024;
|
|
92
|
-
MUTE_ALWAYS_EXPIRATION_SENTINEL: -1;
|
|
93
41
|
VOIP_LOG_COLOR: '#aa6627';
|
|
94
42
|
VOIP_MAX_GROUP_CALL_PARTICIPANTS: 8;
|
|
95
43
|
WAM_SYS_INFO_INIT_DELAY: 5e3;
|
|
96
44
|
MARKED_AS_UNREAD: -1;
|
|
97
|
-
MAS_APP_IDENTIFIER: '57T9237FN3.desktop.WhatsApp';
|
|
98
|
-
RENDER_PROCESS_LOG_PATH: 'render_process_problem_log.txt';
|
|
99
|
-
PS_KILLSWITCH_TOKEN: 'ps-killswitch-token';
|
|
100
|
-
STORAGE_DISMISS_STATE: 'storage-dismiss-state';
|
|
101
|
-
STORAGE_ALERT_FLAG: 'storage-alert-flag';
|
|
102
45
|
};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Wid } from './Wid';
|
|
17
|
-
/** @whatsapp
|
|
17
|
+
/** @whatsapp 65212 */
|
|
18
18
|
export declare class MsgKey {
|
|
19
19
|
constructor(options: {
|
|
20
20
|
from: Wid;
|
|
@@ -37,4 +37,8 @@ export declare class MsgKey {
|
|
|
37
37
|
clone(): MsgKey;
|
|
38
38
|
equals(key: unknown): key is MsgKey;
|
|
39
39
|
static fromString(key: string): MsgKey;
|
|
40
|
+
/**
|
|
41
|
+
* @whatsapp >= 2.2208.7
|
|
42
|
+
*/
|
|
43
|
+
static newId(): string;
|
|
40
44
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/** @whatsapp
|
|
16
|
+
/** @whatsapp 89867 */
|
|
17
17
|
export declare class Wid {
|
|
18
18
|
constructor(id: string, options?: {
|
|
19
19
|
intentionallyUsePrivateConstructor: boolean;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Wid } from './Wid';
|
|
17
|
-
/** @whatsapp
|
|
17
|
+
/** @whatsapp 45454 */
|
|
18
18
|
export declare namespace WidFactory {
|
|
19
19
|
function createDeviceWid(wid: string): Wid;
|
|
20
20
|
function createDeviceWidFromUserAndDevice(user: string, device: string): Wid;
|
|
@@ -17,8 +17,8 @@ import { Stringable } from '../../types';
|
|
|
17
17
|
import { WritableProperties } from '../../util';
|
|
18
18
|
import { EventEmitter } from '../misc';
|
|
19
19
|
export declare type ModelProxy<P, S, D> = P & S & Readonly<D> & {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
readonly attributes: P & S;
|
|
21
|
+
readonly isState: true;
|
|
22
22
|
readonly mirrorMask: {
|
|
23
23
|
[key in keyof (P & S & D) as `change:${string & key}`]: number;
|
|
24
24
|
};
|
|
@@ -37,10 +37,10 @@ interface Session {
|
|
|
37
37
|
}
|
|
38
38
|
interface Derived {
|
|
39
39
|
}
|
|
40
|
-
/** @whatsapp
|
|
40
|
+
/** @whatsapp 99718 */
|
|
41
41
|
export declare interface StickerModel extends ModelProxy<Props, Session, Derived> {
|
|
42
42
|
}
|
|
43
|
-
/** @whatsapp
|
|
43
|
+
/** @whatsapp 99718 */
|
|
44
44
|
export declare class StickerModel extends Model {
|
|
45
45
|
constructor(proterties?: ModelPropertiesContructor<StickerModel>, options?: ModelOptions);
|
|
46
46
|
downloadMedia(): any;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/** @whatsapp
|
|
16
|
+
/** @whatsapp 46308 */
|
|
17
17
|
export declare namespace adv {
|
|
18
18
|
function generateADVSecretKey(): string;
|
|
19
19
|
function getADVSecretKey(): string;
|