@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
@@ -1,33 +1,48 @@
1
1
  /// <reference types="node" />
2
- import { GrpcTimeOut, KeyValuePair, ResStatus, NumberArrayId, StringArrayId, keyValueObj, DataType, SegmentState, ImportState, ConsistencyLevelEnum, CollectionNameReq } from '../';
2
+ import { GrpcTimeOut, KeyValuePair, NumberArrayId, StringArrayId, keyValueObj, DataType, SegmentState, ImportState, ConsistencyLevelEnum, collectionNameReq, resStatusResponse } from '../';
3
+ export type FloatVectors = number[];
4
+ export type BinaryVectors = number[];
5
+ export type Vectors = FloatVectors | BinaryVectors;
6
+ export type Bool = boolean;
7
+ export type Int8 = number;
8
+ export type Int16 = number;
9
+ export type Int32 = number;
10
+ export type Int64 = number;
11
+ export type Float = number;
12
+ export type Double = number;
13
+ export type VarChar = string;
14
+ export type JSON = {
15
+ [key: string]: any;
16
+ };
17
+ export type Array = Int8[] | Int16[] | Int32[] | Int64[] | Float[] | Double[] | VarChar[];
18
+ export type FieldData = Bool | Int8 | Int16 | Int32 | Int64 | Float | Double | VarChar | JSON | Array | Vectors | FloatVectors | BinaryVectors;
19
+ export interface RowData {
20
+ [x: string]: FieldData;
21
+ }
22
+ export interface Field {
23
+ name: string;
24
+ type: keyof typeof DataType;
25
+ elementType?: keyof typeof DataType;
26
+ data: FieldData[];
27
+ dim?: number;
28
+ }
3
29
  export interface FlushReq extends GrpcTimeOut {
4
30
  collection_names: string[];
5
31
  }
