import { HttpClientConfig, FetchOptions } from './types'; /** * HttpError is a custom error class for HTTP-related errors. * It extends the standard Error class and includes HTTP status information. */ export declare class HttpError extends Error { status: number; statusText: string; url: string; constructor(message: string, status: number, statusText: string, url: string); } /** * HttpBaseClient is a base class for making HTTP requests to a Milvus server. * It provides basic functionality for making GET and POST requests, and handles * configuration, headers, and timeouts. * * The HttpClientConfig object should contain the following properties: * - endpoint: The URL of the Milvus server. * - username: (Optional) The username for authentication. * - password: (Optional) The password for authentication. * - token: (Optional) The token for authentication. * - fetch: (Optional) An alternative fetch API implementation, e.g., node-fetch for Node.js environments. * - baseURL: (Optional) The base URL for the API endpoints. * - version: (Optional) The version of the API endpoints. * - database: (Optional) The default database to use for requests. * - timeout: (Optional) The timeout for requests in milliseconds. * * Note: This is a base class and does not provide specific methods for interacting * with Milvus entities like collections or vectors. For that, use the HttpClient class * which extends this class and mixes in the Collection and Vector APIs. */ export declare class HttpBaseClient { config: HttpClientConfig; constructor(config: HttpClientConfig); get baseURL(): string; get authorization(): string; get database(): string; get timeout(): number; get headers(): { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; get fetch(): typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: (body: string) => T): Promise; POST(url: string, data?: Record, options?: FetchOptions, decode?: (body: string) => T, encode?: (data: Record) => string): Promise; GET(url: string, params?: Record, options?: FetchOptions): Promise; } declare const HttpClient_base: { new (...args: any[]): { getSegmentsInfo(params: import("./types").HttpGetSegmentsInfoReq, options?: FetchOptions | undefined): Promise>; getQuotaMetrics(options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly fileResourcePrefix: string; addFileResource(params: import("./types").HttpAddFileResourceReq, options?: FetchOptions | undefined): Promise>; removeFileResource(params: import("./types").HttpFileResourceNameReq, options?: FetchOptions | undefined): Promise>; listFileResources(options?: FetchOptions | undefined): Promise>; runAnalyzer(params: import("./types").HttpRunAnalyzerReq, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly resourceGroupPrefix: string; createResourceGroup(params: import("./types").HttpCreateResourceGroupReq, options?: FetchOptions | undefined): Promise>; dropResourceGroup(params: import("./types").HttpResourceGroupReq, options?: FetchOptions | undefined): Promise>; listResourceGroups(options?: FetchOptions | undefined): Promise>; describeResourceGroup(params: import("./types").HttpResourceGroupReq, options?: FetchOptions | undefined): Promise; updateResourceGroups(params: import("./types").HttpUpdateResourceGroupsReq, options?: FetchOptions | undefined): Promise>; transferReplica(params: import("./types").HttpTransferReplicaReq, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly snapshotPrefix: string; readonly snapshotJobPrefix: string; createSnapshot(params: import("./types").HttpCreateSnapshotReq, options?: FetchOptions | undefined): Promise>; dropSnapshot(params: import("./types").HttpSnapshotReq, options?: FetchOptions | undefined): Promise>; listSnapshots(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise; describeSnapshot(params: import("./types").HttpSnapshotReq, options?: FetchOptions | undefined): Promise; restoreSnapshot(params: import("./types").HttpRestoreSnapshotReq, options?: FetchOptions | undefined): Promise; pinSnapshotData(params: import("./types").HttpPinSnapshotDataReq, options?: FetchOptions | undefined): Promise>; unpinSnapshotData(params: { pinId: string; }, options?: FetchOptions | undefined): Promise>; exportSnapshot(params: import("./types").HttpExportSnapshotReq, options?: FetchOptions | undefined): Promise; getExportSnapshotState(params: import("./types").HttpSnapshotJobReq, options?: FetchOptions | undefined): Promise>; restoreExternalSnapshot(params: import("./types").HttpRestoreExternalSnapshotReq, options?: FetchOptions | undefined): Promise; getRestoreSnapshotState(params: import("./types").HttpSnapshotJobReq, options?: FetchOptions | undefined): Promise>; listRestoreSnapshotJobs(params?: Partial, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly userPrefix: string; createUser(params: import("./types").HttpUserCreateReq, options?: FetchOptions | undefined): Promise>; updateUserPassword(params: import("./types").HttpUserUpdatePasswordReq, options?: FetchOptions | undefined): Promise>; dropUser(param: import("./types").HttpUserBaseReq, options?: FetchOptions | undefined): Promise>; describeUser(param: import("./types").HttpUserBaseReq, options?: FetchOptions | undefined): Promise>; listUsers(options?: FetchOptions | undefined): Promise>; grantRoleToUser(params: import("./types").HttpUserRoleReq, options?: FetchOptions | undefined): Promise>; revokeRoleFromUser(params: import("./types").HttpUserRoleReq, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly rolePrefix: string; readonly privilegeGroupPrefix: string; listRoles(options?: FetchOptions | undefined): Promise>; describeRole(params: import("./types").HttpDescribeRoleReq, options?: FetchOptions | undefined): Promise; createRole(params: import("./types").HttpCreateRoleReq, options?: FetchOptions | undefined): Promise>; alterRole(params: import("./types").HttpAlterRoleReq, options?: FetchOptions | undefined): Promise>; dropRole(params: import("./types").HttpRoleBaseReq, options?: FetchOptions | undefined): Promise>; grantPrivilegeToRole(params: import("./types").HttpRolePrivilegeReq, options?: FetchOptions | undefined): Promise>; revokePrivilegeFromRole(params: import("./types").HttpRolePrivilegeReq, options?: FetchOptions | undefined): Promise>; grantPrivilegeV2(params: import("./types").HttpRolePrivilegeV2Req, options?: FetchOptions | undefined): Promise>; revokePrivilegeV2(params: import("./types").HttpRolePrivilegeV2Req, options?: FetchOptions | undefined): Promise>; createPrivilegeGroup(params: import("./types").HttpPrivilegeGroupReq, options?: FetchOptions | undefined): Promise>; dropPrivilegeGroup(params: import("./types").HttpPrivilegeGroupReq, options?: FetchOptions | undefined): Promise>; listPrivilegeGroups(options?: FetchOptions | undefined): Promise>; addPrivilegesToGroup(params: import("./types").HttpOperatePrivilegeGroupReq, options?: FetchOptions | undefined): Promise>; removePrivilegesFromGroup(params: import("./types").HttpOperatePrivilegeGroupReq, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly indexPrefix: string; createIndex(params: import("./types").HttpIndexCreateReq, options?: FetchOptions | undefined): Promise>; dropIndex(params: import("./types").HttpIndexBaseReq, options?: FetchOptions | undefined): Promise>; describeIndex(params: import("./types").HttpIndexBaseReq, options?: FetchOptions | undefined): Promise; listIndexes(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise>; alterIndexProperties(params: import("./types").HttpIndexAlterPropertiesReq, options?: FetchOptions | undefined): Promise; dropIndexProperties(params: import("./types").HttpIndexDropPropertiesReq, options?: FetchOptions | undefined): Promise; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly importPrefix: string; listImportJobs(params: import("./types").HttpImportListReq, options?: FetchOptions | undefined): Promise; createImportJobs(params: import("./types").HttpImportCreateReq, options?: FetchOptions | undefined): Promise; getImportJobProgress(params: import("./types").HttpImportProgressReq, options?: FetchOptions | undefined): Promise; commitImportJob(params: import("./types").HttpImportJobReq, options?: FetchOptions | undefined): Promise>; abortImportJob(params: import("./types").HttpImportJobReq, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly aliasPrefix: string; listAliases(params: import("./types").HttpAliasBaseReq, options?: FetchOptions | undefined): Promise>; createAlias(params: import("./types").HttpAliasCreateReq, options?: FetchOptions | undefined): Promise>; describeAlias(params: import("./types").HttpAliasDescribeReq, options?: FetchOptions | undefined): Promise; dropAlias(params: import("./types").HttpAliasDropReq, options?: FetchOptions | undefined): Promise>; alterAlias(params: import("./types").HttpAliasCreateReq, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly partitionPrefix: string; listPartitions(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise>; createPartition(params: import("./types").HttpPartitionBaseReq, options?: FetchOptions | undefined): Promise>; dropPartition(params: import("./types").HttpPartitionBaseReq, options?: FetchOptions | undefined): Promise>; loadPartitions(params: import("./types").HttpPartitionListReq, options?: FetchOptions | undefined): Promise>; releasePartitions(params: import("./types").HttpPartitionListReq, options?: FetchOptions | undefined): Promise>; hasPartition(params: import("./types").HttpPartitionBaseReq, options?: FetchOptions | undefined): Promise; getPartitionStatistics(params: import("./types").HttpPartitionBaseReq, options?: FetchOptions | undefined): Promise; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly collectionPrefix: string; truncateCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise>; addCollectionStructField(params: import("./types").HttpCollectionAddStructFieldReq, options?: FetchOptions | undefined): Promise>; dropCollectionField(params: import("./types").HttpCollectionDropFieldReq, options?: FetchOptions | undefined): Promise>; addFunctionField(params: import("./types").HttpCollectionAddFunctionFieldReq, options?: FetchOptions | undefined): Promise>; alterCollectionFunction(params: import("./types").HttpCollectionAlterFunctionReq, options?: FetchOptions | undefined): Promise>; dropFunctionField(params: import("./types").HttpCollectionFunctionReq, options?: FetchOptions | undefined): Promise>; readonly externalCollectionJobPrefix: string; refreshExternalCollection(params: import("./types").HttpRefreshExternalCollectionReq, options?: FetchOptions | undefined): Promise>; getRefreshExternalCollectionProgress(params: { jobId: string; }, options?: FetchOptions | undefined): Promise>; listRefreshExternalCollectionJobs(params?: Partial, options?: FetchOptions | undefined): Promise>; createCollection(data: import("./types").HttpCollectionCreateReq, options?: FetchOptions | undefined): Promise>; describeCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise; dropCollection(data: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise>; addCollectionField(params: import("./types").HttpCollectionAddFieldReq, options?: FetchOptions | undefined): Promise; alterCollectionProperties(params: import("./types").HttpCollectionAlterPropertiesReq, options?: FetchOptions | undefined): Promise; alterCollectionFieldProperties(params: import("./types").HttpCollectionAlterFieldPropertiesReq, options?: FetchOptions | undefined): Promise; dropCollectionProperties(params: import("./types").HttpCollectionDropPropertiesReq, options?: FetchOptions | undefined): Promise; listCollections(params?: import("./types").HttpCollectionListReq, options?: FetchOptions | undefined): Promise; hasCollection(params: Required, options?: FetchOptions | undefined): Promise; renameCollection(params: import("./types").HttpCollectionRenameReq, options?: FetchOptions | undefined): Promise>; getCollectionStatistics(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise; flushCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise; loadCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise>; releaseCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise>; getCollectionLoadState(params: import("./types").HttpCollectionLoadStateReq, options?: FetchOptions | undefined): Promise; compactCollection(params: import("./types").HttpCollectionCompactReq, options?: FetchOptions | undefined): Promise; getCompactionState(params: import("./types").HttpCollectionGetCompactionStateReq, options?: FetchOptions | undefined): Promise; refreshLoad(params: import("./types").HttpCollectionRefreshLoadReq, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly databasePrefix: string; createDatabase(params: import("./types").HttpDatabaseCreateReq, options?: FetchOptions | undefined): Promise>; dropDatabase(params: import("./types").HttpDatabaseDropReq, options?: FetchOptions | undefined): Promise>; describeDatabase(params: import("./types").HttpDatabaseDescribeReq, options?: FetchOptions | undefined): Promise; listDatabases(options?: FetchOptions | undefined): Promise>; alterDatabaseProperties(params: import("./types").HttpDatabaseAlterPropertiesReq, options?: FetchOptions | undefined): Promise; dropDatabaseProperties(params: import("./types").HttpDatabaseDropPropertiesReq, options?: FetchOptions | undefined): Promise; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & { new (...args: any[]): { readonly vectorPrefix: string; get(params: import("./types").HttpVectorGetReq, options?: FetchOptions | undefined): Promise; insert(data: import("./types").HttpVectorInsertReq, options?: FetchOptions | undefined): Promise; upsert(data: import("./types").HttpVectorUpsertReq, options?: FetchOptions | undefined): Promise; query(data: import("./types").HttpVectorQueryReq, options?: FetchOptions | undefined): Promise; search(data: import("./types").HttpVectorSearchAggregationReq, options?: FetchOptions | undefined): Promise; search(data: import("./types").HttpVectorSearchReq | import("./types").HttpVectorSearchByIdsReq, options?: FetchOptions | undefined): Promise; hybridSearch(data: import("./types").HttpVectorHybridSearchReq, options?: FetchOptions | undefined): Promise; delete(data: import("./types").HttpVectorDeleteReq, options?: FetchOptions | undefined): Promise>; config: HttpClientConfig; readonly baseURL: string; readonly authorization: string; readonly database: string; readonly timeout: number; readonly headers: { Authorization: string; Accept: string; ContentType: string; 'Accept-Type-Allow-Int64': string; }; readonly fetch: typeof fetch | ((input: any, init?: any) => Promise); /** * Handles HTTP response and throws HttpError if response is not ok. * @internal */ _handleResponse(response: Response, url: string, decode?: ((body: string) => T) | undefined): Promise; POST(url: string, data?: Record, options?: FetchOptions | undefined, decode?: ((body: string) => T_1) | undefined, encode?: ((data: Record) => string) | undefined): Promise; GET(url: string, params?: Record, options?: FetchOptions | undefined): Promise; }; } & typeof HttpBaseClient; /** * The HttpClient class extends the functionality * of the HttpBaseClient class by mixing in the * - Collection * - Vector * - Alias * - Partition * - MilvusIndex * - Import * - Snapshot * - ResourceGroup * - Analyzer * - Diagnostics * - Role * - User APIs. */ export declare class HttpClient extends HttpClient_base { } export {};