@zilliz/milvus2-sdk-node 2.2.1 → 2.2.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.
- package/dist/milvus/User.d.ts +316 -28
- package/dist/milvus/User.js +565 -26
- package/dist/milvus/User.js.map +1 -1
- package/dist/milvus/const/Milvus.d.ts +2 -0
- package/dist/milvus/const/Milvus.js +6 -0
- package/dist/milvus/const/Milvus.js.map +1 -0
- package/dist/milvus/index.js +2 -1
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Common.d.ts +78 -0
- package/dist/milvus/types/Common.js +69 -1
- package/dist/milvus/types/Common.js.map +1 -1
- package/dist/milvus/types/Response.d.ts +47 -1
- package/dist/milvus/types/Response.js.map +1 -1
- package/dist/milvus/types/User.d.ts +37 -1
- package/dist/milvus/utils/Format.d.ts +2 -1
- package/dist/milvus/utils/Format.js +17 -8
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/proto/proto/common.proto +13 -1
- package/dist/proto/proto/google/protobuf/descriptor.proto +30 -0
- package/dist/proto/proto/milvus.proto +96 -1
- package/dist/sdk.json +1 -1
- package/dist/utils/index.js +4 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/milvus/index.js
CHANGED
|
@@ -75,6 +75,7 @@ var sdk_json_1 = __importDefault(require("../sdk.json"));
|
|
|
75
75
|
var ErrorReason_1 = require("./const/ErrorReason");
|
|
76
76
|
var Response_1 = require("./types/Response");
|
|
77
77
|
var utils_1 = require("../utils");
|
|
78
|
+
var Format_1 = require("./utils/Format");
|
|
78
79
|
var protoPath = path_1.default.resolve(__dirname, '../proto/proto/milvus.proto');
|
|
79
80
|
var MilvusClient = /** @class */ (function () {
|
|
80
81
|
/**
|
|
@@ -116,7 +117,7 @@ var MilvusClient = /** @class */ (function () {
|
|
|
116
117
|
});
|
|
117
118
|
var grpcObject = (0, grpc_js_1.loadPackageDefinition)(packageDefinition);
|
|
118
119
|
var milvusProto = grpcObject.milvus.proto.milvus;
|
|
119
|
-
var client = new milvusProto.MilvusService(address, ssl ? grpc_js_1.credentials.createSsl() : grpc_js_1.credentials.createInsecure(), {
|
|
120
|
+
var client = new milvusProto.MilvusService((0, Format_1.formatAddress)(address), ssl ? grpc_js_1.credentials.createSsl() : grpc_js_1.credentials.createInsecure(), {
|
|
120
121
|
interceptors: [authInterceptor],
|
|
121
122
|
// Milvus default max_receive_message_length is 100MB, but Milvus support change max_receive_message_length .
|
|
122
123
|
// So SDK should support max_receive_message_length unlimited.
|
package/dist/milvus/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../milvus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,8DAAkD;AAClD,yCAKuB;AACvB,2CAA0C;AAC1C,yCAAwC;AACxC,6CAAsC;AACtC,+BAA8B;AAC9B,+BAA8B;AAC9B,yDAAkC;AAClC,mDAAoD;AACpD,6CAI0B;AAC1B,kCAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../milvus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,8DAAkD;AAClD,yCAKuB;AACvB,2CAA0C;AAC1C,yCAAwC;AACxC,6CAAsC;AACtC,+BAA8B;AAC9B,+BAA8B;AAC9B,yDAAkC;AAClC,mDAAoD;AACpD,6CAI0B;AAC1B,kCAAqC;AACrC,yCAA+C;AAC/C,IAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC;AACzE;IAQE;;;;;;;;;;;;;OAaG;IACH,sBACE,OAAe,EACf,GAAa,EACb,QAAiB,EACjB,QAAiB;QAEjB,IAAI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AO,CAAC,eAAe,+CAA4C,CACtJ,CAAC;4BACF,sBAAO,EAAE,UAAU,EAAE,oBAAS,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAC;yBACxD;wBACD,sBAAO,EAAE,UAAU,EAAE,oBAAS,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAC;;;;KACvD;IAED,sCAAe,GAAf;QACE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,0CAA0C;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAEK,iCAAU,GAAhB;;;;;4BACkB,qBAAM,IAAA,iBAAS,EAAC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,CAAC,EAAA;;wBAAxD,OAAO,GAAG,SAA8C;wBAC9D,sBAAO,OAAO,EAAC;;;;KAChB;IAEK,kCAAW,GAAjB;;;;4BACS,qBAAM,IAAA,iBAAS,EAAC,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,CAAC,EAAA;4BAAtD,sBAAO,SAA+C,EAAC;;;;KACxD;IACH,mBAAC;AAAD,CAAC,AAxHD,IAwHC;AAxHY,oCAAY"}
|
|
@@ -225,4 +225,82 @@ export declare enum StateCode {
|
|
|
225
225
|
Abnormal = 2,
|
|
226
226
|
StandBy = 3
|
|
227
227
|
}
|
|
228
|
+
export declare enum OperateUserRoleType {
|
|
229
|
+
AddUserToRole = 0,
|
|
230
|
+
RemoveUserFromRole = 1
|
|
231
|
+
}
|
|
232
|
+
export declare enum OperatePrivilegeType {
|
|
233
|
+
Grant = 0,
|
|
234
|
+
Revoke = 1
|
|
235
|
+
}
|
|
236
|
+
export declare enum Roles {
|
|
237
|
+
ADMIN = "admin",
|
|
238
|
+
PUBLIC = "public"
|
|
239
|
+
}
|
|
240
|
+
export declare enum RbacObjects {
|
|
241
|
+
Collection = "Collection",
|
|
242
|
+
Global = "Global",
|
|
243
|
+
User = "User"
|
|
244
|
+
}
|
|
245
|
+
export declare enum CollectionPrivileges {
|
|
246
|
+
CreateIndex = "CreateIndex",
|
|
247
|
+
DropIndex = "DropIndex",
|
|
248
|
+
IndexDetail = "IndexDetail",
|
|
249
|
+
Load = "Load",
|
|
250
|
+
Release = "Release",
|
|
251
|
+
Insert = "Insert",
|
|
252
|
+
Delete = "Delete",
|
|
253
|
+
Search = "Search",
|
|
254
|
+
Flush = "Flush",
|
|
255
|
+
Query = "Query",
|
|
256
|
+
GetStatistics = "GetStatistics",
|
|
257
|
+
Compaction = "Compaction",
|
|
258
|
+
Alias = "Alias",
|
|
259
|
+
Import = "Import",
|
|
260
|
+
LoadBalance = "LoadBalance"
|
|
261
|
+
}
|
|
262
|
+
export declare enum GlobalPrivileges {
|
|
263
|
+
All = "*",
|
|
264
|
+
CreateCollection = "CreateCollection",
|
|
265
|
+
DropCollection = "DropCollection",
|
|
266
|
+
DescribeCollection = "DescribeCollection",
|
|
267
|
+
ShowCollections = "ShowCollections",
|
|
268
|
+
CreateOwnership = "CreateOwnership",
|
|
269
|
+
DropOwnership = "DropOwnership",
|
|
270
|
+
SelectOwnership = "SelectOwnership",
|
|
271
|
+
ManageOwnership = "ManageOwnership"
|
|
272
|
+
}
|
|
273
|
+
export declare enum UserPrivileges {
|
|
274
|
+
UpdateUser = "UpdateUser",
|
|
275
|
+
SelectUser = "SelectUser"
|
|
276
|
+
}
|
|
277
|
+
export declare const Privileges: {
|
|
278
|
+
All: GlobalPrivileges.All;
|
|
279
|
+
CreateCollection: GlobalPrivileges.CreateCollection;
|
|
280
|
+
DropCollection: GlobalPrivileges.DropCollection;
|
|
281
|
+
DescribeCollection: GlobalPrivileges.DescribeCollection;
|
|
282
|
+
ShowCollections: GlobalPrivileges.ShowCollections;
|
|
283
|
+
CreateOwnership: GlobalPrivileges.CreateOwnership;
|
|
284
|
+
DropOwnership: GlobalPrivileges.DropOwnership;
|
|
285
|
+
SelectOwnership: GlobalPrivileges.SelectOwnership;
|
|
286
|
+
ManageOwnership: GlobalPrivileges.ManageOwnership;
|
|
287
|
+
UpdateUser: UserPrivileges.UpdateUser;
|
|
288
|
+
SelectUser: UserPrivileges.SelectUser;
|
|
289
|
+
CreateIndex: CollectionPrivileges.CreateIndex;
|
|
290
|
+
DropIndex: CollectionPrivileges.DropIndex;
|
|
291
|
+
IndexDetail: CollectionPrivileges.IndexDetail;
|
|
292
|
+
Load: CollectionPrivileges.Load;
|
|
293
|
+
Release: CollectionPrivileges.Release;
|
|
294
|
+
Insert: CollectionPrivileges.Insert;
|
|
295
|
+
Delete: CollectionPrivileges.Delete;
|
|
296
|
+
Search: CollectionPrivileges.Search;
|
|
297
|
+
Flush: CollectionPrivileges.Flush;
|
|
298
|
+
Query: CollectionPrivileges.Query;
|
|
299
|
+
GetStatistics: CollectionPrivileges.GetStatistics;
|
|
300
|
+
Compaction: CollectionPrivileges.Compaction;
|
|
301
|
+
Alias: CollectionPrivileges.Alias;
|
|
302
|
+
Import: CollectionPrivileges.Import;
|
|
303
|
+
LoadBalance: CollectionPrivileges.LoadBalance;
|
|
304
|
+
};
|
|
305
|
+
export declare type Privileges = CollectionPrivileges | UserPrivileges | GlobalPrivileges;
|
|
228
306
|
export {};
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StateCode = exports.ObjectPrivilege = exports.ObjectType = exports.ImportState = exports.ConsistencyLevel = exports.CompactionState = exports.SegmentState = exports.DslType = exports.IndexState = exports.DataTypeMap = exports.DataType = exports.MsgType = exports.IndexType = exports.MetricType = void 0;
|
|
14
|
+
exports.Privileges = exports.UserPrivileges = exports.GlobalPrivileges = exports.CollectionPrivileges = exports.RbacObjects = exports.Roles = exports.OperatePrivilegeType = exports.OperateUserRoleType = exports.StateCode = exports.ObjectPrivilege = exports.ObjectType = exports.ImportState = exports.ConsistencyLevel = exports.CompactionState = exports.SegmentState = exports.DslType = exports.IndexState = exports.DataTypeMap = exports.DataType = exports.MsgType = exports.IndexType = exports.MetricType = void 0;
|
|
4
15
|
var ErrorCode;
|
|
5
16
|
(function (ErrorCode) {
|
|
6
17
|
ErrorCode[ErrorCode["Success"] = 0] = "Success";
|
|
@@ -314,4 +325,61 @@ var StateCode;
|
|
|
314
325
|
StateCode[StateCode["Abnormal"] = 2] = "Abnormal";
|
|
315
326
|
StateCode[StateCode["StandBy"] = 3] = "StandBy";
|
|
316
327
|
})(StateCode = exports.StateCode || (exports.StateCode = {}));
|
|
328
|
+
var OperateUserRoleType;
|
|
329
|
+
(function (OperateUserRoleType) {
|
|
330
|
+
OperateUserRoleType[OperateUserRoleType["AddUserToRole"] = 0] = "AddUserToRole";
|
|
331
|
+
OperateUserRoleType[OperateUserRoleType["RemoveUserFromRole"] = 1] = "RemoveUserFromRole";
|
|
332
|
+
})(OperateUserRoleType = exports.OperateUserRoleType || (exports.OperateUserRoleType = {}));
|
|
333
|
+
var OperatePrivilegeType;
|
|
334
|
+
(function (OperatePrivilegeType) {
|
|
335
|
+
OperatePrivilegeType[OperatePrivilegeType["Grant"] = 0] = "Grant";
|
|
336
|
+
OperatePrivilegeType[OperatePrivilegeType["Revoke"] = 1] = "Revoke";
|
|
337
|
+
})(OperatePrivilegeType = exports.OperatePrivilegeType || (exports.OperatePrivilegeType = {}));
|
|
338
|
+
var Roles;
|
|
339
|
+
(function (Roles) {
|
|
340
|
+
Roles["ADMIN"] = "admin";
|
|
341
|
+
Roles["PUBLIC"] = "public";
|
|
342
|
+
})(Roles = exports.Roles || (exports.Roles = {}));
|
|
343
|
+
var RbacObjects;
|
|
344
|
+
(function (RbacObjects) {
|
|
345
|
+
RbacObjects["Collection"] = "Collection";
|
|
346
|
+
RbacObjects["Global"] = "Global";
|
|
347
|
+
RbacObjects["User"] = "User";
|
|
348
|
+
})(RbacObjects = exports.RbacObjects || (exports.RbacObjects = {}));
|
|
349
|
+
var CollectionPrivileges;
|
|
350
|
+
(function (CollectionPrivileges) {
|
|
351
|
+
CollectionPrivileges["CreateIndex"] = "CreateIndex";
|
|
352
|
+
CollectionPrivileges["DropIndex"] = "DropIndex";
|
|
353
|
+
CollectionPrivileges["IndexDetail"] = "IndexDetail";
|
|
354
|
+
CollectionPrivileges["Load"] = "Load";
|
|
355
|
+
CollectionPrivileges["Release"] = "Release";
|
|
356
|
+
CollectionPrivileges["Insert"] = "Insert";
|
|
357
|
+
CollectionPrivileges["Delete"] = "Delete";
|
|
358
|
+
CollectionPrivileges["Search"] = "Search";
|
|
359
|
+
CollectionPrivileges["Flush"] = "Flush";
|
|
360
|
+
CollectionPrivileges["Query"] = "Query";
|
|
361
|
+
CollectionPrivileges["GetStatistics"] = "GetStatistics";
|
|
362
|
+
CollectionPrivileges["Compaction"] = "Compaction";
|
|
363
|
+
CollectionPrivileges["Alias"] = "Alias";
|
|
364
|
+
CollectionPrivileges["Import"] = "Import";
|
|
365
|
+
CollectionPrivileges["LoadBalance"] = "LoadBalance";
|
|
366
|
+
})(CollectionPrivileges = exports.CollectionPrivileges || (exports.CollectionPrivileges = {}));
|
|
367
|
+
var GlobalPrivileges;
|
|
368
|
+
(function (GlobalPrivileges) {
|
|
369
|
+
GlobalPrivileges["All"] = "*";
|
|
370
|
+
GlobalPrivileges["CreateCollection"] = "CreateCollection";
|
|
371
|
+
GlobalPrivileges["DropCollection"] = "DropCollection";
|
|
372
|
+
GlobalPrivileges["DescribeCollection"] = "DescribeCollection";
|
|
373
|
+
GlobalPrivileges["ShowCollections"] = "ShowCollections";
|
|
374
|
+
GlobalPrivileges["CreateOwnership"] = "CreateOwnership";
|
|
375
|
+
GlobalPrivileges["DropOwnership"] = "DropOwnership";
|
|
376
|
+
GlobalPrivileges["SelectOwnership"] = "SelectOwnership";
|
|
377
|
+
GlobalPrivileges["ManageOwnership"] = "ManageOwnership";
|
|
378
|
+
})(GlobalPrivileges = exports.GlobalPrivileges || (exports.GlobalPrivileges = {}));
|
|
379
|
+
var UserPrivileges;
|
|
380
|
+
(function (UserPrivileges) {
|
|
381
|
+
UserPrivileges["UpdateUser"] = "UpdateUser";
|
|
382
|
+
UserPrivileges["SelectUser"] = "SelectUser";
|
|
383
|
+
})(UserPrivileges = exports.UserPrivileges || (exports.UserPrivileges = {}));
|
|
384
|
+
exports.Privileges = __assign(__assign(__assign({}, CollectionPrivileges), UserPrivileges), GlobalPrivileges);
|
|
317
385
|
//# sourceMappingURL=Common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../milvus/types/Common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../milvus/types/Common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,IAAK,SA0DJ;AA1DD,WAAK,SAAS;IACZ,+CAAW,CAAA;IACX,+DAAmB,CAAA;IACnB,2DAAiB,CAAA;IACjB,iEAAoB,CAAA;IACpB,uEAAuB,CAAA;IACvB,+DAAmB,CAAA;IACnB,iEAAoB,CAAA;IACpB,iEAAoB,CAAA;IACpB,2EAAyB,CAAA;IACzB,wDAAgB,CAAA;IAChB,kEAAqB,CAAA;IACrB,gEAAoB,CAAA;IACpB,wEAAwB,CAAA;IACxB,0DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,wDAAgB,CAAA;IAChB,sEAAuB,CAAA;IACvB,kEAAqB,CAAA;IACrB,sEAAuB,CAAA;IACvB,kEAAqB,CAAA;IACrB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AHD,WAAY,cAAc;IACxB,2CAAyB,CAAA;IACzB,2CAAyB,CAAA;AAC3B,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAEY,QAAA,UAAU,kCAClB,oBAAoB,GACpB,cAAc,GACd,gBAAgB,EACnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConsistencyLevelEnum } from './Collection';
|
|
2
|
-
import { IndexState, ImportState, KeyValuePair, NumberArrayId, SegmentState, StringArrayId, CompactionState } from './Common';
|
|
2
|
+
import { Privileges, IndexState, ImportState, KeyValuePair, NumberArrayId, SegmentState, StringArrayId, CompactionState, RbacObjects } from './Common';
|
|
3
3
|
export declare enum ErrorCode {
|
|
4
4
|
SUCCESS = "Success",
|
|
5
5
|
INDEX_NOT_EXIST = "IndexNotExist",
|
|
@@ -210,4 +210,50 @@ export interface ListImportTasksResponse {
|
|
|
210
210
|
status: ResStatus;
|
|
211
211
|
tasks: GetImportStateResponse[];
|
|
212
212
|
}
|
|
213
|
+
declare type RoleEntity = {
|
|
214
|
+
name: string;
|
|
215
|
+
};
|
|
216
|
+
declare type User = {
|
|
217
|
+
name: string;
|
|
218
|
+
};
|
|
219
|
+
declare type RoleResult = {
|
|
220
|
+
users: User[];
|
|
221
|
+
role: RoleEntity;
|
|
222
|
+
};
|
|
223
|
+
export interface SelectRoleResponse {
|
|
224
|
+
status: ResStatus;
|
|
225
|
+
results: RoleResult[];
|
|
226
|
+
}
|
|
227
|
+
declare type UserResult = {
|
|
228
|
+
user: User;
|
|
229
|
+
roles: RoleEntity[];
|
|
230
|
+
};
|
|
231
|
+
export interface SelectUserResponse {
|
|
232
|
+
status: ResStatus;
|
|
233
|
+
results: UserResult[];
|
|
234
|
+
}
|
|
235
|
+
declare type ObjectEntity = {
|
|
236
|
+
name: RbacObjects;
|
|
237
|
+
};
|
|
238
|
+
declare type PrivilegeEntity = {
|
|
239
|
+
name: Privileges;
|
|
240
|
+
};
|
|
241
|
+
declare type Grantor = {
|
|
242
|
+
user: User;
|
|
243
|
+
privilege: PrivilegeEntity;
|
|
244
|
+
};
|
|
245
|
+
declare type GrantEntity = {
|
|
246
|
+
role: RoleEntity;
|
|
247
|
+
object: ObjectEntity;
|
|
248
|
+
object_name: string;
|
|
249
|
+
grantor: Grantor;
|
|
250
|
+
};
|
|
251
|
+
export interface SelectGrantResponse {
|
|
252
|
+
status: ResStatus;
|
|
253
|
+
entities: GrantEntity[];
|
|
254
|
+
}
|
|
255
|
+
export interface HasRoleResponse {
|
|
256
|
+
status: ResStatus;
|
|
257
|
+
hasRole: boolean;
|
|
258
|
+
}
|
|
213
259
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":";;;AAYA,IAAY,SA2BX;AA3BD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,8CAAiC,CAAA;IACjC,iDAAoC,CAAA;IACpC,iDAAoC,CAAA;IACpC,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,EA3BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA2BpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GrpcTimeOut } from './Common';
|
|
1
|
+
import { GrpcTimeOut, Privileges, RbacObjects } from './Common';
|
|
2
2
|
export interface UpdateUserReq extends GrpcTimeOut {
|
|
3
3
|
username: string;
|
|
4
4
|
oldPassword: string;
|
|
@@ -13,3 +13,39 @@ export interface DeleteUserReq extends GrpcTimeOut {
|
|
|
13
13
|
}
|
|
14
14
|
export interface ListUsersReq extends GrpcTimeOut {
|
|
15
15
|
}
|
|
16
|
+
export interface CreateRoleReq extends GrpcTimeOut {
|
|
17
|
+
roleName: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DropRoleReq extends GrpcTimeOut {
|
|
20
|
+
roleName: string;
|
|
21
|
+
}
|
|
22
|
+
export interface HasRoleReq extends GrpcTimeOut {
|
|
23
|
+
roleName: string;
|
|
24
|
+
}
|
|
25
|
+
export interface AddUserToRoleReq extends GrpcTimeOut {
|
|
26
|
+
username: string;
|
|
27
|
+
roleName: string;
|
|
28
|
+
}
|
|
29
|
+
export interface RemoveUserFromRoleReq extends GrpcTimeOut {
|
|
30
|
+
username: string;
|
|
31
|
+
roleName: string;
|
|
32
|
+
}
|
|
33
|
+
export interface SelectRoleReq extends GrpcTimeOut {
|
|
34
|
+
roleName: string;
|
|
35
|
+
includeUserInfo?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface SelectUserReq extends GrpcTimeOut {
|
|
38
|
+
username: string;
|
|
39
|
+
includeRoleInfo?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface OperateRolePrivilegeReq extends GrpcTimeOut {
|
|
42
|
+
roleName: string;
|
|
43
|
+
object: RbacObjects;
|
|
44
|
+
objectName: string;
|
|
45
|
+
privilegeName: Privileges;
|
|
46
|
+
}
|
|
47
|
+
export interface SelectGrantReq extends OperateRolePrivilegeReq {
|
|
48
|
+
}
|
|
49
|
+
export interface ListGrantsReq extends GrpcTimeOut {
|
|
50
|
+
roleName: string;
|
|
51
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KeyValuePair } from
|
|
1
|
+
import { KeyValuePair } from '../types/Common';
|
|
2
2
|
/**
|
|
3
3
|
* parse [{key:"row_count",value:4}] to {row_count:4}
|
|
4
4
|
* @param data key value pair array
|
|
@@ -93,3 +93,4 @@ export declare const unixtimeToHybridts: (unixtime: bigint | string) => string;
|
|
|
93
93
|
*/
|
|
94
94
|
export declare const datetimeToHybrids: (datetime: Date) => string;
|
|
95
95
|
export declare const stringToBase64: (str: string) => string;
|
|
96
|
+
export declare const formatAddress: (address: string) => string;
|
|
@@ -9,8 +9,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.stringToBase64 = exports.datetimeToHybrids = exports.unixtimeToHybridts = exports.hybridtsToUnixtime = exports.formatNumberPrecision = exports.parseToKeyValue = exports.formatKeyValueData = void 0;
|
|
12
|
+
exports.formatAddress = exports.stringToBase64 = exports.datetimeToHybrids = exports.unixtimeToHybridts = exports.hybridtsToUnixtime = exports.formatNumberPrecision = exports.parseToKeyValue = exports.formatKeyValueData = void 0;
|
|
13
13
|
var index_1 = require("./index");
|
|
14
|
+
var Milvus_1 = require("../const/Milvus");
|
|
14
15
|
var ErrorReason_1 = require("../const/ErrorReason");
|
|
15
16
|
/**
|
|
16
17
|
* parse [{key:"row_count",value:4}] to {row_count:4}
|
|
@@ -47,23 +48,23 @@ exports.parseToKeyValue = parseToKeyValue;
|
|
|
47
48
|
var formatNumberPrecision = function (number, precision) {
|
|
48
49
|
return Number(number
|
|
49
50
|
.toString()
|
|
50
|
-
.split(
|
|
51
|
+
.split('.')
|
|
51
52
|
.map(function (v, i) {
|
|
52
53
|
if (i === 1) {
|
|
53
54
|
return v.slice(0, precision);
|
|
54
55
|
}
|
|
55
56
|
return v;
|
|
56
57
|
})
|
|
57
|
-
.join(
|
|
58
|
+
.join('.'));
|
|
58
59
|
};
|
|
59
60
|
exports.formatNumberPrecision = formatNumberPrecision;
|
|
60
61
|
var LOGICAL_BITS = BigInt(18);
|
|
61
62
|
// const LOGICAL_BITS_MASK = (1 << LOGICAL_BITS) - 1;
|
|
62
63
|
var checkTimeParam = function (ts) {
|
|
63
64
|
switch (typeof ts) {
|
|
64
|
-
case
|
|
65
|
+
case 'bigint':
|
|
65
66
|
return true;
|
|
66
|
-
case
|
|
67
|
+
case 'string':
|
|
67
68
|
return isNaN(Number(ts)) ? false : true;
|
|
68
69
|
default:
|
|
69
70
|
return false;
|
|
@@ -95,7 +96,7 @@ var hybridtsToUnixtime = function (hybridts) {
|
|
|
95
96
|
if (!checkTimeParam(hybridts)) {
|
|
96
97
|
throw new Error("hybridts ".concat(ErrorReason_1.ERROR_REASONS.TIMESTAMP_PARAM_CHECK));
|
|
97
98
|
}
|
|
98
|
-
var timestamp = typeof hybridts ===
|
|
99
|
+
var timestamp = typeof hybridts === 'bigint' ? hybridts : BigInt(hybridts);
|
|
99
100
|
var physical = timestamp >> LOGICAL_BITS;
|
|
100
101
|
return (physical / BigInt(1000)).toString();
|
|
101
102
|
};
|
|
@@ -126,7 +127,7 @@ var unixtimeToHybridts = function (unixtime) {
|
|
|
126
127
|
if (!checkTimeParam(unixtime)) {
|
|
127
128
|
throw new Error("hybridts ".concat(ErrorReason_1.ERROR_REASONS.TIMESTAMP_PARAM_CHECK));
|
|
128
129
|
}
|
|
129
|
-
var timestamp = typeof unixtime ===
|
|
130
|
+
var timestamp = typeof unixtime === 'bigint' ? unixtime : BigInt(unixtime);
|
|
130
131
|
var physical = (timestamp * BigInt(1000)) << LOGICAL_BITS;
|
|
131
132
|
return physical.toString();
|
|
132
133
|
};
|
|
@@ -160,6 +161,14 @@ var datetimeToHybrids = function (datetime) {
|
|
|
160
161
|
return (0, exports.unixtimeToHybridts)((datetime.getTime() / 1000).toString());
|
|
161
162
|
};
|
|
162
163
|
exports.datetimeToHybrids = datetimeToHybrids;
|
|
163
|
-
var stringToBase64 = function (str) {
|
|
164
|
+
var stringToBase64 = function (str) {
|
|
165
|
+
return Buffer.from(str, 'utf-8').toString('base64');
|
|
166
|
+
};
|
|
164
167
|
exports.stringToBase64 = stringToBase64;
|
|
168
|
+
var formatAddress = function (address) {
|
|
169
|
+
// remove http or https prefix from address
|
|
170
|
+
var ip = address.replace(/(http|https)*:\/\//, '');
|
|
171
|
+
return ip.includes(':') ? ip : "".concat(ip, ":").concat(Milvus_1.DEFAULT_MILVUS_PORT);
|
|
172
|
+
};
|
|
173
|
+
exports.formatAddress = formatAddress;
|
|
165
174
|
//# sourceMappingURL=Format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../milvus/utils/Format.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAuC;AACvC,oDAAqD;AAGrD;;;;;GAKG;AACI,IAAM,kBAAkB,GAAG,UAAC,IAAoB,EAAE,IAAc;IACrE,IAAM,MAAM,GAAyB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../milvus/utils/Format.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAAuC;AACvC,0CAAsD;AACtD,oDAAqD;AAGrD;;;;;GAKG;AACI,IAAM,kBAAkB,GAAG,UAAC,IAAoB,EAAE,IAAc;IACrE,IAAM,MAAM,GAAyB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAA,CAAC;QACZ,IAAM,KAAK,GAAG,IAAA,oBAAY,EAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACpC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B;AAEF;;;;GAIG;AACI,IAAM,eAAe,GAAG,UAAC,IAE/B;IACC,OAAO,IAAI;QACT,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CACtB,UAAC,GAAU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I,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAA5C,CAA4C,CAAC;AADlC,QAAA,cAAc,kBACoB;AAExC,IAAM,aAAa,GAAG,UAAC,OAAe;IAC3C,2CAA2C;IAC3C,IAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IACrD,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAG,EAAE,cAAI,4BAAmB,CAAE,CAAC;AAChE,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
|
|
@@ -64,6 +64,10 @@ enum ErrorCode {
|
|
|
64
64
|
RateLimit = 49;
|
|
65
65
|
NodeIDNotMatch = 50;
|
|
66
66
|
UpsertAutoIDTrue = 51;
|
|
67
|
+
InsufficientMemoryToLoad = 52;
|
|
68
|
+
MemoryQuotaExhausted = 53;
|
|
69
|
+
DiskQuotaExhausted = 54;
|
|
70
|
+
TimeTickLongDelay = 55;
|
|
67
71
|
|
|
68
72
|
// Service availability.
|
|
69
73
|
// NA: Not Available.
|
|
@@ -150,7 +154,7 @@ enum MsgType {
|
|
|
150
154
|
DropAlias = 109;
|
|
151
155
|
AlterAlias = 110;
|
|
152
156
|
AlterCollection = 111;
|
|
153
|
-
|
|
157
|
+
RenameCollection = 112;
|
|
154
158
|
|
|
155
159
|
/* DEFINITION REQUESTS: PARTITION */
|
|
156
160
|
CreatePartition = 200;
|
|
@@ -239,6 +243,14 @@ enum MsgType {
|
|
|
239
243
|
SelectGrant = 1607;
|
|
240
244
|
RefreshPolicyInfoCache = 1608;
|
|
241
245
|
ListPolicy = 1609;
|
|
246
|
+
|
|
247
|
+
/* Resource group */
|
|
248
|
+
CreateResourceGroup = 1700;
|
|
249
|
+
DropResourceGroup = 1701;
|
|
250
|
+
ListResourceGroups = 1702;
|
|
251
|
+
DescribeResourceGroup = 1703;
|
|
252
|
+
TransferNode = 1704;
|
|
253
|
+
TransferReplica = 1705;
|
|
242
254
|
}
|
|
243
255
|
|
|
244
256
|
message MsgBase {
|
|
@@ -631,6 +631,36 @@ message FieldOptions {
|
|
|
631
631
|
// formats, e.g. when the field contains sensitive credentials.
|
|
632
632
|
optional bool debug_redact = 16 [default = false];
|
|
633
633
|
|
|
634
|
+
// If set to RETENTION_SOURCE, the option will be omitted from the binary.
|
|
635
|
+
// Note: as of January 2023, support for this is in progress and does not yet
|
|
636
|
+
// have an effect (b/264593489).
|
|
637
|
+
enum OptionRetention {
|
|
638
|
+
RETENTION_UNKNOWN = 0;
|
|
639
|
+
RETENTION_RUNTIME = 1;
|
|
640
|
+
RETENTION_SOURCE = 2;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
optional OptionRetention retention = 17;
|
|
644
|
+
|
|
645
|
+
// This indicates the types of entities that the field may apply to when used
|
|
646
|
+
// as an option. If it is unset, then the field may be freely used as an
|
|
647
|
+
// option on any kind of entity. Note: as of January 2023, support for this is
|
|
648
|
+
// in progress and does not yet have an effect (b/264593489).
|
|
649
|
+
enum OptionTargetType {
|
|
650
|
+
TARGET_TYPE_UNKNOWN = 0;
|
|
651
|
+
TARGET_TYPE_FILE = 1;
|
|
652
|
+
TARGET_TYPE_EXTENSION_RANGE = 2;
|
|
653
|
+
TARGET_TYPE_MESSAGE = 3;
|
|
654
|
+
TARGET_TYPE_FIELD = 4;
|
|
655
|
+
TARGET_TYPE_ONEOF = 5;
|
|
656
|
+
TARGET_TYPE_ENUM = 6;
|
|
657
|
+
TARGET_TYPE_ENUM_ENTRY = 7;
|
|
658
|
+
TARGET_TYPE_SERVICE = 8;
|
|
659
|
+
TARGET_TYPE_METHOD = 9;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
optional OptionTargetType target = 18;
|
|
663
|
+
|
|
634
664
|
// The parser stores options it doesn't recognize here. See above.
|
|
635
665
|
repeated UninterpretedOption uninterpreted_option = 999;
|
|
636
666
|
|
|
@@ -97,6 +97,15 @@ service MilvusService {
|
|
|
97
97
|
|
|
98
98
|
rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}
|
|
99
99
|
rpc CheckHealth(CheckHealthRequest) returns (CheckHealthResponse) {}
|
|
100
|
+
|
|
101
|
+
rpc CreateResourceGroup(CreateResourceGroupRequest) returns (common.Status) {}
|
|
102
|
+
rpc DropResourceGroup(DropResourceGroupRequest) returns (common.Status) {}
|
|
103
|
+
rpc TransferNode(TransferNodeRequest) returns (common.Status) {}
|
|
104
|
+
rpc TransferReplica(TransferReplicaRequest) returns (common.Status) {}
|
|
105
|
+
rpc ListResourceGroups(ListResourceGroupsRequest) returns (ListResourceGroupsResponse) {}
|
|
106
|
+
rpc DescribeResourceGroup(DescribeResourceGroupRequest) returns (DescribeResourceGroupResponse) {}
|
|
107
|
+
|
|
108
|
+
rpc RenameCollection(RenameCollectionRequest) returns (common.Status) {}
|
|
100
109
|
}
|
|
101
110
|
|
|
102
111
|
message CreateAliasRequest {
|
|
@@ -274,6 +283,10 @@ message LoadCollectionRequest {
|
|
|
274
283
|
string collection_name = 3;
|
|
275
284
|
// The replica number to load, default by 1
|
|
276
285
|
int32 replica_number = 4;
|
|
286
|
+
// create replica used resource group
|
|
287
|
+
repeated string resource_groups = 5;
|
|
288
|
+
// Whether to enable refresh mode.
|
|
289
|
+
bool refresh = 6;
|
|
277
290
|
}
|
|
278
291
|
|
|
279
292
|
/**
|
|
@@ -464,6 +477,10 @@ message LoadPartitionsRequest {
|
|
|
464
477
|
repeated string partition_names = 4;
|
|
465
478
|
// The replicas number you would load, 1 by default
|
|
466
479
|
int32 replica_number = 5;
|
|
480
|
+
// create replica used resource group
|
|
481
|
+
repeated string resource_groups = 6;
|
|
482
|
+
// Whether to enable refresh mode.
|
|
483
|
+
bool refresh = 7;
|
|
467
484
|
}
|
|
468
485
|
|
|
469
486
|
/*
|
|
@@ -1065,6 +1082,7 @@ message GetReplicasRequest {
|
|
|
1065
1082
|
common.MsgBase base = 1;
|
|
1066
1083
|
int64 collectionID = 2;
|
|
1067
1084
|
bool with_shard_nodes = 3;
|
|
1085
|
+
string collection_name = 4;
|
|
1068
1086
|
}
|
|
1069
1087
|
|
|
1070
1088
|
message GetReplicasResponse {
|
|
@@ -1078,6 +1096,9 @@ message ReplicaInfo { // ReplicaGroup
|
|
|
1078
1096
|
repeated int64 partition_ids = 3; // empty indicates to load collection
|
|
1079
1097
|
repeated ShardReplica shard_replicas = 4;
|
|
1080
1098
|
repeated int64 node_ids = 5; // include leaders
|
|
1099
|
+
string resource_group_name = 6;
|
|
1100
|
+
// outbound access rg -> node num
|
|
1101
|
+
map<string, int32> num_outbound_node = 7;
|
|
1081
1102
|
}
|
|
1082
1103
|
|
|
1083
1104
|
message ShardReplica {
|
|
@@ -1374,6 +1395,14 @@ message GetVersionResponse {
|
|
|
1374
1395
|
string version =2;
|
|
1375
1396
|
}
|
|
1376
1397
|
|
|
1398
|
+
enum QuotaState {
|
|
1399
|
+
Unknown = 0;
|
|
1400
|
+
ReadLimited = 2;
|
|
1401
|
+
WriteLimited = 3;
|
|
1402
|
+
DenyToRead = 4;
|
|
1403
|
+
DenyToWrite = 5;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1377
1406
|
message CheckHealthRequest {
|
|
1378
1407
|
}
|
|
1379
1408
|
|
|
@@ -1381,4 +1410,70 @@ message CheckHealthResponse {
|
|
|
1381
1410
|
common.Status status = 1;
|
|
1382
1411
|
bool isHealthy = 2;
|
|
1383
1412
|
repeated string reasons = 3;
|
|
1384
|
-
|
|
1413
|
+
repeated QuotaState quota_states = 4;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
message CreateResourceGroupRequest {
|
|
1417
|
+
common.MsgBase base = 1;
|
|
1418
|
+
string resource_group = 2;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
message DropResourceGroupRequest {
|
|
1422
|
+
common.MsgBase base = 1;
|
|
1423
|
+
string resource_group = 2;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
// transfer `nodeNum` nodes from `source_resource_group` to `target_resource_group`
|
|
1427
|
+
message TransferNodeRequest {
|
|
1428
|
+
common.MsgBase base = 1;
|
|
1429
|
+
string source_resource_group = 2;
|
|
1430
|
+
string target_resource_group = 3;
|
|
1431
|
+
int32 num_node = 4;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
// transfer `replicaNum` replicas in `collectionID` from `source_resource_group` to `target_resource_group`
|
|
1435
|
+
message TransferReplicaRequest {
|
|
1436
|
+
common.MsgBase base = 1;
|
|
1437
|
+
string source_resource_group = 2;
|
|
1438
|
+
string target_resource_group = 3;
|
|
1439
|
+
string collection_name = 4;
|
|
1440
|
+
int64 num_replica = 5;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
message ListResourceGroupsRequest {
|
|
1444
|
+
common.MsgBase base = 1;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
message ListResourceGroupsResponse {
|
|
1448
|
+
common.Status status = 1;
|
|
1449
|
+
repeated string resource_groups = 2;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
message DescribeResourceGroupRequest {
|
|
1453
|
+
common.MsgBase base = 1;
|
|
1454
|
+
string resource_group = 2;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
message DescribeResourceGroupResponse {
|
|
1458
|
+
common.Status status = 1;
|
|
1459
|
+
ResourceGroup resource_group = 2;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
message ResourceGroup {
|
|
1463
|
+
string name = 1;
|
|
1464
|
+
int32 capacity = 2;
|
|
1465
|
+
int32 num_available_node = 3;
|
|
1466
|
+
// collection name -> loaded replica num
|
|
1467
|
+
map<string, int32> num_loaded_replica = 4;
|
|
1468
|
+
// collection name -> accessed other rg's node num
|
|
1469
|
+
map<string, int32> num_outgoing_node = 5;
|
|
1470
|
+
// collection name -> be accessed node num by other rg
|
|
1471
|
+
map<string, int32> num_incoming_node = 6;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
message RenameCollectionRequest {
|
|
1475
|
+
common.MsgBase base = 1;
|
|
1476
|
+
string db = 2;
|
|
1477
|
+
string oldName = 3;
|
|
1478
|
+
string newName = 4;
|
|
1479
|
+
}
|
package/dist/sdk.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.2.
|
|
1
|
+
{"version":"2.2.3","milvusVersion":"v2.2.1"}
|