import type { ValidationIssue } from '../../types'; import type { StructureDefinition } from '../structure-definition-types'; import type { StructureDefinitionLoader } from '../structure-definition-loader'; import type { TerminologyResolutionConfig } from '../../validators/valueset-validator'; export interface StructuralValidationContext { resource: any; resourceType: string; profileUrl?: string; fhirVersion: 'R4' | 'R5' | 'R6'; structureDef: StructureDefinition; getValueAtPath: (resource: any, path: string) => any; contextQuestionnaire?: any; settings?: any; } export declare class StructuralExecutor { private cardinalityValidator; private typeValidator; private elementRulesValidator; private complexTypeValidator; private mustSupportValidator; private referenceFormatValidator; private referenceTargetValidator; private narrativeValidator; private bundleValidator; private attachmentValidator; private questionnaireValidator; private canonicalResourceInvariantValidator; private structureDefinitionValidator; private compliesWithValidator; private stringSecurityValidator; private sdLoader; private walkerTypeIndexCaches; private walkerSnapshotIndexCaches; constructor(sdLoader: StructureDefinitionLoader); configureTerminologyResolution(config: Partial): void; /** * Validate structural aspects of a resource */ validate(resourceOrContext: any, context?: StructuralValidationContext | any): Promise; private normalizeValidationInput; private configureMustSupportSeverity; private loadStructureDefinition; private createSnapshotValidationDeps; /** * Validate required fields only (for validateStructure method) */ validateRequiredFields(resource: any, structureDef: StructureDefinition, profileUrl: string, getValueAtPath: (resource: any, path: string) => any, fhirVersion?: 'R4' | 'R5' | 'R6'): Promise; /** * Detect unknown elements (properties not defined in StructureDefinition). * * Walks the resource against the snapshot's full path index, descending * through BackboneElement children AND through complex datatypes * (HumanName, Address, CodeableConcept, …) by loading each type's SD * lazily via the SDLoader. Nested resources (Bundle.entry.resource, * contained[]) are still validated separately by engine recursion. */ private detectUnknownElements; private getWalkerSnapshotIndex; /** * Public entry point for id format + empty array checks. * Called from both validate() and validateStructure() paths. * * @param resource Resource under validation * @param contextQuestionnaire Optional supporting Questionnaire that a * QuestionnaireResponse references via `QR.questionnaire`. Passed * through to the questionnaire-validator so SDC extensions * (minValue/maxValue/…) can be evaluated against the answer items. */ validateResourceIdAndArrays(resource: any, contextQuestionnaire?: any, options?: { warnOnUnresolvedQuestionnaireReference?: boolean; }, fhirVersion?: 'R4' | 'R5' | 'R6'): ValidationIssue[]; /** * Public entry point for the compliesWithProfile cross-profile check. * Called from both validate() and validateStructure() so cw-* fixtures * pick up the same diagnostics regardless of routing. */ validateCompliesWith(resource: any, fhirVersion?: 'R4' | 'R5' | 'R6'): Promise; } //# sourceMappingURL=structural-executor.d.ts.map