From f7beb31d8f210379974388bf4e59b3b70e9e670b Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Fri, 8 May 2026 21:36:13 +0100 Subject: [PATCH] split: regenerated TS API type bindings Auto-generated TS types regenerated from Rust ts-rs derives, mirrored into frontend/sync-client/src/services/types/ and frontend/history-ui/src/lib/types/. Adds ListVaultsResponse, VaultHistoryResponse, VaultInfo and updates several existing types; removes DeleteDocumentVersion and UpdateDocumentVersion. --- .../history-ui/src/lib/types/ClientCursors.ts | 8 ++++++ .../src/lib/types/CreateDocumentVersion.ts} | 8 +++--- .../src/lib/types/CursorPositionFromClient.ts | 6 +++++ .../src/lib/types/CursorPositionFromServer.ts | 4 +++ .../src/lib/types/CursorSpan.ts} | 4 +-- .../src/lib/types/DocumentUpdateResponse.ts | 10 ++++++++ .../src/lib/types/DocumentVersion.ts | 12 +++++++++ .../types/DocumentVersionWithoutContent.ts | 16 ++++++++++++ .../src/lib/types/DocumentWithCursors.ts | 9 +++++++ .../lib/types/FetchLatestDocumentsResponse.ts | 13 ++++++++++ .../src/lib/types/ListVaultsResponse.ts | 11 ++++++++ .../history-ui/src/lib/types/PingResponse.ts | 25 +++++++++++++++++++ .../src/lib/types/SerializedError.ts | 7 ++++++ .../lib/types/UpdateTextDocumentVersion.ts | 7 ++++++ .../src/lib/types/VaultHistoryResponse.ts | 10 ++++++++ .../history-ui/src/lib/types/VaultInfo.ts | 10 ++++++++ .../src/lib/types/WebSocketClientMessage.ts | 7 ++++++ .../src/lib/types/WebSocketHandshake.ts | 7 ++++++ .../src/lib/types/WebSocketServerMessage.ts | 7 ++++++ .../src/lib/types/WebSocketVaultUpdate.ts | 4 +++ .../services/types/CreateDocumentVersion.ts | 8 +----- .../services/types/DocumentUpdateResponse.ts | 2 +- .../types/DocumentVersionWithoutContent.ts | 4 +++ .../src/services/types/DocumentWithCursors.ts | 6 ++--- .../types/FetchLatestDocumentsResponse.ts | 4 +-- .../src/services/types/ListVaultsResponse.ts | 11 ++++++++ .../src/services/types/PingResponse.ts | 20 +++++++-------- .../types/UpdateTextDocumentVersion.ts | 2 +- .../services/types/VaultHistoryResponse.ts | 10 ++++++++ .../src/services/types/VaultInfo.ts | 10 ++++++++ .../services/types/WebSocketVaultUpdate.ts | 3 +-- 31 files changed, 232 insertions(+), 33 deletions(-) create mode 100644 frontend/history-ui/src/lib/types/ClientCursors.ts rename frontend/{sync-client/src/services/types/UpdateDocumentVersion.ts => history-ui/src/lib/types/CreateDocumentVersion.ts} (55%) create mode 100644 frontend/history-ui/src/lib/types/CursorPositionFromClient.ts create mode 100644 frontend/history-ui/src/lib/types/CursorPositionFromServer.ts rename frontend/{sync-client/src/services/types/DeleteDocumentVersion.ts => history-ui/src/lib/types/CursorSpan.ts} (61%) create mode 100644 frontend/history-ui/src/lib/types/DocumentUpdateResponse.ts create mode 100644 frontend/history-ui/src/lib/types/DocumentVersion.ts create mode 100644 frontend/history-ui/src/lib/types/DocumentVersionWithoutContent.ts create mode 100644 frontend/history-ui/src/lib/types/DocumentWithCursors.ts create mode 100644 frontend/history-ui/src/lib/types/FetchLatestDocumentsResponse.ts create mode 100644 frontend/history-ui/src/lib/types/ListVaultsResponse.ts create mode 100644 frontend/history-ui/src/lib/types/PingResponse.ts create mode 100644 frontend/history-ui/src/lib/types/SerializedError.ts create mode 100644 frontend/history-ui/src/lib/types/UpdateTextDocumentVersion.ts create mode 100644 frontend/history-ui/src/lib/types/VaultHistoryResponse.ts create mode 100644 frontend/history-ui/src/lib/types/VaultInfo.ts create mode 100644 frontend/history-ui/src/lib/types/WebSocketClientMessage.ts create mode 100644 frontend/history-ui/src/lib/types/WebSocketHandshake.ts create mode 100644 frontend/history-ui/src/lib/types/WebSocketServerMessage.ts create mode 100644 frontend/history-ui/src/lib/types/WebSocketVaultUpdate.ts create mode 100644 frontend/sync-client/src/services/types/ListVaultsResponse.ts create mode 100644 frontend/sync-client/src/services/types/VaultHistoryResponse.ts create mode 100644 frontend/sync-client/src/services/types/VaultInfo.ts diff --git a/frontend/history-ui/src/lib/types/ClientCursors.ts b/frontend/history-ui/src/lib/types/ClientCursors.ts new file mode 100644 index 00000000..14298431 --- /dev/null +++ b/frontend/history-ui/src/lib/types/ClientCursors.ts @@ -0,0 +1,8 @@ +// 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 type ClientCursors = { + userName: string; + deviceId: string; + documentsWithCursors: Array; +}; diff --git a/frontend/sync-client/src/services/types/UpdateDocumentVersion.ts b/frontend/history-ui/src/lib/types/CreateDocumentVersion.ts similarity index 55% rename from frontend/sync-client/src/services/types/UpdateDocumentVersion.ts rename to frontend/history-ui/src/lib/types/CreateDocumentVersion.ts index 4e57a297..389d8e88 100644 --- a/frontend/sync-client/src/services/types/UpdateDocumentVersion.ts +++ b/frontend/history-ui/src/lib/types/CreateDocumentVersion.ts @@ -1,7 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export interface UpdateDocumentVersion { - parent_version_id: bigint; +export type CreateDocumentVersion = { relative_path: string; - content: number[]; -} + last_seen_vault_update_id: number; + content: Array; +}; diff --git a/frontend/history-ui/src/lib/types/CursorPositionFromClient.ts b/frontend/history-ui/src/lib/types/CursorPositionFromClient.ts new file mode 100644 index 00000000..5846843e --- /dev/null +++ b/frontend/history-ui/src/lib/types/CursorPositionFromClient.ts @@ -0,0 +1,6 @@ +// 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 type CursorPositionFromClient = { + documentsWithCursors: Array; +}; diff --git a/frontend/history-ui/src/lib/types/CursorPositionFromServer.ts b/frontend/history-ui/src/lib/types/CursorPositionFromServer.ts new file mode 100644 index 00000000..3a72c706 --- /dev/null +++ b/frontend/history-ui/src/lib/types/CursorPositionFromServer.ts @@ -0,0 +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 type CursorPositionFromServer = { clients: Array }; diff --git a/frontend/sync-client/src/services/types/DeleteDocumentVersion.ts b/frontend/history-ui/src/lib/types/CursorSpan.ts similarity index 61% rename from frontend/sync-client/src/services/types/DeleteDocumentVersion.ts rename to frontend/history-ui/src/lib/types/CursorSpan.ts index 99ecc9e7..916019ce 100644 --- a/frontend/sync-client/src/services/types/DeleteDocumentVersion.ts +++ b/frontend/history-ui/src/lib/types/CursorSpan.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 interface DeleteDocumentVersion { - relativePath: string; -} +export type CursorSpan = { start: number; end: number }; diff --git a/frontend/history-ui/src/lib/types/DocumentUpdateResponse.ts b/frontend/history-ui/src/lib/types/DocumentUpdateResponse.ts new file mode 100644 index 00000000..dd7eadda --- /dev/null +++ b/frontend/history-ui/src/lib/types/DocumentUpdateResponse.ts @@ -0,0 +1,10 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { DocumentVersion } from "./DocumentVersion"; +import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; + +/** + * Response to a create/update document request. + */ +export type DocumentUpdateResponse = + | ({ type: "FastForwardUpdate" } & DocumentVersionWithoutContent) + | ({ type: "MergingUpdate" } & DocumentVersion); diff --git a/frontend/history-ui/src/lib/types/DocumentVersion.ts b/frontend/history-ui/src/lib/types/DocumentVersion.ts new file mode 100644 index 00000000..50a6c591 --- /dev/null +++ b/frontend/history-ui/src/lib/types/DocumentVersion.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type DocumentVersion = { + vaultUpdateId: number; + documentId: string; + relativePath: string; + updatedDate: string; + contentBase64: string; + isDeleted: boolean; + userId: string; + deviceId: string; +}; diff --git a/frontend/history-ui/src/lib/types/DocumentVersionWithoutContent.ts b/frontend/history-ui/src/lib/types/DocumentVersionWithoutContent.ts new file mode 100644 index 00000000..e3ed828a --- /dev/null +++ b/frontend/history-ui/src/lib/types/DocumentVersionWithoutContent.ts @@ -0,0 +1,16 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type DocumentVersionWithoutContent = { + vaultUpdateId: number; + documentId: string; + relativePath: string; + updatedDate: string; + isDeleted: boolean; + userId: string; + deviceId: string; + contentSize: number; + /** + * True iff this is the first version of the document + */ + isNewFile: boolean; +}; diff --git a/frontend/history-ui/src/lib/types/DocumentWithCursors.ts b/frontend/history-ui/src/lib/types/DocumentWithCursors.ts new file mode 100644 index 00000000..ca6a2155 --- /dev/null +++ b/frontend/history-ui/src/lib/types/DocumentWithCursors.ts @@ -0,0 +1,9 @@ +// 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 type DocumentWithCursors = { + vaultUpdateId: number | null; + documentId: string; + relativePath: string; + cursors: Array; +}; diff --git a/frontend/history-ui/src/lib/types/FetchLatestDocumentsResponse.ts b/frontend/history-ui/src/lib/types/FetchLatestDocumentsResponse.ts new file mode 100644 index 00000000..141c2565 --- /dev/null +++ b/frontend/history-ui/src/lib/types/FetchLatestDocumentsResponse.ts @@ -0,0 +1,13 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; + +/** + * Response to a fetch latest documents request. + */ +export type FetchLatestDocumentsResponse = { + latestDocuments: Array; + /** + * The update ID of the latest document in the response. + */ + lastUpdateId: bigint; +}; diff --git a/frontend/history-ui/src/lib/types/ListVaultsResponse.ts b/frontend/history-ui/src/lib/types/ListVaultsResponse.ts new file mode 100644 index 00000000..604ad958 --- /dev/null +++ b/frontend/history-ui/src/lib/types/ListVaultsResponse.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { VaultInfo } from "./VaultInfo"; + +/** + * Response to listing vaults accessible to the authenticated user. + */ +export type ListVaultsResponse = { + vaults: Array; + hasMore: boolean; + userName: string; +}; diff --git a/frontend/history-ui/src/lib/types/PingResponse.ts b/frontend/history-ui/src/lib/types/PingResponse.ts new file mode 100644 index 00000000..7e5ac4f8 --- /dev/null +++ b/frontend/history-ui/src/lib/types/PingResponse.ts @@ -0,0 +1,25 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * Response to a ping request. + */ +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/history-ui/src/lib/types/SerializedError.ts b/frontend/history-ui/src/lib/types/SerializedError.ts new file mode 100644 index 00000000..354305f6 --- /dev/null +++ b/frontend/history-ui/src/lib/types/SerializedError.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type SerializedError = { + errorType: string; + message: string; + causes: Array; +}; diff --git a/frontend/history-ui/src/lib/types/UpdateTextDocumentVersion.ts b/frontend/history-ui/src/lib/types/UpdateTextDocumentVersion.ts new file mode 100644 index 00000000..5a1978eb --- /dev/null +++ b/frontend/history-ui/src/lib/types/UpdateTextDocumentVersion.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type UpdateTextDocumentVersion = { + parentVersionId: number; + relativePath: string | null; + content: Array; +}; diff --git a/frontend/history-ui/src/lib/types/VaultHistoryResponse.ts b/frontend/history-ui/src/lib/types/VaultHistoryResponse.ts new file mode 100644 index 00000000..e69366f0 --- /dev/null +++ b/frontend/history-ui/src/lib/types/VaultHistoryResponse.ts @@ -0,0 +1,10 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; + +/** + * Response to a vault history request (paginated). + */ +export type VaultHistoryResponse = { + versions: Array; + hasMore: boolean; +}; diff --git a/frontend/history-ui/src/lib/types/VaultInfo.ts b/frontend/history-ui/src/lib/types/VaultInfo.ts new file mode 100644 index 00000000..3f630ae9 --- /dev/null +++ b/frontend/history-ui/src/lib/types/VaultInfo.ts @@ -0,0 +1,10 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * Summary of a single vault returned by the list-vaults endpoint. + */ +export type VaultInfo = { + name: string; + documentCount: number; + createdAt: string | null; +}; diff --git a/frontend/history-ui/src/lib/types/WebSocketClientMessage.ts b/frontend/history-ui/src/lib/types/WebSocketClientMessage.ts new file mode 100644 index 00000000..9608f3af --- /dev/null +++ b/frontend/history-ui/src/lib/types/WebSocketClientMessage.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { CursorPositionFromClient } from "./CursorPositionFromClient"; +import type { WebSocketHandshake } from "./WebSocketHandshake"; + +export type WebSocketClientMessage = + | ({ type: "handshake" } & WebSocketHandshake) + | ({ type: "cursorPositions" } & CursorPositionFromClient); diff --git a/frontend/history-ui/src/lib/types/WebSocketHandshake.ts b/frontend/history-ui/src/lib/types/WebSocketHandshake.ts new file mode 100644 index 00000000..8e51a121 --- /dev/null +++ b/frontend/history-ui/src/lib/types/WebSocketHandshake.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type WebSocketHandshake = { + token: string; + deviceId: string; + lastSeenVaultUpdateId: number | null; +}; diff --git a/frontend/history-ui/src/lib/types/WebSocketServerMessage.ts b/frontend/history-ui/src/lib/types/WebSocketServerMessage.ts new file mode 100644 index 00000000..fd250b7b --- /dev/null +++ b/frontend/history-ui/src/lib/types/WebSocketServerMessage.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { CursorPositionFromServer } from "./CursorPositionFromServer"; +import type { WebSocketVaultUpdate } from "./WebSocketVaultUpdate"; + +export type WebSocketServerMessage = + | ({ type: "vaultUpdate" } & WebSocketVaultUpdate) + | ({ type: "cursorPositions" } & CursorPositionFromServer); diff --git a/frontend/history-ui/src/lib/types/WebSocketVaultUpdate.ts b/frontend/history-ui/src/lib/types/WebSocketVaultUpdate.ts new file mode 100644 index 00000000..94d70c0a --- /dev/null +++ b/frontend/history-ui/src/lib/types/WebSocketVaultUpdate.ts @@ -0,0 +1,4 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; + +export type WebSocketVaultUpdate = { document: DocumentVersionWithoutContent }; diff --git a/frontend/sync-client/src/services/types/CreateDocumentVersion.ts b/frontend/sync-client/src/services/types/CreateDocumentVersion.ts index ed921f18..2d83cd99 100644 --- a/frontend/sync-client/src/services/types/CreateDocumentVersion.ts +++ b/frontend/sync-client/src/services/types/CreateDocumentVersion.ts @@ -1,13 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. export interface CreateDocumentVersion { - /** - * The client can decide the document id (if it wishes to) in order - * to help with syncing. If the client does not provide a document id, - * the server will generate one. If the client provides a document id - * it must not already exist in the database. - */ - document_id: string | null; relative_path: string; + last_seen_vault_update_id: number; content: number[]; } diff --git a/frontend/sync-client/src/services/types/DocumentUpdateResponse.ts b/frontend/sync-client/src/services/types/DocumentUpdateResponse.ts index 7fd06c7a..dd7eadda 100644 --- a/frontend/sync-client/src/services/types/DocumentUpdateResponse.ts +++ b/frontend/sync-client/src/services/types/DocumentUpdateResponse.ts @@ -3,7 +3,7 @@ import type { DocumentVersion } from "./DocumentVersion"; import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; /** - * Response to an update document request. + * Response to a create/update document request. */ export type DocumentUpdateResponse = | ({ type: "FastForwardUpdate" } & DocumentVersionWithoutContent) diff --git a/frontend/sync-client/src/services/types/DocumentVersionWithoutContent.ts b/frontend/sync-client/src/services/types/DocumentVersionWithoutContent.ts index 4b24e7c5..662b41e5 100644 --- a/frontend/sync-client/src/services/types/DocumentVersionWithoutContent.ts +++ b/frontend/sync-client/src/services/types/DocumentVersionWithoutContent.ts @@ -9,4 +9,8 @@ export interface DocumentVersionWithoutContent { userId: string; deviceId: string; contentSize: number; + /** + * True iff this is the first version of the document + */ + isNewFile: boolean; } diff --git a/frontend/sync-client/src/services/types/DocumentWithCursors.ts b/frontend/sync-client/src/services/types/DocumentWithCursors.ts index dcfe6e2d..8ed59067 100644 --- a/frontend/sync-client/src/services/types/DocumentWithCursors.ts +++ b/frontend/sync-client/src/services/types/DocumentWithCursors.ts @@ -2,8 +2,8 @@ import type { CursorSpan } from "./CursorSpan"; export interface DocumentWithCursors { - vault_update_id: number | null; - document_id: string; - relative_path: string; + vaultUpdateId: number | null; + documentId: string; + relativePath: string; cursors: CursorSpan[]; } diff --git a/frontend/sync-client/src/services/types/FetchLatestDocumentsResponse.ts b/frontend/sync-client/src/services/types/FetchLatestDocumentsResponse.ts index 160c9279..315d701a 100644 --- a/frontend/sync-client/src/services/types/FetchLatestDocumentsResponse.ts +++ b/frontend/sync-client/src/services/types/FetchLatestDocumentsResponse.ts @@ -7,7 +7,7 @@ import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutCont export interface FetchLatestDocumentsResponse { latestDocuments: DocumentVersionWithoutContent[]; /** - * The update ID of the latest document in the response. - */ + * The update ID of the latest document in the response. + */ lastUpdateId: bigint; } diff --git a/frontend/sync-client/src/services/types/ListVaultsResponse.ts b/frontend/sync-client/src/services/types/ListVaultsResponse.ts new file mode 100644 index 00000000..babad2d5 --- /dev/null +++ b/frontend/sync-client/src/services/types/ListVaultsResponse.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { VaultInfo } from "./VaultInfo"; + +/** + * Response to listing vaults accessible to the authenticated user. + */ +export interface ListVaultsResponse { + vaults: VaultInfo[]; + hasMore: boolean; + userName: string; +} diff --git a/frontend/sync-client/src/services/types/PingResponse.ts b/frontend/sync-client/src/services/types/PingResponse.ts index 6db66354..f96520e9 100644 --- a/frontend/sync-client/src/services/types/PingResponse.ts +++ b/frontend/sync-client/src/services/types/PingResponse.ts @@ -5,21 +5,21 @@ */ export interface PingResponse { /** - * Semantic version of the server. - */ + * Semantic version of the server. + */ serverVersion: string; /** - * Whether the client is authenticated based on the sent Authorization - * header. - */ + * Whether the client is authenticated based on the sent Authorization + * header. + */ isAuthenticated: boolean; /** - * List of file extensions that are allowed to be merged. - */ + * List of file extensions that are allowed to be merged. + */ mergeableFileExtensions: string[]; /** - * API version ensuring backwards & forwards compatibility between the client - * and server. - */ + * API version ensuring backwards & forwards compatibility between the client + * and server. + */ supportedApiVersion: number; } diff --git a/frontend/sync-client/src/services/types/UpdateTextDocumentVersion.ts b/frontend/sync-client/src/services/types/UpdateTextDocumentVersion.ts index 46f36bd0..988e3b2f 100644 --- a/frontend/sync-client/src/services/types/UpdateTextDocumentVersion.ts +++ b/frontend/sync-client/src/services/types/UpdateTextDocumentVersion.ts @@ -2,6 +2,6 @@ export interface UpdateTextDocumentVersion { parentVersionId: number; - relativePath: string; + relativePath: string | null; content: (number | string)[]; } diff --git a/frontend/sync-client/src/services/types/VaultHistoryResponse.ts b/frontend/sync-client/src/services/types/VaultHistoryResponse.ts new file mode 100644 index 00000000..35531010 --- /dev/null +++ b/frontend/sync-client/src/services/types/VaultHistoryResponse.ts @@ -0,0 +1,10 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; + +/** + * Response to a vault history request (paginated). + */ +export interface VaultHistoryResponse { + versions: DocumentVersionWithoutContent[]; + hasMore: boolean; +} diff --git a/frontend/sync-client/src/services/types/VaultInfo.ts b/frontend/sync-client/src/services/types/VaultInfo.ts new file mode 100644 index 00000000..20d6811c --- /dev/null +++ b/frontend/sync-client/src/services/types/VaultInfo.ts @@ -0,0 +1,10 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * Summary of a single vault returned by the list-vaults endpoint. + */ +export interface VaultInfo { + name: string; + documentCount: number; + createdAt: string | null; +} diff --git a/frontend/sync-client/src/services/types/WebSocketVaultUpdate.ts b/frontend/sync-client/src/services/types/WebSocketVaultUpdate.ts index f1ea0f80..b4a942c8 100644 --- a/frontend/sync-client/src/services/types/WebSocketVaultUpdate.ts +++ b/frontend/sync-client/src/services/types/WebSocketVaultUpdate.ts @@ -2,6 +2,5 @@ import type { DocumentVersionWithoutContent } from "./DocumentVersionWithoutContent"; export interface WebSocketVaultUpdate { - documents: DocumentVersionWithoutContent[]; - isInitialSync: boolean; + document: DocumentVersionWithoutContent; }