@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
@@ -1,21 +1,19 @@
1
1
  import { Client } from './Client';
2
- import { ListCredUsersResponse, ResStatus, SelectRoleResponse, SelectUserResponse, SelectGrantResponse, HasRoleResponse } from './types/Response';
3
- import { CreateUserReq, DeleteUserReq, ListUsersReq, UpdateUserReq, CreateRoleReq, DropRoleReq, AddUserToRoleReq, RemoveUserFromRoleReq, SelectRoleReq, SelectUserReq, OperateRolePrivilegeReq, SelectGrantReq, ListGrantsReq, HasRoleReq } from './types/User';
4
- import { GrpcTimeOut } from './types/Common';
2
+ import { CreateUserReq, DeleteUserReq, ListUsersReq, UpdateUserReq, CreateRoleReq, DropRoleReq, AddUserToRoleReq, RemoveUserFromRoleReq, SelectRoleReq, SelectUserReq, OperateRolePrivilegeReq, SelectGrantReq, ListGrantsReq, HasRoleReq, GrpcTimeOut, ListCredUsersResponse, ResStatus, SelectRoleResponse, SelectUserResponse, SelectGrantResponse, HasRoleResponse } from './types';
5
3
  export declare class User extends Client {
6
4
  /**
7
5
  * Create user in milvus
8
6
  *
9
7
  * @param data
10
- * | Property | Type | Description |
11
- * | :-------------- | :---- | :---- |
8
+ * | Property | Type | Description |
9
+ * | :-- | :-- | :-- |
12
10
  * | username | String | username |
13
11
  * | password | String | user password |
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 |
14
13
  *
15
- *
16
- * @return
14
+ * @returns
17
15
  * | Property | Description |
18
- * | :-------------| :-------- |
16
+ * | :-- | :-- |
19
17
  * | error_code | Error code number |
20
18
  * | reason | Error cause|
21
19
  *
@@ -34,23 +32,24 @@ export declare class User extends Client {
34
32
  *
35
33
  * @param data
36
34
  * | Property | Type | Description |
37
- * | :-------------- | :---- | :------ |
35
+ * | :-- | :-- | :-- |
38
36
  * | username | String | username |
39
37
  * | password | String | user password |
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 |
40
39
  *
41
- *
42
- * @return
40
+ * @returns
43
41
  * | Property | Description |
44
- * | :-------------| :-------- |
42
+ * | :-- | :-- |
45
43
  * | error_code | Error code number |
46
44
  * | reason | Error cause|
47
45
  *
48
46
  * #### Example
49
47
  *
50
48
  * ```
51
- * milvusClient.userManager.createUser({
49
+ * milvusClient.userManager.updateUser({
52
50
  * username: NAME,
53
- * password: PASSWORD,
51
+ * newPassword: PASSWORD,
52
+ * oldPassword: PASSWORD,
54
53
  * });
55
54
  * ```
56
55
  */
@@ -60,13 +59,13 @@ export declare class User extends Client {
60
59
  *
61
60
  * @param data
62
61
  * | Property | Type | Description |
63
- * | :-------------- | :---- | :-- |
62
+ * | :-- | :-- | :-- |
64
63
  * | username | String | username |
64
+ * | 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 |
65
65
  *
66
- *
67
- * @return
66
+ * @returns
68
67
  * | Property | Description |
69
- * | :-------------| :-------- |
68
+ * | :-- | :-- |
70
69
  * | error_code | Error code number |
71
70
  * | reason | Error cause|
72
71
  *
@@ -82,10 +81,15 @@ export declare class User extends Client {
82
81
  /**
83
82
  * List user in milvus
84
83
  *
85
- * @return
84
+ * @param data
85
+ * | Property | Type | Description |
86
+ * | :-- | :-- | :-- |
87
+ * | 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 |
88
+ *
89
+ * @returns
86
90
  * | Property | Description |
87
- * | :-------------| :-------- |
88
- * | status | { error_code: number, reason: string }|
91
+ * | :-- | :-- |
92
+ * | status | { error_code: number, reason: string } |
89
93
  * | usernames | string[] |
90
94
  *
91
95
  * #### Example
@@ -98,10 +102,16 @@ export declare class User extends Client {
98
102
  /**
99
103
  * Create user role
100
104
  *
101
- * @return
105
+ * @param data
106
+ * | Property | Type | Description |
107
+ * | :-- | :-- | :-- |
108
+ * | roleName | String | role name |
109
+ * | 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
+ *
111
+ * @returns
102
112
  * | Property | Description |
103
- * | :-------------| :-------- |
104
- * | status | { error_code: number, reason: string }|
113
+ * | :-- | :-- |
114
+ * | status | { error_code: number, reason: string } |
105
115
  * | reason | '' |
106
116
  *
107
117
  * #### Example
@@ -114,10 +124,16 @@ export declare class User extends Client {
114
124
  /**
115
125
  * Drop user role
116
126
  *
117
- * @return
127
+ * @param data
128
+ * | Property | Type | Description |
129
+ * | :-- | :-- | :-- |
130
+ * | roleName | String | User name |
131
+ * | 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 |
132
+ *
133
+ * @returns
118
134
  * | Property | Description |
119
- * | :-------------| :-------- |
120
- * | status | { error_code: number, reason: string }|
135
+ * | :-- | :-- |
136
+ * | status | { error_code: number, reason: string } |
121
137
  * | reason | '' |
122
138
  *
123
139
  * #### Example
@@ -130,10 +146,17 @@ export declare class User extends Client {
130
146
  /**
131
147
  * add user to role
132
148
  *
133
- * @return
149
+ * @param data
150
+ * | Property | Type | Description |
151
+ * | :-- | :-- | :-- |
152
+ * | username | String | User name |
153
+ * | roleName | String | Role 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
+ *
156
+ * @returns
134
157
  * | Property | Description |
135
- * | :-------------| :-------- |
136
- * | status | { error_code: number, reason: string }|
158
+ * | :-- | :-- |
159
+ * | status | { error_code: number, reason: string } |
137
160
  * | reason | '' |
138
161
  *
139
162
  * #### Example
@@ -146,10 +169,17 @@ export declare class User extends Client {
146
169
  /**
147
170
  * remove user from role
148
171
  *
149
- * @return
172
+ * @param data
173
+ * | Property | Type | Description |
174
+ * | :-- | :-- | :-- |
175
+ * | username | String | User name |
176
+ * | roleName | String | Role name |
177
+ * | 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 |
178
+ *
179
+ * @returns
150
180
  * | Property | Description |
151
- * | :-------------| :-------- |
152
- * | status | { error_code: number, reason: string }|
181
+ * | :-- | :-- |
182
+ * | status | { error_code: number, reason: string } |
153
183
  * | reason | '' |
154
184
  *
155
185
  * #### Example
@@ -164,15 +194,15 @@ export declare class User extends Client {
164
194
  *
165
195
  * @param data
166
196
  * | Property | Type | Description |
167
- * | :------- | :----- | :------------ |
168
- * | roleName | String | role name |
197
+ * | :-- | :-- | :-- |
198
+ * | roleName | String | Role name |
169
199
  * | includeUserInfo? | boolean | should result including user info, by default: true |
170
- * | 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 |
200
+ * | 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 |
171
201
 
172
- * @return
202
+ * @returns
173
203
  * | Property | Description |
174
- * | :-------------| :-------- |
175
- * | status | { error_code: number, reason: string }|
204
+ * | :-- | :-- |
205
+ * | status | { error_code: number, reason: string } |
176
206
  * | results | { users: {name: string}[]; role: {name: string} }[] |
177
207
  *
178
208
  * #### Example
@@ -187,13 +217,13 @@ export declare class User extends Client {
187
217
  *
188
218
  * @param data
189
219
  * | Property | Type | Description |
190
- * | :------- | :----- | :------------ |
191
- * | 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 |
220
+ * | :-- | :-- | :-- |
221
+ * | 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
222
  *
193
- * @return
223
+ * @returns
194
224
  * | Property | Description |
195
- * | :-------------| :-------- |
196
- * | status | { error_code: number, reason: string }|
225
+ * | :-- | :-- |
226
+ * | status | { error_code: number, reason: string } |
197
227
  * | reason | '' |
198
228
  *
199
229
  * #### Example
@@ -208,15 +238,15 @@ export declare class User extends Client {
208
238
  *
209
239
  * @param data
210
240
  * | Property | Type | Description |
211
- * | :------- | :----- | :------------ |
212
- * | userName | String | user name |
241
+ * | :-- | :-- | :-- |
242
+ * | userName | String | User name |
213
243
  * | includeUserInfo? | boolean | should result including user info, by default: true |
214
- * | 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 |
244
+ * | 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 |
215
245
  *
216
- * @return
246
+ * @returns
217
247
  * | Property | Description |
218
- * | :-------------| :-------- |
219
- * | status | { error_code: number, reason: string }|
248
+ * | :-- | :-- |
249
+ * | status | { error_code: number, reason: string } |
220
250
  * | results | user: {name: string}; roles: {name: string}[] |
221
251
  *
222
252
  * #### Example
@@ -231,17 +261,17 @@ export declare class User extends Client {
231
261
  *
232
262
  * @param data
233
263
  * | Property | Type | Description |
234
- * | :------- | :----- | :------------ |
235
- * | roleName | String | role name |
264
+ * | :-- | :-- | :-- |
265
+ * | roleName | String | Role name |
236
266
  * | object | string | Type of the operational object to which the specified privilege belongs, such as Collection, Index, Partition, etc. This parameter is case-sensitive.|
237
267
  * | objectName | string | Name of the object to which the role is granted the specified prvilege. |
238
268
  * | privilegeName | string | Name of the privilege to be granted to the role. This parameter is case-sensitive. |
239
- * | 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 |
269
+ * | 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 |
240
270
  *
241
- * @return
271
+ * @returns
242
272
  * | Property | Description |
243
- * | :-------------| :-------- |
244
- * | status | { error_code: number, reason: string }|
273
+ * | :-- | :-- |
274
+ * | status | { error_code: number, reason: string } |
245
275
  * | reason | '' |
246
276
  *
247
277
  * #### Example
@@ -261,17 +291,17 @@ export declare class User extends Client {
261
291
  *
262
292
  * @param data
263
293
  * | Property | Type | Description |
264
- * | :------- | :----- | :------------ |
265
- * | roleName | String | role name |
294
+ * | :-- | :-- | :-- |
295
+ * | roleName | String | Role name |
266
296
  * | object | string | Type of the operational object to which the specified privilege belongs, such as Collection, Index, Partition, etc. This parameter is case-sensitive.|
267
297
  * | objectName | string | Name of the object to which the role is granted the specified prvilege. |
268
298
  * | privilegeName | string | Name of the privilege to be granted to the role. This parameter is case-sensitive. |
269
- * | 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 |
299
+ * | 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 |
270
300
  *
271
- * @return
301
+ * @returns
272
302
  * | Property | Description |
273
303
  * | :------------- | :-------- |
274
- * | status | { error_code: number, reason: string }|
304
+ * | status | { error_code: number, reason: string } |
275
305
  * | reason | '' |
276
306
  *
277
307
  * #### Example
@@ -290,42 +320,38 @@ export declare class User extends Client {
290
320
  * revoke all roles priviledges
291
321
  * @param data
292
322
  * | Property | Type | Description |
293
- * | :------- | :----- | :------------ |
294
- * | roleName | String | role name |
295
- * | object | string | Type of the operational object to which the specified privilege belongs, such as Collection, Index, Partition, etc. This parameter is case-sensitive.|
296
- * | objectName | string | Name of the object to which the role is granted the specified prvilege. |
297
- * | privilegeName | string | Name of the privilege to be granted to the role. This parameter is case-sensitive. |
298
- * | 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 |
323
+ * | :-- | :-- | :-- |
324
+ * | 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 |
299
325
  *
300
- * @return
326
+ * @returns
301
327
  * | Property | Description |
302
- * | :-------------| :-------- |
303
- * | status | { error_code: number, reason: string }|
304
- * | reason | '' |
328
+ * | :-- | :-- |
329
+ * | status | { error_code: number, reason: string } |
330
+ * | reason | '' |
305
331
  *
306
332
  * #### Example
307
333
  *
308
334
  * ```
309
- * milvusClient.userManager.revokeAllRolesPrivileges({});
335
+ * milvusClient.userManager.revokeAllRolesPrivileges();
310
336
  * ```
311
337
  */
312
- revokeAllRolesPrivileges(data?: GrpcTimeOut): Promise<ResStatus[]>;
338
+ dropAllRoles(data?: GrpcTimeOut): Promise<ResStatus[]>;
313
339
  /**
314
340
  * select a grant
315
341
  * @param data
316
342
  * | Property | Type | Description |
317
- * | :------- | :----- | :------------ |
318
- * | roleName | String | role name |
343
+ * | :-- | :-- | :-- |
344
+ * | roleName | String | Role name |
319
345
  * | object | string | Type of the operational object to which the specified privilege belongs, such as Collection, Index, Partition, etc. This parameter is case-sensitive.|
320
346
  * | objectName | string | Name of the object to which the role is granted the specified prvilege. |
321
347
  * | privilegeName | string | Name of the privilege to be granted to the role. This parameter is case-sensitive. |
322
- * | 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 |
348
+ * | 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 |
323
349
  *
324
- * @return
325
- * | Property | Description |
326
- * | :-------------| :-------- |
327
- * | status | { error_code: number, reason: string }|
328
- * | reason | '' |
350
+ * @returns
351
+ * | Property | Description |
352
+ * | :-- | :-- |
353
+ * | status | { error_code: number, reason: string } |
354
+ * | reason | '' |
329
355
  *
330
356
  * #### Example
331
357
  *
@@ -343,14 +369,14 @@ export declare class User extends Client {
343
369
  * list all grants for a role
344
370
  * @param data
345
371
  * | Property | Type | Description |
346
- * | :------- | :----- | :------------ |
347
- * | roleName | String | role name |
348
- * | 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 |
372
+ * | :-- | :-- | :-- |
373
+ * | roleName | String | Role name |
374
+ * | 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 |
349
375
  *
350
- * @return
376
+ * @returns
351
377
  * | Property | Description |
352
- * | :-------------| :-------- |
353
- * | status | { error_code: number, reason: string }|
378
+ * | :-- | :-- |
379
+ * | status | { error_code: number, reason: string } |
354
380
  * | reason | '' |
355
381
  *
356
382
  * #### Example
@@ -366,14 +392,14 @@ export declare class User extends Client {
366
392
  * check if the role is existing
367
393
  * @param data
368
394
  * | Property | Type | Description |
369
- * | :------- | :----- | :------------ |
370
- * | roleName | String | role name |
371
- * | 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 |
395
+ * | :-- | :-- | :-- |
396
+ * | roleName | String | Role name |
397
+ * | 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 |
372
398
  *
373
- * @return
399
+ * @returns
374
400
  * | Property | Description |
375
- * | :-------------| :-------- |
376
- * | status | { error_code: number, reason: string }|
401
+ * | :-- | :-- |
402
+ * | status | { error_code: number, reason: string } |
377
403
  * | reason | '' |
378
404
  *
379
405
  * #### Example