waha.js
Version:
TypeScript SDK for WAHA (WhatsApp HTTP API)
27 lines (26 loc) • 802 B
TypeScript
import { WahaBaseClient } from '../client';
import { GetQRParams, QRResponse, RequestCodeRequest } from '../types';
/**
* Auth module for WAHA API
*/
export declare class AuthModule {
private client;
/**
* Create a new Auth module
* @param client Base client
*/
constructor(client: WahaBaseClient);
/**
* Get QR code for pairing WhatsApp API
* @param params QR code parameters
* @returns QR code as image or raw data
*/
getQR(params: GetQRParams): Promise<QRResponse>;
/**
* Request authentication code
* @param session Session name
* @param data Request data
* @returns Promise that resolves when the request is successful
*/
requestCode(session: string | undefined, data: RequestCodeRequest): Promise<void>;
}