@zilliz/milvus2-sdk-node 2.0.2 → 2.1.1

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 (43) hide show
  1. package/README.md +5 -0
  2. package/dist/milvus/Collection.js +1 -1
  3. package/dist/milvus/Collection.js.map +1 -1
  4. package/dist/milvus/Data.d.ts +5 -5
  5. package/dist/milvus/Data.js +34 -31
  6. package/dist/milvus/Data.js.map +1 -1
  7. package/dist/milvus/MilvusIndex.d.ts +8 -5
  8. package/dist/milvus/MilvusIndex.js +11 -12
  9. package/dist/milvus/MilvusIndex.js.map +1 -1
  10. package/dist/milvus/User.d.ts +100 -0
  11. package/dist/milvus/User.js +236 -0
  12. package/dist/milvus/User.js.map +1 -0
  13. package/dist/milvus/const/ErrorReason.d.ts +3 -1
  14. package/dist/milvus/const/ErrorReason.js +3 -1
  15. package/dist/milvus/const/ErrorReason.js.map +1 -1
  16. package/dist/milvus/index.d.ts +15 -7
  17. package/dist/milvus/index.js +27 -6
  18. package/dist/milvus/index.js.map +1 -1
  19. package/dist/milvus/types/Collection.d.ts +4 -3
  20. package/dist/milvus/types/Collection.js.map +1 -1
  21. package/dist/milvus/types/Common.d.ts +1 -0
  22. package/dist/milvus/types/Common.js +2 -0
  23. package/dist/milvus/types/Common.js.map +1 -1
  24. package/dist/milvus/types/Index.d.ts +5 -1
  25. package/dist/milvus/types/Response.d.ts +8 -3
  26. package/dist/milvus/types/Response.js +1 -0
  27. package/dist/milvus/types/Response.js.map +1 -1
  28. package/dist/milvus/types/User.d.ts +12 -0
  29. package/dist/milvus/types/User.js +3 -0
  30. package/dist/milvus/types/User.js.map +1 -0
  31. package/dist/milvus/utils/Format.d.ts +3 -2
  32. package/dist/milvus/utils/Format.js +3 -1
  33. package/dist/milvus/utils/Format.js.map +1 -1
  34. package/dist/milvus/utils/Validate.d.ts +2 -2
  35. package/dist/milvus/utils/Validate.js +5 -13
  36. package/dist/milvus/utils/Validate.js.map +1 -1
  37. package/dist/{grpc-proto → proto/proto}/common.proto +103 -4
  38. package/dist/{grpc-proto → proto/proto}/milvus.proto +369 -43
  39. package/dist/{grpc-proto → proto/proto}/schema.proto +9 -2
  40. package/dist/sdk.json +1 -1
  41. package/dist/utils/index.js +1 -1
  42. package/dist/utils/index.js.map +1 -1
  43. package/package.json +6 -4
@@ -3,8 +3,14 @@ package milvus.proto.milvus;
3
3
 
4
4
  option go_package = "github.com/milvus-io/milvus/internal/proto/milvuspb";
5
5
 
6
+ option java_multiple_files = true;
7
+ option java_package = "io.milvus.grpc";
8
+ option java_outer_classname = "MilvusProto";
9
+ option java_generate_equals_and_hash = true;
10
+
6
11
  import "common.proto";
7
12
  import "schema.proto";
13
+ import "google/protobuf/descriptor.proto";
8
14
 
