@milaboratories/pl-drivers 1.12.7 → 1.12.8

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 (92) hide show
  1. package/dist/clients/download.cjs +1 -0
  2. package/dist/clients/download.cjs.map +1 -1
  3. package/dist/clients/download.js +1 -0
  4. package/dist/clients/download.js.map +1 -1
  5. package/dist/clients/logs.cjs +2 -0
  6. package/dist/clients/logs.cjs.map +1 -1
  7. package/dist/clients/logs.js +2 -0
  8. package/dist/clients/logs.js.map +1 -1
  9. package/dist/clients/ls_api.cjs +1 -0
  10. package/dist/clients/ls_api.cjs.map +1 -1
  11. package/dist/clients/ls_api.js +1 -0
  12. package/dist/clients/ls_api.js.map +1 -1
  13. package/dist/clients/progress.cjs +4 -1
  14. package/dist/clients/progress.cjs.map +1 -1
  15. package/dist/clients/progress.js +4 -1
  16. package/dist/clients/progress.js.map +1 -1
  17. package/dist/clients/upload.cjs +17 -3
  18. package/dist/clients/upload.cjs.map +1 -1
  19. package/dist/clients/upload.js +17 -3
  20. package/dist/clients/upload.js.map +1 -1
  21. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.cjs +28 -16
  22. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.cjs.map +1 -1
  23. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.cjs +1 -1
  24. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.cjs.map +1 -1
  25. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +2 -2
  26. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.js +1 -1
  27. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.js.map +1 -1
  28. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +11 -5
  29. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.js +28 -16
  30. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.js.map +1 -1
  31. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.cjs +26 -12
  32. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.cjs.map +1 -1
  33. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.cjs +4 -4
  34. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.cjs.map +1 -1
  35. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.js +4 -4
  36. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.js.map +1 -1
  37. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +16 -16
  38. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.js +26 -12
  39. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.js.map +1 -1
  40. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.cjs +36 -12
  41. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.cjs.map +1 -1
  42. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.cjs +1 -1
  43. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.cjs.map +1 -1
  44. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +2 -2
  45. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.js +1 -1
  46. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.js.map +1 -1
  47. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +8 -0
  48. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.js +36 -12
  49. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.js.map +1 -1
  50. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.cjs +29 -189
  51. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.cjs.map +1 -1
  52. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.cjs +20 -41
  53. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.cjs.map +1 -1
  54. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +36 -66
  55. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.js +20 -41
  56. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.js.map +1 -1
  57. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +52 -137
  58. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.js +29 -189
  59. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.js.map +1 -1
  60. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.cjs +225 -24
  61. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.cjs.map +1 -1
  62. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.cjs +21 -7
  63. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.cjs.map +1 -1
  64. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.js +21 -7
  65. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.js.map +1 -1
  66. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.js +225 -24
  67. package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.js.map +1 -1
  68. package/dist/proto-rest/downloadapi.d.ts +8 -3
  69. package/dist/proto-rest/progressapi.d.ts +4 -2
  70. package/dist/proto-rest/streamingapi.d.ts +64 -203
  71. package/package.json +5 -5
  72. package/src/clients/download.ts +1 -0
  73. package/src/clients/logs.ts +2 -0
  74. package/src/clients/ls_api.ts +1 -0
  75. package/src/clients/progress.ts +1 -1
  76. package/src/clients/upload.ts +14 -1
  77. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +2 -2
  78. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +24 -11
  79. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +8 -8
  80. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +31 -18
  81. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +2 -2
  82. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +23 -1
  83. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +39 -78
  84. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +72 -263
  85. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.ts +41 -14
  86. package/src/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.ts +286 -44
  87. package/src/proto-grpc/google/protobuf/descriptor.ts +2 -5
  88. package/src/proto-rest/downloadapi.ts +8 -3
  89. package/src/proto-rest/lsapi.ts +23 -18
  90. package/src/proto-rest/progressapi.ts +4 -0
  91. package/src/proto-rest/streamingapi.ts +65 -211
  92. package/src/proto-rest/uploadapi.ts +141 -39
