talkyzap-wapp-api 1.0.5 → 1.0.7

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 (45) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +4 -4
  3. package/dist/assert/assertColor.d.ts +4 -4
  4. package/dist/chat/functions/buttonsParser.d.ts +24 -0
  5. package/dist/chat/functions/deleteMessage.d.ts +2 -8
  6. package/dist/chat/functions/getNotes.d.ts +26 -0
  7. package/dist/chat/functions/index.d.ts +3 -0
  8. package/dist/chat/functions/prepareMessageButtons.d.ts +4 -12
  9. package/dist/chat/functions/sendEventMessage.d.ts +64 -0
  10. package/dist/chat/functions/sendFileMessage.d.ts +2 -1
  11. package/dist/chat/functions/sendScheduledCallMessage.d.ts +5 -8
  12. package/dist/chat/functions/sendTextMessage.d.ts +2 -1
  13. package/dist/chat/functions/setNotes.d.ts +26 -0
  14. package/dist/community/functions/getAnnouncementGroup.d.ts +28 -0
  15. package/dist/community/functions/getSubgroups.d.ts +28 -0
  16. package/dist/community/functions/index.d.ts +2 -0
  17. package/dist/contact/functions/getProfilePictureUrl.d.ts +1 -1
  18. package/dist/contact/functions/getStatus.d.ts +1 -1
  19. package/dist/contact/functions/index.d.ts +2 -0
  20. package/dist/contact/functions/queryExists.d.ts +1 -1
  21. package/dist/contact/functions/subscribePresence.d.ts +27 -0
  22. package/dist/contact/functions/unsubscribePresence.d.ts +27 -0
  23. package/dist/eventEmitter/index.d.ts +22 -22
  24. package/dist/group/functions/getGroupInfoFromInviteCode.d.ts +1 -1
  25. package/dist/profile/functions/getMyProfilePicture.d.ts +27 -0
  26. package/dist/profile/functions/index.d.ts +1 -0
  27. package/dist/whatsapp/collections/BotProfileCollection.d.ts +26 -0
  28. package/dist/whatsapp/collections/NoteCollection.d.ts +26 -0
  29. package/dist/whatsapp/collections/index.d.ts +2 -0
  30. package/dist/whatsapp/functions/addOrEditNoteAction.d.ts +27 -0
  31. package/dist/whatsapp/functions/createEventCallLink.d.ts +18 -0
  32. package/dist/whatsapp/functions/createFanoutMsgStanza.d.ts +8 -0
  33. package/dist/whatsapp/functions/genBotMsgSecretFromMsgSecret.d.ts +19 -0
  34. package/dist/whatsapp/functions/index.d.ts +4 -0
  35. package/dist/whatsapp/functions/removeStatusMessage.d.ts +19 -0
  36. package/dist/whatsapp/functions/subscribePresence.d.ts +20 -0
  37. package/dist/whatsapp/misc/Wid.d.ts +1 -0
  38. package/dist/whatsapp/models/BotProfileModel.d.ts +51 -0
  39. package/dist/whatsapp/models/ChatModel.d.ts +1 -0
  40. package/dist/whatsapp/models/NoteModel.d.ts +40 -0
  41. package/dist/whatsapp/models/index.d.ts +2 -0
  42. package/dist/whatsapp/stores.d.ts +4 -0
  43. package/dist/wppconnect-wa.js +1 -1
  44. package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
  45. package/package.json +21 -18
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 3.9.1 (2024-09-05)
1
+ # 3.14.0 (2024-10-30)
2
2
 
3
3
 
