import type { components } from '../generated/openapi.js'; import type { RequestOptions } from '../types.js'; import { BaseResource } from './base.js'; export type LookupRequest = components['schemas']['LookupRequest']; export type LookupResult = components['schemas']['Lookup']; export declare class LookupResource extends BaseResource { /** * `POST /v1/lookup` — check whether a handle is reachable on iMessage. * * Two outcomes. The client returns the envelope's `data` and does not * surface the HTTP status, so branch on `pending` — the in-band signal: * * - **Terminal (`200`)** — `imessage: true | false | null`, and `pending` * is absent. `null` means the iMessage status is unknown and the handle * should be treated as SMS-safe (degrade to SMS instead of relying on * iMessage delivery). * - **Pending (`202`)** — a device probe was dispatched but had not * answered within the wait budget. `pending: true`, `imessage: null`, * plus `probe_id` and `retry_after` (seconds). * * Completion is poll-only — there is no `lookup.completed` webhook. * Re-issue the same request after `retry_after`; the shared cache the * probe warms answers `200`. * * ```ts * const result = await client.lookup.check({ handle }) * if (result.pending) { * setTimeout(retry, (result.retry_after ?? 1) * 1000) * } * ``` */ check(params: LookupRequest, opts?: RequestOptions): Promise; } //# sourceMappingURL=lookup.d.ts.map