@milaboratories/pl-drivers 1.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +18 -0
  2. package/dist/clients/download.d.ts +30 -0
  3. package/dist/clients/download.d.ts.map +1 -0
  4. package/dist/clients/helpers.d.ts +14 -0
  5. package/dist/clients/helpers.d.ts.map +1 -0
  6. package/dist/clients/logs.d.ts +26 -0
  7. package/dist/clients/logs.d.ts.map +1 -0
  8. package/dist/clients/ls_api.d.ts +13 -0
  9. package/dist/clients/ls_api.d.ts.map +1 -0
  10. package/dist/clients/progress.d.ts +25 -0
  11. package/dist/clients/progress.d.ts.map +1 -0
  12. package/dist/clients/upload.d.ts +38 -0
  13. package/dist/clients/upload.d.ts.map +1 -0
  14. package/dist/drivers/download_and_logs_blob.d.ts +106 -0
  15. package/dist/drivers/download_and_logs_blob.d.ts.map +1 -0
  16. package/dist/drivers/download_url.d.ts +70 -0
  17. package/dist/drivers/download_url.d.ts.map +1 -0
  18. package/dist/drivers/helpers/files_cache.d.ts +28 -0
  19. package/dist/drivers/helpers/files_cache.d.ts.map +1 -0
  20. package/dist/drivers/helpers/helpers.d.ts +34 -0
  21. package/dist/drivers/helpers/helpers.d.ts.map +1 -0
  22. package/dist/drivers/helpers/ls_list_entry.d.ts +49 -0
  23. package/dist/drivers/helpers/ls_list_entry.d.ts.map +1 -0
  24. package/dist/drivers/helpers/ls_storage_entry.d.ts +25 -0
  25. package/dist/drivers/helpers/ls_storage_entry.d.ts.map +1 -0
  26. package/dist/drivers/helpers/polling_ops.d.ts +8 -0
  27. package/dist/drivers/helpers/polling_ops.d.ts.map +1 -0
  28. package/dist/drivers/helpers/test_helpers.d.ts +2 -0
  29. package/dist/drivers/helpers/test_helpers.d.ts.map +1 -0
  30. package/dist/drivers/logs.d.ts +29 -0
  31. package/dist/drivers/logs.d.ts.map +1 -0
  32. package/dist/drivers/logs_stream.d.ts +50 -0
  33. package/dist/drivers/logs_stream.d.ts.map +1 -0
  34. package/dist/drivers/ls.d.ts +30 -0
  35. package/dist/drivers/ls.d.ts.map +1 -0
  36. package/dist/drivers/upload.d.ts +87 -0
  37. package/dist/drivers/upload.d.ts.map +1 -0
  38. package/dist/helpers/download.d.ts +15 -0
  39. package/dist/helpers/download.d.ts.map +1 -0
  40. package/dist/index.cjs +2 -0
  41. package/dist/index.cjs.map +1 -0
  42. package/dist/index.d.ts +15 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +4627 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +36 -0
  47. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -0
  48. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +103 -0
  49. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -0
  50. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +42 -0
  51. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -0
  52. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +165 -0
  53. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -0
  54. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +44 -0
  55. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -0
  56. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +171 -0
  57. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -0
  58. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +122 -0
  59. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -0
  60. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +315 -0
  61. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -0
  62. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts +98 -0
  63. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts.map +1 -0
  64. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts +337 -0
  65. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts.map +1 -0
  66. package/dist/proto/google/api/http.d.ts +451 -0
  67. package/dist/proto/google/api/http.d.ts.map +1 -0
  68. package/dist/proto/google/protobuf/descriptor.d.ts +1646 -0
  69. package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -0
  70. package/dist/proto/google/protobuf/duration.d.ts +106 -0
  71. package/dist/proto/google/protobuf/duration.d.ts.map +1 -0
  72. package/dist/proto/google/protobuf/timestamp.d.ts +151 -0
  73. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -0
  74. package/package.json +47 -0
  75. package/src/clients/download.test.ts +45 -0
  76. package/src/clients/download.ts +106 -0
  77. package/src/clients/helpers.ts +84 -0
  78. package/src/clients/logs.ts +68 -0
  79. package/src/clients/ls_api.ts +34 -0
  80. package/src/clients/progress.ts +86 -0
  81. package/src/clients/upload.test.ts +30 -0
  82. package/src/clients/upload.ts +199 -0
  83. package/src/drivers/download_and_logs_blob.ts +801 -0
  84. package/src/drivers/download_blob.test.ts +223 -0
  85. package/src/drivers/download_url.test.ts +90 -0
  86. package/src/drivers/download_url.ts +314 -0
  87. package/src/drivers/helpers/files_cache.test.ts +79 -0
  88. package/src/drivers/helpers/files_cache.ts +74 -0
  89. package/src/drivers/helpers/helpers.ts +136 -0
  90. package/src/drivers/helpers/ls_list_entry.test.ts +57 -0
  91. package/src/drivers/helpers/ls_list_entry.ts +152 -0
  92. package/src/drivers/helpers/ls_storage_entry.ts +135 -0
  93. package/src/drivers/helpers/polling_ops.ts +7 -0
  94. package/src/drivers/helpers/test_helpers.ts +5 -0
  95. package/src/drivers/logs.test.ts +337 -0
  96. package/src/drivers/logs.ts +214 -0
  97. package/src/drivers/logs_stream.ts +399 -0
  98. package/src/drivers/ls.test.ts +90 -0
  99. package/src/drivers/ls.ts +147 -0
  100. package/src/drivers/upload.test.ts +454 -0
  101. package/src/drivers/upload.ts +499 -0
  102. package/src/helpers/download.ts +43 -0
  103. package/src/index.ts +15 -0
  104. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +60 -0
  105. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +442 -0
  106. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +63 -0
  107. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +503 -0
  108. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +84 -0
  109. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +697 -0
  110. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +212 -0
  111. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +1036 -0
  112. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.ts +170 -0
  113. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.ts +1201 -0
  114. package/src/proto/google/api/http.ts +838 -0
  115. package/src/proto/google/protobuf/descriptor.ts +5173 -0
  116. package/src/proto/google/protobuf/duration.ts +272 -0
  117. package/src/proto/google/protobuf/timestamp.ts +354 -0
