web / lib/types/ingest-wizard
lib/types/ingest-wizard
Canonical domain types for the import wizard.
All import wizard types are defined here as the single source of truth. Other modules (API routes, UI components, services) import from this file instead of defining their own copies.
Interfaces
FieldMappingSuggestion
A field mapping suggestion with confidence information
Properties
path
path:
string|null
confidence
confidence:
number
confidenceLevel
confidenceLevel:
ConfidenceLevel
SuggestedMappings
Suggested field mappings from auto-detection
Properties
language
language:
LanguageResult
mappings
mappings:
object
titlePath
titlePath:
FieldMappingSuggestion
descriptionPath
descriptionPath:
FieldMappingSuggestion
locationNamePath
locationNamePath:
FieldMappingSuggestion
timestampPath
timestampPath:
FieldMappingSuggestion
latitudePath
latitudePath:
FieldMappingSuggestion
longitudePath
longitudePath:
FieldMappingSuggestion
locationPath
locationPath:
FieldMappingSuggestion
SheetInfo
Information about a single sheet from a preview file
Properties
index
index:
number
name
name:
string
rowCount
rowCount:
number
headers
headers:
string[]
sampleData
sampleData:
Record<string,unknown>[]
suggestedMappings?
optionalsuggestedMappings?:SuggestedMappings
AuthConfig
Auth configuration for imports (matches ScheduledIngest authConfig structure)
Properties
type
type:
"none"|"api-key"|"bearer"|"basic"
apiKey?
optionalapiKey?:string
apiKeyHeader?
optionalapiKeyHeader?:string
bearerToken?
optionalbearerToken?:string
username?
optionalusername?:string
password?
optionalpassword?:string
customHeaders?
optionalcustomHeaders?:string|Record<string,string>
SheetMapping
Mapping of a file sheet to a dataset
Properties
sheetIndex
sheetIndex:
number
datasetId
datasetId:
number|"new"
newDatasetName
newDatasetName:
string
similarityScore?
optionalsimilarityScore?:number|null
UI-only: similarity score for dataset matching (not sent to API)
FieldMapping
Mapping of file columns to event fields
Properties
sheetIndex
sheetIndex:
number
titleField
titleField:
string|null
descriptionField
descriptionField:
string|null
locationNameField
locationNameField:
string|null
dateField
dateField:
string|null
idField
idField:
string|null
idStrategy
idStrategy:
"external"|"computed"|"auto"|"hybrid"
locationField
locationField:
string|null
latitudeField
latitudeField:
string|null
longitudeField
longitudeField:
string|null
JsonApiScheduleConfig
JSON API configuration for scheduled ingests
Properties
recordsPath?
optionalrecordsPath?:string
pagination?
optionalpagination?:object
enabled
enabled:
boolean
type?
optionaltype?:"offset"|"cursor"|"page"
pageParam?
optionalpageParam?:string
limitParam?
optionallimitParam?:string
limitValue?
optionallimitValue?:number
cursorParam?
optionalcursorParam?:string
nextCursorPath?
optionalnextCursorPath?:string
totalPath?
optionaltotalPath?:string
maxPages?
optionalmaxPages?:number
CreateScheduleConfig
Schedule creation configuration
Properties
enabled
enabled:
boolean
sourceUrl
sourceUrl:
string
name
name:
string
scheduleType
scheduleType:
"frequency"|"cron"
frequency?
optionalfrequency?:"hourly"|"daily"|"weekly"|"monthly"
cronExpression?
optionalcronExpression?:string
schemaMode
schemaMode:
"strict"|"additive"|"flexible"
authConfig?
optionalauthConfig?:AuthConfig
jsonApiConfig?
optionaljsonApiConfig?:JsonApiScheduleConfig
ConfigureIngestRequest
Full request body for the configure-import endpoint
Properties
previewId
previewId:
string
catalogId
catalogId:
number|"new"
newCatalogName?
optionalnewCatalogName?:string
sheetMappings
sheetMappings:
SheetMapping[]
fieldMappings
fieldMappings:
FieldMapping[]
deduplicationStrategy
deduplicationStrategy:
"update"|"skip"|"version"
geocodingEnabled
geocodingEnabled:
boolean
createSchedule?
optionalcreateSchedule?:CreateScheduleConfig
transforms?
optionaltransforms?:object[]
sheetIndex
sheetIndex:
number
transforms
transforms:
IngestTransform[]
DatasetMappingEntry
Entry in the dataset mapping metadata for import jobs
Properties
sheetIdentifier
sheetIdentifier:
string
dataset
dataset:
number
skipIfMissing
skipIfMissing:
boolean
PreviewMetadata
Preview metadata persisted to disk during the wizard flow
Properties
previewId
previewId:
string
userId
userId:
number
originalName
originalName:
string
filePath
filePath:
string
mimeType
mimeType:
string
fileSize
fileSize:
number
createdAt
createdAt:
string
expiresAt
expiresAt:
string
sourceUrl?
optionalsourceUrl?:string
authConfig?
optionalauthConfig?:AuthConfig
ConfigSuggestion
Config from an existing dataset suggested for reuse
Properties
datasetId
datasetId:
number
datasetName
datasetName:
string
catalogId
catalogId:
number
catalogName
catalogName:
string
score
score:
number
matchedColumns
matchedColumns:
string[]
config
config:
object
fieldMappingOverrides
fieldMappingOverrides:
object
fieldMappingOverrides.titlePath?
optionaltitlePath?:string|null
fieldMappingOverrides.descriptionPath?
optionaldescriptionPath?:string|null
fieldMappingOverrides.locationNamePath?
optionallocationNamePath?:string|null
fieldMappingOverrides.timestampPath?
optionaltimestampPath?:string|null
fieldMappingOverrides.latitudePath?
optionallatitudePath?:string|null
fieldMappingOverrides.longitudePath?
optionallongitudePath?:string|null
fieldMappingOverrides.locationPath?
optionallocationPath?:string|null
ingestTransforms?
optionalingestTransforms?:unknown[]
idStrategy?
optionalidStrategy?:object
idStrategy.type?
optionaltype?:string
idStrategy.externalIdPath?
optionalexternalIdPath?:string|null
idStrategy.duplicateStrategy?
optionalduplicateStrategy?:string|null
deduplicationConfig?
optionaldeduplicationConfig?:object
deduplicationConfig.strategy?
optionalstrategy?:string|null
geocodingEnabled?
optionalgeocodingEnabled?:boolean
PreviewSchemaUploadResponse
Response from POST /api/ingest/preview-schema/upload
Properties
sheets
sheets:
SheetInfo[]
previewId
previewId:
string
configSuggestions?
optionalconfigSuggestions?:ConfigSuggestion[]
PreviewSchemaUrlRequest
Request body for POST /api/ingest/preview-schema/url
Properties
sourceUrl
sourceUrl:
string
authConfig?
optionalauthConfig?:UrlAuthConfig
recordsPath?
optionalrecordsPath?:string
Dot-path to records array for JSON APIs (e.g. “data.results”)
PreviewSchemaUrlResponse
Response from POST /api/ingest/preview-schema/url
Properties
sheets
sheets:
SheetInfo[]
previewId
previewId:
string
sourceUrl
sourceUrl:
string
fileName
fileName:
string
contentLength
contentLength:
number
contentType
contentType:
string
configSuggestions?
optionalconfigSuggestions?:ConfigSuggestion[]
wasConverted?
optionalwasConverted?:boolean
True if the response was converted from JSON to CSV
originalContentType?
optionaloriginalContentType?:string
Original Content-Type from the server (before conversion)
recordCount?
optionalrecordCount?:number
Number of records extracted from JSON
IngestConfigureResponse
Response from POST /api/ingest/configure
Properties
ingestFileId
ingestFileId:
number
scheduledIngestId?
optionalscheduledIngestId?:number
Type Aliases
ConfidenceLevel
ConfidenceLevel =
"high"|"medium"|"low"|"none"
Confidence level for a field mapping suggestion
UrlAuthConfig
UrlAuthConfig =
Omit<AuthConfig,"customHeaders">
Narrowed auth config for URL imports (UI does not expose customHeaders)
FieldMappingStringField
FieldMappingStringField =
{ \[K in keyof FieldMapping\]: \[FieldMapping\[K\]\] extends \[string \| null\] ? \[string \| null\] extends \[FieldMapping\[K\]\] ? K : never : never }[keyofFieldMapping]
Keys of FieldMapping that hold string | null column names (excludes sheetIndex and idStrategy).
Functions
isFieldMappingComplete()
isFieldMappingComplete(
mapping):boolean
Check if a field mapping has all required fields filled in.
Requires title, date, and either a location field or both lat/lng fields.
Parameters
mapping
FieldMapping | undefined
Returns
boolean
References
IngestTransform
Re-exports IngestTransform
LanguageResult
Re-exports LanguageResult