@milaboratories/pl-drivers 1.6.4 → 1.6.6

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 (82) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +2026 -2480
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts +48 -0
  6. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +1 -0
  7. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +2 -2
  8. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -1
  9. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +13 -5
  10. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -1
  11. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +2 -2
  12. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -1
  13. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +11 -11
  14. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -1
  15. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +4 -4
  16. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -1
  17. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +10 -10
  18. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -1
  19. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +10 -10
  20. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -1
  21. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +25 -25
  22. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -1
  23. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts +8 -8
  24. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts.map +1 -1
  25. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts +24 -16
  26. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts.map +1 -1
  27. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +277 -0
  28. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +1 -0
  29. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +5344 -0
  30. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -0
  31. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +530 -0
  32. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +1 -0
  33. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +82 -0
  34. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +1 -0
  35. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts +91 -0
  36. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +1 -0
  37. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +251 -0
  38. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +1 -0
  39. package/dist/proto/google/api/http.d.ts +46 -42
  40. package/dist/proto/google/api/http.d.ts.map +1 -1
  41. package/dist/proto/google/protobuf/any.d.ts +172 -0
  42. package/dist/proto/google/protobuf/any.d.ts.map +1 -0
  43. package/dist/proto/google/protobuf/descriptor.d.ts +1003 -170
  44. package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -1
  45. package/dist/proto/google/protobuf/duration.d.ts +2 -3
  46. package/dist/proto/google/protobuf/duration.d.ts.map +1 -1
  47. package/dist/proto/google/protobuf/empty.d.ts +27 -0
  48. package/dist/proto/google/protobuf/empty.d.ts.map +1 -0
  49. package/dist/proto/google/protobuf/struct.d.ts +179 -0
  50. package/dist/proto/google/protobuf/struct.d.ts.map +1 -0
  51. package/dist/proto/google/protobuf/timestamp.d.ts +3 -6
  52. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
  53. package/dist/proto/google/protobuf/wrappers.d.ts +327 -0
  54. package/dist/proto/google/protobuf/wrappers.d.ts.map +1 -0
  55. package/package.json +5 -5
  56. package/src/clients/download.ts +1 -1
  57. package/src/clients/upload.ts +1 -1
  58. package/src/proto/github.com/googleapis/googleapis/google/rpc/status.ts +125 -0
  59. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +25 -40
  60. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +252 -396
  61. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +25 -37
  62. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +341 -453
  63. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +39 -65
  64. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +398 -630
  65. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +126 -194
  66. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +626 -964
  67. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.ts +102 -153
  68. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.ts +741 -1082
  69. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +406 -0
  70. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.ts +14986 -0
  71. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +1474 -0
  72. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +181 -0
  73. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/import.ts +251 -0
  74. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +693 -0
  75. package/src/proto/google/api/http.ts +336 -492
  76. package/src/proto/google/protobuf/any.ts +326 -0
  77. package/src/proto/google/protobuf/descriptor.ts +4383 -4772
  78. package/src/proto/google/protobuf/duration.ts +122 -169
  79. package/src/proto/google/protobuf/empty.ts +94 -0
  80. package/src/proto/google/protobuf/struct.ts +484 -0
  81. package/src/proto/google/protobuf/timestamp.ts +150 -225
  82. package/src/proto/google/protobuf/wrappers.ts +785 -0
@@ -1,95 +1,102 @@
1
- // @generated by protobuf-ts 2.9.4 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
1
+ // @generated by protobuf-ts 2.11.0 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
2
2
  // @generated from protobuf file "github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.proto" (package "MiLaboratories.Controller.Shared", syntax proto3)
3
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';
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 type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
10
+ import { UnknownFieldHandler } 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
14
  /**
15
15
  * @generated from protobuf message MiLaboratories.Controller.Shared.DownloadAPI
16
16
  */
17
- export interface DownloadAPI {}
17
+ export interface DownloadAPI {
18
+ }
18
19
  /**
19
20
  * @generated from protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL
20
21
  */
21
- export interface DownloadAPI_GetDownloadURL {}
22
+ export interface DownloadAPI_GetDownloadURL {
23
+ }
22
24
  /**
23
25
  * @generated from protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Request
24
26
  */
25
27
  export interface DownloadAPI_GetDownloadURL_Request {
26
- /**
27
- * @generated from protobuf field: uint64 resource_id = 1;
28
- */
29
- resourceId: bigint;
28
+ /**
29
+ * @generated from protobuf field: uint64 resource_id = 1
30
+ */
31
+ resourceId: bigint;
32
+ /**
33
+ * Pass `true` here if the blob will be downloaded from internal network,
34
+ * e.g. controllers could use this if they are trying to download something from internal network.
35
+ * For backward compatibility, by default pl treats all requests as from external network.
36
+ *
37
+ * @generated from protobuf field: bool is_internal_use = 2
38
+ */
39
+ isInternalUse: boolean;
30
40
  }
31
41
  /**
32
42
  * @generated from protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader
33
43
  */
34
44
  export interface DownloadAPI_GetDownloadURL_HTTPHeader {
35
- /**
36
- * @generated from protobuf field: string Name = 1 [json_name = "Name"];
37
- */
38
- name: string;
39
- /**
40
- * @generated from protobuf field: string Value = 2 [json_name = "Value"];
41
- */
42
- value: string;
45
+ /**
46
+ * @generated from protobuf field: string Name = 1
47
+ */
48
+ name: string;
49
+ /**
50
+ * @generated from protobuf field: string Value = 2
51
+ */
52
+ value: string;
43
53
  }
44
54
  /**
45
55
  * @generated from protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Response
46
56
  */
47
57
  export interface DownloadAPI_GetDownloadURL_Response {
48
- /**
49
- * @generated from protobuf field: string download_url = 1;
50
- */
51
- downloadUrl: string;
52
- /**
53
- * @generated from protobuf field: repeated MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader headers = 2;
54
- */
55
- headers: DownloadAPI_GetDownloadURL_HTTPHeader[];
58
+ /**
59
+ * @generated from protobuf field: string download_url = 1
60
+ */
61
+ downloadUrl: string;
62
+ /**
63
+ * @generated from protobuf field: repeated MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader headers = 2
64
+ */
65
+ headers: DownloadAPI_GetDownloadURL_HTTPHeader[];
56
66
  }
57
67
  // @generated message type with reflection information, may provide speed optimized methods
58
68
  class DownloadAPI$Type extends MessageType<DownloadAPI> {
59
- constructor() {
60
- super('MiLaboratories.Controller.Shared.DownloadAPI', []);
61
- }
62
-
63
- create(value?: PartialMessage<DownloadAPI>): DownloadAPI {
64
- const message = globalThis.Object.create(this.messagePrototype!);
65
- if (value !== undefined)
66
- reflectionMergePartial<DownloadAPI>(this, message, value);
67
- return message;
68
- }
69
-
70
- internalBinaryRead(
71
- reader: IBinaryReader,
72
- length: number,
73
- options: BinaryReadOptions,
74
- target?: DownloadAPI,
75
- ): DownloadAPI {
76
- return target ?? this.create();
77
- }
78
-
79
- internalBinaryWrite(
80
- message: DownloadAPI,
81
- writer: IBinaryWriter,
82
- options: BinaryWriteOptions,
83
- ): IBinaryWriter {
84
- const u = options.writeUnknownFields;
85
- if (u !== false)
86
- (u == true ? UnknownFieldHandler.onWrite : u)(
87
- this.typeName,
88
- message,
89
- writer,
90
- );
91
- return writer;
92
- }
69
+ constructor() {
70
+ super("MiLaboratories.Controller.Shared.DownloadAPI", []);
71
+ }
72
+ create(value?: PartialMessage<DownloadAPI>): DownloadAPI {
73
+ const message = globalThis.Object.create((this.messagePrototype!));
74
+ if (value !== undefined)
75
+ reflectionMergePartial<DownloadAPI>(this, message, value);
76
+ return message;
77
+ }
78
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadAPI): DownloadAPI {
79
+ let message = target ?? this.create(), end = reader.pos + length;
80
+ while (reader.pos < end) {
81
+ let [fieldNo, wireType] = reader.tag();
82
+ switch (fieldNo) {
83
+ default:
84
+ let u = options.readUnknownField;
85
+ if (u === "throw")
86
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
87
+ let d = reader.skip(wireType);
88
+ if (u !== false)
89
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
90
+ }
91
+ }
92
+ return message;
93
+ }
94
+ internalBinaryWrite(message: DownloadAPI, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
95
+ let u = options.writeUnknownFields;
96
+ if (u !== false)
97
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
98
+ return writer;
99
+ }
93
100
  }
94
101
  /**
95
102
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.DownloadAPI
@@ -97,42 +104,37 @@ class DownloadAPI$Type extends MessageType<DownloadAPI> {
97
104
  export const DownloadAPI = new DownloadAPI$Type();
98
105
  // @generated message type with reflection information, may provide speed optimized methods
99
106
  class DownloadAPI_GetDownloadURL$Type extends MessageType<DownloadAPI_GetDownloadURL> {
100
- constructor() {
101
- super('MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL', []);
102
- }
103
-
104
- create(
105
- value?: PartialMessage<DownloadAPI_GetDownloadURL>,
106
- ): DownloadAPI_GetDownloadURL {
107
- const message = globalThis.Object.create(this.messagePrototype!);
108
- if (value !== undefined)
109
- reflectionMergePartial<DownloadAPI_GetDownloadURL>(this, message, value);
110
- return message;
111
- }
112
-
113
- internalBinaryRead(
114
- reader: IBinaryReader,
115
- length: number,
116
- options: BinaryReadOptions,
117
- target?: DownloadAPI_GetDownloadURL,
118
- ): DownloadAPI_GetDownloadURL {
119
- return target ?? this.create();
120
- }
121
-
122
- internalBinaryWrite(
123
- message: DownloadAPI_GetDownloadURL,
124
- writer: IBinaryWriter,
125
- options: BinaryWriteOptions,
126
- ): IBinaryWriter {
127
- const u = options.writeUnknownFields;
128
- if (u !== false)
129
- (u == true ? UnknownFieldHandler.onWrite : u)(
130
- this.typeName,
131
- message,
132
- writer,
133
- );
134
- return writer;
135
- }
107
+ constructor() {
108
+ super("MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL", []);
109
+ }
110
+ create(value?: PartialMessage<DownloadAPI_GetDownloadURL>): DownloadAPI_GetDownloadURL {
111
+ const message = globalThis.Object.create((this.messagePrototype!));
112
+ if (value !== undefined)
113
+ reflectionMergePartial<DownloadAPI_GetDownloadURL>(this, message, value);
114
+ return message;
115
+ }
116
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadAPI_GetDownloadURL): DownloadAPI_GetDownloadURL {
117
+ let message = target ?? this.create(), end = reader.pos + length;
118
+ while (reader.pos < end) {
119
+ let [fieldNo, wireType] = reader.tag();
120
+ switch (fieldNo) {
121
+ default:
122
+ let u = options.readUnknownField;
123
+ if (u === "throw")
124
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
125
+ let d = reader.skip(wireType);
126
+ if (u !== false)
127
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
128
+ }
129
+ }
130
+ return message;
131
+ }
132
+ internalBinaryWrite(message: DownloadAPI_GetDownloadURL, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
133
+ let u = options.writeUnknownFields;
134
+ if (u !== false)
135
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
136
+ return writer;
137
+ }
136
138
  }
137
139
  /**
138
140
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL
@@ -140,318 +142,172 @@ class DownloadAPI_GetDownloadURL$Type extends MessageType<DownloadAPI_GetDownloa
140
142
  export const DownloadAPI_GetDownloadURL = new DownloadAPI_GetDownloadURL$Type();
141
143
  // @generated message type with reflection information, may provide speed optimized methods
142
144
  class DownloadAPI_GetDownloadURL_Request$Type extends MessageType<DownloadAPI_GetDownloadURL_Request> {
143
- constructor() {
144
- super(
145
- 'MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Request',
146
- [
147
- {
148
- no: 1,
149
- name: 'resource_id',
150
- kind: 'scalar',
151
- T: 4 /* ScalarType.UINT64 */,
152
- L: 0, /* LongType.BIGINT */
153
- },
154
- ],
155
- );
156
- }
157
-
158
- create(
159
- value?: PartialMessage<DownloadAPI_GetDownloadURL_Request>,
160
- ): DownloadAPI_GetDownloadURL_Request {
161
- const message = globalThis.Object.create(this.messagePrototype!);
162
- message.resourceId = 0n;
163
- if (value !== undefined)
164
- reflectionMergePartial<DownloadAPI_GetDownloadURL_Request>(
165
- this,
166
- message,
167
- value,
168
- );
169
- return message;
170
- }
171
-
172
- internalBinaryRead(
173
- reader: IBinaryReader,
174
- length: number,
175
- options: BinaryReadOptions,
176
- target?: DownloadAPI_GetDownloadURL_Request,
177
- ): DownloadAPI_GetDownloadURL_Request {
178
- const message = target ?? this.create(),
179
- end = reader.pos + length;
180
- while (reader.pos < end) {
181
- const [fieldNo, wireType] = reader.tag();
182
- switch (fieldNo) {
183
- case /* uint64 resource_id */ 1:
184
- message.resourceId = reader.uint64().toBigInt();
185
- break;
186
- default:
187
- const u = options.readUnknownField;
188
- if (u === 'throw')
189
- throw new globalThis.Error(
190
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
191
- );
192
- const d = reader.skip(wireType);
193
- if (u !== false)
194
- (u === true ? UnknownFieldHandler.onRead : u)(
195
- this.typeName,
196
- message,
197
- fieldNo,
198
- wireType,
199
- d,
200
- );
201
- }
145
+ constructor() {
146
+ super("MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Request", [
147
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
148
+ { no: 2, name: "is_internal_use", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
149
+ ]);
150
+ }
151
+ create(value?: PartialMessage<DownloadAPI_GetDownloadURL_Request>): DownloadAPI_GetDownloadURL_Request {
152
+ const message = globalThis.Object.create((this.messagePrototype!));
153
+ message.resourceId = 0n;
154
+ message.isInternalUse = false;
155
+ if (value !== undefined)
156
+ reflectionMergePartial<DownloadAPI_GetDownloadURL_Request>(this, message, value);
157
+ return message;
158
+ }
159
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadAPI_GetDownloadURL_Request): DownloadAPI_GetDownloadURL_Request {
160
+ let message = target ?? this.create(), end = reader.pos + length;
161
+ while (reader.pos < end) {
162
+ let [fieldNo, wireType] = reader.tag();
163
+ switch (fieldNo) {
164
+ case /* uint64 resource_id */ 1:
165
+ message.resourceId = reader.uint64().toBigInt();
166
+ break;
167
+ case /* bool is_internal_use */ 2:
168
+ message.isInternalUse = reader.bool();
169
+ break;
170
+ default:
171
+ let u = options.readUnknownField;
172
+ if (u === "throw")
173
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
174
+ let d = reader.skip(wireType);
175
+ if (u !== false)
176
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
177
+ }
178
+ }
179
+ return message;
180
+ }
181
+ internalBinaryWrite(message: DownloadAPI_GetDownloadURL_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
182
+ /* uint64 resource_id = 1; */
183
+ if (message.resourceId !== 0n)
184
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
185
+ /* bool is_internal_use = 2; */
186
+ if (message.isInternalUse !== false)
187
+ writer.tag(2, WireType.Varint).bool(message.isInternalUse);
188
+ let u = options.writeUnknownFields;
189
+ if (u !== false)
190
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
191
+ return writer;
202
192
  }
203
- return message;
204
- }
205
-
206
- internalBinaryWrite(
207
- message: DownloadAPI_GetDownloadURL_Request,
208
- writer: IBinaryWriter,
209
- options: BinaryWriteOptions,
210
- ): IBinaryWriter {
211
- /* uint64 resource_id = 1; */
212
- if (message.resourceId !== 0n)
213
- writer.tag(1, WireType.Varint).uint64(message.resourceId);
214
- const u = options.writeUnknownFields;
215
- if (u !== false)
216
- (u == true ? UnknownFieldHandler.onWrite : u)(
217
- this.typeName,
218
- message,
219
- writer,
220
- );
221
- return writer;
222
- }
223
193
  }
