@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
@@ -14,9 +14,9 @@ export interface paths {
14
14
  get?: never;
15
15
  put?: never;
16
16
  /**
17
- * @description Finalize informs Controller that the upload process is done.
18
- * Returns an error, if the total size of all uploaded chunks is not equal to
19
- * size of the upload given in Init.
17
+ * @description Finalize informs the Controller that the upload process is done.
18
+ * Returns an error if the total size of all uploaded chunks is not equal to
19
+ * the size of the upload given in Init.
20
20
  */
21
21
  post: operations["Upload_Finalize"];
22
22
  delete?: never;
@@ -35,7 +35,7 @@ export interface paths {
35
35
  get?: never;
36
36
  put?: never;
37
37
  /**
38
- * @description GetPartURL provides URL for uploading chunk of the data.
38
+ * @description GetPartURL provides a URL for uploading a chunk of the data.
39
39
  * Clients are expected to put their data directly to the given location.
40
40
  */
41
41
  post: operations["Upload_GetPartURL"];
@@ -54,7 +54,7 @@ export interface paths {
54
54
  };
55
55
  get?: never;
56
56
  put?: never;
57
- /** @description Init upload, making controller to do all required preparation steps. */
57
+ /** @description Initialize the upload, making the controller do all required preparation steps. */
58
58
  post: operations["Upload_Init"];
59
59
  delete?: never;
60
60
  options?: never;
@@ -62,6 +62,28 @@ export interface paths {
62
62
  patch?: never;
63
63
  trace?: never;
64
64
  };
65
+ "/v1/upload/reset": {
66
+ parameters: {
67
+ query?: never;
68
+ header?: never;
69
+ path?: never;
70
+ cookie?: never;
71
+ };
72
+ get?: never;
73
+ put?: never;
74
+ /**
75
+ * @description Reset the current upload progress (remove uploaded parts and so on) to start over.
76
+ * This is useful when a checksum mismatch is detected by the client during upload
77
+ * and the data requires a full re-upload.
78
+ * The server never resets the upload on its own; it is always the client's initiative.
79
+ */
80
+ post: operations["Upload_Reset"];
81
+ delete?: never;
82
+ options?: never;
83
+ head?: never;
84
+ patch?: never;
85
+ trace?: never;
86
+ };
65
87
  "/v1/upload/update-progress": {
66
88
  parameters: {
67
89
  query?: never;
@@ -71,7 +93,7 @@ export interface paths {
71
93
  };
72
94
  get?: never;
73
95
  put?: never;
74
- /** @description UpdateProgress of the upload, so other clients can see how it is going. */
96
+ /** @description Update the progress of the upload, so other clients can see how it is going. */
75
97
  post: operations["Upload_UpdateProgress"];
76
98
  delete?: never;
77
99
  options?: never;
@@ -85,6 +107,26 @@ export interface components {
85
107
  schemas: {
86
108
  Finalize_Request: {
87
109
  resourceId: string;
110
+ /**
111
+ * Format: bytes
112
+ * @description Signature proving the caller is authorized to access this resource.
113
+ */
114
+ resourceSignature: string;
115
+ /**
116
+ * Format: enum
117
+ * @description The client can send the final checksum of the whole file to verify the upload.
118
+ * The algorithm used to calculate this final checksum must match the algorithm from
119
+ * Init.Response. The server may reject the request on a mismatch
120
+ * (meaning the server does not support the given algorithm).
121
+ */
122
+ checksumAlgorithm: number;
123
+ /**
124
+ * Format: bytes
125
+ * @description Checksum of the whole file for validation. When provided, the server may verify the upload before
126
+ * marking it final. This is optional behavior that depends on the particular storage driver
127
+ * used on the backend side for this upload. See the storage driver's implementation for more details.
128
+ */
129
+ checksum: string;
88
130
  };
89
131
  Finalize_Response: Record<string, never>;
90
132
  GetPartURL_HTTPHeader: {
@@ -92,31 +134,36 @@ export interface components {
92
134
  value: string;
93
135
  };
94
136
  GetPartURL_Request: {
95
- /** @description Id of upload resource */
137
+ /** @description ID of the upload resource */
96
138
  resourceId: string;
97
139
  /**
98
- * @description Part to be uploaded. It is responsibility of the Client to watch after already uploaded parts:
99
- * - client can request an URL for the same part twice (request -> request) without errors;
100
- * - client can request an URL for alrady uploaded part (request -> upload -> request) without errors.
140
+ * Format: bytes
141
+ * @description Signature proving the caller is authorized to access this resource.
142
+ */
143
+ resourceSignature: string;
144
+ /**
145
+ * @description Part to be uploaded. It is the responsibility of the client to keep track of already uploaded parts:
146
+ * - client can request a URL for the same part twice (request -> request) without errors;
147
+ * - client can request a URL for an already uploaded part (request -> upload -> request) without errors.
101
148
  *
102
149
  * Parts enumeration starts from 1.
103
150
  */
104
151
  partNumber: string;
105
152
  /**
106
- * @description Size of the part uploaded by client earlier. Allows controller to count upload progress
107
- * based on client's input.
108
- * Client is free to never sent this value (send zeroes in each request).
153
+ * @description Size of the part uploaded by the client earlier. Allows the controller to count upload progress
154
+ * based on the client's input.
155
+ * The client is free to never send this value (send zeroes in each request).
109
156
  */
110
157
  uploadedPartSize: string;
111
158
  /**
112
- * @description Do we need to presign URL for internal use.
113
- * Controllers could use this if they are trying to download something from internal network.
114
- * For backward compatibility, by default pl backend will presign external urls.
159
+ * @description Whether to presign the URL for internal use.
160
+ * Controllers could use this if they are trying to upload something from the internal network.
161
+ * For backward compatibility, by default the pl backend will presign external URLs.
115
162
  */
116
163
  isInternalUse: boolean;
117
164
  /**
118
- * @description Checksum is not used for now, but it is here for case
119
- * where signing checksum header is required.
165
+ * @description Checksum is not used for now, but it is here for the case
166
+ * where signing the checksum header is required.
120
167
  */
121
168
  partChecksum: string;
122
169
  };
@@ -126,21 +173,21 @@ export interface components {
126
173
  /** @description HTTP method to use for chunk upload, say 'PUT' or 'POST'. */
127
174
  method: string;
128
175
  /**
129
- * @description List of headers with their values, MANDATORY to be sent by the client for the upload.
130
- * The destination service (the one, that will handle upload request for specific part)
131
- * may reject the request if it would not keep the given headers.
176
+ * @description List of headers with their values that MUST be sent by the client for the upload.
177
+ * The destination service (the one that will handle the upload request for a specific part)
178
+ * may reject the request if it does not include the given headers.
132
179
  */
133
180
  headers: components["schemas"]["GetPartURL_HTTPHeader"][];
134
181
  /**
135
182
  * @description The number of the _first_ byte in the chunk.
136
183
  * Absolute position from the start of the file ( file.seek(<chunk_start>, SEEK_START) ).
137
- * The client is expected to send [<chunk_start>; <chunk_end>) range.
184
+ * The client is expected to send the [<chunk_start>; <chunk_end>) range.
138
185
  */
139
186
  chunkStart: string;
140
187
  /**
141
188
  * @description The number of the byte _after_ the last to be sent in the chunk.
142
189
  * Absolute position from the start of the file.
143
- * The client is expected to send [<chunk_start>; <chunk_end>) range.
190
+ * The client is expected to send the [<chunk_start>; <chunk_end>) range.
144
191
  */
145
192
  chunkEnd: string;
146
193
  };
@@ -152,36 +199,53 @@ export interface components {
152
199
  [key: string]: unknown;
153
200
  };
154
201
  Init_Request: {
155
- /** @description Id of upload resource */
202
+ /** @description ID of the upload resource */
156
203
  resourceId: string;
204
+ /**
205
+ * Format: bytes
206
+ * @description Signature proving the caller is authorized to access this resource.
207
+ */
208
+ resourceSignature: string;
157
209
  };
158
210
  Init_Response: {
159
211
  /**
160
212
  * @description Number of parts in this upload.
161
- * For parallel upload support, client can generate any number of part upload URLs
162
- * at the moment and upload them in parallel.
213
+ * For parallel upload support, the client can generate any number of part upload URLs
214
+ * at once and upload them in parallel.
163
215
  * <parts_count> keeps the number of chunks supported by this upload.
164
216
  * The parts count is calculated from the planned size of the upload, controller
165
- * configuration and underlying storage restrictions.
217
+ * configuration, and underlying storage restrictions.
166
218
  */
167
219
  partsCount: string;
168
220
  partSize: string;
169
221
  /**
170
222
  * Format: enum
171
- * @description Checksum algorithm to use for the part upload.
223
+ * @description Checksum algorithm to use for each part upload and final verification.
172
224
  */
173
225
  checksumAlgorithm: number;
174
- /** @description Header name to use for the checksum. */
226
+ /**
227
+ * @description Header name to use for the checksum in each part upload request.
228
+ * A non-empty value combined with checksum_algorithm enables each part upload verification.
229
+ */
175
230
  checksumHeader: string;
176
231
  /**
177
- * @description List of IDs of parts that were already uploaded by client.
178
- * Helps client to recover upload and skip already done parts
232
+ * @description List of IDs of parts that were already uploaded by the client.
233
+ * Helps the client recover the upload and skip already uploaded parts
179
234
  * after being interrupted in the middle of the upload
180
- * (say, because of the restart).
235
+ * (say, because of a restart).
181
236
  * Parts enumeration starts from 1.
182
237
  */
183
238
  uploadedParts: string[];
184
239
  };
240
+ Reset_Request: {
241
+ resourceId: string;
242
+ /**
243
+ * Format: bytes
244
+ * @description Signature proving the caller is authorized to access this resource.
245
+ */
246
+ resourceSignature: string;
247
+ };
248
+ Reset_Response: Record<string, never>;
185
249
  /** @description The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */
186
250
  Status: {
187
251
  /**
@@ -195,18 +259,23 @@ export interface components {
195
259
  details: components["schemas"]["GoogleProtobufAny"][];
196
260
  };
197
261
  UpdateProgress_Request: {
198
- /** @description Id of upload resource */
262
+ /** @description ID of the upload resource */
199
263
  resourceId: string;
200
264
  /**
201
- * @description Amount of bytes, uploaded since the earlier call to UpdateProgress.
202
- * This value is just blindly added to the 'bytes_processed' of progress report,
265
+ * Format: bytes
266
+ * @description Signature proving the caller is authorized to access this resource.
267
+ */
268
+ resourceSignature: string;
269
+ /**
270
+ * @description Number of bytes uploaded since the earlier call to UpdateProgress.
271
+ * This value is just blindly added to the 'bytes_processed' of the progress report,
203
272
  * so other clients can see the upload progress.
204
- * If client uploads the data in several streams (several chunks in parallel), it
273
+ * If the client uploads the data in several streams (several chunks in parallel), it
205
274
  * can safely send progress updates individually for each of the streams, just counting
206
- * bytes uploaded by particular stream.
275
+ * bytes uploaded by a particular stream.
207
276
  *
208
- * Negative value can be used to report about upload retry: when upload was interrupted,
209
- * part of the uploaded data is lost and require re-upload.
277
+ * A negative value can be used to report an upload retry: when the upload was interrupted,
278
+ * part of the uploaded data is lost and requires a re-upload.
210
279
  */
211
280
  bytesProcessed: string;
212
281
  };
@@ -319,6 +388,39 @@ export interface operations {
319
388
  };
320
389
  };
321
390
  };
391
+ Upload_Reset: {
392
+ parameters: {
393
+ query?: never;
394
+ header?: never;
395
+ path?: never;
396
+ cookie?: never;
397
+ };
398
+ requestBody: {
399
+ content: {
400
+ "application/json": components["schemas"]["Reset_Request"];
401
+ };
402
+ };
403
+ responses: {
404
+ /** @description OK */
405
+ 200: {
406
+ headers: {
407
+ [name: string]: unknown;
408
+ };
409
+ content: {
410
+ "application/json": components["schemas"]["Reset_Response"];
411
+ };
412
+ };
413
+ /** @description Default error response */
414
+ default: {
415
+ headers: {
416
+ [name: string]: unknown;
417
+ };
418
+ content: {
419
+ "application/json": components["schemas"]["Status"];
420
+ };
421
+ };
422
+ };
423
+ };
322
424
  Upload_UpdateProgress: {
323
425
  parameters: {
324
426
  query?: never;