Path: blob/master/src/packages/conat/hub/api/sync.ts
1712 views
import { authFirst } from "./util";12export interface Patch {3seq: number;4time: number;5mesg: {6time: number;7wall: number;8patch: string;9user_id: number;10is_snapshot?: boolean;11parents: number[];12version?: number;13};14}1516export interface HistoryInfo {17doctype: string;18init: { time: Date; size: number; error: string };19last_active: Date;20path: string;21project_id: string;22read_only: boolean;23save: {24state: string;25error: string;26hash: number;27time: number;28expected_hash: number;29};30string_id: string;31users: string[];32}3334export interface Sync {35history: (opts: {36account_id?: string;37project_id: string;38path: string;39}) => Promise<{ patches: Patch[] }>;40}4142export const sync = {43history: authFirst,44};454647