Skip to content

Commit

Permalink
remove some types only relevant to frontend code
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Cassidy <[email protected]>
  • Loading branch information
stevecassidy committed Feb 1, 2024
1 parent d0d76c0 commit f83095d
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f83095d

Please sign in to comment.