Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


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?

optional suggestedMappings?: SuggestedMappings


AuthConfig

Auth configuration for imports (matches ScheduledIngest authConfig structure)

Properties

type

type: "none" | "api-key" | "bearer" | "basic"

apiKey?

optional apiKey?: string

apiKeyHeader?

optional apiKeyHeader?: string

bearerToken?

optional bearerToken?: string

username?

optional username?: string

password?

optional password?: string

customHeaders?

optional customHeaders?: 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?

optional similarityScore?: 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?

optional recordsPath?: string

pagination?

optional pagination?: object

enabled

enabled: boolean

type?

optional type?: "offset" | "cursor" | "page"

pageParam?

optional pageParam?: string

limitParam?

optional limitParam?: string

limitValue?

optional limitValue?: number

cursorParam?

optional cursorParam?: string

nextCursorPath?

optional nextCursorPath?: string

totalPath?

optional totalPath?: string

maxPages?

optional maxPages?: number


CreateScheduleConfig

Schedule creation configuration

Properties

enabled

enabled: boolean

sourceUrl

sourceUrl: string

name

name: string

scheduleType

scheduleType: "frequency" | "cron"

frequency?

optional frequency?: "hourly" | "daily" | "weekly" | "monthly"

cronExpression?

optional cronExpression?: string

schemaMode

schemaMode: "strict" | "additive" | "flexible"

authConfig?

optional authConfig?: AuthConfig

jsonApiConfig?

optional jsonApiConfig?: JsonApiScheduleConfig


ConfigureIngestRequest

Full request body for the configure-import endpoint

Properties

previewId

previewId: string

catalogId

catalogId: number | "new"

newCatalogName?

optional newCatalogName?: string

sheetMappings

sheetMappings: SheetMapping[]

fieldMappings

fieldMappings: FieldMapping[]

deduplicationStrategy

deduplicationStrategy: "update" | "skip" | "version"

geocodingEnabled

geocodingEnabled: boolean

createSchedule?

optional createSchedule?: CreateScheduleConfig

transforms?

optional transforms?: 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?

optional sourceUrl?: string

authConfig?

optional authConfig?: 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?

optional titlePath?: string | null

fieldMappingOverrides.descriptionPath?

optional descriptionPath?: string | null

fieldMappingOverrides.locationNamePath?

optional locationNamePath?: string | null

fieldMappingOverrides.timestampPath?

optional timestampPath?: string | null

fieldMappingOverrides.latitudePath?

optional latitudePath?: string | null

fieldMappingOverrides.longitudePath?

optional longitudePath?: string | null

fieldMappingOverrides.locationPath?

optional locationPath?: string | null

ingestTransforms?

optional ingestTransforms?: unknown[]

idStrategy?

optional idStrategy?: object

idStrategy.type?

optional type?: string

idStrategy.externalIdPath?

optional externalIdPath?: string | null

idStrategy.duplicateStrategy?

optional duplicateStrategy?: string | null

deduplicationConfig?

optional deduplicationConfig?: object

deduplicationConfig.strategy?

optional strategy?: string | null

geocodingEnabled?

optional geocodingEnabled?: boolean


PreviewSchemaUploadResponse

Response from POST /api/ingest/preview-schema/upload

Properties

sheets

sheets: SheetInfo[]

previewId

previewId: string

configSuggestions?

optional configSuggestions?: ConfigSuggestion[]


PreviewSchemaUrlRequest

Request body for POST /api/ingest/preview-schema/url

Properties

sourceUrl

sourceUrl: string

authConfig?

optional authConfig?: UrlAuthConfig

recordsPath?

optional recordsPath?: 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?

optional configSuggestions?: ConfigSuggestion[]

wasConverted?

optional wasConverted?: boolean

True if the response was converted from JSON to CSV

originalContentType?

optional originalContentType?: string

Original Content-Type from the server (before conversion)

recordCount?

optional recordCount?: number

Number of records extracted from JSON


IngestConfigureResponse

Response from POST /api/ingest/configure

Properties

ingestFileId

ingestFileId: number

scheduledIngestId?

optional scheduledIngestId?: 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 }[keyof FieldMapping]

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

Last updated on