4
4
 
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@wppconnect/wa-js.svg?color=green)](https://www.npmjs.com/package/@wppconnect/wa-js)
4
4
  [![Downloads](https://img.shields.io/npm/dm/@wppconnect/wa-js.svg)](https://www.npmjs.com/package/@wppconnect/wa-js)
5
- [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wppconnect-team/wa-js.svg)](https://isitmaintained.com/project/wppconnect/wa-js 'Average time to resolve an issue')
6
- [![Percentage of issues still open](https://isitmaintained.com/badge/open/wppconnect-team/wa-js.svg)](https://isitmaintained.com/project/wppconnect/wa-js 'Percentage of issues still open')
5
+ [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wppconnect-team/wa-js.svg)](https://isitmaintained.com/project/wppconnect-team/wa-js 'Average time to resolve an issue')
6
+ [![Percentage of issues still open](https://isitmaintained.com/badge/open/wppconnect-team/wa-js.svg)](https://isitmaintained.com/project/wppconnect-team/wa-js 'Percentage of issues still open')
7
7
 
8
8
  [![Build Status](https://img.shields.io/github/actions/workflow/status/wppconnect-team/wa-js/build.yml?branch=main)](https://github.com/wppconnect-team/wa-js/actions/workflows/build.yml)
9
9
  [![Build Status](https://img.shields.io/github/actions/workflow/status/wppconnect-team/wa-js/test.yml?branch=main)](https://github.com/wppconnect-team/wa-js/actions/workflows/test.yml)
@@ -15,9 +15,9 @@
15
15
  ## Our online channels
16
16
 
17
17
  [![Discord](https://img.shields.io/discord/844351092758413353?color=blueviolet&label=Discord&logo=discord&style=flat)](https://discord.gg/JU5JGGKGNG)
18
- [![Telegram Group](https://img.shields.io/badge/Telegram-Group-32AFED?logo=telegram)](https://t.me/wppconnect)
19
- [![WhatsApp Group](https://img.shields.io/badge/WhatsApp-Group-25D366?logo=whatsapp)](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
20
18
  [![YouTube](https://img.shields.io/youtube/channel/subscribers/UCD7J9LG08PmGQrF5IS7Yv9A?label=YouTube)](https://www.youtube.com/c/wppconnect)
19
+ [![WhatsApp Group](https://img.shields.io/badge/WhatsApp-Group-25D366?logo=whatsapp)](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
20
+ [![Telegram Group](https://img.shields.io/badge/Telegram-Group-32AFED?logo=telegram)](https://t.me/wppconnect)
21
21
 
22
22
 
23
23
  ### Top Contributors (last 45 days) widget
@@ -15,12 +15,12 @@
15
15
  */
16
16
  import { WPPError } from '../util';
17
17
  export declare class InvalidColor extends WPPError {
18
- readonly color?: string | number | {
18
+ readonly color?: (string | number | {
19
19
  _serialized: string;
20
- } | undefined;
21
- constructor(color?: string | number | {
20
+ }) | undefined;
21
+ constructor(color?: (string | number | {
22
22
  _serialized: string;
23
- } | undefined);
23
+ }) | undefined);
24
24
  }
25
25
  /**
26
26
  * Return the color in positive decimal
@@ -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
+ import { MsgModel, websocket, Wid } from '../../whatsapp';
17
+ export declare function encryptAndParserMsgButtons<TFunc extends (...args: any[]) => any>(message: {
18
+ type: string;
19
+ data: MsgModel;
20
+ }, proto: {
21
+ [key: string]: any;
22
+ }, devices: Wid[], options: {
23
+ [key: string]: any;
24
+ }, reporter: any, groupData: any, func: TFunc): Promise<websocket.WapNode>;
@@ -17,7 +17,7 @@ import { Wid } from '../../whatsapp';
17
17
  import { SendMsgResult } from '../../whatsapp/enums';
18
18
  export interface DeleteMessageReturn {
19
19
  id: string;
20
- sendMsgResult: Promise<SendMsgResult>;
20
+ sendMsgResult: SendMsgResult;
21
21
  isRevoked: boolean;
22
22
  isDeleted: boolean;
23
23
  isSentByMe: boolean;
@@ -39,10 +39,4 @@ export interface DeleteMessageReturn {
39
39
  *
40
40
  * @category Message
41
41
  */
42
- export declare function deleteMessage(chatId: string | Wid, id: string, deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn>;
43
- /**
44
- * Delete a list of messages
45
- *
46
- * @category Message
47
- */
48
- export declare function deleteMessage(chatId: string | Wid, ids: string[], deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn[]>;
42
+ export declare function deleteMessage(chatId: string | Wid, ids: string | string[], deleteMediaInDevice?: boolean, revoke?: boolean): Promise<DeleteMessageReturn | DeleteMessageReturn[]>;
@@ -0,0 +1,26 @@
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 { NoteModel, Wid } from '../../whatsapp';
17
+ /**
18
+ * Get notes from a contact
19
+ * Only when are connected with business device
20
+ * @example
21
+ * ```javascript
22
+ * WPP.chat.getNotes('[number]@c.us', 'Text for your notes');
23
+ * ```
24
+ * @category Chat
25
+ */
26
+ export declare function getNotes(chatId: string | Wid): Promise<NoteModel | null>;
@@ -32,6 +32,7 @@ export { getLastSeen } from './getLastSeen';
32
32
  export { getMessageACK } from './getMessageACK';
33
33
  export { getMessageById } from './getMessageById';
34
34
  export { getMessages, GetMessagesOptions } from './getMessages';
35
+ export { getNotes } from './getNotes';
35
36
  export { getPlatformFromMessage } from './getPlatformFromMessage';
36
37
  export { getQuotedMsg } from './getQuotedMsg';
37
38
  export { getQuotedMsgKey } from './getQuotedMsgKey';
@@ -57,6 +58,7 @@ export { prepareRawMessage } from './prepareRawMessage';
57
58
  export { requestPhoneNumber } from './requestPhoneNumber';
58
59
  export { OrderItems, OrderMessageOptions, sendChargeMessage, } from './sendChargeMessage';
59
60
  export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
61
+ export { sendEventMessage } from './sendEventMessage';
60
62
  export { AudioMessageOptions, AutoDetectMessageOptions, DocumentMessageOptions, FileMessageOptions, ImageMessageOptions, sendFileMessage, StickerMessageOptions, VideoMessageOptions, } from './sendFileMessage';
61
63
  export { GroupInviteMessage, sendGroupInviteMessage, } from './sendGroupInviteMessage';
62
64
  export { ListMessageOptions, sendListMessage } from './sendListMessage';
@@ -68,5 +70,6 @@ export { ScheduledCallMessageOptions, sendScheduledCallMessage, } from './sendSc
68
70
  export { sendTextMessage, TextMessageOptions } from './sendTextMessage';
69
71
  export { sendVCardContactMessage, VCardContact, } from './sendVCardContactMessage';
70
72
  export { setInputText } from './setInputText';
73
+ export { setNotes } from './setNotes';
71
74
  export { starMessage, StarMessageReturn } from './starMessage';
72
75
  export { unmute } from './unmute';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
2
+ * Copyright 2024 WPPConnect Team
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -23,6 +23,9 @@ export type MessageButtonsTypes = {
23
23
  } | {
24
24
  url: string;
25
25
  text: string;
26
+ } | {
27
+ code: string;
28
+ text: string;
26
29
  };
27
30
  export interface MessageButtonsOptions {
28
31
  /**
@@ -33,17 +36,6 @@ export interface MessageButtonsOptions {
33
36
  * Title for buttons, only for text message
34
37
  */
35
38
  title?: string;
36
- /**
37
- * Set to use template buttons instead of reply buttons.
38
- * @default: undefined - auto detect
39
- * @deprecated
40
- */
41
- useTemplateButtons?: boolean | null;
42
- /**
43
- * Set to use interactive message instead of reply buttons.
44
- * @default: undefined - auto detect
45
- */
46
- useInteractiveMessage?: boolean | null;
47
39
  /**
48
40
  * Footer text for buttons
49
41
  */
@@ -0,0 +1,64 @@
1
+ /*!
2
+ * Copyright 2024 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 interface EventMessageOptions extends SendMessageOptions {
18
+ callType?: 'video' | 'voice';
19
+ name: string;
20
+ description?: string;
21
+ startTime: number;
22
+ endTime?: number;
23
+ location?: {
24
+ degreesLatitude: number;
25
+ degreesLongitude: number;
26
+ name: string;
27
+ };
28
+ }
29
+ /**
30
+ * Send a Event Message
31
+ *
32
+ * @example
33
+ * ```javascript
34
+ * // Simple com start time and end
35
+ * WPP.chat.sendEventMessage('[number]@c.us', {
36
+ * name: "Title of event"
37
+ * description: 'Description of your event',
38
+ * startTime: 1729551600
39
+ * endTime: 1729551900
40
+ * });
41
+ *
42
+ * // Event with location
43
+ * WPP.chat.sendEventMessage('[number]@c.us', {
44
+ * name: "Title of event"
45
+ * description: 'Description of your event',
46
+ * startTime: 1729551600
47
+ * location: {
48
+ * degreesLatitude: -22.9518551,
49
+ * degreesLongitude: -43.2108338,
50
+ * name: 'Cristo Redentor - RJ',
51
+ * }
52
+ * });
53
+ *
54
+ * // Event with link for call (use voice or video)
55
+ * WPP.chat.sendEventMessage('[number]@c.us', {
56
+ * name: "Title of event"
57
+ * callType: 'voice',
58
+ * description: 'Description of your event',
59
+ * startTime: 1729551600
60
+ * });
61
+ * ```
62
+ * @category Message
63
+ */
64
+ export declare function sendEventMessage(chatId: any, options: EventMessageOptions): Promise<SendMessageReturn>;
@@ -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
+ import { Wid } from '../../whatsapp';
16
17
  import { SendMessageOptions, SendMessageReturn } from '..';
17
18
  import { MessageButtonsOptions } from '.';
18
19
  export interface FileMessageOptions extends SendMessageOptions {
@@ -180,4 +181,4 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
180
181
  * @category Message
181
182
  * @return {SendMessageReturn} The result
182
183
  */
183
- export declare function sendFileMessage(chatId: any, content: string | Blob | File, options: AutoDetectMessageOptions | AudioMessageOptions | DocumentMessageOptions | ImageMessageOptions | VideoMessageOptions | StickerMessageOptions): Promise<SendMessageReturn>;
184
+ export declare function sendFileMessage(chatId: string | Wid, content: string | Blob | File, options: AutoDetectMessageOptions | AudioMessageOptions | DocumentMessageOptions | ImageMessageOptions | VideoMessageOptions | StickerMessageOptions): Promise<SendMessageReturn>;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
2
+ * Copyright 2024 WPPConnect Team
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -14,15 +14,11 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { SendMessageOptions, SendMessageReturn } from '..';
17
- export declare enum SCHEDULED_CALL_TYPE {
18
- UNKNOWN = 0,
19
- VOICE = 1,
20
- VIDEO = 2
21
- }
22
17
  export interface ScheduledCallMessageOptions extends SendMessageOptions {
23
18
  scheduledTimestampMs: number | string;
24
- callType: 'video' | 'voice' | SCHEDULED_CALL_TYPE;
19
+ callType: 'video' | 'voice';
25
20
  title: string;
21
+ description?: string;
26
22
  }
27
23
  /**
28
24
  * Send a scheduled call message
@@ -30,7 +26,8 @@ export interface ScheduledCallMessageOptions extends SendMessageOptions {
30
26
  * @example
31
27
  * ```javascript
32
28
  * WPP.chat.sendScheduledCallMessage('[number]@c.us', {
33
- * title: "Title of event"
29
+ * title: "Title of event call"
30
+ * description: 'Description for Call",
34
31
  * callType: 'voice'
35
32
  * scheduledTimestampMs: 1696084222000
36
33
  * });
@@ -25,6 +25,7 @@ export type TextMessageOptions = SendMessageOptions & MessageButtonsOptions & Li
25
25
  * });
26
26
  *
27
27
  * // With Buttons
28
+ * // Attention: The buttons are an alternative solution we found to make it work. There is no guarantee that they will continue functioning, or when they might stop: The only certainty is: They will stop, so use them responsibly.
28
29
  * WPP.chat.sendTextMessage('[number]@c.us', 'Hello', {
29
30
  * useInteractiveMessage: true, // False for legacy
30
31
  * buttons: [
@@ -41,7 +42,7 @@ export type TextMessageOptions = SendMessageOptions & MessageButtonsOptions & Li
41
42
  * text: 'Some text'
42
43
  * },
43
44
  * {
44
- * id: 'another id 2',
45
+ * code: '789890',
45
46
  * text: 'Another text'
46
47
  * }
47
48
  * ],
@@ -0,0 +1,26 @@
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 { NoteModel, Wid } from '../../whatsapp';
17
+ /**
18
+ * Set notes for a contact
19
+ * Only when are connected with business device
20
+ * @example
21
+ * ```javascript
22
+ * WPP.chat.setNotes('[number]@c.us', 'Text for your notes');
23
+ * ```
24
+ * @category Chat
25
+ */
26
+ export declare function setNotes(chatId: string | Wid, content: string): Promise<NoteModel | null>;
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * Copyright 2024 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
+ * Get the default announcement group of a community
19
+ * You can pass any group id inside a community
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * WPP.community.getAnnouncementGroup('123456@g.us');
24
+ * ```
25
+ *
26
+ * @category Community
27
+ */
28
+ export declare function getAnnouncementGroup(communityId: string | Wid): Wid | undefined;
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * Copyright 2024 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
+ * Get all subgroups of a community
19
+ * You can pass id of group community, or id of a inside a grupo
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * await WPP.community.getSubgroups('123456@g.us');
24
+ * ```
25
+ *
26
+ * @category Community
27
+ */
28
+ export declare function getSubgroups(communityId: string | Wid): Wid[];
@@ -17,6 +17,8 @@ export { addSubgroups } from './addSubgroups';
17
17
  export { create } from './create';
18
18
  export { deactivate } from './deactivate';
19
19
  export { demoteParticipants } from './demoteParticipants';
20
+ export { getAnnouncementGroup } from './getAnnouncementGroup';
20
21
  export { getParticipants } from './getParticipants';
22
+ export { getSubgroups } from './getSubgroups';
21
23
  export { promoteParticipants } from './promoteParticipants';
22
24
  export { removeSubgroups } from './removeSubgroups';
@@ -22,6 +22,6 @@ import { Wid } from '../../whatsapp';
22
22
  * const url = await WPP.contact.getProfilePictureUrl('[number]@c.us');
23
23
  * ```
24
24
  *
25
- * @category Chat
25
+ * @category Contact
26
26
  */
27
27
  export declare function getProfilePictureUrl(contactId: string | Wid, full?: boolean): Promise<string | null | undefined>;
@@ -22,6 +22,6 @@ import { Wid } from '../../whatsapp';
22
22
  * await WPP.contact.getStatus('[number]@c.us');
23
23
  * ```
24
24
  *
25
- * @category Chat
25
+ * @category Contact
26
26
  */
27
27
  export declare function getStatus(contactId: string | Wid): Promise<string | null>;
@@ -20,3 +20,5 @@ export { getProfilePictureUrl } from './getProfilePictureUrl';
20
20
  export { getStatus } from './getStatus';
21
21
  export { ContactListOptions, list } from './list';
22
22
  export { queryExists } from './queryExists';
23
+ export { subscribePresence } from './subscribePresence';
24
+ export { unsubscribePresence } from './unsubscribePresence';
@@ -43,6 +43,6 @@ export interface QueryExistsResult {
43
43
  * console.log(result.wid); // Correct ID
44
44
  * ```
45
45
  *
46
- * @category Chat
46
+ * @category Contact
47
47
  */
48
48
  export declare function queryExists(contactId: string | Wid): Promise<QueryExistsResult | null>;
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * Copyright 2024 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
+ * Subscribe presente from a contact
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * await WPP.contact.subscribePresence('[number]@c.us');
23
+ * ```
24
+ *
25
+ * @category Contact
26
+ */
27
+ export declare function subscribePresence(ids: string | string[]): Promise<Wid[]>;
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * Copyright 2024 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
+ * Unsubscribe presence of a contact
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * await WPP.contact.unsubscribePresence('[number]@c.us');
23
+ * ```
24
+ *
25
+ * @category Contact
26
+ */
27
+ export declare function unsubscribePresence(ids: string | string[]): Promise<Wid[]>;