@wppconnect/wa-js 3.17.6 → 3.18.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/contact/functions/index.d.ts +2 -0
- package/dist/contact/functions/queryExists.d.ts +1 -0
- package/dist/contact/functions/remove.d.ts +27 -0
- package/dist/contact/functions/save.d.ts +33 -0
- package/dist/whatsapp/functions/canSaveAsMyContacts.d.ts +20 -0
- package/dist/whatsapp/functions/deleteContactAction.d.ts +19 -0
- package/dist/whatsapp/functions/index.d.ts +6 -0
- package/dist/whatsapp/functions/isLidMigrated.d.ts +19 -0
- package/dist/whatsapp/functions/saveContactAction.d.ts +26 -0
- package/dist/whatsapp/functions/sendQueryGroupInvite.d.ts +35 -32
- package/dist/whatsapp/functions/shouldHaveAccountLid.d.ts +19 -0
- package/dist/whatsapp/functions/toUserLid.d.ts +20 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -20,5 +20,7 @@ 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 { remove } from './remove';
|
|
24
|
+
export { save } from './save';
|
|
23
25
|
export { subscribePresence } from './subscribePresence';
|
|
24
26
|
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 { ContactModel, Wid } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Remove/delete contact in the device
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* await WPP.contact.remove('5533999999999@c.us');
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @category Contact
|
|
26
|
+
*/
|
|
27
|
+
export declare function remove(contactId: string | Wid): Promise<ContactModel | undefined>;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { ContactModel, Wid } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Create new or update a contact in the device
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* await WPP.contact.save('5533999999999@c.us', 'John', {
|
|
23
|
+
* surname: 'Doe',
|
|
24
|
+
* syncAdressBook: true,
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @category Contact
|
|
29
|
+
*/
|
|
30
|
+
export declare function save(contactId: string | Wid, name: string, options?: {
|
|
31
|
+
surname?: string;
|
|
32
|
+
syncAdressBook?: boolean;
|
|
33
|
+
}): Promise<ContactModel | undefined>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 '../misc';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp WAWebContactEditUtils >= 2.3000.0
|
|
19
|
+
*/
|
|
20
|
+
export declare function canSaveAsMyContacts(wid: Wid): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp WAWebDeleteContactAction >= 2.3000.0
|
|
18
|
+
*/
|
|
19
|
+
export declare function deleteContactAction(number: string): Promise<void>;
|
|
@@ -22,6 +22,7 @@ export * from './calculateFilehashFromBlob';
|
|
|
22
22
|
export * from './canEditCaption';
|
|
23
23
|
export * from './canEditMsg';
|
|
24
24
|
export * from './canReplyMsg';
|
|
25
|
+
export * from './canSaveAsMyContacts';
|
|
25
26
|
export * from './changeOptInStatusForExternalWebBeta';
|
|
26
27
|
export * from './checkChatExistedOrCreate';
|
|
27
28
|
export * from './collections';
|
|
@@ -37,6 +38,7 @@ export * from './createNewsletterQuery';
|
|
|
37
38
|
export * from './createOrder';
|
|
38
39
|
export * from './createOrUpdateReactions';
|
|
39
40
|
export * from './currencyForCountryShortcode';
|
|
41
|
+
export * from './deleteContactAction';
|
|
40
42
|
export * from './deleteNewsletter';
|
|
41
43
|
export * from './editBusinessProfile';
|
|
42
44
|
export * from './editNewsletterMetadataAction';
|
|
@@ -97,6 +99,7 @@ export * from './initializeAltDeviceLinking';
|
|
|
97
99
|
export * from './isAnimatedWebp';
|
|
98
100
|
export * from './isAuthenticated';
|
|
99
101
|
export * from './isFilterExcludedFromSearchTreatmentInInboxFlow';
|
|
102
|
+
export * from './isLidMigrated';
|
|
100
103
|
export * from './isRegistered';
|
|
101
104
|
export * from './isUnreadTypeMsg';
|
|
102
105
|
export * from './isWid';
|
|
@@ -124,6 +127,7 @@ export * from './randomId';
|
|
|
124
127
|
export * from './removeStatusMessage';
|
|
125
128
|
export * from './resetGroupInviteCode';
|
|
126
129
|
export * from './revokeStatus';
|
|
130
|
+
export * from './saveContactAction';
|
|
127
131
|
export * from './selectChatForOneOnOneMessage';
|
|
128
132
|
export * from './sendClear';
|
|
129
133
|
export * from './sendCreateCommunity';
|
|
@@ -145,11 +149,13 @@ export * from './setGroup';
|
|
|
145
149
|
export * from './setPin';
|
|
146
150
|
export * from './setPrivacyForOneCategory';
|
|
147
151
|
export * from './setPushname';
|
|
152
|
+
export * from './shouldHaveAccountLid';
|
|
148
153
|
export * from './status';
|
|
149
154
|
export * from './STATUS_JID';
|
|
150
155
|
export * from './statusEnable';
|
|
151
156
|
export * from './subscribePresence';
|
|
152
157
|
export * from './syncABPropsTask';
|
|
158
|
+
export * from './toUserLid';
|
|
153
159
|
export * from './typeAttributeFromProtobuf';
|
|
154
160
|
export * from './unixTime';
|
|
155
161
|
export * from './unmuteNewsletter';
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp WAWebLidMigrationUtils >= 2.3000.x
|
|
18
|
+
*/
|
|
19
|
+
export declare function isLidMigrated(): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp WAWebSaveContactAction >= 2.3000.0
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* @param user 5521980809090
|
|
21
|
+
* @param userToDelete 5521980809090
|
|
22
|
+
* @param name Contact Name
|
|
23
|
+
* @param surname Contact Surname
|
|
24
|
+
* @param syncToAddressbook Sync to Addressbook boolean
|
|
25
|
+
*/
|
|
26
|
+
export declare function saveContactAction(userToCreate: string, userToDelete: string | null, name?: any, surname?: any, syncToAddressbook?: boolean): Promise<undefined>;
|
|
@@ -15,40 +15,43 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Wid } from '..';
|
|
17
17
|
export interface QueryGroupInviteResult {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
noFrequentlyForwarded: boolean;
|
|
27
|
-
owner?: Wid;
|
|
28
|
-
parent: boolean;
|
|
29
|
-
participants: {
|
|
18
|
+
groupInfo: {
|
|
19
|
+
announce: boolean;
|
|
20
|
+
creation: number;
|
|
21
|
+
/** description of the group; linebreaks are formatted using `"\n"` */
|
|
22
|
+
desc: string;
|
|
23
|
+
descId: string;
|
|
24
|
+
descOwner?: Wid;
|
|
25
|
+
descTime: number;
|
|
30
26
|
id: Wid;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
noFrequentlyForwarded: boolean;
|
|
28
|
+
owner?: Wid;
|
|
29
|
+
parent: boolean;
|
|
30
|
+
participants: {
|
|
31
|
+
id: Wid;
|
|
32
|
+
isAdmin: boolean;
|
|
33
|
+
isSuperAdmin: boolean;
|
|
34
|
+
}[];
|
|
35
|
+
pvId?: string;
|
|
36
|
+
restrict: boolean;
|
|
37
|
+
/** how many members the group currently has */
|
|
38
|
+
size: number;
|
|
39
|
+
status: number;
|
|
40
|
+
/** title of the group */
|
|
41
|
+
subject: string;
|
|
42
|
+
subjectOwner?: Wid;
|
|
43
|
+
subjectTime: number;
|
|
44
|
+
support: boolean;
|
|
45
|
+
suspended: boolean;
|
|
46
|
+
isParentGroup: boolean;
|
|
47
|
+
isParentGroupClosed: boolean;
|
|
48
|
+
defaultSubgroup: boolean;
|
|
49
|
+
generalSubgroup: boolean;
|
|
50
|
+
membershipApprovalMode: boolean;
|
|
51
|
+
isLidAddressingMode: boolean;
|
|
52
|
+
generalChatAutoAddDisabled: boolean;
|
|
53
|
+
};
|
|
38
54
|
status: number;
|
|
39
|
-
/** title of the group */
|
|
40
|
-
subject: string;
|
|
41
|
-
subjectOwner?: Wid;
|
|
42
|
-
subjectTime: number;
|
|
43
|
-
support: boolean;
|
|
44
|
-
suspended: boolean;
|
|
45
|
-
isParentGroup: boolean;
|
|
46
|
-
isParentGroupClosed: boolean;
|
|
47
|
-
defaultSubgroup: boolean;
|
|
48
|
-
generalSubgroup: boolean;
|
|
49
|
-
membershipApprovalMode: boolean;
|
|
50
|
-
isLidAddressingMode: boolean;
|
|
51
|
-
generalChatAutoAddDisabled: boolean;
|
|
52
55
|
}
|
|
53
56
|
/** @whatsapp 10790
|
|
54
57
|
* @whatsapp 810790 >= 2.2222.8
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp WAWebLidMigrationUtils >= 2.3000.x
|
|
18
|
+
*/
|
|
19
|
+
export declare function shouldHaveAccountLid(): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 '../misc';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp WAWebLidMigrationUtils >= 2.3000.x
|
|
19
|
+
*/
|
|
20
|
+
export declare function toUserLid(wid: Wid): Wid;
|