9
15
  service MilvusService {
10
16
  rpc CreateCollection(CreateCollectionRequest) returns (common.Status) {}
@@ -44,6 +50,7 @@ service MilvusService {
44
50
  rpc GetFlushState(GetFlushStateRequest) returns (GetFlushStateResponse) {}
45
51
  rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
46
52
  rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}
53
+ rpc GetReplicas(GetReplicasRequest) returns (GetReplicasResponse) {}
47
54
 
48
55
  rpc Dummy(DummyRequest) returns (DummyResponse) {}
49
56
 
@@ -60,6 +67,23 @@ service MilvusService {
60
67
  // https://wiki.lfaidata.foundation/display/MIL/MEP+24+--+Support+bulk+load
61
68
  rpc Import(ImportRequest) returns (ImportResponse) {}
62
69
  rpc GetImportState(GetImportStateRequest) returns (GetImportStateResponse) {}
70
+ rpc ListImportTasks(ListImportTasksRequest) returns (ListImportTasksResponse) {}
71
+
72
+ // https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
73
+ rpc CreateCredential(CreateCredentialRequest) returns (common.Status) {}
74
+ rpc UpdateCredential(UpdateCredentialRequest) returns (common.Status) {}
75
+ rpc DeleteCredential(DeleteCredentialRequest) returns (common.Status) {}
76
+ rpc ListCredUsers(ListCredUsersRequest) returns (ListCredUsersResponse) {}
77
+
78
+ // https://wiki.lfaidata.foundation/display/MIL/MEP+29+--+Support+Role-Based+Access+Control
79
+ rpc CreateRole(CreateRoleRequest) returns (common.Status) {}
80
+ rpc DropRole(DropRoleRequest) returns (common.Status) {}
81
+ rpc OperateUserRole(OperateUserRoleRequest) returns (common.Status) {}
82
+ rpc SelectRole(SelectRoleRequest) returns (SelectRoleResponse) {}
83
+ rpc SelectUser(SelectUserRequest) returns (SelectUserResponse) {}
84
+ rpc SelectResource(SelectResourceRequest) returns (SelectResourceResponse) {}
85
+ rpc OperatePrivilege(OperatePrivilegeRequest) returns (common.Status) {}
86
+ rpc SelectGrant(SelectGrantRequest) returns (SelectGrantResponse) {}
63
87
  }
64
88
 
65
89
  message CreateAliasRequest {
@@ -86,14 +110,19 @@ message AlterAliasRequest{
86
110
  * Create collection in milvus
87
111
  */
88
112
  message CreateCollectionRequest {
113
+ option (common.privilege_ext_obj) = {
114
+ resource_type: Collection
115
+ resource_privilege: PrivilegeCreate
116
+ resource_name_index: 3
117
+ };
89
118
  // Not useful for now
90
119
  common.MsgBase base = 1;
91
120
  // Not useful for now
92
121
  string db_name = 2;
93
122
  // The unique collection name in milvus.(Required)
94
- string collection_name = 3;
123
+ string collection_name = 3;
95
124
  // The serialized `schema.CollectionSchema`(Required)
96
- bytes schema = 4;
125
+ bytes schema = 4;
97
126
  // Once set, no modification is allowed (Optional)
98
127
  // https://github.com/milvus-io/milvus/issues/6690
99
128
  int32 shards_num = 5;
@@ -102,11 +131,16 @@ message CreateCollectionRequest {
102
131
  }
103
132
 
104
133
  /**
105
- * Drop collection in milvus, also will drop data in collection.
134
+ * Drop collection in milvus, also will drop data in collection.
106
135
  */
107
136
  message DropCollectionRequest {
137
+ option (common.privilege_ext_obj) = {
138
+ resource_type: Collection
139
+ resource_privilege: PrivilegeDrop
140
+ resource_name_index: 3
141
+ };
108
142
  // Not useful for now
109
- common.MsgBase base = 1;
143
+ common.MsgBase base = 1;
110
144
  // Not useful for now
111
145
  string db_name = 2;
112
146
  // The unique collection name in milvus.(Required)
@@ -117,12 +151,17 @@ message DropCollectionRequest {
117
151
  * Check collection exist in milvus or not.
118
152
  */
119
153
  message HasCollectionRequest {
154
+ option (common.privilege_ext_obj) = {
155
+ resource_type: Collection
156
+ resource_privilege: PrivilegeRead
157
+ resource_name_index: 3
158
+ };
120
159
  // Not useful for now
121
160
  common.MsgBase base = 1;
122
161
  // Not useful for now
123
162
  string db_name = 2;
124
163
  // The collection name you want to check.
125
- string collection_name = 3;
164
+ string collection_name = 3;
126
165
  // If time_stamp is not zero, will return true when time_stamp >= created collection timestamp, otherwise will return false.
127
166
  uint64 time_stamp = 4;
128
167
  }
@@ -142,6 +181,11 @@ message StringResponse {
142
181
  * Get collection meta datas like: schema, collectionID, shards number ...
143
182
  */
144
183
  message DescribeCollectionRequest {
184
+ option (common.privilege_ext_obj) = {
185
+ resource_type: Collection
186
+ resource_privilege: PrivilegeRead
187
+ resource_name_index: 3
188
+ };
145
189
  // Not useful for now
146
190
  common.MsgBase base = 1;
147
191
  // Not useful for now
@@ -188,18 +232,30 @@ message DescribeCollectionResponse {
188
232
  * Load collection data into query nodes, then you can do vector search on this collection.
189
233
  */
190
234
  message LoadCollectionRequest {
235
+ option (common.privilege_ext_obj) = {
236
+ resource_type: Collection
237
+ resource_privilege: PrivilegeLoad
238
+ resource_name_index: 3
239
+ };
191
240
  // Not useful for now
192
241
  common.MsgBase base = 1;
193
242
  // Not useful for now
194
243
  string db_name = 2;
195
244
  // The collection name you want to load
196
245
  string collection_name = 3;
246
+ // The replica number to load, default by 1
247
+ int32 replica_number = 4;
197
248
  }
198
249
 
199
250
  /**
200
251
  * Release collection data from query nodes, then you can't do vector search on this collection.
201
252
  */
202
253
  message ReleaseCollectionRequest {
254
+ option (common.privilege_ext_obj) = {
255
+ resource_type: Collection
256
+ resource_privilege: PrivilegeRelease
257
+ resource_name_index: 3
258
+ };
203
259
  // Not useful for now
204
260
  common.MsgBase base = 1;
205
261
  // Not useful for now
@@ -212,6 +268,11 @@ message ReleaseCollectionRequest {
212
268
  * Get collection statistics like row_count.
213
269
  */
214
270
  message GetCollectionStatisticsRequest {
271
+ option (common.privilege_ext_obj) = {
272
+ resource_type: Collection
273
+ resource_privilege: PrivilegeRead
274
+ resource_name_index: 3
275
+ };
215
276
  // Not useful for now
216
277
  common.MsgBase base = 1;
217
278
  // Not useful for now
@@ -234,16 +295,20 @@ message GetCollectionStatisticsResponse {
234
295
  * This is for ShowCollectionsRequest type field.
235
296
  */
236
297
  enum ShowType {
237
- // Will return all colloections
298
+ // Will return all colloections
238
299
  All = 0;
239
300
  // Will return loaded collections with their inMemory_percentages
240
301
  InMemory = 1;
241
302
  }
242
303
 
243
304
  /*
244
- * List collections
305
+ * List collections
245
306
  */
246
307
  message ShowCollectionsRequest {
308
+ option (common.privilege_ext_obj) = {
309
+ resource_type: Collection
310
+ resource_privilege: PrivilegeRead
311
+ };
247
312
  // Not useful for now
248
313
  common.MsgBase base = 1;
249
314
  // Not useful for now
@@ -253,7 +318,7 @@ message ShowCollectionsRequest {
253
318
  // Decide return Loaded collections or All collections(Optional)
254
319
  ShowType type = 4;
255
320
  // When type is InMemory, will return these collection's inMemory_percentages.(Optional)
256
- repeated string collection_names = 5;
321
+ repeated string collection_names = 5;
257
322
  }
258
323
 
259
324
  /*
@@ -271,7 +336,9 @@ message ShowCollectionsResponse {
271
336
  // The utc timestamp calculated by created_timestamp
272
337
  repeated uint64 created_utc_timestamps = 5;
273
338
  // Load percentage on querynode when type is InMemory
274
- repeated int64 inMemory_percentages = 6;
339
+ repeated int64 inMemory_percentages = 6;
340
+ // Indicate whether query service is available
341
+ repeated bool query_service_available = 7;
275
342
  }
276
343
 
277
344
  /*
@@ -299,7 +366,7 @@ message DropPartitionRequest {
299
366
  // The collection name in milvus
300
367
  string collection_name = 3;
301
368
  // The partition name you want to drop
302
- string partition_name = 4;
369
+ string partition_name = 4;
303
370
  }
304
371
 
305
372
  /*
@@ -329,6 +396,8 @@ message LoadPartitionsRequest {
329
396
  string collection_name = 3;
330
397
  // The partition names you want to load
331
398
  repeated string partition_names = 4;
399
+ // The replicas number you would load, 1 by default
400
+ int32 replica_number = 5;
332
401
  }
333
402
 
334
403
  /*
@@ -357,7 +426,7 @@ message GetPartitionStatisticsRequest {
357
426
  // The collection name in milvus
358
427
  string collection_name = 3;
359
428
  // The partition name you want to collect statistics
360
- string partition_name = 4;
429
+ string partition_name = 4;
361
430
  }
362
431
 
363
432
  message GetPartitionStatisticsResponse {
@@ -432,7 +501,7 @@ message ShowSegmentsResponse {
432
501
  */
433
502
  message CreateIndexRequest {
434
503
  // Not useful for now
435
- common.MsgBase base = 1;
504
+ common.MsgBase base = 1;
436
505
  // Not useful for now
437
506
  string db_name = 2;
438
507
  // The particular collection name you want to create index.
@@ -440,11 +509,13 @@ message CreateIndexRequest {
440
509
  // The vector field name in this particular collection
441
510
  string field_name = 4;
442
511
  // Support keys: index_type,metric_type, params. Different index_type may has different params.
443
- repeated common.KeyValuePair extra_params = 5;
512
+ repeated common.KeyValuePair extra_params = 5;
513
+ // Version before 2.0.2 doesn't contain index_name, we use default index name.
514
+ string index_name = 6;
444
515
  }
445
516
 
446
517
  /*
447
- * Get created index information.
518
+ * Get created index information.
448
519
  * Current release of Milvus only supports showing latest built index.
449
520
  */
450
521
  message DescribeIndexRequest {
@@ -457,7 +528,7 @@ message DescribeIndexRequest {
457
528
  // The vector field name in this particular collection
458
529
  string field_name = 4;
459
530
  // No need to set up for now @2021.06.30
460
- string index_name = 5;
531
+ string index_name = 5;
461
532
  }
462
533
 
463
534
  /*
@@ -485,7 +556,7 @@ message DescribeIndexResponse {
485
556
  }
486
557
 
487
558
  /*
488
- * Get index building progress
559
+ * Get index building progress
489
560
  */
490
561
  message GetIndexBuildProgressRequest {
491
562
  // Not useful for now
@@ -559,22 +630,6 @@ message DeleteRequest {
559
630
  repeated uint32 hash_keys = 6;
560
631
  }
561
632
 
562
- enum PlaceholderType {
563
- None = 0;
564
- BinaryVector = 100;
565
- FloatVector = 101;
566
- }
567
-
568
- message PlaceholderValue {
569
- string tag = 1;
570
- PlaceholderType type = 2;
571
- // values is a 2d-array, every array contains a vector
572
- repeated bytes values = 3;
573
- }
574
-
575
- message PlaceholderGroup {
576
- repeated PlaceholderValue placeholders = 1;
577
- }
578
633
 
579
634
  message SearchRequest {
580
635
  common.MsgBase base = 1; // must
@@ -589,6 +644,7 @@ message SearchRequest {
589
644
  repeated common.KeyValuePair search_params = 9; // must
590
645
  uint64 travel_timestamp = 10;
591
646
  uint64 guarantee_timestamp = 11; // guarantee_timestamp
647
+ int64 nq = 12;
592
648
  }
593
649
 
594
650
  message Hits {
@@ -643,7 +699,7 @@ message VectorsArray {
643
699
  oneof array {
644
700
  VectorIDs id_array = 1; // vector ids
645
701
  schema.VectorField data_array = 2; // vectors data
646
- }
702
+ }
647
703
  }
648
704
 
649
705
  message CalcDistanceRequest {
@@ -689,8 +745,10 @@ message QuerySegmentInfo {
689
745
  int64 num_rows = 5;
690
746
  string index_name = 6;
691
747
  int64 indexID = 7;
748
+ // deprecated, check node_ids(NodeIds) field
692
749
  int64 nodeID = 8;
693
750
  common.SegmentState state = 9;
751
+ repeated int64 nodeIds = 10;
694
752
  }
695
753
 
696
754
  message GetQuerySegmentInfoRequest {
@@ -739,6 +797,7 @@ message LoadBalanceRequest {
739
797
  int64 src_nodeID = 2;
740
798
  repeated int64 dst_nodeIDs = 3;
741
799
  repeated int64 sealed_segmentIDs = 4;
800
+ string collectionName = 5;
742
801
  }
743
802
 
744
803
  message ManualCompactionRequest {
@@ -788,28 +847,295 @@ message GetFlushStateResponse {
788
847
  }
789
848
 
790
849
  message ImportRequest {
791
- string collection_name = 1; // target collection
792
- string partition_name = 2; // target partition
793
- bool row_based = 3; // the file is row-based or column-based
794
- repeated string files = 4; // file paths to be imported
795
- repeated common.KeyValuePair options = 5; // import options
850
+ string collection_name = 1; // target collection
851
+ string partition_name = 2; // target partition
852
+ repeated string channel_names = 3; // channel names for the collection
853
+ bool row_based = 4; // the file is row-based or column-based
854
+ repeated string files = 5; // file paths to be imported
855
+ repeated common.KeyValuePair options = 6; // import options, bucket, etc.
796
856
  }
797
-
857
+
798
858
  message ImportResponse {
799
859
  common.Status status = 1;
800
860
  repeated int64 tasks = 2; // id array of import tasks
801
861
  }
802
-
862
+
803
863
  message GetImportStateRequest {
804
864
  int64 task = 1; // id of an import task
805
865
  }
806
-
866
+
807
867
  message GetImportStateResponse {
808
868
  common.Status status = 1;
809
- common.ImportState state = 2; // is this import task finished or not
810
- int64 row_count = 3; // if the task is finished, this value is how many rows are imported. if the task is not finished, this value is how many rows are parsed.
869
+ common.ImportState state = 2; // is this import task finished or not
870
+ int64 row_count = 3; // if the task is finished, this value is how many rows are imported. if the task is not finished, this value is how many rows are parsed. return 0 if failed.
871
+ repeated int64 id_list = 4; // auto generated ids if the primary key is autoid
872
+ repeated common.KeyValuePair infos = 5; // more information about the task, progress percent, file path, failed reason, etc.
873
+ int64 id = 6; // id of an import task
874
+ bool data_queryable = 7; // A flag indicating whether import data are queryable (i.e. loaded in query nodes)
875
+ bool data_indexed = 8; // A flag indicating whether import data are indexed.
876
+ }
877
+
878
+ message ListImportTasksRequest {
879
+ }
880
+
881
+ message ListImportTasksResponse {
882
+ common.Status status = 1;
883
+ repeated GetImportStateResponse tasks = 2; // list of all import tasks
884
+ }
885
+
886
+ message GetReplicasRequest {
887
+ common.MsgBase base = 1;
888
+ int64 collectionID = 2;
889
+ bool with_shard_nodes = 3;
890
+ }
891
+
892
+ message GetReplicasResponse {
893
+ common.Status status = 1;
894
+ repeated ReplicaInfo replicas = 2;
895
+ }
896
+
897
+ message ReplicaInfo { // ReplicaGroup
898
+ int64 replicaID = 1;
899
+ int64 collectionID = 2;
900
+ repeated int64 partition_ids = 3; // empty indicates to load collection
901
+ repeated ShardReplica shard_replicas = 4;
902
+ repeated int64 node_ids = 5; // include leaders
903
+ }
904
+
905
+ message ShardReplica {
906
+ int64 leaderID = 1;
907
+ string leader_addr = 2; // IP:port
908
+ string dm_channel_name = 3;
909
+ // optional, DO NOT save it in meta, set it only for GetReplicas()
910
+ // if with_shard_nodes is true
911
+ repeated int64 node_ids = 4;
811
912
  }
812
913
 
813
914
  service ProxyService {
814
915
  rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
815
916
  }
917
+
918
+ // https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
919
+
920
+ message CreateCredentialRequest {
921
+ // Not useful for now
922
+ common.MsgBase base = 1;
923
+ // username
924
+ string username = 2;
925
+ // ciphertext password
926
+ string password = 3;
927
+ // create time
928
+ uint64 created_utc_timestamps = 4;
929
+ // modify time
930
+ uint64 modified_utc_timestamps = 5;
931
+ }
932
+
933
+ message UpdateCredentialRequest {
934
+ // Not useful for now
935
+ common.MsgBase base = 1;
936
+ // username
937
+ string username = 2;
938
+ // old password
939
+ string oldPassword = 3;
940
+ // new password
941
+ string newPassword = 4;
942
+ // create time
943
+ uint64 created_utc_timestamps = 5;
944
+ // modify time
945
+ uint64 modified_utc_timestamps = 6;
946
+ }
947
+
948
+ message DeleteCredentialRequest {
949
+ // Not useful for now
950
+ common.MsgBase base = 1;
951
+ // Not useful for now
952
+ string username = 2;
953
+ }
954
+
955
+ message ListCredUsersResponse {
956
+ // Contain error_code and reason
957
+ common.Status status = 1;
958
+ // username array
959
+ repeated string usernames = 2;
960
+ }
961
+
962
+ message ListCredUsersRequest {
963
+ // Not useful for now
964
+ common.MsgBase base = 1;
965
+ }
966
+
967
+ // https://wiki.lfaidata.foundation/display/MIL/MEP+29+--+Support+Role-Based+Access+Control
968
+ message RoleEntity {
969
+ string name = 1;
970
+ }
971
+
972
+ message UserEntity {
973
+ string name = 1;
974
+ }
975
+
976
+ message CreateRoleRequest {
977
+ // Not useful for now
978
+ common.MsgBase base = 1;
979
+ // role
980
+ RoleEntity entity = 2;
981
+ }
982
+
983
+ message DropRoleRequest {
984
+ // Not useful for now
985
+ common.MsgBase base = 1;
986
+ // role name
987
+ string role_name = 2;
988
+ }
989
+
990
+ enum OperateUserRoleType {
991
+ AddUserToRole = 0;
992
+ RemoveUserFromRole = 1;
993
+ }
994
+
995
+ message OperateUserRoleRequest {
996
+ // Not useful for now
997
+ common.MsgBase base = 1;
998
+ // username
999
+ string username = 2;
1000
+ // role name
1001
+ string role_name = 3;
1002
+ // operation type
1003
+ OperateUserRoleType type = 4;
1004
+ }
1005
+
1006
+ message SelectRoleRequest {
1007
+ // Not useful for now
1008
+ common.MsgBase base = 1;
1009
+ // role
1010
+ RoleEntity role = 2;
1011
+ // include user info
1012
+ bool include_user_info = 3;
1013
+ }
1014
+
1015
+ message RoleResult {
1016
+ RoleEntity role = 1;
1017
+ repeated UserEntity users = 2;
1018
+ }
1019
+
1020
+ message SelectRoleResponse {
1021
+ // Not useful for now
1022
+ common.Status status = 1;
1023
+ // role result array
1024
+ repeated RoleResult results = 2;
1025
+ }
1026
+
1027
+ message SelectUserRequest {
1028
+ // Not useful for now
1029
+ common.MsgBase base = 1;
1030
+ // user
1031
+ UserEntity user = 2;
1032
+ // include user info
1033
+ bool include_role_info = 3;
1034
+ }
1035
+
1036
+ message UserResult {
1037
+ UserEntity user = 1;
1038
+ repeated RoleEntity roles = 2;
1039
+ }
1040
+
1041
+ message SelectUserResponse {
1042
+ // Not useful for now
1043
+ common.Status status = 1;
1044
+ // user result array
1045
+ repeated UserResult result = 2;
1046
+ }
1047
+
1048
+ message ResourceEntity {
1049
+ string type = 1;
1050
+ }
1051
+
1052
+ message PrivilegeEntity {
1053
+ string name = 1;
1054
+ }
1055
+
1056
+ message SelectResourceRequest {
1057
+ // Not useful for now
1058
+ common.MsgBase base = 1;
1059
+ // resource
1060
+ ResourceEntity entity = 2;
1061
+ // include privilege info
1062
+ bool include_privilege_info = 3;
1063
+ }
1064
+
1065
+ message ResourceResult {
1066
+ ResourceEntity resource = 1;
1067
+ repeated PrivilegeEntity privileges = 2;
1068
+ }
1069
+
1070
+ message SelectResourceResponse {
1071
+ // Not useful for now
1072
+ common.Status status = 1;
1073
+ // resource result array
1074
+ repeated ResourceResult results = 2;
1075
+ }
1076
+
1077
+ message PrincipalEntity {
1078
+ // principal type, including user, role
1079
+ string principal_type = 1;
1080
+ // principal, including user entity or role entity
1081
+ oneof principal {
1082
+ UserEntity user = 2;
1083
+ RoleEntity role = 3;
1084
+ }
1085
+ }
1086
+
1087
+ message GrantorEntity {
1088
+ UserEntity user = 1;
1089
+ PrivilegeEntity privilege = 2;
1090
+ }
1091
+
1092
+ message GrantEntity {
1093
+ // principal
1094
+ PrincipalEntity principal = 1;
1095
+ // resource
1096
+ ResourceEntity resource = 2;
1097
+ // resource name
1098
+ string resource_name = 3;
1099
+ // privilege
1100
+ GrantorEntity grantor = 4;
1101
+ }
1102
+
1103
+ message SelectGrantRequest {
1104
+ // Not useful for now
1105
+ common.MsgBase base = 1;
1106
+ // grant
1107
+ GrantEntity entity = 2;
1108
+ }
1109
+
1110
+ message SelectGrantResponse {
1111
+ // Not useful for now
1112
+ common.Status status = 1;
1113
+ // grant info array
1114
+ repeated GrantEntity entities = 2;
1115
+ }
1116
+
1117
+ enum OperatePrivilegeType {
1118
+ Grant = 0;
1119
+ Revoke = 1;
1120
+ }
1121
+
1122
+ message OperatePrivilegeRequest {
1123
+ // Not useful for now
1124
+ common.MsgBase base = 1;
1125
+ // grant
1126
+ GrantEntity entity = 2;
1127
+ // operation type
1128
+ OperatePrivilegeType type = 3;
1129
+ }
1130
+
1131
+ message MilvusExt {
1132
+ string version = 1;
1133
+ }
1134
+
1135
+ extend google.protobuf.FileOptions {
1136
+ MilvusExt milvus_ext_obj = 1001;
1137
+ }
1138
+
1139
+ option (milvus_ext_obj) = {
1140
+ version: "2.1.0"
1141
+ };
@@ -1,11 +1,16 @@
1
1
  syntax = "proto3";
2
-
3
2
  package milvus.proto.schema;
3
+
4
4
  option go_package = "github.com/milvus-io/milvus/internal/proto/schemapb";
5
5
 
6
+ option java_multiple_files = true;
7
+ option java_package = "io.milvus.grpc";
8
+ option java_outer_classname = "SchemaProto";
9
+ option java_generate_equals_and_hash = true;
10
+
6
11
  import "common.proto";
7
12
 
8
- /**
13
+ /**
9
14
  * @brief Field data type
10
15
  */
11
16
  enum DataType {
@@ -20,6 +25,7 @@ enum DataType {
20
25
  Double = 11;
21
26
 
22
27
  String = 20;
28
+ VarChar = 21; // variable-length strings with a specified maximum length
23
29
 
24
30
  BinaryVector = 100;
25
31
  FloatVector = 101;
@@ -123,3 +129,4 @@ message SearchResultData {
123
129
  IDs ids = 5;
124
130
  repeated int64 topks = 6;
125
131
  }
132
+
package/dist/sdk.json CHANGED
@@ -1 +1 @@
1
- {"version":"2.0.2","milvusVersion":"v2.0.1"}
1
+ {"version":"2.1.1","milvusVersion":"v2.1.0"}
@@ -35,7 +35,7 @@ function generateInsertData(fields, count) {
35
35
  ? __spreadArray([], Array(dim)).map(function () { return Math.random() * 10; })
36
36
  : isBool
37
37
  ? count % 2 === 0
38
- : count;
38
+ : Math.floor(Math.random() * 100000);
39
39
  });
40
40
  results.push(value);
41
41
  count--;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,SAAgB,SAAS,CAAC,GAAQ,EAAE,MAAc,EAAE,MAAW;IAC7D,IAAM,GAAG,GAAG,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QACtC,IAAI;YACF,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,UAAC,GAAQ,EAAE,MAAW;gBACxC,IAAI,GAAG,EAAE;oBACP,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;gBACD,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;SACJ;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,C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