import { VectorResponseBase } from "."; export type CollectionCreateParams = { database: string; collection: string; description?: string; replicaNum?: number; shardNum?: number; embedding?: { field?: string; vectorField?: "vector"; model?: "bge-base-zh" | "m3e-base" | "e5-large-v2" | "text2vec-large-chinese" | "multilingual-e5-base"; language?: "zh" | "en" | "multi"; enableWordsEmbedding?: boolean; status?: "enable" | "disable"; }; indexes?: CollectionCreateParamsIndex[]; splitterPreprocess?: { appendTitleToChunk?: boolean; appendKeywordsToChunk?: boolean; }; }; export type CollectionCreateParamsIndex = { fieldName: "id"; fieldType: "string"; indexType: "primaryKey"; } | { fieldName: "vector"; fieldType: "vector"; indexType: "FLAT" | "HNSW" | "IVF_FLAT" | "IVF_PQ" | "IVF_SQ4" | "IVF_SQ8" | "IVF_SQ16" | "lanceDB"; dimension?: number; metricType?: "L2" | "IP" | "COSINE"; params?: { M: number | 16; efConstruction?: number | 200; nlist?: number; }; } | { fieldName: string; fieldType: "string" | "uint64" | "array"; indexType: "filter"; }; export type CollectionDropParams = { database: string; collection: string; }; export type CollectionListParams = { database: string; }; export type CollectionListResponse = VectorResponseBase & { collections: CollectionListItem[]; }; export type CollectionListItem = CollectionCreateParams & CollectionExtendInfo; export type CollectionExtendInfo = { documentCount?: number; alias?: string[]; indexStatus?: { status: "ready" | "raining data" | "building index" | "failed"; startTime: string; }; }; export type CollectionDescribeParams = { database: string; collection: string; }; export type CollectionDescribeResponse = VectorResponseBase & { collection: CollectionListItem; }; export type CollectionTruncateParams = { database: string; collection: string; }; export type CollectionIndexRebuildParams = { database: string; collection: string; dropBeforeRebuild?: boolean; throttle?: 0 | 1; };