/** * Auth57 API types. * Mirrors the OpenAPI 3.1 spec at https://auth57labs.com/openapi.json * * Keep these hand-curated (not auto-generated) so the public TypeScript * surface stays clean and readable. Regenerate with `openapi-typescript` * only if the spec drifts far from this file. */ export type StateCode = 'AL' | 'AK' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'DC' | 'FL' | 'GA' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'WA' | 'WV' | 'WI' | 'WY'; export type Program = 'medicaid_ffs' | 'medicaid_mco' | 'medicare_advantage' | 'medicare_traditional' | 'dual_eligible' | 'part_d' | 'chip'; export type PaType = 'none' | 'partial' | 'conditional' | 'full'; /** * Input to `paLookup`. Exactly one of `drug` or `service` must be provided. */ export type PaLookupInput = { state: StateCode; program: Program; } & ({ drug: string; service?: undefined; } | { service: string; drug?: undefined; }); export interface CompareInput { /** 1–10 states to compare. */ states: StateCode[]; program: Program; /** Exactly one of drug or service. */ drug?: string; service?: string; } export interface NextStep { step: number; title: string; items: string[]; } export interface PaRule { pa_required: boolean; pa_type: PaType; confidence: number; source_url: string; last_verified: string; notes: string | null; gold_card_exempt?: boolean; gold_card_notes?: string | null; federal_override?: boolean | null; } export interface PaLookupResponse { state: StateCode; program: Program; query: { drug_class: string; } | { service_category: string; }; result: PaRule; next_steps: NextStep[]; served_from: 'static' | 'edge'; timestamp: string; } export interface CompareStateResult { state_abbr: StateCode; pa_required: boolean; pa_type: PaType; confidence: number; notes: string | null; source_url: string; last_verified: string; } export interface CompareResponse { states: StateCode[]; program: Program; query: { drug_class: string; } | { service_category: string; }; summary: { total: number; require_pa: number; no_pa: number; divergence: boolean; divergence_summary: string; }; results: CompareStateResult[]; served_from: 'edge'; timestamp: string; } export interface StateListEntry { abbr: StateCode; name: string; total_rules: number; pa_required_pct: number; non_expansion: boolean; ffs_dominant: boolean; wiser: boolean; } export interface StatesListResponse { states: StateListEntry[]; } export interface StateSummaryResponse { state: StateCode; name: string; flags: { non_expansion: boolean; ffs_dominant: boolean; wiser: boolean; }; summary: { total_rules: number; pa_required_count: number; pa_required_pct: number | null; programs_covered: Program[]; pa_type_breakdown: Partial>; federal_protected_classes_with_pa: string[]; last_verified: string | null; }; services: Record; drugs: Record; } export interface LookupOption { /** Canonical code, e.g. "glp1_weight_loss" or "advanced_imaging". */ val: string; /** Human-readable label, e.g. "GLP-1 — Weight Loss". */ label: string; } export interface LookupOptionsResponse { drugs: LookupOption[]; services: LookupOption[]; } export interface ManifestResponse { service: 'Auth57'; version: string; dataset: { verified_rules: number; service_rules: number; drug_rules: number; last_verified: string | null; }; coverage: { states: StateCode[]; states_count: number; programs: Program[]; service_categories: string[]; drug_classes: string[]; }; mandates: { cms_0057_f: { effective: string; status: 'final' | 'proposed'; }; cms_0062_p: { effective: string; status: 'final' | 'proposed'; }; }; endpoints: Record; docs: { openapi: string; reference: string; sdk: string; }; } export interface Auth57ApiError { error: string; /** Populated on HTTP 429. */ limit?: number; window?: string; retry_after_seconds?: number; signup_url?: string; } export declare class Auth57Error extends Error { readonly status: number; readonly body: Auth57ApiError; constructor(status: number, body: Auth57ApiError); } //# sourceMappingURL=types.d.ts.map