@wppconnect/wa-js 2.28.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/chat/events/eventTypes.d.ts +8 -0
- package/dist/chat/events/index.d.ts +1 -0
- package/dist/{whatsapp/misc/Locale.d.ts → chat/events/registerEditedMessageEvent.d.ts} +0 -8
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/sendGroupInviteMessage.d.ts +56 -0
- package/dist/profile/functions/getMyProfileName.d.ts +26 -0
- package/dist/profile/functions/index.d.ts +1 -0
- package/dist/webpack/index.d.ts +9 -0
- package/dist/whatsapp/functions/getPushname.d.ts +19 -0
- package/dist/whatsapp/functions/index.d.ts +1 -0
- package/dist/whatsapp/misc/index.d.ts +0 -1
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -13,12 +13,4 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
declare class LocaleClass {
|
|
17
|
-
}
|
|
18
|
-
/** @whatsapp 14296
|
|
19
|
-
* @whatsapp 43725 >= 2.2204.13
|
|
20
|
-
* @whatsapp 914296 >= 2.2222.8
|
|
21
|
-
* @whatsapp 568064 >= 2.2230.8
|
|
22
|
-
*/
|
|
23
|
-
export declare const Locale: LocaleClass;
|
|
24
16
|
export {};
|
|
@@ -55,6 +55,7 @@ export { prepareRawMessage } from './prepareRawMessage';
|
|
|
55
55
|
export { requestPhoneNumber } from './requestPhoneNumber';
|
|
56
56
|
export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
|
|
57
57
|
export { AudioMessageOptions, AutoDetectMessageOptions, DocumentMessageOptions, FileMessageOptions, ImageMessageOptions, sendFileMessage, StickerMessageOptions, VideoMessageOptions, } from './sendFileMessage';
|
|
58
|
+
export { GroupInviteMessage, sendGroupInviteMessage, } from './sendGroupInviteMessage';
|
|
58
59
|
export { ListMessageOptions, sendListMessage } from './sendListMessage';
|
|
59
60
|
export { LocationMessageOptions, sendLocationMessage, } from './sendLocationMessage';
|
|
60
61
|
export { OrderItems, OrderMessageOptions, sendOrderMessage, } from './sendOrderMessage';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Wid } from '../../whatsapp';
|
|
17
|
+
import { SendMessageOptions, SendMessageReturn } from '..';
|
|
18
|
+
export interface GroupInviteMessage extends SendMessageOptions {
|
|
19
|
+
jpegThumbnail?: string;
|
|
20
|
+
inviteCode: string;
|
|
21
|
+
inviteCodeExpiration?: number;
|
|
22
|
+
groupId: string | Wid;
|
|
23
|
+
groupName?: string;
|
|
24
|
+
caption?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Send a group invite message
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```javascript
|
|
31
|
+
* WPP.chat.sendGroupInviteMessage(
|
|
32
|
+
* '[number]@c.us',
|
|
33
|
+
* {
|
|
34
|
+
* inviteCode: '123',
|
|
35
|
+
* groupId: '789@g.us'
|
|
36
|
+
* }
|
|
37
|
+
* );
|
|
38
|
+
*
|
|
39
|
+
* // After a invite
|
|
40
|
+
* const result = await WPP.group.addParticipants('789@g.us', '123@c.us');
|
|
41
|
+
* const participant = result['123@c.us'];
|
|
42
|
+
* if (participant.invite_code) {
|
|
43
|
+
* WPP.chat.sendGroupInviteMessage(
|
|
44
|
+
* '123@c.us',
|
|
45
|
+
* {
|
|
46
|
+
* inviteCode: participant.invite_code,
|
|
47
|
+
* inviteCodeExpiration: participant.invite_code_exp,
|
|
48
|
+
* groupId: '789@g.us'
|
|
49
|
+
* }
|
|
50
|
+
* );
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @category Message
|
|
55
|
+
*/
|
|
56
|
+
export declare function sendGroupInviteMessage(chatId: any, options: GroupInviteMessage): Promise<SendMessageReturn>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Get your current profile name
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* const myProfileName = WPP.profile.getMyProfileName();
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @category Profile
|
|
25
|
+
*/
|
|
26
|
+
export declare function getMyProfileName(): string;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export { editBusinessProfile } from './editBusinessProfile';
|
|
17
|
+
export { getMyProfileName } from './getMyProfileName';
|
|
17
18
|
export { getMyStatus } from './getMyStatus';
|
|
18
19
|
export { isBusiness } from './isBusiness';
|
|
19
20
|
export { removeMyProfilePicture } from './removeMyProfilePicture';
|
package/dist/webpack/index.d.ts
CHANGED
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* Is setted true when the loader is injected
|
|
18
|
+
*/
|
|
19
|
+
export declare let loaderType: 'meta' | 'unknown' | 'webpack';
|
|
16
20
|
/**
|
|
17
21
|
* Is setted true when the loader is injected
|
|
18
22
|
*/
|
|
@@ -29,6 +33,11 @@ export declare function onInjected(listener: () => void, delay?: number): void;
|
|
|
29
33
|
export declare function onReady(listener: () => void, delay?: number): void;
|
|
30
34
|
export declare function onFullReady(listener: () => void, delay?: number): void;
|
|
31
35
|
export type SearchModuleCondition = (module: any, moduleId: string) => boolean;
|
|
36
|
+
export declare const __debug: () => {
|
|
37
|
+
modulesMap: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
32
41
|
export declare let webpackRequire: (<T = any>(moduleId: string) => T) & {
|
|
33
42
|
/**
|
|
34
43
|
* module list
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 135963 >= 2.2310.5
|
|
18
|
+
*/
|
|
19
|
+
export declare function getPushname(): string;
|
|
@@ -60,6 +60,7 @@ export * from './getMembershipApprovalRequests';
|
|
|
60
60
|
export * from './getNumChatsPinned';
|
|
61
61
|
export * from './getOrderInfo';
|
|
62
62
|
export * from './getParticipants';
|
|
63
|
+
export * from './getPushname';
|
|
63
64
|
export * from './getQuotedMsgObj';
|
|
64
65
|
export * from './getReactions';
|
|
65
66
|
export * from './getSearchContext';
|