@wppconnect/wa-js 3.18.6 → 3.18.8
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/call/events/eventTypes.d.ts +2 -3
- package/dist/call/events/registerIncomingCallEvent.d.ts +1 -1
- package/dist/chat/functions/forwardMessage.d.ts +4 -4
- package/dist/chat/functions/forwardMessages.d.ts +33 -0
- package/dist/chat/functions/index.d.ts +2 -1
- package/dist/chat/functions/openChatAt.d.ts +3 -1
- package/dist/chat/functions/openChatBottom.d.ts +3 -1
- package/dist/chat/functions/openChatFromUnread.d.ts +3 -1
- package/dist/chat/functions/sendFileMessage.d.ts +13 -0
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/types.d.ts +7 -0
- package/dist/chat/util/index.d.ts +16 -0
- package/dist/chat/util/rehydrateMessage.d.ts +17 -0
- package/dist/conn/functions/changeEnviromentDevice.d.ts +19 -0
- package/dist/conn/functions/getBuildConstants.d.ts +37 -0
- package/dist/conn/functions/index.d.ts +2 -0
- package/dist/contact/functions/get.d.ts +2 -0
- package/dist/contact/functions/getPnLidEntry.d.ts +59 -0
- package/dist/contact/functions/index.d.ts +1 -0
- package/dist/contact/functions/save.d.ts +3 -3
- package/dist/util/fileHelpers.d.ts +29 -0
- package/dist/util/index.d.ts +1 -0
- package/dist/util/isUrl.d.ts +21 -0
- package/dist/whatsapp/collections/CallCollection.d.ts +16 -6
- package/dist/whatsapp/functions/canSaveAsMyContacts.d.ts +7 -1
- package/dist/whatsapp/functions/forwardMessages.d.ts +24 -0
- package/dist/whatsapp/functions/getUploadLimit.d.ts +24 -0
- package/dist/whatsapp/functions/index.d.ts +1 -0
- package/dist/whatsapp/functions/isLidMigrated.d.ts +1 -1
- package/dist/whatsapp/functions/saveContactAction.d.ts +3 -1
- package/dist/whatsapp/misc/Cmd.d.ts +13 -0
- package/dist/whatsapp/misc/Enviroment.d.ts +22 -0
- package/dist/whatsapp/misc/LidPnCache.d.ts +39 -0
- package/dist/whatsapp/misc/MediaGatingUtils.d.ts +29 -0
- package/dist/whatsapp/misc/WidFactory.d.ts +1 -0
- package/dist/whatsapp/misc/index.d.ts +3 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +16 -16
|
@@ -0,0 +1,39 @@
|
|
|
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 './Wid';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp WAWebApiContact
|
|
19
|
+
* Exposing Lid / PhoneNumber cache functions
|
|
20
|
+
* These functions manage the cache mapping between LID and Phone Numbers.
|
|
21
|
+
* Without hitting whatsapp api.
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace lidPnCache {
|
|
24
|
+
function getPhoneNumber(lidWid: Wid): Wid | undefined;
|
|
25
|
+
function getCurrentLid(phoneWid: Wid): Wid | undefined;
|
|
26
|
+
function getLidEntry(lidWid: Wid): {
|
|
27
|
+
lid: Wid;
|
|
28
|
+
phoneNumber: Wid;
|
|
29
|
+
phoneNumberCreatedAt: number;
|
|
30
|
+
} | undefined;
|
|
31
|
+
function add(lidWid: Wid, entry: {
|
|
32
|
+
lid: Wid;
|
|
33
|
+
phoneNumber: Wid;
|
|
34
|
+
phoneNumberCreatedAt: number;
|
|
35
|
+
}): void;
|
|
36
|
+
function getAllLids(): Wid[];
|
|
37
|
+
function clear(): void;
|
|
38
|
+
function remove(lidWid: Wid): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 WAWebMediaGatingUtils
|
|
18
|
+
*/
|
|
19
|
+
export declare namespace MediaGatingUtils {
|
|
20
|
+
/**
|
|
21
|
+
* Get upload limit for media files based on media type and status origin
|
|
22
|
+
* @whatsapp >= 2.3000.1027640936
|
|
23
|
+
* @param mediaType Media type ('audio', 'video', 'image', 'document', 'sticker', 'sticker-pack')
|
|
24
|
+
* @param fileOrigin File origin for status uploads (e.g., 'STATUS_TAB_CAMERA_PHOTO_LIBRARY')
|
|
25
|
+
* @param isVcardOverMmsDocument Whether this is a vCard over MMS document
|
|
26
|
+
* @returns Upload limit in bytes
|
|
27
|
+
*/
|
|
28
|
+
function getUploadLimit(mediaType: string, fileOrigin?: string | null, isVcardOverMmsDocument?: boolean): number;
|
|
29
|
+
}
|
|
@@ -22,6 +22,7 @@ export declare namespace WidFactory {
|
|
|
22
22
|
function createDeviceWid(wid: string): Wid;
|
|
23
23
|
function createDeviceWidFromUserAndDevice(user: string, device: string): Wid;
|
|
24
24
|
function createUserWid(user: string, server?: string): Wid;
|
|
25
|
+
function createUserWidOrThrow(user: string, server?: string): Wid;
|
|
25
26
|
function createWid(wid: string): Wid;
|
|
26
27
|
function createWidFromWidLike(wid: string | {
|
|
27
28
|
_serialized: string;
|
|
@@ -21,12 +21,15 @@ export * from './Cmd';
|
|
|
21
21
|
export * from './ComposeBoxActions';
|
|
22
22
|
export * from './Conn';
|
|
23
23
|
export * from './Constants';
|
|
24
|
+
export * from './Enviroment';
|
|
24
25
|
export * from './EventEmitter';
|
|
25
26
|
export * from './ImageUtils';
|
|
26
27
|
export * from './IsOfficialClient';
|
|
27
28
|
export * from './Lid1X1MigrationUtils';
|
|
29
|
+
export * from './LidPnCache';
|
|
28
30
|
export * from './MediaBlobCache';
|
|
29
31
|
export * from './MediaEntry';
|
|
32
|
+
export * from './MediaGatingUtils';
|
|
30
33
|
export * from './MediaObject';
|
|
31
34
|
export * from './MediaObjectUtil';
|
|
32
35
|
export * from './MediaPrep';
|