73 lines
1.5 KiB
TypeScript
73 lines
1.5 KiB
TypeScript
declare const __WS_URL__: string;
|
|
|
|
declare const WPP: {
|
|
isReady: boolean;
|
|
|
|
loader: {
|
|
onReady(callback: () => void): void;
|
|
};
|
|
|
|
conn: {
|
|
isAuthenticated(): boolean;
|
|
};
|
|
|
|
chat: {
|
|
list(options?: {
|
|
count?: number;
|
|
onlyUsers?: boolean;
|
|
onlyGroups?: boolean;
|
|
onlyCommunities?: boolean;
|
|
onlyNewsletter?: boolean;
|
|
onlyArchived?: boolean;
|
|
}): Promise<any[]>;
|
|
|
|
get(chatId: string): any | undefined;
|
|
|
|
getMessages(
|
|
chatId: string,
|
|
options?: {
|
|
count?: number;
|
|
direction?: "before" | "after";
|
|
id?: string;
|
|
includeCallMessages?: boolean;
|
|
media?: "image" | "document" | "url" | "all";
|
|
onlyUnread?: boolean;
|
|
},
|
|
): Promise<any[]>;
|
|
|
|
sendTextMessage(
|
|
chatId: string,
|
|
text: string,
|
|
options?: {
|
|
delay?: number;
|
|
detectMentioned?: boolean;
|
|
markIsRead?: boolean;
|
|
mentionedList?: string[];
|
|
messageId?: string;
|
|
quotedMsg?: string;
|
|
quotedMsgPayload?: string;
|
|
waitForAck?: boolean;
|
|
},
|
|
): Promise<any>;
|
|
|
|
downloadMedia(msgId: string): Promise<Blob>;
|
|
|
|
on(event: string, callback: (...args: any[]) => void): void;
|
|
};
|
|
|
|
contact: {
|
|
list(): Promise<any[]>;
|
|
get(contactId: string): any | undefined;
|
|
};
|
|
|
|
group: {
|
|
getAllGroups(): Promise<any[]>;
|
|
};
|
|
|
|
util: {
|
|
blobToBase64: (blob: Blob) => Promise<string>;
|
|
};
|
|
|
|
on(event: string, callback: (...args: any[]) => void): void;
|
|
};
|