/** * Doxy.me Embeddable SDK * Easily embed doxy.me into your application using iframes. */ export type DoxyVersion = "v1" | "v2"; export interface DoxyMeOptions { url: string; width?: string | number; height?: string | number; allow?: string; sandbox?: string; className?: string; id?: string; style?: Partial; onLoad?: () => void; onError?: (error: Event) => void; /** Optional additional tracking params to append to the iframe URL. */ trackingParams?: Record; } export interface DoxyMeEmbedResult { iframe: HTMLIFrameElement; destroy: () => void; } export interface ProviderSignInOptions extends Omit { /** * Which doxy.me frontend to embed. * - "v1" (default): legacy OG frontend at `/sign-in`. Backwards-compatible. * - "v2": new Next.js frontend at `/v2/sign-in`. Recommended for new * integrations; the OG frontend is being deprecated. */ version?: DoxyVersion; /** * Override the doxy.me origin. Defaults to `https://doxy.me`. Useful for * staging / QA / ephemeral environments — e.g. `https://doxy-qa2.me` or * `https://core-.doxy-ephemeral.me`. */ baseUrl?: string; } export interface PatientRoomOptions extends Omit { /** * Which doxy.me frontend to embed. * - "v1" (default): legacy OG frontend at `/{roomSlug}`. * - "v2": new Next.js frontend at `/v2/check-in/{roomSlug}`. */ version?: DoxyVersion; /** * Pre-fills the patient's name in the check-in form. Forwarded as * `?username=...` and consumed by both V1 and V2 frontends. */ username?: string; /** * When true, instructs the doxy.me frontend to skip the manual check-in * steps (name entry, media gating, ready step) and check the patient * straight into the provider's waiting room. Forwarded as * `?autocheckin=true`. Pair with `username` for a fully headless flow. * * V1 (OG): supported today. * V2: supported as of doxyme-core MR !12913. */ autoCheckIn?: boolean; /** * Optional passcode for rooms the provider has gated with one. Forwarded * as `?passcode=...`. With `autoCheckIn` the passcode is auto-validated * server-side before check-in proceeds; if the URL passcode is wrong (or * absent for a passcode-required room) the patient sees the standard * passcode-entry UX as a graceful fallback. Provider passcode intent is * never bypassed. */ passcode?: string; /** * Caller-supplied external patient identifier — typically the patient's * record ID in the integrator's own system (e.g. an EHR). Forwarded as * `?pid=…`, available inside doxy.me via the `useAutoCheckIn` hook for * correlation, analytics, or session metadata. Opaque to doxy.me. Works on * both V1 (existing OG behaviour) and V2 (added in doxyme-core MR !12913). */ patientId?: string; /** * Override the doxy.me origin. Defaults to `https://doxy.me`. Useful for * staging / QA / ephemeral environments — e.g. `https://doxy-qa2.me` or * `https://core-.doxy-ephemeral.me`. */ baseUrl?: string; } /** * Creates and embeds a doxy.me iframe into a container element. * @param container - The DOM element or selector string where the iframe should be embedded * @param options - Configuration options for the iframe * @returns An object containing the iframe element and a destroy method */ export declare function embedDoxyMe(container: HTMLElement | string, options: DoxyMeOptions): DoxyMeEmbedResult; /** * Embeds the provider sign-in page. * @param container - The DOM element or selector string where the iframe should be embedded * @param options - Optional configuration. Set `version: "v2"` to embed the new V2 frontend. */ export declare function embedProviderSignIn(container: HTMLElement | string, options?: ProviderSignInOptions): DoxyMeEmbedResult; /** * Embeds a patient room (waiting room / check-in flow). * @param container - The DOM element or selector string where the iframe should be embedded * @param roomSlug - The room slug (supports nested slugs like `clinic/room` for V2) * @param options - Optional configuration. See `PatientRoomOptions` for `username`, `autoCheckIn`, `passcode`, `patientId`, `version`, `baseUrl`. */ export declare function embedPatientRoom(container: HTMLElement | string, roomSlug: string, options?: PatientRoomOptions): DoxyMeEmbedResult; declare const _default: { embedDoxyMe: typeof embedDoxyMe; embedProviderSignIn: typeof embedProviderSignIn; embedPatientRoom: typeof embedPatientRoom; }; export default _default; //# sourceMappingURL=index.d.ts.map