/** * Custom fetch function type for injecting auth headers, interceptors, etc. */ export type FetchFn = typeof globalThis.fetch; /** * A FHIR resource with a guaranteed `id` field. */ export type WithId = T & { id: string; }; /** * The `resourceType` discriminant of every base FHIR R5 resource. */ export type FhirResourceType = fhir5.FhirResource["resourceType"]; /** * The resource interface behind a `resourceType` literal — * `ResourceOfType<"Patient">` is `fhir5.Patient`. */ export type ResourceOfType = Extract; /** * Narrow a resource to one that actually carries an `id`. * * `id` is optional in FHIR — contained resources and the entries of a POST * transaction bundle have none — so `WithId` only holds once it is checked: * `BundleParser.getResourcesByType(bundle, "Patient").filter(hasId)`. */ export declare function hasId(resource: T | null | undefined): resource is WithId; /** * FHIR search parameters — values are serialized to query string. */ export type SearchParams = Record; /** * FHIR Bundle structure. */ export interface Bundle { resourceType: "Bundle"; type: "collection" | "searchset" | "transaction-response" | "transaction" | "batch" | "batch-response" | "document" | "message" | "history"; total?: number; link?: { relation: string; url: string; }[]; entry?: { resource?: T; fullUrl?: string; search?: { mode?: string; score?: number; }; request?: { method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; url: string; }; response?: { status: string; }; }[]; } //# sourceMappingURL=types.d.ts.map