import type { WhatsAppMessageRef } from "./types.js"; import type { WhatsAppOutbound } from "./render/message.js"; export interface WhatsAppClientOptions { accessToken: string; phoneNumberId: string; apiVersion?: string; graphBaseUrl?: string; /** Injectable for tests. Defaults to global fetch. */ fetchImpl?: typeof fetch; } export interface DownloadedMedia { bytes: Uint8Array; mimeType: string; } /** Thin Cloud API client over fetch — send messages, upload/download media. */ export declare class WhatsAppClient { private readonly accessToken; private readonly phoneNumberId; private readonly apiVersion; private readonly base; private readonly fetchImpl; constructor(opts: WhatsAppClientOptions); private get authHeader(); /** POST a message; returns the outbound message ref. */ sendMessage(to: string, payload: WhatsAppOutbound): Promise; /** * Mark an inbound message as read and optionally show a typing indicator. * The indicator displays for up to ~25s or until the next message is sent — * it's the only "pending" affordance WhatsApp offers (no streaming/edits). * Throws on a non-2xx so callers can decide; ingress fires it best-effort. */ sendReadReceipt(messageId: string, opts?: { typing?: boolean; }): Promise; /** Upload media (multipart) and return its media id. */ uploadMedia(bytes: Uint8Array, mimeType: string, filename?: string): Promise; /** Resolve a media id to a download URL, then fetch the bytes. */ downloadMedia(mediaId: string): Promise; } //# sourceMappingURL=client.d.ts.map