@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,189 +1,9 @@
1
- import { ConsistencyLevelEnum } from './Collection';
2
- import { Privileges, IndexState, ImportState, KeyValuePair, NumberArrayId, SegmentState, StringArrayId, CompactionState, RbacObjects } from './Common';
3
1
  export declare enum ErrorCode {
4
2
  SUCCESS = "Success",
5
3
  INDEX_NOT_EXIST = "IndexNotExist",
6
4
  UNEXPECTED_ERROR = "UnexpectedError",
7
5
  EMPTY_COLLECTION = "EmptyCollection"
8
6
  }
9
- interface TimeStamp {
10
- created_timestamp: string;
11
- created_utc_timestamp: string;
12
- }
13
- interface TimeStampArray {
14
- created_timestamps: string[];
15
- created_utc_timestamps: string[];
16
- }
17
- export interface ResStatus {
18
- error_code: string | number;
19
- reason: string;
20
- }
21
- export interface BoolResponse {
22
- status: ResStatus;
23
- value: Boolean;
24
- }
25
- export interface CollectionData {
26
- name: string;
27
- id: string;
28
- timestamp: string;
29
- loadedPercentage: string;
30
- }
31
- export interface ShowCollectionsResponse extends TimeStampArray {
32
- status: ResStatus;
33
- data: CollectionData[];
34
- }
35
- export interface FieldSchema {
36
- name: string;
37
- description: string;
38
- data_type: string;
39
- is_primary_key?: boolean;
40
- type_params: KeyValuePair[];
41
- index_params: KeyValuePair[];
42
- autoID: boolean;
43
- }
44
- export interface CollectionSchema {
45
- name: string;
46
- description: string;
47
- fields: FieldSchema[];
48
- }
49
- export interface DescribeCollectionResponse extends TimeStamp {
50
- status: ResStatus;
51
- schema: CollectionSchema;
52
- collectionID: string;
53
- consistency_level: ConsistencyLevelEnum;
54
- aliases: string[];
55
- virtual_channel_names: string[];
56
- physical_channel_names: string[];
57
- }
58
- export interface StatisticsResponse {
59
- status: ResStatus;
60
- stats: KeyValuePair[];
61
- data: {
62
- [x: string]: any;
63
- };
64
- }
65
- export interface ShowPartitionsResponse extends TimeStampArray {
66
- status: ResStatus;
67
- partition_names: string[];
68
- partitionIDs: number[];
69
- }
70
- export interface IndexDescription {
71
- index_name: string;
72
- indexID: number;
73
- params: KeyValuePair[];
74
- field_name: string;
75
- }
76
- export interface DescribeIndexResponse {
77
- status: ResStatus;
78
- index_descriptions: IndexDescription[];
79
- }
80
- export interface GetIndexStateResponse {
81
- status: ResStatus;
82
- state: IndexState;
83
- }
84
- export interface GetIndexBuildProgressResponse {
85
- status: ResStatus;
86
- indexed_rows: number;
87
- total_rows: number;
88
- }
89
- export interface MutationResult {
90
- succ_index: Number[];
91
- err_index: Number[];
92
- status: ResStatus;
93
- acknowledged: boolean;
94
- insert_cnt: string;
95
- delete_cnt: string;
96
- upsert_cnt: string;
97
- timestamp: string;
98
- IDs: StringArrayId | NumberArrayId;
99
- }
100
- export interface SearchResultData {
101
- [x: string]: any;
102
- score: number;
103
- id: string;
104
- }
105
- export interface SearchResults {
106
- status: ResStatus;
107
- results: SearchResultData[];
108
- }
109
- export interface FlushResult {
110
- status: ResStatus;
111
- coll_segIDs: any;
112
- }
113
- export interface QueryResults {
114
- status: ResStatus;
115
- data: {
116
- [x: string]: any;
117
- }[];
118
- }
119
- export interface GetMetricsResponse {
120
- status: ResStatus;
121
- response: any;
122
- component_name: string;
123
- }
124
- export interface CalcDistanceResponse {
125
- status: ResStatus;
126
- [x: string]: any;
127
- }
128
- export interface GetFlushStateResponse {
129
- status: ResStatus;
130
- flushed: boolean;
131
- }
132
- export interface QuerySegmentInfo {
133
- segmentID: number;
134
- collectionID: number;
135
- partitionID: number;
136
- mem_size: number;
137
- num_rows: number;
138
- index_name: string;
139
- indexID: number;
140
- nodeID: number;
141
- state: SegmentState[];
142
- }
143
- export interface GetQuerySegmentInfoResponse {
144
- status: ResStatus;
145
- infos: QuerySegmentInfo[];
146
- }
147
- export interface CompactionResponse {
148
- status: ResStatus;
149
- compactionID: number;
150
- }
151
- export interface GetCompactionStateResponse {
152
- status: ResStatus;
153
- state: CompactionState;
154
- executingPlanNo: number;
155
- timeoutPlanNo: number;
156
- completedPlanNo: number;
157
- }
158
- export interface GetCompactionPlansResponse {
159
- status: ResStatus;
160
- state: CompactionState;
161
- mergeInfos: {
162
- sources: number[];
163
- target: number;
164
- }[];
165
- }
166
- export interface ListCredUsersResponse {
167
- status: ResStatus;
168
- usernames: string[];
169
- }
170
- export interface ReplicasResponse {
171
- status: ResStatus;
172
- replicas: ReplicaInfo[];
173
- }
174
- export interface ReplicaInfo {
175
- replicaID: number;
176
- collectionID: number;
177
- partition_ids: number[];
178
- shard_replicas: ShardReplica[];
179
- node_ids: number[];
180
- }
181
- export interface ShardReplica {
182
- leaderID: number;
183
- leader_addr: string;
184
- dm_channel_name: string;
185
- node_ids: number[];
186
- }
187
7
  export interface GetVersionResponse {
188
8
  version: string;
189
9
  }
