Something went wrong. Try again.
A simple DAV sync application / cli
Something went wrong. Try again.
TypeScript
12345678910111213141516171819202122232425262728293031323334353637383940// Types shared between node (src/) and the setup page (web/). Pure types: nothing// here may import anything that only exists in node.
import type { Action, FolderConfig } from "./sync/types.ts";
/** What the page gets to see of a folder: everything (its password is in the keychain, not here). */export type PublicFolder = FolderConfig;
export type Outcome = { status: "done" | "held" | "skipped" | "failed"; detail: string | null };
export type SyncEvent = | { type: "phase"; folder: string; phase: "scanning" | "detecting" | "planning" | "executing" } | { type: "planned"; folder: string; run: number; actions: number } | { type: "action"; folder: string; run: number; index: number; action: Action; outcome: Outcome } | { type: "finished"; folder: string; run: number | null; status: string; summary: Record<string, number>; error: string | null };
export interface RunRecord { id: number; folder: string; started: number; finished: number | null; status: "running" | "ok" | "partial" | "failed" | "planned" | "skipped"; summary: Record<string, number> | null; error: string | null;}
export interface ActionRecord { id: number; run: number; seq: number; type: Action["type"]; side: string | null; path: string; target: string | null; reason: string; status: "planned" | "done" | "held" | "skipped" | "failed"; detail: string | null; at: number;}