@zilliz/milvus2-sdk-node 2.2.3 → 2.2.5

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 (93) hide show
  1. package/README.md +4 -21
  2. package/dist/milvus/BaseClient.d.ts +17 -0
  3. package/dist/milvus/BaseClient.js +58 -0
  4. package/dist/milvus/BaseClient.js.map +1 -0
  5. package/dist/milvus/Collection.d.ts +263 -171
  6. package/dist/milvus/Collection.js +328 -233
  7. package/dist/milvus/Collection.js.map +1 -1
  8. package/dist/milvus/Data.d.ts +142 -142
  9. package/dist/milvus/Data.js +211 -216
  10. package/dist/milvus/Data.js.map +1 -1
  11. package/dist/milvus/MilvusClient.d.ts +17 -0
  12. package/dist/milvus/MilvusClient.js +163 -0
  13. package/dist/milvus/MilvusClient.js.map +1 -0
  14. package/dist/milvus/MilvusIndex.d.ts +64 -60
  15. package/dist/milvus/MilvusIndex.js +74 -69
  16. package/dist/milvus/MilvusIndex.js.map +1 -1
  17. package/dist/milvus/Partition.d.ts +95 -88
  18. package/dist/milvus/Partition.js +108 -101
  19. package/dist/milvus/Partition.js.map +1 -1
  20. package/dist/milvus/Resource.d.ts +172 -0
  21. package/dist/milvus/Resource.js +356 -0
  22. package/dist/milvus/Resource.js.map +1 -0
  23. package/dist/milvus/User.d.ts +136 -110
  24. package/dist/milvus/User.js +171 -140
  25. package/dist/milvus/User.js.map +1 -1
  26. package/dist/milvus/Utils.d.ts +1 -1
  27. package/dist/milvus/Utils.js +1 -1
  28. package/dist/milvus/Utils.js.map +1 -1
  29. package/dist/milvus/const/Milvus.d.ts +270 -0
  30. package/dist/milvus/const/Milvus.js +370 -1
  31. package/dist/milvus/const/Milvus.js.map +1 -1
  32. package/dist/milvus/index.d.ts +11 -46
  33. package/dist/milvus/index.js +16 -186
  34. package/dist/milvus/index.js.map +1 -1
  35. package/dist/milvus/types/Collection.d.ts +88 -8
  36. package/dist/milvus/types/Collection.js +1 -9
  37. package/dist/milvus/types/Collection.js.map +1 -1
  38. package/dist/milvus/types/Common.d.ts +11 -267
  39. package/dist/milvus/types/Common.js +1 -369
  40. package/dist/milvus/types/Common.js.map +1 -1
  41. package/dist/milvus/types/Data.d.ts +154 -1
  42. package/dist/milvus/types/Index.d.ts +20 -1
  43. package/dist/milvus/types/Partition.d.ts +8 -1
  44. package/dist/milvus/types/Resource.d.ts +44 -0
  45. package/dist/milvus/types/{Search.js → Resource.js} +1 -1
  46. package/dist/milvus/types/Resource.js.map +1 -0
  47. package/dist/milvus/types/Response.d.ts +0 -246
  48. package/dist/milvus/types/Response.js.map +1 -1
  49. package/dist/milvus/types/User.d.ts +54 -2
  50. package/dist/milvus/types.d.ts +8 -7
  51. package/dist/milvus/types.js +2 -1
  52. package/dist/milvus/types.js.map +1 -1
  53. package/dist/proto/proto/common.proto +23 -2
  54. package/dist/proto/proto/feder.proto +40 -0
  55. package/dist/proto/proto/google/protobuf/descriptor.proto +31 -1
  56. package/dist/proto/proto/milvus.proto +101 -0
  57. package/dist/proto/proto/msg.proto +107 -0
  58. package/dist/proto/proto/schema.proto +18 -23
  59. package/dist/sdk.json +1 -1
  60. package/dist/utils/Blob.js.map +1 -0
  61. package/dist/{milvus/utils → utils}/Format.d.ts +12 -11
  62. package/dist/{milvus/utils → utils}/Format.js +18 -17
  63. package/dist/utils/Format.js.map +1 -0
  64. package/dist/utils/Function.d.ts +4 -0
  65. package/dist/utils/Function.js +33 -0
  66. package/dist/utils/Function.js.map +1 -0
  67. package/dist/utils/Grpc.d.ts +19 -0
  68. package/dist/utils/Grpc.js +64 -0
  69. package/dist/utils/Grpc.js.map +1 -0
  70. package/dist/utils/Validate.d.ts +21 -0
  71. package/dist/{milvus/utils → utils}/Validate.js +28 -6
  72. package/dist/utils/Validate.js.map +1 -0
  73. package/dist/utils/index.d.ts +5 -7
  74. package/dist/utils/index.js +17 -52
  75. package/dist/utils/index.js.map +1 -1
  76. package/dist/utils/test.d.ts +14 -0
  77. package/dist/utils/test.js +68 -0
  78. package/dist/utils/test.js.map +1 -0
  79. package/package.json +7 -12
  80. package/dist/milvus/Client.d.ts +0 -12
  81. package/dist/milvus/Client.js +0 -28
  82. package/dist/milvus/Client.js.map +0 -1
  83. package/dist/milvus/types/Search.d.ts +0 -81
  84. package/dist/milvus/types/Search.js.map +0 -1
  85. package/dist/milvus/utils/Blob.js.map +0 -1
  86. package/dist/milvus/utils/Format.js.map +0 -1
  87. package/dist/milvus/utils/Validate.d.ts +0 -9
  88. package/dist/milvus/utils/Validate.js.map +0 -1
  89. package/dist/milvus/utils/index.d.ts +0 -3
  90. package/dist/milvus/utils/index.js +0 -10
  91. package/dist/milvus/utils/index.js.map +0 -1
  92. /package/dist/{milvus/utils → utils}/Blob.d.ts +0 -0
  93. /package/dist/{milvus/utils → utils}/Blob.js +0 -0