224
194
  /**
225
195
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Request
226
196
  */
227
- export const DownloadAPI_GetDownloadURL_Request
228
- = new DownloadAPI_GetDownloadURL_Request$Type();
197
+ export const DownloadAPI_GetDownloadURL_Request = new DownloadAPI_GetDownloadURL_Request$Type();
229
198
  // @generated message type with reflection information, may provide speed optimized methods
230
199
  class DownloadAPI_GetDownloadURL_HTTPHeader$Type extends MessageType<DownloadAPI_GetDownloadURL_HTTPHeader> {
231
- constructor() {
232
- super(
233
- 'MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader',
234
- [
235
- {
236
- no: 1,
237
- name: 'Name',
238
- kind: 'scalar',
239
- jsonName: 'Name',
240
- T: 9, /* ScalarType.STRING */
241
- },
242
- {
243
- no: 2,
244
- name: 'Value',
245
- kind: 'scalar',
246
- jsonName: 'Value',
247
- T: 9, /* ScalarType.STRING */
248
- },
249
- ],
250
- );
251
- }
252
-
253
- create(
254
- value?: PartialMessage<DownloadAPI_GetDownloadURL_HTTPHeader>,
255
- ): DownloadAPI_GetDownloadURL_HTTPHeader {
256
- const message = globalThis.Object.create(this.messagePrototype!);
257
- message.name = '';
258
- message.value = '';
259
- if (value !== undefined)
260
- reflectionMergePartial<DownloadAPI_GetDownloadURL_HTTPHeader>(
261
- this,
262
- message,
263
- value,
264
- );
265
- return message;
266
- }
267
-
268
- internalBinaryRead(
269
- reader: IBinaryReader,
270
- length: number,
271
- options: BinaryReadOptions,
272
- target?: DownloadAPI_GetDownloadURL_HTTPHeader,
273
- ): DownloadAPI_GetDownloadURL_HTTPHeader {
274
- const message = target ?? this.create(),
275
- end = reader.pos + length;
276
- while (reader.pos < end) {
277
- const [fieldNo, wireType] = reader.tag();
278
- switch (fieldNo) {
279
- case /* string Name = 1 [json_name = "Name"]; */ 1:
280
- message.name = reader.string();
281
- break;
282
- case /* string Value = 2 [json_name = "Value"]; */ 2:
283
- message.value = reader.string();
284
- break;
285
- default:
286
- const u = options.readUnknownField;
287
- if (u === 'throw')
288
- throw new globalThis.Error(
289
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
290
- );
291
- const d = reader.skip(wireType);
292
- if (u !== false)
293
- (u === true ? UnknownFieldHandler.onRead : u)(
294
- this.typeName,
295
- message,
296
- fieldNo,
297
- wireType,
298
- d,
299
- );
300
- }
200
+ constructor() {
201
+ super("MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader", [
202
+ { no: 1, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
203
+ { no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/ }
204
+ ]);
205
+ }
206
+ create(value?: PartialMessage<DownloadAPI_GetDownloadURL_HTTPHeader>): DownloadAPI_GetDownloadURL_HTTPHeader {
207
+ const message = globalThis.Object.create((this.messagePrototype!));
208
+ message.name = "";
209
+ message.value = "";
210
+ if (value !== undefined)
211
+ reflectionMergePartial<DownloadAPI_GetDownloadURL_HTTPHeader>(this, message, value);
212
+ return message;
213
+ }
214
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadAPI_GetDownloadURL_HTTPHeader): DownloadAPI_GetDownloadURL_HTTPHeader {
215
+ let message = target ?? this.create(), end = reader.pos + length;
216
+ while (reader.pos < end) {
217
+ let [fieldNo, wireType] = reader.tag();
218
+ switch (fieldNo) {
219
+ case /* string Name */ 1:
220
+ message.name = reader.string();
221
+ break;
222
+ case /* string Value */ 2:
223
+ message.value = reader.string();
224
+ break;
225
+ default:
226
+ let u = options.readUnknownField;
227
+ if (u === "throw")
228
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
229
+ let d = reader.skip(wireType);
230
+ if (u !== false)
231
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
232
+ }
233
+ }
234
+ return message;
235
+ }
236
+ internalBinaryWrite(message: DownloadAPI_GetDownloadURL_HTTPHeader, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
237
+ /* string Name = 1; */
238
+ if (message.name !== "")
239
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
240
+ /* string Value = 2; */
241
+ if (message.value !== "")
242
+ writer.tag(2, WireType.LengthDelimited).string(message.value);
243
+ let u = options.writeUnknownFields;
244
+ if (u !== false)
245
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
246
+ return writer;
301
247
  }
302
- return message;
303
- }
304
-
305
- internalBinaryWrite(
306
- message: DownloadAPI_GetDownloadURL_HTTPHeader,
307
- writer: IBinaryWriter,
308
- options: BinaryWriteOptions,
309
- ): IBinaryWriter {
310
- /* string Name = 1 [json_name = "Name"]; */
311
- if (message.name !== '')
312
- writer.tag(1, WireType.LengthDelimited).string(message.name);
313
- /* string Value = 2 [json_name = "Value"]; */
314
- if (message.value !== '')
315
- writer.tag(2, WireType.LengthDelimited).string(message.value);
316
- const u = options.writeUnknownFields;
317
- if (u !== false)
318
- (u == true ? UnknownFieldHandler.onWrite : u)(
319
- this.typeName,
320
- message,
321
- writer,
322
- );
323
- return writer;
324
- }
325
248
  }
326
249
  /**
327
250
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader
328
251
  */
329
- export const DownloadAPI_GetDownloadURL_HTTPHeader
330
- = new DownloadAPI_GetDownloadURL_HTTPHeader$Type();
252
+ export const DownloadAPI_GetDownloadURL_HTTPHeader = new DownloadAPI_GetDownloadURL_HTTPHeader$Type();
331
253
  // @generated message type with reflection information, may provide speed optimized methods
332
254
  class DownloadAPI_GetDownloadURL_Response$Type extends MessageType<DownloadAPI_GetDownloadURL_Response> {
333
- constructor() {
334
- super(
335
- 'MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Response',
336
- [
337
- {
338
- no: 1,
339
- name: 'download_url',
340
- kind: 'scalar',
341
- T: 9, /* ScalarType.STRING */
342
- },
343
- {
344
- no: 2,
345
- name: 'headers',
346
- kind: 'message',
347
- repeat: 1 /* RepeatType.PACKED */,
348
- T: () => DownloadAPI_GetDownloadURL_HTTPHeader,
349
- },
350
- ],
351
- );
352
- }
353
-
354
- create(
355
- value?: PartialMessage<DownloadAPI_GetDownloadURL_Response>,
356
- ): DownloadAPI_GetDownloadURL_Response {
357
- const message = globalThis.Object.create(this.messagePrototype!);
358
- message.downloadUrl = '';
359
- message.headers = [];
360
- if (value !== undefined)
361
- reflectionMergePartial<DownloadAPI_GetDownloadURL_Response>(
362
- this,
363
- message,
364
- value,
365
- );
366
- return message;
367
- }
368
-
369
- internalBinaryRead(
370
- reader: IBinaryReader,
371
- length: number,
372
- options: BinaryReadOptions,
373
- target?: DownloadAPI_GetDownloadURL_Response,
374
- ): DownloadAPI_GetDownloadURL_Response {
375
- const message = target ?? this.create(),
376
- end = reader.pos + length;
377
- while (reader.pos < end) {
378
- const [fieldNo, wireType] = reader.tag();
379
- switch (fieldNo) {
380
- case /* string download_url */ 1:
381
- message.downloadUrl = reader.string();
382
- break;
383
- case /* repeated MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader headers */ 2:
384
- message.headers.push(
385
- DownloadAPI_GetDownloadURL_HTTPHeader.internalBinaryRead(
386
- reader,
387
- reader.uint32(),
388
- options,
389
- ),
390
- );
391
- break;
392
- default:
393
- const u = options.readUnknownField;
394
- if (u === 'throw')
395
- throw new globalThis.Error(
396
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
397
- );
398
- const d = reader.skip(wireType);
399
- if (u !== false)
400
- (u === true ? UnknownFieldHandler.onRead : u)(
401
- this.typeName,
402
- message,
403
- fieldNo,
404
- wireType,
405
- d,
406
- );
407
- }
255
+ constructor() {
256
+ super("MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Response", [
257
+ { no: 1, name: "download_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
258
+ { no: 2, name: "headers", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DownloadAPI_GetDownloadURL_HTTPHeader }
259
+ ]);
260
+ }
261
+ create(value?: PartialMessage<DownloadAPI_GetDownloadURL_Response>): DownloadAPI_GetDownloadURL_Response {
262
+ const message = globalThis.Object.create((this.messagePrototype!));
263
+ message.downloadUrl = "";
264
+ message.headers = [];
265
+ if (value !== undefined)
266
+ reflectionMergePartial<DownloadAPI_GetDownloadURL_Response>(this, message, value);
267
+ return message;
268
+ }
269
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadAPI_GetDownloadURL_Response): DownloadAPI_GetDownloadURL_Response {
270
+ let message = target ?? this.create(), end = reader.pos + length;
271
+ while (reader.pos < end) {
272
+ let [fieldNo, wireType] = reader.tag();
273
+ switch (fieldNo) {
274
+ case /* string download_url */ 1:
275
+ message.downloadUrl = reader.string();
276
+ break;
277
+ case /* repeated MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader headers */ 2:
278
+ message.headers.push(DownloadAPI_GetDownloadURL_HTTPHeader.internalBinaryRead(reader, reader.uint32(), options));
279
+ break;
280
+ default:
281
+ let u = options.readUnknownField;
282
+ if (u === "throw")
283
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
284
+ let d = reader.skip(wireType);
285
+ if (u !== false)
286
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
287
+ }
288
+ }
289
+ return message;
290
+ }
291
+ internalBinaryWrite(message: DownloadAPI_GetDownloadURL_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
292
+ /* string download_url = 1; */
293
+ if (message.downloadUrl !== "")
294
+ writer.tag(1, WireType.LengthDelimited).string(message.downloadUrl);
295
+ /* repeated MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader headers = 2; */
296
+ for (let i = 0; i < message.headers.length; i++)
297
+ DownloadAPI_GetDownloadURL_HTTPHeader.internalBinaryWrite(message.headers[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
298
+ let u = options.writeUnknownFields;
299
+ if (u !== false)
300
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
301
+ return writer;
408
302
  }
409
- return message;
410
- }
411
-
412
- internalBinaryWrite(
413
- message: DownloadAPI_GetDownloadURL_Response,
414
- writer: IBinaryWriter,
415
- options: BinaryWriteOptions,
416
- ): IBinaryWriter {
417
- /* string download_url = 1; */
418
- if (message.downloadUrl !== '')
419
- writer.tag(1, WireType.LengthDelimited).string(message.downloadUrl);
420
- /* repeated MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader headers = 2; */
421
- for (let i = 0; i < message.headers.length; i++)
422
- DownloadAPI_GetDownloadURL_HTTPHeader.internalBinaryWrite(
423
- message.headers[i],
424
- writer.tag(2, WireType.LengthDelimited).fork(),
425
- options,
426
- ).join();
427
- const u = options.writeUnknownFields;
428
- if (u !== false)
429
- (u == true ? UnknownFieldHandler.onWrite : u)(
430
- this.typeName,
431
- message,
432
- writer,
433
- );
434
- return writer;
435
- }
436
303
  }
437
304
  /**
438
305
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Response
439
306
  */
440
- export const DownloadAPI_GetDownloadURL_Response
441
- = new DownloadAPI_GetDownloadURL_Response$Type();
307
+ export const DownloadAPI_GetDownloadURL_Response = new DownloadAPI_GetDownloadURL_Response$Type();
442
308
  /**
443
309
  * @generated ServiceType for protobuf service MiLaboratories.Controller.Shared.Download
444
310
  */
445
- export const Download = new ServiceType(
446
- 'MiLaboratories.Controller.Shared.Download',
447
- [
448
- {
449
- name: 'GetDownloadURL',
450
- options: {
451
- 'google.api.http': { get: '/resources/{resource_id}/get-download-url' },
452
- },
453
- I: DownloadAPI_GetDownloadURL_Request,
454
- O: DownloadAPI_GetDownloadURL_Response,
455
- },
456
- ],
457
- );
311
+ export const Download = new ServiceType("MiLaboratories.Controller.Shared.Download", [
312
+ { name: "GetDownloadURL", options: { "google.api.http": { get: "/resources/{resource_id}/get-download-url" } }, I: DownloadAPI_GetDownloadURL_Request, O: DownloadAPI_GetDownloadURL_Response }
313
+ ]);