@wppconnect/wa-js 2.15.2 → 2.16.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/dist/chat/defaultSendMessageOptions.d.ts +1 -1
  3. package/dist/chat/functions/editMessage.d.ts +30 -0
  4. package/dist/chat/functions/index.d.ts +2 -0
  5. package/dist/chat/functions/prepareMessageButtons.d.ts +1 -1
  6. package/dist/chat/functions/requestPhoneNumber.d.ts +28 -0
  7. package/dist/chat/functions/sendTextMessage.d.ts +1 -1
  8. package/dist/chat/patch.d.ts +0 -5
  9. package/dist/chat/types.d.ts +1 -1
  10. package/dist/conn/events/eventTypes.d.ts +11 -0
  11. package/dist/conn/events/index.d.ts +1 -0
  12. package/dist/conn/events/registerNeedsUpdateEvent.d.ts +16 -0
  13. package/dist/conn/functions/index.d.ts +1 -0
  14. package/dist/conn/functions/needsUpdate.d.ts +24 -0
  15. package/dist/conn/types.d.ts +1 -1
  16. package/dist/eventEmitter/eventEmitter.d.ts +1 -1
  17. package/dist/eventEmitter/eventTypes.d.ts +1 -1
  18. package/dist/status/defaultSendStatusOptions.d.ts +1 -1
  19. package/dist/status/functions/sendImageStatus.d.ts +1 -1
  20. package/dist/status/functions/sendVideoStatus.d.ts +1 -1
  21. package/dist/util/types.d.ts +11 -11
  22. package/dist/webpack/index.d.ts +1 -1
  23. package/dist/whatsapp/functions/canEditMessage.d.ts +20 -0
  24. package/dist/whatsapp/functions/getHistorySyncProgress.d.ts +19 -0
  25. package/dist/whatsapp/functions/index.d.ts +2 -0
  26. package/dist/whatsapp/misc/EventEmitter.d.ts +2 -2
  27. package/dist/whatsapp/misc/Features.d.ts +1 -1
  28. package/dist/whatsapp/misc/Wid.d.ts +4 -0
  29. package/dist/whatsapp/models/HistorySyncProgressModel.d.ts +40 -0
  30. package/dist/whatsapp/models/Model.d.ts +2 -2
  31. package/dist/whatsapp/models/index.d.ts +1 -0
  32. package/dist/wppconnect-wa.js +1 -1
  33. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
- ## 2.15.2 (2022-11-12)
1
+ # 2.16.0 (2022-11-19)
2
2
 
3
- ### Bug Fixes
3
+ ### Features
4
4
 
5
- - Fixed quoted message response (fix [#737](https://github.com/wppconnect-team/wa-js/issues/737)) ([c7ddbfd](https://github.com/wppconnect-team/wa-js/commit/c7ddbfd556ea39a93048d1e61f343dec641d66d1))
5
+ - Added WPP.chat.requestPhoneNumber function ([4723eac](https://github.com/wppconnect-team/wa-js/commit/4723eac3c7035a914cff8343a30af82554eef1ee))
@@ -15,5 +15,5 @@
15
15
  */
16
16
  import { LinkPreviewOptions, MessageButtonsOptions, SendMessageOptions } from '.';
17
17
  import { ListMessageOptions } from './functions/sendListMessage';
18
- export declare type AllMessageOptions = SendMessageOptions & LinkPreviewOptions & MessageButtonsOptions & Partial<ListMessageOptions>;
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';
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { RawMessage } from '..';
17
- export declare type MessageButtonsTypes = {
17
+ export type MessageButtonsTypes = {
18
18
  id: string;
19
19
  text: string;
20
20
  } | {
@@ -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 declare type TextMessageOptions = SendMessageOptions & MessageButtonsOptions & LinkPreviewOptions;
17
+ export type TextMessageOptions = SendMessageOptions & MessageButtonsOptions & LinkPreviewOptions;
18
18
  /**
19
19
  * Send a text message
20
20
  *
@@ -13,9 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- declare global {
17
- interface Window {
18
- stylex: any;
19
- }
20
- }
21
16
  export {};
@@ -101,4 +101,4 @@ export interface SendMessageReturn {
101
101
  ack: number;
102
102
  sendMsgResult: Promise<SendMsgResult>;
103
103
  }
104
- export declare type RawMessage = ModelPropertiesContructor<MsgModel>;
104
+ export type RawMessage = ModelPropertiesContructor<MsgModel>;
@@ -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;
@@ -28,4 +28,4 @@ export interface AuthCodeMultiDevice {
28
28
  secretKey: string;
29
29
  fullCode: string;
30
30
  }
31
- export declare type AuthCode = AuthCodeSingleDevice | AuthCodeMultiDevice;
31
+ export type AuthCode = AuthCodeSingleDevice | AuthCodeMultiDevice;
@@ -31,7 +31,7 @@ export interface OnOptions {
31
31
  */
32
32
  objectify?: boolean;
33
33
  }
34
- export declare type ListenerType<T> = [T] extends [(...args: infer U) => any] ? U : [T] extends [void] ? [] : [T];
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 declare type EventTypes = BlocklistEventTypes & CallEventTypes & ChatEventTypes & ConfigEventTypes & ConnEventTypes & GroupEventTypes & StatusEventTypes & WebpackEvents;
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 declare type AllStatusOptions = SendStatusOptions & TextStatusOptions;
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 declare type ImageStatusOptions = SendStatusOptions;
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 declare type VideoStatusOptions = SendStatusOptions;
17
+ export type VideoStatusOptions = SendStatusOptions;
18
18
  /**
19
19
  * Send a video message to status stories
20
20
  *
@@ -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 declare type InferArgs<T> = T extends (...t: [...infer Arg]) => any ? Arg : never;
17
- export declare type InferReturn<T> = T extends (...t: [...infer Arg]) => infer Res ? Res : never;
18
- export declare type FunctionPropertyNames<T> = {
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 declare type FunctionProperties<T> = Pick<T, FunctionPropertyNames<T>>;
22
- export declare type NonFunctionPropertyNames<T> = {
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 declare type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
26
- export declare 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 declare type WritablePropertiesNames<T> = {
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 declare type WritableProperties<T> = Pick<T, WritablePropertiesNames<T>>;
35
- export declare type ReadonlyPropertiesNames<T> = {
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 declare type ReadonlyProperties<T> = Pick<T, ReadonlyPropertiesNames<T>>;
42
+ export type ReadonlyProperties<T> = Pick<T, ReadonlyPropertiesNames<T>>;
@@ -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 declare type SearchModuleCondition = (module: any, moduleId: string) => boolean;
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
- declare type Event = string | symbol;
19
+ type Event = string | symbol;
20
20
  /**
21
21
  * The callback function.
22
22
  */
23
- declare type Listener = (...args: any[]) => void;
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
- declare 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';
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 declare type ModelProxy<P, S, D> = P & S & Readonly<D> & {
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 declare type ModelPropertiesContructor<Model, K extends keyof Model = any> = Partial<WritableProperties<Model>> & Required<WritableProperties<Pick<Model, K>>>;
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';