@distilled.cloud/steel 0.0.0 → 1.0.0-rc.19
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/LICENSE +201 -0
- package/README.md +66 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +24 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +42 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.lazy.js +7 -0
- package/lib/index.lazy.js.map +1 -0
- package/lib/pagination.d.ts +10 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +50 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/api_keys.d.ts +63 -0
- package/lib/services/api_keys.d.ts.map +1 -0
- package/lib/services/api_keys.js +2 -0
- package/lib/services/api_keys.js.map +1 -0
- package/lib/services/auth.d.ts +32 -0
- package/lib/services/auth.d.ts.map +1 -0
- package/lib/services/auth.js +2 -0
- package/lib/services/auth.js.map +1 -0
- package/lib/services/browser_tools.d.ts +166 -0
- package/lib/services/browser_tools.d.ts.map +1 -0
- package/lib/services/browser_tools.js +2 -0
- package/lib/services/browser_tools.js.map +1 -0
- package/lib/services/captchas.d.ts +72 -0
- package/lib/services/captchas.d.ts.map +1 -0
- package/lib/services/captchas.js +2 -0
- package/lib/services/captchas.js.map +1 -0
- package/lib/services/credentials.d.ts +127 -0
- package/lib/services/credentials.d.ts.map +1 -0
- package/lib/services/credentials.js +2 -0
- package/lib/services/credentials.js.map +1 -0
- package/lib/services/extensions.d.ts +122 -0
- package/lib/services/extensions.d.ts.map +1 -0
- package/lib/services/extensions.js +2 -0
- package/lib/services/extensions.js.map +1 -0
- package/lib/services/files.d.ts +144 -0
- package/lib/services/files.d.ts.map +1 -0
- package/lib/services/files.js +2 -0
- package/lib/services/files.js.map +1 -0
- package/lib/services/index.d.ts +11 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +10 -0
- package/lib/services/profiles.d.ts +422 -0
- package/lib/services/profiles.d.ts.map +1 -0
- package/lib/services/profiles.js +2 -0
- package/lib/services/profiles.js.map +1 -0
- package/lib/services/projects.d.ts +50 -0
- package/lib/services/projects.d.ts.map +1 -0
- package/lib/services/projects.js +2 -0
- package/lib/services/projects.js.map +1 -0
- package/lib/services/sessions.d.ts +1977 -0
- package/lib/services/sessions.d.ts.map +1 -0
- package/lib/services/sessions.js +44 -0
- package/lib/services/sessions.js.map +1 -0
- package/lib/services.lazy/api_keys.js +1 -0
- package/lib/services.lazy/auth.js +1 -0
- package/lib/services.lazy/browser_tools.js +1 -0
- package/lib/services.lazy/captchas.js +1 -0
- package/lib/services.lazy/credentials.js +1 -0
- package/lib/services.lazy/extensions.js +1 -0
- package/lib/services.lazy/files.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/profiles.js +1 -0
- package/lib/services.lazy/projects.js +1 -0
- package/lib/services.lazy/sessions.js +4 -0
- package/lib/traits.d.ts +11 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/package.json +82 -2
- package/src/credentials.ts +63 -0
- package/src/errors.ts +51 -0
- package/src/index.ts +25 -0
- package/src/pagination.ts +9 -0
- package/src/protocol.ts +77 -0
- package/src/retry.ts +69 -0
- package/src/services/api_keys.ts +124 -0
- package/src/services/auth.ts +101 -0
- package/src/services/browser_tools.ts +338 -0
- package/src/services/captchas.ts +216 -0
- package/src/services/credentials.ts +292 -0
- package/src/services/extensions.ts +338 -0
- package/src/services/files.ts +456 -0
- package/src/services/index.ts +11 -0
- package/src/services/profiles.ts +871 -0
- package/src/services/projects.ts +146 -0
- package/src/services/sessions.ts +4515 -0
- package/src/traits.ts +46 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-steel/specs/openapi.json). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import { UnknownSteelError } from "../errors.ts";
|
|
7
|
+
import { SteelProtocol, type SteelOpError, type SteelOpContext } from "../protocol.ts";
|
|
8
|
+
import * as Retry from "../retry.ts";
|
|
9
|
+
import * as T from "../traits.ts";
|
|
10
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
11
|
+
const __s: any[] = [];
|
|
12
|
+
|
|
13
|
+
export type { SteelOpError, SteelOpContext };
|
|
14
|
+
|
|
15
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
16
|
+
const TELEMETRY = {
|
|
17
|
+
system: "steel-api",
|
|
18
|
+
responseHeaders: [
|
|
19
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
20
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
21
|
+
],
|
|
22
|
+
prefix: "Steel",
|
|
23
|
+
service: "Files",
|
|
24
|
+
labels: "steel",
|
|
25
|
+
propagate: "w3c",
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
export class BadRequest
|
|
29
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
30
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
31
|
+
code: S.Number,
|
|
32
|
+
message: S.String,
|
|
33
|
+
}).pipe(C.withBadRequestError),
|
|
34
|
+
[{ status: 400 }],
|
|
35
|
+
) {}
|
|
36
|
+
|
|
37
|
+
export class Conflict
|
|
38
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
39
|
+
/*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
|
|
40
|
+
code: S.Number,
|
|
41
|
+
message: S.String,
|
|
42
|
+
}).pipe(C.withConflictError),
|
|
43
|
+
[{ status: 409 }],
|
|
44
|
+
) {}
|
|
45
|
+
|
|
46
|
+
export class NotFound
|
|
47
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
48
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
49
|
+
code: S.Number,
|
|
50
|
+
message: S.String,
|
|
51
|
+
}).pipe(C.withBadRequestError),
|
|
52
|
+
[{ status: 404 }],
|
|
53
|
+
) {}
|
|
54
|
+
|
|
55
|
+
export class UnsupportedMediaType
|
|
56
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
57
|
+
/*@__PURE__*/ S.TaggedError<UnsupportedMediaType>()("UnsupportedMediaType", {
|
|
58
|
+
code: S.Number,
|
|
59
|
+
message: S.String,
|
|
60
|
+
}).pipe(C.withBadRequestError),
|
|
61
|
+
[{ status: 415 }],
|
|
62
|
+
) {}
|
|
63
|
+
|
|
64
|
+
export interface DeleteAllFilesRequest {
|
|
65
|
+
sessionId: string;
|
|
66
|
+
}
|
|
67
|
+
export interface DeleteAllFilesResponse {}
|
|
68
|
+
export interface DeleteFileRequest {
|
|
69
|
+
sessionId: string;
|
|
70
|
+
path: string;
|
|
71
|
+
}
|
|
72
|
+
export interface DeleteFileResponse {}
|
|
73
|
+
export interface DeleteGlobalFileRequest {
|
|
74
|
+
path: string;
|
|
75
|
+
}
|
|
76
|
+
export interface DeleteGlobalFileResponse {}
|
|
77
|
+
export interface DownloadArchiveRequest {
|
|
78
|
+
sessionId: string;
|
|
79
|
+
}
|
|
80
|
+
export type DownloadArchiveResponse = Uint8Array;
|
|
81
|
+
export interface DownloadFileRequest {
|
|
82
|
+
sessionId: string;
|
|
83
|
+
path: string;
|
|
84
|
+
}
|
|
85
|
+
export type DownloadFileResponse = Uint8Array;
|
|
86
|
+
export interface DownloadGlobalFileRequest {
|
|
87
|
+
path: string;
|
|
88
|
+
}
|
|
89
|
+
export type DownloadGlobalFileResponse = Uint8Array;
|
|
90
|
+
export interface ListFilesRequest {
|
|
91
|
+
sessionId: string;
|
|
92
|
+
}
|
|
93
|
+
export interface MultipleFilesDataItem {
|
|
94
|
+
/** Timestamp when the file was created */
|
|
95
|
+
lastModified: string;
|
|
96
|
+
/** Path to the file in the storage system */
|
|
97
|
+
path: string;
|
|
98
|
+
/** Size of the file in bytes */
|
|
99
|
+
size: number;
|
|
100
|
+
}
|
|
101
|
+
/** Array of files for the current page */
|
|
102
|
+
export type MultipleFilesDataList = Array<MultipleFilesDataItem>;
|
|
103
|
+
export interface MultipleFiles {
|
|
104
|
+
/** Array of files for the current page */
|
|
105
|
+
data: MultipleFilesDataList;
|
|
106
|
+
}
|
|
107
|
+
export interface ListGlobalFilesRequest {}
|
|
108
|
+
export interface UploadFileRequest {
|
|
109
|
+
sessionId: string;
|
|
110
|
+
/** The file to upload (binary) or URL string to download from */
|
|
111
|
+
file: Blob | Uint8Array | ArrayBuffer;
|
|
112
|
+
/** Path to the file in the storage system */
|
|
113
|
+
path?: string | undefined;
|
|
114
|
+
}
|
|
115
|
+
export interface FileDetails {
|
|
116
|
+
/** Timestamp when the file was created */
|
|
117
|
+
lastModified: string;
|
|
118
|
+
/** Path to the file in the storage system */
|
|
119
|
+
path: string;
|
|
120
|
+
/** Size of the file in bytes */
|
|
121
|
+
size: number;
|
|
122
|
+
}
|
|
123
|
+
export interface UploadGlobalFileRequest {
|
|
124
|
+
/** The file to upload (binary) or URL string to download from */
|
|
125
|
+
file: Blob | Uint8Array | ArrayBuffer;
|
|
126
|
+
/** Path to the file in the storage system */
|
|
127
|
+
path?: string | undefined;
|
|
128
|
+
}
|
|
129
|
+
export type DeleteAllFilesError = NotFound | Conflict | SteelOpError;
|
|
130
|
+
/** Delete all files Delete all files from a session */
|
|
131
|
+
export const deleteAllFiles: API.OperationMethod<
|
|
132
|
+
DeleteAllFilesRequest,
|
|
133
|
+
DeleteAllFilesResponse,
|
|
134
|
+
DeleteAllFilesError,
|
|
135
|
+
SteelOpContext
|
|
136
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
137
|
+
input: __S(12, __c6, 0) as any as S.Schema<DeleteAllFilesRequest>,
|
|
138
|
+
output: __S(14, __c7, 0) as any as S.Schema<DeleteAllFilesResponse>,
|
|
139
|
+
errors: [NotFound, Conflict, UnknownSteelError],
|
|
140
|
+
protocol: SteelProtocol,
|
|
141
|
+
retry: Retry.Retry,
|
|
142
|
+
telemetry: TELEMETRY,
|
|
143
|
+
span: "DeleteAllFiles",
|
|
144
|
+
}));
|
|
145
|
+
|
|
146
|
+
export type DeleteFileError = NotFound | Conflict | SteelOpError;
|
|
147
|
+
/** Delete a file Delete a file from a session */
|
|
148
|
+
export const deleteFile: API.OperationMethod<
|
|
149
|
+
DeleteFileRequest,
|
|
150
|
+
DeleteFileResponse,
|
|
151
|
+
DeleteFileError,
|
|
152
|
+
SteelOpContext
|
|
153
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
154
|
+
input: __S(16, __c8, 0) as any as S.Schema<DeleteFileRequest>,
|
|
155
|
+
output: __S(14, __c7, 0) as any as S.Schema<DeleteFileResponse>,
|
|
156
|
+
errors: [NotFound, Conflict, UnknownSteelError],
|
|
157
|
+
protocol: SteelProtocol,
|
|
158
|
+
retry: Retry.Retry,
|
|
159
|
+
telemetry: TELEMETRY,
|
|
160
|
+
span: "DeleteFile",
|
|
161
|
+
}));
|
|
162
|
+
|
|
163
|
+
export type DeleteGlobalFileError = NotFound | SteelOpError;
|
|
164
|
+
/** Delete a global file Delete a file from global storage */
|
|
165
|
+
export const deleteGlobalFile: API.OperationMethod<
|
|
166
|
+
DeleteGlobalFileRequest,
|
|
167
|
+
DeleteGlobalFileResponse,
|
|
168
|
+
DeleteGlobalFileError,
|
|
169
|
+
SteelOpContext
|
|
170
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
171
|
+
input: __S(18, __c9, 0) as any as S.Schema<DeleteGlobalFileRequest>,
|
|
172
|
+
output: __S(14, __c7, 0) as any as S.Schema<DeleteGlobalFileResponse>,
|
|
173
|
+
errors: [NotFound, UnknownSteelError],
|
|
174
|
+
protocol: SteelProtocol,
|
|
175
|
+
retry: Retry.Retry,
|
|
176
|
+
telemetry: TELEMETRY,
|
|
177
|
+
span: "DeleteGlobalFile",
|
|
178
|
+
}));
|
|
179
|
+
|
|
180
|
+
export type DownloadArchiveError = NotFound | Conflict | SteelOpError;
|
|
181
|
+
/** Download archive Download all files from the session as a zip archive. */
|
|
182
|
+
export const downloadArchive: API.OperationMethod<
|
|
183
|
+
DownloadArchiveRequest,
|
|
184
|
+
DownloadArchiveResponse,
|
|
185
|
+
DownloadArchiveError,
|
|
186
|
+
SteelOpContext
|
|
187
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
188
|
+
input: __S(20, __c10, 0) as any as S.Schema<DownloadArchiveRequest>,
|
|
189
|
+
output: __S(21, __c10, 1) as any as S.Codec<DownloadArchiveResponse>,
|
|
190
|
+
errors: [NotFound, Conflict, UnknownSteelError],
|
|
191
|
+
protocol: SteelProtocol,
|
|
192
|
+
retry: Retry.Retry,
|
|
193
|
+
telemetry: TELEMETRY,
|
|
194
|
+
span: "DownloadArchive",
|
|
195
|
+
}));
|
|
196
|
+
|
|
197
|
+
export type DownloadFileError = NotFound | Conflict | SteelOpError;
|
|
198
|
+
/** Download a file Download a file from a session */
|
|
199
|
+
export const downloadFile: API.OperationMethod<
|
|
200
|
+
DownloadFileRequest,
|
|
201
|
+
DownloadFileResponse,
|
|
202
|
+
DownloadFileError,
|
|
203
|
+
SteelOpContext
|
|
204
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
205
|
+
input: __S(22, __c11, 0) as any as S.Schema<DownloadFileRequest>,
|
|
206
|
+
output: __S(23, __c11, 1) as any as S.Codec<DownloadFileResponse>,
|
|
207
|
+
errors: [NotFound, Conflict, UnknownSteelError],
|
|
208
|
+
protocol: SteelProtocol,
|
|
209
|
+
retry: Retry.Retry,
|
|
210
|
+
telemetry: TELEMETRY,
|
|
211
|
+
span: "DownloadFile",
|
|
212
|
+
}));
|
|
213
|
+
|
|
214
|
+
export type DownloadGlobalFileError = NotFound | SteelOpError;
|
|
215
|
+
/** Download a global file Download a file from global storage */
|
|
216
|
+
export const downloadGlobalFile: API.OperationMethod<
|
|
217
|
+
DownloadGlobalFileRequest,
|
|
218
|
+
DownloadGlobalFileResponse,
|
|
219
|
+
DownloadGlobalFileError,
|
|
220
|
+
SteelOpContext
|
|
221
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
222
|
+
input: __S(24, __c12, 0) as any as S.Schema<DownloadGlobalFileRequest>,
|
|
223
|
+
output: __S(25, __c12, 1) as any as S.Codec<DownloadGlobalFileResponse>,
|
|
224
|
+
errors: [NotFound, UnknownSteelError],
|
|
225
|
+
protocol: SteelProtocol,
|
|
226
|
+
retry: Retry.Retry,
|
|
227
|
+
telemetry: TELEMETRY,
|
|
228
|
+
span: "DownloadGlobalFile",
|
|
229
|
+
}));
|
|
230
|
+
|
|
231
|
+
export type ListFilesError = NotFound | Conflict | SteelOpError;
|
|
232
|
+
/** List files List all files from the session in descending order. */
|
|
233
|
+
export const listFiles: API.OperationMethod<
|
|
234
|
+
ListFilesRequest,
|
|
235
|
+
MultipleFiles,
|
|
236
|
+
ListFilesError,
|
|
237
|
+
SteelOpContext
|
|
238
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
239
|
+
input: __S(0, __c0, 0) as any as S.Schema<ListFilesRequest>,
|
|
240
|
+
output: __S(3, __c1, 1) as any as S.Schema<MultipleFiles>,
|
|
241
|
+
errors: [NotFound, Conflict, UnknownSteelError],
|
|
242
|
+
protocol: SteelProtocol,
|
|
243
|
+
retry: Retry.Retry,
|
|
244
|
+
telemetry: TELEMETRY,
|
|
245
|
+
span: "ListFiles",
|
|
246
|
+
}));
|
|
247
|
+
|
|
248
|
+
export type ListGlobalFilesError = SteelOpError;
|
|
249
|
+
/** List global files List all global files for the organization in descending order. */
|
|
250
|
+
export const listGlobalFiles: API.OperationMethod<
|
|
251
|
+
ListGlobalFilesRequest,
|
|
252
|
+
MultipleFiles,
|
|
253
|
+
ListGlobalFilesError,
|
|
254
|
+
SteelOpContext
|
|
255
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
256
|
+
input: __S(6, __c3, 0) as any as S.Schema<ListGlobalFilesRequest>,
|
|
257
|
+
output: __S(3, __c1, 1) as any as S.Schema<MultipleFiles>,
|
|
258
|
+
errors: [UnknownSteelError],
|
|
259
|
+
protocol: SteelProtocol,
|
|
260
|
+
retry: Retry.Retry,
|
|
261
|
+
telemetry: TELEMETRY,
|
|
262
|
+
span: "ListGlobalFiles",
|
|
263
|
+
}));
|
|
264
|
+
|
|
265
|
+
export type UploadFileError =
|
|
266
|
+
| BadRequest
|
|
267
|
+
| NotFound
|
|
268
|
+
| Conflict
|
|
269
|
+
| UnsupportedMediaType
|
|
270
|
+
| SteelOpError;
|
|
271
|
+
/** Upload a file Uploads a file to a session via `multipart/form-data` with a `file` field that accepts either binary data or a URL string to download from, and an optional `path` field for the file storage path. */
|
|
272
|
+
export const uploadFile: API.OperationMethod<
|
|
273
|
+
UploadFileRequest,
|
|
274
|
+
FileDetails,
|
|
275
|
+
UploadFileError,
|
|
276
|
+
SteelOpContext
|
|
277
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
278
|
+
input: __S(8, __c4, 0) as any as S.Schema<UploadFileRequest>,
|
|
279
|
+
output: __S(4, __c2, 0) as any as S.Schema<FileDetails>,
|
|
280
|
+
errors: [BadRequest, NotFound, Conflict, UnsupportedMediaType, UnknownSteelError],
|
|
281
|
+
protocol: SteelProtocol,
|
|
282
|
+
retry: Retry.Retry,
|
|
283
|
+
telemetry: TELEMETRY,
|
|
284
|
+
span: "UploadFile",
|
|
285
|
+
}));
|
|
286
|
+
|
|
287
|
+
export type UploadGlobalFileError = BadRequest | UnsupportedMediaType | SteelOpError;
|
|
288
|
+
/** Upload a global file Uploads a file to global storage via `multipart/form-data` with a `file` field that accepts either binary data or a URL string to download from, and an optional `path` field for the file storage path. */
|
|
289
|
+
export const uploadGlobalFile: API.OperationMethod<
|
|
290
|
+
UploadGlobalFileRequest,
|
|
291
|
+
FileDetails,
|
|
292
|
+
UploadGlobalFileError,
|
|
293
|
+
SteelOpContext
|
|
294
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
295
|
+
input: __S(10, __c5, 0) as any as S.Schema<UploadGlobalFileRequest>,
|
|
296
|
+
output: __S(4, __c2, 0) as any as S.Schema<FileDetails>,
|
|
297
|
+
errors: [BadRequest, UnsupportedMediaType, UnknownSteelError],
|
|
298
|
+
protocol: SteelProtocol,
|
|
299
|
+
retry: Retry.Retry,
|
|
300
|
+
telemetry: TELEMETRY,
|
|
301
|
+
span: "UploadGlobalFile",
|
|
302
|
+
}));
|
|
303
|
+
|
|
304
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
305
|
+
function __c0(j: number): any {
|
|
306
|
+
switch (j) {
|
|
307
|
+
case 0:
|
|
308
|
+
return S.suspend(() =>
|
|
309
|
+
S.Struct({
|
|
310
|
+
sessionId: S.String.pipe(T.Label()),
|
|
311
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/sessions/{sessionId}/files", code: 200 })),
|
|
312
|
+
).annotate({ identifier: "ListFilesRequest" });
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function __c1(j: number): any {
|
|
316
|
+
switch (j) {
|
|
317
|
+
case 0:
|
|
318
|
+
return S.Array(__S(4, __c2, 0));
|
|
319
|
+
case 1:
|
|
320
|
+
return S.suspend(() =>
|
|
321
|
+
S.Struct({
|
|
322
|
+
data: __S(2, __c1, 0),
|
|
323
|
+
}),
|
|
324
|
+
).annotate({ identifier: "MultipleFiles" });
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
function __c2(j: number): any {
|
|
328
|
+
switch (j) {
|
|
329
|
+
case 0:
|
|
330
|
+
return S.suspend(() =>
|
|
331
|
+
S.Struct({
|
|
332
|
+
lastModified: S.String,
|
|
333
|
+
path: S.String,
|
|
334
|
+
size: S.Number,
|
|
335
|
+
}),
|
|
336
|
+
).annotate({ identifier: "MultipleFilesDataItem" });
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function __c3(j: number): any {
|
|
340
|
+
switch (j) {
|
|
341
|
+
case 0:
|
|
342
|
+
return S.suspend(() =>
|
|
343
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/files", code: 200 })),
|
|
344
|
+
).annotate({ identifier: "ListGlobalFilesRequest" });
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
function __c4(j: number): any {
|
|
348
|
+
switch (j) {
|
|
349
|
+
case 0:
|
|
350
|
+
return S.suspend(() =>
|
|
351
|
+
S.Struct({
|
|
352
|
+
sessionId: S.String.pipe(T.Label()),
|
|
353
|
+
file: S.Union([S.instanceOf(Blob), S.instanceOf(Uint8Array), S.instanceOf(ArrayBuffer)]),
|
|
354
|
+
path: S.optional(S.String),
|
|
355
|
+
}).pipe(
|
|
356
|
+
T.Http({
|
|
357
|
+
method: "POST",
|
|
358
|
+
uri: "/v1/sessions/{sessionId}/files",
|
|
359
|
+
code: 200,
|
|
360
|
+
contentType: "multipart",
|
|
361
|
+
}),
|
|
362
|
+
),
|
|
363
|
+
).annotate({ identifier: "UploadFileRequest" });
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function __c5(j: number): any {
|
|
367
|
+
switch (j) {
|
|
368
|
+
case 0:
|
|
369
|
+
return S.suspend(() =>
|
|
370
|
+
S.Struct({
|
|
371
|
+
file: S.Union([S.instanceOf(Blob), S.instanceOf(Uint8Array), S.instanceOf(ArrayBuffer)]),
|
|
372
|
+
path: S.optional(S.String),
|
|
373
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/files", code: 200, contentType: "multipart" })),
|
|
374
|
+
).annotate({ identifier: "UploadGlobalFileRequest" });
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function __c6(j: number): any {
|
|
378
|
+
switch (j) {
|
|
379
|
+
case 0:
|
|
380
|
+
return S.suspend(() =>
|
|
381
|
+
S.Struct({
|
|
382
|
+
sessionId: S.String.pipe(T.Label()),
|
|
383
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/v1/sessions/{sessionId}/files", code: 200 })),
|
|
384
|
+
).annotate({ identifier: "DeleteAllFilesRequest" });
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function __c7(j: number): any {
|
|
388
|
+
switch (j) {
|
|
389
|
+
case 0:
|
|
390
|
+
return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteAllFilesResponse" });
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
function __c8(j: number): any {
|
|
394
|
+
switch (j) {
|
|
395
|
+
case 0:
|
|
396
|
+
return S.suspend(() =>
|
|
397
|
+
S.Struct({
|
|
398
|
+
sessionId: S.String.pipe(T.Label()),
|
|
399
|
+
path: S.String.pipe(T.Label()),
|
|
400
|
+
}).pipe(
|
|
401
|
+
T.Http({ method: "DELETE", uri: "/v1/sessions/{sessionId}/files/{path}", code: 200 }),
|
|
402
|
+
),
|
|
403
|
+
).annotate({ identifier: "DeleteFileRequest" });
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
function __c9(j: number): any {
|
|
407
|
+
switch (j) {
|
|
408
|
+
case 0:
|
|
409
|
+
return S.suspend(() =>
|
|
410
|
+
S.Struct({
|
|
411
|
+
path: S.String.pipe(T.Label()),
|
|
412
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/v1/files/{path}", code: 200 })),
|
|
413
|
+
).annotate({ identifier: "DeleteGlobalFileRequest" });
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
function __c10(j: number): any {
|
|
417
|
+
switch (j) {
|
|
418
|
+
case 0:
|
|
419
|
+
return S.suspend(() =>
|
|
420
|
+
S.Struct({
|
|
421
|
+
sessionId: S.String.pipe(T.Label()),
|
|
422
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/sessions/{sessionId}/files.zip", code: 200 })),
|
|
423
|
+
).annotate({ identifier: "DownloadArchiveRequest" });
|
|
424
|
+
case 1:
|
|
425
|
+
return S.instanceOf(Uint8Array).pipe(/*@__PURE__*/ T.BinaryResponse());
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
function __c11(j: number): any {
|
|
429
|
+
switch (j) {
|
|
430
|
+
case 0:
|
|
431
|
+
return S.suspend(() =>
|
|
432
|
+
S.Struct({
|
|
433
|
+
sessionId: S.String.pipe(T.Label()),
|
|
434
|
+
path: S.String.pipe(T.Label()),
|
|
435
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/sessions/{sessionId}/files/{path}", code: 200 })),
|
|
436
|
+
).annotate({ identifier: "DownloadFileRequest" });
|
|
437
|
+
case 1:
|
|
438
|
+
return S.instanceOf(Uint8Array).pipe(/*@__PURE__*/ T.BinaryResponse());
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
function __c12(j: number): any {
|
|
442
|
+
switch (j) {
|
|
443
|
+
case 0:
|
|
444
|
+
return S.suspend(() =>
|
|
445
|
+
S.Struct({
|
|
446
|
+
path: S.String.pipe(T.Label()),
|
|
447
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/files/{path}", code: 200 })),
|
|
448
|
+
).annotate({ identifier: "DownloadGlobalFileRequest" });
|
|
449
|
+
case 1:
|
|
450
|
+
return S.instanceOf(Uint8Array).pipe(/*@__PURE__*/ T.BinaryResponse());
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
454
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
455
|
+
return (__s[i] ??= __L.at(f, j));
|
|
456
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts. Do not edit.
|
|
2
|
+
export * as apiKeys from "./api_keys.ts";
|
|
3
|
+
export * as auth from "./auth.ts";
|
|
4
|
+
export * as browserTools from "./browser_tools.ts";
|
|
5
|
+
export * as captchas from "./captchas.ts";
|
|
6
|
+
export * as credentials from "./credentials.ts";
|
|
7
|
+
export * as extensions from "./extensions.ts";
|
|
8
|
+
export * as files from "./files.ts";
|
|
9
|
+
export * as profiles from "./profiles.ts";
|
|
10
|
+
export * as projects from "./projects.ts";
|
|
11
|
+
export * as sessions from "./sessions.ts";
|