@wppconnect/wa-js 2.2.2 → 2.4.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 +27 -0
- package/dist/chat/functions/archive.d.ts +54 -0
- package/dist/chat/functions/deleteMessage.d.ts +13 -0
- package/dist/chat/functions/index.d.ts +4 -0
- package/dist/chat/functions/list.d.ts +39 -0
- package/dist/chat/functions/pin.d.ts +54 -0
- package/dist/chat/functions/sendCreatePollMessage.d.ts +35 -0
- package/dist/chat/functions/sendFileMessage.d.ts +1 -1
- package/dist/chat/functions/sendLocationMessage.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/whatsapp/collections/AggReactionsCollection.d.ts +22 -0
- package/dist/whatsapp/collections/ReactionsCollection.d.ts +30 -0
- package/dist/whatsapp/collections/ReactionsSendersCollection.d.ts +22 -0
- package/dist/whatsapp/collections/index.d.ts +3 -0
- package/dist/whatsapp/enums/LogoutReason.d.ts +3 -1
- package/dist/whatsapp/functions/encryptAndSendGroupMsg.d.ts +20 -0
- package/dist/whatsapp/functions/encryptAndSendMsg.d.ts +20 -0
- package/dist/whatsapp/functions/getFanOutList.d.ts +22 -0
- package/dist/whatsapp/functions/getGroupSenderKeyList.d.ts +24 -0
- package/dist/whatsapp/functions/getOrGenerate.d.ts +1 -0
- package/dist/whatsapp/functions/index.d.ts +6 -0
- package/dist/whatsapp/functions/mediaTypeFromProtobuf.d.ts +3 -1
- package/dist/whatsapp/functions/setArchive.d.ts +20 -0
- package/dist/whatsapp/functions/setPin.d.ts +20 -0
- package/dist/whatsapp/misc/Cmd.d.ts +12 -4
- package/dist/whatsapp/misc/Features.d.ts +3 -1
- package/dist/whatsapp/misc/UserPrefs.d.ts +1 -0
- package/dist/whatsapp/models/AggReactionsModel.d.ts +39 -0
- package/dist/whatsapp/models/MsgModel.d.ts +1 -0
- package/dist/whatsapp/models/ReactionsModel.d.ts +43 -0
- package/dist/whatsapp/models/ReactionsSendersModel.d.ts +47 -0
- package/dist/whatsapp/models/index.d.ts +3 -0
- package/dist/whatsapp/multidevice/waNoiseInfo.d.ts +1 -0
- package/dist/whatsapp/multidevice/waSignalStore.d.ts +3 -1
- package/dist/whatsapp/stores.d.ts +2 -0
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## 2.4.1 (2022-05-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Fixed detect mentionedList for invalid wids ([#427](https://github.com/wppconnect-team/wa-js/issues/427)) ([c701dc3](https://github.com/wppconnect-team/wa-js/commit/c701dc3b8b04cce1e51dd5dda12bf5e80e11de2e))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# 2.4.0 (2022-05-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Exported related reactions classes ([466ebad](https://github.com/wppconnect-team/wa-js/commit/466ebad34c1545121c681df0196539792b09f7eb))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# 2.3.0 (2022-05-27)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* Fixed promise time for WPP.chat.markIsComposing with duration ([e94718b](https://github.com/wppconnect-team/wa-js/commit/e94718b37af7f9bfbb181473fc5ac3d0f2782c13))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
1
28
|
## 2.2.2 (2022-05-15)
|
|
2
29
|
|
|
3
30
|
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { Wid } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Archive a chat
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* // Archive a chat
|
|
23
|
+
* WPP.chat.archive('[number]@c.us');
|
|
24
|
+
*
|
|
25
|
+
* // Unarchive a chat
|
|
26
|
+
* WPP.chat.archive('[number]@c.us', false);
|
|
27
|
+
* // or
|
|
28
|
+
* WPP.chat.unarchive('[number]@c.us');
|
|
29
|
+
* ```
|
|
30
|
+
* @category Chat
|
|
31
|
+
*/
|
|
32
|
+
export declare function archive(chatId: string | Wid, archive?: boolean): Promise<{
|
|
33
|
+
wid: Wid;
|
|
34
|
+
archive: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Unarchive a chat
|
|
38
|
+
*
|
|
39
|
+
* @alias archive
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```javascript
|
|
43
|
+
* // Unarchive a chat
|
|
44
|
+
* WPP.chat.unarchive('[number]@c.us');
|
|
45
|
+
*
|
|
46
|
+
* // Alias for
|
|
47
|
+
* WPP.chat.archive('[number]@c.us', false);
|
|
48
|
+
* ```
|
|
49
|
+
* @category Chat
|
|
50
|
+
*/
|
|
51
|
+
export declare function unarchive(chatId: string | Wid): Promise<{
|
|
52
|
+
wid: Wid;
|
|
53
|
+
archive: boolean;
|
|
54
|
+
}>;
|
|
@@ -20,10 +20,23 @@ export interface DeleteMessageReturn {
|
|
|
20
20
|
sendMsgResult: Promise<SendMsgResult>;
|
|
21
21
|
isRevoked: boolean;
|
|
22
22
|
isDeleted: boolean;
|
|
23
|
+
isSentByMe: boolean;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Delete a message
|
|
26
27
|
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```javascript
|
|
30
|
+
* // Delete a message
|
|
31
|
+
* WPP.chat.deleteMessage('[number]@callback.us', 'msgid');
|
|
32
|
+
* // Delete a list of messages
|
|
33
|
+
* WPP.chat.deleteMessage('[number]@callback.us', ['msgid1', 'msgid2]);
|
|
34
|
+
* // Delete a message and delete media
|
|
35
|
+
* WPP.chat.deleteMessage('[number]@callback.us', 'msgid', true);
|
|
36
|
+
* // Revoke a message
|
|
37
|
+
* WPP.chat.deleteMessage('[number]@callback.us', 'msgid', true, true);
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
27
40
|
* @category Message
|
|
28
41
|
*/
|
|
29
42
|
export declare function deleteMessage(chatId: string | Wid, id: string, deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn>;
|
|
@@ -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 { archive, unarchive } from './archive';
|
|
16
17
|
export { canMute } from './canMute';
|
|
17
18
|
export { clear } from './clear';
|
|
18
19
|
export { delete } from './delete';
|
|
@@ -23,6 +24,7 @@ export { generateMessageID } from './generateMessageID';
|
|
|
23
24
|
export { get } from './get';
|
|
24
25
|
export { getMessageById } from './getMessageById';
|
|
25
26
|
export { getMessages, GetMessagesOptions } from './getMessages';
|
|
27
|
+
export { ChatListOptions, list } from './list';
|
|
26
28
|
export { markIsComposing } from './markIsComposing';
|
|
27
29
|
export { markIsPaused } from './markIsPaused';
|
|
28
30
|
export { markIsRead } from './markIsRead';
|
|
@@ -32,9 +34,11 @@ export { mute } from './mute';
|
|
|
32
34
|
export { openChatAt } from './openChatAt';
|
|
33
35
|
export { openChatBottom } from './openChatBottom';
|
|
34
36
|
export { openChatFromUnread } from './openChatFromUnread';
|
|
37
|
+
export { pin, unpin } from './pin';
|
|
35
38
|
export { LinkPreviewOptions, prepareLinkPreview } from './prepareLinkPreview';
|
|
36
39
|
export { MessageButtonsOptions, prepareMessageButtons, } from './prepareMessageButtons';
|
|
37
40
|
export { prepareRawMessage } from './prepareRawMessage';
|
|
41
|
+
export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
|
|
38
42
|
export { AudioMessageOptions, AutoDetectMessageOptions, DocumentMessageOptions, FileMessageOptions, ImageMessageOptions, sendFileMessage, StickerMessageOptions, VideoMessageOptions, } from './sendFileMessage';
|
|
39
43
|
export { ListMessageOptions, sendListMessage } from './sendListMessage';
|
|
40
44
|
export { LocationMessageOptions, sendLocationMessage, } from './sendLocationMessage';
|
|
@@ -0,0 +1,39 @@
|
|
|
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 '../../whatsapp';
|
|
17
|
+
export interface ChatListOptions {
|
|
18
|
+
onlyGroups?: boolean;
|
|
19
|
+
onlyUsers?: boolean;
|
|
20
|
+
onlyWithUnreadMessage?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Return a list of chats
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```javascript
|
|
27
|
+
* // All chats
|
|
28
|
+
* const chat = await WPP.chat.list();
|
|
29
|
+
*
|
|
30
|
+
* // Only users chats
|
|
31
|
+
* const chat = await WPP.chat.list({onlyUsers: true});
|
|
32
|
+
*
|
|
33
|
+
* // Only groups chats
|
|
34
|
+
* const chat = await WPP.chat.list({onlyGroups: true});
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @category Chat
|
|
38
|
+
*/
|
|
39
|
+
export declare function list(options: ChatListOptions): Promise<ChatModel[]>;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { Wid } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Pin a chat
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* // Pin a chat
|
|
23
|
+
* WPP.chat.pin('[number]@c.us');
|
|
24
|
+
*
|
|
25
|
+
* // Unpin a chat
|
|
26
|
+
* WPP.chat.pin('[number]@c.us', false);
|
|
27
|
+
* // or
|
|
28
|
+
* WPP.chat.unpin('[number]@c.us');
|
|
29
|
+
* ```
|
|
30
|
+
* @category Chat
|
|
31
|
+
*/
|
|
32
|
+
export declare function pin(chatId: string | Wid, pin?: boolean): Promise<{
|
|
33
|
+
wid: Wid;
|
|
34
|
+
pin: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Unpin a chat
|
|
38
|
+
*
|
|
39
|
+
* @alias pin
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```javascript
|
|
43
|
+
* // Unpin a chat
|
|
44
|
+
* WPP.chat.unpin('[number]@c.us');
|
|
45
|
+
*
|
|
46
|
+
* // Alias for
|
|
47
|
+
* WPP.chat.pin('[number]@c.us', false);
|
|
48
|
+
* ```
|
|
49
|
+
* @category Chat
|
|
50
|
+
*/
|
|
51
|
+
export declare function unpin(chatId: string | Wid): Promise<{
|
|
52
|
+
wid: Wid;
|
|
53
|
+
pin: boolean;
|
|
54
|
+
}>;
|
|
@@ -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 { SendMessageOptions, SendMessageReturn } from '..';
|
|
17
|
+
export declare type PoolMessageOptions = SendMessageOptions;
|
|
18
|
+
/**
|
|
19
|
+
* Send a create poll message
|
|
20
|
+
*
|
|
21
|
+
* Note: This only works for groups
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```javascript
|
|
25
|
+
* // Single pool
|
|
26
|
+
* WPP.chat.sendCreatePollMessage(
|
|
27
|
+
* '[number]@g.us',
|
|
28
|
+
* 'A poll name',
|
|
29
|
+
* ['Option 1', 'Option 2', 'Option 3']
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @category Message
|
|
34
|
+
*/
|
|
35
|
+
export declare function sendCreatePollMessage(chatId: any, name: string, choices: string[], options?: PoolMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -51,7 +51,7 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
51
51
|
* // Single document
|
|
52
52
|
* WPP.chat.sendFileMessage(
|
|
53
53
|
* '[number]@c.us',
|
|
54
|
-
* 'data:
|
|
54
|
+
* 'data:application/msword;base64,<a long base64 file...>',
|
|
55
55
|
* {
|
|
56
56
|
* type: 'document',
|
|
57
57
|
* caption: 'My document', // Optional
|
|
@@ -19,11 +19,11 @@ export interface LocationMessageOptions extends SendMessageOptions, MessageButto
|
|
|
19
19
|
/**
|
|
20
20
|
* latitude in degrees
|
|
21
21
|
*/
|
|
22
|
-
lat: number;
|
|
22
|
+
lat: number | string;
|
|
23
23
|
/**
|
|
24
24
|
* longitude in degrees
|
|
25
25
|
*/
|
|
26
|
-
lng: number;
|
|
26
|
+
lng: number | string;
|
|
27
27
|
/**
|
|
28
28
|
* The full address of place
|
|
29
29
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import './deviceName';
|
|
|
18
18
|
import * as webpack from './webpack';
|
|
19
19
|
export { webpack };
|
|
20
20
|
export { isInjected, isReady } from './webpack';
|
|
21
|
-
export
|
|
21
|
+
export { config } from './config';
|
|
22
22
|
export * as blocklist from './blocklist';
|
|
23
23
|
export * as chat from './chat';
|
|
24
24
|
export * as conn from './conn';
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { AggReactionsModel } from '../models';
|
|
17
|
+
import { Collection } from './Collection';
|
|
18
|
+
/** @whatsapp 81130 */
|
|
19
|
+
export declare class AggReactionsCollection extends Collection<AggReactionsModel> {
|
|
20
|
+
static model: AggReactionsModel;
|
|
21
|
+
static comparator(): number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { ReactionsModel } from '../models';
|
|
17
|
+
import { BaseCollection } from './BaseCollection';
|
|
18
|
+
/** @whatsapp 57162 */
|
|
19
|
+
export declare class ReactionsCollection extends BaseCollection<ReactionsModel> {
|
|
20
|
+
static model: ReactionsModel;
|
|
21
|
+
static comparator(): any;
|
|
22
|
+
addOrUpdateReaction(e?: any): any;
|
|
23
|
+
removeReaction(e?: any): void;
|
|
24
|
+
getAggregateEmojiAndSender(e?: any, t?: any): any;
|
|
25
|
+
markReactionsAsRead(e?: any): void;
|
|
26
|
+
getExistingSenderModelFromReactionDetails(e?: any): any;
|
|
27
|
+
updateFailedPropsForExistingSentReaction(e?: any): void;
|
|
28
|
+
shouldUpdateAck(e?: any): any;
|
|
29
|
+
deleteReactionsByParentMessageKey(e?: any): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { ReactionsModel, ReactionsSendersModel } from '../models';
|
|
17
|
+
import { Collection } from './Collection';
|
|
18
|
+
/** @whatsapp 81130 */
|
|
19
|
+
export declare class ReactionsSendersCollection extends Collection<ReactionsModel> {
|
|
20
|
+
static model: ReactionsSendersModel;
|
|
21
|
+
static comparator(): number;
|
|
22
|
+
}
|
|
@@ -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 * from './AggReactionsCollection';
|
|
16
17
|
export * from './BaseCollection';
|
|
17
18
|
export * from './BlocklistCollection';
|
|
18
19
|
export * from './BusinessCategoriesResultCollection';
|
|
@@ -46,6 +47,8 @@ export * from './ProductImageCollection';
|
|
|
46
47
|
export * from './ProductMessageListCollection';
|
|
47
48
|
export * from './ProfilePicThumbCollection';
|
|
48
49
|
export * from './QuickReplyCollection';
|
|
50
|
+
export * from './ReactionsCollection';
|
|
51
|
+
export * from './ReactionsSendersCollection';
|
|
49
52
|
export * from './RecentEmojiCollection';
|
|
50
53
|
export * from './RecentStickerCollection';
|
|
51
54
|
export * from './StarredMsgCollection';
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/** @whatsapp 83578
|
|
16
|
+
/** @whatsapp 83578
|
|
17
|
+
* @whatsapp 88950 >= 2.2218.4
|
|
18
|
+
*/
|
|
17
19
|
export declare enum LogoutReason {
|
|
18
20
|
USER_INITIATED = "user_initiated",
|
|
19
21
|
SYNCD_FAILURE = "syncd_failure",
|
|
@@ -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 { MsgModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 51974
|
|
19
|
+
*/
|
|
20
|
+
export declare function encryptAndSendGroupMsg(message: MsgModel, protobuf: 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 { MsgModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 95547
|
|
19
|
+
*/
|
|
20
|
+
export declare function encryptAndSendMsg(message: MsgModel): Promise<any>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { Wid } from '../misc';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 16104
|
|
19
|
+
*/
|
|
20
|
+
export declare function getFanOutList(param: {
|
|
21
|
+
wids: Wid[];
|
|
22
|
+
}): Promise<Wid[]>;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { Wid } from '../misc';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 43201
|
|
19
|
+
*/
|
|
20
|
+
export declare function getGroupSenderKeyList(wid: Wid): Promise<{
|
|
21
|
+
skList: Wid[];
|
|
22
|
+
skDistribList: Wid[];
|
|
23
|
+
rotateKey: boolean;
|
|
24
|
+
}>;
|
|
@@ -16,11 +16,15 @@
|
|
|
16
16
|
export * from './addAndSendMsgToChat';
|
|
17
17
|
export * from './blockContact';
|
|
18
18
|
export * from './createMsgProtobuf';
|
|
19
|
+
export * from './encryptAndSendGroupMsg';
|
|
20
|
+
export * from './encryptAndSendMsg';
|
|
19
21
|
export * from './fetchLinkPreview';
|
|
20
22
|
export * from './findChat';
|
|
21
23
|
export * from './findFirstWebLink';
|
|
22
24
|
export * from './generateVideoThumbsAndDuration';
|
|
23
25
|
export * from './genMinimalLinkPreview';
|
|
26
|
+
export * from './getFanOutList';
|
|
27
|
+
export * from './getGroupSenderKeyList';
|
|
24
28
|
export * from './getOrGenerate';
|
|
25
29
|
export * from './groupParticipants';
|
|
26
30
|
export * from './handleAck';
|
|
@@ -43,7 +47,9 @@ export * from './sendQueryGroupInvite';
|
|
|
43
47
|
export * from './sendReactionToMsg';
|
|
44
48
|
export * from './sendRevokeGroupInviteCode';
|
|
45
49
|
export * from './sendTextMsgToChat';
|
|
50
|
+
export * from './setArchive';
|
|
46
51
|
export * from './setGroup';
|
|
52
|
+
export * from './setPin';
|
|
47
53
|
export * from './status';
|
|
48
54
|
export * from './typeAttributeFromProtobuf';
|
|
49
55
|
export * from './uploadProductImage';
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/** @whatsapp 95318
|
|
16
|
+
/** @whatsapp 95318
|
|
17
|
+
* @whatsapp 58853 >= 2.2218.4
|
|
18
|
+
*/
|
|
17
19
|
export declare function mediaTypeFromProtobuf(protoMessage: {
|
|
18
20
|
[key: string]: any;
|
|
19
21
|
}): string;
|
|
@@ -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 { ChatModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 59992
|
|
19
|
+
*/
|
|
20
|
+
export declare function setArchive(chat: ChatModel, archive: boolean, id?: string): Promise<void>;
|
|
@@ -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 { ChatModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 10236
|
|
19
|
+
*/
|
|
20
|
+
export declare function setPin(chat: ChatModel, pin: boolean): Promise<void>;
|
|
@@ -14,8 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ChatModel } from '..';
|
|
17
|
+
import { MsgModel } from '../models';
|
|
17
18
|
import { EventEmitter } from '.';
|
|
18
|
-
/** @whatsapp 88102
|
|
19
|
+
/** @whatsapp 88102
|
|
20
|
+
* @whatsapp 81572 >= 2.2218.4
|
|
21
|
+
*/
|
|
19
22
|
export declare class CmdClass extends EventEmitter {
|
|
20
23
|
isMainLoaded: boolean;
|
|
21
24
|
uiBusy: number;
|
|
@@ -47,8 +50,11 @@ export declare class CmdClass extends EventEmitter {
|
|
|
47
50
|
ephemeralDrawer(e?: any, t?: any): void;
|
|
48
51
|
sendStarMsgs(e?: any, t?: any, r?: any, n?: any): void;
|
|
49
52
|
sendUnstarMsgs(e?: any, t?: any, r?: any, n?: any): void;
|
|
50
|
-
sendDeleteMsgs(
|
|
51
|
-
sendRevokeMsgs(
|
|
53
|
+
sendDeleteMsgs(chat: ChatModel, msgs: MsgModel[], clearMedia?: boolean, toastPosition?: any): void;
|
|
54
|
+
sendRevokeMsgs(chat: ChatModel, msgs: MsgModel[], options?: {
|
|
55
|
+
clearMedia?: boolean;
|
|
56
|
+
toastPosition?: any;
|
|
57
|
+
}): void;
|
|
52
58
|
_openChat(e?: any, t?: any): void;
|
|
53
59
|
openChatAt(chat: ChatModel, context: ReturnType<ChatModel['getSearchContext']>): Promise<boolean>;
|
|
54
60
|
openChatFromUnread(chat: ChatModel): Promise<boolean>;
|
|
@@ -144,5 +150,7 @@ export declare class CmdClass extends EventEmitter {
|
|
|
144
150
|
showCountrySelector(e?: any, t?: any, r?: any): void;
|
|
145
151
|
toggleStickerMaker(): void;
|
|
146
152
|
}
|
|
147
|
-
/** @whatsapp 88102
|
|
153
|
+
/** @whatsapp 88102
|
|
154
|
+
* @whatsapp 81572 >= 2.2218.4
|
|
155
|
+
*/
|
|
148
156
|
export declare const Cmd: CmdClass;
|
|
@@ -60,6 +60,8 @@ declare class FeatureClass extends EventEmitter {
|
|
|
60
60
|
isGroupCatchUpEnabled(): boolean;
|
|
61
61
|
isInAppSupportEnabled(): boolean;
|
|
62
62
|
}
|
|
63
|
-
/** @whatsapp 7293
|
|
63
|
+
/** @whatsapp 7293
|
|
64
|
+
* @whatsapp 38184 >= 2.2218.4
|
|
65
|
+
*/
|
|
64
66
|
export declare const Features: FeatureClass;
|
|
65
67
|
export {};
|