/** Input resolved by an authenticated application BFF, never directly by a browser. */ export type TerminologyValueSetInput = Readonly<{ /** Optional per-request override. Dedicated BFFs normally configure this once on the client. */ sector?: string; claim: string; fhirVersion?: 'R4'; language?: string; jurisdiction?: string; /** Exact code-system version URI. Omission asks the service for its latest/default release. */ version?: string; offset?: number; count?: number; }>; export type TerminologyValueSetCodeListInput = Omit; export type TerminologyValueSetOption = Readonly<{ system: string; code: string; display: string; localizedDisplay: string; resolvedLanguage: string; fallbackUsed: boolean; }>; export type TerminologyValueSetDocument = Readonly<{ jsonapi: Readonly<{ version: '1.1'; }>; data: readonly Readonly<{ type: 'terminology-option'; id: string; attributes: TerminologyValueSetOption; }>[]; meta: Readonly<{ count: number; total: number; offset: number; language: string; resourceType: string; field: string; claim: string; valueSet: Readonly<{ id: string; url: string; version: string; system: string; }>; terminologyVersions?: Readonly>; }>; }>; export type TerminologyCacheEntry = Readonly<{ document: TerminologyValueSetDocument; storedAt: number; }>; export interface TerminologyValueSetCache { get(key: string): TerminologyCacheEntry | undefined | Promise; set(key: string, entry: TerminologyCacheEntry): void | Promise; } /** Stable key usable by in-memory, GCS, Firestore or PostgreSQL cache adapters. */ export declare function terminologyValueSetCacheKey(input: TerminologyValueSetInput): string; /** Process-local cache suitable for warm BFF instances and immutable startup snapshots. */ export declare class MemoryTerminologyValueSetCache implements TerminologyValueSetCache { #private; get(key: string): TerminologyCacheEntry | undefined; set(key: string, entry: TerminologyCacheEntry): void; prime(input: TerminologyValueSetInput, document: TerminologyValueSetDocument, storedAt?: number): void; } export type TerminologyValueSetResult = Readonly<{ document: TerminologyValueSetDocument; cacheStatus: 'remote' | 'fresh-cache' | 'stale-cache' | 'english-fallback-cache'; }>; /** Frontend-ready code list. Coding system and code remain separate FHIR Coding values. */ export type TerminologyValueSetCodeList = Readonly<{ codingSystem: string; codeToDisplay: Readonly>; requestedLanguage: string; resolvedLanguage: string; fallbackUsed: boolean; valueSet: TerminologyValueSetDocument['meta']['valueSet']; terminologyVersions?: Readonly>; }>; /** Server-only client for a product-neutral terminology service. */ export declare class TerminologyServiceClient { #private; constructor(options: Readonly<{ baseUrl: string; /** Default sector for a dedicated human-health or animal-health BFF. */ sector?: string; serviceToken?: string; fetchImplementation?: typeof fetch; cache?: TerminologyValueSetCache; cacheTtlMs?: number; staleIfError?: boolean; now?: () => number; }>); /** Resolves the ValueSet bound by the service to one canonical flat claim. */ expandValueSetForClaim(input: TerminologyValueSetInput): Promise; /** Resolves every page and returns the simple code-to-display object expected by forms. */ getValueSetCodeListForClaim(input: TerminologyValueSetCodeListInput): Promise; }