import { StreamingSyncRequest } from './streaming-sync-types.js'; import * as sync_status from '../../../db/crud/SyncStatus.js'; /** * An internal instruction emitted by the sync client in the core extension in response to the JS * SDK passing sync data into the extension. */ export type Instruction = { LogLine: LogLine; } | { UpdateSyncStatus: UpdateSyncStatus; } | { EstablishSyncStream: EstablishSyncStream; } | { FetchCredentials: FetchCredentials; } | { CloseSyncStream: { hide_disconnect: boolean; }; } | { FlushFileSystem: any; } | { DidCompleteSync: any; }; export interface LogLine { severity: 'DEBUG' | 'INFO' | 'WARNING'; line: string; } export interface EstablishSyncStream { request: StreamingSyncRequest; } export interface UpdateSyncStatus { status: CoreSyncStatus; } export interface CoreSyncStatus { connected: boolean; connecting: boolean; priority_status: SyncPriorityStatus[]; downloading: DownloadProgress | null; streams: CoreStreamSubscription[]; } export interface CoreStreamSubscription { progress: { total: number; downloaded: number; }; name: string; parameters: any; priority: number | null; active: boolean; is_default: boolean; has_explicit_subscription: boolean; expires_at: number | null; last_synced_at: number | null; } export interface SyncPriorityStatus { priority: number; last_synced_at: number | number; has_synced: boolean | null; } export interface DownloadProgress { buckets: Record; } export interface BucketProgress { priority: number; at_last: number; since_last: number; target_count: number; } export interface FetchCredentials { did_expire: boolean; } export declare function coreStatusToJs(status: CoreSyncStatus): sync_status.SyncStatusOptions;