This commit is contained in:
Andras Schmelczer 2026-09-19 15:52:12 +01:00
commit 985f9ebf3f
22 changed files with 40 additions and 102 deletions

View file

@ -1,8 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { DocumentWithCursors } from "./DocumentWithCursors"; import type { DocumentWithCursors } from "./DocumentWithCursors";
export interface ClientCursors { export type ClientCursors = { userName: string, deviceId: string, documentsWithCursors: Array<DocumentWithCursors>, };
userName: string;
deviceId: string;
documentsWithCursors: DocumentWithCursors[];
}

View file

@ -1,6 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { DocumentWithCursors } from "./DocumentWithCursors"; import type { DocumentWithCursors } from "./DocumentWithCursors";
export interface CursorPositionFromClient { export type CursorPositionFromClient = { documentsWithCursors: Array<DocumentWithCursors>, };
documentsWithCursors: DocumentWithCursors[];
}

View file

@ -1,4 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ClientCursors } from "./ClientCursors"; import type { ClientCursors } from "./ClientCursors";
export interface CursorPositionFromServer { clients: ClientCursors[] } export type CursorPositionFromServer = { clients: Array<ClientCursors>, };

View file

@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface CursorSpan { start: number; end: number } export type CursorSpan = { start: number, end: number, };

View file

@ -5,6 +5,4 @@ import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutCont
/** /**
* Response to an update document request. * Response to an update document request.
*/ */
export type DocumentUpdateResponse = export type DocumentUpdateResponse = { "type": "Accepted" } & DocumentVersionWithoutContent | { "type": "StaleBase" } & DocumentVersion;
| ({ type: "Accepted" } & DocumentVersionWithoutContent)
| ({ type: "StaleBase" } & DocumentVersion);

View file

@ -1,11 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface DocumentVersion { export type DocumentVersion = { contentBase64: string, vaultUpdateId: number, documentId: string, updatedDate: string, userId: string, deviceId: string, contentSize: number, };
contentBase64: string;
vaultUpdateId: number;
documentId: string;
updatedDate: string;
userId: string;
deviceId: string;
contentSize: number;
}

View file

@ -1,10 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface DocumentVersionWithoutContent { export type DocumentVersionWithoutContent = { vaultUpdateId: number, documentId: string, updatedDate: string, userId: string, deviceId: string, contentSize: number, };
vaultUpdateId: number;
documentId: string;
updatedDate: string;
userId: string;
deviceId: string;
contentSize: number;
}

View file

@ -1,9 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CursorSpan } from "./CursorSpan"; import type { CursorSpan } from "./CursorSpan";
export interface DocumentWithCursors { export type DocumentWithCursors = { vault_update_id: number | null, document_id: string, relative_path: string, cursors: Array<CursorSpan>, };
vault_update_id: number | null;
document_id: string;
relative_path: string;
cursors: CursorSpan[];
}

View file

@ -1,4 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { EventRecord } from "./EventRecord"; import type { EventRecord } from "./EventRecord";
export interface EventBatch { headEventId: number; events: EventRecord[] } export type EventBatch = { headEventId: number, events: Array<EventRecord>, };

View file

@ -2,7 +2,4 @@
import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent";
import type { Manifest } from "./Manifest"; import type { Manifest } from "./Manifest";
export type EventRecord = { eventId: number; requestId: string } & ( export type EventRecord = { eventId: number, requestId: string, } & ({ "type": "content", document: DocumentVersionWithoutContent, } | { "type": "manifest", manifest: Manifest, });
| { type: "content"; document: DocumentVersionWithoutContent }
| { type: "manifest"; manifest: Manifest }
);

View file

@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface Manifest { manifestId: number; entries: Record<string, string> } export type Manifest = { manifestId: number, entries: Record<string, string>, };

View file

@ -1,6 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Manifest } from "./Manifest"; import type { Manifest } from "./Manifest";
export type ManifestUpdateResponse = export type ManifestUpdateResponse = { "type": "Accepted" } & Manifest | { "type": "StaleBase" } & Manifest;
| ({ type: "Accepted" } & Manifest)
| ({ type: "StaleBase" } & Manifest);

View file

@ -3,23 +3,22 @@
/** /**
* Response to a ping request. * Response to a ping request.
*/ */
export interface PingResponse { export type PingResponse = {
/** /**
* Semantic version of the server. * Semantic version of the server.
*/ */
serverVersion: string; serverVersion: string,
/** /**
* Whether the client is authenticated based on the sent Authorization * Whether the client is authenticated based on the sent Authorization
* header. * header.
*/ */
isAuthenticated: boolean; isAuthenticated: boolean,
/** /**
* List of file extensions that are allowed to be merged. * List of file extensions that are allowed to be merged.
*/ */
mergeableFileExtensions: string[]; mergeableFileExtensions: Array<string>,
/** /**
* API version ensuring backwards & forwards compatibility between the client * API version ensuring backwards & forwards compatibility between the client
* and server. * and server.
*/ */
supportedApiVersion: number; supportedApiVersion: number, };
}

View file

@ -1,5 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type PushContent = export type PushContent = { "type": "Snapshot", "value": string } | { "type": "Diff", "value": Array<number | string> };
| { type: "Snapshot"; value: string }
| { type: "Diff"; value: (number | string)[] };

View file

@ -1,8 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PushContent } from "./PushContent"; import type { PushContent } from "./PushContent";
export interface PushDocument { export type PushDocument = { requestId: string, parentVersionId: number | null, content: PushContent, };
requestId: string;
parentVersionId: number | null;
content: PushContent;
}

View file

@ -1,7 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface PushManifest { export type PushManifest = { requestId: string, parentManifestId: number, entries: Record<string, string>, };
requestId: string;
parentManifestId: number;
entries: Record<string, string>;
}

View file

@ -1,7 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface SerializedError { export type SerializedError = { errorType: string, message: string, causes: Array<string>, };
errorType: string;
message: string;
causes: string[];
}

View file

@ -2,6 +2,4 @@
import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent";
import type { Manifest } from "./Manifest"; import type { Manifest } from "./Manifest";
export type VaultEvent = export type VaultEvent = { "type": "content", document: DocumentVersionWithoutContent, } | { "type": "manifest", manifest: Manifest, };
| { type: "content"; document: DocumentVersionWithoutContent }
| { type: "manifest"; manifest: Manifest };

View file

@ -2,8 +2,4 @@
import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent";
import type { Manifest } from "./Manifest"; import type { Manifest } from "./Manifest";
export interface VaultSnapshot { export type VaultSnapshot = { headEventId: number, manifest: Manifest, documents: Array<DocumentVersionWithoutContent>, };
headEventId: number;
manifest: Manifest;
documents: DocumentVersionWithoutContent[];
}

View file

@ -2,6 +2,4 @@
import type { CursorPositionFromClient } from "./CursorPositionFromClient"; import type { CursorPositionFromClient } from "./CursorPositionFromClient";
import type { WebSocketHandshake } from "./WebSocketHandshake"; import type { WebSocketHandshake } from "./WebSocketHandshake";
export type WebSocketClientMessage = export type WebSocketClientMessage = { "type": "handshake" } & WebSocketHandshake | { "type": "cursorPositions" } & CursorPositionFromClient;
| ({ type: "handshake" } & WebSocketHandshake)
| ({ type: "cursorPositions" } & CursorPositionFromClient);

Some files were not shown because too many files have changed in this diff Show more