@davidbolaji/termii-node
Version:
Node.js SDK for Termii API – send SMS, voice, OTP, and manage messaging with ease.
25 lines • 879 B
TypeScript
import { HttpClient } from "../../http/HttpClient";
import { SendEmailTokenRequest, SendEmailTokenResponse } from "../../types/emailTokenService.type";
/**
* Utility type that forces TypeScript to expand an interface
* so IntelliSense shows its full shape instead of just the alias.
*/
type Expand<T> = {
[K in keyof T]: T[K];
} & {};
/**
* Service for handling Email OTP operations
*/
export declare class EmailTokenService {
private http;
constructor(http: HttpClient);
/**
* Send an OTP to a user's email address
*
* @param payload - Request payload containing API key, email, code, and config ID
* @returns Expanded `SendEmailTokenResponse` with details about the sent OTP
*/
sendEmailToken(payload: SendEmailTokenRequest): Promise<Expand<SendEmailTokenResponse>>;
}
export {};
//# sourceMappingURL=EmailTokenService.d.ts.map