Update types
This commit is contained in:
parent
22cafda53f
commit
4657314b72
10 changed files with 678 additions and 655 deletions
|
|
@ -1,655 +0,0 @@
|
|||
/**
|
||||
* This file was auto-generated by openapi-typescript.
|
||||
* Do not make direct changes to the file.
|
||||
*/
|
||||
|
||||
export interface paths {
|
||||
"/vaults/{vault_id}/documents": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: {
|
||||
parameters: {
|
||||
query?: {
|
||||
since_update_id?: number | null;
|
||||
};
|
||||
header?: never;
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["FetchLatestDocumentsResponse"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
put?: never;
|
||||
post: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"multipart/form-data": components["schemas"]["CreateDocumentVersionMultipart"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersionWithoutContent"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/json": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["CreateDocumentVersion"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersionWithoutContent"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/{document_id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersion"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"multipart/form-data": components["schemas"]["UpdateDocumentVersionMultipart"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentUpdateResponse"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post?: never;
|
||||
delete: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["DeleteDocumentVersion"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersionWithoutContent"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/{document_id}/json": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["UpdateDocumentVersion"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentUpdateResponse"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/{document_id}/versions/{version_id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
vault_update_id: number;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersion"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/{document_id}/versions/{version_id}/content": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
vault_update_id: number;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description byte stream */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/octet-stream": unknown;
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/ping": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: {
|
||||
authorization?: string;
|
||||
};
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["PingResponse"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
}
|
||||
export type webhooks = Record<string, never>;
|
||||
export interface components {
|
||||
schemas: {
|
||||
Array_of_uint8: number[];
|
||||
CreateDocumentPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
CreateDocumentVersion: {
|
||||
contentBase64: string;
|
||||
deviceId?: string | null;
|
||||
/**
|
||||
* Format: uuid
|
||||
* @description 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.
|
||||
*/
|
||||
documentId?: string | null;
|
||||
relativePath: string;
|
||||
};
|
||||
CreateDocumentVersionMultipart: {
|
||||
content: components["schemas"]["Array_of_uint8"];
|
||||
device_id?: string | null;
|
||||
/** Format: uuid */
|
||||
document_id?: string | null;
|
||||
relative_path: string;
|
||||
};
|
||||
DeleteDocumentPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
DeleteDocumentVersion: {
|
||||
deviceId?: string | null;
|
||||
relativePath: string;
|
||||
};
|
||||
/** @description Response to an update document request. */
|
||||
DocumentUpdateResponse:
|
||||
| {
|
||||
/** Format: uint64 */
|
||||
contentSize: number;
|
||||
deviceId: string;
|
||||
/** Format: uuid */
|
||||
documentId: string;
|
||||
isDeleted: boolean;
|
||||
relativePath: string;
|
||||
/** @enum {string} */
|
||||
type: "FastForwardUpdate";
|
||||
/** Format: date-time */
|
||||
updatedDate: string;
|
||||
userId: string;
|
||||
/** Format: int64 */
|
||||
vaultUpdateId: number;
|
||||
}
|
||||
| {
|
||||
contentBase64: string;
|
||||
deviceId: string;
|
||||
/** Format: uuid */
|
||||
documentId: string;
|
||||
isDeleted: boolean;
|
||||
relativePath: string;
|
||||
/** @enum {string} */
|
||||
type: "MergingUpdate";
|
||||
/** Format: date-time */
|
||||
updatedDate: string;
|
||||
userId: string;
|
||||
/** Format: int64 */
|
||||
vaultUpdateId: number;
|
||||
};
|
||||
DocumentVersion: {
|
||||
contentBase64: string;
|
||||
deviceId: string;
|
||||
/** Format: uuid */
|
||||
documentId: string;
|
||||
isDeleted: boolean;
|
||||
relativePath: string;
|
||||
/** Format: date-time */
|
||||
updatedDate: string;
|
||||
userId: string;
|
||||
/** Format: int64 */
|
||||
vaultUpdateId: number;
|
||||
};
|
||||
DocumentVersionWithoutContent: {
|
||||
/** Format: uint64 */
|
||||
contentSize: number;
|
||||
deviceId: string;
|
||||
/** Format: uuid */
|
||||
documentId: string;
|
||||
isDeleted: boolean;
|
||||
relativePath: string;
|
||||
/** Format: date-time */
|
||||
updatedDate: string;
|
||||
userId: string;
|
||||
/** Format: int64 */
|
||||
vaultUpdateId: number;
|
||||
};
|
||||
FetchDocumentVersionContentPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
/** Format: int64 */
|
||||
vault_update_id: number;
|
||||
};
|
||||
FetchDocumentVersionPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
/** Format: int64 */
|
||||
vault_update_id: number;
|
||||
};
|
||||
FetchLatestDocumentVersionPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
FetchLatestDocumentsPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
/** @description Response to a fetch latest documents request. */
|
||||
FetchLatestDocumentsResponse: {
|
||||
/**
|
||||
* Format: int64
|
||||
* @description The update ID of the latest document in the response.
|
||||
*/
|
||||
lastUpdateId: number;
|
||||
latestDocuments: components["schemas"]["DocumentVersionWithoutContent"][];
|
||||
};
|
||||
PingPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
/** @description Response to a ping request. */
|
||||
PingResponse: {
|
||||
/** @description Whether the client is authenticated based on the sent Authorization header. */
|
||||
isAuthenticated: boolean;
|
||||
/** @description Semantic version of the server. */
|
||||
serverVersion: string;
|
||||
};
|
||||
QueryParams: {
|
||||
/** Format: int64 */
|
||||
since_update_id?: number | null;
|
||||
};
|
||||
SerializedError: {
|
||||
causes: string[];
|
||||
message: string;
|
||||
};
|
||||
UpdateDocumentPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
UpdateDocumentVersion: {
|
||||
contentBase64: string;
|
||||
deviceId?: string | null;
|
||||
/** Format: int64 */
|
||||
parentVersionId: number;
|
||||
relativePath: string;
|
||||
};
|
||||
UpdateDocumentVersionMultipart: {
|
||||
content: components["schemas"]["Array_of_uint8"];
|
||||
deviceId?: string | null;
|
||||
/** Format: int64 */
|
||||
parentVersionId: number;
|
||||
relativePath: string;
|
||||
};
|
||||
WebsocketPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
};
|
||||
responses: never;
|
||||
parameters: never;
|
||||
requestBodies: never;
|
||||
headers: never;
|
||||
pathItems: never;
|
||||
}
|
||||
export type $defs = Record<string, never>;
|
||||
export type operations = Record<string, never>;
|
||||
3
frontend/sync-client/src/services/types/ClientCursors.ts
Normal file
3
frontend/sync-client/src/services/types/ClientCursors.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ClientCursors = { deviceId: string, cursors: { [key in string]?: Array<number> }, };
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type CursorPositionFromClient = { documentToCursors: { [key in string]?: Array<number> }, };
|
||||
|
|
@ -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<ClientCursors>, };
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
// 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, };
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
// 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;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
// 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, };
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
// 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;
|
||||
|
|
@ -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 = { documents: Array<DocumentVersionWithoutContent>, isInitialSync: boolean, };
|
||||
648
frontend/sync-client/src/services/types/http-api.ts
Normal file
648
frontend/sync-client/src/services/types/http-api.ts
Normal file
|
|
@ -0,0 +1,648 @@
|
|||
/**
|
||||
* This file was auto-generated by openapi-typescript.
|
||||
* Do not make direct changes to the file.
|
||||
*/
|
||||
|
||||
export interface paths {
|
||||
"/vaults/{vault_id}/documents": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: {
|
||||
parameters: {
|
||||
query?: {
|
||||
since_update_id?: number | null;
|
||||
};
|
||||
header?: never;
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["FetchLatestDocumentsResponse"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
put?: never;
|
||||
post: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"multipart/form-data": components["schemas"]["CreateDocumentVersionMultipart"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersionWithoutContent"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/json": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["CreateDocumentVersion"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersionWithoutContent"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/{document_id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersion"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"multipart/form-data": components["schemas"]["UpdateDocumentVersionMultipart"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentUpdateResponse"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post?: never;
|
||||
delete: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["DeleteDocumentVersion"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersionWithoutContent"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/{document_id}/json": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header: {
|
||||
"device-id": string;
|
||||
};
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["UpdateDocumentVersion"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentUpdateResponse"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/{document_id}/versions/{version_id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
vault_update_id: number;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["DocumentVersion"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/documents/{document_id}/versions/{version_id}/content": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
vault_update_id: number;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description byte stream */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/octet-stream": unknown;
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/vaults/{vault_id}/ping": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: {
|
||||
authorization?: string;
|
||||
};
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["PingResponse"];
|
||||
};
|
||||
};
|
||||
default: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
/** @example {
|
||||
* "causes": [],
|
||||
* "message": "An error has occurred"
|
||||
* } */
|
||||
"application/json": components["schemas"]["SerializedError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
}
|
||||
export type webhooks = Record<string, never>;
|
||||
export interface components {
|
||||
schemas: {
|
||||
Array_of_uint8: number[];
|
||||
CreateDocumentPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
CreateDocumentVersion: {
|
||||
contentBase64: string;
|
||||
/**
|
||||
* Format: uuid
|
||||
* @description 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.
|
||||
*/
|
||||
documentId?: string | null;
|
||||
relativePath: string;
|
||||
};
|
||||
CreateDocumentVersionMultipart: {
|
||||
content: components["schemas"]["Array_of_uint8"];
|
||||
/** Format: uuid */
|
||||
document_id?: string | null;
|
||||
relative_path: string;
|
||||
};
|
||||
DeleteDocumentPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
DeleteDocumentVersion: {
|
||||
relativePath: string;
|
||||
};
|
||||
/** @description Response to an update document request. */
|
||||
DocumentUpdateResponse: {
|
||||
/** Format: uint64 */
|
||||
contentSize: number;
|
||||
deviceId: string;
|
||||
/** Format: uuid */
|
||||
documentId: string;
|
||||
isDeleted: boolean;
|
||||
relativePath: string;
|
||||
/** @enum {string} */
|
||||
type: "FastForwardUpdate";
|
||||
/** Format: date-time */
|
||||
updatedDate: string;
|
||||
userId: string;
|
||||
/** Format: int64 */
|
||||
vaultUpdateId: number;
|
||||
} | {
|
||||
contentBase64: string;
|
||||
deviceId: string;
|
||||
/** Format: uuid */
|
||||
documentId: string;
|
||||
isDeleted: boolean;
|
||||
relativePath: string;
|
||||
/** @enum {string} */
|
||||
type: "MergingUpdate";
|
||||
/** Format: date-time */
|
||||
updatedDate: string;
|
||||
userId: string;
|
||||
/** Format: int64 */
|
||||
vaultUpdateId: number;
|
||||
};
|
||||
DocumentVersion: {
|
||||
contentBase64: string;
|
||||
deviceId: string;
|
||||
/** Format: uuid */
|
||||
documentId: string;
|
||||
isDeleted: boolean;
|
||||
relativePath: string;
|
||||
/** Format: date-time */
|
||||
updatedDate: string;
|
||||
userId: string;
|
||||
/** Format: int64 */
|
||||
vaultUpdateId: number;
|
||||
};
|
||||
DocumentVersionWithoutContent: {
|
||||
/** Format: uint64 */
|
||||
contentSize: number;
|
||||
deviceId: string;
|
||||
/** Format: uuid */
|
||||
documentId: string;
|
||||
isDeleted: boolean;
|
||||
relativePath: string;
|
||||
/** Format: date-time */
|
||||
updatedDate: string;
|
||||
userId: string;
|
||||
/** Format: int64 */
|
||||
vaultUpdateId: number;
|
||||
};
|
||||
FetchDocumentVersionContentPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
/** Format: int64 */
|
||||
vault_update_id: number;
|
||||
};
|
||||
FetchDocumentVersionPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
/** Format: int64 */
|
||||
vault_update_id: number;
|
||||
};
|
||||
FetchLatestDocumentVersionPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
FetchLatestDocumentsPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
/** @description Response to a fetch latest documents request. */
|
||||
FetchLatestDocumentsResponse: {
|
||||
/**
|
||||
* Format: int64
|
||||
* @description The update ID of the latest document in the response.
|
||||
*/
|
||||
lastUpdateId: number;
|
||||
latestDocuments: components["schemas"]["DocumentVersionWithoutContent"][];
|
||||
};
|
||||
PingPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
/** @description Response to a ping request. */
|
||||
PingResponse: {
|
||||
/** @description Whether the client is authenticated based on the sent Authorization header. */
|
||||
isAuthenticated: boolean;
|
||||
/** @description Semantic version of the server. */
|
||||
serverVersion: string;
|
||||
};
|
||||
QueryParams: {
|
||||
/** Format: int64 */
|
||||
since_update_id?: number | null;
|
||||
};
|
||||
SerializedError: {
|
||||
causes: string[];
|
||||
message: string;
|
||||
};
|
||||
UpdateDocumentPathParams: {
|
||||
/** Format: uuid */
|
||||
document_id: string;
|
||||
vault_id: string;
|
||||
};
|
||||
UpdateDocumentVersion: {
|
||||
contentBase64: string;
|
||||
/** Format: int64 */
|
||||
parentVersionId: number;
|
||||
relativePath: string;
|
||||
};
|
||||
UpdateDocumentVersionMultipart: {
|
||||
content: components["schemas"]["Array_of_uint8"];
|
||||
/** Format: int64 */
|
||||
parentVersionId: number;
|
||||
relativePath: string;
|
||||
};
|
||||
WebSocketPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
};
|
||||
responses: never;
|
||||
parameters: never;
|
||||
requestBodies: never;
|
||||
headers: never;
|
||||
pathItems: never;
|
||||
}
|
||||
export type $defs = Record<string, never>;
|
||||
export type operations = Record<string, never>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue