@milaboratories/pl-drivers 1.2.16

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 (117) hide show
  1. package/README.md +18 -0
  2. package/dist/clients/download.d.ts +30 -0
  3. package/dist/clients/download.d.ts.map +1 -0
  4. package/dist/clients/helpers.d.ts +14 -0
  5. package/dist/clients/helpers.d.ts.map +1 -0
  6. package/dist/clients/logs.d.ts +26 -0
  7. package/dist/clients/logs.d.ts.map +1 -0
  8. package/dist/clients/ls_api.d.ts +13 -0
  9. package/dist/clients/ls_api.d.ts.map +1 -0
  10. package/dist/clients/progress.d.ts +25 -0
  11. package/dist/clients/progress.d.ts.map +1 -0
  12. package/dist/clients/upload.d.ts +38 -0
  13. package/dist/clients/upload.d.ts.map +1 -0
  14. package/dist/drivers/download_and_logs_blob.d.ts +106 -0
  15. package/dist/drivers/download_and_logs_blob.d.ts.map +1 -0
  16. package/dist/drivers/download_url.d.ts +70 -0
  17. package/dist/drivers/download_url.d.ts.map +1 -0
  18. package/dist/drivers/helpers/files_cache.d.ts +28 -0
  19. package/dist/drivers/helpers/files_cache.d.ts.map +1 -0
  20. package/dist/drivers/helpers/helpers.d.ts +34 -0
  21. package/dist/drivers/helpers/helpers.d.ts.map +1 -0
  22. package/dist/drivers/helpers/ls_list_entry.d.ts +49 -0
  23. package/dist/drivers/helpers/ls_list_entry.d.ts.map +1 -0
  24. package/dist/drivers/helpers/ls_storage_entry.d.ts +25 -0
  25. package/dist/drivers/helpers/ls_storage_entry.d.ts.map +1 -0
  26. package/dist/drivers/helpers/polling_ops.d.ts +8 -0
  27. package/dist/drivers/helpers/polling_ops.d.ts.map +1 -0
  28. package/dist/drivers/helpers/test_helpers.d.ts +2 -0
  29. package/dist/drivers/helpers/test_helpers.d.ts.map +1 -0
  30. package/dist/drivers/logs.d.ts +29 -0
  31. package/dist/drivers/logs.d.ts.map +1 -0
  32. package/dist/drivers/logs_stream.d.ts +50 -0
  33. package/dist/drivers/logs_stream.d.ts.map +1 -0
  34. package/dist/drivers/ls.d.ts +30 -0
  35. package/dist/drivers/ls.d.ts.map +1 -0
  36. package/dist/drivers/upload.d.ts +87 -0
  37. package/dist/drivers/upload.d.ts.map +1 -0
  38. package/dist/helpers/download.d.ts +15 -0
  39. package/dist/helpers/download.d.ts.map +1 -0
  40. package/dist/index.cjs +2 -0
  41. package/dist/index.cjs.map +1 -0
  42. package/dist/index.d.ts +15 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +4627 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +36 -0
  47. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -0
  48. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +103 -0
  49. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -0
  50. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +42 -0
  51. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -0
  52. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +165 -0
  53. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -0
  54. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +44 -0
  55. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -0
  56. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +171 -0
  57. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -0
  58. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +122 -0
  59. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -0
  60. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +315 -0
  61. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -0
  62. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts +98 -0
  63. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts.map +1 -0
  64. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts +337 -0
  65. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts.map +1 -0
  66. package/dist/proto/google/api/http.d.ts +451 -0
  67. package/dist/proto/google/api/http.d.ts.map +1 -0
  68. package/dist/proto/google/protobuf/descriptor.d.ts +1646 -0
  69. package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -0
  70. package/dist/proto/google/protobuf/duration.d.ts +106 -0
  71. package/dist/proto/google/protobuf/duration.d.ts.map +1 -0
  72. package/dist/proto/google/protobuf/timestamp.d.ts +151 -0
  73. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -0
  74. package/package.json +47 -0
  75. package/src/clients/download.test.ts +45 -0
  76. package/src/clients/download.ts +106 -0
  77. package/src/clients/helpers.ts +84 -0
  78. package/src/clients/logs.ts +68 -0
  79. package/src/clients/ls_api.ts +34 -0
  80. package/src/clients/progress.ts +86 -0
  81. package/src/clients/upload.test.ts +30 -0
  82. package/src/clients/upload.ts +199 -0
  83. package/src/drivers/download_and_logs_blob.ts +801 -0
  84. package/src/drivers/download_blob.test.ts +223 -0
  85. package/src/drivers/download_url.test.ts +90 -0
  86. package/src/drivers/download_url.ts +314 -0
  87. package/src/drivers/helpers/files_cache.test.ts +79 -0
  88. package/src/drivers/helpers/files_cache.ts +74 -0
  89. package/src/drivers/helpers/helpers.ts +136 -0
  90. package/src/drivers/helpers/ls_list_entry.test.ts +57 -0
  91. package/src/drivers/helpers/ls_list_entry.ts +152 -0
  92. package/src/drivers/helpers/ls_storage_entry.ts +135 -0
  93. package/src/drivers/helpers/polling_ops.ts +7 -0
  94. package/src/drivers/helpers/test_helpers.ts +5 -0
  95. package/src/drivers/logs.test.ts +337 -0
  96. package/src/drivers/logs.ts +214 -0
  97. package/src/drivers/logs_stream.ts +399 -0
  98. package/src/drivers/ls.test.ts +90 -0
  99. package/src/drivers/ls.ts +147 -0
  100. package/src/drivers/upload.test.ts +454 -0
  101. package/src/drivers/upload.ts +499 -0
  102. package/src/helpers/download.ts +43 -0
  103. package/src/index.ts +15 -0
  104. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +60 -0
  105. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +442 -0
  106. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +63 -0
  107. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +503 -0
  108. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +84 -0
  109. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +697 -0
  110. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +212 -0
  111. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +1036 -0
  112. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.ts +170 -0
  113. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.ts +1201 -0
  114. package/src/proto/google/api/http.ts +838 -0
  115. package/src/proto/google/protobuf/descriptor.ts +5173 -0
  116. package/src/proto/google/protobuf/duration.ts +272 -0
  117. package/src/proto/google/protobuf/timestamp.ts +354 -0
@@ -0,0 +1,697 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
2
+ // @generated from protobuf file "github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.proto" (package "MiLaboratories.Controller.Shared", syntax proto3)
3
+ // tslint:disable
4
+ import { ServiceType } from '@protobuf-ts/runtime-rpc';
5
+ import { WireType } from '@protobuf-ts/runtime';
6
+ import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
7
+ import type { IBinaryWriter } from '@protobuf-ts/runtime';
8
+ import { UnknownFieldHandler } from '@protobuf-ts/runtime';
9
+ import type { BinaryReadOptions } from '@protobuf-ts/runtime';
10
+ import type { IBinaryReader } from '@protobuf-ts/runtime';
11
+ import type { PartialMessage } from '@protobuf-ts/runtime';
12
+ import { reflectionMergePartial } from '@protobuf-ts/runtime';
13
+ import { MessageType } from '@protobuf-ts/runtime';
14
+ import { Duration } from '../../../../../../../google/protobuf/duration';
15
+ /**
16
+ * @generated from protobuf message MiLaboratories.Controller.Shared.ProgressAPI
17
+ */
18
+ export interface ProgressAPI {}
19
+ /**
20
+ * @generated from protobuf message MiLaboratories.Controller.Shared.ProgressAPI.Report
21
+ */
22
+ export interface ProgressAPI_Report {
23
+ /**
24
+ * @generated from protobuf field: float progress = 1;
25
+ */
26
+ progress: number;
27
+ /**
28
+ * @generated from protobuf field: uint64 bytes_processed = 2;
29
+ */
30
+ bytesProcessed: bigint;
31
+ /**
32
+ * @generated from protobuf field: uint64 bytes_total = 3;
33
+ */
34
+ bytesTotal: bigint;
35
+ /**
36
+ * @generated from protobuf field: bool done = 4;
37
+ */
38
+ done: boolean;
39
+ /**
40
+ * Name of current progress stage (if any)
41
+ *
42
+ * @generated from protobuf field: string name = 5;
43
+ */
44
+ name: string;
45
+ }
46
+ /**
47
+ * @generated from protobuf message MiLaboratories.Controller.Shared.ProgressAPI.GetStatus
48
+ */
49
+ export interface ProgressAPI_GetStatus {}
50
+ /**
51
+ * @generated from protobuf message MiLaboratories.Controller.Shared.ProgressAPI.GetStatus.Request
52
+ */
53
+ export interface ProgressAPI_GetStatus_Request {
54
+ /**
55
+ * @generated from protobuf field: uint64 resource_id = 1;
56
+ */
57
+ resourceId: bigint;
58
+ }
59
+ /**
60
+ * @generated from protobuf message MiLaboratories.Controller.Shared.ProgressAPI.GetStatus.Response
61
+ */
62
+ export interface ProgressAPI_GetStatus_Response {
63
+ /**
64
+ * @generated from protobuf field: MiLaboratories.Controller.Shared.ProgressAPI.Report report = 1;
65
+ */
66
+ report?: ProgressAPI_Report;
67
+ }
68
+ /**
69
+ * @generated from protobuf message MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus
70
+ */
71
+ export interface ProgressAPI_RealtimeStatus {}
72
+ /**
73
+ * @generated from protobuf message MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus.Request
74
+ */
75
+ export interface ProgressAPI_RealtimeStatus_Request {
76
+ /**
77
+ * @generated from protobuf field: uint64 resource_id = 1;
78
+ */
79
+ resourceId: bigint;
80
+ /**
81
+ * @generated from protobuf field: google.protobuf.Duration update_interval = 2;
82
+ */
83
+ updateInterval?: Duration;
84
+ }
85
+ /**
86
+ * @generated from protobuf message MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus.Response
87
+ */
88
+ export interface ProgressAPI_RealtimeStatus_Response {
89
+ /**
90
+ * @generated from protobuf field: MiLaboratories.Controller.Shared.ProgressAPI.Report report = 1;
91
+ */
92
+ report?: ProgressAPI_Report;
93
+ }
94
+ // @generated message type with reflection information, may provide speed optimized methods
95
+ class ProgressAPI$Type extends MessageType<ProgressAPI> {
96
+ constructor() {
97
+ super('MiLaboratories.Controller.Shared.ProgressAPI', []);
98
+ }
99
+ create(value?: PartialMessage<ProgressAPI>): ProgressAPI {
100
+ const message = globalThis.Object.create(this.messagePrototype!);
101
+ if (value !== undefined)
102
+ reflectionMergePartial<ProgressAPI>(this, message, value);
103
+ return message;
104
+ }
105
+ internalBinaryRead(
106
+ reader: IBinaryReader,
107
+ length: number,
108
+ options: BinaryReadOptions,
109
+ target?: ProgressAPI
110
+ ): ProgressAPI {
111
+ return target ?? this.create();
112
+ }
113
+ internalBinaryWrite(
114
+ message: ProgressAPI,
115
+ writer: IBinaryWriter,
116
+ options: BinaryWriteOptions
117
+ ): IBinaryWriter {
118
+ let u = options.writeUnknownFields;
119
+ if (u !== false)
120
+ (u == true ? UnknownFieldHandler.onWrite : u)(
121
+ this.typeName,
122
+ message,
123
+ writer
124
+ );
125
+ return writer;
126
+ }
127
+ }
128
+ /**
129
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.ProgressAPI
130
+ */
131
+ export const ProgressAPI = new ProgressAPI$Type();
132
+ // @generated message type with reflection information, may provide speed optimized methods
133
+ class ProgressAPI_Report$Type extends MessageType<ProgressAPI_Report> {
134
+ constructor() {
135
+ super('MiLaboratories.Controller.Shared.ProgressAPI.Report', [
136
+ { no: 1, name: 'progress', kind: 'scalar', T: 2 /*ScalarType.FLOAT*/ },
137
+ {
138
+ no: 2,
139
+ name: 'bytes_processed',
140
+ kind: 'scalar',
141
+ T: 4 /*ScalarType.UINT64*/,
142
+ L: 0 /*LongType.BIGINT*/
143
+ },
144
+ {
145
+ no: 3,
146
+ name: 'bytes_total',
147
+ kind: 'scalar',
148
+ T: 4 /*ScalarType.UINT64*/,
149
+ L: 0 /*LongType.BIGINT*/
150
+ },
151
+ { no: 4, name: 'done', kind: 'scalar', T: 8 /*ScalarType.BOOL*/ },
152
+ { no: 5, name: 'name', kind: 'scalar', T: 9 /*ScalarType.STRING*/ }
153
+ ]);
154
+ }
155
+ create(value?: PartialMessage<ProgressAPI_Report>): ProgressAPI_Report {
156
+ const message = globalThis.Object.create(this.messagePrototype!);
157
+ message.progress = 0;
158
+ message.bytesProcessed = 0n;
159
+ message.bytesTotal = 0n;
160
+ message.done = false;
161
+ message.name = '';
162
+ if (value !== undefined)
163
+ reflectionMergePartial<ProgressAPI_Report>(this, message, value);
164
+ return message;
165
+ }
166
+ internalBinaryRead(
167
+ reader: IBinaryReader,
168
+ length: number,
169
+ options: BinaryReadOptions,
170
+ target?: ProgressAPI_Report
171
+ ): ProgressAPI_Report {
172
+ let message = target ?? this.create(),
173
+ end = reader.pos + length;
174
+ while (reader.pos < end) {
175
+ let [fieldNo, wireType] = reader.tag();
176
+ switch (fieldNo) {
177
+ case /* float progress */ 1:
178
+ message.progress = reader.float();
179
+ break;
180
+ case /* uint64 bytes_processed */ 2:
181
+ message.bytesProcessed = reader.uint64().toBigInt();
182
+ break;
183
+ case /* uint64 bytes_total */ 3:
184
+ message.bytesTotal = reader.uint64().toBigInt();
185
+ break;
186
+ case /* bool done */ 4:
187
+ message.done = reader.bool();
188
+ break;
189
+ case /* string name */ 5:
190
+ message.name = reader.string();
191
+ break;
192
+ default:
193
+ let u = options.readUnknownField;
194
+ if (u === 'throw')
195
+ throw new globalThis.Error(
196
+ `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
197
+ );
198
+ let d = reader.skip(wireType);
199
+ if (u !== false)
200
+ (u === true ? UnknownFieldHandler.onRead : u)(
201
+ this.typeName,
202
+ message,
203
+ fieldNo,
204
+ wireType,
205
+ d
206
+ );
207
+ }
208
+ }
209
+ return message;
210
+ }
211
+ internalBinaryWrite(
212
+ message: ProgressAPI_Report,
213
+ writer: IBinaryWriter,
214
+ options: BinaryWriteOptions
215
+ ): IBinaryWriter {
216
+ /* float progress = 1; */
217
+ if (message.progress !== 0)
218
+ writer.tag(1, WireType.Bit32).float(message.progress);
219
+ /* uint64 bytes_processed = 2; */
220
+ if (message.bytesProcessed !== 0n)
221
+ writer.tag(2, WireType.Varint).uint64(message.bytesProcessed);
222
+ /* uint64 bytes_total = 3; */
223
+ if (message.bytesTotal !== 0n)
224
+ writer.tag(3, WireType.Varint).uint64(message.bytesTotal);
225
+ /* bool done = 4; */
226
+ if (message.done !== false)
227
+ writer.tag(4, WireType.Varint).bool(message.done);
228
+ /* string name = 5; */
229
+ if (message.name !== '')
230
+ writer.tag(5, WireType.LengthDelimited).string(message.name);
231
+ let u = options.writeUnknownFields;
232
+ if (u !== false)
233
+ (u == true ? UnknownFieldHandler.onWrite : u)(
234
+ this.typeName,
235
+ message,
236
+ writer
237
+ );
238
+ return writer;
239
+ }
240
+ }
241
+ /**
242
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.ProgressAPI.Report
243
+ */
244
+ export const ProgressAPI_Report = new ProgressAPI_Report$Type();
245
+ // @generated message type with reflection information, may provide speed optimized methods
246
+ class ProgressAPI_GetStatus$Type extends MessageType<ProgressAPI_GetStatus> {
247
+ constructor() {
248
+ super('MiLaboratories.Controller.Shared.ProgressAPI.GetStatus', []);
249
+ }
250
+ create(value?: PartialMessage<ProgressAPI_GetStatus>): ProgressAPI_GetStatus {
251
+ const message = globalThis.Object.create(this.messagePrototype!);
252
+ if (value !== undefined)
253
+ reflectionMergePartial<ProgressAPI_GetStatus>(this, message, value);
254
+ return message;
255
+ }
256
+ internalBinaryRead(
257
+ reader: IBinaryReader,
258
+ length: number,
259
+ options: BinaryReadOptions,
260
+ target?: ProgressAPI_GetStatus
261
+ ): ProgressAPI_GetStatus {
262
+ return target ?? this.create();
263
+ }
264
+ internalBinaryWrite(
265
+ message: ProgressAPI_GetStatus,
266
+ writer: IBinaryWriter,
267
+ options: BinaryWriteOptions
268
+ ): IBinaryWriter {
269
+ let u = options.writeUnknownFields;
270
+ if (u !== false)
271
+ (u == true ? UnknownFieldHandler.onWrite : u)(
272
+ this.typeName,
273
+ message,
274
+ writer
275
+ );
276
+ return writer;
277
+ }
278
+ }
279
+ /**
280
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.ProgressAPI.GetStatus
281
+ */
282
+ export const ProgressAPI_GetStatus = new ProgressAPI_GetStatus$Type();
283
+ // @generated message type with reflection information, may provide speed optimized methods
284
+ class ProgressAPI_GetStatus_Request$Type extends MessageType<ProgressAPI_GetStatus_Request> {
285
+ constructor() {
286
+ super('MiLaboratories.Controller.Shared.ProgressAPI.GetStatus.Request', [
287
+ {
288
+ no: 1,
289
+ name: 'resource_id',
290
+ kind: 'scalar',
291
+ T: 4 /*ScalarType.UINT64*/,
292
+ L: 0 /*LongType.BIGINT*/
293
+ }
294
+ ]);
295
+ }
296
+ create(
297
+ value?: PartialMessage<ProgressAPI_GetStatus_Request>
298
+ ): ProgressAPI_GetStatus_Request {
299
+ const message = globalThis.Object.create(this.messagePrototype!);
300
+ message.resourceId = 0n;
301
+ if (value !== undefined)
302
+ reflectionMergePartial<ProgressAPI_GetStatus_Request>(
303
+ this,
304
+ message,
305
+ value
306
+ );
307
+ return message;
308
+ }
309
+ internalBinaryRead(
310
+ reader: IBinaryReader,
311
+ length: number,
312
+ options: BinaryReadOptions,
313
+ target?: ProgressAPI_GetStatus_Request
314
+ ): ProgressAPI_GetStatus_Request {
315
+ let message = target ?? this.create(),
316
+ end = reader.pos + length;
317
+ while (reader.pos < end) {
318
+ let [fieldNo, wireType] = reader.tag();
319
+ switch (fieldNo) {
320
+ case /* uint64 resource_id */ 1:
321
+ message.resourceId = reader.uint64().toBigInt();
322
+ break;
323
+ default:
324
+ let u = options.readUnknownField;
325
+ if (u === 'throw')
326
+ throw new globalThis.Error(
327
+ `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
328
+ );
329
+ let d = reader.skip(wireType);
330
+ if (u !== false)
331
+ (u === true ? UnknownFieldHandler.onRead : u)(
332
+ this.typeName,
333
+ message,
334
+ fieldNo,
335
+ wireType,
336
+ d
337
+ );
338
+ }
339
+ }
340
+ return message;
341
+ }
342
+ internalBinaryWrite(
343
+ message: ProgressAPI_GetStatus_Request,
344
+ writer: IBinaryWriter,
345
+ options: BinaryWriteOptions
346
+ ): IBinaryWriter {
347
+ /* uint64 resource_id = 1; */
348
+ if (message.resourceId !== 0n)
349
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
350
+ let u = options.writeUnknownFields;
351
+ if (u !== false)
352
+ (u == true ? UnknownFieldHandler.onWrite : u)(
353
+ this.typeName,
354
+ message,
355
+ writer
356
+ );
357
+ return writer;
358
+ }
359
+ }
360
+ /**
361
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.ProgressAPI.GetStatus.Request
362
+ */
363
+ export const ProgressAPI_GetStatus_Request =
364
+ new ProgressAPI_GetStatus_Request$Type();
365
+ // @generated message type with reflection information, may provide speed optimized methods
366
+ class ProgressAPI_GetStatus_Response$Type extends MessageType<ProgressAPI_GetStatus_Response> {
367
+ constructor() {
368
+ super('MiLaboratories.Controller.Shared.ProgressAPI.GetStatus.Response', [
369
+ { no: 1, name: 'report', kind: 'message', T: () => ProgressAPI_Report }
370
+ ]);
371
+ }
372
+ create(
373
+ value?: PartialMessage<ProgressAPI_GetStatus_Response>
374
+ ): ProgressAPI_GetStatus_Response {
375
+ const message = globalThis.Object.create(this.messagePrototype!);
376
+ if (value !== undefined)
377
+ reflectionMergePartial<ProgressAPI_GetStatus_Response>(
378
+ this,
379
+ message,
380
+ value
381
+ );
382
+ return message;
383
+ }
384
+ internalBinaryRead(
385
+ reader: IBinaryReader,
386
+ length: number,
387
+ options: BinaryReadOptions,
388
+ target?: ProgressAPI_GetStatus_Response
389
+ ): ProgressAPI_GetStatus_Response {
390
+ let message = target ?? this.create(),
391
+ end = reader.pos + length;
392
+ while (reader.pos < end) {
393
+ let [fieldNo, wireType] = reader.tag();
394
+ switch (fieldNo) {
395
+ case /* MiLaboratories.Controller.Shared.ProgressAPI.Report report */ 1:
396
+ message.report = ProgressAPI_Report.internalBinaryRead(
397
+ reader,
398
+ reader.uint32(),
399
+ options,
400
+ message.report
401
+ );
402
+ break;
403
+ default:
404
+ let u = options.readUnknownField;
405
+ if (u === 'throw')
406
+ throw new globalThis.Error(
407
+ `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
408
+ );
409
+ let d = reader.skip(wireType);
410
+ if (u !== false)
411
+ (u === true ? UnknownFieldHandler.onRead : u)(
412
+ this.typeName,
413
+ message,
414
+ fieldNo,
415
+ wireType,
416
+ d
417
+ );
418
+ }
419
+ }
420
+ return message;
421
+ }
422
+ internalBinaryWrite(
423
+ message: ProgressAPI_GetStatus_Response,
424
+ writer: IBinaryWriter,
425
+ options: BinaryWriteOptions
426
+ ): IBinaryWriter {
427
+ /* MiLaboratories.Controller.Shared.ProgressAPI.Report report = 1; */
428
+ if (message.report)
429
+ ProgressAPI_Report.internalBinaryWrite(
430
+ message.report,
431
+ writer.tag(1, WireType.LengthDelimited).fork(),
432
+ options
433
+ ).join();
434
+ let u = options.writeUnknownFields;
435
+ if (u !== false)
436
+ (u == true ? UnknownFieldHandler.onWrite : u)(
437
+ this.typeName,
438
+ message,
439
+ writer
440
+ );
441
+ return writer;
442
+ }
443
+ }
444
+ /**
445
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.ProgressAPI.GetStatus.Response
446
+ */
447
+ export const ProgressAPI_GetStatus_Response =
448
+ new ProgressAPI_GetStatus_Response$Type();
449
+ // @generated message type with reflection information, may provide speed optimized methods
450
+ class ProgressAPI_RealtimeStatus$Type extends MessageType<ProgressAPI_RealtimeStatus> {
451
+ constructor() {
452
+ super('MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus', []);
453
+ }
454
+ create(
455
+ value?: PartialMessage<ProgressAPI_RealtimeStatus>
456
+ ): ProgressAPI_RealtimeStatus {
457
+ const message = globalThis.Object.create(this.messagePrototype!);
458
+ if (value !== undefined)
459
+ reflectionMergePartial<ProgressAPI_RealtimeStatus>(this, message, value);
460
+ return message;
461
+ }
462
+ internalBinaryRead(
463
+ reader: IBinaryReader,
464
+ length: number,
465
+ options: BinaryReadOptions,
466
+ target?: ProgressAPI_RealtimeStatus
467
+ ): ProgressAPI_RealtimeStatus {
468
+ return target ?? this.create();
469
+ }
470
+ internalBinaryWrite(
471
+ message: ProgressAPI_RealtimeStatus,
472
+ writer: IBinaryWriter,
473
+ options: BinaryWriteOptions
474
+ ): IBinaryWriter {
475
+ let u = options.writeUnknownFields;
476
+ if (u !== false)
477
+ (u == true ? UnknownFieldHandler.onWrite : u)(
478
+ this.typeName,
479
+ message,
480
+ writer
481
+ );
482
+ return writer;
483
+ }
484
+ }
485
+ /**
486
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus
487
+ */
488
+ export const ProgressAPI_RealtimeStatus = new ProgressAPI_RealtimeStatus$Type();
489
+ // @generated message type with reflection information, may provide speed optimized methods
490
+ class ProgressAPI_RealtimeStatus_Request$Type extends MessageType<ProgressAPI_RealtimeStatus_Request> {
491
+ constructor() {
492
+ super(
493
+ 'MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus.Request',
494
+ [
495
+ {
496
+ no: 1,
497
+ name: 'resource_id',
498
+ kind: 'scalar',
499
+ T: 4 /*ScalarType.UINT64*/,
500
+ L: 0 /*LongType.BIGINT*/
501
+ },
502
+ { no: 2, name: 'update_interval', kind: 'message', T: () => Duration }
503
+ ]
504
+ );
505
+ }
506
+ create(
507
+ value?: PartialMessage<ProgressAPI_RealtimeStatus_Request>
508
+ ): ProgressAPI_RealtimeStatus_Request {
509
+ const message = globalThis.Object.create(this.messagePrototype!);
510
+ message.resourceId = 0n;
511
+ if (value !== undefined)
512
+ reflectionMergePartial<ProgressAPI_RealtimeStatus_Request>(
513
+ this,
514
+ message,
515
+ value
516
+ );
517
+ return message;
518
+ }
519
+ internalBinaryRead(
520
+ reader: IBinaryReader,
521
+ length: number,
522
+ options: BinaryReadOptions,
523
+ target?: ProgressAPI_RealtimeStatus_Request
524
+ ): ProgressAPI_RealtimeStatus_Request {
525
+ let message = target ?? this.create(),
526
+ end = reader.pos + length;
527
+ while (reader.pos < end) {
528
+ let [fieldNo, wireType] = reader.tag();
529
+ switch (fieldNo) {
530
+ case /* uint64 resource_id */ 1:
531
+ message.resourceId = reader.uint64().toBigInt();
532
+ break;
533
+ case /* google.protobuf.Duration update_interval */ 2:
534
+ message.updateInterval = Duration.internalBinaryRead(
535
+ reader,
536
+ reader.uint32(),
537
+ options,
538
+ message.updateInterval
539
+ );
540
+ break;
541
+ default:
542
+ let u = options.readUnknownField;
543
+ if (u === 'throw')
544
+ throw new globalThis.Error(
545
+ `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
546
+ );
547
+ let d = reader.skip(wireType);
548
+ if (u !== false)
549
+ (u === true ? UnknownFieldHandler.onRead : u)(
550
+ this.typeName,
551
+ message,
552
+ fieldNo,
553
+ wireType,
554
+ d
555
+ );
556
+ }
557
+ }
558
+ return message;
559
+ }
560
+ internalBinaryWrite(
561
+ message: ProgressAPI_RealtimeStatus_Request,
562
+ writer: IBinaryWriter,
563
+ options: BinaryWriteOptions
564
+ ): IBinaryWriter {
565
+ /* uint64 resource_id = 1; */
566
+ if (message.resourceId !== 0n)
567
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
568
+ /* google.protobuf.Duration update_interval = 2; */
569
+ if (message.updateInterval)
570
+ Duration.internalBinaryWrite(
571
+ message.updateInterval,
572
+ writer.tag(2, WireType.LengthDelimited).fork(),
573
+ options
574
+ ).join();
575
+ let u = options.writeUnknownFields;
576
+ if (u !== false)
577
+ (u == true ? UnknownFieldHandler.onWrite : u)(
578
+ this.typeName,
579
+ message,
580
+ writer
581
+ );
582
+ return writer;
583
+ }
584
+ }
585
+ /**
586
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus.Request
587
+ */
588
+ export const ProgressAPI_RealtimeStatus_Request =
589
+ new ProgressAPI_RealtimeStatus_Request$Type();
590
+ // @generated message type with reflection information, may provide speed optimized methods
591
+ class ProgressAPI_RealtimeStatus_Response$Type extends MessageType<ProgressAPI_RealtimeStatus_Response> {
592
+ constructor() {
593
+ super(
594
+ 'MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus.Response',
595
+ [{ no: 1, name: 'report', kind: 'message', T: () => ProgressAPI_Report }]
596
+ );
597
+ }
598
+ create(
599
+ value?: PartialMessage<ProgressAPI_RealtimeStatus_Response>
600
+ ): ProgressAPI_RealtimeStatus_Response {
601
+ const message = globalThis.Object.create(this.messagePrototype!);
602
+ if (value !== undefined)
603
+ reflectionMergePartial<ProgressAPI_RealtimeStatus_Response>(
604
+ this,
605
+ message,
606
+ value
607
+ );
608
+ return message;
609
+ }
610
+ internalBinaryRead(
611
+ reader: IBinaryReader,
612
+ length: number,
613
+ options: BinaryReadOptions,
614
+ target?: ProgressAPI_RealtimeStatus_Response
615
+ ): ProgressAPI_RealtimeStatus_Response {
616
+ let message = target ?? this.create(),
617
+ end = reader.pos + length;
618
+ while (reader.pos < end) {
619
+ let [fieldNo, wireType] = reader.tag();
620
+ switch (fieldNo) {
621
+ case /* MiLaboratories.Controller.Shared.ProgressAPI.Report report */ 1:
622
+ message.report = ProgressAPI_Report.internalBinaryRead(
623
+ reader,
624
+ reader.uint32(),
625
+ options,
626
+ message.report
627
+ );
628
+ break;
629
+ default:
630
+ let u = options.readUnknownField;
631
+ if (u === 'throw')
632
+ throw new globalThis.Error(
633
+ `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
634
+ );
635
+ let d = reader.skip(wireType);
636
+ if (u !== false)
637
+ (u === true ? UnknownFieldHandler.onRead : u)(
638
+ this.typeName,
639
+ message,
640
+ fieldNo,
641
+ wireType,
642
+ d
643
+ );
644
+ }
645
+ }
646
+ return message;
647
+ }
648
+ internalBinaryWrite(
649
+ message: ProgressAPI_RealtimeStatus_Response,
650
+ writer: IBinaryWriter,
651
+ options: BinaryWriteOptions
652
+ ): IBinaryWriter {
653
+ /* MiLaboratories.Controller.Shared.ProgressAPI.Report report = 1; */
654
+ if (message.report)
655
+ ProgressAPI_Report.internalBinaryWrite(
656
+ message.report,
657
+ writer.tag(1, WireType.LengthDelimited).fork(),
658
+ options
659
+ ).join();
660
+ let u = options.writeUnknownFields;
661
+ if (u !== false)
662
+ (u == true ? UnknownFieldHandler.onWrite : u)(
663
+ this.typeName,
664
+ message,
665
+ writer
666
+ );
667
+ return writer;
668
+ }
669
+ }
670
+ /**
671
+ * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.ProgressAPI.RealtimeStatus.Response
672
+ */
673
+ export const ProgressAPI_RealtimeStatus_Response =
674
+ new ProgressAPI_RealtimeStatus_Response$Type();
675
+ /**
676
+ * @generated ServiceType for protobuf service MiLaboratories.Controller.Shared.Progress
677
+ */
678
+ export const Progress = new ServiceType(
679
+ 'MiLaboratories.Controller.Shared.Progress',
680
+ [
681
+ {
682
+ name: 'GetStatus',
683
+ options: {
684
+ 'google.api.http': { get: '/resources/{resource_id}/get-progress' }
685
+ },
686
+ I: ProgressAPI_GetStatus_Request,
687
+ O: ProgressAPI_GetStatus_Response
688
+ },
689
+ {
690
+ name: 'RealtimeStatus',
691
+ serverStreaming: true,
692
+ options: {},
693
+ I: ProgressAPI_RealtimeStatus_Request,
694
+ O: ProgressAPI_RealtimeStatus_Response
695
+ }
696
+ ]
697
+ );