@wppconnect/wa-js 2.15.2 → 2.16.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 -2
- package/dist/chat/defaultSendMessageOptions.d.ts +1 -1
- package/dist/chat/functions/editMessage.d.ts +30 -0
- package/dist/chat/functions/index.d.ts +2 -0
- package/dist/chat/functions/prepareMessageButtons.d.ts +1 -1
- package/dist/chat/functions/requestPhoneNumber.d.ts +28 -0
- package/dist/chat/functions/sendTextMessage.d.ts +1 -1
- package/dist/chat/patch.d.ts +0 -5
- package/dist/chat/types.d.ts +1 -1
- package/dist/conn/events/eventTypes.d.ts +11 -0
- package/dist/conn/events/index.d.ts +1 -0
- package/dist/conn/events/registerNeedsUpdateEvent.d.ts +16 -0
- package/dist/conn/functions/index.d.ts +1 -0
- package/dist/conn/functions/needsUpdate.d.ts +24 -0
- package/dist/conn/types.d.ts +1 -1
- package/dist/eventEmitter/eventEmitter.d.ts +1 -1
- package/dist/eventEmitter/eventTypes.d.ts +1 -1
- package/dist/status/defaultSendStatusOptions.d.ts +1 -1
- package/dist/status/functions/sendImageStatus.d.ts +1 -1
- package/dist/status/functions/sendVideoStatus.d.ts +1 -1
- package/dist/util/types.d.ts +11 -11
- package/dist/webpack/index.d.ts +1 -1
- package/dist/whatsapp/functions/canEditMessage.d.ts +20 -0
- package/dist/whatsapp/functions/getHistorySyncProgress.d.ts +19 -0
- package/dist/whatsapp/functions/index.d.ts +2 -0
- package/dist/whatsapp/misc/EventEmitter.d.ts +2 -2
- package/dist/whatsapp/misc/Features.d.ts +1 -1
- package/dist/whatsapp/misc/Wid.d.ts +4 -0
- package/dist/whatsapp/models/HistorySyncProgressModel.d.ts +40 -0
- package/dist/whatsapp/models/Model.d.ts +2 -2
- package/dist/whatsapp/models/index.d.ts +1 -0
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
## 2.
|
|
1
|
+
## 2.16.1 (2022-11-21)
|
|
2
2
|
|
|
3
3
|
### Bug Fixes
|
|
4
4
|
|
|
5
|
-
- Fixed
|
|
5
|
+
- Fixed DataCloneError error after WPP.contact.queryExists call ([fabe916](https://github.com/wppconnect-team/wa-js/commit/fabe916ed8c52e4dfc3d3fb13afc7d9c54422251))
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { LinkPreviewOptions, MessageButtonsOptions, SendMessageOptions } from '.';
|
|
17
17
|
import { ListMessageOptions } from './functions/sendListMessage';
|
|
18
|
-
export
|
|
18
|
+
export type AllMessageOptions = SendMessageOptions & LinkPreviewOptions & MessageButtonsOptions & Partial<ListMessageOptions>;
|
|
19
19
|
export declare const defaultSendMessageOptions: AllMessageOptions;
|
|
@@ -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 { MsgKey } from '../../whatsapp';
|
|
17
|
+
import { LinkPreviewOptions, SendMessageOptions, SendMessageReturn } from '..';
|
|
18
|
+
export type EditMessageOptions = SendMessageOptions & LinkPreviewOptions;
|
|
19
|
+
/**
|
|
20
|
+
* Send a text message
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* WPP.chat.editMessage('[number]@c.us', 'New text for message', {
|
|
24
|
+
* linkPreview: true,
|
|
25
|
+
* mentionedJidList: ['5521985232287@c.us']
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
* @category Message
|
|
29
|
+
*/
|
|
30
|
+
export declare function editMessage(msgId: string | MsgKey, newText: string, options?: EditMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -21,6 +21,7 @@ export { clear } from './clear';
|
|
|
21
21
|
export { delete } from './delete';
|
|
22
22
|
export { deleteMessage, DeleteMessageReturn } from './deleteMessage';
|
|
23
23
|
export { downloadMedia } from './downloadMedia';
|
|
24
|
+
export { editMessage } from './editMessage';
|
|
24
25
|
export { find } from './find';
|
|
25
26
|
export { forwardMessage, ForwardMessagesOptions } from './forwardMessage';
|
|
26
27
|
export { generateMessageID } from './generateMessageID';
|
|
@@ -45,6 +46,7 @@ export { pin, unpin } from './pin';
|
|
|
45
46
|
export { LinkPreviewOptions, prepareLinkPreview } from './prepareLinkPreview';
|
|
46
47
|
export { MessageButtonsOptions, prepareMessageButtons, } from './prepareMessageButtons';
|
|
47
48
|
export { prepareRawMessage } from './prepareRawMessage';
|
|
49
|
+
export { requestPhoneNumber } from './requestPhoneNumber';
|
|
48
50
|
export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
|
|
49
51
|
export { AudioMessageOptions, AutoDetectMessageOptions, DocumentMessageOptions, FileMessageOptions, ImageMessageOptions, sendFileMessage, StickerMessageOptions, VideoMessageOptions, } from './sendFileMessage';
|
|
50
52
|
export { ListMessageOptions, sendListMessage } from './sendListMessage';
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { SendMessageOptions, SendMessageReturn } from '..';
|
|
17
|
+
/**
|
|
18
|
+
* Request the real phone number for a LID chat ([number]@lid)
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* // Request
|
|
23
|
+
* WPP.chat.requestPhoneNumber('[number]@lid');
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @category Message
|
|
27
|
+
*/
|
|
28
|
+
export declare function requestPhoneNumber(chatId: any, options?: SendMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { LinkPreviewOptions, MessageButtonsOptions, SendMessageOptions, SendMessageReturn } from '..';
|
|
17
|
-
export
|
|
17
|
+
export type TextMessageOptions = SendMessageOptions & MessageButtonsOptions & LinkPreviewOptions;
|
|
18
18
|
/**
|
|
19
19
|
* Send a text message
|
|
20
20
|
*
|
package/dist/chat/patch.d.ts
CHANGED
package/dist/chat/types.d.ts
CHANGED
|
@@ -50,6 +50,17 @@ export interface ConnEventTypes {
|
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
52
|
'conn.main_ready': undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Triggered when a whatsapp web update is requested
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```javascript
|
|
58
|
+
* WPP.on('conn.needs_update', () => {
|
|
59
|
+
* // Your code
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
'conn.needs_update': undefined;
|
|
53
64
|
'conn.qrcode_idle': undefined;
|
|
54
65
|
'conn.require_auth': undefined;
|
|
55
66
|
}
|
|
@@ -18,5 +18,6 @@ import './registerAuthenticatedEvent';
|
|
|
18
18
|
import './registerLogoutEvent';
|
|
19
19
|
import './registerMainLoadedEvent';
|
|
20
20
|
import './registerMainReadyEvent';
|
|
21
|
+
import './registerNeedsUpdateEvent';
|
|
21
22
|
import './registerQRCodeIdleEvent';
|
|
22
23
|
import './registerRequireAuthEvent';
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export {};
|
|
@@ -25,6 +25,7 @@ export { isMultiDevice } from './isMultiDevice';
|
|
|
25
25
|
export { isRegistered } from './isRegistered';
|
|
26
26
|
export { logout } from './logout';
|
|
27
27
|
export { markAvailable, markUnavailable } from './markAvailable';
|
|
28
|
+
export { needsUpdate } from './needsUpdate';
|
|
28
29
|
export { refreshQR } from './refreshQR';
|
|
29
30
|
export { setKeepAlive } from './setKeepAlive';
|
|
30
31
|
export { setMultiDevice } from './setMultiDevice';
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* Check if whatsapp web is asking for update
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* const needsUpdate = WPP.conn.needsUpdate();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function needsUpdate(): boolean;
|
package/dist/conn/types.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface OnOptions {
|
|
|
31
31
|
*/
|
|
32
32
|
objectify?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export
|
|
34
|
+
export type ListenerType<T> = [T] extends [(...args: infer U) => any] ? U : [T] extends [void] ? [] : [T];
|
|
35
35
|
export declare class EventEmitter<EventData> {
|
|
36
36
|
constructor(options?: ConstructorOptions);
|
|
37
37
|
emit<Name extends keyof EventData>(event: Name, ...args: ListenerType<EventData[Name]>): boolean;
|
|
@@ -29,4 +29,4 @@ export { ConnEventTypes } from '../conn/events/eventTypes';
|
|
|
29
29
|
export { GroupEventTypes } from '../group/events/eventTypes';
|
|
30
30
|
export { StatusEventTypes } from '../status/events/eventTypes';
|
|
31
31
|
export { WebpackEvents } from '../webpack/eventTypes';
|
|
32
|
-
export
|
|
32
|
+
export type EventTypes = BlocklistEventTypes & CallEventTypes & ChatEventTypes & ConfigEventTypes & ConnEventTypes & GroupEventTypes & StatusEventTypes & WebpackEvents;
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { SendStatusOptions } from './functions/sendRawStatus';
|
|
17
17
|
import { TextStatusOptions } from './functions/sendTextStatus';
|
|
18
|
-
export
|
|
18
|
+
export type AllStatusOptions = SendStatusOptions & TextStatusOptions;
|
|
19
19
|
export declare const defaultSendStatusOptions: AllStatusOptions;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { SendStatusOptions } from './sendRawStatus';
|
|
17
|
-
export
|
|
17
|
+
export type ImageStatusOptions = SendStatusOptions;
|
|
18
18
|
/**
|
|
19
19
|
* Send a image message to status stories
|
|
20
20
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { SendStatusOptions } from './sendRawStatus';
|
|
17
|
-
export
|
|
17
|
+
export type VideoStatusOptions = SendStatusOptions;
|
|
18
18
|
/**
|
|
19
19
|
* Send a video message to status stories
|
|
20
20
|
*
|
package/dist/util/types.d.ts
CHANGED
|
@@ -13,30 +13,30 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
16
|
+
export type InferArgs<T> = T extends (...t: [...infer Arg]) => any ? Arg : never;
|
|
17
|
+
export type InferReturn<T> = T extends (...t: [...infer Arg]) => infer Res ? Res : never;
|
|
18
|
+
export type FunctionPropertyNames<T> = {
|
|
19
19
|
[K in keyof T]: T[K] extends Function ? K : never;
|
|
20
20
|
}[keyof T];
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type FunctionProperties<T> = Pick<T, FunctionPropertyNames<T>>;
|
|
22
|
+
export type NonFunctionPropertyNames<T> = {
|
|
23
23
|
[K in keyof T]: T[K] extends Function ? never : K;
|
|
24
24
|
}[keyof T];
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
25
|
+
export type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
|
|
26
|
+
export type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
|
|
27
|
+
export type WritablePropertiesNames<T> = {
|
|
28
28
|
[P in keyof T]-?: IfEquals<{
|
|
29
29
|
[Q in P]: T[P];
|
|
30
30
|
}, {
|
|
31
31
|
-readonly [Q in P]: T[P];
|
|
32
32
|
}, P>;
|
|
33
33
|
}[keyof T];
|
|
34
|
-
export
|
|
35
|
-
export
|
|
34
|
+
export type WritableProperties<T> = Pick<T, WritablePropertiesNames<T>>;
|
|
35
|
+
export type ReadonlyPropertiesNames<T> = {
|
|
36
36
|
[P in keyof T]-?: IfEquals<{
|
|
37
37
|
[Q in P]: T[P];
|
|
38
38
|
}, {
|
|
39
39
|
-readonly [Q in P]: T[P];
|
|
40
40
|
}, never, P>;
|
|
41
41
|
}[keyof T];
|
|
42
|
-
export
|
|
42
|
+
export type ReadonlyProperties<T> = Pick<T, ReadonlyPropertiesNames<T>>;
|
package/dist/webpack/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare let isInjected: boolean;
|
|
|
23
23
|
export declare let isReady: boolean;
|
|
24
24
|
export declare function onInjected(listener: () => void): void;
|
|
25
25
|
export declare function onReady(listener: () => void): void;
|
|
26
|
-
export
|
|
26
|
+
export type SearchModuleCondition = (module: any, moduleId: string) => boolean;
|
|
27
27
|
export declare let webpackRequire: (<T = any>(moduleId: string) => T) & {
|
|
28
28
|
/**
|
|
29
29
|
* module list
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { MsgModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 591988 >= 2.2244.5
|
|
19
|
+
*/
|
|
20
|
+
export declare function canEditMessage(msg: MsgModel): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
* @whatsapp 649959 >= 2.2244.5
|
|
18
|
+
*/
|
|
19
|
+
export declare function getHistorySyncProgress(): any;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
export * from './addAndSendMsgToChat';
|
|
17
17
|
export * from './blockContact';
|
|
18
18
|
export * from './calculateFilehashFromBlob';
|
|
19
|
+
export * from './canEditMessage';
|
|
19
20
|
export * from './canReplyMsg';
|
|
20
21
|
export * from './collections';
|
|
21
22
|
export * from './createMsgProtobuf';
|
|
@@ -31,6 +32,7 @@ export * from './generateVideoThumbsAndDuration';
|
|
|
31
32
|
export * from './genMinimalLinkPreview';
|
|
32
33
|
export * from './getFanOutList';
|
|
33
34
|
export * from './getGroupSenderKeyList';
|
|
35
|
+
export * from './getHistorySyncProgress';
|
|
34
36
|
export * from './getSearchContext';
|
|
35
37
|
export * from './groupParticipants';
|
|
36
38
|
export * from './handleAck';
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
/**
|
|
17
17
|
* The name of the event.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
type Event = string | symbol;
|
|
20
20
|
/**
|
|
21
21
|
* The callback function.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
type Listener = (...args: any[]) => void;
|
|
24
24
|
/** @whatsapp 76521
|
|
25
25
|
* @whatsapp 34342 >= 2.2204.13
|
|
26
26
|
* @whatsapp 876521 >= 2.2222.8
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { EventEmitter } from './EventEmitter';
|
|
17
|
-
|
|
17
|
+
type FeaturesNames = 'RESEND_ICON' | 'DELETE_MSG_CLEAR_MEDIA' | 'DEBUG_COMMANDS' | 'MD_BACKEND' | 'MD_ADV' | 'MD_PAYMENT' | 'MD_E2E' | 'MD_VOIP_GROUP' | 'MD_SYNCD_ANTI_TAMPERING' | 'CATALOG_MANAGER' | 'WEB_VOIP_VOICE_CALL' | 'WEB_VOIP_VIDEO_CALL' | 'MEDIA_AUTO_DOWNLOAD' | 'DOWNLOAD_STATUS_THUMB_MMS' | 'MEDIA_EXISTENCE_CHECK' | 'LOG_MISSING_REQUIRED_PROPERTIES' | 'HIGH_QUALITY_VIDEO_THUMBNAILS' | 'HIGH_QUALITY_LINK_PREVIEWS' | 'YOUTUBE_VIDEO_PREVIEW_WITHOUT_BLUR' | 'GROUP_CONVERSATIONS_MEDIA_TOOLTIPS' | 'DROP_LAST_NAME_MENTIONS' | 'RICH_TEXT_INPUT' | 'PTT_DRAFT_ENABLED' | 'PTT_WAVEFORM_SEND' | 'PTT_CONVERSATION_WAVEFORM' | 'SEE_STATUS_VIEWERS' | 'GROUP_CATCH_UP' | 'FORMAT_BULLETED_MSG' | 'ARCHIVE_V2_MD_SUPPORTED' | 'MEDIA_GALLERY_HEADERS' | 'PIP_VIDEO_REDESIGN' | 'LABELS_DISPLAY' | 'VOIP_INDIVIDUAL_OUTGOING' | 'GROUPS_V_3' | 'GROUPS_V_3_CREATE' | 'CHANGE_NUMBER_V_2' | 'QUERY_STATUS_V_3_THUMBNAIL' | 'LIVE_LOCATIONS' | 'QUERY_VNAME' | 'VOIP_INDIVIDUAL_INCOMING' | 'QUICK_REPLIES_QUERY' | 'PAYMENTS' | 'STICKER_PACK_QUERY' | 'LIVE_LOCATIONS_FINAL' | 'LABELS_EDIT' | 'MEDIA_UPLOAD' | 'MEDIA_UPLOAD_RICH_QUICK_REPLIES' | 'VNAME_V_2' | 'VIDEO_PLAYBACK_URL' | 'STATUS_RANKING' | 'VOIP_INDIVIDUAL_VIDEO' | 'THIRD_PARTY_STICKERS' | 'FREQUENTLY_FORWARDED_SETTING' | 'GROUPS_V_4_JOIN_PERMISSION' | 'RECENT_STICKERS' | 'CATALOG' | 'STARRED_STICKERS' | 'VOIP_GROUP_CALL' | 'TEMPLATE_MESSAGE' | 'TEMPLATE_MESSAGE_INTERACTIVITY' | 'EPHEMERAL_MESSAGES' | 'E_2_E_NOTIFICATION_SYNC' | 'RECENT_STICKERS_V_2' | 'RECENT_STICKERS_V_3' | 'USER_NOTICE' | 'SUPPORT' | 'GROUP_UII_CLEANUP' | 'GROUP_DOGFOODING_INTERNAL_ONLY' | 'SETTINGS_SYNC' | 'ARCHIVE_V_2' | 'EPHEMERAL_ALLOW_GROUP_MEMBERS' | 'EPHEMERAL_24_H_DURATION' | 'MD_FORCE_UPGRADE' | 'DISAPPEARING_MODE' | 'EXTERNAL_MD_OPT_IN_AVAILABLE' | 'ARCHIVE_BROADCAST' | 'RECENT_EMOJI_SYNC' | 'STARRED_GIFS' | 'INDEX_RECEIVED_VCARD' | 'STATUS_V3_UI_SENDING' | 'MEDIAS_COUNT' | 'VOIP_VOICE_CALL' | 'DESKTOP_VOIP_VOICE_CALL' | 'DESKTOP_VOIP_VIDEO_CALL' | 'DESKTOP_VOIP_GROUP_VOICE_CALL' | 'DESKTOP_VOIP_GROUP_VIDEO_CALL' | 'KEY_PARTICIPANT' | 'RICH_TEXT';
|
|
18
18
|
declare class FeatureClass extends EventEmitter {
|
|
19
19
|
FEATURE_CHANGE_EVENT: string;
|
|
20
20
|
F: {
|
|
@@ -29,6 +29,7 @@ export declare class Wid {
|
|
|
29
29
|
getSignalAddress(): string;
|
|
30
30
|
isBroadcast(): boolean;
|
|
31
31
|
isCompanion(): boolean;
|
|
32
|
+
isSameAccount(wid: Wid): boolean;
|
|
32
33
|
isGreaterThan(wid: unknown): boolean;
|
|
33
34
|
isGroup(): boolean;
|
|
34
35
|
isGroupCall(): boolean;
|
|
@@ -38,6 +39,8 @@ export declare class Wid {
|
|
|
38
39
|
isServer(): boolean;
|
|
39
40
|
isStatusV3(): boolean;
|
|
40
41
|
isUser(): boolean;
|
|
42
|
+
isLid(): boolean;
|
|
43
|
+
isUserNotPSA(): boolean;
|
|
41
44
|
server: string;
|
|
42
45
|
toJid(): string;
|
|
43
46
|
toJSON(): string;
|
|
@@ -58,6 +61,7 @@ export declare class Wid {
|
|
|
58
61
|
static isServer(wid: string | Wid): boolean;
|
|
59
62
|
static isStatusV3(wid: string | Wid): boolean;
|
|
60
63
|
static isUser(wid: string | Wid): boolean;
|
|
64
|
+
static isLid(wid: string | Wid): boolean;
|
|
61
65
|
static isWid(wid: string | Wid): boolean;
|
|
62
66
|
static isXWid(server: string, wid: string | Wid): boolean;
|
|
63
67
|
static user(wid: string): string | undefined;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
|
|
17
|
+
interface Props {
|
|
18
|
+
}
|
|
19
|
+
interface Session {
|
|
20
|
+
}
|
|
21
|
+
interface Derived {
|
|
22
|
+
progress: number | null;
|
|
23
|
+
paused: boolean;
|
|
24
|
+
inProgress: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @whatsapp 649959 >= 2.2244.5
|
|
28
|
+
*/
|
|
29
|
+
export declare interface HistorySyncProgressModel extends ModelProxy<Props, Session, Derived> {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @whatsapp 649959 >= 2.2244.5
|
|
33
|
+
*/
|
|
34
|
+
export declare class HistorySyncProgressModel extends Model {
|
|
35
|
+
constructor(proterties?: ModelPropertiesContructor<HistorySyncProgressModel>, options?: ModelOptions);
|
|
36
|
+
setInProgress(inProgress: boolean): void;
|
|
37
|
+
setPaused(paused: boolean): void;
|
|
38
|
+
setProgress(progress: number): void;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { Stringable } from '../../types';
|
|
17
17
|
import { WritableProperties } from '../../util';
|
|
18
18
|
import { EventEmitter } from '../misc';
|
|
19
|
-
export
|
|
19
|
+
export type ModelProxy<P, S, D> = P & S & Readonly<D> & {
|
|
20
20
|
readonly attributes: P & S;
|
|
21
21
|
readonly isState: true;
|
|
22
22
|
readonly mirrorMask: {
|
|
@@ -25,7 +25,7 @@ export declare type ModelProxy<P, S, D> = P & S & Readonly<D> & {
|
|
|
25
25
|
toJSON(): P;
|
|
26
26
|
serialize(): P;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type ModelPropertiesContructor<Model, K extends keyof Model = any> = Partial<WritableProperties<Model>> & Required<WritableProperties<Pick<Model, K>>>;
|
|
29
29
|
export interface ModelOptions {
|
|
30
30
|
_internalInitializationDoNotUse?: any;
|
|
31
31
|
collection?: any;
|
|
@@ -31,6 +31,7 @@ export * from './ContactModel';
|
|
|
31
31
|
export * from './ConversionTupleModel';
|
|
32
32
|
export * from './EmojiVariantModel';
|
|
33
33
|
export * from './GroupMetadataModel';
|
|
34
|
+
export * from './HistorySyncProgressModel';
|
|
34
35
|
export * from './LabelItemModel';
|
|
35
36
|
export * from './LabelModel';
|
|
36
37
|
export * from './LiveLocationModel';
|