interface directedPair { destination: string; source: string; } interface ResponseInteraction { responseIdentifier: string; response: string | string[]; state?: string | null; } interface Calculate { calculate: () => string | string[]; } type float = number; type integer = number; type BaseType = 'boolean' | 'directedPair' | 'duration' | 'float' | 'integer' | 'string' | 'identifier' | 'pair' | 'point' | 'record'; type Multiple = string | string[][]; type Ordered = string | string[][]; type Cardinality = 'multiple' | 'ordered' | 'single' | 'record'; type QtiAreaMapping = { defaultValue: number; lowerBound?: number; upperBound?: number; areaMapEntries: QtiAreaMapEntry[]; }; type QtiAreaMapEntry = { shape: areaShape; coords: string; mappedValue: number; defaultValue: number; }; type QtiMapping = { defaultValue: number; lowerBound?: number; upperBound?: number; mapEntries: QtiMapEntry[]; }; type QtiMapEntry = { mapKey: string; mappedValue: number; caseSensitive: boolean; }; type areaShape = 'default' | 'circle' | 'rect' | 'ellipse' | 'poly'; interface VariableValue { identifier: string; value: Readonly; defaultValue?: T | null; type: 'outcome' | 'response' | 'context' | 'template'; } interface VariableDeclaration extends VariableValue { cardinality?: Cardinality; baseType?: BaseType; } /** * One `qti-interpolation-table-entry`. `sourceValue` is the *lower bound* of a * range rather than a value to match exactly, so the entries have to keep their * document order: the first whose bound the source value clears wins. */ interface InterpolationTableEntry { sourceValue: number; targetValue: number; /** Whether `sourceValue` itself is in range. Defaults to true, per the spec. */ includeBoundary: boolean; } interface OutcomeVariable extends VariableDeclaration { interpolationTable?: InterpolationTableEntry[]; /** * A qti-match-table's entries. Its targets are not necessarily numeric — a * match table may map onto identifiers or strings — so they stay as written. */ matchTable?: Map; externalScored?: 'human' | 'externalMachine' | null; } interface ResponseVariable extends VariableDeclaration { candidateResponse?: string | string[] | null; mapping?: QtiMapping; areaMapping?: QtiAreaMapping; correctResponse?: string | string[] | null; /** * For `record` cardinality: the base type of each field, by field identifier, as declared on the * `qti-value` elements of the correct response. A record declaration has no `base-type` of its * own, so this is the only place the field types are known once the value is stored. */ fieldBaseTypes?: Record; } interface TemplateVariable extends VariableDeclaration { type: 'template'; mathVariable?: boolean; paramVariable?: boolean; } interface ItemContext { identifier?: string; href?: string; variables?: ReadonlyArray>; /** * Optional per-interaction opaque state, keyed by responseIdentifier. * Used for interactions that support state save/restore (e.g. PCI). */ state?: Record; /** The item is shown for reading only. Interactions follow it; see `qti-assessment-item`'s `readonly`. */ readonly?: boolean; /** The item is locked, for example after it was submitted. Interactions follow it; see `qti-assessment-item`'s `disabled`. */ disabled?: boolean; /** * Whether the interactions in the item are valid right now (a required answer is given, a limit is * respected). Published by the item whenever it checks, so a reader never has to ask the item. * Unset until the item has checked once. */ valid?: boolean; } declare const itemContextVariables: VariableDeclaration[]; export { type BaseType as B, type Calculate as C, type InterpolationTableEntry as I, type Multiple as M, type Ordered as O, type QtiAreaMapEntry as Q, type ResponseInteraction as R, type TemplateVariable as T, type VariableDeclaration as V, type Cardinality as a, type ItemContext as b, type OutcomeVariable as c, type QtiAreaMapping as d, type QtiMapEntry as e, type QtiMapping as f, type ResponseVariable as g, type VariableValue as h, type areaShape as i, type directedPair as j, type float as k, type integer as l, itemContextVariables as m };