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.
- package/CHANGELOG.md +1 -1
- package/README.md +4 -4
- package/dist/assert/assertColor.d.ts +4 -4
- package/dist/chat/functions/buttonsParser.d.ts +24 -0
- package/dist/chat/functions/deleteMessage.d.ts +2 -8
- package/dist/chat/functions/getNotes.d.ts +26 -0
- package/dist/chat/functions/index.d.ts +3 -0
- package/dist/chat/functions/prepareMessageButtons.d.ts +4 -12
- package/dist/chat/functions/sendEventMessage.d.ts +64 -0
- package/dist/chat/functions/sendFileMessage.d.ts +2 -1
- package/dist/chat/functions/sendScheduledCallMessage.d.ts +5 -8
- package/dist/chat/functions/sendTextMessage.d.ts +2 -1
- package/dist/chat/functions/setNotes.d.ts +26 -0
- package/dist/community/functions/getAnnouncementGroup.d.ts +28 -0
- package/dist/community/functions/getSubgroups.d.ts +28 -0
- package/dist/community/functions/index.d.ts +2 -0
- package/dist/contact/functions/getProfilePictureUrl.d.ts +1 -1
- package/dist/contact/functions/getStatus.d.ts +1 -1
- package/dist/contact/functions/index.d.ts +2 -0
- package/dist/contact/functions/queryExists.d.ts +1 -1
- package/dist/contact/functions/subscribePresence.d.ts +27 -0
- package/dist/contact/functions/unsubscribePresence.d.ts +27 -0
- package/dist/eventEmitter/index.d.ts +22 -22
- package/dist/group/functions/getGroupInfoFromInviteCode.d.ts +1 -1
- package/dist/profile/functions/getMyProfilePicture.d.ts +27 -0
- package/dist/profile/functions/index.d.ts +1 -0
- package/dist/whatsapp/collections/BotProfileCollection.d.ts +26 -0
- package/dist/whatsapp/collections/NoteCollection.d.ts +26 -0
- package/dist/whatsapp/collections/index.d.ts +2 -0
- package/dist/whatsapp/functions/addOrEditNoteAction.d.ts +27 -0
- package/dist/whatsapp/functions/createEventCallLink.d.ts +18 -0
- package/dist/whatsapp/functions/createFanoutMsgStanza.d.ts +8 -0
- package/dist/whatsapp/functions/genBotMsgSecretFromMsgSecret.d.ts +19 -0
- package/dist/whatsapp/functions/index.d.ts +4 -0
- package/dist/whatsapp/functions/removeStatusMessage.d.ts +19 -0
- package/dist/whatsapp/functions/subscribePresence.d.ts +20 -0
- package/dist/whatsapp/misc/Wid.d.ts +1 -0
- package/dist/whatsapp/models/BotProfileModel.d.ts +51 -0
- package/dist/whatsapp/models/ChatModel.d.ts +1 -0
- package/dist/whatsapp/models/NoteModel.d.ts +40 -0
- package/dist/whatsapp/models/index.d.ts +2 -0
- package/dist/whatsapp/stores.d.ts +4 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +21 -18
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@wppconnect/wa-js)
|
|
4
4
|
[](https://www.npmjs.com/package/@wppconnect/wa-js)
|
|
5
|
-
[](https://isitmaintained.com/project/wppconnect/wa-js 'Average time to resolve an issue')
|
|
6
|
-
[](https://isitmaintained.com/project/wppconnect/wa-js 'Percentage of issues still open')
|
|
5
|
+
[](https://isitmaintained.com/project/wppconnect-team/wa-js 'Average time to resolve an issue')
|
|
6
|
+
[](https://isitmaintained.com/project/wppconnect-team/wa-js 'Percentage of issues still open')
|
|
7
7
|
|
|
8
8
|
[](https://github.com/wppconnect-team/wa-js/actions/workflows/build.yml)
|
|
9
9
|
[](https://github.com/wppconnect-team/wa-js/actions/workflows/test.yml)
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
## Our online channels
|
|
16
16
|
|
|
17
17
|
[](https://discord.gg/JU5JGGKGNG)
|
|
18
|
-
[](https://t.me/wppconnect)
|
|
19
|
-
[](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
|
|
20
18
|
[](https://www.youtube.com/c/wppconnect)
|
|
19
|
+
[](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
|
|
20
|
+
[](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:
|
|
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,
|
|
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
|
|
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:
|
|
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
|
|
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'
|
|
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
|
-
*
|
|
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
|
|
25
|
+
* @category Contact
|
|
26
26
|
*/
|
|
27
27
|
export declare function getProfilePictureUrl(contactId: string | Wid, full?: boolean): Promise<string | null | undefined>;
|
|
@@ -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';
|
|
@@ -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[]>;
|