@@ -0,0 +1,212 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
2
+ // @generated from protobuf file "github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.proto" (package "MiLaboratories.Controller.Shared", syntax proto3)
3
+ // tslint:disable
4
+ import type { RpcTransport } from '@protobuf-ts/runtime-rpc';
5
+ import type { ServiceInfo } from '@protobuf-ts/runtime-rpc';
6
+ import { Streaming } from './protocol';
7
+ import type { StreamingAPI_LastLines } from './protocol';
8
+ import type { StreamingAPI_ReadText } from './protocol';
9
+ import type { StreamingAPI_StreamText } from './protocol';
10
+ import type { StreamingAPI_ReadBinary } from './protocol';
11
+ import type { UnaryCall } from '@protobuf-ts/runtime-rpc';
12
+ import { stackIntercept } from '@protobuf-ts/runtime-rpc';
13
+ import type { StreamingAPI_Response } from './protocol';
14
+ import type { StreamingAPI_StreamBinary } from './protocol';
15
+ import type { ServerStreamingCall } from '@protobuf-ts/runtime-rpc';
16
+ import type { RpcOptions } from '@protobuf-ts/runtime-rpc';
17
+ /**
18
+ *
19
+ * Streaming provides access to online data stream from item in storage. Whenever item is appended with data,
20
+ * the caller receives this fresh data in stream from server.
21
+ *
22
+ *
23
+ * @generated from protobuf service MiLaboratories.Controller.Shared.Streaming
24
+ */
25
+ export interface IStreamingClient {
26
+ /**
27
+ * StreamBinary provides stream of binary file. Each response message keeps
28
+ * one single chunk of binary data from data source. See StreamingAPI.Binary message
29
+ * for more info on available options.
30
+ *
31
+ * @generated from protobuf rpc: StreamBinary(MiLaboratories.Controller.Shared.StreamingAPI.StreamBinary) returns (stream MiLaboratories.Controller.Shared.StreamingAPI.Response);
32
+ */
33
+ streamBinary(
34
+ input: StreamingAPI_StreamBinary,
35
+ options?: RpcOptions
36
+ ): ServerStreamingCall<StreamingAPI_StreamBinary, StreamingAPI_Response>;
37
+ /**
38
+ * ReadBinary allows to read remote item in chunks using stream-like API.
39
+ * The difference to StreamBinary is that the client receives single response for each
40
+ * call and has to send new calls to the server to get fresh data from remote item.
41
+ * Each response (each chunk from server) keeps not more than 3.9MiB of data.
42
+ *
43
+ * @generated from protobuf rpc: ReadBinary(MiLaboratories.Controller.Shared.StreamingAPI.ReadBinary) returns (MiLaboratories.Controller.Shared.StreamingAPI.Response);
44
+ */
45
+ readBinary(
46
+ input: StreamingAPI_ReadBinary,
47
+ options?: RpcOptions
48
+ ): UnaryCall<StreamingAPI_ReadBinary, StreamingAPI_Response>;
49
+ /**
50
+ * StreamText provides stream of textual file, splitting the data by newline symbol.
51
+ * Each response message keeps one single line of text from data source.
52
+ *
53
+ * @generated from protobuf rpc: StreamText(MiLaboratories.Controller.Shared.StreamingAPI.StreamText) returns (stream MiLaboratories.Controller.Shared.StreamingAPI.Response);
54
+ */
55
+ streamText(
56
+ input: StreamingAPI_StreamText,
57
+ options?: RpcOptions
58
+ ): ServerStreamingCall<StreamingAPI_StreamText, StreamingAPI_Response>;
59
+ /**
60
+ * ReadBinary allows to read remote item in chunks using stream-like API.
61
+ * The difference to StreamBinary is that the client receives single response for each
62
+ * call and has to send new calls to the server to get fresh data from remote item.
63
+ * Each response (each chunk from server) keeps not more than 3.9MiB of data.
64
+ *
65
+ * @generated from protobuf rpc: ReadText(MiLaboratories.Controller.Shared.StreamingAPI.ReadText) returns (MiLaboratories.Controller.Shared.StreamingAPI.Response);
66
+ */
67
+ readText(
68
+ input: StreamingAPI_ReadText,
69
+ options?: RpcOptions
70
+ ): UnaryCall<StreamingAPI_ReadText, StreamingAPI_Response>;
71
+ /**
72
+ * LastLines provides single message with the last lines from data source.
73
+ * When search pattern is specified, the last lines matching the given pattern are returned.
74
+ * The lines are returned in reversed order, as server reads data source from the end.
75
+ * Consider it as equivalent to 'tac <file> | grep <search> | head -n <line_count>'
76
+ * The <new_offset> returned in the response points to the _beginning_ of the last
77
+ * line found, so client can continue reading the file backwards in subsequent calls.
78
+ * This means, that use of this <new_offset> in ReadText() will return you the same line
79
+ * returned last in LastLines() data.
80
+ *
81
+ * @generated from protobuf rpc: LastLines(MiLaboratories.Controller.Shared.StreamingAPI.LastLines) returns (MiLaboratories.Controller.Shared.StreamingAPI.Response);
82
+ */
83
+ lastLines(
84
+ input: StreamingAPI_LastLines,
85
+ options?: RpcOptions
86
+ ): UnaryCall<StreamingAPI_LastLines, StreamingAPI_Response>;
87
+ }
88
+ /**
89
+ *
90
+ * Streaming provides access to online data stream from item in storage. Whenever item is appended with data,
91
+ * the caller receives this fresh data in stream from server.
92
+ *
93
+ *
94
+ * @generated from protobuf service MiLaboratories.Controller.Shared.Streaming
95
+ */
96
+ export class StreamingClient implements IStreamingClient, ServiceInfo {
97
+ typeName = Streaming.typeName;
98
+ methods = Streaming.methods;
99
+ options = Streaming.options;
100
+ constructor(private readonly _transport: RpcTransport) {}
101
+ /**
102
+ * StreamBinary provides stream of binary file. Each response message keeps
103
+ * one single chunk of binary data from data source. See StreamingAPI.Binary message
104
+ * for more info on available options.
105
+ *
106
+ * @generated from protobuf rpc: StreamBinary(MiLaboratories.Controller.Shared.StreamingAPI.StreamBinary) returns (stream MiLaboratories.Controller.Shared.StreamingAPI.Response);
107
+ */
108
+ streamBinary(
109
+ input: StreamingAPI_StreamBinary,
110
+ options?: RpcOptions
111
+ ): ServerStreamingCall<StreamingAPI_StreamBinary, StreamingAPI_Response> {
112
+ const method = this.methods[0],
113
+ opt = this._transport.mergeOptions(options);
114
+ return stackIntercept<StreamingAPI_StreamBinary, StreamingAPI_Response>(
115
+ 'serverStreaming',
116
+ this._transport,
117
+ method,
118
+ opt,
119
+ input
120
+ );
121
+ }
122
+ /**
123
+ * ReadBinary allows to read remote item in chunks using stream-like API.
124
+ * The difference to StreamBinary is that the client receives single response for each
125
+ * call and has to send new calls to the server to get fresh data from remote item.
126
+ * Each response (each chunk from server) keeps not more than 3.9MiB of data.
127
+ *
128
+ * @generated from protobuf rpc: ReadBinary(MiLaboratories.Controller.Shared.StreamingAPI.ReadBinary) returns (MiLaboratories.Controller.Shared.StreamingAPI.Response);
129
+ */
130
+ readBinary(
131
+ input: StreamingAPI_ReadBinary,
132
+ options?: RpcOptions
133
+ ): UnaryCall<StreamingAPI_ReadBinary, StreamingAPI_Response> {
134
+ const method = this.methods[1],
135
+ opt = this._transport.mergeOptions(options);
136
+ return stackIntercept<StreamingAPI_ReadBinary, StreamingAPI_Response>(
137
+ 'unary',
138
+ this._transport,
139
+ method,
140
+ opt,
141
+ input
142
+ );
143
+ }
144
+ /**
145
+ * StreamText provides stream of textual file, splitting the data by newline symbol.
146
+ * Each response message keeps one single line of text from data source.
147
+ *
148
+ * @generated from protobuf rpc: StreamText(MiLaboratories.Controller.Shared.StreamingAPI.StreamText) returns (stream MiLaboratories.Controller.Shared.StreamingAPI.Response);
149
+ */
150
+ streamText(
151
+ input: StreamingAPI_StreamText,
152
+ options?: RpcOptions
153
+ ): ServerStreamingCall<StreamingAPI_StreamText, StreamingAPI_Response> {
154
+ const method = this.methods[2],
155
+ opt = this._transport.mergeOptions(options);
156
+ return stackIntercept<StreamingAPI_StreamText, StreamingAPI_Response>(
157
+ 'serverStreaming',
158
+ this._transport,
159
+ method,
160
+ opt,
161
+ input
162
+ );
163
+ }
164
+ /**
165
+ * ReadBinary allows to read remote item in chunks using stream-like API.
166
+ * The difference to StreamBinary is that the client receives single response for each
167
+ * call and has to send new calls to the server to get fresh data from remote item.
168
+ * Each response (each chunk from server) keeps not more than 3.9MiB of data.
169
+ *
170
+ * @generated from protobuf rpc: ReadText(MiLaboratories.Controller.Shared.StreamingAPI.ReadText) returns (MiLaboratories.Controller.Shared.StreamingAPI.Response);
171
+ */
172
+ readText(
173
+ input: StreamingAPI_ReadText,
174
+ options?: RpcOptions
175
+ ): UnaryCall<StreamingAPI_ReadText, StreamingAPI_Response> {
176
+ const method = this.methods[3],
177
+ opt = this._transport.mergeOptions(options);
178
+ return stackIntercept<StreamingAPI_ReadText, StreamingAPI_Response>(
179
+ 'unary',
180
+ this._transport,
181
+ method,
182
+ opt,
183
+ input
184
+ );
185
+ }
186
+ /**
187
+ * LastLines provides single message with the last lines from data source.
188
+ * When search pattern is specified, the last lines matching the given pattern are returned.
189
+ * The lines are returned in reversed order, as server reads data source from the end.
190
+ * Consider it as equivalent to 'tac <file> | grep <search> | head -n <line_count>'
191
+ * The <new_offset> returned in the response points to the _beginning_ of the last
192
+ * line found, so client can continue reading the file backwards in subsequent calls.
193
+ * This means, that use of this <new_offset> in ReadText() will return you the same line
194
+ * returned last in LastLines() data.
195
+ *
196
+ * @generated from protobuf rpc: LastLines(MiLaboratories.Controller.Shared.StreamingAPI.LastLines) returns (MiLaboratories.Controller.Shared.StreamingAPI.Response);
197
+ */
198
+ lastLines(
199
+ input: StreamingAPI_LastLines,
200
+ options?: RpcOptions
201
+ ): UnaryCall<StreamingAPI_LastLines, StreamingAPI_Response> {
202
+ const method = this.methods[4],
203
+ opt = this._transport.mergeOptions(options);
204
+ return stackIntercept<StreamingAPI_LastLines, StreamingAPI_Response>(
205
+ 'unary',
206
+ this._transport,
207
+ method,
208
+ opt,
209
+ input
210
+ );
211
+ }
212
+ }