@zilliz/milvus2-sdk-node
Version:
Official Node.js SDK for [Milvus](https://github.com/milvus-io/milvus) vector database. Provides gRPC and HTTP clients for vector similarity search, metadata filtering, and full collection/index/user management.
64 lines (63 loc) • 1.69 kB
TypeScript
import { CollectionPrivileges, UserPrivileges, GlobalPrivileges, MsgType } from '../';
export interface MsgBase {
base: {
msg_type: MsgType;
};
}
export interface KeyValuePair<T = string, U = string | number> {
key: T;
value: U;
}
interface NumberArray {
data: Number[];
}
interface StringArray {
data: String[];
}
export interface NumberArrayId {
int_id: NumberArray;
}
export interface StringArrayId {
str_id: StringArray;
}
export interface GrpcTimeOut {
timeout?: number;
client_request_id?: string;
'client-request-id'?: string;
cluster_id?: string;
}
export type PrivilegesTypes = CollectionPrivileges | UserPrivileges | GlobalPrivileges | string;
export interface ResStatus {
extra_info: Record<string, any>;
error_code: string | number;
reason: string;
code?: number;
retriable: boolean;
detail: string;
}
export interface resStatusResponse {
status: ResStatus;
}
export interface TimeStamp {
created_timestamp: string;
created_utc_timestamp: string;
}
export interface TimeStampArray {
created_timestamps: string[];
created_utc_timestamps: string[];
}
export type keyValueObj = Record<string, string | number | string[] | number[] | boolean | unknown>;
export type OrderByOrder = 'asc' | 'desc' | 'ascending' | 'descending';
export type OrderByField = string | {
field: string;
order?: OrderByOrder;
};
export type OrderByFields = string | OrderByField[];
export interface collectionNameReq extends GrpcTimeOut {
collection_name: string;
db_name?: string;
}
export interface partitionNameReq extends collectionNameReq {
partition_name?: string;
}
export {};