From 985f9ebf3fcfdc6ab4bd6d188da75fe0227034c6 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 19 Sep 2026 15:52:12 +0100 Subject: [PATCH] Unformat --- .../src/services/types/ClientCursors.ts | 6 +-- .../types/CursorPositionFromClient.ts | 4 +- .../types/CursorPositionFromServer.ts | 2 +- .../src/services/types/CursorSpan.ts | 2 +- .../services/types/DocumentUpdateResponse.ts | 4 +- .../src/services/types/DocumentVersion.ts | 10 +---- .../types/DocumentVersionWithoutContent.ts | 9 +---- .../src/services/types/DocumentWithCursors.ts | 7 +--- .../src/services/types/EventBatch.ts | 2 +- .../src/services/types/EventRecord.ts | 5 +-- .../src/services/types/Manifest.ts | 2 +- .../services/types/ManifestUpdateResponse.ts | 4 +- .../src/services/types/PingResponse.ts | 39 +++++++++---------- .../src/services/types/PushContent.ts | 4 +- .../src/services/types/PushDocument.ts | 6 +-- .../src/services/types/PushManifest.ts | 6 +-- .../src/services/types/SerializedError.ts | 6 +-- .../src/services/types/VaultEvent.ts | 4 +- .../src/services/types/VaultSnapshot.ts | 6 +-- .../services/types/WebSocketClientMessage.ts | 4 +- .../src/services/types/WebSocketHandshake.ts | 6 +-- .../services/types/WebSocketServerMessage.ts | 4 +- 22 files changed, 40 insertions(+), 102 deletions(-) diff --git a/frontend/sync-client/src/services/types/ClientCursors.ts b/frontend/sync-client/src/services/types/ClientCursors.ts index e8c9b93d..bb629100 100644 --- a/frontend/sync-client/src/services/types/ClientCursors.ts +++ b/frontend/sync-client/src/services/types/ClientCursors.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/CursorPositionFromClient.ts b/frontend/sync-client/src/services/types/CursorPositionFromClient.ts index ee937f4e..60b48e5e 100644 --- a/frontend/sync-client/src/services/types/CursorPositionFromClient.ts +++ b/frontend/sync-client/src/services/types/CursorPositionFromClient.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/CursorPositionFromServer.ts b/frontend/sync-client/src/services/types/CursorPositionFromServer.ts index d9be7d82..c8444892 100644 --- a/frontend/sync-client/src/services/types/CursorPositionFromServer.ts +++ b/frontend/sync-client/src/services/types/CursorPositionFromServer.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/CursorSpan.ts b/frontend/sync-client/src/services/types/CursorSpan.ts index d2fc9614..d0bce6ea 100644 --- a/frontend/sync-client/src/services/types/CursorSpan.ts +++ b/frontend/sync-client/src/services/types/CursorSpan.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/DocumentUpdateResponse.ts b/frontend/sync-client/src/services/types/DocumentUpdateResponse.ts index 29f23cfb..572e2d9d 100644 --- a/frontend/sync-client/src/services/types/DocumentUpdateResponse.ts +++ b/frontend/sync-client/src/services/types/DocumentUpdateResponse.ts @@ -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; diff --git a/frontend/sync-client/src/services/types/DocumentVersion.ts b/frontend/sync-client/src/services/types/DocumentVersion.ts index a636e4fb..930b4899 100644 --- a/frontend/sync-client/src/services/types/DocumentVersion.ts +++ b/frontend/sync-client/src/services/types/DocumentVersion.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/DocumentVersionWithoutContent.ts b/frontend/sync-client/src/services/types/DocumentVersionWithoutContent.ts index d4e8165a..fac3b420 100644 --- a/frontend/sync-client/src/services/types/DocumentVersionWithoutContent.ts +++ b/frontend/sync-client/src/services/types/DocumentVersionWithoutContent.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/DocumentWithCursors.ts b/frontend/sync-client/src/services/types/DocumentWithCursors.ts index dcfe6e2d..38857a35 100644 --- a/frontend/sync-client/src/services/types/DocumentWithCursors.ts +++ b/frontend/sync-client/src/services/types/DocumentWithCursors.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/EventBatch.ts b/frontend/sync-client/src/services/types/EventBatch.ts index 11412274..f17f17ed 100644 --- a/frontend/sync-client/src/services/types/EventBatch.ts +++ b/frontend/sync-client/src/services/types/EventBatch.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/EventRecord.ts b/frontend/sync-client/src/services/types/EventRecord.ts index 2e50d69a..6a1bac34 100644 --- a/frontend/sync-client/src/services/types/EventRecord.ts +++ b/frontend/sync-client/src/services/types/EventRecord.ts @@ -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, }); diff --git a/frontend/sync-client/src/services/types/Manifest.ts b/frontend/sync-client/src/services/types/Manifest.ts index f32ce231..9572ad93 100644 --- a/frontend/sync-client/src/services/types/Manifest.ts +++ b/frontend/sync-client/src/services/types/Manifest.ts @@ -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 } +export type Manifest = { manifestId: number, entries: Record, }; diff --git a/frontend/sync-client/src/services/types/ManifestUpdateResponse.ts b/frontend/sync-client/src/services/types/ManifestUpdateResponse.ts index db3ea4a1..76ac2f7f 100644 --- a/frontend/sync-client/src/services/types/ManifestUpdateResponse.ts +++ b/frontend/sync-client/src/services/types/ManifestUpdateResponse.ts @@ -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; diff --git a/frontend/sync-client/src/services/types/PingResponse.ts b/frontend/sync-client/src/services/types/PingResponse.ts index f96520e9..c38845d2 100644 --- a/frontend/sync-client/src/services/types/PingResponse.ts +++ b/frontend/sync-client/src/services/types/PingResponse.ts @@ -3,23 +3,22 @@ /** * Response to a ping request. */ -export interface PingResponse { - /** - * Semantic version of the server. - */ - serverVersion: string; - /** - * Whether the client is authenticated based on the sent Authorization - * header. - */ - isAuthenticated: boolean; - /** - * List of file extensions that are allowed to be merged. - */ - mergeableFileExtensions: string[]; - /** - * API version ensuring backwards & forwards compatibility between the client - * and server. - */ - supportedApiVersion: number; -} +export type PingResponse = { +/** + * Semantic version of the server. + */ +serverVersion: string, +/** + * Whether the client is authenticated based on the sent Authorization + * header. + */ +isAuthenticated: boolean, +/** + * List of file extensions that are allowed to be merged. + */ +mergeableFileExtensions: Array, +/** + * API version ensuring backwards & forwards compatibility between the client + * and server. + */ +supportedApiVersion: number, }; diff --git a/frontend/sync-client/src/services/types/PushContent.ts b/frontend/sync-client/src/services/types/PushContent.ts index 3035b567..6a4820ac 100644 --- a/frontend/sync-client/src/services/types/PushContent.ts +++ b/frontend/sync-client/src/services/types/PushContent.ts @@ -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 }; diff --git a/frontend/sync-client/src/services/types/PushDocument.ts b/frontend/sync-client/src/services/types/PushDocument.ts index 8410b96e..a23b3bc4 100644 --- a/frontend/sync-client/src/services/types/PushDocument.ts +++ b/frontend/sync-client/src/services/types/PushDocument.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/PushManifest.ts b/frontend/sync-client/src/services/types/PushManifest.ts index ee5e68e4..743ad219 100644 --- a/frontend/sync-client/src/services/types/PushManifest.ts +++ b/frontend/sync-client/src/services/types/PushManifest.ts @@ -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; -} +export type PushManifest = { requestId: string, parentManifestId: number, entries: Record, }; diff --git a/frontend/sync-client/src/services/types/SerializedError.ts b/frontend/sync-client/src/services/types/SerializedError.ts index ec1c4503..5e3fa9b9 100644 --- a/frontend/sync-client/src/services/types/SerializedError.ts +++ b/frontend/sync-client/src/services/types/SerializedError.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/VaultEvent.ts b/frontend/sync-client/src/services/types/VaultEvent.ts index 426efd5b..a96d5a2d 100644 --- a/frontend/sync-client/src/services/types/VaultEvent.ts +++ b/frontend/sync-client/src/services/types/VaultEvent.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/VaultSnapshot.ts b/frontend/sync-client/src/services/types/VaultSnapshot.ts index 3c0ff9a7..95a192f9 100644 --- a/frontend/sync-client/src/services/types/VaultSnapshot.ts +++ b/frontend/sync-client/src/services/types/VaultSnapshot.ts @@ -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, }; diff --git a/frontend/sync-client/src/services/types/WebSocketClientMessage.ts b/frontend/sync-client/src/services/types/WebSocketClientMessage.ts index 9608f3af..5765a0d0 100644 --- a/frontend/sync-client/src/services/types/WebSocketClientMessage.ts +++ b/frontend/sync-client/src/services/types/WebSocketClientMessage.ts @@ -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; diff --git a/frontend/sync-client/src/services/types/WebSocketHandshake.ts b/frontend/sync-client/src/services/types/WebSocketHandshake.ts index a2910f49..85c2cf0d 100644 --- a/frontend/sync-client/src/services/types/WebSocketHandshake.ts +++ b/frontend/sync-client/src/services/types/WebSocketHandshake.ts @@ -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 WebSocketHandshake { - token: string; - deviceId: string; - lastSeenVaultUpdateId: number | null; -} +export type WebSocketHandshake = { token: string, deviceId: string, lastSeenVaultUpdateId: number | null, }; diff --git a/frontend/sync-client/src/services/types/WebSocketServerMessage.ts b/frontend/sync-client/src/services/types/WebSocketServerMessage.ts index d1d10a8f..2a7a7813 100644 --- a/frontend/sync-client/src/services/types/WebSocketServerMessage.ts +++ b/frontend/sync-client/src/services/types/WebSocketServerMessage.ts @@ -2,6 +2,4 @@ import type { CursorPositionFromServer } from "./CursorPositionFromServer"; import type { EventBatch } from "./EventBatch"; -export type WebSocketServerMessage = - | ({ type: "vaultEvents" } & EventBatch) - | ({ type: "cursorPositions" } & CursorPositionFromServer); +export type WebSocketServerMessage = { "type": "vaultEvents" } & EventBatch | { "type": "cursorPositions" } & CursorPositionFromServer;