@zilliz/milvus2-sdk-node 2.2.2 → 2.2.4

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 (63) hide show
  1. package/dist/milvus/Client.d.ts +0 -8
  2. package/dist/milvus/Client.js +0 -17
  3. package/dist/milvus/Client.js.map +1 -1
  4. package/dist/milvus/Collection.d.ts +225 -131
  5. package/dist/milvus/Collection.js +262 -155
  6. package/dist/milvus/Collection.js.map +1 -1
  7. package/dist/milvus/Data.d.ts +129 -125
  8. package/dist/milvus/Data.js +157 -150
  9. package/dist/milvus/Data.js.map +1 -1
  10. package/dist/milvus/MilvusIndex.d.ts +57 -53
  11. package/dist/milvus/MilvusIndex.js +61 -55
  12. package/dist/milvus/MilvusIndex.js.map +1 -1
  13. package/dist/milvus/Partition.d.ts +86 -79
  14. package/dist/milvus/Partition.js +89 -80
  15. package/dist/milvus/Partition.js.map +1 -1
  16. package/dist/milvus/Resource.d.ts +173 -0
  17. package/dist/milvus/Resource.js +356 -0
  18. package/dist/milvus/Resource.js.map +1 -0
  19. package/dist/milvus/User.d.ts +119 -93
  20. package/dist/milvus/User.js +133 -100
  21. package/dist/milvus/User.js.map +1 -1
  22. package/dist/milvus/Utils.d.ts +1 -1
  23. package/dist/milvus/const/Milvus.d.ts +272 -0
  24. package/dist/milvus/const/Milvus.js +375 -0
  25. package/dist/milvus/const/Milvus.js.map +1 -0
  26. package/dist/milvus/index.d.ts +3 -1
  27. package/dist/milvus/index.js +8 -5
  28. package/dist/milvus/index.js.map +1 -1
  29. package/dist/milvus/types/Collection.d.ts +88 -8
  30. package/dist/milvus/types/Collection.js +1 -9
  31. package/dist/milvus/types/Collection.js.map +1 -1
  32. package/dist/milvus/types/Common.d.ts +11 -267
  33. package/dist/milvus/types/Common.js +1 -369
  34. package/dist/milvus/types/Common.js.map +1 -1
  35. package/dist/milvus/types/Data.d.ts +154 -1
  36. package/dist/milvus/types/Index.d.ts +20 -1
  37. package/dist/milvus/types/Partition.d.ts +8 -1
  38. package/dist/milvus/types/Resource.d.ts +44 -0
  39. package/dist/milvus/types/{Search.js → Resource.js} +1 -1
  40. package/dist/milvus/types/Resource.js.map +1 -0
  41. package/dist/milvus/types/Response.d.ts +0 -246
  42. package/dist/milvus/types/Response.js.map +1 -1
  43. package/dist/milvus/types/User.d.ts +53 -1
  44. package/dist/milvus/types.d.ts +8 -7
  45. package/dist/milvus/types.js +2 -1
  46. package/dist/milvus/types.js.map +1 -1
  47. package/dist/milvus/utils/Format.d.ts +12 -11
  48. package/dist/milvus/utils/Format.js +27 -18
  49. package/dist/milvus/utils/Format.js.map +1 -1
  50. package/dist/milvus/utils/Validate.d.ts +12 -0
  51. package/dist/milvus/utils/Validate.js +27 -5
  52. package/dist/milvus/utils/Validate.js.map +1 -1
  53. package/dist/proto/proto/common.proto +25 -2
  54. package/dist/proto/proto/google/protobuf/descriptor.proto +30 -0
  55. package/dist/proto/proto/milvus.proto +126 -0
  56. package/dist/proto/proto/msg.proto +107 -0
  57. package/dist/sdk.json +1 -1
  58. package/dist/utils/index.d.ts +0 -6
  59. package/dist/utils/index.js +5 -32
  60. package/dist/utils/index.js.map +1 -1
  61. package/package.json +5 -10
  62. package/dist/milvus/types/Search.d.ts +0 -81
  63. package/dist/milvus/types/Search.js.map +0 -1
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
29
29
  function verb(n) { return function (v) { return step([n, v]); }; }
