@wppconnect/wa-js 2.2.1 → 2.4.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 +27 -0
- package/dist/chat/functions/archive.d.ts +54 -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/util/getVideoInfoFromBuffer.d.ts +25 -0
- package/dist/util/index.d.ts +1 -0
- 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/generateVideoThumbsAndDuration.d.ts +33 -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 +7 -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 +6 -2
- 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/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 +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
# 2.4.0 (2022-05-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Exported related reactions classes ([466ebad](https://github.com/wppconnect-team/wa-js/commit/466ebad34c1545121c681df0196539792b09f7eb))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# 2.3.0 (2022-05-27)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Fixed promise time for WPP.chat.markIsComposing with duration ([e94718b](https://github.com/wppconnect-team/wa-js/commit/e94718b37af7f9bfbb181473fc5ac3d0f2782c13))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 2.2.2 (2022-05-15)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* Fixed sendFileMessage for MP4 files on Chromium (fix [#384](https://github.com/wppconnect-team/wa-js/issues/384)) ([b7e6431](https://github.com/wppconnect-team/wa-js/commit/b7e6431a180f774f88f406a9600e3af7ac51e70f))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
1
28
|
## 2.2.1 (2022-05-10)
|
|
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
|
+
}>;
|
|
@@ -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,25 @@
|
|
|
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
|
+
* Get the video file duration
|
|
18
|
+
* @see https://gist.github.com/Elements-/cf063254730cd754599e#gistcomment-3241210
|
|
19
|
+
* @see https://gist.github.com/OllieJones/5ffb011fa3a11964154975582360391c
|
|
20
|
+
*/
|
|
21
|
+
export declare function getVideoInfoFromBuffer(arrayBuffer: ArrayBuffer): {
|
|
22
|
+
duration: number;
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
package/dist/util/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './createWid';
|
|
|
19
19
|
export * from './downloadImage';
|
|
20
20
|
export * from './errors';
|
|
21
21
|
export * from './fetchDataFromPNG';
|
|
22
|
+
export * from './getVideoInfoFromBuffer';
|
|
22
23
|
export * from './isBase64';
|
|
23
24
|
export * from './types';
|
|
24
25
|
export * from './wrapFunction';
|
|
@@ -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,33 @@
|
|
|
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
|
+
* @whatsapp 51428
|
|
18
|
+
* */
|
|
19
|
+
export declare function generateVideoThumbsAndDuration(data: {
|
|
20
|
+
file: Blob;
|
|
21
|
+
maxDimensions: number[];
|
|
22
|
+
debugHint: string;
|
|
23
|
+
throwOnBlack: boolean;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
duration: number;
|
|
26
|
+
thumbs: {
|
|
27
|
+
url: string;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
fullWidth: number;
|
|
31
|
+
fullHeight: number;
|
|
32
|
+
}[];
|
|
33
|
+
}>;
|
|
@@ -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,10 +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';
|
|
24
|
+
export * from './generateVideoThumbsAndDuration';
|
|
22
25
|
export * from './genMinimalLinkPreview';
|
|
26
|
+
export * from './getFanOutList';
|
|
27
|
+
export * from './getGroupSenderKeyList';
|
|
23
28
|
export * from './getOrGenerate';
|
|
24
29
|
export * from './groupParticipants';
|
|
25
30
|
export * from './handleAck';
|
|
@@ -42,7 +47,9 @@ export * from './sendQueryGroupInvite';
|
|
|
42
47
|
export * from './sendReactionToMsg';
|
|
43
48
|
export * from './sendRevokeGroupInviteCode';
|
|
44
49
|
export * from './sendTextMsgToChat';
|
|
50
|
+
export * from './setArchive';
|
|
45
51
|
export * from './setGroup';
|
|
52
|
+
export * from './setPin';
|
|
46
53
|
export * from './status';
|
|
47
54
|
export * from './typeAttributeFromProtobuf';
|
|
48
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>;
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ChatModel } from '..';
|
|
17
17
|
import { EventEmitter } from '.';
|
|
18
|
-
/** @whatsapp 88102
|
|
18
|
+
/** @whatsapp 88102
|
|
19
|
+
* @whatsapp 81572 >= 2.2218.4
|
|
20
|
+
*/
|
|
19
21
|
export declare class CmdClass extends EventEmitter {
|
|
20
22
|
isMainLoaded: boolean;
|
|
21
23
|
uiBusy: number;
|
|
@@ -144,5 +146,7 @@ export declare class CmdClass extends EventEmitter {
|
|
|
144
146
|
showCountrySelector(e?: any, t?: any, r?: any): void;
|
|
145
147
|
toggleStickerMaker(): void;
|
|
146
148
|
}
|
|
147
|
-
/** @whatsapp 88102
|
|
149
|
+
/** @whatsapp 88102
|
|
150
|
+
* @whatsapp 81572 >= 2.2218.4
|
|
151
|
+
*/
|
|
148
152
|
export declare const Cmd: CmdClass;
|