talkyzap-wapp-api 1.0.17 → 1.0.19
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 +78 -26
- 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/getMessages.d.ts +7 -0
- package/dist/chat/functions/index.d.ts +2 -1
- package/dist/chat/functions/list.d.ts +4 -0
- 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/pinMsg.d.ts +19 -5
- package/dist/chat/functions/sendFileMessage.d.ts +13 -0
- package/dist/chat/functions/sendTextMessage.d.ts +2 -3
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/types.d.ts +11 -3
- 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/getMigrationState.d.ts +52 -0
- package/dist/conn/functions/index.d.ts +3 -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/gtag/Tracker.d.ts +1 -1
- package/dist/order/functions/accept.d.ts +58 -0
- package/dist/order/functions/decline.d.ts +53 -0
- package/dist/order/functions/index.d.ts +3 -0
- package/dist/order/functions/update.d.ts +77 -0
- package/dist/order/index.d.ts +1 -0
- package/dist/order/types.d.ts +119 -0
- 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/enums/ACK.d.ts +5 -3
- package/dist/whatsapp/enums/PinExpiryDurationOption.d.ts +25 -0
- package/dist/whatsapp/enums/index.d.ts +1 -0
- package/dist/whatsapp/functions/addAndSendMessageEdit.d.ts +2 -2
- package/dist/whatsapp/functions/addAndSendMsgToChat.d.ts +2 -2
- package/dist/whatsapp/functions/canSaveAsMyContacts.d.ts +7 -1
- package/dist/whatsapp/functions/createChat.d.ts +2 -0
- package/dist/whatsapp/functions/forwardMessages.d.ts +24 -0
- package/dist/whatsapp/functions/getPhoneLangPref.d.ts +25 -0
- package/dist/whatsapp/functions/getUploadLimit.d.ts +24 -0
- package/dist/whatsapp/functions/index.d.ts +4 -0
- package/dist/whatsapp/functions/isLidMigrated.d.ts +1 -1
- package/dist/whatsapp/functions/msgFindQuery.d.ts +4 -2
- package/dist/whatsapp/functions/queryOrder.d.ts +8 -7
- package/dist/whatsapp/functions/saveContactAction.d.ts +3 -1
- package/dist/whatsapp/functions/sendOrderStatusMessageAsMerchant.d.ts +47 -0
- package/dist/whatsapp/functions/sendPinInChatMsg.d.ts +4 -8
- package/dist/whatsapp/functions/updateMessageTable.d.ts +18 -0
- package/dist/whatsapp/index.d.ts +1 -0
- 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/MediaPrep.d.ts +3 -2
- package/dist/whatsapp/misc/UserPrefs.d.ts +26 -7
- package/dist/whatsapp/misc/Wid.d.ts +8 -0
- package/dist/whatsapp/misc/WidFactory.d.ts +1 -0
- package/dist/whatsapp/misc/index.d.ts +3 -0
- package/dist/whatsapp/models/ChatModel.d.ts +1 -1
- package/dist/whatsapp/models/MsgModel.d.ts +17 -1
- package/dist/whatsapp/types.d.ts +21 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/eslint.config.mjs +108 -0
- package/package.json +21 -23
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* Get upload limit for media files based on media type and status origin
|
|
18
|
+
* @whatsapp WAWebMediaGatingUtils
|
|
19
|
+
* @param mediaType Media type ('audio', 'video', 'image', 'document', 'sticker', 'sticker-pack')
|
|
20
|
+
* @param fileOrigin File origin for status uploads (e.g., 'STATUS_TAB_CAMERA_PHOTO_LIBRARY')
|
|
21
|
+
* @param isVcardOverMmsDocument Whether this is a vCard over MMS document
|
|
22
|
+
* @returns Upload limit in bytes
|
|
23
|
+
*/
|
|
24
|
+
export declare function getUploadLimit(mediaType: string, fileOrigin?: string | null, isVcardOverMmsDocument?: boolean): number;
|
|
@@ -54,6 +54,7 @@ export * from './findChat';
|
|
|
54
54
|
export * from './findCommonGroups';
|
|
55
55
|
export * from './findFirstWebLink';
|
|
56
56
|
export * from './findOrCreateLatestChat';
|
|
57
|
+
export * from './forwardMessages';
|
|
57
58
|
export * from './forwardMessagesToChats';
|
|
58
59
|
export * from './frontendFireAndForget';
|
|
59
60
|
export * from './genBotMsgSecretFromMsgSecret';
|
|
@@ -80,6 +81,7 @@ export * from './getNextLabelId';
|
|
|
80
81
|
export * from './getNumChatsPinned';
|
|
81
82
|
export * from './getOrderInfo';
|
|
82
83
|
export * from './getParticipants';
|
|
84
|
+
export * from './getPhoneLangPref';
|
|
83
85
|
export * from './getPhoneNumber';
|
|
84
86
|
export * from './getPrivacyDisallowedListTable';
|
|
85
87
|
export * from './getPushname';
|
|
@@ -137,6 +139,7 @@ export * from './sendExitGroup';
|
|
|
137
139
|
export * from './sendGroupParticipants';
|
|
138
140
|
export * from './sendJoinGroupViaInvite';
|
|
139
141
|
export * from './sendNewsletterMessageJob';
|
|
142
|
+
export * from './sendOrderStatusMessageAsMerchant';
|
|
140
143
|
export * from './sendPinInChatMsg';
|
|
141
144
|
export * from './sendQueryExists';
|
|
142
145
|
export * from './sendQueryGroupInvite';
|
|
@@ -162,6 +165,7 @@ export * from './unmuteNewsletter';
|
|
|
162
165
|
export * from './updateCart';
|
|
163
166
|
export * from './updateCartEnabled';
|
|
164
167
|
export * from './updateDBForGroupAction';
|
|
168
|
+
export * from './updateMessageTable';
|
|
165
169
|
export * from './updateNewsletterMsgRecord';
|
|
166
170
|
export * from './updateParticipants';
|
|
167
171
|
export * from './uploadMedia';
|
|
@@ -24,5 +24,7 @@ export interface MsgFindQueryParams {
|
|
|
24
24
|
participant?: any;
|
|
25
25
|
media?: 'url' | 'document';
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1029x
|
|
29
|
+
*/
|
|
30
|
+
export declare function msgFindQuery(type: 'after' | 'before' | 'call_log' | 'event' | 'media' | 'search' | 'star', params: MsgFindQueryParams): Promise<ModelPropertiesContructor<MsgModel>[] | any>;
|
|
@@ -19,14 +19,15 @@ export declare function queryOrder(productId: string, imageWidth: number, imageH
|
|
|
19
19
|
createdAt: number;
|
|
20
20
|
products: {
|
|
21
21
|
id: string;
|
|
22
|
-
price: number;
|
|
23
|
-
thumbnailId: string;
|
|
24
|
-
thumbnailUrl: string;
|
|
25
|
-
currency: string;
|
|
22
|
+
price: number | null;
|
|
23
|
+
thumbnailId: string | null;
|
|
24
|
+
thumbnailUrl: string | null;
|
|
25
|
+
currency: string | null;
|
|
26
26
|
name: string;
|
|
27
|
-
quantity: number;
|
|
27
|
+
quantity: number | null;
|
|
28
|
+
properties: [string, string][];
|
|
28
29
|
}[];
|
|
29
|
-
subtotal: number;
|
|
30
|
-
total: number;
|
|
30
|
+
subtotal: number | null;
|
|
31
|
+
total: number | null;
|
|
31
32
|
tax: number | null;
|
|
32
33
|
}>;
|
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
/**
|
|
20
20
|
* @param user 5521980809090
|
|
21
21
|
* @param userToDelete 5521980809090
|
|
22
|
+
* @param e_fullName Contact Full Name
|
|
23
|
+
* @param f_firstName Contact First Name
|
|
22
24
|
* @param name Contact Name
|
|
23
25
|
* @param surname Contact Surname
|
|
24
26
|
* @param syncToAddressbook Sync to Addressbook boolean
|
|
25
27
|
*/
|
|
26
|
-
export declare function saveContactAction(userToCreate: string, userToDelete: string | null, name?: any, surname?: any, syncToAddressbook?: boolean): Promise<undefined>;
|
|
28
|
+
export declare function saveContactAction(userToCreate: string, userToDelete: string | null, e_fullName?: any, f_firstName?: any, name?: any, surname?: any, syncToAddressbook?: boolean): Promise<undefined>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 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
|
+
export interface SendOrderStatusParams {
|
|
17
|
+
chat: any;
|
|
18
|
+
sellerJid: string | any;
|
|
19
|
+
orderInfo: {
|
|
20
|
+
items: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
amount: number;
|
|
24
|
+
quantity: number;
|
|
25
|
+
isCustomItem?: boolean;
|
|
26
|
+
isQuantitySet?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
totalAmount: number;
|
|
29
|
+
subtotal: number;
|
|
30
|
+
tax?: number;
|
|
31
|
+
shipping?: number;
|
|
32
|
+
discount?: number;
|
|
33
|
+
currency: string;
|
|
34
|
+
referenceId?: string;
|
|
35
|
+
};
|
|
36
|
+
orderNote?: string;
|
|
37
|
+
orderStatus: string;
|
|
38
|
+
offset: number;
|
|
39
|
+
paymentStatus: string;
|
|
40
|
+
paymentMethod?: string;
|
|
41
|
+
contextInfo?: any;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Function to send order status update message as merchant
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare function sendOrderStatusMessageAsMerchant(params: SendOrderStatusParams): Promise<any>;
|
|
@@ -13,13 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { PIN_STATE } from '../enums/PIN_STATE';
|
|
16
|
+
import { ACK, PIN_STATE, PinExpiryDurationOption } from '../enums';
|
|
18
17
|
import { MsgModel } from '../models';
|
|
19
|
-
|
|
18
|
+
import { SendMsgResultObject } from '../types';
|
|
19
|
+
/** @whatsapp WAWebSendPinMessageAction >= 2.3000.1029839609
|
|
20
20
|
*/
|
|
21
|
-
export declare function sendPinInChatMsg(msg: MsgModel, type: PIN_STATE,
|
|
22
|
-
count: number;
|
|
23
|
-
messageSendResult: SendMsgResult;
|
|
24
|
-
t: number;
|
|
25
|
-
}>;
|
|
21
|
+
export declare function sendPinInChatMsg(msg: MsgModel, type: PIN_STATE, pinExpiryOption?: PinExpiryDurationOption, ack?: ACK): Promise<SendMsgResultObject | null>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 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 { MsgKey } from '../misc';
|
|
17
|
+
/** @whatsapp WAWebDBUpdateMessageTable */
|
|
18
|
+
export declare function updateMessageTable(msgKey: MsgKey, updateFields: Record<string, any>): Promise<void>;
|
package/dist/whatsapp/index.d.ts
CHANGED
|
@@ -76,10 +76,23 @@ export declare class CmdClass extends EventEmitter {
|
|
|
76
76
|
openChatAt(chat: ChatModel, msgContext: ReturnType<typeof getSearchContext>): Promise<boolean>;
|
|
77
77
|
openChatAt(params?: {
|
|
78
78
|
chat: ChatModel;
|
|
79
|
+
chatEntryPoint?: string;
|
|
79
80
|
msgContext: ReturnType<typeof getSearchContext>;
|
|
81
|
+
onSuccess?: {
|
|
82
|
+
onScrollToQuotedCarouselCard?: void;
|
|
83
|
+
mediaMsgToOpenInMediaViewer?: void;
|
|
84
|
+
};
|
|
80
85
|
}): Promise<boolean>;
|
|
81
86
|
openChatFromUnread(chat: ChatModel): Promise<boolean>;
|
|
87
|
+
openChatFromUnread(params: {
|
|
88
|
+
chat: ChatModel;
|
|
89
|
+
chatEntryPoint?: string;
|
|
90
|
+
}): Promise<boolean>;
|
|
82
91
|
openChatBottom(chat: ChatModel): Promise<boolean>;
|
|
92
|
+
openChatBottom(params: {
|
|
93
|
+
chat: ChatModel;
|
|
94
|
+
chatEntryPoint?: string;
|
|
95
|
+
}): Promise<boolean>;
|
|
83
96
|
scrollToPtt(e?: any): void;
|
|
84
97
|
_scrollToFocusedMsg(e?: any): void;
|
|
85
98
|
_scrollChatToBottom(): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
export declare const Enviroment: {
|
|
17
|
+
default: {
|
|
18
|
+
isWeb: boolean;
|
|
19
|
+
isWindows: boolean;
|
|
20
|
+
isGuest: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -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
|
+
}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ChatModel, MediaDataModel, ModelPropertiesContructor, MsgModel } from '..';
|
|
17
|
-
import { OUTWARD_TYPES
|
|
17
|
+
import { OUTWARD_TYPES } from '../enums';
|
|
18
|
+
import { SendMsgResultObject } from '../types';
|
|
18
19
|
import { OpaqueData } from '.';
|
|
19
20
|
/** @whatsapp 78986
|
|
20
21
|
* @whatsapp 778986 >= 2.2222.8
|
|
@@ -43,7 +44,7 @@ export declare namespace MediaPrep {
|
|
|
43
44
|
forwardedFromWeb?: boolean;
|
|
44
45
|
ctwaContext?: any;
|
|
45
46
|
isViewOnce?: boolean;
|
|
46
|
-
}): Promise<
|
|
47
|
+
}): Promise<SendMsgResultObject>;
|
|
47
48
|
waitForPrep(): Promise<MediaDataModel>;
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -15,28 +15,43 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Wid } from './Wid';
|
|
17
17
|
/**
|
|
18
|
-
* @whatsapp
|
|
18
|
+
* @whatsapp >= 2.3000
|
|
19
19
|
*/
|
|
20
20
|
export declare namespace UserPrefs {
|
|
21
|
-
function
|
|
22
|
-
function assertGetMe(): Wid;
|
|
23
|
-
function assertGetMeUser(): Wid;
|
|
21
|
+
function clearGetMaybeLidUserCache(...args: any[]): any;
|
|
24
22
|
function clearGetMaybeMePnUserCache(...args: any[]): any;
|
|
25
|
-
function getMaybeMeDisplayName(...args: any[]): any;
|
|
26
23
|
function getMaybeMeDeviceLid(...args: any[]): any;
|
|
24
|
+
function getMaybeMeDevicePn(...args: any[]): any;
|
|
25
|
+
function getMaybeMeDisplayName(...args: any[]): any;
|
|
27
26
|
function getMaybeMeLidUser(...args: any[]): any;
|
|
28
27
|
function getMaybeMePnUser(): Wid;
|
|
29
28
|
function getMaybeMeUser(): Wid;
|
|
30
|
-
function
|
|
31
|
-
function
|
|
29
|
+
function getMeDeviceLidOrThrow(...args: any[]): any;
|
|
30
|
+
function getMeDevicePnOrThrow(...args: any[]): any;
|
|
31
|
+
function getMeDisplayNameOrThrow(...args: any[]): any;
|
|
32
|
+
function getMeLidUserOrThrow(...args: any[]): any;
|
|
33
|
+
function getMePNandLIDWids(...args: any[]): [Wid | undefined, Wid | undefined];
|
|
34
|
+
function getMePnUserOrThrow(...args: any[]): any;
|
|
35
|
+
function getUnknownId(...args: any[]): any;
|
|
32
36
|
function isMeAccount(...args: any[]): any;
|
|
37
|
+
function isMeAccountNonLid(...args: any[]): any;
|
|
33
38
|
function isMeDevice(...args: any[]): any;
|
|
34
39
|
function isMePrimary(...args: any[]): any;
|
|
35
40
|
function isMePrimaryNonLid(...args: any[]): any;
|
|
41
|
+
function isMeUser(...args: any[]): any;
|
|
36
42
|
function isSerializedWidMe(...args: any[]): any;
|
|
37
43
|
function setMe(...args: any[]): any;
|
|
38
44
|
function setMeDisplayName(...args: any[]): any;
|
|
39
45
|
function setMeLid(...args: any[]): any;
|
|
46
|
+
function setUnknownId(...args: any[]): any;
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated
|
|
49
|
+
*/
|
|
50
|
+
function assertGetMe(): Wid;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated
|
|
53
|
+
*/
|
|
54
|
+
function assertGetMeUser(): Wid;
|
|
40
55
|
/**
|
|
41
56
|
* @deprecated
|
|
42
57
|
*/
|
|
@@ -45,6 +60,10 @@ export declare namespace UserPrefs {
|
|
|
45
60
|
* @deprecated
|
|
46
61
|
*/
|
|
47
62
|
function getMeDevicePn(...args: any[]): any;
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated
|
|
65
|
+
*/
|
|
66
|
+
function getMeUser(): Wid;
|
|
48
67
|
/**
|
|
49
68
|
* @deprecated
|
|
50
69
|
*/
|
|
@@ -41,6 +41,14 @@ export declare class Wid {
|
|
|
41
41
|
isServer(): boolean;
|
|
42
42
|
isStatusV3(): boolean;
|
|
43
43
|
isStatus(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* @whatsapp >= 2.3000.1029594945
|
|
46
|
+
* this.server==="c.us" ||
|
|
47
|
+
* this.server==="lid" ||
|
|
48
|
+
* this.server==="bot" ||
|
|
49
|
+
* this.server==="hosted" || (probably used for cloud api)
|
|
50
|
+
* this.server==="hosted.lid" (probably used for cloud api)
|
|
51
|
+
*/
|
|
44
52
|
isUser(): boolean;
|
|
45
53
|
isLid(): boolean;
|
|
46
54
|
isUserNotPSA(): boolean;
|
|
@@ -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';
|
|
@@ -198,7 +198,23 @@ interface Props {
|
|
|
198
198
|
broadcastParticipants?: any;
|
|
199
199
|
broadcastEphSettings?: any;
|
|
200
200
|
broadcastId?: any;
|
|
201
|
-
ctwaContext?:
|
|
201
|
+
ctwaContext?: {
|
|
202
|
+
conversionSource?: string;
|
|
203
|
+
conversionData?: object;
|
|
204
|
+
sourceUrl?: string;
|
|
205
|
+
description?: string;
|
|
206
|
+
title?: string;
|
|
207
|
+
thumbnail?: string;
|
|
208
|
+
thumbnailUrl?: string;
|
|
209
|
+
mediaType?: number;
|
|
210
|
+
adContextPreviewDismissed?: boolean;
|
|
211
|
+
sourceApp?: string;
|
|
212
|
+
greetingMessageBody?: string;
|
|
213
|
+
automatedGreetingMessageShown?: boolean;
|
|
214
|
+
sourceId?: string;
|
|
215
|
+
originalImageUrl?: string;
|
|
216
|
+
mediaUrl?: string;
|
|
217
|
+
};
|
|
202
218
|
list?: {
|
|
203
219
|
buttonText: string;
|
|
204
220
|
description: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { SendMsgResult } from './enums';
|
|
17
|
+
export interface SendMsgResultObject {
|
|
18
|
+
messageSendResult: SendMsgResult;
|
|
19
|
+
t?: number;
|
|
20
|
+
count?: number | null;
|
|
21
|
+
}
|