@zilliz/milvus2-sdk-node 2.3.2 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +1 -1
  2. package/dist/milvus/HttpClient.d.ts +48 -0
  3. package/dist/milvus/HttpClient.js +79 -0
  4. package/dist/milvus/HttpClient.js.map +1 -0
  5. package/dist/milvus/MilvusClient.js +1 -1
  6. package/dist/milvus/MilvusClient.js.map +1 -1
  7. package/dist/milvus/const/defaults.d.ts +3 -0
  8. package/dist/milvus/const/defaults.js +4 -1
  9. package/dist/milvus/const/defaults.js.map +1 -1
  10. package/dist/milvus/const/{ErrorReason.d.ts → error.d.ts} +9 -0
  11. package/dist/milvus/const/{ErrorReason.js → error.js} +12 -2
  12. package/dist/milvus/const/error.js.map +1 -0
  13. package/dist/milvus/const/index.d.ts +2 -2
  14. package/dist/milvus/const/index.js +2 -3
  15. package/dist/milvus/const/index.js.map +1 -1
  16. package/dist/milvus/const/{Milvus.d.ts → milvus.d.ts} +16 -4
  17. package/dist/milvus/const/{Milvus.js → milvus.js} +45 -65
  18. package/dist/milvus/const/milvus.js.map +1 -0
  19. package/dist/milvus/grpc/BaseClient.d.ts +1 -0
  20. package/dist/milvus/grpc/BaseClient.js +7 -0
  21. package/dist/milvus/grpc/BaseClient.js.map +1 -1
  22. package/dist/milvus/grpc/Collection.d.ts +50 -1
  23. package/dist/milvus/grpc/Collection.js +75 -0
  24. package/dist/milvus/grpc/Collection.js.map +1 -1
  25. package/dist/milvus/grpc/Data.d.ts +3 -2
  26. package/dist/milvus/grpc/Data.js +84 -54
  27. package/dist/milvus/grpc/Data.js.map +1 -1
  28. package/dist/milvus/grpc/GrpcClient.js +1 -0
  29. package/dist/milvus/grpc/GrpcClient.js.map +1 -1
  30. package/dist/milvus/http/Collection.d.ts +19 -0
  31. package/dist/milvus/http/Collection.js +46 -0
  32. package/dist/milvus/http/Collection.js.map +1 -0
  33. package/dist/milvus/http/Vector.d.ts +19 -0
  34. package/dist/milvus/http/Vector.js +53 -0
  35. package/dist/milvus/http/Vector.js.map +1 -0
  36. package/dist/milvus/http/index.d.ts +2 -0
  37. package/dist/milvus/http/index.js +19 -0
  38. package/dist/milvus/http/index.js.map +1 -0
  39. package/dist/milvus/index.d.ts +1 -0
  40. package/dist/milvus/index.js +1 -0
  41. package/dist/milvus/index.js.map +1 -1
  42. package/dist/milvus/orm/Collection.d.ts +2 -2
  43. package/dist/milvus/types/Client.d.ts +1 -0
  44. package/dist/milvus/types/Collection.d.ts +28 -46
  45. package/dist/milvus/types/Collection.js +0 -6
  46. package/dist/milvus/types/Collection.js.map +1 -1
  47. package/dist/milvus/types/Common.d.ts +9 -11
  48. package/dist/milvus/types/Common.js +0 -14
  49. package/dist/milvus/types/Common.js.map +1 -1
  50. package/dist/milvus/types/Data.d.ts +59 -62
  51. package/dist/milvus/types/Database.d.ts +7 -6
  52. package/dist/milvus/types/HighLevel.d.ts +2 -3
  53. package/dist/milvus/types/Http.d.ts +94 -0
  54. package/dist/milvus/types/Http.js +3 -0
  55. package/dist/milvus/types/Http.js.map +1 -0
  56. package/dist/milvus/types/MilvusIndex.d.ts +10 -25
  57. package/dist/milvus/types/Partition.d.ts +5 -9
  58. package/dist/milvus/types/Resource.d.ts +5 -9
  59. package/dist/milvus/types/Response.d.ts +0 -7
  60. package/dist/milvus/types/Response.js +0 -31
  61. package/dist/milvus/types/Response.js.map +1 -1
  62. package/dist/milvus/types/User.d.ts +25 -36
  63. package/dist/milvus/types/index.d.ts +1 -0
  64. package/dist/milvus/types/index.js +1 -0
  65. package/dist/milvus/types/index.js.map +1 -1
  66. package/dist/milvus/types.d.ts +1 -0
  67. package/dist/milvus/types.js +1 -0
  68. package/dist/milvus/types.js.map +1 -1
  69. package/dist/milvus/utils/Blob.d.ts +3 -2
  70. package/dist/milvus/utils/Blob.js.map +1 -1
  71. package/dist/milvus/utils/Format.d.ts +18 -10
  72. package/dist/milvus/utils/Format.js +55 -18
  73. package/dist/milvus/utils/Format.js.map +1 -1
  74. package/dist/milvus/utils/Function.js +6 -0
  75. package/dist/milvus/utils/Function.js.map +1 -1
  76. package/dist/milvus/utils/Grpc.d.ts +2 -1
  77. package/dist/milvus/utils/Grpc.js +7 -7
  78. package/dist/milvus/utils/Grpc.js.map +1 -1
  79. package/dist/proto/proto/common.proto +11 -3
  80. package/dist/proto/proto/google/protobuf/descriptor.proto +50 -31
  81. package/dist/proto/proto/milvus.proto +32 -9
  82. package/dist/proto/proto/schema.proto +2 -1
  83. package/dist/sdk.json +1 -1
  84. package/package.json +5 -5
  85. package/dist/milvus/const/ErrorReason.js.map +0 -1
  86. package/dist/milvus/const/Milvus.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ import { HttpBaseClient } from '../HttpClient';
