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.
import type { DocumentWithCursors } from "./DocumentWithCursors";
export interface ClientCursors {
userName: string;
deviceId: string;
documentsWithCursors: DocumentWithCursors[];
}
export type ClientCursors = { userName: string, deviceId: string, documentsWithCursors: Array<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.
import type { DocumentWithCursors } from "./DocumentWithCursors";
export interface CursorPositionFromClient {
documentsWithCursors: DocumentWithCursors[];
}
export type CursorPositionFromClient = { documentsWithCursors: Array<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.
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.
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.
*/
export type DocumentUpdateResponse =
| ({ type: "Accepted" } & DocumentVersionWithoutContent)
| ({ type: "StaleBase" } & DocumentVersion);
export type DocumentUpdateResponse = { "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.
export interface DocumentVersion {
contentBase64: string;
vaultUpdateId: number;
documentId: string;
updatedDate: string;
userId: string;
deviceId: string;
contentSize: number;
}
export type DocumentVersion = { 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.
export interface DocumentVersionWithoutContent {
vaultUpdateId: number;
documentId: string;
updatedDate: string;
userId: string;
deviceId: string;
contentSize: number;
}
export type DocumentVersionWithoutContent = { 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.
import type { CursorSpan } from "./CursorSpan";
export interface DocumentWithCursors {
vault_update_id: number | null;
document_id: string;
relative_path: string;
cursors: CursorSpan[];
}
export type DocumentWithCursors = { vault_update_id: number | null, document_id: string, relative_path: string, cursors: Array<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.
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 { Manifest } from "./Manifest";
export type EventRecord = { eventId: number; requestId: string } & (
| { type: "content"; document: DocumentVersionWithoutContent }
| { type: "manifest"; manifest: Manifest }
);
export type EventRecord = { eventId: number, requestId: string, } & ({ "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.
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.
import type { Manifest } from "./Manifest";
export type ManifestUpdateResponse =
| ({ type: "Accepted" } & Manifest)
| ({ type: "StaleBase" } & Manifest);
export type ManifestUpdateResponse = { "type": "Accepted" } & Manifest | { "type": "StaleBase" } & Manifest;

View file

@ -3,23 +3,22 @@
/**
* Response to a ping request.
*/
export interface PingResponse {
export type PingResponse = {
/**
* Semantic version of the server.
*/
serverVersion: string;
serverVersion: string,
/**
* Whether the client is authenticated based on the sent Authorization
* header.
*/
isAuthenticated: boolean;
isAuthenticated: boolean,
/**
* List of file extensions that are allowed to be merged.
*/
mergeableFileExtensions: string[];
mergeableFileExtensions: Array<string>,
/**
* API version ensuring backwards & forwards compatibility between the client
* 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.
export type PushContent =
| { type: "Snapshot"; value: string }
| { type: "Diff"; value: (number | string)[] };
export type PushContent = { "type": "Snapshot", "value": string } | { "type": "Diff", "value": Array<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.
import type { PushContent } from "./PushContent";
export interface PushDocument {
requestId: string;
parentVersionId: number | null;
content: PushContent;
}
export type PushDocument = { 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.
export interface PushManifest {
requestId: string;
parentManifestId: number;
entries: Record<string, string>;
}
export type PushManifest = { 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.
export interface SerializedError {
errorType: string;
message: string;
causes: string[];
}
export type SerializedError = { errorType: string, message: string, causes: Array<string>, };

View file

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

View file

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

View file

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

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