@milaboratories/pl-drivers 1.5.10 → 1.5.11
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.
- package/dist/clients/constructors.d.ts.map +1 -1
- package/dist/clients/download.d.ts.map +1 -1
- package/dist/clients/logs.d.ts.map +1 -1
- package/dist/clients/ls_api.d.ts.map +1 -1
- package/dist/clients/progress.d.ts.map +1 -1
- package/dist/clients/upload.d.ts.map +1 -1
- package/dist/drivers/download_blob.d.ts +2 -2
- package/dist/drivers/download_blob.d.ts.map +1 -1
- package/dist/drivers/download_blob_task.d.ts +2 -2
- package/dist/drivers/download_blob_task.d.ts.map +1 -1
- package/dist/drivers/download_blob_url/driver.d.ts +46 -0
- package/dist/drivers/download_blob_url/driver.d.ts.map +1 -0
- package/dist/drivers/download_blob_url/driver_id.d.ts +6 -0
- package/dist/drivers/download_blob_url/driver_id.d.ts.map +1 -0
- package/dist/drivers/download_blob_url/snapshot.d.ts +7 -0
- package/dist/drivers/download_blob_url/snapshot.d.ts.map +1 -0
- package/dist/drivers/download_blob_url/task.d.ts +63 -0
- package/dist/drivers/download_blob_url/task.d.ts.map +1 -0
- package/dist/drivers/download_blob_url/url.d.ts +6 -0
- package/dist/drivers/download_blob_url/url.d.ts.map +1 -0
- package/dist/drivers/download_url.d.ts +2 -2
- package/dist/drivers/download_url.d.ts.map +1 -1
- package/dist/drivers/helpers/download_local_handle.d.ts.map +1 -1
- package/dist/drivers/helpers/download_remote_handle.d.ts.map +1 -1
- package/dist/drivers/helpers/files_cache.d.ts.map +1 -1
- package/dist/drivers/helpers/logs_handle.d.ts +1 -1
- package/dist/drivers/helpers/logs_handle.d.ts.map +1 -1
- package/dist/drivers/helpers/ls_remote_import_handle.d.ts +1 -1
- package/dist/drivers/helpers/ls_remote_import_handle.d.ts.map +1 -1
- package/dist/drivers/helpers/ls_storage_entry.d.ts +1 -1
- package/dist/drivers/helpers/ls_storage_entry.d.ts.map +1 -1
- package/dist/drivers/logs.d.ts +2 -2
- package/dist/drivers/logs.d.ts.map +1 -1
- package/dist/drivers/logs_stream.d.ts +2 -2
- package/dist/drivers/logs_stream.d.ts.map +1 -1
- package/dist/drivers/ls.d.ts +1 -1
- package/dist/drivers/ls.d.ts.map +1 -1
- package/dist/drivers/types.d.ts.map +1 -1
- package/dist/drivers/upload.d.ts +1 -1
- package/dist/drivers/upload.d.ts.map +1 -1
- package/dist/drivers/upload_task.d.ts +1 -1
- package/dist/drivers/upload_task.d.ts.map +1 -1
- package/dist/drivers/virtual_storages.d.ts.map +1 -1
- package/dist/helpers/download.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2310 -2067
- package/dist/index.mjs.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts.map +1 -1
- package/dist/proto/google/api/http.d.ts +28 -28
- package/dist/proto/google/api/http.d.ts.map +1 -1
- package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/proto/google/protobuf/duration.d.ts.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
- package/package.json +9 -4
- package/src/clients/constructors.ts +11 -11
- package/src/clients/download.test.ts +11 -10
- package/src/clients/download.ts +15 -14
- package/src/clients/logs.ts +13 -12
- package/src/clients/ls_api.ts +7 -7
- package/src/clients/progress.ts +15 -13
- package/src/clients/upload.test.ts +6 -5
- package/src/clients/upload.ts +28 -26
- package/src/drivers/download_blob.test.ts +21 -20
- package/src/drivers/download_blob.ts +47 -42
- package/src/drivers/download_blob_task.ts +25 -21
- package/src/drivers/download_blob_url/driver.ts +225 -0
- package/src/drivers/download_blob_url/driver_id.ts +11 -0
- package/src/drivers/download_blob_url/snapshot.ts +20 -0
- package/src/drivers/download_blob_url/task.ts +222 -0
- package/src/drivers/download_blob_url/url.test.ts +39 -0
- package/src/drivers/download_blob_url/url.ts +43 -0
- package/src/drivers/download_url.test.ts +3 -3
- package/src/drivers/download_url.ts +21 -20
- package/src/drivers/helpers/download_local_handle.ts +2 -2
- package/src/drivers/helpers/download_remote_handle.ts +8 -8
- package/src/drivers/helpers/files_cache.test.ts +7 -6
- package/src/drivers/helpers/files_cache.ts +2 -1
- package/src/drivers/helpers/helpers.ts +1 -1
- package/src/drivers/helpers/logs_handle.ts +7 -7
- package/src/drivers/helpers/ls_remote_import_handle.ts +7 -7
- package/src/drivers/helpers/ls_storage_entry.ts +6 -5
- package/src/drivers/logs.test.ts +23 -22
- package/src/drivers/logs.ts +13 -12
- package/src/drivers/logs_stream.ts +42 -37
- package/src/drivers/ls.test.ts +2 -2
- package/src/drivers/ls.ts +38 -35
- package/src/drivers/types.ts +12 -11
- package/src/drivers/upload.test.ts +19 -17
- package/src/drivers/upload.ts +30 -25
- package/src/drivers/upload_task.ts +23 -19
- package/src/drivers/virtual_storages.ts +6 -6
- package/src/helpers/download.ts +8 -8
- package/src/index.ts +2 -0
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +4 -4
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +88 -73
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +2 -2
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +71 -56
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +6 -5
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +130 -106
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +14 -10
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +142 -121
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.ts +11 -8
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.ts +216 -174
- package/src/proto/google/api/http.ts +95 -86
- package/src/proto/google/protobuf/descriptor.ts +674 -593
- package/src/proto/google/protobuf/duration.ts +31 -26
- package/src/proto/google/protobuf/timestamp.ts +52 -44
|
@@ -2,7 +2,7 @@ import path from 'path';
|
|
|
2
2
|
import os from 'os';
|
|
3
3
|
import util from 'util';
|
|
4
4
|
import { exec } from 'child_process';
|
|
5
|
-
import { VirtualLocalStorageSpec } from './types';
|
|
5
|
+
import type { VirtualLocalStorageSpec } from './types';
|
|
6
6
|
|
|
7
7
|
export async function DefaultVirtualLocalStorages(): Promise<VirtualLocalStorageSpec[]> {
|
|
8
8
|
const home = os.homedir();
|
|
@@ -11,8 +11,8 @@ export async function DefaultVirtualLocalStorages(): Promise<VirtualLocalStorage
|
|
|
11
11
|
{
|
|
12
12
|
name: 'local',
|
|
13
13
|
root: '/',
|
|
14
|
-
initialPath: home
|
|
15
|
-
}
|
|
14
|
+
initialPath: home,
|
|
15
|
+
},
|
|
16
16
|
];
|
|
17
17
|
else {
|
|
18
18
|
// determine the drive on which user's home folder is stored
|
|
@@ -35,7 +35,7 @@ export async function DefaultVirtualLocalStorages(): Promise<VirtualLocalStorage
|
|
|
35
35
|
return {
|
|
36
36
|
name: `local_disk_${drive}`,
|
|
37
37
|
root: `${drive}:\\`,
|
|
38
|
-
initialPath: isHomeDrive ? home : `${drive}
|
|
38
|
+
initialPath: isHomeDrive ? home : `${drive}:\\`,
|
|
39
39
|
};
|
|
40
40
|
});
|
|
41
41
|
} catch (e: any) {
|
|
@@ -43,8 +43,8 @@ export async function DefaultVirtualLocalStorages(): Promise<VirtualLocalStorage
|
|
|
43
43
|
{
|
|
44
44
|
name: `local_disk_${homeDrive}`,
|
|
45
45
|
root: `${homeDrive}:\\`,
|
|
46
|
-
initialPath: home
|
|
47
|
-
}
|
|
46
|
+
initialPath: home,
|
|
47
|
+
},
|
|
48
48
|
];
|
|
49
49
|
}
|
|
50
50
|
}
|
package/src/helpers/download.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Dispatcher
|
|
1
|
+
import type { Dispatcher } from 'undici';
|
|
2
|
+
import { request } from 'undici';
|
|
2
3
|
import { Readable } from 'node:stream';
|
|
3
|
-
import { ReadableStream } from 'node:stream/web';
|
|
4
|
+
import type { ReadableStream } from 'node:stream/web';
|
|
4
5
|
import { text } from 'node:stream/consumers';
|
|
5
6
|
|
|
6
7
|
export interface DownloadResponse {
|
|
@@ -17,12 +18,12 @@ export class RemoteFileDownloader {
|
|
|
17
18
|
async download(
|
|
18
19
|
url: string,
|
|
19
20
|
reqHeaders: Record<string, string>,
|
|
20
|
-
signal?: AbortSignal
|
|
21
|
+
signal?: AbortSignal,
|
|
21
22
|
): Promise<DownloadResponse> {
|
|
22
23
|
const { statusCode, body, headers } = await request(url, {
|
|
23
24
|
dispatcher: this.httpClient,
|
|
24
25
|
headers: reqHeaders,
|
|
25
|
-
signal
|
|
26
|
+
signal,
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
const webBody = Readable.toWeb(body);
|
|
@@ -30,7 +31,7 @@ export class RemoteFileDownloader {
|
|
|
30
31
|
|
|
31
32
|
return {
|
|
32
33
|
content: webBody,
|
|
33
|
-
size: Number(headers['content-length'])
|
|
34
|
+
size: Number(headers['content-length']),
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -41,11 +42,10 @@ async function checkStatusCodeOk(statusCode: number, webBody: ReadableStream<any
|
|
|
41
42
|
|
|
42
43
|
if (400 <= statusCode && statusCode < 500) {
|
|
43
44
|
throw new NetworkError400(
|
|
44
|
-
`Http error: statusCode: ${statusCode} `
|
|
45
|
-
`url: ${url.toString()}, beginning of body: ${beginning}`);
|
|
45
|
+
`Http error: statusCode: ${statusCode} `
|
|
46
|
+
+ `url: ${url.toString()}, beginning of body: ${beginning}`);
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
throw new Error(`Http error: statusCode: ${statusCode} url: ${url.toString()}`);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,8 @@ export * from './clients/logs';
|
|
|
6
6
|
export * from './clients/constructors';
|
|
7
7
|
|
|
8
8
|
export * from './drivers/download_blob';
|
|
9
|
+
export * from './drivers/download_blob_url/driver';
|
|
10
|
+
export * from './drivers/download_blob_url/snapshot';
|
|
9
11
|
export * from './drivers/upload';
|
|
10
12
|
export * from './drivers/logs_stream';
|
|
11
13
|
export * from './drivers/logs';
|
package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts
CHANGED
|
@@ -45,11 +45,11 @@ export class DownloadClient implements IDownloadClient, ServiceInfo {
|
|
|
45
45
|
*/
|
|
46
46
|
getDownloadURL(
|
|
47
47
|
input: DownloadAPI_GetDownloadURL_Request,
|
|
48
|
-
options?: RpcOptions
|
|
48
|
+
options?: RpcOptions,
|
|
49
49
|
): UnaryCall<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
DownloadAPI_GetDownloadURL_Request,
|
|
51
|
+
DownloadAPI_GetDownloadURL_Response
|
|
52
|
+
> {
|
|
53
53
|
const method = this.methods[0],
|
|
54
54
|
opt = this._transport.mergeOptions(options);
|
|
55
55
|
return stackIntercept<
|
package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts
CHANGED
|
@@ -59,31 +59,34 @@ class DownloadAPI$Type extends MessageType<DownloadAPI> {
|
|
|
59
59
|
constructor() {
|
|
60
60
|
super('MiLaboratories.Controller.Shared.DownloadAPI', []);
|
|
61
61
|
}
|
|
62
|
+
|
|
62
63
|
create(value?: PartialMessage<DownloadAPI>): DownloadAPI {
|
|
63
64
|
const message = globalThis.Object.create(this.messagePrototype!);
|
|
64
65
|
if (value !== undefined)
|
|
65
66
|
reflectionMergePartial<DownloadAPI>(this, message, value);
|
|
66
67
|
return message;
|
|
67
68
|
}
|
|
69
|
+
|
|
68
70
|
internalBinaryRead(
|
|
69
71
|
reader: IBinaryReader,
|
|
70
72
|
length: number,
|
|
71
73
|
options: BinaryReadOptions,
|
|
72
|
-
target?: DownloadAPI
|
|
74
|
+
target?: DownloadAPI,
|
|
73
75
|
): DownloadAPI {
|
|
74
76
|
return target ?? this.create();
|
|
75
77
|
}
|
|
78
|
+
|
|
76
79
|
internalBinaryWrite(
|
|
77
80
|
message: DownloadAPI,
|
|
78
81
|
writer: IBinaryWriter,
|
|
79
|
-
options: BinaryWriteOptions
|
|
82
|
+
options: BinaryWriteOptions,
|
|
80
83
|
): IBinaryWriter {
|
|
81
|
-
|
|
84
|
+
const u = options.writeUnknownFields;
|
|
82
85
|
if (u !== false)
|
|
83
86
|
(u == true ? UnknownFieldHandler.onWrite : u)(
|
|
84
87
|
this.typeName,
|
|
85
88
|
message,
|
|
86
|
-
writer
|
|
89
|
+
writer,
|
|
87
90
|
);
|
|
88
91
|
return writer;
|
|
89
92
|
}
|
|
@@ -97,33 +100,36 @@ class DownloadAPI_GetDownloadURL$Type extends MessageType<DownloadAPI_GetDownloa
|
|
|
97
100
|
constructor() {
|
|
98
101
|
super('MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL', []);
|
|
99
102
|
}
|
|
103
|
+
|
|
100
104
|
create(
|
|
101
|
-
value?: PartialMessage<DownloadAPI_GetDownloadURL
|
|
105
|
+
value?: PartialMessage<DownloadAPI_GetDownloadURL>,
|
|
102
106
|
): DownloadAPI_GetDownloadURL {
|
|
103
107
|
const message = globalThis.Object.create(this.messagePrototype!);
|
|
104
108
|
if (value !== undefined)
|
|
105
109
|
reflectionMergePartial<DownloadAPI_GetDownloadURL>(this, message, value);
|
|
106
110
|
return message;
|
|
107
111
|
}
|
|
112
|
+
|
|
108
113
|
internalBinaryRead(
|
|
109
114
|
reader: IBinaryReader,
|
|
110
115
|
length: number,
|
|
111
116
|
options: BinaryReadOptions,
|
|
112
|
-
target?: DownloadAPI_GetDownloadURL
|
|
117
|
+
target?: DownloadAPI_GetDownloadURL,
|
|
113
118
|
): DownloadAPI_GetDownloadURL {
|
|
114
119
|
return target ?? this.create();
|
|
115
120
|
}
|
|
121
|
+
|
|
116
122
|
internalBinaryWrite(
|
|
117
123
|
message: DownloadAPI_GetDownloadURL,
|
|
118
124
|
writer: IBinaryWriter,
|
|
119
|
-
options: BinaryWriteOptions
|
|
125
|
+
options: BinaryWriteOptions,
|
|
120
126
|
): IBinaryWriter {
|
|
121
|
-
|
|
127
|
+
const u = options.writeUnknownFields;
|
|
122
128
|
if (u !== false)
|
|
123
129
|
(u == true ? UnknownFieldHandler.onWrite : u)(
|
|
124
130
|
this.typeName,
|
|
125
131
|
message,
|
|
126
|
-
writer
|
|
132
|
+
writer,
|
|
127
133
|
);
|
|
128
134
|
return writer;
|
|
129
135
|
}
|
|
@@ -142,14 +148,15 @@ class DownloadAPI_GetDownloadURL_Request$Type extends MessageType<DownloadAPI_Ge
|
|
|
142
148
|
no: 1,
|
|
143
149
|
name: 'resource_id',
|
|
144
150
|
kind: 'scalar',
|
|
145
|
-
T: 4 /*ScalarType.UINT64*/,
|
|
146
|
-
L: 0 /*LongType.BIGINT*/
|
|
147
|
-
}
|
|
148
|
-
]
|
|
151
|
+
T: 4 /* ScalarType.UINT64 */,
|
|
152
|
+
L: 0, /* LongType.BIGINT */
|
|
153
|
+
},
|
|
154
|
+
],
|
|
149
155
|
);
|
|
150
156
|
}
|
|
157
|
+
|
|
151
158
|
create(
|
|
152
|
-
value?: PartialMessage<DownloadAPI_GetDownloadURL_Request
|
|
159
|
+
value?: PartialMessage<DownloadAPI_GetDownloadURL_Request>,
|
|
153
160
|
): DownloadAPI_GetDownloadURL_Request {
|
|
154
161
|
const message = globalThis.Object.create(this.messagePrototype!);
|
|
155
162
|
message.resourceId = 0n;
|
|
@@ -157,57 +164,59 @@ class DownloadAPI_GetDownloadURL_Request$Type extends MessageType<DownloadAPI_Ge
|
|
|
157
164
|
reflectionMergePartial<DownloadAPI_GetDownloadURL_Request>(
|
|
158
165
|
this,
|
|
159
166
|
message,
|
|
160
|
-
value
|
|
167
|
+
value,
|
|
161
168
|
);
|
|
162
169
|
return message;
|
|
163
170
|
}
|
|
171
|
+
|
|
164
172
|
internalBinaryRead(
|
|
165
173
|
reader: IBinaryReader,
|
|
166
174
|
length: number,
|
|
167
175
|
options: BinaryReadOptions,
|
|
168
|
-
target?: DownloadAPI_GetDownloadURL_Request
|
|
176
|
+
target?: DownloadAPI_GetDownloadURL_Request,
|
|
169
177
|
): DownloadAPI_GetDownloadURL_Request {
|
|
170
|
-
|
|
178
|
+
const message = target ?? this.create(),
|
|
171
179
|
end = reader.pos + length;
|
|
172
180
|
while (reader.pos < end) {
|
|
173
|
-
|
|
181
|
+
const [fieldNo, wireType] = reader.tag();
|
|
174
182
|
switch (fieldNo) {
|
|
175
183
|
case /* uint64 resource_id */ 1:
|
|
176
184
|
message.resourceId = reader.uint64().toBigInt();
|
|
177
185
|
break;
|
|
178
186
|
default:
|
|
179
|
-
|
|
187
|
+
const u = options.readUnknownField;
|
|
180
188
|
if (u === 'throw')
|
|
181
189
|
throw new globalThis.Error(
|
|
182
|
-
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}
|
|
190
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
|
|
183
191
|
);
|
|
184
|
-
|
|
192
|
+
const d = reader.skip(wireType);
|
|
185
193
|
if (u !== false)
|
|
186
194
|
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
187
195
|
this.typeName,
|
|
188
196
|
message,
|
|
189
197
|
fieldNo,
|
|
190
198
|
wireType,
|
|
191
|
-
d
|
|
199
|
+
d,
|
|
192
200
|
);
|
|
193
201
|
}
|
|
194
202
|
}
|
|
195
203
|
return message;
|
|
196
204
|
}
|
|
205
|
+
|
|
197
206
|
internalBinaryWrite(
|
|
198
207
|
message: DownloadAPI_GetDownloadURL_Request,
|
|
199
208
|
writer: IBinaryWriter,
|
|
200
|
-
options: BinaryWriteOptions
|
|
209
|
+
options: BinaryWriteOptions,
|
|
201
210
|
): IBinaryWriter {
|
|
202
211
|
/* uint64 resource_id = 1; */
|
|
203
212
|
if (message.resourceId !== 0n)
|
|
204
213
|
writer.tag(1, WireType.Varint).uint64(message.resourceId);
|
|
205
|
-
|
|
214
|
+
const u = options.writeUnknownFields;
|
|
206
215
|
if (u !== false)
|
|
207
216
|
(u == true ? UnknownFieldHandler.onWrite : u)(
|
|
208
217
|
this.typeName,
|
|
209
218
|
message,
|
|
210
|
-
writer
|
|
219
|
+
writer,
|
|
211
220
|
);
|
|
212
221
|
return writer;
|
|
213
222
|
}
|
|
@@ -215,8 +224,8 @@ class DownloadAPI_GetDownloadURL_Request$Type extends MessageType<DownloadAPI_Ge
|
|
|
215
224
|
/**
|
|
216
225
|
* @generated MessageType for protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Request
|
|
217
226
|
*/
|
|
218
|
-
export const DownloadAPI_GetDownloadURL_Request
|
|
219
|
-
new DownloadAPI_GetDownloadURL_Request$Type();
|
|
227
|
+
export const DownloadAPI_GetDownloadURL_Request
|
|
228
|
+
= new DownloadAPI_GetDownloadURL_Request$Type();
|
|
220
229
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
221
230
|
class DownloadAPI_GetDownloadURL_HTTPHeader$Type extends MessageType<DownloadAPI_GetDownloadURL_HTTPHeader> {
|
|
222
231
|
constructor() {
|
|
@@ -228,20 +237,21 @@ class DownloadAPI_GetDownloadURL_HTTPHeader$Type extends MessageType<DownloadAPI
|
|
|
228
237
|
name: 'Name',
|
|
229
238
|
kind: 'scalar',
|
|
230
239
|
jsonName: 'Name',
|
|
231
|
-
T: 9 /*ScalarType.STRING*/
|
|
240
|
+
T: 9, /* ScalarType.STRING */
|
|
232
241
|
},
|
|
233
242
|
{
|
|
234
243
|
no: 2,
|
|
235
244
|
name: 'Value',
|
|
236
245
|
kind: 'scalar',
|
|
237
246
|
jsonName: 'Value',
|
|
238
|
-
T: 9 /*ScalarType.STRING*/
|
|
239
|
-
}
|
|
240
|
-
]
|
|
247
|
+
T: 9, /* ScalarType.STRING */
|
|
248
|
+
},
|
|
249
|
+
],
|
|
241
250
|
);
|
|
242
251
|
}
|
|
252
|
+
|
|
243
253
|
create(
|
|
244
|
-
value?: PartialMessage<DownloadAPI_GetDownloadURL_HTTPHeader
|
|
254
|
+
value?: PartialMessage<DownloadAPI_GetDownloadURL_HTTPHeader>,
|
|
245
255
|
): DownloadAPI_GetDownloadURL_HTTPHeader {
|
|
246
256
|
const message = globalThis.Object.create(this.messagePrototype!);
|
|
247
257
|
message.name = '';
|
|
@@ -250,50 +260,52 @@ class DownloadAPI_GetDownloadURL_HTTPHeader$Type extends MessageType<DownloadAPI
|
|
|
250
260
|
reflectionMergePartial<DownloadAPI_GetDownloadURL_HTTPHeader>(
|
|
251
261
|
this,
|
|
252
262
|
message,
|
|
253
|
-
value
|
|
263
|
+
value,
|
|
254
264
|
);
|
|
255
265
|
return message;
|
|
256
266
|
}
|
|
267
|
+
|
|
257
268
|
internalBinaryRead(
|
|
258
269
|
reader: IBinaryReader,
|
|
259
270
|
length: number,
|
|
260
271
|
options: BinaryReadOptions,
|
|
261
|
-
target?: DownloadAPI_GetDownloadURL_HTTPHeader
|
|
272
|
+
target?: DownloadAPI_GetDownloadURL_HTTPHeader,
|
|
262
273
|
): DownloadAPI_GetDownloadURL_HTTPHeader {
|
|
263
|
-
|
|
274
|
+
const message = target ?? this.create(),
|
|
264
275
|
end = reader.pos + length;
|
|
265
276
|
while (reader.pos < end) {
|
|
266
|
-
|
|
277
|
+
const [fieldNo, wireType] = reader.tag();
|
|
267
278
|
switch (fieldNo) {
|
|
268
|
-
case /* string Name = 1 [json_name = "Name"]
|
|
279
|
+
case /* string Name = 1 [json_name = "Name"]; */ 1:
|
|
269
280
|
message.name = reader.string();
|
|
270
281
|
break;
|
|
271
|
-
case /* string Value = 2 [json_name = "Value"]
|
|
282
|
+
case /* string Value = 2 [json_name = "Value"]; */ 2:
|
|
272
283
|
message.value = reader.string();
|
|
273
284
|
break;
|
|
274
285
|
default:
|
|
275
|
-
|
|
286
|
+
const u = options.readUnknownField;
|
|
276
287
|
if (u === 'throw')
|
|
277
288
|
throw new globalThis.Error(
|
|
278
|
-
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}
|
|
289
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
|
|
279
290
|
);
|
|
280
|
-
|
|
291
|
+
const d = reader.skip(wireType);
|
|
281
292
|
if (u !== false)
|
|
282
293
|
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
283
294
|
this.typeName,
|
|
284
295
|
message,
|
|
285
296
|
fieldNo,
|
|
286
297
|
wireType,
|
|
287
|
-
d
|
|
298
|
+
d,
|
|
288
299
|
);
|
|
289
300
|
}
|
|
290
301
|
}
|
|
291
302
|
return message;
|
|
292
303
|
}
|
|
304
|
+
|
|
293
305
|
internalBinaryWrite(
|
|
294
306
|
message: DownloadAPI_GetDownloadURL_HTTPHeader,
|
|
295
307
|
writer: IBinaryWriter,
|
|
296
|
-
options: BinaryWriteOptions
|
|
308
|
+
options: BinaryWriteOptions,
|
|
297
309
|
): IBinaryWriter {
|
|
298
310
|
/* string Name = 1 [json_name = "Name"]; */
|
|
299
311
|
if (message.name !== '')
|
|
@@ -301,12 +313,12 @@ class DownloadAPI_GetDownloadURL_HTTPHeader$Type extends MessageType<DownloadAPI
|
|
|
301
313
|
/* string Value = 2 [json_name = "Value"]; */
|
|
302
314
|
if (message.value !== '')
|
|
303
315
|
writer.tag(2, WireType.LengthDelimited).string(message.value);
|
|
304
|
-
|
|
316
|
+
const u = options.writeUnknownFields;
|
|
305
317
|
if (u !== false)
|
|
306
318
|
(u == true ? UnknownFieldHandler.onWrite : u)(
|
|
307
319
|
this.typeName,
|
|
308
320
|
message,
|
|
309
|
-
writer
|
|
321
|
+
writer,
|
|
310
322
|
);
|
|
311
323
|
return writer;
|
|
312
324
|
}
|
|
@@ -314,8 +326,8 @@ class DownloadAPI_GetDownloadURL_HTTPHeader$Type extends MessageType<DownloadAPI
|
|
|
314
326
|
/**
|
|
315
327
|
* @generated MessageType for protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.HTTPHeader
|
|
316
328
|
*/
|
|
317
|
-
export const DownloadAPI_GetDownloadURL_HTTPHeader
|
|
318
|
-
new DownloadAPI_GetDownloadURL_HTTPHeader$Type();
|
|
329
|
+
export const DownloadAPI_GetDownloadURL_HTTPHeader
|
|
330
|
+
= new DownloadAPI_GetDownloadURL_HTTPHeader$Type();
|
|
319
331
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
320
332
|
class DownloadAPI_GetDownloadURL_Response$Type extends MessageType<DownloadAPI_GetDownloadURL_Response> {
|
|
321
333
|
constructor() {
|
|
@@ -326,20 +338,21 @@ class DownloadAPI_GetDownloadURL_Response$Type extends MessageType<DownloadAPI_G
|
|
|
326
338
|
no: 1,
|
|
327
339
|
name: 'download_url',
|
|
328
340
|
kind: 'scalar',
|
|
329
|
-
T: 9 /*ScalarType.STRING*/
|
|
341
|
+
T: 9, /* ScalarType.STRING */
|
|
330
342
|
},
|
|
331
343
|
{
|
|
332
344
|
no: 2,
|
|
333
345
|
name: 'headers',
|
|
334
346
|
kind: 'message',
|
|
335
|
-
repeat: 1 /*RepeatType.PACKED*/,
|
|
336
|
-
T: () => DownloadAPI_GetDownloadURL_HTTPHeader
|
|
337
|
-
}
|
|
338
|
-
]
|
|
347
|
+
repeat: 1 /* RepeatType.PACKED */,
|
|
348
|
+
T: () => DownloadAPI_GetDownloadURL_HTTPHeader,
|
|
349
|
+
},
|
|
350
|
+
],
|
|
339
351
|
);
|
|
340
352
|
}
|
|
353
|
+
|
|
341
354
|
create(
|
|
342
|
-
value?: PartialMessage<DownloadAPI_GetDownloadURL_Response
|
|
355
|
+
value?: PartialMessage<DownloadAPI_GetDownloadURL_Response>,
|
|
343
356
|
): DownloadAPI_GetDownloadURL_Response {
|
|
344
357
|
const message = globalThis.Object.create(this.messagePrototype!);
|
|
345
358
|
message.downloadUrl = '';
|
|
@@ -348,20 +361,21 @@ class DownloadAPI_GetDownloadURL_Response$Type extends MessageType<DownloadAPI_G
|
|
|
348
361
|
reflectionMergePartial<DownloadAPI_GetDownloadURL_Response>(
|
|
349
362
|
this,
|
|
350
363
|
message,
|
|
351
|
-
value
|
|
364
|
+
value,
|
|
352
365
|
);
|
|
353
366
|
return message;
|
|
354
367
|
}
|
|
368
|
+
|
|
355
369
|
internalBinaryRead(
|
|
356
370
|
reader: IBinaryReader,
|
|
357
371
|
length: number,
|
|
358
372
|
options: BinaryReadOptions,
|
|
359
|
-
target?: DownloadAPI_GetDownloadURL_Response
|
|
373
|
+
target?: DownloadAPI_GetDownloadURL_Response,
|
|
360
374
|
): DownloadAPI_GetDownloadURL_Response {
|
|
361
|
-
|
|
375
|
+
const message = target ?? this.create(),
|
|
362
376
|
end = reader.pos + length;
|
|
363
377
|
while (reader.pos < end) {
|
|
364
|
-
|
|
378
|
+
const [fieldNo, wireType] = reader.tag();
|
|
365
379
|
switch (fieldNo) {
|
|
366
380
|
case /* string download_url */ 1:
|
|
367
381
|
message.downloadUrl = reader.string();
|
|
@@ -371,33 +385,34 @@ class DownloadAPI_GetDownloadURL_Response$Type extends MessageType<DownloadAPI_G
|
|
|
371
385
|
DownloadAPI_GetDownloadURL_HTTPHeader.internalBinaryRead(
|
|
372
386
|
reader,
|
|
373
387
|
reader.uint32(),
|
|
374
|
-
options
|
|
375
|
-
)
|
|
388
|
+
options,
|
|
389
|
+
),
|
|
376
390
|
);
|
|
377
391
|
break;
|
|
378
392
|
default:
|
|
379
|
-
|
|
393
|
+
const u = options.readUnknownField;
|
|
380
394
|
if (u === 'throw')
|
|
381
395
|
throw new globalThis.Error(
|
|
382
|
-
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}
|
|
396
|
+
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
|
|
383
397
|
);
|
|
384
|
-
|
|
398
|
+
const d = reader.skip(wireType);
|
|
385
399
|
if (u !== false)
|
|
386
400
|
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
387
401
|
this.typeName,
|
|
388
402
|
message,
|
|
389
403
|
fieldNo,
|
|
390
404
|
wireType,
|
|
391
|
-
d
|
|
405
|
+
d,
|
|
392
406
|
);
|
|
393
407
|
}
|
|
394
408
|
}
|
|
395
409
|
return message;
|
|
396
410
|
}
|
|
411
|
+
|
|
397
412
|
internalBinaryWrite(
|
|
398
413
|
message: DownloadAPI_GetDownloadURL_Response,
|
|
399
414
|
writer: IBinaryWriter,
|
|
400
|
-
options: BinaryWriteOptions
|
|
415
|
+
options: BinaryWriteOptions,
|
|
401
416
|
): IBinaryWriter {
|
|
402
417
|
/* string download_url = 1; */
|
|
403
418
|
if (message.downloadUrl !== '')
|
|
@@ -407,14 +422,14 @@ class DownloadAPI_GetDownloadURL_Response$Type extends MessageType<DownloadAPI_G
|
|
|
407
422
|
DownloadAPI_GetDownloadURL_HTTPHeader.internalBinaryWrite(
|
|
408
423
|
message.headers[i],
|
|
409
424
|
writer.tag(2, WireType.LengthDelimited).fork(),
|
|
410
|
-
options
|
|
425
|
+
options,
|
|
411
426
|
).join();
|
|
412
|
-
|
|
427
|
+
const u = options.writeUnknownFields;
|
|
413
428
|
if (u !== false)
|
|
414
429
|
(u == true ? UnknownFieldHandler.onWrite : u)(
|
|
415
430
|
this.typeName,
|
|
416
431
|
message,
|
|
417
|
-
writer
|
|
432
|
+
writer,
|
|
418
433
|
);
|
|
419
434
|
return writer;
|
|
420
435
|
}
|
|
@@ -422,8 +437,8 @@ class DownloadAPI_GetDownloadURL_Response$Type extends MessageType<DownloadAPI_G
|
|
|
422
437
|
/**
|
|
423
438
|
* @generated MessageType for protobuf message MiLaboratories.Controller.Shared.DownloadAPI.GetDownloadURL.Response
|
|
424
439
|
*/
|
|
425
|
-
export const DownloadAPI_GetDownloadURL_Response
|
|
426
|
-
new DownloadAPI_GetDownloadURL_Response$Type();
|
|
440
|
+
export const DownloadAPI_GetDownloadURL_Response
|
|
441
|
+
= new DownloadAPI_GetDownloadURL_Response$Type();
|
|
427
442
|
/**
|
|
428
443
|
* @generated ServiceType for protobuf service MiLaboratories.Controller.Shared.Download
|
|
429
444
|
*/
|
|
@@ -433,10 +448,10 @@ export const Download = new ServiceType(
|
|
|
433
448
|
{
|
|
434
449
|
name: 'GetDownloadURL',
|
|
435
450
|
options: {
|
|
436
|
-
'google.api.http': { get: '/resources/{resource_id}/get-download-url' }
|
|
451
|
+
'google.api.http': { get: '/resources/{resource_id}/get-download-url' },
|
|
437
452
|
},
|
|
438
453
|
I: DownloadAPI_GetDownloadURL_Request,
|
|
439
|
-
O: DownloadAPI_GetDownloadURL_Response
|
|
440
|
-
}
|
|
441
|
-
]
|
|
454
|
+
O: DownloadAPI_GetDownloadURL_Response,
|
|
455
|
+
},
|
|
456
|
+
],
|
|
442
457
|
);
|
package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts
CHANGED
|
@@ -48,7 +48,7 @@ export class LSClient implements ILSClient, ServiceInfo {
|
|
|
48
48
|
*/
|
|
49
49
|
list(
|
|
50
50
|
input: LsAPI_List_Request,
|
|
51
|
-
options?: RpcOptions
|
|
51
|
+
options?: RpcOptions,
|
|
52
52
|
): UnaryCall<LsAPI_List_Request, LsAPI_List_Response> {
|
|
53
53
|
const method = this.methods[0],
|
|
54
54
|
opt = this._transport.mergeOptions(options);
|
|
@@ -57,7 +57,7 @@ export class LSClient implements ILSClient, ServiceInfo {
|
|
|
57
57
|
this._transport,
|
|
58
58
|
method,
|
|
59
59
|
opt,
|
|
60
|
-
input
|
|
60
|
+
input,
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
}
|