@toshicloud/sdk 0.0.0-stage → 0.3.0

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 (45) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +250 -2
  3. package/dist/client.d.ts +153 -0
  4. package/dist/client.js +92 -0
  5. package/dist/errors.d.ts +28 -0
  6. package/dist/errors.js +77 -0
  7. package/dist/execute.d.ts +7 -0
  8. package/dist/execute.js +380 -0
  9. package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +843 -0
  10. package/dist/gen/toshi/workspace/v1/artifacts_pb.js +96 -0
  11. package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +2713 -0
  12. package/dist/gen/toshi/workspace/v1/channels_pb.js +336 -0
  13. package/dist/gen/toshi/workspace/v1/display_pb.d.ts +1166 -0
  14. package/dist/gen/toshi/workspace/v1/display_pb.js +214 -0
  15. package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1540 -0
  16. package/dist/gen/toshi/workspace/v1/projects_pb.js +207 -0
  17. package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +1024 -0
  18. package/dist/gen/toshi/workspace/v1/recordings_pb.js +201 -0
  19. package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +1214 -0
  20. package/dist/gen/toshi/workspace/v1/secrets_pb.js +182 -0
  21. package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +444 -0
  22. package/dist/gen/toshi/workspace/v1/volumes_pb.js +107 -0
  23. package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +1018 -0
  24. package/dist/gen/toshi/workspace/v1/webhook_pb.js +153 -0
  25. package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2858 -0
  26. package/dist/gen/toshi/workspace/v1/workloads_pb.js +261 -0
  27. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +5380 -0
  28. package/dist/gen/toshi/workspace/v1/workspace_pb.js +855 -0
  29. package/dist/index.d.ts +15 -0
  30. package/dist/index.js +14 -0
  31. package/dist/interceptors.d.ts +10 -0
  32. package/dist/interceptors.js +159 -0
  33. package/dist/output.d.ts +7 -0
  34. package/dist/output.js +77 -0
  35. package/dist/retry.d.ts +42 -0
  36. package/dist/retry.js +254 -0
  37. package/dist/run.d.ts +10 -0
  38. package/dist/run.js +175 -0
  39. package/dist/stream.d.ts +21 -0
  40. package/dist/stream.js +84 -0
  41. package/dist/wait.d.ts +13 -0
  42. package/dist/wait.js +41 -0
  43. package/dist/watch.d.ts +16 -0
  44. package/dist/watch.js +277 -0
  45. package/package.json +47 -4