@@ -191,69 +11,3 @@ export interface CheckHealthResponse {
191
11
  isHealthy: boolean;
192
12
  reasons: [];
193
13
  }
194
- export interface ImportResponse {
195
- status: ResStatus;
196
- tasks: number[];
197
- }
198
- export interface GetImportStateResponse {
199
- status: ResStatus;
200
- state: ImportState;
201
- row_count: number;
202
- id_list: number[];
203
- infos: KeyValuePair[];
204
- id: number;
205
- collection_id: number;
206
- segment_ids: number[];
207
- create_ts: number;
208
- }
209
- export interface ListImportTasksResponse {
210
- status: ResStatus;
211
- tasks: GetImportStateResponse[];
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
- }
259
- export {};
@@ -1 +1 @@
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
+ {"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":";;;AAAA,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,5 @@
1
- import { GrpcTimeOut, Privileges, RbacObjects } from './Common';
1
+ import { GrpcTimeOut, PrivilegesTypes, ResStatus } from './Common';
2
+ import { RbacObjects } from '../const/Milvus';
2
3
  export interface UpdateUserReq extends GrpcTimeOut {
3
4
  username: string;
4
5
  oldPassword: string;
@@ -42,10 +43,61 @@ export interface OperateRolePrivilegeReq extends GrpcTimeOut {
42
43
  roleName: string;
43
44
  object: RbacObjects;
44
45
  objectName: string;
45
- privilegeName: Privileges;
46
+ privilegeName: PrivilegesTypes;
46
47
  }
47
48
  export interface SelectGrantReq extends OperateRolePrivilegeReq {
48
49
  }
49
50
  export interface ListGrantsReq extends GrpcTimeOut {
50
51
  roleName: string;
51
52
  }
53
+ export interface ListCredUsersResponse {
54
+ status: ResStatus;
55
+ usernames: string[];
56
+ }
57
+ type RoleEntity = {
58
+ name: string;
59
+ };
60
+ type User = {
61
+ name: string;
62
+ };
63
+ type RoleResult = {
64
+ users: User[];
65
+ role: RoleEntity;
66
+ };
67
+ export interface SelectRoleResponse {
68
+ status: ResStatus;
69
+ results: RoleResult[];
70
+ }
71
+ type UserResult = {
72
+ user: User;
73
+ roles: RoleEntity[];
74
+ };
75
+ export interface SelectUserResponse {
76
+ status: ResStatus;
77
+ results: UserResult[];
78
+ }
79
+ type ObjectEntity = {
80
+ name: RbacObjects;
81
+ };
82
+ type PrivilegeEntity = {
83
+ name: PrivilegesTypes;
84
+ };
85
+ type Grantor = {
86
+ user: User;
87
+ privilege: PrivilegeEntity;
88
+ };
89
+ type GrantEntity = {
90
+ role: RoleEntity;
91
+ object: ObjectEntity;
92
+ object_name: string;
93
+ grantor: Grantor;
94
+ };
95
+ export interface SelectGrantResponse {
96
+ status: ResStatus;
97
+ entities: GrantEntity[];
98
+ }
99
+ export interface HasRoleResponse {
100
+ status: ResStatus;
101
+ hasRole: boolean;
102
+ }
103
+ export {};
@@ -1,7 +1,8 @@
1
- export * from "./types/Collection";
2
- export * from "./types/Data";
3
- export * from "./types/Common";
4
- export * from "./types/Index";
5
- export * from "./types/Partition";
6
- export * from "./types/Response";
7
- export * from "./types/Search";
1
+ export * from './types/Collection';
2
+ export * from './types/Data';
3
+ export * from './types/Common';
4
+ export * from './types/Index';
5
+ export * from './types/Partition';
6
+ export * from './types/Response';
7
+ export * from './types/User';
8
+ export * from './types/Resource';
@@ -20,5 +20,6 @@ __exportStar(require("./types/Common"), exports);
20
20
  __exportStar(require("./types/Index"), exports);
21
21
  __exportStar(require("./types/Partition"), exports);
22
22
  __exportStar(require("./types/Response"), exports);
23
- __exportStar(require("./types/Search"), exports);
23
+ __exportStar(require("./types/User"), exports);
24
+ __exportStar(require("./types/Resource"), exports);
24
25
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../milvus/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,+CAA6B;AAE7B,iDAA+B;AAE/B,gDAA8B;AAE9B,oDAAkC;AAElC,mDAAiC;AAEjC,iDAA+B"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../milvus/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,+CAA6B;AAE7B,iDAA+B;AAE/B,gDAA8B;AAE9B,oDAAkC;AAElC,mDAAiC;AAEjC,+CAA6B;AAE7B,mDAAiC"}
@@ -12,6 +12,7 @@ option csharp_namespace = "IO.Milvus.Grpc";
12
12
 
13
13
  import "google/protobuf/descriptor.proto";
14
14
 
15
+ // Deprecated
15
16
  enum ErrorCode {
16
17
  Success = 0;
17
18
  UnexpectedError = 1;
@@ -68,7 +69,9 @@ enum ErrorCode {
68
69
  MemoryQuotaExhausted = 53;
69
70
  DiskQuotaExhausted = 54;
70
71
  TimeTickLongDelay = 55;
71
-
72
+ NotReadyServe = 56;
73
+ // Coord is switching from standby mode to active mode
74
+ NotReadyCoordActivating = 57;
72
75
  // Service availability.
73
76
  // NA: Not Available.
74
77
  DataCoordNA = 100;
@@ -100,6 +103,7 @@ enum SegmentState {
100
103
  message Status {
101
104
  ErrorCode error_code = 1;
102
105
  string reason = 2;
106
+ int32 code = 3;
103
107
  }
104
108
 
105
109
  message KeyValuePair {
@@ -155,7 +159,9 @@ enum MsgType {
155
159
  AlterAlias = 110;
156
160
  AlterCollection = 111;
157
161
  RenameCollection = 112;
158
-
162
+ DescribeAlias = 113;
163
+ ListAliases = 114;
164
+
159
165
  /* DEFINITION REQUESTS: PARTITION */
160
166
  CreatePartition = 200;
161
167
  DropPartition = 201;
@@ -173,6 +179,8 @@ enum MsgType {
173
179
  HandoffSegments = 254;
174
180
  LoadBalanceSegments = 255;
175
181
  DescribeSegments = 256;
182
+ FederListIndexedSegment = 257;
183
+ FederDescribeSegmentIndexData = 258;
176
184
 
177
185
  /* DEFINITION REQUESTS: INDEX */
178
186
  CreateIndex = 300;
@@ -335,6 +343,14 @@ enum ObjectPrivilege {
335
343
  PrivilegeManageOwnership = 23;
336
344
  PrivilegeSelectUser = 24;
337
345
  PrivilegeUpsert = 25;
346
+ PrivilegeCreateResourceGroup = 26;
347
+ PrivilegeDropResourceGroup = 27;
348
+ PrivilegeDescribeResourceGroup = 28;
349
+ PrivilegeListResourceGroups = 29;
350
+ PrivilegeTransferNode = 30;
351
+ PrivilegeTransferReplica = 31;
352
+ PrivilegeGetLoadingProgress = 32;
353
+ PrivilegeGetLoadState = 33;
338
354
  }
339
355
 
340
356
  message PrivilegeExt {
@@ -362,3 +378,8 @@ enum LoadState {
362
378
  LoadStateLoading = 2;
363
379
  LoadStateLoaded = 3;
364
380
  }
381
+
382
+ message SegmentStats {
383
+ int64 SegmentID = 1;
384
+ int64 NumRows = 2;
385
+ }
@@ -0,0 +1,40 @@
1
+ syntax = "proto3";
2
+ package milvus.proto.feder;
3
+ option go_package = "github.com/milvus-io/milvus-proto/go-api/federpb";
4
+
5
+ import "common.proto";
6
+
7
+ message SegmentIndexData {
8
+ int64 segmentID = 1;
9
+ string index_data = 2; // data from knownwhere
10
+ }
11
+
12
+ message FederSegmentSearchResult {
13
+ int64 segmentID = 1;
14
+ string visit_info = 2;
15
+ }
16
+
17
+ message ListIndexedSegmentRequest {
18
+ common.MsgBase base = 1;
19
+ string collection_name = 2;
20
+ string index_name = 3;
21
+ }
22
+
23
+ message ListIndexedSegmentResponse {
24
+ common.Status status = 1;
25
+ repeated int64 segmentIDs = 2;
26
+ }
27
+
28
+ message DescribeSegmentIndexDataRequest {
29
+ common.MsgBase base = 1;
30
+ string collection_name = 2;
31
+ string index_name = 3;
32
+ repeated int64 segmentsIDs = 4;
33
+ }
34
+
35
+ message DescribeSegmentIndexDataResponse {
36
+ common.Status status = 1;
37
+ // segmentID => segmentIndexData
38
+ map<int64, feder.SegmentIndexData> index_data = 2;
39
+ repeated common.KeyValuePair index_params = 3;
40
+ }
@@ -133,6 +133,35 @@ message ExtensionRangeOptions {
133
133
  // The parser stores options it doesn't recognize here. See above.
134
134
  repeated UninterpretedOption uninterpreted_option = 999;
135
135
 
136
+ message Declaration {
137
+ // The extension number declared within the extension range.
138
+ optional int32 number = 1;
139
+
140
+ // The fully-qualified name of the extension field. There must be a leading
141
+ // dot in front of the full name.
142
+ optional string full_name = 2;
143
+
144
+ // The fully-qualified type name of the extension field. Unlike
145
+ // Metadata.type, Declaration.type must have a leading dot for messages
146
+ // and enums.
147
+ optional string type = 3;
148
+
149
+ // If true, indicates that the extension must be defined as repeated.
150
+ // Otherwise the extension must be defined as optional.
151
+ optional bool is_repeated = 4;
152
+
153
+ // If true, indicates that the number is reserved in the extension range,
154
+ // and any extension field with the number will fail to compile. Set this
155
+ // when a declared extension field is deleted.
156
+ optional bool reserved = 5;
157
+ }
158
+
159
+ // go/protobuf-stripping-extension-declarations
160
+ // Like Metadata, but we use a repeated field to hold all extension
161
+ // declarations. This should avoid the size increases of transforming a large
162
+ // extension range into small ranges in generated binaries.
163
+ repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];
164
+
136
165
  // Clients can define custom options in extensions of this message. See above.
137
166
  extensions 1000 to max;
138
167
  }
@@ -659,7 +688,8 @@ message FieldOptions {
659
688
  TARGET_TYPE_METHOD = 9;
660
689
  }
661
690
 
662
- optional OptionTargetType target = 18;
691
+ optional OptionTargetType target = 18 [deprecated = true];
692
+ repeated OptionTargetType targets = 19;
663
693
 
664
694
  // The parser stores options it doesn't recognize here. See above.
665
695
  repeated UninterpretedOption uninterpreted_option = 999;