@@ -1,28 +1,26 @@
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';
5
- export declare class User extends Client {
1
+ import { Resource } from './Resource';
2
+ import { CreateUserReq, DeleteUserReq, ListUsersReq, UpdateUserReq, CreateRoleReq, DropRoleReq, AddUserToRoleReq, RemoveUserFromRoleReq, SelectRoleReq, SelectUserReq, OperateRolePrivilegeReq, SelectGrantReq, ListGrantsReq, HasRoleReq, GrpcTimeOut, ListCredUsersResponse, ResStatus, SelectRoleResponse, SelectUserResponse, SelectGrantResponse, HasRoleResponse } from '.';
3
+ export declare class User extends Resource {
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
  *
22
20
  * #### Example
23
21
  *
24
22
  * ```
25
- * milvusClient.userManager.createUser({
23
+ * milvusClient.createUser({
26
24
  * username: NAME,
27
25
  * password: PASSWORD,
28
26
  * });
@@ -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.updateUser({
52
50
  * username: NAME,
53
- * password: PASSWORD,
51
+ * newPassword: PASSWORD,
52
+ * oldPassword: PASSWORD,
54
53
  * });
55
54
  * ```
56
55
  */
@@ -60,20 +59,20 @@ 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
  *
73
72
  * #### Example
74
73
  *
75
74
  * ```
76
- * milvusClient.userManager.deleteUser({
75
+ * milvusClient.deleteUser({
77
76
  * username: NAME,
78
77
  * });
79
78
  * ```
@@ -82,80 +81,111 @@ 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
92
96
  *
93
97
  * ```
94
- * milvusClient.userManager.listUsers();
98
+ * milvusClient.listUsers();
95
99
  * ```
96
100
  */
97
101
  listUsers(data?: ListUsersReq): Promise<ListCredUsersResponse>;
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
108
118
  *
109
119
  * ```
110
- * milvusClient.userManager.createRole({roleName: 'myrole'});
120
+ * milvusClient.createRole({roleName: 'myrole'});
111
121
  * ```
112
122
  */
113
123
  createRole(data: CreateRoleReq): Promise<ResStatus>;
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
124
140
  *
125
141
  * ```
126
- * milvusClient.userManager.dropRole({roleName: 'myrole'});
142
+ * milvusClient.dropRole({roleName: 'myrole'});
127
143
  * ```
128
144
  */
129
145
  dropRole(data: DropRoleReq): Promise<ResStatus>;
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
140
163
  *
141
164
  * ```
142
- * milvusClient.userManager.addUserToRole({username: 'my', roleName: 'myrole'});
165
+ * milvusClient.addUserToRole({username: 'my', roleName: 'myrole'});
143
166
  * ```
144
167
  */
145
168
  addUserToRole(data: AddUserToRoleReq): Promise<ResStatus>;
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
156
186
  *
157
187
  * ```
158
- * milvusClient.userManager.removeUserFromRole({username: 'my', roleName: 'myrole'});
188
+ * milvusClient.removeUserFromRole({username: 'my', roleName: 'myrole'});
159
189
  * ```
160
190
  */
161
191
  removeUserFromRole(data: RemoveUserFromRoleReq): Promise<ResStatus>;
@@ -164,21 +194,21 @@ 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
179
209
  *
180
210
  * ```
181
- * milvusClient.userManager.selectRole({roleName: 'myrole'});
211
+ * milvusClient.selectRole({roleName: 'myrole'});
182
212
  * ```
183
213
  */
184
214
  selectRole(data: SelectRoleReq): Promise<SelectRoleResponse>;
@@ -187,19 +217,19 @@ 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
200
230
  *
201
231
  * ```
202
- * milvusClient.userManager.listRoles();
232
+ * milvusClient.listRoles();
203
233
  * ```
204
234
  */
205
235
  listRoles(data?: GrpcTimeOut): Promise<SelectRoleResponse>;
@@ -208,21 +238,21 @@ 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
223
253
  *
224
254
  * ```
225
- * milvusClient.userManager.selectUser({username: 'name'});
255
+ * milvusClient.selectUser({username: 'name'});
226
256
  * ```
227
257
  */
228
258
  selectUser(data: SelectUserReq): Promise<SelectUserResponse>;
@@ -231,23 +261,23 @@ 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
248
278
  *
249
279
  * ```
250
- * milvusClient.userManager.grantRolePrivilege({
280
+ * milvusClient.grantRolePrivilege({
251
281
  * roleName: 'roleName',
252
282
  * object: '*',
253
283
  * objectName: 'Collection',
@@ -261,23 +291,23 @@ 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
278
308
  *
279
309
  * ```
280
- * milvusClient.userManager.grantRolePrivilege({
310
+ * milvusClient.grantRolePrivilege({
281
311
  * roleName: 'roleName',
282
312
  * object: '*',
283
313
  * objectName: 'Collection',
@@ -290,47 +320,43 @@ 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.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
  *
332
358
  * ```
333
- * milvusClient.userManager.selectGrant({
359
+ * milvusClient.selectGrant({
334
360
  * roleName: 'roleName',
335
361
  * object: '*',
336
362
  * objectName: 'Collection',
@@ -343,20 +369,20 @@ 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
357
383
  *
358
384
  * ```
359
- * milvusClient.userManager.listGrants({
385
+ * milvusClient.listGrants({
360
386
  * roleName: 'roleName',
361
387
  * });
362
388
  * ```
@@ -366,20 +392,20 @@ 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
380
406
  *
381
407
  * ```
382
- * milvusClient.userManager.hasRole({
408
+ * milvusClient.hasRole({
383
409
  * roleName: 'roleName',
384
410
  * });
385
411
  * ```