@@ -0,0 +1,843 @@
1
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
+ import type { RecordingKind, RecordingKindJson } from "./recordings_pb.js";
4
+ import type { Message } from "@bufbuild/protobuf";
5
+ /**
6
+ * Describes the file toshi/workspace/v1/artifacts.proto.
7
+ */
8
+ export declare const file_toshi_workspace_v1_artifacts: GenFile;
9
+ /**
10
+ * Artifact is an uploaded file's record: what it is, who uploaded it, and
11
+ * where its parts are kept, never a key, a URL or key material.
12
+ *
13
+ * @generated from message toshi.workspace.v1.Artifact
14
+ */
15
+ export type Artifact = Message<"toshi.workspace.v1.Artifact"> & {
16
+ /**
17
+ * @generated from field: string id = 1;
18
+ */
19
+ id: string;
20
+ /**
21
+ * @generated from field: string project_id = 2;
22
+ */
23
+ projectId: string;
24
+ /**
25
+ * @generated from field: string environment_id = 3;
26
+ */
27
+ environmentId: string;
28
+ /**
29
+ * @generated from field: string workload_id = 4;
30
+ */
31
+ workloadId: string;
32
+ /**
33
+ * @generated from field: string execution_id = 5;
34
+ */
35
+ executionId: string;
36
+ /**
37
+ * recording, recording-signed-in, trace, report or image.
38
+ *
39
+ * @generated from field: string kind = 6;
40
+ */
41
+ kind: string;
42
+ /**
43
+ * @generated from field: string name = 7;
44
+ */
45
+ name: string;
46
+ /**
47
+ * @generated from field: string content_type = 8;
48
+ */
49
+ contentType: string;
50
+ /**
51
+ * 1 for an artifact stored as one object; N for N parts plus an index.
52
+ *
53
+ * @generated from field: int64 part_count = 9;
54
+ */
55
+ partCount: bigint;
56
+ /**
57
+ * The reserved size of each part, in bytes.
58
+ *
59
+ * @generated from field: repeated int64 part_sizes = 10;
60
+ */
61
+ partSizes: bigint[];
62
+ /**
63
+ * The index object's size; 0 when part_count is 1.
64
+ *
65
+ * @generated from field: int64 index_size = 11;
66
+ */
67
+ indexSize: bigint;
68
+ /**
69
+ * reserved, completing, complete, abandoned or deleted. A completion
70
+ * moves the row to completing while it copies the parts, so a second
71
+ * completion is refused before it copies anything.
72
+ *
73
+ * @generated from field: string state = 12;
74
+ */
75
+ state: string;
76
+ /**
77
+ * none or envelope-v1.
78
+ *
79
+ * @generated from field: string encryption = 13;
80
+ */
81
+ encryption: string;
82
+ /**
83
+ * @generated from field: google.protobuf.Timestamp created_at = 14;
84
+ */
85
+ createdAt?: Timestamp | undefined;
86
+ /**
87
+ * @generated from field: google.protobuf.Timestamp completed_at = 15;
88
+ */
89
+ completedAt?: Timestamp | undefined;
90
+ /**
91
+ * The kind of workload that uploaded it, as its token named: job or
92
+ * sandbox. workload_id and execution_id are that workload's.
93
+ *
94
+ * @generated from field: string workload_kind = 16;
95
+ */
96
+ workloadKind: string;
97
+ };
98
+ /**
99
+ * Artifact is an uploaded file's record: what it is, who uploaded it, and
100
+ * where its parts are kept, never a key, a URL or key material.
101
+ *
102
+ * @generated from message toshi.workspace.v1.Artifact
103
+ */
104
+ export type ArtifactJson = {
105
+ /**
106
+ * @generated from field: string id = 1;
107
+ */
108
+ id?: string;
109
+ /**
110
+ * @generated from field: string project_id = 2;
111
+ */
112
+ projectId?: string;
113
+ /**
114
+ * @generated from field: string environment_id = 3;
115
+ */
116
+ environmentId?: string;
117
+ /**
118
+ * @generated from field: string workload_id = 4;
119
+ */
120
+ workloadId?: string;
121
+ /**
122
+ * @generated from field: string execution_id = 5;
123
+ */
124
+ executionId?: string;
125
+ /**
126
+ * recording, recording-signed-in, trace, report or image.
127
+ *
128
+ * @generated from field: string kind = 6;
129
+ */
130
+ kind?: string;
131
+ /**
132
+ * @generated from field: string name = 7;
133
+ */
134
+ name?: string;
135
+ /**
136
+ * @generated from field: string content_type = 8;
137
+ */
138
+ contentType?: string;
139
+ /**
140
+ * 1 for an artifact stored as one object; N for N parts plus an index.
141
+ *
142
+ * @generated from field: int64 part_count = 9;
143
+ */
144
+ partCount?: string;
145
+ /**
146
+ * The reserved size of each part, in bytes.
147
+ *
148
+ * @generated from field: repeated int64 part_sizes = 10;
149
+ */
150
+ partSizes?: string[];
151
+ /**
152
+ * The index object's size; 0 when part_count is 1.
153
+ *
154
+ * @generated from field: int64 index_size = 11;
155
+ */
156
+ indexSize?: string;
157
+ /**
158
+ * reserved, completing, complete, abandoned or deleted. A completion
159
+ * moves the row to completing while it copies the parts, so a second
160
+ * completion is refused before it copies anything.
161
+ *
162
+ * @generated from field: string state = 12;
163
+ */
164
+ state?: string;
165
+ /**
166
+ * none or envelope-v1.
167
+ *
168
+ * @generated from field: string encryption = 13;
169
+ */
170
+ encryption?: string;
171
+ /**
172
+ * @generated from field: google.protobuf.Timestamp created_at = 14;
173
+ */
174
+ createdAt?: TimestampJson;
175
+ /**
176
+ * @generated from field: google.protobuf.Timestamp completed_at = 15;
177
+ */
178
+ completedAt?: TimestampJson;
179
+ /**
180
+ * The kind of workload that uploaded it, as its token named: job or
181
+ * sandbox. workload_id and execution_id are that workload's.
182
+ *
183
+ * @generated from field: string workload_kind = 16;
184
+ */
185
+ workloadKind?: string;
186
+ };
187
+ /**
188
+ * Describes the message toshi.workspace.v1.Artifact.
189
+ * Use `create(ArtifactSchema)` to create a new message.
190
+ */
191
+ export declare const ArtifactSchema: GenMessage<Artifact, {
192
+ jsonType: ArtifactJson;
193
+ }>;
194
+ /**
195
+ * Upload is one presigned PUT. Send method to url with every header and
196
+ * exactly the part's reserved Content-Length.
197
+ *
198
+ * @generated from message toshi.workspace.v1.Upload
199
+ */
200
+ export type Upload = Message<"toshi.workspace.v1.Upload"> & {
201
+ /**
202
+ * part-00000 and on for a part; index for the index object.
203
+ *
204
+ * @generated from field: string part = 1;
205
+ */
206
+ part: string;
207
+ /**
208
+ * @generated from field: string method = 2;
209
+ */
210
+ method: string;
211
+ /**
212
+ * @generated from field: string url = 3;
213
+ */
214
+ url: string;
215
+ /**
216
+ * @generated from field: map<string, string> headers = 4;
217
+ */
218
+ headers: {
219
+ [key: string]: string;
220
+ };
221
+ /**
222
+ * @generated from field: google.protobuf.Timestamp expires_at = 5;
223
+ */
224
+ expiresAt?: Timestamp | undefined;
225
+ };
226
+ /**
227
+ * Upload is one presigned PUT. Send method to url with every header and
228
+ * exactly the part's reserved Content-Length.
229
+ *
230
+ * @generated from message toshi.workspace.v1.Upload
231
+ */
232
+ export type UploadJson = {
233
+ /**
234
+ * part-00000 and on for a part; index for the index object.
235
+ *
236
+ * @generated from field: string part = 1;
237
+ */
238
+ part?: string;
239
+ /**
240
+ * @generated from field: string method = 2;
241
+ */
242
+ method?: string;
243
+ /**
244
+ * @generated from field: string url = 3;
245
+ */
246
+ url?: string;
247
+ /**
248
+ * @generated from field: map<string, string> headers = 4;
249
+ */
250
+ headers?: {
251
+ [key: string]: string;
252
+ };
253
+ /**
254
+ * @generated from field: google.protobuf.Timestamp expires_at = 5;
255
+ */
256
+ expiresAt?: TimestampJson;
257
+ };
258
+ /**
259
+ * Describes the message toshi.workspace.v1.Upload.
260
+ * Use `create(UploadSchema)` to create a new message.
261
+ */
262
+ export declare const UploadSchema: GenMessage<Upload, {
263
+ jsonType: UploadJson;
264
+ }>;
265
+ /**
266
+ * @generated from message toshi.workspace.v1.ReserveUploadRequest
267
+ */
268
+ export type ReserveUploadRequest = Message<"toshi.workspace.v1.ReserveUploadRequest"> & {
269
+ /**
270
+ * recording, recording-signed-in, trace, report or image.
271
+ *
272
+ * @generated from field: string kind = 1;
273
+ */
274
+ kind: string;
275
+ /**
276
+ * 1 to 128 of A-Z, a-z, 0-9, . _ and -, never . or ..
277
+ *
278
+ * @generated from field: string name = 2;
279
+ */
280
+ name: string;
281
+ /**
282
+ * @generated from field: string content_type = 3;
283
+ */
284
+ contentType: string;
285
+ /**
286
+ * 1 to 64 parts, each 1 byte to 5 GiB.
287
+ *
288
+ * @generated from field: repeated int64 part_sizes = 4;
289
+ */
290
+ partSizes: bigint[];
291
+ /**
292
+ * 1 byte to 16 MiB when part_sizes has more than one part; 0 otherwise.
293
+ *
294
+ * @generated from field: int64 index_size = 5;
295
+ */
296
+ indexSize: bigint;
297
+ /**
298
+ * VIDEO or TRACE when the file is the run's test framework's own
299
+ * recording; unset for any other file. The artifact then is also one of
300
+ * the run attempt's recordings (RecordingService), ready when its upload
301
+ * completes. VIDEO needs kind recording and TRACE kind trace, each in
302
+ * exactly one part; STRIP, another kind or more parts fail with
303
+ * INVALID_ARGUMENT. Only a job workload's run records one: the
304
+ * credential of a strip's own upload fails with PERMISSION_DENIED;
305
+ * another caller, or a run that has ended, fails with
306
+ * FAILED_PRECONDITION.
307
+ *
308
+ * @generated from field: toshi.workspace.v1.RecordingKind recording = 6;
309
+ */
310
+ recording: RecordingKind;
311
+ };
312
+ /**
313
+ * @generated from message toshi.workspace.v1.ReserveUploadRequest
314
+ */
315
+ export type ReserveUploadRequestJson = {
316
+ /**
317
+ * recording, recording-signed-in, trace, report or image.
318
+ *
319
+ * @generated from field: string kind = 1;
320
+ */
321
+ kind?: string;
322
+ /**
323
+ * 1 to 128 of A-Z, a-z, 0-9, . _ and -, never . or ..
324
+ *
325
+ * @generated from field: string name = 2;
326
+ */
327
+ name?: string;
328
+ /**
329
+ * @generated from field: string content_type = 3;
330
+ */
331
+ contentType?: string;
332
+ /**
333
+ * 1 to 64 parts, each 1 byte to 5 GiB.
334
+ *
335
+ * @generated from field: repeated int64 part_sizes = 4;
336
+ */
337
+ partSizes?: string[];
338
+ /**
339
+ * 1 byte to 16 MiB when part_sizes has more than one part; 0 otherwise.
340
+ *
341
+ * @generated from field: int64 index_size = 5;
342
+ */
343
+ indexSize?: string;
344
+ /**
345
+ * VIDEO or TRACE when the file is the run's test framework's own
346
+ * recording; unset for any other file. The artifact then is also one of
347
+ * the run attempt's recordings (RecordingService), ready when its upload
348
+ * completes. VIDEO needs kind recording and TRACE kind trace, each in
349
+ * exactly one part; STRIP, another kind or more parts fail with
350
+ * INVALID_ARGUMENT. Only a job workload's run records one: the
351
+ * credential of a strip's own upload fails with PERMISSION_DENIED;
352
+ * another caller, or a run that has ended, fails with
353
+ * FAILED_PRECONDITION.
354
+ *
355
+ * @generated from field: toshi.workspace.v1.RecordingKind recording = 6;
356
+ */
357
+ recording?: RecordingKindJson;
358
+ };
359
+ /**
360
+ * Describes the message toshi.workspace.v1.ReserveUploadRequest.
361
+ * Use `create(ReserveUploadRequestSchema)` to create a new message.
362
+ */
363
+ export declare const ReserveUploadRequestSchema: GenMessage<ReserveUploadRequest, {
364
+ jsonType: ReserveUploadRequestJson;
365
+ }>;
366
+ /**
367
+ * @generated from message toshi.workspace.v1.ReserveUploadResponse
368
+ */
369
+ export type ReserveUploadResponse = Message<"toshi.workspace.v1.ReserveUploadResponse"> & {
370
+ /**
371
+ * @generated from field: string artifact_id = 1;
372
+ */
373
+ artifactId: string;
374
+ /**
375
+ * @generated from field: repeated toshi.workspace.v1.Upload uploads = 2;
376
+ */
377
+ uploads: Upload[];
378
+ /**
379
+ * @generated from field: google.protobuf.Timestamp upload_deadline = 3;
380
+ */
381
+ uploadDeadline?: Timestamp | undefined;
382
+ /**
383
+ * none or envelope-v1.
384
+ *
385
+ * @generated from field: string encryption = 4;
386
+ */
387
+ encryption: string;
388
+ /**
389
+ * The artifact's 32-byte AES-256 data key, set only for envelope-v1.
390
+ *
391
+ * @generated from field: bytes data_key = 5;
392
+ */
393
+ dataKey: Uint8Array;
394
+ /**
395
+ * Whether the provider takes these PUTs from inside a VM. When false, a
396
+ * host agent uploading for its guest sends the bytes from the host.
397
+ *
398
+ * @generated from field: bool guest_upload = 6;
399
+ */
400
+ guestUpload: boolean;
401
+ };
402
+ /**
403
+ * @generated from message toshi.workspace.v1.ReserveUploadResponse
404
+ */
405
+ export type ReserveUploadResponseJson = {
406
+ /**
407
+ * @generated from field: string artifact_id = 1;
408
+ */
409
+ artifactId?: string;
410
+ /**
411
+ * @generated from field: repeated toshi.workspace.v1.Upload uploads = 2;
412
+ */
413
+ uploads?: UploadJson[];
414
+ /**
415
+ * @generated from field: google.protobuf.Timestamp upload_deadline = 3;
416
+ */
417
+ uploadDeadline?: TimestampJson;
418
+ /**
419
+ * none or envelope-v1.
420
+ *
421
+ * @generated from field: string encryption = 4;
422
+ */
423
+ encryption?: string;
424
+ /**
425
+ * The artifact's 32-byte AES-256 data key, set only for envelope-v1.
426
+ *
427
+ * @generated from field: bytes data_key = 5;
428
+ */
429
+ dataKey?: string;
430
+ /**
431
+ * Whether the provider takes these PUTs from inside a VM. When false, a
432
+ * host agent uploading for its guest sends the bytes from the host.
433
+ *
434
+ * @generated from field: bool guest_upload = 6;
435
+ */
436
+ guestUpload?: boolean;
437
+ };
438
+ /**
439
+ * Describes the message toshi.workspace.v1.ReserveUploadResponse.
440
+ * Use `create(ReserveUploadResponseSchema)` to create a new message.
441
+ */
442
+ export declare const ReserveUploadResponseSchema: GenMessage<ReserveUploadResponse, {
443
+ jsonType: ReserveUploadResponseJson;
444
+ }>;
445
+ /**
446
+ * @generated from message toshi.workspace.v1.CompleteUploadRequest
447
+ */
448
+ export type CompleteUploadRequest = Message<"toshi.workspace.v1.CompleteUploadRequest"> & {
449
+ /**
450
+ * @generated from field: string artifact_id = 1;
451
+ */
452
+ artifactId: string;
453
+ };
454
+ /**
455
+ * @generated from message toshi.workspace.v1.CompleteUploadRequest
456
+ */
457
+ export type CompleteUploadRequestJson = {
458
+ /**
459
+ * @generated from field: string artifact_id = 1;
460
+ */
461
+ artifactId?: string;
462
+ };
463
+ /**
464
+ * Describes the message toshi.workspace.v1.CompleteUploadRequest.
465
+ * Use `create(CompleteUploadRequestSchema)` to create a new message.
466
+ */
467
+ export declare const CompleteUploadRequestSchema: GenMessage<CompleteUploadRequest, {
468
+ jsonType: CompleteUploadRequestJson;
469
+ }>;
470
+ /**
471
+ * @generated from message toshi.workspace.v1.CompleteUploadResponse
472
+ */
473
+ export type CompleteUploadResponse = Message<"toshi.workspace.v1.CompleteUploadResponse"> & {
474
+ /**
475
+ * @generated from field: toshi.workspace.v1.Artifact artifact = 1;
476
+ */
477
+ artifact?: Artifact | undefined;
478
+ };
479
+ /**
480
+ * @generated from message toshi.workspace.v1.CompleteUploadResponse
481
+ */
482
+ export type CompleteUploadResponseJson = {
483
+ /**
484
+ * @generated from field: toshi.workspace.v1.Artifact artifact = 1;
485
+ */
486
+ artifact?: ArtifactJson;
487
+ };
488
+ /**
489
+ * Describes the message toshi.workspace.v1.CompleteUploadResponse.
490
+ * Use `create(CompleteUploadResponseSchema)` to create a new message.
491
+ */
492
+ export declare const CompleteUploadResponseSchema: GenMessage<CompleteUploadResponse, {
493
+ jsonType: CompleteUploadResponseJson;
494
+ }>;
495
+ /**
496
+ * @generated from message toshi.workspace.v1.ListArtifactsRequest
497
+ */
498
+ export type ListArtifactsRequest = Message<"toshi.workspace.v1.ListArtifactsRequest"> & {
499
+ /**
500
+ * @generated from field: string project_id = 1;
501
+ */
502
+ projectId: string;
503
+ /**
504
+ * @generated from field: string environment_id = 2;
505
+ */
506
+ environmentId: string;
507
+ /**
508
+ * @generated from field: string workload_id = 3;
509
+ */
510
+ workloadId: string;
511
+ /**
512
+ * @generated from field: string execution_id = 4;
513
+ */
514
+ executionId: string;
515
+ /**
516
+ * @generated from field: string kind = 5;
517
+ */
518
+ kind: string;
519
+ /**
520
+ * @generated from field: int32 page_size = 6;
521
+ */
522
+ pageSize: number;
523
+ /**
524
+ * @generated from field: string page_token = 7;
525
+ */
526
+ pageToken: string;
527
+ };
528
+ /**
529
+ * @generated from message toshi.workspace.v1.ListArtifactsRequest
530
+ */
531
+ export type ListArtifactsRequestJson = {
532
+ /**
533
+ * @generated from field: string project_id = 1;
534
+ */
535
+ projectId?: string;
536
+ /**
537
+ * @generated from field: string environment_id = 2;
538
+ */
539
+ environmentId?: string;
540
+ /**
541
+ * @generated from field: string workload_id = 3;
542
+ */
543
+ workloadId?: string;
544
+ /**
545
+ * @generated from field: string execution_id = 4;
546
+ */
547
+ executionId?: string;
548
+ /**
549
+ * @generated from field: string kind = 5;
550
+ */
551
+ kind?: string;
552
+ /**
553
+ * @generated from field: int32 page_size = 6;
554
+ */
555
+ pageSize?: number;
556
+ /**
557
+ * @generated from field: string page_token = 7;
558
+ */
559
+ pageToken?: string;
560
+ };
561
+ /**
562
+ * Describes the message toshi.workspace.v1.ListArtifactsRequest.
563
+ * Use `create(ListArtifactsRequestSchema)` to create a new message.
564
+ */
565
+ export declare const ListArtifactsRequestSchema: GenMessage<ListArtifactsRequest, {
566
+ jsonType: ListArtifactsRequestJson;
567
+ }>;
568
+ /**
569
+ * @generated from message toshi.workspace.v1.ListArtifactsResponse
570
+ */
571
+ export type ListArtifactsResponse = Message<"toshi.workspace.v1.ListArtifactsResponse"> & {
572
+ /**
573
+ * @generated from field: repeated toshi.workspace.v1.Artifact artifacts = 1;
574
+ */
575
+ artifacts: Artifact[];
576
+ /**
577
+ * @generated from field: string next_page_token = 2;
578
+ */
579
+ nextPageToken: string;
580
+ };
581
+ /**
582
+ * @generated from message toshi.workspace.v1.ListArtifactsResponse
583
+ */
584
+ export type ListArtifactsResponseJson = {
585
+ /**
586
+ * @generated from field: repeated toshi.workspace.v1.Artifact artifacts = 1;
587
+ */
588
+ artifacts?: ArtifactJson[];
589
+ /**
590
+ * @generated from field: string next_page_token = 2;
591
+ */
592
+ nextPageToken?: string;
593
+ };
594
+ /**
595
+ * Describes the message toshi.workspace.v1.ListArtifactsResponse.
596
+ * Use `create(ListArtifactsResponseSchema)` to create a new message.
597
+ */
598
+ export declare const ListArtifactsResponseSchema: GenMessage<ListArtifactsResponse, {
599
+ jsonType: ListArtifactsResponseJson;
600
+ }>;
601
+ /**
602
+ * @generated from message toshi.workspace.v1.GetArtifactRequest
603
+ */
604
+ export type GetArtifactRequest = Message<"toshi.workspace.v1.GetArtifactRequest"> & {
605
+ /**
606
+ * @generated from field: string artifact_id = 1;
607
+ */
608
+ artifactId: string;
609
+ };
610
+ /**
611
+ * @generated from message toshi.workspace.v1.GetArtifactRequest
612
+ */
613
+ export type GetArtifactRequestJson = {
614
+ /**
615
+ * @generated from field: string artifact_id = 1;
616
+ */
617
+ artifactId?: string;
618
+ };
619
+ /**
620
+ * Describes the message toshi.workspace.v1.GetArtifactRequest.
621
+ * Use `create(GetArtifactRequestSchema)` to create a new message.
622
+ */
623
+ export declare const GetArtifactRequestSchema: GenMessage<GetArtifactRequest, {
624
+ jsonType: GetArtifactRequestJson;
625
+ }>;
626
+ /**
627
+ * @generated from message toshi.workspace.v1.GetArtifactResponse
628
+ */
629
+ export type GetArtifactResponse = Message<"toshi.workspace.v1.GetArtifactResponse"> & {
630
+ /**
631
+ * @generated from field: toshi.workspace.v1.Artifact artifact = 1;
632
+ */
633
+ artifact?: Artifact | undefined;
634
+ };
635
+ /**
636
+ * @generated from message toshi.workspace.v1.GetArtifactResponse
637
+ */
638
+ export type GetArtifactResponseJson = {
639
+ /**
640
+ * @generated from field: toshi.workspace.v1.Artifact artifact = 1;
641
+ */
642
+ artifact?: ArtifactJson;
643
+ };
644
+ /**
645
+ * Describes the message toshi.workspace.v1.GetArtifactResponse.
646
+ * Use `create(GetArtifactResponseSchema)` to create a new message.
647
+ */
648
+ export declare const GetArtifactResponseSchema: GenMessage<GetArtifactResponse, {
649
+ jsonType: GetArtifactResponseJson;
650
+ }>;
651
+ /**
652
+ * @generated from message toshi.workspace.v1.GetArtifactDownloadURLRequest
653
+ */
654
+ export type GetArtifactDownloadURLRequest = Message<"toshi.workspace.v1.GetArtifactDownloadURLRequest"> & {
655
+ /**
656
+ * @generated from field: string artifact_id = 1;
657
+ */
658
+ artifactId: string;
659
+ /**
660
+ * Empty for a one-object artifact; part-00000 and on, or index, for a
661
+ * multi-part one.
662
+ *
663
+ * @generated from field: string part = 2;
664
+ */
665
+ part: string;
666
+ /**
667
+ * 0 is 300 seconds; at most 3600.
668
+ *
669
+ * @generated from field: int64 ttl_seconds = 3;
670
+ */
671
+ ttlSeconds: bigint;
672
+ };
673
+ /**
674
+ * @generated from message toshi.workspace.v1.GetArtifactDownloadURLRequest
675
+ */
676
+ export type GetArtifactDownloadURLRequestJson = {
677
+ /**
678
+ * @generated from field: string artifact_id = 1;
679
+ */
680
+ artifactId?: string;
681
+ /**
682
+ * Empty for a one-object artifact; part-00000 and on, or index, for a
683
+ * multi-part one.
684
+ *
685
+ * @generated from field: string part = 2;
686
+ */
687
+ part?: string;
688
+ /**
689
+ * 0 is 300 seconds; at most 3600.
690
+ *
691
+ * @generated from field: int64 ttl_seconds = 3;
692
+ */
693
+ ttlSeconds?: string;
694
+ };
695
+ /**
696
+ * Describes the message toshi.workspace.v1.GetArtifactDownloadURLRequest.
697
+ * Use `create(GetArtifactDownloadURLRequestSchema)` to create a new message.
698
+ */
699
+ export declare const GetArtifactDownloadURLRequestSchema: GenMessage<GetArtifactDownloadURLRequest, {
700
+ jsonType: GetArtifactDownloadURLRequestJson;
701
+ }>;
702
+ /**
703
+ * @generated from message toshi.workspace.v1.GetArtifactDownloadURLResponse
704
+ */
705
+ export type GetArtifactDownloadURLResponse = Message<"toshi.workspace.v1.GetArtifactDownloadURLResponse"> & {
706
+ /**
707
+ * @generated from field: string url = 1;
708
+ */
709
+ url: string;
710
+ /**
711
+ * @generated from field: google.protobuf.Timestamp expires_at = 2;
712
+ */
713
+ expiresAt?: Timestamp | undefined;
714
+ /**
715
+ * @generated from field: string encryption = 3;
716
+ */
717
+ encryption: string;
718
+ /**
719
+ * The artifact's 32-byte AES-256 data key, set only for envelope-v1.
720
+ *
721
+ * @generated from field: bytes data_key = 4;
722
+ */
723
+ dataKey: Uint8Array;
724
+ };
725
+ /**
726
+ * @generated from message toshi.workspace.v1.GetArtifactDownloadURLResponse
727
+ */
728
+ export type GetArtifactDownloadURLResponseJson = {
729
+ /**
730
+ * @generated from field: string url = 1;
731
+ */
732
+ url?: string;
733
+ /**
734
+ * @generated from field: google.protobuf.Timestamp expires_at = 2;
735
+ */
736
+ expiresAt?: TimestampJson;
737
+ /**
738
+ * @generated from field: string encryption = 3;
739
+ */
740
+ encryption?: string;
741
+ /**
742
+ * The artifact's 32-byte AES-256 data key, set only for envelope-v1.
743
+ *
744
+ * @generated from field: bytes data_key = 4;
745
+ */
746
+ dataKey?: string;
747
+ };
748
+ /**
749
+ * Describes the message toshi.workspace.v1.GetArtifactDownloadURLResponse.
750
+ * Use `create(GetArtifactDownloadURLResponseSchema)` to create a new message.
751
+ */
752
+ export declare const GetArtifactDownloadURLResponseSchema: GenMessage<GetArtifactDownloadURLResponse, {
753
+ jsonType: GetArtifactDownloadURLResponseJson;
754
+ }>;
755
+ /**
756
+ * ArtifactUploadService is how a job uploads what it recorded:
757
+ * it reserves an artifact, uploads each part to a presigned URL, and
758
+ * completes the upload. The caller is the workload itself: every call
759
+ * carries a workload identity token for the audience
760
+ * "toshi:artifacts", and the tenant, project, environment, workload and
761
+ * execution of the artifact are the token's claims, never the request's.
762
+ * A token of another audience, a display token, an expired token, or one
763
+ * that names no workload is refused with UNAUTHENTICATED. A workspace that
764
+ * is suspended or being deleted is refused with FAILED_PRECONDITION.
765
+ *
766
+ * The data key and the presigned URLs are the only values either call
767
+ * hands out. Neither ever appears in a log line, an audit row or an error.
768
+ *
769
+ * @generated from service toshi.workspace.v1.ArtifactUploadService
770
+ */
771
+ export declare const ArtifactUploadService: GenService<{
772
+ /**
773
+ * ReserveUpload stores a reservation and returns one presigned PUT per
774
+ * part. A part is a separate object; a multi-part artifact has an index
775
+ * object beside its parts. The kind must be one Toshi stores today:
776
+ * profile is refused with INVALID_ARGUMENT.
777
+ *
778
+ * @generated from rpc toshi.workspace.v1.ArtifactUploadService.ReserveUpload
779
+ */
780
+ reserveUpload: {
781
+ methodKind: "unary";
782
+ input: typeof ReserveUploadRequestSchema;
783
+ output: typeof ReserveUploadResponseSchema;
784
+ };
785
+ /**
786
+ * CompleteUpload checks every part's size, copies the parts to their
787
+ * final keys, and marks the artifact complete. A part of another size
788
+ * fails with FAILED_PRECONDITION and the reservation stays; so does a
789
+ * call at or after the upload deadline.
790
+ *
791
+ * @generated from rpc toshi.workspace.v1.ArtifactUploadService.CompleteUpload
792
+ */
793
+ completeUpload: {
794
+ methodKind: "unary";
795
+ input: typeof CompleteUploadRequestSchema;
796
+ output: typeof CompleteUploadResponseSchema;
797
+ };
798
+ }>;
799
+ /**
800
+ * ArtifactService is how a workspace lists, reads and downloads what its
801
+ * workloads uploaded. The caller is a workspace's API token or a dashboard
802
+ * session, as for the Workspace API's other services. A credential limited
803
+ * to a project or an environment sees only its own.
804
+ *
805
+ * @generated from service toshi.workspace.v1.ArtifactService
806
+ */
807
+ export declare const ArtifactService: GenService<{
808
+ /**
809
+ * ListArtifacts returns the workspace's artifacts, oldest first, by
810
+ * project, environment, workload, execution and kind.
811
+ *
812
+ * A page holds 50 artifacts when page_size is zero, and 200 at most.
813
+ *
814
+ * @generated from rpc toshi.workspace.v1.ArtifactService.ListArtifacts
815
+ */
816
+ listArtifacts: {
817
+ methodKind: "unary";
818
+ input: typeof ListArtifactsRequestSchema;
819
+ output: typeof ListArtifactsResponseSchema;
820
+ };
821
+ /**
822
+ * GetArtifact returns one artifact's record, never a key or a URL.
823
+ *
824
+ * @generated from rpc toshi.workspace.v1.ArtifactService.GetArtifact
825
+ */
826
+ getArtifact: {
827
+ methodKind: "unary";
828
+ input: typeof GetArtifactRequestSchema;
829
+ output: typeof GetArtifactResponseSchema;
830
+ };
831
+ /**
832
+ * GetArtifactDownloadURL returns a signed URL that expires, and the
833
+ * artifact's data key when it is envelope encrypted. An artifact that is
834
+ * not complete fails with FAILED_PRECONDITION.
835
+ *
836
+ * @generated from rpc toshi.workspace.v1.ArtifactService.GetArtifactDownloadURL
837
+ */
838
+ getArtifactDownloadURL: {
839
+ methodKind: "unary";
840
+ input: typeof GetArtifactDownloadURLRequestSchema;
841
+ output: typeof GetArtifactDownloadURLResponseSchema;
842
+ };
843
+ }>;