30
30
  function step(op) {
31
31
  if (f) throw new TypeError("Generator is already executing.");
32
- while (_) try {
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
33
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
34
  if (y = 0, t) op = [op[0] & 2, t.value];
35
35
  switch (op[0]) {
@@ -55,6 +55,7 @@ exports.Partition = void 0;
55
55
  var utils_1 = require("../utils");
56
56
  var Client_1 = require("./Client");
57
57
  var ErrorReason_1 = require("./const/ErrorReason");
58
+ var Validate_1 = require("./utils/Validate");
58
59
  var Format_1 = require("./utils/Format");
59
60
  var Partition = /** @class */ (function (_super) {
60
61
  __extends(Partition, _super);
@@ -65,17 +66,18 @@ var Partition = /** @class */ (function (_super) {
65
66
  * Create a partition in a collection.
66
67
  *
67
68
  * @param data
68
- * | Property | Type | Description |
69
- * | :----------------- | :---- | :------------------------------- |
70
- * | collection_name | String | Collection name |
71
- * | partition_name | String | Partition name |
72
- * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
69
+ * | Property | Type | Description |
70
+ * | :-- | :-- | :-- |
71
+ * | collection_name | String | Collection name |
72
+ * | partition_name | String | Partition name |
73
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
74
+
73
75
  *
74
- * @return
75
- * | Property | Description |
76
- * | :-------------| :-------- |
77
- * | error_code | Error code number |
78
- * | reason | Error cause | *
76
+ * @returns
77
+ * | Property | Description |
78
+ * | :-- | :-- |
79
+ * | error_code | Error code number |
80
+ * | reason | Error cause |
79
81
  *
80
82
  * #### Example
81
83
  *
@@ -92,7 +94,7 @@ var Partition = /** @class */ (function (_super) {
92
94
  return __generator(this, function (_a) {
93
95
  switch (_a.label) {
94
96
  case 0:
95
- this.checkCollectionAndPartitionName(data);
97
+ (0, Validate_1.checkCollectionAndPartitionName)(data);
96
98
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'CreatePartition', data, data.timeout)];
97
99
  case 1:
98
100
  promise = _a.sent();
@@ -105,17 +107,18 @@ var Partition = /** @class */ (function (_super) {
105
107
  * Check if a partition exists in a collection.
106
108
  *
107
109
  * @param data
108
- * | Property | Type | Description |
109
- * | :----------------- | :---- | :------------------------------- |
110
- * | collection_name | string | Collection name |
111
- * | partition_name | string | Parititon name |
112
- * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
110
+ * | Property | Type | Description |
111
+ * | :-- | :-- | :-- |
112
+ * | collection_name | string | Collection name |
113
+ * | partition_name | string | Parititon name |
114
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
115
+
113
116
  *
114
- * @return
115
- * | Property | Description |
116
- * | :-------------| :------------------------------- |
117
- * | status | { error_code: number,reason:string }|
118
- * | value | `true` or `false` |
117
+ * @returns
118
+ * | Property | Description |
119
+ * | :-- | :-- |
120
+ * | status | { error_code: number,reason:string } |
121
+ * | value | `true` or `false` |
119
122
  *
120
123
  * #### Example
121
124
  *
@@ -132,7 +135,7 @@ var Partition = /** @class */ (function (_super) {
132
135
  return __generator(this, function (_a) {
133
136
  switch (_a.label) {
134
137
  case 0:
135
- this.checkCollectionAndPartitionName(data);
138
+ (0, Validate_1.checkCollectionAndPartitionName)(data);
136
139
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'HasPartition', data, data.timeout)];
137
140
  case 1:
138
141
  promise = _a.sent();
@@ -145,17 +148,18 @@ var Partition = /** @class */ (function (_super) {
145
148
  * Show all partitions in a collection.
146
149
  *
147
150
  * @param data
148
- * | Property | Type | Description |
149
- * | :----------------- | :---- | :------------------------------- |
150
- * | collection_name | String | Collection name |
151
- * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
151
+ * | Property | Type | Description |
152
+ * | :-- | :-- | :-- |
153
+ * | collection_name | String | Collection name |
154
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
155
+
152
156
  *
153
- * @return
154
- * | Property | Description |
155
- * | :-------------| :------------------------------- |
156
- * | status | { error_code: number, reason: string }|
157
- * | partition_names | Array of partition names |
158
- * | partitionIDs | Array of partition IDs |
157
+ * @returns
158
+ * | Property | Description |
159
+ * | :-- | :-- |
160
+ * | status | { error_code: number, reason: string } |
161
+ * | partition_names | Array of partition names |
162
+ * | partitionIDs | Array of partition IDs |
159
163
  *
160
164
  *
161
165
  * #### Example
@@ -172,7 +176,7 @@ var Partition = /** @class */ (function (_super) {
172
176
  return __generator(this, function (_a) {
173
177
  switch (_a.label) {
174
178
  case 0:
175
- this.checkCollectionName(data);
179
+ (0, Validate_1.checkCollectionName)(data);
176
180
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'ShowPartitions', data, data.timeout)];
177
181
  case 1:
178
182
  promise = _a.sent();
@@ -185,18 +189,19 @@ var Partition = /** @class */ (function (_super) {
185
189
  * Show the statistics information of a partition.
186
190
  *
187
191
  * @param data
188
- * | Property | Type | Description |
189
- * | :----------------- | :---- | :------------------------------- |
190
- * | collection_name | String | Collection name |
191
- * | partition_name | String | Partition name |
192
- * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
192
+ * | Property | Type | Description |
193
+ * | :-- | :-- | :-- |
194
+ * | collection_name | String | Collection name |
195
+ * | partition_name | String | Partition name |
196
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
197
+
193
198
  *
194
- * @return
195
- * | Property | Description |
196
- * | :-------------| :------------------------------- |
197
- * | status | { error_code: number, reason: string }|
198
- * | stats | [{key: string, value: string}] |
199
- * | data | { row_count: 0 } transformed from **stats** |
199
+ * @returns
200
+ * | Property | Description |
201
+ * | :-- | :-- |
202
+ * | status | { error_code: number, reason: string } |
203
+ * | stats | [{key: string, value: string}] |
204
+ * | data | { row_count: 0 } transformed from **stats** |
200
205
  *
201
206
  *
202
207
  * #### Example
@@ -214,7 +219,7 @@ var Partition = /** @class */ (function (_super) {
214
219
  return __generator(this, function (_a) {
215
220
  switch (_a.label) {
216
221
  case 0:
217
- this.checkCollectionAndPartitionName(data);
222
+ (0, Validate_1.checkCollectionAndPartitionName)(data);
218
223
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetPartitionStatistics', data, data.timeout)];
219
224
  case 1:
220
225
  promise = _a.sent();
@@ -225,20 +230,22 @@ var Partition = /** @class */ (function (_super) {
225
230
  });
226
231
  };
227
232
  /**
228
- * Load a partition into cache.
233
+ * Load multiple partitions into query nodes.
229
234
  *
230
235
  * @param data
231
- * | Property | Type | Description |
232
- * | :----------------- | :---- | :------------------------------- |
233
- * | collection_name | String | Collection name |
234
- * | partition_names | String[] | Array of partition names |
235
- * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
236
+ * | Property | Type | Description |
237
+ * | :--- | :-- | :-- |
238
+ * | collection_name | String | Collection name |
239
+ * | partition_names | String[] | Array of partition names |
240
+ * | replica_number? | number | replica number |
241
+ * | resource_groups | String[] | resource group names |
242
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
236
243
  *
237
- * @return
238
- * | Property | Description |
239
- * | :-------------| :-------- |
240
- * | error_code | Error code number |
241
- * | reason | Error cause | *
244
+ * @returns
245
+ * | Property | Description |
246
+ * | :-- | :-- |
247
+ * | error_code | Error code number |
248
+ * | reason | Error cause |
242
249
  *
243
250
  * #### Example
244
251
  *
@@ -255,7 +262,7 @@ var Partition = /** @class */ (function (_super) {
255
262
  return __generator(this, function (_a) {
256
263
  switch (_a.label) {
257
264
  case 0:
258
- this.checkCollectionName(data);
265
+ (0, Validate_1.checkCollectionName)(data);
259
266
  if (!Array.isArray(data.partition_names) || !data.partition_names.length) {
260
267
  throw new Error(ErrorReason_1.ERROR_REASONS.PARTITION_NAMES_IS_REQUIRED);
261
268
  }
@@ -271,17 +278,18 @@ var Partition = /** @class */ (function (_super) {
271
278
  * Release a partition from cache.
272
279
  *
273
280
  * @param data
274
- * | Property | Type | Description |
275
- * | :----------------- | :---- | :------------------------------- |
276
- * | collection_name | String | Collection name |
277
- * | partition_names | String[] | Array of partition names |
278
- * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
281
+ * | Property | Type | Description |
282
+ * | :-- | :-- | :-- |
283
+ * | collection_name | String | Collection name |
284
+ * | partition_names | String[] | Array of partition names |
285
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
286
+
279
287
  *
280
- * @return
281
- * | Property | Description |
282
- * | :-------------| :-------- |
283
- * | error_code | Error code number |
284
- * | reason | Error cause | *
288
+ * @returns
289
+ * | Property | Description |
290
+ * | :-- | :-- |
291
+ * | error_code | Error code number |
292
+ * | reason | Error cause |
285
293
  *
286
294
  * #### Example
287
295
  *
@@ -298,7 +306,7 @@ var Partition = /** @class */ (function (_super) {
298
306
  return __generator(this, function (_a) {
299
307
  switch (_a.label) {
300
308
  case 0:
301
- this.checkCollectionName(data);
309
+ (0, Validate_1.checkCollectionName)(data);
302
310
  if (!Array.isArray(data.partition_names) || !data.partition_names.length) {
303
311
  throw new Error(ErrorReason_1.ERROR_REASONS.PARTITION_NAMES_IS_REQUIRED);
304
312
  }
@@ -320,17 +328,18 @@ var Partition = /** @class */ (function (_super) {
320
328
  * To drop a partition will drop all data in this partition and the `_default` partition cannot be dropped.
321
329
  *
322
330
  * @param data
323
- * | Property | Type | Description |
324
- * | :----------------- | :---- | :------------------------------- |
325
- * | collection_name | String | Collection name |
326
- * | partition_name | String | Partition name |
327
- * | timeout | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
331
+ * | Property | Type | Description |
332
+ * | :-- | :-- | :-- |
333
+ * | collection_name | String | Collection name |
334
+ * | partition_name | String | Partition name |
335
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
336
+
328
337
  *
329
- * @return
330
- * | Property | Description |
331
- * | :-------------| :-------- |
332
- * | error_code | Error code number |
333
- * | reason | Error cause | *
338
+ * @returns
339
+ * | Property | Description |
340
+ * | :-- | :-- |
341
+ * | error_code | Error code number |
342
+ * | reason | Error cause |
334
343
  *
335
344
  * #### Example
336
345
  *
@@ -347,7 +356,7 @@ var Partition = /** @class */ (function (_super) {
347
356
  return __generator(this, function (_a) {
348
357
  switch (_a.label) {
349
358
  case 0:
350
- this.checkCollectionAndPartitionName(data);
359
+ (0, Validate_1.checkCollectionAndPartitionName)(data);
351
360
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'DropPartition', data, data.timeout)];
352
361
  case 1:
353
362
  promise = _a.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../milvus/Partition.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAqC;AACrC,mCAAkC;AAClC,mDAAoD;AAgBpD,yCAAoD;AACpD;IAA+B,6BAAM;IAArC;;IA+QA,CAAC;IA9QC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,mCAAe,GAArB,UAAsB,IAAwB;;;;;;wBAC5C,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC;wBAC3B,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,MAAM,EACX,iBAAiB,EACjB,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,gCAAY,GAAlB,UAAmB,IAAqB;;;;;;wBACtC,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC;wBAC3B,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,MAAM,EACX,cAAc,EACd,IAAI,EACJ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ACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IACH,gBAAC;AAAD,CAAC,AAvRD,CAA+B,eAAM,GAuRpC;AAvRY,8BAAS"}
@@ -0,0 +1,173 @@
1
+ import { Client } from './Client';
2
+ import { ResStatus } from './types';
3
+ import { GrpcTimeOut, CreateResourceGroupReq, DropResourceGroupsReq, ListResourceGroupsResponse, DesribeResourceGroupsReq, DescribeResourceGroupResponse, TransferNodeReq, TransferReplicaReq } from './types';
4
+ export declare class Resource extends Client {
5
+ /**
6
+ * Create a resource group.
7
+ *
8
+ * @param data
9
+ * | Property | Type | Description |
10
+ * | :--- | :-- | :-- |
11
+ * | resource_group | String | Resource group name |
12
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
13
+ *
14
+ * @returns
15
+ * | Property | Type | Description |
16
+ * | :-- | :-- | :-- |
17
+ * | status.error_code | string | error code |
18
+ * | status.reason | string | error reason |
19
+ *
20
+ * #### Example
21
+ *
22
+ * ```
23
+ * new milvusClient(MILUVS_ADDRESS).resourceManager.createResourceGroup({
24
+ * resource_group: "vector_01",
25
+ * });
26
+ * ```
27
+ */
28
+ createResourceGroup(data: CreateResourceGroupReq): Promise<ResStatus>;
29
+ /**
30
+ * list resource groups.
31
+ *
32
+ * @returns
33
+ * | Property | Type | Description |
34
+ * | :-- | :-- | :-- |
35
+ * | status.error_code | string | error code |
36
+ * | status.reason | string | error reason |
37
+ * | resource_groups | string[] | Resource group string array |
38
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
39
+ *
40
+ * #### Example
41
+ *
42
+ * ```
43
+ * new milvusClient(MILUVS_ADDRESS).resourceManager.listResourceGroups();
44
+ * ```
45
+ */
46
+ listResourceGroups(data?: GrpcTimeOut): Promise<ListResourceGroupsResponse>;
47
+ /**
48
+ * Describe a resource group.
49
+ *
50
+ * @param data
51
+ * | Property | Type | Description |
52
+ * | :--- | :-- | :-- |
53
+ * | resource_group | String | Resource group name |
54
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
55
+ *
56
+ * @returns
57
+ * | Property | Type | Description |
58
+ * | :-- | :-- | :-- |
59
+ * | status.error_code | string | error code |
60
+ * | status.reason | string | error reason |
61
+ * | resource_group.capacity | number | num_node which has been transfer to this rg |
62
+ * | resource_group.num_available_node | number | available node_num, some node may shutdown |
63
+ * | resource_group.num_loaded_replica | { [key: string]: number } | from collection_name to loaded replica of each collecion in this rg |
64
+ * | resource_group.num_outgoing_node | { [key: string]: number } | from collection_name to outgoging accessed node num by replica loaded in this rg |
65
+ * | resource_group.num_incoming_node | { [key: string]: number } | from collection_name to incoming accessed node num by replica loaded in other rg |
66
+ *
67
+ * #### Example
68
+ *
69
+ * ```
70
+ * new milvusClient(MILUVS_ADDRESS).resourceManager.describeResrouceGroup({
71
+ * resource_group: 'my-resource-group'
72
+ * });
73
+ * ```
74
+ */
75
+ describeResourceGroup(data: DesribeResourceGroupsReq): Promise<DescribeResourceGroupResponse>;
76
+ /**
77
+ * drop a resource group.
78
+ * @param data
79
+ * | Property | Type | Description |
80
+ * | :--- | :-- | :-- |
81
+ * | resource_group | String | Resource group name |
82
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
83
+ *
84
+ * @returns
85
+ * | Property | Type | Description |
86
+ * | :-- | :-- | :-- |
87
+ * | status.error_code | string | error code |
88
+ * | status.reason | string | error reason |
89
+ *
90
+ * #### Example
91
+ *
92
+ * ```
93
+ * new milvusClient(MILUVS_ADDRESS).resourceManager.dropResourceGroup({
94
+ * resource_group: 'my-resource-group'
95
+ * });
96
+ * ```
97
+ */
98
+ dropResourceGroup(data: DropResourceGroupsReq): Promise<ResStatus>;
99
+ /**
100
+ * transfer nodes from one resource group to another
101
+ * @param data
102
+ * | Property | Type | Description |
103
+ * | :--- | :-- | :-- |
104
+ * | source_resource_group | String | source resource group name |
105
+ * | target_resource_group | String | target resource group name |
106
+ * | collection_name | String | collection name |
107
+ * | num_replica | Number | number of replicas to transfer |
108
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
109
+ *
110
+ * @returns
111
+ * | Property | Type | Description |
112
+ * | :-- | :-- | :-- |
113
+ * | status.error_code | string | error code |
114
+ * | status.reason | string | error reason |
115
+ *
116
+ *
117
+ * #### Example
118
+ *
119
+ * ```
120
+ * new milvusClient(MILUVS_ADDRESS).resourceManager.transferNode({
121
+ * source_resource_group: 'source-resource-group',
122
+ * target_resource_group: 'target-resource-group',
123
+ * collection_name: 'my-collection',
124
+ * num_replica: 2
125
+ * });
126
+ * ```
127
+ */
128
+ transferReplica(data: TransferReplicaReq): Promise<ResStatus>;
129
+ /**
130
+ * transfer nodes from one resource group to another
131
+ * @param data
132
+ * | Property | Type | Description |
133
+ * | :--- | :-- | :-- |
134
+ * | source_resource_group | String | source resource group name |
135
+ * | target_resource_group | String | target resource group name |
136
+ * | num_node | Number | number of nodes to transfer |
137
+ * | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
138
+ *
139
+ * @returns
140
+ * | Property | Type | Description |
141
+ * | :-- | :-- | :-- |
142
+ * | status.error_code | string | error code |
143
+ * | status.reason | string | error reason |
144
+ *
145
+ *
146
+ * #### Example
147
+ *
148
+ * ```
149
+ * new milvusClient(MILUVS_ADDRESS).resourceManager.transferNode({
150
+ * source_resource_group: 'source-resource-group',
151
+ * target_resource_group: 'target-resource-group',
152
+ * num_node: 4
153
+ * });
154
+ * ```
155
+ */
156
+ transferNode(data: TransferNodeReq): Promise<ResStatus>;
157
+ /**
158
+ * drop all resource groups, transfer all nodes to the default group
159
+ *
160
+ * @returns
161
+ * | Property | Type | Description |
162
+ * | :-- | :-- | :-- |
163
+ * | status.error_code | string | error code |
164
+ * | status.reason | string[] | error reason |
165
+ *
166
+ * #### Example
167
+ *
168
+ * ```
169
+ * new milvusClient(MILUVS_ADDRESS).resourceManager.dropResourceGroups();
170
+ * ```
171
+ */
172
+ dropAllResourceGroups(): Promise<ResStatus[]>;
173
+ }