6
- export interface FieldData {
7
- type: DataType;
8
- field_name: string;
9
- dim?: number;
10
- data: Number[];
32
+ export interface CountReq extends collectionNameReq {
11
33
  }
12
- export interface InsertReq extends GrpcTimeOut {
13
- collection_name: string;
34
+ export interface InsertReq extends collectionNameReq {
14
35
  partition_name?: string;
15
- fields_data?: {
16
- [x: string]: any;
17
- }[];
18
- data?: {
19
- [x: string]: any;
20
- }[];
36
+ fields_data?: RowData[];
37
+ data?: RowData[];
21
38
  hash_keys?: Number[];
22
39
  }
23
- export interface DeleteEntitiesReq extends GrpcTimeOut {
24
- collection_name: string;
40
+ export interface DeleteEntitiesReq extends collectionNameReq {
25
41
  expr?: string;
26
42
  filter?: string;
27
43
  partition_name?: string;
28
44
  }
29
- export interface DeleteReq extends GrpcTimeOut {
30
- collection_name: string;
45
+ export interface DeleteReq extends collectionNameReq {
31
46
  ids: string[] | number[];
32
47
  partition_name?: string;
33
48
  }
@@ -53,26 +68,22 @@ export interface GetQuerySegmentInfoReq extends GrpcTimeOut {
53
68
  export interface GePersistentSegmentInfoReq extends GrpcTimeOut {
54
69
  collectionName: string;
55
70
  }
56
- export interface ImportReq extends GrpcTimeOut {
57
- collection_name: string;
71
+ export interface ImportReq extends collectionNameReq {
58
72
  partition_name?: string;
59
73
  channel_names?: string[];
60
74
  files: string[];
61
75
  options?: KeyValuePair[];
62
76
  }
63
- export interface ListImportTasksReq extends GrpcTimeOut {
64
- collection_name: string;
77
+ export interface ListImportTasksReq extends collectionNameReq {
65
78
  limit?: number;
66
79
  }
67
80
  export interface GetImportStateReq extends GrpcTimeOut {
68
81
  task: number;
69
82
  }
70
- export interface GetFlushStateResponse {
71
- status: ResStatus;
83
+ export interface GetFlushStateResponse extends resStatusResponse {
72
84
  flushed: boolean;
73
85
  }
74
- export interface GetMetricsResponse {
75
- status: ResStatus;
86
+ export interface GetMetricsResponse extends resStatusResponse {
76
87
  response: any;
77
88
  component_name: string;
78
89
  }
@@ -94,18 +105,15 @@ export interface PersistentSegmentInfo {
94
105
  num_rows: number;
95
106
  state: SegmentState;
96
107
  }
97
- export interface GetQuerySegmentInfoResponse {
98
- status: ResStatus;
108
+ export interface GetQuerySegmentInfoResponse extends resStatusResponse {
99
109
  infos: QuerySegmentInfo[];
100
110
  }
101
- export interface GePersistentSegmentInfoResponse {
102
- status: ResStatus;
111
+ export interface GePersistentSegmentInfoResponse extends resStatusResponse {
103
112
  infos: PersistentSegmentInfo[];
104
113
  }
105
- export interface MutationResult {
114
+ export interface MutationResult extends resStatusResponse {
106
115
  succ_index: Number[];
107
116
  err_index: Number[];
108
- status: ResStatus;
109
117
  acknowledged: boolean;
110
118
  insert_cnt: string;
111
119
  delete_cnt: string;
@@ -113,27 +121,26 @@ export interface MutationResult {
113
121
  timestamp: string;
114
122
  IDs: StringArrayId | NumberArrayId;
115
123
  }
116
- export interface QueryResults {
117
- status: ResStatus;
124
+ export interface QueryResults extends resStatusResponse {
118
125
  data: {
119
126
  [x: string]: any;
120
127
  }[];
121
128
  }
129
+ export interface CountResult extends resStatusResponse {
130
+ data: number;
131
+ }
122
132
  export interface SearchResultData {
123
133
  [x: string]: any;
124
134
  score: number;
125
135
  id: string;
126
136
  }
127
- export interface SearchResults {
128
- status: ResStatus;
137
+ export interface SearchResults extends resStatusResponse {
129
138
  results: SearchResultData[];
130
139
  }
131
- export interface ImportResponse {
132
- status: ResStatus;
140
+ export interface ImportResponse extends resStatusResponse {
133
141
  tasks: number[];
134
142
  }
135
- export interface GetImportStateResponse {
136
- status: ResStatus;
143
+ export interface GetImportStateResponse extends resStatusResponse {
137
144
  state: ImportState;
138
145
  row_count: number;
139
146
  id_list: number[];
@@ -143,8 +150,7 @@ export interface GetImportStateResponse {
143
150
  segment_ids: number[];
144
151
  create_ts: number;
145
152
  }
146
- export interface ListImportTasksResponse {
147
- status: ResStatus;
153
+ export interface ListImportTasksResponse extends resStatusResponse {
148
154
  tasks: GetImportStateResponse[];
149
155
  }
150
156
  export interface GetMetricsRequest extends GrpcTimeOut {
@@ -160,8 +166,7 @@ export interface SearchParam {
160
166
  round_decimal?: number;
161
167
  ignore_growing?: boolean;
162
168
  }
163
- export interface SearchSimpleReq extends GrpcTimeOut {
164
- collection_name: string;
169
+ export interface SearchSimpleReq extends collectionNameReq {
165
170
  vector?: number[];
166
171
  vectors?: number[][];
167
172
  data?: number[][] | number[];
@@ -177,8 +182,7 @@ export interface SearchSimpleReq extends GrpcTimeOut {
177
182
  consistency_level?: ConsistencyLevelEnum;
178
183
  ignore_growing?: boolean;
179
184
  }
180
- export interface SearchReq extends GrpcTimeOut {
181
- collection_name: string;
185
+ export interface SearchReq extends collectionNameReq {
182
186
  partition_names?: string[];
183
187
  expr?: string;
184
188
  search_params: SearchParam;
@@ -189,8 +193,7 @@ export interface SearchReq extends GrpcTimeOut {
189
193
  nq?: number;
190
194
  consistency_level?: ConsistencyLevelEnum;
191
195
  }
192
- export interface SearchRes {
193
- status: ResStatus;
196
+ export interface SearchRes extends resStatusResponse {
194
197
  results: {
195
198
  top_k: number;
196
199
  fields_data: {
@@ -226,8 +229,7 @@ export interface SearchRes {
226
229
  output_fields: string[];
227
230
  };
228
231
  }
229
- export interface QueryReq extends GrpcTimeOut {
230
- collection_name: string;
232
+ export interface QueryReq extends collectionNameReq {
231
233
  output_fields?: string[];
232
234
  partition_names?: string[];
233
235
  expr?: string;
@@ -236,8 +238,7 @@ export interface QueryReq extends GrpcTimeOut {
236
238
  limit?: number;
237
239
  consistency_level?: ConsistencyLevelEnum;
238
240
  }
239
- export interface GetReq extends GrpcTimeOut {
240
- collection_name: string;
241
+ export interface GetReq extends collectionNameReq {
241
242
  ids: string[] | number[];
242
243
  output_fields?: string[];
243
244
  partition_names?: string[];
@@ -245,8 +246,7 @@ export interface GetReq extends GrpcTimeOut {
245
246
  limit?: number;
246
247
  consistency_level?: ConsistencyLevelEnum;
247
248
  }
248
- export interface QueryRes {
249
- status: ResStatus;
249
+ export interface QueryRes extends resStatusResponse {
250
250
  fields_data: {
251
251
  type: DataType;
252
252
  field_name: string;
@@ -268,23 +268,20 @@ export interface QueryRes {
268
268
  output_fields: string[];
269
269
  collection_name: string;
270
270
  }
271
- export interface FlushResult {
272
- status: ResStatus;
271
+ export interface FlushResult extends resStatusResponse {
273
272
  coll_segIDs: any;
274
273
  }
275
- export interface ListIndexedSegmentReq extends CollectionNameReq {
274
+ export interface ListIndexedSegmentReq extends collectionNameReq {
276
275
  index_name: string;
277
276
  }
278
- export interface ListIndexedSegmentResponse {
279
- status: ResStatus;
277
+ export interface ListIndexedSegmentResponse extends resStatusResponse {
280
278
  segmentIDs: number[];
281
279
  }
282
- export interface DescribeSegmentIndexDataReq extends CollectionNameReq {
280
+ export interface DescribeSegmentIndexDataReq extends collectionNameReq {
283
281
  index_name: string;
284
282
  segmentsIDs: number[];
285
283
  }
286
- export interface DescribeSegmentIndexDataResponse {
287
- status: ResStatus;
284
+ export interface DescribeSegmentIndexDataResponse extends resStatusResponse {
288
285
  index_params: any;
289
286
  index_data: any;
290
287
  }
@@ -1,12 +1,13 @@
1
- import { GrpcTimeOut, ResStatus } from './Common';
2
- export interface CreateDatabaseRequest extends GrpcTimeOut {
1
+ import { GrpcTimeOut, resStatusResponse } from './Common';
2
+ export interface databaseReq extends GrpcTimeOut {
3
3
  db_name: string;
4
4
  }
5
- export interface ListDatabasesRequest extends GrpcTimeOut {
5
+ export interface CreateDatabaseRequest extends databaseReq {
6
+ }
7
+ export interface DropDatabasesRequest extends databaseReq {
6
8
  }
7
- export interface DropDatabasesRequest extends CreateDatabaseRequest {
9
+ export interface ListDatabasesRequest extends GrpcTimeOut {
8
10
  }
9
- export interface ListDatabasesResponse {
11
+ export interface ListDatabasesResponse extends resStatusResponse {
10
12
  db_names: string[];
11
- status: ResStatus;
12
13
  }
@@ -1,6 +1,5 @@
1
- import { DataType, MetricType, CreateIndexParam } from '../';
2
- export interface CreateColReq {
3
- collection_name: string;
1
+ import { DataType, MetricType, CreateIndexParam, collectionNameReq } from '../';
2
+ export interface CreateColReq extends collectionNameReq {
4
3
  dimension: number;
5
4
  primary_field_name?: string;
6
5
  id_type?: DataType.Int64 | DataType.VarChar;
@@ -0,0 +1,94 @@
1
+ import { FloatVectors } from '..';
2
+ export type Constructor<T = {}> = new (...args: any[]) => T;
3
+ type HttpClientConfigBase = {
4
+ database?: string;
5
+ version?: string;
6
+ token?: string;
7
+ username?: string;
8
+ password?: string;
9
+ timeout?: number;
10
+ };
11
+ type HttpClientConfigAddress = HttpClientConfigBase & {
12
+ endpoint: string;
13
+ baseURL?: string;
14
+ };
15
+ type HttpClientConfigBaseURL = HttpClientConfigBase & {
16
+ endpoint?: string;
17
+ baseURL: string;
18
+ };
19
+ export type HttpClientConfig = HttpClientConfigAddress | HttpClientConfigBaseURL;
20
+ export interface HttpBaseReq {
21
+ dbName?: string;
22
+ collectionName: string;
23
+ }
24
+ export interface HttpBaseResponse<T = {}> {
25
+ code: number;
26
+ data: T;
27
+ message?: string;
28
+ }
29
+ export interface HttpCollectionCreateReq extends HttpBaseReq {
30
+ dimension: number;
31
+ metricType: string;
32
+ primaryField: string;
33
+ vectorField: string;
34
+ description?: string;
35
+ }
36
+ export interface HttpCollectionListReq extends Omit<HttpBaseReq, 'collectionName'> {
37
+ }
38
+ type Field = {
39
+ autoId?: boolean;
40
+ description: string;
41
+ primaryKey?: boolean;
42
+ type: string;
43
+ };
44
+ type Index = {
45
+ fieldName: string;
46
+ indexName: string;
47
+ metricType: string;
48
+ };
49
+ export interface HttpCollectionDescribeResponse extends HttpBaseResponse<{
50
+ collectionName: string;
51
+ description: string;
52
+ fields: Field[];
53
+ indexes: Index[];
54
+ load: string;
55
+ shardsNum: number;
56
+ enableDynamic: boolean;
57
+ }> {
58
+ }
59
+ export interface HttpCollectionListResponse extends HttpBaseResponse<string[]> {
60
+ }
61
+ export interface HttpVectorInsertReq extends HttpBaseReq {
62
+ data: Record<string, any>[];
63
+ }
64
+ export interface HttpVectorInsertResponse extends HttpBaseResponse<{
65
+ insertCount: number;
66
+ insertIds: number | string[];
67
+ }> {
68
+ }
69
+ export interface HttpVectorGetReq extends HttpBaseReq {
70
+ id: number | number[] | string | string[];
71
+ outputFields: string[];
72
+ }
73
+ export interface HttpVectorDeleteReq extends Omit<HttpVectorGetReq, 'outputFields'> {
74
+ }
75
+ export interface HttpVectorQueryReq extends HttpBaseReq {
76
+ outputFields: string[];
77
+ filter?: string;
78
+ limit?: number;
79
+ offset?: number;
80
+ params?: Record<string, string | number>;
81
+ }
82
+ type QueryResult = Record<string, any>[];
83
+ export interface HttpVectorQueryResponse extends HttpBaseResponse<QueryResult> {
84
+ }
85
+ export interface HttpVectorSearchReq extends Omit<HttpVectorQueryReq, 'filter'> {
86
+ vector: FloatVectors;
87
+ filter?: string;
88
+ }
89
+ export interface HttpVectorSearchResponse extends HttpVectorQueryResponse {
90
+ data: QueryResult & {
91
+ distance: number | string;
92
+ };
93
+ }
94
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Http.js","sourceRoot":"","sources":["../../../milvus/types/Http.ts"],"names":[],"mappings":""}
@@ -1,43 +1,31 @@
1
1
  import { KeyValuePair, IndexState, keyValueObj } from '../';
2
- import { GrpcTimeOut, ResStatus } from './Common';
2
+ import { resStatusResponse, collectionNameReq } from './Common';
3
3
  export interface CreateIndexParam {
4
4
  index_type?: string;
5
5
  metric_type: string;
6
6
  params?: string;
7
7
  }
8
- export interface CreateIndexReq extends GrpcTimeOut {
9
- collection_name: string;
8
+ export interface CreateIndexReq extends collectionNameReq {
10
9
  field_name: string;
11
10
  index_name?: string;
12
11
  extra_params?: CreateIndexParam;
13
12
  }
14
- export interface CreateIndexSimpleReq extends GrpcTimeOut {
15
- collection_name: string;
13
+ export interface CreateIndexSimpleReq extends collectionNameReq {
16
14
  field_name: string;
17
15
  index_type?: string;
18
16
  metric_type?: string;
19
17
  index_name?: string;
20
18
  params?: keyValueObj;
21
19
  }
22
- export interface DescribeIndexReq extends GrpcTimeOut {
23
- collection_name: string;
20
+ export interface DescribeIndexReq extends collectionNameReq {
24
21
  field_name?: string;
25
22
  index_name?: string;
26
23
  }
27
- export interface GetIndexStateReq extends GrpcTimeOut {
28
- collection_name: string;
29
- field_name?: string;
30
- index_name?: string;
24
+ export interface GetIndexStateReq extends DescribeIndexReq {
31
25
  }
32
- export interface GetIndexBuildProgressReq extends GrpcTimeOut {
33
- collection_name: string;
34
- field_name?: string;
35
- index_name?: string;
26
+ export interface GetIndexBuildProgressReq extends DescribeIndexReq {
36
27
  }
37
- export interface DropIndexReq extends GrpcTimeOut {
38
- collection_name: string;
39
- field_name: string;
40
- index_name?: string;
28
+ export interface DropIndexReq extends DescribeIndexReq {
41
29
  }
42
30
  export interface IndexDescription {
43
31
  index_name: string;
@@ -50,16 +38,13 @@ export interface IndexDescription {
50
38
  index_state_fail_reason: string;
51
39
  pending_index_rows: string;
52
40
  }
53
- export interface DescribeIndexResponse {
54
- status: ResStatus;
41
+ export interface DescribeIndexResponse extends resStatusResponse {
55
42
  index_descriptions: IndexDescription[];
56
43
  }
57
- export interface GetIndexStateResponse {
58
- status: ResStatus;
44
+ export interface GetIndexStateResponse extends resStatusResponse {
59
45
  state: IndexState;
60
46
  }
61
- export interface GetIndexBuildProgressResponse {
62
- status: ResStatus;
47
+ export interface GetIndexBuildProgressResponse extends resStatusResponse {
63
48
  indexed_rows: number;
64
49
  total_rows: number;
65
50
  }
@@ -1,6 +1,5 @@
1
- import { GrpcTimeOut, ResStatus, TimeStampArray } from './Common';
2
- interface PartitionParent extends GrpcTimeOut {
3
- collection_name: string;
1
+ import { ResStatus, TimeStampArray, collectionNameReq } from './Common';
2
+ interface PartitionParent extends collectionNameReq {
4
3
  partition_name: string;
5
4
  }
6
5
  export interface CreatePartitionReq extends PartitionParent {
@@ -11,17 +10,14 @@ export interface DropPartitionReq extends PartitionParent {
11
10
  }
12
11
  export interface GetPartitionStatisticsReq extends PartitionParent {
13
12
  }
14
- export interface ShowPartitionsReq extends GrpcTimeOut {
15
- collection_name: string;
13
+ export interface ShowPartitionsReq extends collectionNameReq {
16
14
  }
17
- export interface LoadPartitionsReq extends GrpcTimeOut {
18
- collection_name: string;
15
+ export interface LoadPartitionsReq extends collectionNameReq {
19
16
  partition_names: string[];
20
17
  replica_number?: number;
21
18
  resource_groups?: string[];
22
19
  }
23
- export interface ReleasePartitionsReq extends GrpcTimeOut {
24
- collection_name: string;
20
+ export interface ReleasePartitionsReq extends collectionNameReq {
25
21
  partition_names: string[];
26
22
  }
27
23
  export interface ShowPartitionsResponse extends TimeStampArray {
@@ -1,12 +1,10 @@
1
- import { GrpcTimeOut, ResStatus } from './Common';
1
+ import { GrpcTimeOut, resStatusResponse } from './Common';
2
2
  export interface CreateResourceGroupReq extends GrpcTimeOut {
3
3
  resource_group: string;
4
4
  }
5
- export interface DropResourceGroupsReq extends GrpcTimeOut {
6
- resource_group: string;
5
+ export interface DropResourceGroupsReq extends CreateResourceGroupReq {
7
6
  }
8
- export interface DescribeResourceGroupsReq extends GrpcTimeOut {
9
- resource_group: string;
7
+ export interface DescribeResourceGroupsReq extends CreateResourceGroupReq {
10
8
  }
11
9
  export interface TransferNodeReq extends GrpcTimeOut {
12
10
  source_resource_group: string;
@@ -19,9 +17,8 @@ export interface TransferReplicaReq extends GrpcTimeOut {
19
17
  collection_name: string;
20
18
  num_replica: number;
21
19
  }
22
- export interface ListResourceGroupsResponse {
20
+ export interface ListResourceGroupsResponse extends resStatusResponse {
23
21
  resource_groups: string[];
24
- status: ResStatus;
25
22
  }
26
23
  type ResourceGroup = {
27
24
  name: string;
@@ -37,8 +34,7 @@ type ResourceGroup = {
37
34
  [key: string]: number;
38
35
  };
39
36
  };
40
- export interface DescribeResourceGroupResponse {
37
+ export interface DescribeResourceGroupResponse extends resStatusResponse {
41
38
  resource_group: ResourceGroup;
42
- status: ResStatus;
43
39
  }
44
40
  export {};
@@ -1,10 +1,3 @@
1
- export declare enum ErrorCode {
2
- SUCCESS = "Success",
3
- INDEX_NOT_EXIST = "IndexNotExist",
4
- UNEXPECTED_ERROR = "UnexpectedError",
5
- EMPTY_COLLECTION = "EmptyCollection",
6
- UPSERT_AUTO_ID_TRUE = "UpsertAutoIDTrue"
7
- }
8
1
  export interface GetVersionResponse {
9
2
  version: string;
10
3
  }
@@ -1,34 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ErrorCode = void 0;
4
- var ErrorCode;
5
- (function (ErrorCode) {
6
- ErrorCode["SUCCESS"] = "Success";
7
- ErrorCode["INDEX_NOT_EXIST"] = "IndexNotExist";
8
- ErrorCode["UNEXPECTED_ERROR"] = "UnexpectedError";
9
- ErrorCode["EMPTY_COLLECTION"] = "EmptyCollection";
10
- ErrorCode["UPSERT_AUTO_ID_TRUE"] = "UpsertAutoIDTrue";
11
- // CONNECT_FAILED = "CONNECT_FAILED",
12
- // PERMISSION_DENIED = "PERMISSION_DENIED",
13
- // COLLECTION_NOT_EXISTS = "COLLECTION_NOT_EXISTS",
14
- // ILLEGAL_ARGUMENT = "ILLEGAL_ARGUMENT",
15
- // ILLEGAL_DIMENSION = "ILLEGAL_DIMENSION",
16
- // ILLEGAL_INDEX_TYPE = "ILLEGAL_INDEX_TYPE",
17
- // ILLEGAL_COLLECTION_NAME = "ILLEGAL_COLLECTION_NAME",
18
- // ILLEGAL_TOPK = "ILLEGAL_TOPK",
19
- // ILLEGAL_ROWRECORD = "ILLEGAL_ROWRECORD",
20
- // ILLEGAL_VECTOR_ID = "ILLEGAL_VECTOR_ID",
21
- // ILLEGAL_SEARCH_RESULT = "ILLEGAL_SEARCH_RESULT",
22
- // FILE_NOT_FOUND = "FILE_NOT_FOUND",
23
- // META_FAILED = "META_FAILED",
24
- // CACHE_FAILED = "CACHE_FAILED",
25
- // CANNOT_CREATE_FOLDER = "CANNOT_CREATE_FOLDER",
26
- // CANNOT_CREATE_FILE = "CANNOT_CREATE_FILE",
27
- // CANNOT_DELETE_FOLDER = "CANNOT_DELETE_FOLDER",
28
- // CANNOT_DELETE_FILE = "CANNOT_DELETE_FILE",
29
- // BUILD_INDEX_ERROR = "BUILD_INDEX_ERROR",
30
- // ILLEGAL_NLIST = "ILLEGAL_NLIST",
31
- // ILLEGAL_METRIC_TYPE = "ILLEGAL_METRIC_TYPE",
32
- // OUT_OF_MEMORY = "OUT_OF_MEMORY",
33
- })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
34
3
  //# sourceMappingURL=Response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":";;;AAAA,IAAY,SA4BX;AA5BD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,8CAAiC,CAAA;IACjC,iDAAoC,CAAA;IACpC,iDAAoC,CAAA;IACpC,qDAAwC,CAAA;IACxC,qCAAqC;IACrC,2CAA2C;IAC3C,mDAAmD;IACnD,yCAAyC;IACzC,2CAA2C;IAC3C,6CAA6C;IAC7C,uDAAuD;IACvD,iCAAiC;IACjC,2CAA2C;IAC3C,2CAA2C;IAC3C,mDAAmD;IACnD,qCAAqC;IACrC,+BAA+B;IAC/B,iCAAiC;IACjC,iDAAiD;IACjD,6CAA6C;IAC7C,iDAAiD;IACjD,6CAA6C;IAC7C,2CAA2C;IAC3C,mCAAmC;IACnC,+CAA+C;IAC/C,mCAAmC;AACrC,CAAC,EA5BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA4BpB"}
1
+ {"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":""}