superchats
Version:
SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp
69 lines (68 loc) • 2.1 kB
TypeScript
import { Types } from "./Models/Functions";
export declare const BRAND: any;
export * from "./Models/Functions";
/**
* A callback will be received, informing the status of the qrcode
*/
export type CatchQR = (session: string, base64Image: any, asciiQR: any, urlCode: any) => void;
/**
* A callback will be received, informing the status of the paraingcode
*/
export type CatchCode = (session: string, code: string) => void;
/**
* A callback will be received, informing the customer's status
*/
export type StatusFind = (...args: any[]) => void;
export interface CreateConfig {
driveStorage?: drive;
mongoUrl?: string;
amqpUrl?: string;
welcomeScreen?: boolean;
welcomeText?: string;
retries?: number;
alwaysOn?: boolean;
autoRead?: boolean;
license: string;
decryptUrl?: string;
code?: boolean;
qr?: true;
logQr?: boolean;
nodata?: boolean;
nodataFull?: boolean;
proxy?: string;
qrcode?: CatchQR;
pairing?: CatchCode;
statusFind?: StatusFind;
syncHistory?: (...args: any[]) => void;
onAnyMessage?: (...args: any[]) => void;
onReaction?: (...args: any[]) => void;
onAck?: (...args: any[]) => void;
onCall?: (...args: any[]) => void;
onPresence?: (...args: any[]) => void;
onGroups?: (...args: any[]) => void;
onParticipants?: (...args: any[]) => void;
onDelete?: (...args: any[]) => void;
}
interface CreateOptions extends CreateConfig {
session: string;
}
declare function create(createOption: CreateOptions): Promise<Types>;
declare function create(sessionName: string, options?: CreateConfig): any;
type drive = 'local';
type Options = {
caption?: string;
mimetype?: string;
viewOnce?: boolean;
reply?: string;
ptv?: boolean;
filename?: string;
address?: string;
titleBtn?: string;
description?: string;
footerBtn?: string;
msgId?: string;
content?: any;
};
declare const decrypt: (options: Options) => Promise<any>;
declare const decryptSave: (options: Options) => Promise<any>;
export { create, decryptSave, decrypt, Types };