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

web


web / lib/hooks/use-import-progress-query

lib/hooks/use-import-progress-query

React Query hook for polling import file progress.

Replaces hand-rolled setInterval polling in step-processing.tsx. Automatically stops polling when the import reaches a terminal state.

Interfaces

ProgressApiResponse

Properties

type

type: string

id

id: number

status

status: "completed" | "failed" | "processing" | "pending" | "parsing"

originalName

originalName: string

catalogId

catalogId: number | null

datasetsCount

datasetsCount: number

datasetsProcessed

datasetsProcessed: number

overallProgress

overallProgress: number

estimatedCompletionTime

estimatedCompletionTime: string | null

jobs

jobs: object[]

id

id: string | number

datasetId

datasetId: string | number

datasetName?

optional datasetName: string

currentStage

currentStage: string

overallProgress

overallProgress: number

stages?

optional stages: object[]

results?

optional results: object

results.totalEvents?

optional totalEvents: number

errorLog?

optional errorLog: string | null

completedAt?

optional completedAt: string | null

Variables

importProgressQueryKeys

const importProgressQueryKeys: object

Type Declaration

all

all: readonly ["import-progress"]

byFile()

byFile: (importFileId) => readonly ["import-progress", string]

Parameters
importFileId

string | number

Returns

readonly ["import-progress", string]

Functions

useImportProgressQuery()

useImportProgressQuery(importFileId): UseQueryResult<ProgressApiResponse, Error>

Parameters

importFileId

string | number | null

Returns

UseQueryResult<ProgressApiResponse, Error>

Last updated on