From f83095d86ed2267ac31ef9f65b438318db57a437 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Thu, 1 Feb 2024 14:27:52 +1100 Subject: [PATCH] remove some types only relevant to frontend code Signed-off-by: Steve Cassidy --- src/types.ts | 73 ---------------------------------------------------- 1 file changed, 73 deletions(-) diff --git a/src/types.ts b/src/types.ts index 4952e32..8868bf0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -104,79 +104,6 @@ export interface Relationship { // types from datamodel/database.ts ---------------------------------------- -export interface ConnectionInfo { - proto: string; - host: string; - port: number; - lan?: boolean; - db_name: string; - auth?: { - username: string; - password: string; - }; - jwt_token?: string; -} - -export type ConductorURL = string; - -export type PossibleConnectionInfo = - | undefined - | { - proto?: string | undefined; - host?: string | undefined; - port?: number | undefined; - lan?: boolean | undefined; - db_name?: string | undefined; - auth?: { - username: string; - password: string; - }; - jwt_token?: string; - }; - -export interface ListingsObject { - _id: ListingID; - name: string; - description: string; - projects_db?: PossibleConnectionInfo; - conductor_url?: ConductorURL; - local_only?: boolean; -} - -export interface NonNullListingsObject extends ListingsObject { - projects_db: ConnectionInfo; -} - -export interface ActiveDoc { - _id: ProjectID; - listing_id: ListingID; - project_id: NonUniqueProjectID; - username: string | null; - password: string | null; - friendly_name?: string; - is_sync: boolean; - is_sync_attachments: boolean; -} - -export type JWTToken = string; - -export interface JWTTokenInfo { - pubkey: string; - pubalg: string; - token: JWTToken; -} - -export type JWTTokenMap = { - [username: string]: JWTTokenInfo; -}; - -export interface LocalAuthDoc { - _id: string; //Corresponds to a listings ID - _rev?: string; // optional as we may want to include the raw json in places - current_username: string; - available_tokens: JWTTokenMap; -} - /** * Describes a project, with connection, name, description, and schema * Part of the Projects DB