import { Optionality } from "@glion/utils"; import type { ProfileStore } from "../profiles"; /** Raw shape exported by generated datatype modules. */ export type DatatypeModule = Readonly<{ id: string; version: string; kind: string; title?: string; components: readonly ComponentProfile[]; }>; /** A component of a composite datatype, one row of its HL7v2 component table. */ export type ComponentProfile = Readonly<{ sequence: number; name: string; /** Absent when the standard records none, as before v2.5. */ optionality?: Optionality; /** Absent on a withdrawn component the standard gives no datatype. */ datatypeId?: string; table?: string; maxLength?: number; }>; /** * Compiled datatype definition. * Returned by `profiles.datatypes.load()`. */ export type DatatypeDefinition = Readonly<{ id: string; version: string; kind: string; title?: string; /** O(1) lookup of component profile by sequence number. */ componentsBySequence: ReadonlyMap; /** The sequences of the components whose optionality is `R`. */ requiredSequences: ReadonlySet; }>; /** The loader of datatype profiles. */ export declare const datatypes: ProfileStore; //# sourceMappingURL=datatypes.d.ts.map