web / lib/services/schema-detection/utilities/flat-mappings
lib/services/schema-detection/utilities/flat-mappings
Flat field mapping utilities.
Provides a convenience layer that converts the structured FieldMappingsResult (with confidence scores) to flat string paths.
Interfaces
FieldMappings
Flat field mappings detected or configured for a schema. Uses simple string paths instead of the structured FieldMappingsResult.
Properties
titlePath
titlePath:
string|null
descriptionPath
descriptionPath:
string|null
locationNamePath
locationNamePath:
string|null
timestampPath
timestampPath:
string|null
latitudePath
latitudePath:
string|null
longitudePath
longitudePath:
string|null
locationPath
locationPath:
string|null
Functions
toFlatMappings()
toFlatMappings(
result):FieldMappings
Convert a structured FieldMappingsResult to flat FieldMappings.
Parameters
result
Returns
detectFlatFieldMappings()
detectFlatFieldMappings(
fieldStats,language):FieldMappings
Detect field mappings and return flat paths.
Convenience wrapper that combines detectFieldMappings with toFlatMappings. For the location field, falls back to language-aware pattern detection when geo detection does not find a location field.
Parameters
fieldStats
Record<string, FieldStatistics>
Field statistics from schema builder
language
string
ISO 639-3 language code
Returns
Flat field mappings with string paths