UNPKG

habit-export-center

Version:
74 lines (73 loc) 1.81 kB
import { NamespaceOption } from '../components/downloads/ExportsFilter'; export interface ExportEntry { id: string; task_id: string; state: ExtractionState; created: string; updated: string; namespace: string; name?: string; tags?: string[]; classes?: string[]; file_uri?: string; output?: { file_size?: number; filename?: string; format?: string; application?: { id: string; name: string; }; }; } export declare enum TableHeadEntries { NAMESPACE = "namespace", CREATED = "created", FORMAT = "format", SIZE = "size", STATE = "state", ACTION = "action" } export declare enum ExtractionState { SCHEDULED = "scheduled", STARTED = "started", COMPLETED = "completed", FAILED = "failed", EXPIRED = "expired" } export interface ExportResponse { id: string; state: ExtractionState; } export interface ExportRequest { namespace: string; output: { format: "csv" | "xlsx"; }; feedback?: { email_alerts?: string; }; tags?: string[]; } export interface ExportModalProps { isOpen: boolean; onOpenChange: (open: boolean) => void; title?: string; description?: string; downloadButtonLabel?: string; emptyStateMessage?: string; availableNamespaces?: NamespaceOption[]; emptyTable?: { title: string; subtitle: string; }; entryStateLabels?: Record<ExtractionState | "all", string>; tableHeaderLabels?: Record<TableHeadEntries, string>; container?: HTMLElement; userKey?: string; listExportsEndpoint?: string; downloadEndpoint?: string; refreshInterval?: number; onExportDownloaded?: (id: string) => void; onError?: (error: Error) => void; }