♻️Removed unused websockets

This commit is contained in:
Anton SHEPILOV
2024-05-24 00:19:31 +02:00
parent 757a4759f8
commit 6f0bfbcd09
51 changed files with 7 additions and 1620 deletions
-42
View File
@@ -32,51 +32,28 @@ export interface User {
public_token_document_id?: string;
}
export const webSocketSchema = {
type: "object",
properties: {
name: { type: "string" },
room: { type: "string" },
token: { type: "string" },
},
};
export interface Channel extends Workspace {
id: string;
}
export enum ChannelType {
DIRECT = "direct",
}
export interface Workspace {
company_id: string;
workspace_id: string;
}
export interface WebsocketMetadata {
room: string;
name?: string;
token?: string;
}
export class ResourceListResponse<T> {
resources: T[];
websockets?: ResourceWebsocket[];
next_page_token?: string;
total?: number;
}
export class ResourceGetResponse<T> {
websocket?: ResourceWebsocket;
resource: T;
}
export class ResourceUpdateResponse<T> {
websocket?: ResourceWebsocket;
resource: T;
}
export class ResourceCreateResponse<T> {
websocket?: ResourceWebsocket;
resource: T;
}
@@ -84,16 +61,7 @@ export class ResourceDeleteResponse {
status: DeleteStatus;
}
export interface ResourceListQueryParameters extends PaginationQueryParameters {
search_query?: string;
mine?: boolean;
}
export declare type DeleteStatus = "success" | "error";
export interface ResourceWebsocket {
room: string;
token?: string;
}
export interface ResourceEventsPayload {
user: User;
@@ -104,21 +72,11 @@ export interface ResourceEventsPayload {
workspace?: WorkspacePrimaryKey;
}
export interface DocumentEventsPayload {
user: User;
actor?: User;
document?: {
sender: string;
};
company?: { id: string };
}
export interface PaginationQueryParameters {
// It is offset for MongoDB and pointer to the next page for ScyllaDB
page_token?: string;
// Page size
limit?: string;
websockets?: boolean;
}
export interface AccessToken {