UNPKG

@sociate/sociate-api-sdk

Version:

Javascript client for Sociate AI APIs

143 lines (142 loc) 3.02 kB
export interface UserPublic { /** * Id * @description ID from user */ _id: string; /** * @description User type * @default demo */ type: UserType; /** * Username * Format: email * @description Email from user */ username: string; /** Password */ password?: string | null; /** Model */ model?: string | null; /** * Is New * @description If user is new * @default true */ is_new: boolean; vector_config?: UserVectorConfigModel | null; /** * Role * @description Role from user * @default accountDemo */ role?: UserRoleName; } export interface UserProfile { /** * Id * @description ID from user */ id: string; /** * Username * Format: email * @description Email from user */ username: string; /** @description User type */ type: UserType; /** * Indexes * @description Indexes from user * @default [] */ indexes: UserIndex[]; } export type UserType = "user" | "demo"; export type UserRoleName = "superAdmin" | "accountAdmin" | "accountMember" | "accountDemo" | "accountDHLMember" | "accountHYMMember"; export interface UserVectorConfigModel { /** * Provider * @description Vector database provider */ provider: string; /** * Index Name * @description Index name in vector database */ index_name: string; /** * Namespace * @description Namespace in index */ namespace?: string | null; /** Namespaces */ namespaces?: UserVectorConfigNamespaceModel[]; } export interface UserVectorConfigNamespaceModel { /** * Name * @description Name of namespace */ name: string; /** * Top K * @description Top of namespace */ top_k: number; /** * @description Type of namespace * @default primary */ type: VectorNamespaceType; } export type VectorNamespaceType = "primary" | "secondary"; export interface UserIndex { /** Index */ index: string; /** Namespaces */ namespaces?: { [key: string]: number; } | null; /** Total Vector Count */ total_vector_count: number; } export interface UserMeModel { /** * Id * @description ID from user */ _id: string; /** * Username * Format: email * @description Email from user */ username: string; /** Password */ password?: string | null; /** * Is New * @description If user is new * @default true */ is_new: boolean; /** * Company ID * @description The ID of the Company */ company_id: string; /** @description User type */ type: UserType; /** * Indexes * @description Indexes from user * @default [] */ indexes?: UserIndex[]; } export interface UserDocument extends Omit<UserPublic, "model" | "vector_config"> { company_id: string; }