@milaboratories/pl-drivers 1.11.19 → 1.11.20
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.cjs +5 -5
- package/dist/clients/constructors.cjs.map +1 -1
- package/dist/clients/constructors.js +5 -5
- package/dist/clients/constructors.js.map +1 -1
- package/dist/clients/download.cjs +29 -5
- package/dist/clients/download.cjs.map +1 -1
- package/dist/clients/download.d.ts +5 -4
- package/dist/clients/download.d.ts.map +1 -1
- package/dist/clients/download.js +30 -6
- package/dist/clients/download.js.map +1 -1
- package/dist/clients/logs.cjs +57 -16
- package/dist/clients/logs.cjs.map +1 -1
- package/dist/clients/logs.d.ts +6 -5
- package/dist/clients/logs.d.ts.map +1 -1
- package/dist/clients/logs.js +58 -17
- package/dist/clients/logs.js.map +1 -1
- package/dist/clients/ls_api.cjs +44 -8
- package/dist/clients/ls_api.cjs.map +1 -1
- package/dist/clients/ls_api.d.ts +4 -4
- package/dist/clients/ls_api.d.ts.map +1 -1
- package/dist/clients/ls_api.js +45 -9
- package/dist/clients/ls_api.js.map +1 -1
- package/dist/clients/progress.cjs +32 -29
- package/dist/clients/progress.cjs.map +1 -1
- package/dist/clients/progress.d.ts +5 -5
- package/dist/clients/progress.d.ts.map +1 -1
- package/dist/clients/progress.js +33 -30
- package/dist/clients/progress.js.map +1 -1
- package/dist/clients/upload.cjs +96 -30
- package/dist/clients/upload.cjs.map +1 -1
- package/dist/clients/upload.d.ts +8 -11
- package/dist/clients/upload.d.ts.map +1 -1
- package/dist/clients/upload.js +97 -31
- package/dist/clients/upload.js.map +1 -1
- package/dist/drivers/download_blob/download_blob.cjs +2 -2
- package/dist/drivers/download_blob/download_blob.cjs.map +1 -1
- package/dist/drivers/download_blob/download_blob.js +1 -1
- package/dist/drivers/download_blob/download_blob.js.map +1 -1
- package/dist/drivers/download_blob/download_blob_task.cjs +5 -5
- package/dist/drivers/download_blob/download_blob_task.cjs.map +1 -1
- package/dist/drivers/download_blob/download_blob_task.js +2 -2
- package/dist/drivers/download_blob/download_blob_task.js.map +1 -1
- package/dist/drivers/download_blob_url/task.cjs +5 -5
- package/dist/drivers/download_blob_url/task.cjs.map +1 -1
- package/dist/drivers/download_blob_url/task.js +2 -2
- package/dist/drivers/download_blob_url/task.js.map +1 -1
- package/dist/drivers/download_url/task.cjs +2 -2
- package/dist/drivers/download_url/task.cjs.map +1 -1
- package/dist/drivers/download_url/task.js +2 -2
- package/dist/drivers/download_url/task.js.map +1 -1
- package/dist/drivers/logs_stream.cjs.map +1 -1
- package/dist/drivers/logs_stream.js.map +1 -1
- package/dist/helpers/download.cjs +5 -24
- package/dist/helpers/download.cjs.map +1 -1
- package/dist/helpers/download.d.ts +0 -13
- package/dist/helpers/download.d.ts.map +1 -1
- package/dist/helpers/download.js +5 -21
- package/dist/helpers/download.js.map +1 -1
- package/dist/helpers/download_errors.cjs +43 -0
- package/dist/helpers/download_errors.cjs.map +1 -0
- package/dist/helpers/download_errors.d.ts +23 -0
- package/dist/helpers/download_errors.d.ts.map +1 -0
- package/dist/helpers/download_errors.js +36 -0
- package/dist/helpers/download_errors.js.map +1 -0
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.cjs +2 -2
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.js.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.js +2 -2
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.js.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.cjs +2 -2
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.js.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.js +2 -2
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.js.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.cjs +3 -3
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.js.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.js +3 -3
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.js.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.cjs +6 -6
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.js.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.js +6 -6
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.js.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.cjs +84 -84
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.cjs.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.cjs.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts +16 -16
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts.map +1 -0
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.js.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts +118 -118
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts.map +1 -0
- package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.js +76 -76
- package/dist/proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.js.map +1 -0
- package/dist/proto-grpc/google/api/http.d.ts.map +1 -0
- package/dist/{proto → proto-grpc}/google/protobuf/descriptor.d.ts +5 -149
- package/dist/proto-grpc/google/protobuf/descriptor.d.ts.map +1 -0
- package/dist/proto-grpc/google/protobuf/duration.cjs.map +1 -0
- package/dist/proto-grpc/google/protobuf/duration.d.ts.map +1 -0
- package/dist/proto-grpc/google/protobuf/duration.js.map +1 -0
- package/dist/proto-grpc/google/protobuf/timestamp.cjs.map +1 -0
- package/dist/proto-grpc/google/protobuf/timestamp.d.ts.map +1 -0
- package/dist/proto-grpc/google/protobuf/timestamp.js.map +1 -0
- package/dist/proto-rest/downloadapi.d.ts +105 -0
- package/dist/proto-rest/downloadapi.d.ts.map +1 -0
- package/dist/proto-rest/index.d.ts +17 -0
- package/dist/proto-rest/index.d.ts.map +1 -0
- package/dist/proto-rest/lsapi.d.ts +148 -0
- package/dist/proto-rest/lsapi.d.ts.map +1 -0
- package/dist/proto-rest/progressapi.d.ts +159 -0
- package/dist/proto-rest/progressapi.d.ts.map +1 -0
- package/dist/proto-rest/streamingapi.d.ts +469 -0
- package/dist/proto-rest/streamingapi.d.ts.map +1 -0
- package/dist/proto-rest/uploadapi.d.ts +355 -0
- package/dist/proto-rest/uploadapi.d.ts.map +1 -0
- package/package.json +9 -5
- package/src/clients/constructors.ts +11 -11
- package/src/clients/download.ts +34 -11
- package/src/clients/logs.ts +69 -21
- package/src/clients/ls_api.ts +58 -14
- package/src/clients/progress.ts +41 -44
- package/src/clients/upload.ts +117 -53
- package/src/drivers/download_blob/download_blob.ts +1 -1
- package/src/drivers/download_blob/download_blob_task.ts +2 -2
- package/src/drivers/download_blob_url/task.ts +2 -2
- package/src/drivers/download_url/task.ts +2 -2
- package/src/drivers/logs_stream.ts +1 -1
- package/src/drivers/upload.test.ts +6 -25
- package/src/helpers/download.ts +4 -26
- package/src/helpers/download_errors.ts +40 -0
- package/src/index.ts +1 -0
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +1 -1
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +2 -2
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +1 -1
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +2 -2
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +1 -1
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +3 -3
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +1 -1
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +6 -6
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.ts +21 -21
- package/src/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.ts +159 -159
- package/src/{proto → proto-grpc}/google/api/http.ts +1 -1
- package/src/{proto → proto-grpc}/google/protobuf/descriptor.ts +9 -217
- package/src/{proto → proto-grpc}/google/protobuf/duration.ts +1 -1
- package/src/{proto → proto-grpc}/google/protobuf/timestamp.ts +1 -1
- package/src/proto-rest/downloadapi.ts +105 -0
- package/src/proto-rest/index.ts +28 -0
- package/src/proto-rest/lsapi.ts +148 -0
- package/src/proto-rest/progressapi.ts +159 -0
- package/src/proto-rest/streamingapi.ts +469 -0
- package/src/proto-rest/uploadapi.ts +355 -0
- package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts +0 -53
- package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.cjs.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.js.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +0 -329
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +0 -5358
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +0 -537
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +0 -87
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts +0 -106
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +0 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +0 -256
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +0 -1
- package/dist/proto/google/api/http.d.ts.map +0 -1
- package/dist/proto/google/protobuf/any.d.ts +0 -181
- package/dist/proto/google/protobuf/any.d.ts.map +0 -1
- package/dist/proto/google/protobuf/descriptor.d.ts.map +0 -1
- package/dist/proto/google/protobuf/duration.cjs.map +0 -1
- package/dist/proto/google/protobuf/duration.d.ts.map +0 -1
- package/dist/proto/google/protobuf/duration.js.map +0 -1
- package/dist/proto/google/protobuf/empty.d.ts +0 -32
- package/dist/proto/google/protobuf/empty.d.ts.map +0 -1
- package/dist/proto/google/protobuf/struct.d.ts +0 -187
- package/dist/proto/google/protobuf/struct.d.ts.map +0 -1
- package/dist/proto/google/protobuf/timestamp.cjs.map +0 -1
- package/dist/proto/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/proto/google/protobuf/timestamp.js.map +0 -1
- package/dist/proto/google/protobuf/wrappers.d.ts +0 -335
- package/dist/proto/google/protobuf/wrappers.d.ts.map +0 -1
- package/src/proto/github.com/googleapis/googleapis/google/rpc/status.ts +0 -125
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +0 -406
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.ts +0 -14986
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +0 -1474
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +0 -181
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/import.ts +0 -251
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +0 -693
- package/src/proto/google/protobuf/any.ts +0 -326
- package/src/proto/google/protobuf/empty.ts +0 -94
- package/src/proto/google/protobuf/struct.ts +0 -484
- package/src/proto/google/protobuf/wrappers.ts +0 -785
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.cjs +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.js +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.cjs +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.js +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.cjs +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.js +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.cjs +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.js +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.cjs +0 -0
- /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.js +0 -0
- /package/dist/{proto → proto-grpc}/google/api/http.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/google/protobuf/duration.cjs +0 -0
- /package/dist/{proto → proto-grpc}/google/protobuf/duration.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/google/protobuf/duration.js +0 -0
- /package/dist/{proto → proto-grpc}/google/protobuf/timestamp.cjs +0 -0
- /package/dist/{proto → proto-grpc}/google/protobuf/timestamp.d.ts +0 -0
- /package/dist/{proto → proto-grpc}/google/protobuf/timestamp.js +0 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/v1/upload/finalize": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
get?: never;
|
|
14
|
+
put?: never;
|
|
15
|
+
/**
|
|
16
|
+
* @description Finalize informs Controller that the upload process is done.
|
|
17
|
+
* Returns an error, if the total size of all uploaded chunks is not equal to
|
|
18
|
+
* size of the upload given in Init.
|
|
19
|
+
*/
|
|
20
|
+
post: operations["Upload_Finalize"];
|
|
21
|
+
delete?: never;
|
|
22
|
+
options?: never;
|
|
23
|
+
head?: never;
|
|
24
|
+
patch?: never;
|
|
25
|
+
trace?: never;
|
|
26
|
+
};
|
|
27
|
+
"/v1/upload/get-part-url": {
|
|
28
|
+
parameters: {
|
|
29
|
+
query?: never;
|
|
30
|
+
header?: never;
|
|
31
|
+
path?: never;
|
|
32
|
+
cookie?: never;
|
|
33
|
+
};
|
|
34
|
+
get?: never;
|
|
35
|
+
put?: never;
|
|
36
|
+
/**
|
|
37
|
+
* @description GetPartURL provides URL for uploading chunk of the data.
|
|
38
|
+
* Clients are expected to put their data directly to the given location.
|
|
39
|
+
*/
|
|
40
|
+
post: operations["Upload_GetPartURL"];
|
|
41
|
+
delete?: never;
|
|
42
|
+
options?: never;
|
|
43
|
+
head?: never;
|
|
44
|
+
patch?: never;
|
|
45
|
+
trace?: never;
|
|
46
|
+
};
|
|
47
|
+
"/v1/upload/init": {
|
|
48
|
+
parameters: {
|
|
49
|
+
query?: never;
|
|
50
|
+
header?: never;
|
|
51
|
+
path?: never;
|
|
52
|
+
cookie?: never;
|
|
53
|
+
};
|
|
54
|
+
get?: never;
|
|
55
|
+
put?: never;
|
|
56
|
+
/** @description Init upload, making controller to do all required preparation steps. */
|
|
57
|
+
post: operations["Upload_Init"];
|
|
58
|
+
delete?: never;
|
|
59
|
+
options?: never;
|
|
60
|
+
head?: never;
|
|
61
|
+
patch?: never;
|
|
62
|
+
trace?: never;
|
|
63
|
+
};
|
|
64
|
+
"/v1/upload/update-progress": {
|
|
65
|
+
parameters: {
|
|
66
|
+
query?: never;
|
|
67
|
+
header?: never;
|
|
68
|
+
path?: never;
|
|
69
|
+
cookie?: never;
|
|
70
|
+
};
|
|
71
|
+
get?: never;
|
|
72
|
+
put?: never;
|
|
73
|
+
/** @description UpdateProgress of the upload, so other clients can see how it is going. */
|
|
74
|
+
post: operations["Upload_UpdateProgress"];
|
|
75
|
+
delete?: never;
|
|
76
|
+
options?: never;
|
|
77
|
+
head?: never;
|
|
78
|
+
patch?: never;
|
|
79
|
+
trace?: never;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export type webhooks = Record<string, never>;
|
|
83
|
+
export interface components {
|
|
84
|
+
schemas: {
|
|
85
|
+
Finalize_Request: {
|
|
86
|
+
resourceId: string;
|
|
87
|
+
};
|
|
88
|
+
Finalize_Response: Record<string, never>;
|
|
89
|
+
GetPartURL_HTTPHeader: {
|
|
90
|
+
name: string;
|
|
91
|
+
value: string;
|
|
92
|
+
};
|
|
93
|
+
GetPartURL_Request: {
|
|
94
|
+
/** @description Id of upload resource */
|
|
95
|
+
resourceId: string;
|
|
96
|
+
/**
|
|
97
|
+
* @description Part to be uploaded. It is responsibility of the Client to watch after already uploaded parts:
|
|
98
|
+
* - client can request an URL for the same part twice (request -> request) without errors;
|
|
99
|
+
* - client can request an URL for alrady uploaded part (request -> upload -> request) without errors.
|
|
100
|
+
*
|
|
101
|
+
* Parts enumeration starts from 1.
|
|
102
|
+
*/
|
|
103
|
+
partNumber: string;
|
|
104
|
+
/**
|
|
105
|
+
* @description Size of the part uploaded by client earlier. Allows controller to count upload progress
|
|
106
|
+
* based on client's input.
|
|
107
|
+
* Client is free to never sent this value (send zeroes in each request).
|
|
108
|
+
*/
|
|
109
|
+
uploadedPartSize: string;
|
|
110
|
+
/**
|
|
111
|
+
* @description Do we need to presign URL for internal use.
|
|
112
|
+
* Controllers could use this if they are trying to download something from internal network.
|
|
113
|
+
* For backward compatibility, by default pl backend will presign external urls.
|
|
114
|
+
*/
|
|
115
|
+
isInternalUse: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* @description Checksum is not used for now, but it is here for case
|
|
118
|
+
* where signing checksum header is required.
|
|
119
|
+
*/
|
|
120
|
+
partChecksum: string;
|
|
121
|
+
};
|
|
122
|
+
GetPartURL_Response: {
|
|
123
|
+
/** @description URL for chunk upload */
|
|
124
|
+
uploadUrl: string;
|
|
125
|
+
/** @description HTTP method to use for chunk upload, say 'PUT' or 'POST'. */
|
|
126
|
+
method: string;
|
|
127
|
+
/**
|
|
128
|
+
* @description List of headers with their values, MANDATORY to be sent by the client for the upload.
|
|
129
|
+
* The destination service (the one, that will handle upload request for specific part)
|
|
130
|
+
* may reject the request if it would not keep the given headers.
|
|
131
|
+
*/
|
|
132
|
+
headers: components["schemas"]["GetPartURL_HTTPHeader"][];
|
|
133
|
+
/**
|
|
134
|
+
* @description The number of the _first_ byte in the chunk.
|
|
135
|
+
* Absolute position from the start of the file ( file.seek(<chunk_start>, SEEK_START) ).
|
|
136
|
+
* The client is expected to send [<chunk_start>; <chunk_end>) range.
|
|
137
|
+
*/
|
|
138
|
+
chunkStart: string;
|
|
139
|
+
/**
|
|
140
|
+
* @description The number of the byte _after_ the last to be sent in the chunk.
|
|
141
|
+
* Absolute position from the start of the file.
|
|
142
|
+
* The client is expected to send [<chunk_start>; <chunk_end>) range.
|
|
143
|
+
*/
|
|
144
|
+
chunkEnd: string;
|
|
145
|
+
};
|
|
146
|
+
/** @description Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. */
|
|
147
|
+
GoogleProtobufAny: {
|
|
148
|
+
/** @description The type of the serialized message. */
|
|
149
|
+
"@type": string;
|
|
150
|
+
} & {
|
|
151
|
+
[key: string]: unknown;
|
|
152
|
+
};
|
|
153
|
+
Init_Request: {
|
|
154
|
+
/** @description Id of upload resource */
|
|
155
|
+
resourceId: string;
|
|
156
|
+
};
|
|
157
|
+
Init_Response: {
|
|
158
|
+
/**
|
|
159
|
+
* @description Number of parts in this upload.
|
|
160
|
+
* For parallel upload support, client can generate any number of part upload URLs
|
|
161
|
+
* at the moment and upload them in parallel.
|
|
162
|
+
* <parts_count> keeps the number of chunks supported by this upload.
|
|
163
|
+
* The parts count is calculated from the planned size of the upload, controller
|
|
164
|
+
* configuration and underlying storage restrictions.
|
|
165
|
+
*/
|
|
166
|
+
partsCount: string;
|
|
167
|
+
partSize: string;
|
|
168
|
+
/**
|
|
169
|
+
* Format: enum
|
|
170
|
+
* @description Checksum algorithm to use for the part upload.
|
|
171
|
+
*/
|
|
172
|
+
checksumAlgorithm: number;
|
|
173
|
+
/** @description Header name to use for the checksum. */
|
|
174
|
+
checksumHeader: string;
|
|
175
|
+
/**
|
|
176
|
+
* @description List of IDs of parts that were already uploaded by client.
|
|
177
|
+
* Helps client to recover upload and skip already done parts
|
|
178
|
+
* after being interrupted in the middle of the upload
|
|
179
|
+
* (say, because of the restart).
|
|
180
|
+
* Parts enumeration starts from 1.
|
|
181
|
+
*/
|
|
182
|
+
uploadedParts: string[];
|
|
183
|
+
};
|
|
184
|
+
/** @description The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */
|
|
185
|
+
Status: {
|
|
186
|
+
/**
|
|
187
|
+
* Format: int32
|
|
188
|
+
* @description The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
|
|
189
|
+
*/
|
|
190
|
+
code: number;
|
|
191
|
+
/** @description A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. */
|
|
192
|
+
message: string;
|
|
193
|
+
/** @description A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
194
|
+
details: components["schemas"]["GoogleProtobufAny"][];
|
|
195
|
+
};
|
|
196
|
+
UpdateProgress_Request: {
|
|
197
|
+
/** @description Id of upload resource */
|
|
198
|
+
resourceId: string;
|
|
199
|
+
/**
|
|
200
|
+
* @description Amount of bytes, uploaded since the earlier call to UpdateProgress.
|
|
201
|
+
* This value is just blindly added to the 'bytes_processed' of progress report,
|
|
202
|
+
* so other clients can see the upload progress.
|
|
203
|
+
* If client uploads the data in several streams (several chunks in parallel), it
|
|
204
|
+
* can safely send progress updates individually for each of the streams, just counting
|
|
205
|
+
* bytes uploaded by particular stream.
|
|
206
|
+
*
|
|
207
|
+
* Negative value can be used to report about upload retry: when upload was interrupted,
|
|
208
|
+
* part of the uploaded data is lost and require re-upload.
|
|
209
|
+
*/
|
|
210
|
+
bytesProcessed: string;
|
|
211
|
+
};
|
|
212
|
+
UpdateProgress_Response: Record<string, never>;
|
|
213
|
+
};
|
|
214
|
+
responses: never;
|
|
215
|
+
parameters: never;
|
|
216
|
+
requestBodies: never;
|
|
217
|
+
headers: never;
|
|
218
|
+
pathItems: never;
|
|
219
|
+
}
|
|
220
|
+
export type $defs = Record<string, never>;
|
|
221
|
+
export interface operations {
|
|
222
|
+
Upload_Finalize: {
|
|
223
|
+
parameters: {
|
|
224
|
+
query?: never;
|
|
225
|
+
header?: never;
|
|
226
|
+
path?: never;
|
|
227
|
+
cookie?: never;
|
|
228
|
+
};
|
|
229
|
+
requestBody: {
|
|
230
|
+
content: {
|
|
231
|
+
"application/json": components["schemas"]["Finalize_Request"];
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
responses: {
|
|
235
|
+
/** @description OK */
|
|
236
|
+
200: {
|
|
237
|
+
headers: {
|
|
238
|
+
[name: string]: unknown;
|
|
239
|
+
};
|
|
240
|
+
content: {
|
|
241
|
+
"application/json": components["schemas"]["Finalize_Response"];
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
/** @description Default error response */
|
|
245
|
+
default: {
|
|
246
|
+
headers: {
|
|
247
|
+
[name: string]: unknown;
|
|
248
|
+
};
|
|
249
|
+
content: {
|
|
250
|
+
"application/json": components["schemas"]["Status"];
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
Upload_GetPartURL: {
|
|
256
|
+
parameters: {
|
|
257
|
+
query?: never;
|
|
258
|
+
header?: never;
|
|
259
|
+
path?: never;
|
|
260
|
+
cookie?: never;
|
|
261
|
+
};
|
|
262
|
+
requestBody: {
|
|
263
|
+
content: {
|
|
264
|
+
"application/json": components["schemas"]["GetPartURL_Request"];
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
responses: {
|
|
268
|
+
/** @description OK */
|
|
269
|
+
200: {
|
|
270
|
+
headers: {
|
|
271
|
+
[name: string]: unknown;
|
|
272
|
+
};
|
|
273
|
+
content: {
|
|
274
|
+
"application/json": components["schemas"]["GetPartURL_Response"];
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
/** @description Default error response */
|
|
278
|
+
default: {
|
|
279
|
+
headers: {
|
|
280
|
+
[name: string]: unknown;
|
|
281
|
+
};
|
|
282
|
+
content: {
|
|
283
|
+
"application/json": components["schemas"]["Status"];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
Upload_Init: {
|
|
289
|
+
parameters: {
|
|
290
|
+
query?: never;
|
|
291
|
+
header?: never;
|
|
292
|
+
path?: never;
|
|
293
|
+
cookie?: never;
|
|
294
|
+
};
|
|
295
|
+
requestBody: {
|
|
296
|
+
content: {
|
|
297
|
+
"application/json": components["schemas"]["Init_Request"];
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
responses: {
|
|
301
|
+
/** @description OK */
|
|
302
|
+
200: {
|
|
303
|
+
headers: {
|
|
304
|
+
[name: string]: unknown;
|
|
305
|
+
};
|
|
306
|
+
content: {
|
|
307
|
+
"application/json": components["schemas"]["Init_Response"];
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
/** @description Default error response */
|
|
311
|
+
default: {
|
|
312
|
+
headers: {
|
|
313
|
+
[name: string]: unknown;
|
|
314
|
+
};
|
|
315
|
+
content: {
|
|
316
|
+
"application/json": components["schemas"]["Status"];
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
Upload_UpdateProgress: {
|
|
322
|
+
parameters: {
|
|
323
|
+
query?: never;
|
|
324
|
+
header?: never;
|
|
325
|
+
path?: never;
|
|
326
|
+
cookie?: never;
|
|
327
|
+
};
|
|
328
|
+
requestBody: {
|
|
329
|
+
content: {
|
|
330
|
+
"application/json": components["schemas"]["UpdateProgress_Request"];
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
responses: {
|
|
334
|
+
/** @description OK */
|
|
335
|
+
200: {
|
|
336
|
+
headers: {
|
|
337
|
+
[name: string]: unknown;
|
|
338
|
+
};
|
|
339
|
+
content: {
|
|
340
|
+
"application/json": components["schemas"]["UpdateProgress_Response"];
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
/** @description Default error response */
|
|
344
|
+
default: {
|
|
345
|
+
headers: {
|
|
346
|
+
[name: string]: unknown;
|
|
347
|
+
};
|
|
348
|
+
content: {
|
|
349
|
+
"application/json": components["schemas"]["Status"];
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
//# sourceMappingURL=uploadapi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadapi.d.ts","sourceRoot":"","sources":["../../src/proto-rest/uploadapi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IAClB,qBAAqB,EAAE;QACnB,UAAU,EAAE;YACR,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAClB,CAAC;QACF,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ;;;;WAIG;QACH,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;QACpC,MAAM,CAAC,EAAE,KAAK,CAAC;QACf,OAAO,CAAC,EAAE,KAAK,CAAC;QAChB,IAAI,CAAC,EAAE,KAAK,CAAC;QACb,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,CAAC,EAAE,KAAK,CAAC;KACjB,CAAC;IACF,yBAAyB,EAAE;QACvB,UAAU,EAAE;YACR,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAClB,CAAC;QACF,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ;;;WAGG;QACH,IAAI,EAA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oBACL,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAC;iBACxE,CAAC;aACL,CAAC;YACF,0CAA0C;YAC1C,OAAO,EAAE;gBACL,OAAO,EAAE;oBACL,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;iBAC3B,CAAC;gBACF,OAAO,EAAE;oBACL,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;iBACvD,CAAC;aACL,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-drivers",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.20",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22"
|
|
6
6
|
},
|
|
@@ -28,18 +28,20 @@
|
|
|
28
28
|
"decompress": "^4.2.1",
|
|
29
29
|
"denque": "^2.1.0",
|
|
30
30
|
"tar-fs": "^3.0.9",
|
|
31
|
+
"openapi-fetch": "^0.15.0",
|
|
31
32
|
"undici": "~7.16.0",
|
|
32
33
|
"upath": "^2.0.1",
|
|
33
34
|
"zod": "~3.23.8",
|
|
34
|
-
"@milaboratories/helpers": "1.12.0",
|
|
35
35
|
"@milaboratories/computable": "2.7.4",
|
|
36
|
-
"@milaboratories/pl-model-common": "1.21.7",
|
|
37
|
-
"@milaboratories/pl-client": "2.16.8",
|
|
38
36
|
"@milaboratories/ts-helpers": "1.5.4",
|
|
37
|
+
"@milaboratories/pl-client": "2.16.8",
|
|
38
|
+
"@milaboratories/pl-model-common": "1.21.7",
|
|
39
|
+
"@milaboratories/helpers": "1.12.0",
|
|
39
40
|
"@milaboratories/pl-tree": "1.8.15"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@types/decompress": "^4.2.7",
|
|
44
|
+
"openapi-typescript": "^7.10.0",
|
|
43
45
|
"@types/node": "~24.5.2",
|
|
44
46
|
"@types/tar-fs": "^2.0.4",
|
|
45
47
|
"@vitest/coverage-v8": "^4.0.7",
|
|
@@ -49,13 +51,15 @@
|
|
|
49
51
|
"@milaboratories/eslint-config": "1.0.5",
|
|
50
52
|
"@milaboratories/build-configs": "1.0.8",
|
|
51
53
|
"@milaboratories/ts-builder": "1.0.5",
|
|
52
|
-
"@milaboratories/ts-configs": "1.0.6"
|
|
54
|
+
"@milaboratories/ts-configs": "1.0.6",
|
|
55
|
+
"@milaboratories/test-helpers": "1.1.1"
|
|
53
56
|
},
|
|
54
57
|
"scripts": {
|
|
55
58
|
"type-check": "ts-builder types --target node",
|
|
56
59
|
"build": "ts-builder build --target node",
|
|
57
60
|
"test": "vitest run --coverage",
|
|
58
61
|
"lint": "eslint .",
|
|
62
|
+
"update-proto": "./sync-proto.sh && ./generate-grpc.sh && ./generate-rest.sh",
|
|
59
63
|
"do-pack": "rm -f *.tgz && pnpm pack && mv *.tgz package.tgz"
|
|
60
64
|
}
|
|
61
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WireClientProviderFactory, PlClient } from '@milaboratories/pl-client';
|
|
2
2
|
import type { MiLogger } from '@milaboratories/ts-helpers';
|
|
3
3
|
import type { Dispatcher } from 'undici';
|
|
4
4
|
import { ClientDownload } from './download';
|
|
@@ -15,39 +15,39 @@ export function createDownloadClient(
|
|
|
15
15
|
) {
|
|
16
16
|
return client.getDriver({
|
|
17
17
|
name: 'DownloadBlob',
|
|
18
|
-
init: (_: PlClient,
|
|
19
|
-
new ClientDownload(
|
|
18
|
+
init: (_: PlClient, wireClientFactory: WireClientProviderFactory, httpDispatcher: Dispatcher) =>
|
|
19
|
+
new ClientDownload(wireClientFactory, httpDispatcher, logger, localProjections),
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export function createLogsClient(client: PlClient, logger: MiLogger) {
|
|
24
24
|
return client.getDriver({
|
|
25
25
|
name: 'StreamLogs',
|
|
26
|
-
init: (_: PlClient,
|
|
27
|
-
new ClientLogs(
|
|
26
|
+
init: (_: PlClient, wireClientFactory: WireClientProviderFactory, httpDispatcher: Dispatcher) =>
|
|
27
|
+
new ClientLogs(wireClientFactory, httpDispatcher, logger),
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export function createUploadProgressClient(client: PlClient, logger: MiLogger) {
|
|
32
32
|
return client.getDriver({
|
|
33
33
|
name: 'UploadProgress',
|
|
34
|
-
init: (_: PlClient,
|
|
35
|
-
new ClientProgress(
|
|
34
|
+
init: (_: PlClient, wireClientFactory: WireClientProviderFactory, httpDispatcher: Dispatcher) =>
|
|
35
|
+
new ClientProgress(wireClientFactory, httpDispatcher, client, logger),
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export function createUploadBlobClient(client: PlClient, logger: MiLogger) {
|
|
40
40
|
return client.getDriver({
|
|
41
41
|
name: 'UploadBlob',
|
|
42
|
-
init: (_: PlClient,
|
|
43
|
-
new ClientUpload(
|
|
42
|
+
init: (_: PlClient, wireClientFactory: WireClientProviderFactory, httpDispatcher: Dispatcher) =>
|
|
43
|
+
new ClientUpload(wireClientFactory, httpDispatcher, client, logger),
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export function createLsFilesClient(client: PlClient, logger: MiLogger) {
|
|
48
48
|
return client.getDriver({
|
|
49
49
|
name: 'LsFiles',
|
|
50
|
-
init: (_client: PlClient,
|
|
51
|
-
new ClientLs(
|
|
50
|
+
init: (_client: PlClient, wireClientFactory: WireClientProviderFactory, _httpDispatcher: Dispatcher) =>
|
|
51
|
+
new ClientLs(wireClientFactory, logger),
|
|
52
52
|
});
|
|
53
53
|
}
|
package/src/clients/download.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable n/no-unsupported-features/node-builtins */
|
|
2
|
-
import type {
|
|
3
|
-
import { addRTypeToMetadata, stringifyWithResourceId } from '@milaboratories/pl-client';
|
|
2
|
+
import type { WireClientProvider, WireClientProviderFactory } from '@milaboratories/pl-client';
|
|
3
|
+
import { addRTypeToMetadata, stringifyWithResourceId, RestAPI, createRTypeRoutingHeader } from '@milaboratories/pl-client';
|
|
4
4
|
import type { ResourceInfo } from '@milaboratories/pl-tree';
|
|
5
5
|
import { PerfTimer } from '@milaboratories/helpers';
|
|
6
6
|
import type { MiLogger } from '@milaboratories/ts-helpers';
|
|
@@ -14,14 +14,15 @@ import type { Dispatcher } from 'undici';
|
|
|
14
14
|
import type { LocalStorageProjection } from '../drivers/types';
|
|
15
15
|
import { type ContentHandler, RemoteFileDownloader } from '../helpers/download';
|
|
16
16
|
import { validateAbsolute } from '../helpers/validate';
|
|
17
|
-
import type { DownloadAPI_GetDownloadURL_Response } from '../proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol';
|
|
18
|
-
import { DownloadClient } from '../proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client';
|
|
17
|
+
import type { DownloadAPI_GetDownloadURL_Response } from '../proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol';
|
|
18
|
+
import { DownloadClient } from '../proto-grpc/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client';
|
|
19
|
+
import type { DownloadApiPaths, DownloadRestClientType } from '../proto-rest';
|
|
19
20
|
import { type GetContentOptions } from '@milaboratories/pl-model-common';
|
|
20
21
|
|
|
21
22
|
/** Gets URLs for downloading from pl-core, parses them and reads or downloads
|
|
22
23
|
* files locally and from the web. */
|
|
23
24
|
export class ClientDownload {
|
|
24
|
-
public readonly
|
|
25
|
+
public readonly wire: WireClientProvider<DownloadRestClientType | DownloadClient>;
|
|
25
26
|
private readonly remoteFileDownloader: RemoteFileDownloader;
|
|
26
27
|
|
|
27
28
|
/** Helps to find a storage root directory by a storage id from URL scheme. */
|
|
@@ -31,13 +32,24 @@ export class ClientDownload {
|
|
|
31
32
|
private readonly localFileReadLimiter = new ConcurrencyLimitingExecutor(32);
|
|
32
33
|
|
|
33
34
|
constructor(
|
|
34
|
-
|
|
35
|
+
wireClientProviderFactory: WireClientProviderFactory,
|
|
35
36
|
public readonly httpClient: Dispatcher,
|
|
36
37
|
public readonly logger: MiLogger,
|
|
37
38
|
/** Pl storages available locally */
|
|
38
39
|
localProjections: LocalStorageProjection[],
|
|
39
40
|
) {
|
|
40
|
-
this.
|
|
41
|
+
this.wire = wireClientProviderFactory.createWireClientProvider((wireConn) => {
|
|
42
|
+
if (wireConn.type === 'grpc') {
|
|
43
|
+
return new DownloadClient(wireConn.Transport);
|
|
44
|
+
} else {
|
|
45
|
+
return RestAPI.createClient<DownloadApiPaths>({
|
|
46
|
+
hostAndPort: wireConn.Config.hostAndPort,
|
|
47
|
+
ssl: wireConn.Config.ssl,
|
|
48
|
+
dispatcher: wireConn.Dispatcher,
|
|
49
|
+
middlewares: wireConn.Middlewares,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
});
|
|
41
53
|
this.remoteFileDownloader = new RemoteFileDownloader(httpClient);
|
|
42
54
|
this.localStorageIdsToRoot = newLocalStorageIdsToRoot(localProjections);
|
|
43
55
|
}
|
|
@@ -120,10 +132,21 @@ export class ClientDownload {
|
|
|
120
132
|
const withAbort = options ?? {};
|
|
121
133
|
withAbort.abort = signal;
|
|
122
134
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
135
|
+
const client = this.wire.get();
|
|
136
|
+
if (client instanceof DownloadClient) {
|
|
137
|
+
return await client.getDownloadURL(
|
|
138
|
+
{ resourceId: id, isInternalUse: false },
|
|
139
|
+
addRTypeToMetadata(type, withAbort),
|
|
140
|
+
).response;
|
|
141
|
+
} else {
|
|
142
|
+
return (await client.POST('/v1/get-download-url', {
|
|
143
|
+
body: {
|
|
144
|
+
resourceId: id.toString(),
|
|
145
|
+
isInternalUse: false,
|
|
146
|
+
},
|
|
147
|
+
headers: { ...createRTypeRoutingHeader(type) },
|
|
148
|
+
})).data!;
|
|
149
|
+
}
|
|
127
150
|
}
|
|
128
151
|
}
|
|
129
152
|
|