UNPKG

@davidbolaji/termii-node

Version:

Node.js SDK for Termii API – send SMS, voice, OTP, and manage messaging with ease.

38 lines 1.38 kB
import { HttpClient } from "../../http/HttpClient"; import { AuthenticateRequest, AuthenticateResponse, CreateEsimRequest, CreateEsimResponse, FetchEsimsResponse, FetchPlansRequest, FetchPlansResponse, QrCodeResponse, UsageResponse } from "../../types/eSimService.type"; /** * Utility type that forces TypeScript to expand an interface */ type Expand<T> = { [K in keyof T]: T[K]; } & {}; export declare class EsimService { private http; constructor(http: HttpClient); /** * Authenticate with API key to get a bearer token */ authenticate(payload: AuthenticateRequest): Promise<Expand<AuthenticateResponse>>; /** * Fetch available data plans by country and type */ fetchPlans(params: FetchPlansRequest): Promise<Expand<FetchPlansResponse>>; /** * Create (provision) a new eSIM */ createEsim(payload: CreateEsimRequest): Promise<Expand<CreateEsimResponse>>; /** * Get QR code for activating an eSIM */ getQrCode(iccid: string): Promise<Expand<QrCodeResponse>>; /** * Get usage details of an eSIM by ICCID */ getUsage(iccid: string): Promise<Expand<UsageResponse>>; /** * Fetch list of provisioned eSIMs with pagination */ fetchEsims(page?: number, size?: number): Promise<Expand<FetchEsimsResponse>>; } export {}; //# sourceMappingURL=EsimService.d.ts.map