2
+ import { Constructor } from '../types/index';
3
+ import { HttpCollectionCreateReq, HttpCollectionListReq, HttpCollectionListResponse, HttpCollectionDescribeResponse, HttpBaseResponse, HttpBaseReq } from '../types';
4
+ export declare function Collection<T extends Constructor<HttpBaseClient>>(Base: T): {
5
+ new (...args: any[]): {
6
+ createCollection(data: HttpCollectionCreateReq): Promise<HttpBaseResponse>;
7
+ describeCollection(params: HttpBaseReq): Promise<HttpCollectionDescribeResponse>;
8
+ dropCollection(data: HttpBaseReq): Promise<HttpBaseResponse>;
9
+ listCollections(params?: HttpCollectionListReq): Promise<HttpCollectionListResponse>;
10
+ config: import("../types").HttpClientConfig;
11
+ client: import("axios").AxiosInstance;
12
+ readonly baseURL: string;
13
+ readonly authorization: string;
14
+ readonly database: string;
15
+ readonly timeout: number;
16
+ readonly POST: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data?: D | undefined, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
17
+ readonly GET: <T_1 = any, R_1 = import("axios").AxiosResponse<T_1, any>, D_1 = any>(url: string, config?: import("axios").AxiosRequestConfig<D_1> | undefined) => Promise<R_1>;
18
+ };
19
+ } & T;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Collection = void 0;
13
+ function Collection(Base) {
14
+ return class extends Base {
15
+ // POST create collection
16
+ createCollection(data) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ const url = `/vector/collections/create`;
19
+ return yield this.POST(url, data);
20
+ });
21
+ }
22
+ // GET describe collection
23
+ describeCollection(params) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const url = `/vector/collections/describe`;
26
+ return yield this.GET(url, { params });
27
+ });
28
+ }
29
+ // POST drop collection
30
+ dropCollection(data) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ const url = `/vector/collections/drop`;
33
+ return yield this.POST(url, data);
34
+ });
35
+ }
36
+ // GET list collections
37
+ listCollections(params = {}) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const url = `/vector/collections`;
40
+ return yield this.GET(url, { params });
41
+ });
42
+ }
43
+ };
44
+ }
45
+ exports.Collection = Collection;
46
+ //# sourceMappingURL=Collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../milvus/http/Collection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,SAAgB,UAAU,CAAwC,IAAO;IACvE,OAAO,KAAM,SAAQ,IAAI;QACvB,yBAAyB;QACnB,gBAAgB,CACpB,IAA6B;;gBAE7B,MAAM,GAAG,GAAG,4BAA4B,CAAC;gBACzC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;SAAA;QAED,0BAA0B;QACpB,kBAAkB,CACtB,MAAmB;;gBAEnB,MAAM,GAAG,GAAG,8BAA8B,CAAC;gBAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YACzC,CAAC;SAAA;QAED,uBAAuB;QACjB,cAAc,CAAC,IAAiB;;gBACpC,MAAM,GAAG,GAAG,0BAA0B,CAAC;gBAEvC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;SAAA;QAED,uBAAuB;QACjB,eAAe,CACnB,SAAgC,EAAE;;gBAElC,MAAM,GAAG,GAAG,qBAAqB,CAAC;gBAElC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YACzC,CAAC;SAAA;KACF,CAAC;AACJ,CAAC;AAlCD,gCAkCC"}
@@ -0,0 +1,19 @@
1
+ import { HttpBaseClient } from '../HttpClient';
2
+ import { Constructor, HttpVectorGetReq, HttpVectorInsertReq, HttpVectorInsertResponse, HttpVectorQueryReq, HttpVectorQueryResponse, HttpVectorSearchReq, HttpVectorDeleteReq, HttpVectorSearchResponse, HttpBaseResponse } from '../types';
3
+ export declare function Vector<T extends Constructor<HttpBaseClient>>(Base: T): {
4
+ new (...args: any[]): {
5
+ get(params: HttpVectorGetReq): Promise<HttpBaseResponse>;
6
+ insert(data: HttpVectorInsertReq): Promise<HttpVectorInsertResponse>;
7
+ query(data: HttpVectorQueryReq): Promise<HttpVectorQueryResponse>;
8
+ search(data: HttpVectorSearchReq): Promise<HttpVectorSearchResponse>;
9
+ delete(data: HttpVectorDeleteReq): Promise<HttpBaseResponse>;
10
+ config: import("../types").HttpClientConfig;
11
+ client: import("axios").AxiosInstance;
12
+ readonly baseURL: string;
13
+ readonly authorization: string;
14
+ readonly database: string;
15
+ readonly timeout: number;
16
+ readonly POST: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data?: D | undefined, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
17
+ readonly GET: <T_1 = any, R_1 = import("axios").AxiosResponse<T_1, any>, D_1 = any>(url: string, config?: import("axios").AxiosRequestConfig<D_1> | undefined) => Promise<R_1>;
18
+ };
19
+ } & T;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Vector = void 0;
13
+ function Vector(Base) {
14
+ return class extends Base {
15
+ // GET get data
16
+ get(params) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ const url = `/vector/get`;
19
+ return yield this.GET(url, { params });
20
+ });
21
+ }
22
+ // POST insert data
23
+ insert(data) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const url = `/vector/insert`;
26
+ return yield this.POST(url, data);
27
+ });
28
+ }
29
+ // POST query data
30
+ query(data) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ const url = `/vector/query`;
33
+ return yield this.client.post(url, data);
34
+ });
35
+ }
36
+ // POST search data
37
+ search(data) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const url = `/vector/search`;
40
+ return yield this.POST(url, data);
41
+ });
42
+ }
43
+ // POST delete collection
44
+ delete(data) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const url = `/vector/delete`;
47
+ return yield this.POST(url, data);
48
+ });
49
+ }
50
+ };
51
+ }
52
+ exports.Vector = Vector;
53
+ //# sourceMappingURL=Vector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Vector.js","sourceRoot":"","sources":["../../../milvus/http/Vector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAcA,SAAgB,MAAM,CAAwC,IAAO;IACnE,OAAO,KAAM,SAAQ,IAAI;QACvB,eAAe;QACT,GAAG,CAAC,MAAwB;;gBAChC,MAAM,GAAG,GAAG,aAAa,CAAC;gBAC1B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YACzC,CAAC;SAAA;QAED,mBAAmB;QACb,MAAM,CAAC,IAAyB;;gBACpC,MAAM,GAAG,GAAG,gBAAgB,CAAC;gBAC7B,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;SAAA;QAED,kBAAkB;QACZ,KAAK,CAAC,IAAwB;;gBAClC,MAAM,GAAG,GAAG,eAAe,CAAC;gBAC5B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC3C,CAAC;SAAA;QAED,mBAAmB;QACb,MAAM,CAAC,IAAyB;;gBACpC,MAAM,GAAG,GAAG,gBAAgB,CAAC;gBAC7B,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;SAAA;QAED,yBAAyB;QACnB,MAAM,CAAC,IAAyB;;gBACpC,MAAM,GAAG,GAAG,gBAAgB,CAAC;gBAC7B,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC;SAAA;KACF,CAAC;AACJ,CAAC;AAhCD,wBAgCC"}
@@ -0,0 +1,2 @@
1
+ export * from './Collection';
2
+ export * from './Vector';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Collection"), exports);
18
+ __exportStar(require("./Vector"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../milvus/http/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,2CAAyB"}
@@ -4,3 +4,4 @@ export * from './types';
4
4
  export * from './grpc/GrpcClient';
5
5
  export * from './MilvusClient';
6
6
  export * from './OrmClient';
7
+ export * from './HttpClient';
@@ -24,4 +24,5 @@ __exportStar(require("./types"), exports);
24
24
  __exportStar(require("./grpc/GrpcClient"), exports);
25
25
  __exportStar(require("./MilvusClient"), exports);
26
26
  __exportStar(require("./OrmClient"), exports);
27
+ __exportStar(require("./HttpClient"), exports);
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../milvus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS;AACT,0CAAwB;AACxB,QAAQ;AACR,0CAAwB;AACxB,QAAQ;AACR,0CAAwB;AACxB,UAAU;AACV,oDAAkC;AAClC,iDAA+B;AAC/B,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../milvus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS;AACT,0CAAwB;AACxB,QAAQ;AACR,0CAAwB;AACxB,QAAQ;AACR,0CAAwB;AACxB,UAAU;AACV,oDAAkC;AAClC,iDAA+B;AAC/B,8CAA4B;AAC5B,+CAA6B"}
@@ -15,8 +15,8 @@ export declare class Collection {
15
15
  init(): Promise<void>;
16
16
  count(): Promise<number>;
17
17
  info(): Promise<{
18
- status: import("..").ResStatus;
19
18
  index_descriptions: import("..").IndexDescription[];
19
+ status: import("..").ResStatus;
20
20
  schema: import("..").CollectionSchema;
21
21
  collectionID: string;
22
22
  consistency_level: string;
@@ -24,7 +24,7 @@ export declare class Collection {
24
24
  virtual_channel_names: string[];
25
25
  physical_channel_names: string[];
26
26
  start_positions: string[];
27
- properties: string[];
27
+ properties: import("..").KeyValuePair[];
28
28
  created_timestamp: string;
29
29
  created_utc_timestamp: string;
30
30
  shards_num: number;
@@ -3,6 +3,7 @@ import { ChannelOptions } from '@grpc/grpc-js';
3
3
  * Configuration options for the Milvus client.
4
4
  */
5
5
  export interface ClientConfig {
6
+ id?: string;
6
7
  protoFilePath?: {
7
8
  milvus?: string;
8
9
  schema?: string;
@@ -1,9 +1,10 @@
1
- import { ResStatus, KeyValuePair, GrpcTimeOut, TimeStamp, TimeStampArray } from './Common';
2
- import { CompactionState, DataType, LoadState, DataTypeMap } from '../';
1
+ import { ResStatus, KeyValuePair, GrpcTimeOut, TimeStamp, TimeStampArray, resStatusResponse, collectionNameReq } from './Common';
2
+ import { CompactionState, DataType, LoadState, DataTypeMap, ShowCollectionsType } from '../';
3
3
  export interface FieldSchema {
4
4
  name: string;
5
5
  description: string;
6
6
  data_type: keyof typeof DataType;
7
+ element_type?: keyof typeof DataType;
7
8
  dataType?: DataType;
8
9
  is_primary_key?: boolean;
9
10
  is_partition_key?: boolean;
@@ -33,11 +34,12 @@ export interface ReplicaInfo {
33
34
  node_ids: string[];
34
35
  }
35
36
  export type TypeParam = string | number;
36
- export type TypeParamKey = 'dim' | 'max_length';
37
+ export type TypeParamKey = 'dim' | 'max_length' | 'max_capacity';
37
38
  export interface FieldType {
38
39
  name: string;
39
40
  description?: string;
40
41
  data_type: DataType | keyof typeof DataTypeMap;
42
+ element_type?: DataType | keyof typeof DataTypeMap;
41
43
  is_primary_key?: boolean;
42
44
  is_partition_key?: boolean;
43
45
  type_params?: {
@@ -45,13 +47,10 @@ export interface FieldType {
45
47
  };
46
48
  autoID?: boolean;
47
49
  dim?: TypeParam;
50
+ max_capacity?: TypeParam;
48
51
  max_length?: TypeParam;
49
52
  default_value?: number | string;
50
53
  }
51
- export declare enum ShowCollectionsType {
52
- All = 0,
53
- Loaded = 1
54
- }
55
54
  export interface ShowCollectionsReq extends GrpcTimeOut {
56
55
  type?: ShowCollectionsType;
57
56
  collection_names?: string[];
@@ -67,39 +66,31 @@ export interface CreateCollectionReq extends GrpcTimeOut {
67
66
  enable_dynamic_field?: boolean;
68
67
  enableDynamicField?: boolean;
69
68
  }
70
- export interface CollectionNameReq extends GrpcTimeOut {
71
- /**
72
- * @param collection_name collection name string
73
- */
74
- collection_name: string;
75
- }
76
- export interface HasCollectionReq extends CollectionNameReq {
69
+ export interface HasCollectionReq extends collectionNameReq {
77
70
  }
78
- export interface DescribeCollectionReq extends CollectionNameReq {
71
+ export interface DescribeCollectionReq extends collectionNameReq {
79
72
  cache?: boolean;
80
73
  }
81
- export interface GetCollectionStatisticsReq extends CollectionNameReq {
74
+ export interface GetCollectionStatisticsReq extends collectionNameReq {
82
75
  }
83
- export interface LoadCollectionReq extends CollectionNameReq {
76
+ export interface LoadCollectionReq extends collectionNameReq {
84
77
  replica_number?: number;
85
78
  resource_groups?: string[];
86
79
  refresh?: boolean;
87
80
  }
88
- export interface ReleaseLoadCollectionReq extends CollectionNameReq {
81
+ export interface ReleaseLoadCollectionReq extends collectionNameReq {
89
82
  }
90
- export interface DropCollectionReq extends CollectionNameReq {
83
+ export interface DropCollectionReq extends collectionNameReq {
91
84
  }
92
- export interface CreateAliasReq extends CollectionNameReq {
85
+ export interface CreateAliasReq extends collectionNameReq {
93
86
  alias: string;
94
87
  }
95
88
  export interface DropAliasReq extends GrpcTimeOut {
96
89
  alias: string;
97
90
  }
98
- export interface AlterAliasReq extends CollectionNameReq {
99
- alias: string;
91
+ export interface AlterAliasReq extends CreateAliasReq {
100
92
  }
101
- export interface CompactReq extends GrpcTimeOut {
102
- collection_name: string;
93
+ export interface CompactReq extends collectionNameReq {
103
94
  timetravel?: number | string;
104
95
  }
105
96
  export interface GetCompactionStateReq extends GrpcTimeOut {
@@ -109,22 +100,16 @@ export interface GetCompactionPlansReq extends GrpcTimeOut {
109
100
  compactionID: number | string;
110
101
  }
111
102
  export interface GetReplicaReq extends GrpcTimeOut {
112
- /**
113
- * @param collectionID collection ID
114
- */
115
103
  collectionID: number | string;
116
104
  with_shard_nodes?: boolean;
117
105
  }
118
- export interface RenameCollectionReq extends GrpcTimeOut {
119
- collection_name: string;
106
+ export interface RenameCollectionReq extends collectionNameReq {
120
107
  new_collection_name: string;
121
108
  }
122
- export interface BoolResponse {
123
- status: ResStatus;
109
+ export interface BoolResponse extends resStatusResponse {
124
110
  value: Boolean;
125
111
  }
126
- export interface CompactionResponse {
127
- status: ResStatus;
112
+ export interface CompactionResponse extends resStatusResponse {
128
113
  compactionID: string;
129
114
  }
130
115
  export interface CollectionSchema {
@@ -142,23 +127,21 @@ export interface DescribeCollectionResponse extends TimeStamp {
142
127
  virtual_channel_names: string[];
143
128
  physical_channel_names: string[];
144
129
  start_positions: string[];
145
- properties: string[];
130
+ properties: KeyValuePair[];
146
131
  created_timestamp: string;
147
132
  created_utc_timestamp: string;
148
133
  shards_num: number;
149
134
  num_partitions?: string;
150
135
  db_name: string;
151
136
  }
152
- export interface GetCompactionPlansResponse {
153
- status: ResStatus;
137
+ export interface GetCompactionPlansResponse extends resStatusResponse {
154
138
  state: CompactionState;
155
139
  mergeInfos: {
156
140
  sources: string[];
157
141
  target: string;
158
142
  }[];
159
143
  }
160
- export interface GetCompactionStateResponse {
161
- status: ResStatus;
144
+ export interface GetCompactionStateResponse extends resStatusResponse {
162
145
  state: CompactionState;
163
146
  executingPlanNo: string;
164
147
  timeoutPlanNo: string;
@@ -168,28 +151,27 @@ export interface ShowCollectionsResponse extends TimeStampArray {
168
151
  status: ResStatus;
169
152
  data: CollectionData[];
170
153
  }
171
- export interface StatisticsResponse {
172
- status: ResStatus;
154
+ export interface StatisticsResponse extends resStatusResponse {
173
155
  stats: KeyValuePair[];
174
156
  data: {
175
157
  [x: string]: any;
176
158
  };
177
159
  }
178
- export interface ReplicasResponse {
179
- status: ResStatus;
160
+ export interface ReplicasResponse extends resStatusResponse {
180
161
  replicas: ReplicaInfo[];
181
162
  }
182
163
  export interface GetLoadingProgressReq extends GrpcTimeOut {
183
164
  collection_name: string;
184
165
  partition_names?: string[];
185
166
  }
186
- export interface GetLoadingProgressResponse {
187
- status: ResStatus;
167
+ export interface GetLoadingProgressResponse extends resStatusResponse {
188
168
  progress: string;
189
169
  }
190
170
  export interface GetLoadStateReq extends GetLoadingProgressReq {
191
171
  }
192
- export interface GetLoadStateResponse {
193
- status: ResStatus;
172
+ export interface GetLoadStateResponse extends resStatusResponse {
194
173
  state: LoadState;
195
174
  }
175
+ export interface AlterCollectionReq extends collectionNameReq {
176
+ properties: Record<string, string | number>;
177
+ }
@@ -1,9 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShowCollectionsType = void 0;
4
- var ShowCollectionsType;
5
- (function (ShowCollectionsType) {
6
- ShowCollectionsType[ShowCollectionsType["All"] = 0] = "All";
7
- ShowCollectionsType[ShowCollectionsType["Loaded"] = 1] = "Loaded";
8
- })(ShowCollectionsType = exports.ShowCollectionsType || (exports.ShowCollectionsType = {}));
9
3
  //# sourceMappingURL=Collection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../milvus/types/Collection.ts"],"names":[],"mappings":";;;AAgEA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,2DAAG,CAAA;IACH,iEAAM,CAAA;AACR,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"}
1
+ {"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../milvus/types/Collection.ts"],"names":[],"mappings":""}
@@ -8,17 +8,6 @@ export interface KeyValuePair {
8
8
  key: string;
9
9
  value: string | number;
10
10
  }
11
- export declare enum IndexState {
12
- IndexStateNone = 0,
13
- Unissued = 1,
14
- InProgress = 2,
15
- Finished = 3,
16
- Failed = 4
17
- }
18
- export declare enum DslType {
19
- Dsl = 0,
20
- BoolExprV1 = 1
21
- }
22
11
  interface NumberArray {
23
12
  data: Number[];
24
13
  }
@@ -40,6 +29,9 @@ export interface ResStatus {
40
29
  reason: string;
41
30
  code?: number;
42
31
  }
32
+ export interface resStatusResponse {
33
+ status: ResStatus;
34
+ }
43
35
  export interface TimeStamp {
44
36
  created_timestamp: string;
45
37
  created_utc_timestamp: string;
@@ -51,4 +43,10 @@ export interface TimeStampArray {
51
43
  export interface keyValueObj {
52
44
  [key: string]: string | number;
53
45
  }
46
+ export interface collectionNameReq extends GrpcTimeOut {
47
+ collection_name: string;
48
+ }
49
+ export interface partitionNameReq extends collectionNameReq {
50
+ partition_name?: string;
51
+ }
54
52
  export {};
@@ -1,17 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DslType = exports.IndexState = void 0;
4
- var IndexState;
5
- (function (IndexState) {
6
- IndexState[IndexState["IndexStateNone"] = 0] = "IndexStateNone";
7
- IndexState[IndexState["Unissued"] = 1] = "Unissued";
8
- IndexState[IndexState["InProgress"] = 2] = "InProgress";
9
- IndexState[IndexState["Finished"] = 3] = "Finished";
10
- IndexState[IndexState["Failed"] = 4] = "Failed";
11
- })(IndexState = exports.IndexState || (exports.IndexState = {}));
12
- var DslType;
13
- (function (DslType) {
14
- DslType[DslType["Dsl"] = 0] = "Dsl";
15
- DslType[DslType["BoolExprV1"] = 1] = "BoolExprV1";
16
- })(DslType = exports.DslType || (exports.DslType = {}));
17
3
  //# sourceMappingURL=Common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../milvus/types/Common.ts"],"names":[],"mappings":";;;AAkBA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,+DAAkB,CAAA;IAClB,mDAAY,CAAA;IACZ,uDAAc,CAAA;IACd,mDAAY,CAAA;IACZ,+CAAU,CAAA;AACZ,CAAC,EANW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAMrB;AAED,IAAY,OAGX;AAHD,WAAY,OAAO;IACjB,mCAAO,CAAA;IACP,iDAAc,CAAA;AAChB,CAAC,EAHW,OAAO,GAAP,eAAO,KAAP,eAAO,QAGlB"}
1
+ {"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../milvus/types/Common.ts"],"names":[],"mappings":""}