Unformat
This commit is contained in:
parent
4b623c36d9
commit
985f9ebf3f
22 changed files with 40 additions and 102 deletions
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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, };
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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, };
|
||||
|
|
|
|||
|
|
@ -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, };
|
||||
|
|
|
|||
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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, });
|
||||
|
|
|
|||
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<string>,
|
||||
/**
|
||||
* API version ensuring backwards & forwards compatibility between the client
|
||||
* and server.
|
||||
*/
|
||||
supportedApiVersion: number, };
|
||||
|
|
|
|||
|
|
@ -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> };
|
||||
|
|
|
|||
|
|
@ -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, };
|
||||
|
|
|
|||
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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, };
|
||||
|
|
|
|||
|
|
@ -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>, };
|
||||
|
|
|
|||
|
|
@ -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
Loading…
Reference in a new issue