@@ -26,11 +26,17 @@ export interface UploadAPI_Init {
26
26
  */
27
27
  export interface UploadAPI_Init_Request {
28
28
  /**
29
- * Id of upload resource
29
+ * ID of the upload resource
30
30
  *
31
31
  * @generated from protobuf field: uint64 resource_id = 1
32
32
  */
33
33
  resourceId: bigint;
34
+ /**
35
+ * Signature proving the caller is authorized to access this resource.
36
+ *
37
+ * @generated from protobuf field: optional bytes resource_signature = 2
38
+ */
39
+ resourceSignature?: Uint8Array;
34
40
  }
35
41
  /**
36
42
  * @generated from protobuf message MiLaboratories.Controller.Shared.UploadAPI.Init.Response
@@ -38,11 +44,11 @@ export interface UploadAPI_Init_Request {
38
44
  export interface UploadAPI_Init_Response {
39
45
  /**
40
46
  * Number of parts in this upload.
41
- * For parallel upload support, client can generate any number of part upload URLs
42
- * at the moment and upload them in parallel.
47
+ * For parallel upload support, the client can generate any number of part upload URLs
48
+ * at once and upload them in parallel.
43
49
  * <parts_count> keeps the number of chunks supported by this upload.
44
50
  * The parts count is calculated from the planned size of the upload, controller
45
- * configuration and underlying storage restrictions.
51
+ * configuration, and underlying storage restrictions.
46
52
  *
47
53
  * @generated from protobuf field: uint64 parts_count = 1
48
54
  */
@@ -52,22 +58,23 @@ export interface UploadAPI_Init_Response {
52
58
  */
53
59
  partSize: bigint;
54
60
  /**
55
- * Checksum algorithm to use for the part upload.
61
+ * Checksum algorithm to use for each part upload and final verification.
56
62
  *
57
63
  * @generated from protobuf field: MiLaboratories.Controller.Shared.UploadAPI.ChecksumAlgorithm checksum_algorithm = 4
58
64
  */
59
65
  checksumAlgorithm: UploadAPI_ChecksumAlgorithm;
60
66
  /**
61
- * Header name to use for the checksum.
67
+ * Header name to use for the checksum in each part upload request.
68
+ * A non-empty value combined with checksum_algorithm enables each part upload verification.
62
69
  *
63
70
  * @generated from protobuf field: string checksum_header = 5
64
71
  */
65
72
  checksumHeader: string;
66
73
  /**
67
- * List of IDs of parts that were already uploaded by client.
68
- * Helps client to recover upload and skip already done parts
74
+ * List of IDs of parts that were already uploaded by the client.
75
+ * Helps the client recover the upload and skip already uploaded parts
69
76
  * after being interrupted in the middle of the upload
70
- * (say, because of the restart).
77
+ * (say, because of a restart).
71
78
  * Parts enumeration starts from 1.
72
79
  *
73
80
  * @generated from protobuf field: repeated uint64 uploaded_parts = 2
@@ -84,21 +91,27 @@ export interface UploadAPI_UpdateProgress {
84
91
  */
85
92
  export interface UploadAPI_UpdateProgress_Request {
86
93
  /**
87
- * Id of upload resource
94
+ * ID of the upload resource
88
95
  *
89
96
  * @generated from protobuf field: uint64 resource_id = 1
90
97
  */
91
98
  resourceId: bigint;
92
99
  /**
93
- * Amount of bytes, uploaded since the earlier call to UpdateProgress.
94
- * This value is just blindly added to the 'bytes_processed' of progress report,
100
+ * Signature proving the caller is authorized to access this resource.
101
+ *
102
+ * @generated from protobuf field: optional bytes resource_signature = 3
103
+ */
104
+ resourceSignature?: Uint8Array;
105
+ /**
106
+ * Number of bytes uploaded since the earlier call to UpdateProgress.
107
+ * This value is just blindly added to the 'bytes_processed' of the progress report,
95
108
  * so other clients can see the upload progress.
96
- * If client uploads the data in several streams (several chunks in parallel), it
109
+ * If the client uploads the data in several streams (several chunks in parallel), it
97
110
  * can safely send progress updates individually for each of the streams, just counting
98
- * bytes uploaded by particular stream.
111
+ * bytes uploaded by a particular stream.
99
112
  *
100
- * Negative value can be used to report about upload retry: when upload was interrupted,
101
- * part of the uploaded data is lost and require re-upload.
113
+ * A negative value can be used to report an upload retry: when the upload was interrupted,
114
+ * part of the uploaded data is lost and requires a re-upload.
102
115
  *
103
116
  * @generated from protobuf field: int64 bytes_processed = 2
104
117
  */
@@ -119,15 +132,21 @@ export interface UploadAPI_GetPartURL {
119
132
  */
120
133
  export interface UploadAPI_GetPartURL_Request {
121
134
  /**
122
- * Id of upload resource
135
+ * ID of the upload resource
123
136
  *
124
137
  * @generated from protobuf field: uint64 resource_id = 1
125
138
  */
126
139
  resourceId: bigint;
127
140
  /**
128
- * Part to be uploaded. It is responsibility of the Client to watch after already uploaded parts:
129
- * - client can request an URL for the same part twice (request -> request) without errors;
130
- * - client can request an URL for alrady uploaded part (request -> upload -> request) without errors.
141
+ * Signature proving the caller is authorized to access this resource.
142
+ *
143
+ * @generated from protobuf field: optional bytes resource_signature = 6
144
+ */
145
+ resourceSignature?: Uint8Array;
146
+ /**
147
+ * Part to be uploaded. It is the responsibility of the client to keep track of already uploaded parts:
148
+ * - client can request a URL for the same part twice (request -> request) without errors;
149
+ * - client can request a URL for an already uploaded part (request -> upload -> request) without errors.
131
150
  *
132
151
  * Parts enumeration starts from 1.
133
152
  *
@@ -135,24 +154,24 @@ export interface UploadAPI_GetPartURL_Request {
135
154
  */
136
155
  partNumber: bigint;
137
156
  /**
138
- * Size of the part uploaded by client earlier. Allows controller to count upload progress
139
- * based on client's input.
140
- * Client is free to never sent this value (send zeroes in each request).
157
+ * Size of the part uploaded by the client earlier. Allows the controller to count upload progress
158
+ * based on the client's input.
159
+ * The client is free to never send this value (send zeroes in each request).
141
160
  *
142
161
  * @generated from protobuf field: uint64 uploaded_part_size = 3
143
162
  */
144
163
  uploadedPartSize: bigint;
145
164
  /**
146
- * Do we need to presign URL for internal use.
147
- * Controllers could use this if they are trying to download something from internal network.
148
- * For backward compatibility, by default pl backend will presign external urls.
165
+ * Whether to presign the URL for internal use.
166
+ * Controllers could use this if they are trying to upload something from the internal network.
167
+ * For backward compatibility, by default the pl backend will presign external URLs.
149
168
  *
150
169
  * @generated from protobuf field: bool is_internal_use = 4
151
170
  */
152
171
  isInternalUse: boolean;
153
172
  /**
154
- * Checksum is not used for now, but it is here for case
155
- * where signing checksum header is required.
173
+ * Checksum is not used for now, but it is here for the case
174
+ * where signing the checksum header is required.
156
175
  *
157
176
  * @generated from protobuf field: string part_checksum = 5
158
177
  */
@@ -163,11 +182,11 @@ export interface UploadAPI_GetPartURL_Request {
163
182
  */
164
183
  export interface UploadAPI_GetPartURL_HTTPHeader {
165
184
  /**
166
- * @generated from protobuf field: string Name = 1
185
+ * @generated from protobuf field: string name = 1
167
186
  */
168
187
  name: string;
169
188
  /**
170
- * @generated from protobuf field: string Value = 2
189
+ * @generated from protobuf field: string value = 2
171
190
  */
172
191
  value: string;
173
192
  }
@@ -188,9 +207,9 @@ export interface UploadAPI_GetPartURL_Response {
188
207
  */
189
208
  method: string;
190
209
  /**
191
- * List of headers with their values, MANDATORY to be sent by the client for the upload.
192
- * The destination service (the one, that will handle upload request for specific part)
193
- * may reject the request if it would not keep the given headers.
210
+ * List of headers with their values that MUST be sent by the client for the upload.
211
+ * The destination service (the one that will handle the upload request for a specific part)
212
+ * may reject the request if it does not include the given headers.
194
213
  *
195
214
  * @generated from protobuf field: repeated MiLaboratories.Controller.Shared.UploadAPI.GetPartURL.HTTPHeader headers = 3
196
215
  */
@@ -198,7 +217,7 @@ export interface UploadAPI_GetPartURL_Response {
198
217
  /**
199
218
  * The number of the _first_ byte in the chunk.
200
219
  * Absolute position from the start of the file ( file.seek(<chunk_start>, SEEK_START) ).
201
- * The client is expected to send [<chunk_start>; <chunk_end>) range.
220
+ * The client is expected to send the [<chunk_start>; <chunk_end>) range.
202
221
  *
203
222
  * @generated from protobuf field: uint64 chunk_start = 4
204
223
  */
@@ -206,7 +225,7 @@ export interface UploadAPI_GetPartURL_Response {
206
225
  /**
207
226
  * The number of the byte _after_ the last to be sent in the chunk.
208
227
  * Absolute position from the start of the file.
209
- * The client is expected to send [<chunk_start>; <chunk_end>) range.
228
+ * The client is expected to send the [<chunk_start>; <chunk_end>) range.
210
229
  *
211
230
  * @generated from protobuf field: uint64 chunk_end = 5
212
231
  */
@@ -225,12 +244,60 @@ export interface UploadAPI_Finalize_Request {
225
244
  * @generated from protobuf field: uint64 resource_id = 1
226
245
  */
227
246
  resourceId: bigint;
247
+ /**
248
+ * Signature proving the caller is authorized to access this resource.
249
+ *
250
+ * @generated from protobuf field: optional bytes resource_signature = 4
251
+ */
252
+ resourceSignature?: Uint8Array;
253
+ /**
254
+ * The client can send the final checksum of the whole file to verify the upload.
255
+ * The algorithm used to calculate this final checksum must match the algorithm from
256
+ * Init.Response. The server may reject the request on a mismatch
257
+ * (meaning the server does not support the given algorithm).
258
+ *
259
+ * @generated from protobuf field: MiLaboratories.Controller.Shared.UploadAPI.ChecksumAlgorithm checksum_algorithm = 2
260
+ */
261
+ checksumAlgorithm: UploadAPI_ChecksumAlgorithm;
262
+ /**
263
+ * Checksum of the whole file for validation. When provided, the server may verify the upload before
264
+ * marking it final. This is optional behavior that depends on the particular storage driver
265
+ * used on the backend side for this upload. See the storage driver's implementation for more details.
266
+ *
267
+ * @generated from protobuf field: bytes checksum = 3
268
+ */
269
+ checksum: Uint8Array;
228
270
  }
229
271
  /**
230
272
  * @generated from protobuf message MiLaboratories.Controller.Shared.UploadAPI.Finalize.Response
231
273
  */
232
274
  export interface UploadAPI_Finalize_Response {
233
275
  }
276
+ /**
277
+ * @generated from protobuf message MiLaboratories.Controller.Shared.UploadAPI.Reset
278
+ */
279
+ export interface UploadAPI_Reset {
280
+ }
281
+ /**
282
+ * @generated from protobuf message MiLaboratories.Controller.Shared.UploadAPI.Reset.Request
283
+ */
284
+ export interface UploadAPI_Reset_Request {
285
+ /**
286
+ * @generated from protobuf field: uint64 resource_id = 1
287
+ */
288
+ resourceId: bigint;
289
+ /**
290
+ * Signature proving the caller is authorized to access this resource.
291
+ *
292
+ * @generated from protobuf field: optional bytes resource_signature = 2
293
+ */
294
+ resourceSignature?: Uint8Array;
295
+ }
296
+ /**
297
+ * @generated from protobuf message MiLaboratories.Controller.Shared.UploadAPI.Reset.Response
298
+ */
299
+ export interface UploadAPI_Reset_Response {
300
+ }
234
301
  /**
235
302
  * @generated from protobuf enum MiLaboratories.Controller.Shared.UploadAPI.ChecksumAlgorithm
236
303
  */
@@ -324,7 +391,8 @@ export const UploadAPI_Init = new UploadAPI_Init$Type();
324
391
  class UploadAPI_Init_Request$Type extends MessageType<UploadAPI_Init_Request> {
325
392
  constructor() {
326
393
  super("MiLaboratories.Controller.Shared.UploadAPI.Init.Request", [
327
- { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
394
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
395
+ { no: 2, name: "resource_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }
328
396
  ]);
329
397
  }
330
398
  create(value?: PartialMessage<UploadAPI_Init_Request>): UploadAPI_Init_Request {
@@ -342,6 +410,9 @@ class UploadAPI_Init_Request$Type extends MessageType<UploadAPI_Init_Request> {
342
410
  case /* uint64 resource_id */ 1:
343
411
  message.resourceId = reader.uint64().toBigInt();
344
412
  break;
413
+ case /* optional bytes resource_signature */ 2:
414
+ message.resourceSignature = reader.bytes();
415
+ break;
345
416
  default:
346
417
  let u = options.readUnknownField;
347
418
  if (u === "throw")
@@ -357,6 +428,9 @@ class UploadAPI_Init_Request$Type extends MessageType<UploadAPI_Init_Request> {
357
428
  /* uint64 resource_id = 1; */
358
429
  if (message.resourceId !== 0n)
359
430
  writer.tag(1, WireType.Varint).uint64(message.resourceId);
431
+ /* optional bytes resource_signature = 2; */
432
+ if (message.resourceSignature !== undefined)
433
+ writer.tag(2, WireType.LengthDelimited).bytes(message.resourceSignature);
360
434
  let u = options.writeUnknownFields;
361
435
  if (u !== false)
362
436
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -497,6 +571,7 @@ class UploadAPI_UpdateProgress_Request$Type extends MessageType<UploadAPI_Update
497
571
  constructor() {
498
572
  super("MiLaboratories.Controller.Shared.UploadAPI.UpdateProgress.Request", [
499
573
  { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
574
+ { no: 3, name: "resource_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
500
575
  { no: 2, name: "bytes_processed", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
501
576
  ]);
502
577
  }
@@ -516,6 +591,9 @@ class UploadAPI_UpdateProgress_Request$Type extends MessageType<UploadAPI_Update
516
591
  case /* uint64 resource_id */ 1:
517
592
  message.resourceId = reader.uint64().toBigInt();
518
593
  break;
594
+ case /* optional bytes resource_signature */ 3:
595
+ message.resourceSignature = reader.bytes();
596
+ break;
519
597
  case /* int64 bytes_processed */ 2:
520
598
  message.bytesProcessed = reader.int64().toBigInt();
521
599
  break;
@@ -537,6 +615,9 @@ class UploadAPI_UpdateProgress_Request$Type extends MessageType<UploadAPI_Update
537
615
  /* int64 bytes_processed = 2; */
538
616
  if (message.bytesProcessed !== 0n)
539
617
  writer.tag(2, WireType.Varint).int64(message.bytesProcessed);
618
+ /* optional bytes resource_signature = 3; */
619
+ if (message.resourceSignature !== undefined)
620
+ writer.tag(3, WireType.LengthDelimited).bytes(message.resourceSignature);
540
621
  let u = options.writeUnknownFields;
541
622
  if (u !== false)
542
623
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -628,6 +709,7 @@ class UploadAPI_GetPartURL_Request$Type extends MessageType<UploadAPI_GetPartURL
628
709
  constructor() {
629
710
  super("MiLaboratories.Controller.Shared.UploadAPI.GetPartURL.Request", [
630
711
  { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
712
+ { no: 6, name: "resource_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
631
713
  { no: 2, name: "part_number", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
632
714
  { no: 3, name: "uploaded_part_size", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
633
715
  { no: 4, name: "is_internal_use", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
@@ -653,6 +735,9 @@ class UploadAPI_GetPartURL_Request$Type extends MessageType<UploadAPI_GetPartURL
653
735
  case /* uint64 resource_id */ 1:
654
736
  message.resourceId = reader.uint64().toBigInt();
655
737
  break;
738
+ case /* optional bytes resource_signature */ 6:
739
+ message.resourceSignature = reader.bytes();
740
+ break;
656
741
  case /* uint64 part_number */ 2:
657
742
  message.partNumber = reader.uint64().toBigInt();
658
743
  break;
@@ -692,6 +777,9 @@ class UploadAPI_GetPartURL_Request$Type extends MessageType<UploadAPI_GetPartURL
692
777
  /* string part_checksum = 5; */
693
778
  if (message.partChecksum !== "")
694
779
  writer.tag(5, WireType.LengthDelimited).string(message.partChecksum);
780
+ /* optional bytes resource_signature = 6; */
781
+ if (message.resourceSignature !== undefined)
782
+ writer.tag(6, WireType.LengthDelimited).bytes(message.resourceSignature);
695
783
  let u = options.writeUnknownFields;
696
784
  if (u !== false)
697
785
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -706,8 +794,8 @@ export const UploadAPI_GetPartURL_Request = new UploadAPI_GetPartURL_Request$Typ
706
794
  class UploadAPI_GetPartURL_HTTPHeader$Type extends MessageType<UploadAPI_GetPartURL_HTTPHeader> {
707
795
  constructor() {
708
796
  super("MiLaboratories.Controller.Shared.UploadAPI.GetPartURL.HTTPHeader", [
709
- { no: 1, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
710
- { no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/ }
797
+ { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
798
+ { no: 2, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
711
799
  ]);
712
800
  }
713
801
  create(value?: PartialMessage<UploadAPI_GetPartURL_HTTPHeader>): UploadAPI_GetPartURL_HTTPHeader {
@@ -723,10 +811,10 @@ class UploadAPI_GetPartURL_HTTPHeader$Type extends MessageType<UploadAPI_GetPart
723
811
  while (reader.pos < end) {
724
812
  let [fieldNo, wireType] = reader.tag();
725
813
  switch (fieldNo) {
726
- case /* string Name */ 1:
814
+ case /* string name */ 1:
727
815
  message.name = reader.string();
728
816
  break;
729
- case /* string Value */ 2:
817
+ case /* string value */ 2:
730
818
  message.value = reader.string();
731
819
  break;
732
820
  default:
@@ -741,10 +829,10 @@ class UploadAPI_GetPartURL_HTTPHeader$Type extends MessageType<UploadAPI_GetPart
741
829
  return message;
742
830
  }
743
831
  internalBinaryWrite(message: UploadAPI_GetPartURL_HTTPHeader, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
744
- /* string Name = 1; */
832
+ /* string name = 1; */
745
833
  if (message.name !== "")
746
834
  writer.tag(1, WireType.LengthDelimited).string(message.name);
747
- /* string Value = 2; */
835
+ /* string value = 2; */
748
836
  if (message.value !== "")
749
837
  writer.tag(2, WireType.LengthDelimited).string(message.value);
750
838
  let u = options.writeUnknownFields;
@@ -878,12 +966,17 @@ export const UploadAPI_Finalize = new UploadAPI_Finalize$Type();
878
966
  class UploadAPI_Finalize_Request$Type extends MessageType<UploadAPI_Finalize_Request> {
879
967
  constructor() {
880
968
  super("MiLaboratories.Controller.Shared.UploadAPI.Finalize.Request", [
881
- { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
969
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
970
+ { no: 4, name: "resource_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
971
+ { no: 2, name: "checksum_algorithm", kind: "enum", T: () => ["MiLaboratories.Controller.Shared.UploadAPI.ChecksumAlgorithm", UploadAPI_ChecksumAlgorithm, "CHECKSUM_ALGORITHM_"] },
972
+ { no: 3, name: "checksum", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
882
973
  ]);
883
974
  }
884
975
  create(value?: PartialMessage<UploadAPI_Finalize_Request>): UploadAPI_Finalize_Request {
885
976
  const message = globalThis.Object.create((this.messagePrototype!));
886
977
  message.resourceId = 0n;
978
+ message.checksumAlgorithm = 0;
979
+ message.checksum = new Uint8Array(0);
887
980
  if (value !== undefined)
888
981
  reflectionMergePartial<UploadAPI_Finalize_Request>(this, message, value);
889
982
  return message;
@@ -896,6 +989,15 @@ class UploadAPI_Finalize_Request$Type extends MessageType<UploadAPI_Finalize_Req
896
989
  case /* uint64 resource_id */ 1:
897
990
  message.resourceId = reader.uint64().toBigInt();
898
991
  break;
992
+ case /* optional bytes resource_signature */ 4:
993
+ message.resourceSignature = reader.bytes();
994
+ break;
995
+ case /* MiLaboratories.Controller.Shared.UploadAPI.ChecksumAlgorithm checksum_algorithm */ 2:
996
+ message.checksumAlgorithm = reader.int32();
997
+ break;
998
+ case /* bytes checksum */ 3:
999
+ message.checksum = reader.bytes();
1000
+ break;
899
1001
  default:
900
1002
  let u = options.readUnknownField;
901
1003
  if (u === "throw")
@@ -911,6 +1013,15 @@ class UploadAPI_Finalize_Request$Type extends MessageType<UploadAPI_Finalize_Req
911
1013
  /* uint64 resource_id = 1; */
912
1014
  if (message.resourceId !== 0n)
913
1015
  writer.tag(1, WireType.Varint).uint64(message.resourceId);
1016
+ /* MiLaboratories.Controller.Shared.UploadAPI.ChecksumAlgorithm checksum_algorithm = 2; */
1017
+ if (message.checksumAlgorithm !== 0)
1018
+ writer.tag(2, WireType.Varint).int32(message.checksumAlgorithm);
1019
+ /* bytes checksum = 3; */
1020
+ if (message.checksum.length)
1021
+ writer.tag(3, WireType.LengthDelimited).bytes(message.checksum);
1022
+ /* optional bytes resource_signature = 4; */
1023
+ if (message.resourceSignature !== undefined)
1024
+ writer.tag(4, WireType.LengthDelimited).bytes(message.resourceSignature);
914
1025
  let u = options.writeUnknownFields;
915
1026
  if (u !== false)
916
1027
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -959,6 +1070,136 @@ class UploadAPI_Finalize_Response$Type extends MessageType<UploadAPI_Finalize_Re
959
1070
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.UploadAPI.Finalize.Response
960
1071
  */
961
1072
  export const UploadAPI_Finalize_Response = new UploadAPI_Finalize_Response$Type();
1073
+ // @generated message type with reflection information, may provide speed optimized methods
1074
+ class UploadAPI_Reset$Type extends MessageType<UploadAPI_Reset> {
1075
+ constructor() {
1076
+ super("MiLaboratories.Controller.Shared.UploadAPI.Reset", []);
1077
+ }
1078
+ create(value?: PartialMessage<UploadAPI_Reset>): UploadAPI_Reset {
1079
+ const message = globalThis.Object.create((this.messagePrototype!));
1080
+ if (value !== undefined)
1081
+ reflectionMergePartial<UploadAPI_Reset>(this, message, value);
1082
+ return message;
1083
+ }
1084
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadAPI_Reset): UploadAPI_Reset {
1085
+ let message = target ?? this.create(), end = reader.pos + length;
1086
+ while (reader.pos < end) {
1087
+ let [fieldNo, wireType] = reader.tag();
1088
+ switch (fieldNo) {
1089
+ default:
1090
+ let u = options.readUnknownField;
1091
+ if (u === "throw")
1092
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1093
+ let d = reader.skip(wireType);
1094
+ if (u !== false)
1095
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1096
+ }
1097
+ }
1098
+ return message;
1099
+ }
1100
+ internalBinaryWrite(message: UploadAPI_Reset, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1101
+ let u = options.writeUnknownFields;
1102
+ if (u !== false)
1103
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1104
+ return writer;
1105
+ }
1106
+ }
1107
+ /**
1108
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.UploadAPI.Reset
1109
+ */
1110
+ export const UploadAPI_Reset = new UploadAPI_Reset$Type();
1111
+ // @generated message type with reflection information, may provide speed optimized methods
1112
+ class UploadAPI_Reset_Request$Type extends MessageType<UploadAPI_Reset_Request> {
1113
+ constructor() {
1114
+ super("MiLaboratories.Controller.Shared.UploadAPI.Reset.Request", [
1115
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
1116
+ { no: 2, name: "resource_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }
1117
+ ]);
1118
+ }
1119
+ create(value?: PartialMessage<UploadAPI_Reset_Request>): UploadAPI_Reset_Request {
1120
+ const message = globalThis.Object.create((this.messagePrototype!));
1121
+ message.resourceId = 0n;
1122
+ if (value !== undefined)
1123
+ reflectionMergePartial<UploadAPI_Reset_Request>(this, message, value);
1124
+ return message;
1125
+ }
1126
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadAPI_Reset_Request): UploadAPI_Reset_Request {
1127
+ let message = target ?? this.create(), end = reader.pos + length;
1128
+ while (reader.pos < end) {
1129
+ let [fieldNo, wireType] = reader.tag();
1130
+ switch (fieldNo) {
1131
+ case /* uint64 resource_id */ 1:
1132
+ message.resourceId = reader.uint64().toBigInt();
1133
+ break;
1134
+ case /* optional bytes resource_signature */ 2:
1135
+ message.resourceSignature = reader.bytes();
1136
+ break;
1137
+ default:
1138
+ let u = options.readUnknownField;
1139
+ if (u === "throw")
1140
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1141
+ let d = reader.skip(wireType);
1142
+ if (u !== false)
1143
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1144
+ }
1145
+ }
1146
+ return message;
1147
+ }
1148
+ internalBinaryWrite(message: UploadAPI_Reset_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1149
+ /* uint64 resource_id = 1; */
1150
+ if (message.resourceId !== 0n)
1151
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
1152
+ /* optional bytes resource_signature = 2; */
1153
+ if (message.resourceSignature !== undefined)
1154
+ writer.tag(2, WireType.LengthDelimited).bytes(message.resourceSignature);
1155
+ let u = options.writeUnknownFields;
1156
+ if (u !== false)
1157
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1158
+ return writer;
1159
+ }
1160
+ }
1161
+ /**
1162
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.UploadAPI.Reset.Request
1163
+ */
1164
+ export const UploadAPI_Reset_Request = new UploadAPI_Reset_Request$Type();
1165
+ // @generated message type with reflection information, may provide speed optimized methods
1166
+ class UploadAPI_Reset_Response$Type extends MessageType<UploadAPI_Reset_Response> {
1167
+ constructor() {
1168
+ super("MiLaboratories.Controller.Shared.UploadAPI.Reset.Response", []);
1169
+ }
1170
+ create(value?: PartialMessage<UploadAPI_Reset_Response>): UploadAPI_Reset_Response {
1171
+ const message = globalThis.Object.create((this.messagePrototype!));
1172
+ if (value !== undefined)
1173
+ reflectionMergePartial<UploadAPI_Reset_Response>(this, message, value);
1174
+ return message;
1175
+ }
1176
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadAPI_Reset_Response): UploadAPI_Reset_Response {
1177
+ let message = target ?? this.create(), end = reader.pos + length;
1178
+ while (reader.pos < end) {
1179
+ let [fieldNo, wireType] = reader.tag();
1180
+ switch (fieldNo) {
1181
+ default:
1182
+ let u = options.readUnknownField;
1183
+ if (u === "throw")
1184
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1185
+ let d = reader.skip(wireType);
1186
+ if (u !== false)
1187
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1188
+ }
1189
+ }
1190
+ return message;
1191
+ }
1192
+ internalBinaryWrite(message: UploadAPI_Reset_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1193
+ let u = options.writeUnknownFields;
1194
+ if (u !== false)
1195
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1196
+ return writer;
1197
+ }
1198
+ }
1199
+ /**
1200
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.UploadAPI.Reset.Response
1201
+ */
1202
+ export const UploadAPI_Reset_Response = new UploadAPI_Reset_Response$Type();
962
1203
  /**
963
1204
  * @generated ServiceType for protobuf service MiLaboratories.Controller.Shared.Upload
964
1205
  */
@@ -966,5 +1207,6 @@ export const Upload = new ServiceType("MiLaboratories.Controller.Shared.Upload",
966
1207
  { name: "Init", options: { "google.api.http": { post: "/v1/upload/init", body: "*" } }, I: UploadAPI_Init_Request, O: UploadAPI_Init_Response },
967
1208
  { name: "GetPartURL", options: { "google.api.http": { post: "/v1/upload/get-part-url", body: "*" } }, I: UploadAPI_GetPartURL_Request, O: UploadAPI_GetPartURL_Response },
968
1209
  { name: "UpdateProgress", options: { "google.api.http": { post: "/v1/upload/update-progress", body: "*" } }, I: UploadAPI_UpdateProgress_Request, O: UploadAPI_UpdateProgress_Response },
969
- { name: "Finalize", options: { "google.api.http": { post: "/v1/upload/finalize", body: "*" } }, I: UploadAPI_Finalize_Request, O: UploadAPI_Finalize_Response }
1210
+ { name: "Finalize", options: { "google.api.http": { post: "/v1/upload/finalize", body: "*" } }, I: UploadAPI_Finalize_Request, O: UploadAPI_Finalize_Response },
1211
+ { name: "Reset", options: { "google.api.http": { post: "/v1/upload/reset", body: "*" } }, I: UploadAPI_Reset_Request, O: UploadAPI_Reset_Response }
970
1212
  ]);
@@ -1260,8 +1260,6 @@ export enum FieldOptions_JSType {
1260
1260
  }
1261
1261
  /**
1262
1262
  * If set to RETENTION_SOURCE, the option will be omitted from the binary.
1263
- * Note: as of January 2023, support for this is in progress and does not yet
1264
- * have an effect (b/264593489).
1265
1263
  *
1266
1264
  * @generated from protobuf enum google.protobuf.FieldOptions.OptionRetention
1267
1265
  */
@@ -1282,8 +1280,7 @@ export enum FieldOptions_OptionRetention {
1282
1280
  /**
1283
1281
  * This indicates the types of entities that the field may apply to when used
1284
1282
  * as an option. If it is unset, then the field may be freely used as an
1285
- * option on any kind of entity. Note: as of January 2023, support for this is
1286
- * in progress and does not yet have an effect (b/264593489).
1283
+ * option on any kind of entity.
1287
1284
  *
1288
1285
  * @generated from protobuf enum google.protobuf.FieldOptions.OptionTargetType
1289
1286
  */
@@ -2070,7 +2067,7 @@ export enum Edition {
2070
2067
  EDITION_2024 = 1001,
2071
2068
  /**
2072
2069
  * Placeholder editions for testing feature resolution. These should not be
2073
- * used or relyed on outside of tests.
2070
+ * used or relied on outside of tests.
2074
2071
  *
2075
2072
  * @generated from protobuf enum value: EDITION_1_TEST_ONLY = 1;
2076
2073
  */
@@ -31,9 +31,14 @@ export interface components {
31
31
  GetDownloadURL_Request: {
32
32
  resourceId: string;
33
33
  /**
34
- * @description Pass `true` here if the blob will be downloaded from internal network,
35
- * e.g. controllers could use this if they are trying to download something from internal network.
36
- * For backward compatibility, by default pl treats all requests as from external network.
34
+ * Format: bytes
35
+ * @description Signature proving the caller is authorized to access this resource.
36
+ */
37
+ resourceSignature: string;
38
+ /**
39
+ * @description Pass `true` here if the blob will be downloaded from the internal network,
40
+ * e.g. controllers could use this if they are trying to download something from the internal network.
41
+ * For backward compatibility, by default pl treats all requests as from the external network.
37
42
  */
38
43
  isInternalUse: boolean;
39
44
  };