@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,1024 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Duration, DurationJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
+ import type { Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file toshi/workspace/v1/recordings.proto.
6
+ */
7
+ export declare const file_toshi_workspace_v1_recordings: GenFile;
8
+ /**
9
+ * Recording is one recording of a run attempt: its screenshot strip or
10
+ * video, or a video or trace its test framework wrote. Its record, never a key or a
11
+ * URL.
12
+ *
13
+ * @generated from message toshi.workspace.v1.Recording
14
+ */
15
+ export type Recording = Message<"toshi.workspace.v1.Recording"> & {
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: toshi.workspace.v1.RecordingState state = 5;
34
+ */
35
+ state: RecordingState;
36
+ /**
37
+ * Why it is unavailable or lost, or why a run whose policy asked for a
38
+ * video has a strip.
39
+ *
40
+ * @generated from field: string reason = 6;
41
+ */
42
+ reason: string;
43
+ /**
44
+ * The artifact that holds it: complete when the recording became ready,
45
+ * deleted once its retention has passed.
46
+ *
47
+ * @generated from field: string artifact_id = 7;
48
+ */
49
+ artifactId: string;
50
+ /**
51
+ * A strip's time between two screenshots; unset for a video or trace.
52
+ *
53
+ * @generated from field: google.protobuf.Duration interval = 8;
54
+ */
55
+ interval?: Duration | undefined;
56
+ /**
57
+ * A strip's ticks or the frames of its host's video, and the screenshots
58
+ * left out; 0 for a video or trace the test framework wrote.
59
+ *
60
+ * @generated from field: int32 frames = 9;
61
+ */
62
+ frames: number;
63
+ /**
64
+ * @generated from field: int32 dropped = 10;
65
+ */
66
+ dropped: number;
67
+ /**
68
+ * The host's capture of a strip or video stopped at a bound before the
69
+ * run ended.
70
+ *
71
+ * @generated from field: bool truncated = 11;
72
+ */
73
+ truncated: boolean;
74
+ /**
75
+ * The spans a strip or its host's video left out while an input session
76
+ * was open.
77
+ *
78
+ * @generated from field: repeated toshi.workspace.v1.RecordingPause pauses = 12;
79
+ */
80
+ pauses: RecordingPause[];
81
+ /**
82
+ * @generated from field: google.protobuf.Timestamp created_at = 13;
83
+ */
84
+ createdAt?: Timestamp | undefined;
85
+ /**
86
+ * Set once it is no longer capturing.
87
+ *
88
+ * @generated from field: google.protobuf.Timestamp ended_at = 14;
89
+ */
90
+ endedAt?: Timestamp | undefined;
91
+ /**
92
+ * What it holds: never UNSPECIFIED.
93
+ *
94
+ * @generated from field: toshi.workspace.v1.RecordingKind kind = 15;
95
+ */
96
+ kind: RecordingKind;
97
+ };
98
+ /**
99
+ * Recording is one recording of a run attempt: its screenshot strip or
100
+ * video, or a video or trace its test framework wrote. Its record, never a key or a
101
+ * URL.
102
+ *
103
+ * @generated from message toshi.workspace.v1.Recording
104
+ */
105
+ export type RecordingJson = {
106
+ /**
107
+ * @generated from field: string id = 1;
108
+ */
109
+ id?: string;
110
+ /**
111
+ * @generated from field: string project_id = 2;
112
+ */
113
+ projectId?: string;
114
+ /**
115
+ * @generated from field: string environment_id = 3;
116
+ */
117
+ environmentId?: string;
118
+ /**
119
+ * @generated from field: string workload_id = 4;
120
+ */
121
+ workloadId?: string;
122
+ /**
123
+ * @generated from field: toshi.workspace.v1.RecordingState state = 5;
124
+ */
125
+ state?: RecordingStateJson;
126
+ /**
127
+ * Why it is unavailable or lost, or why a run whose policy asked for a
128
+ * video has a strip.
129
+ *
130
+ * @generated from field: string reason = 6;
131
+ */
132
+ reason?: string;
133
+ /**
134
+ * The artifact that holds it: complete when the recording became ready,
135
+ * deleted once its retention has passed.
136
+ *
137
+ * @generated from field: string artifact_id = 7;
138
+ */
139
+ artifactId?: string;
140
+ /**
141
+ * A strip's time between two screenshots; unset for a video or trace.
142
+ *
143
+ * @generated from field: google.protobuf.Duration interval = 8;
144
+ */
145
+ interval?: DurationJson;
146
+ /**
147
+ * A strip's ticks or the frames of its host's video, and the screenshots
148
+ * left out; 0 for a video or trace the test framework wrote.
149
+ *
150
+ * @generated from field: int32 frames = 9;
151
+ */
152
+ frames?: number;
153
+ /**
154
+ * @generated from field: int32 dropped = 10;
155
+ */
156
+ dropped?: number;
157
+ /**
158
+ * The host's capture of a strip or video stopped at a bound before the
159
+ * run ended.
160
+ *
161
+ * @generated from field: bool truncated = 11;
162
+ */
163
+ truncated?: boolean;
164
+ /**
165
+ * The spans a strip or its host's video left out while an input session
166
+ * was open.
167
+ *
168
+ * @generated from field: repeated toshi.workspace.v1.RecordingPause pauses = 12;
169
+ */
170
+ pauses?: RecordingPauseJson[];
171
+ /**
172
+ * @generated from field: google.protobuf.Timestamp created_at = 13;
173
+ */
174
+ createdAt?: TimestampJson;
175
+ /**
176
+ * Set once it is no longer capturing.
177
+ *
178
+ * @generated from field: google.protobuf.Timestamp ended_at = 14;
179
+ */
180
+ endedAt?: TimestampJson;
181
+ /**
182
+ * What it holds: never UNSPECIFIED.
183
+ *
184
+ * @generated from field: toshi.workspace.v1.RecordingKind kind = 15;
185
+ */
186
+ kind?: RecordingKindJson;
187
+ };
188
+ /**
189
+ * Describes the message toshi.workspace.v1.Recording.
190
+ * Use `create(RecordingSchema)` to create a new message.
191
+ */
192
+ export declare const RecordingSchema: GenMessage<Recording, {
193
+ jsonType: RecordingJson;
194
+ }>;
195
+ /**
196
+ * RecordingPause is a span with no screenshot, while a display session
197
+ * with input was open.
198
+ *
199
+ * @generated from message toshi.workspace.v1.RecordingPause
200
+ */
201
+ export type RecordingPause = Message<"toshi.workspace.v1.RecordingPause"> & {
202
+ /**
203
+ * @generated from field: string session_id = 1;
204
+ */
205
+ sessionId: string;
206
+ /**
207
+ * person or program.
208
+ *
209
+ * @generated from field: string actor = 2;
210
+ */
211
+ actor: string;
212
+ /**
213
+ * websocket or api.
214
+ *
215
+ * @generated from field: string via = 3;
216
+ */
217
+ via: string;
218
+ /**
219
+ * @generated from field: google.protobuf.Timestamp start = 4;
220
+ */
221
+ start?: Timestamp | undefined;
222
+ /**
223
+ * @generated from field: google.protobuf.Timestamp end = 5;
224
+ */
225
+ end?: Timestamp | undefined;
226
+ };
227
+ /**
228
+ * RecordingPause is a span with no screenshot, while a display session
229
+ * with input was open.
230
+ *
231
+ * @generated from message toshi.workspace.v1.RecordingPause
232
+ */
233
+ export type RecordingPauseJson = {
234
+ /**
235
+ * @generated from field: string session_id = 1;
236
+ */
237
+ sessionId?: string;
238
+ /**
239
+ * person or program.
240
+ *
241
+ * @generated from field: string actor = 2;
242
+ */
243
+ actor?: string;
244
+ /**
245
+ * websocket or api.
246
+ *
247
+ * @generated from field: string via = 3;
248
+ */
249
+ via?: string;
250
+ /**
251
+ * @generated from field: google.protobuf.Timestamp start = 4;
252
+ */
253
+ start?: TimestampJson;
254
+ /**
255
+ * @generated from field: google.protobuf.Timestamp end = 5;
256
+ */
257
+ end?: TimestampJson;
258
+ };
259
+ /**
260
+ * Describes the message toshi.workspace.v1.RecordingPause.
261
+ * Use `create(RecordingPauseSchema)` to create a new message.
262
+ */
263
+ export declare const RecordingPauseSchema: GenMessage<RecordingPause, {
264
+ jsonType: RecordingPauseJson;
265
+ }>;
266
+ /**
267
+ * @generated from message toshi.workspace.v1.ListRecordingsRequest
268
+ */
269
+ export type ListRecordingsRequest = Message<"toshi.workspace.v1.ListRecordingsRequest"> & {
270
+ /**
271
+ * @generated from field: string workload_id = 1;
272
+ */
273
+ workloadId: string;
274
+ /**
275
+ * The most recordings in one page; zero lets the server choose.
276
+ *
277
+ * @generated from field: int32 page_size = 2;
278
+ */
279
+ pageSize: number;
280
+ /**
281
+ * From an earlier response's next_page_token; empty for the first page.
282
+ *
283
+ * @generated from field: string page_token = 3;
284
+ */
285
+ pageToken: string;
286
+ };
287
+ /**
288
+ * @generated from message toshi.workspace.v1.ListRecordingsRequest
289
+ */
290
+ export type ListRecordingsRequestJson = {
291
+ /**
292
+ * @generated from field: string workload_id = 1;
293
+ */
294
+ workloadId?: string;
295
+ /**
296
+ * The most recordings in one page; zero lets the server choose.
297
+ *
298
+ * @generated from field: int32 page_size = 2;
299
+ */
300
+ pageSize?: number;
301
+ /**
302
+ * From an earlier response's next_page_token; empty for the first page.
303
+ *
304
+ * @generated from field: string page_token = 3;
305
+ */
306
+ pageToken?: string;
307
+ };
308
+ /**
309
+ * Describes the message toshi.workspace.v1.ListRecordingsRequest.
310
+ * Use `create(ListRecordingsRequestSchema)` to create a new message.
311
+ */
312
+ export declare const ListRecordingsRequestSchema: GenMessage<ListRecordingsRequest, {
313
+ jsonType: ListRecordingsRequestJson;
314
+ }>;
315
+ /**
316
+ * @generated from message toshi.workspace.v1.ListRecordingsResponse
317
+ */
318
+ export type ListRecordingsResponse = Message<"toshi.workspace.v1.ListRecordingsResponse"> & {
319
+ /**
320
+ * @generated from field: repeated toshi.workspace.v1.Recording recordings = 1;
321
+ */
322
+ recordings: Recording[];
323
+ /**
324
+ * Empty on the last page.
325
+ *
326
+ * @generated from field: string next_page_token = 2;
327
+ */
328
+ nextPageToken: string;
329
+ };
330
+ /**
331
+ * @generated from message toshi.workspace.v1.ListRecordingsResponse
332
+ */
333
+ export type ListRecordingsResponseJson = {
334
+ /**
335
+ * @generated from field: repeated toshi.workspace.v1.Recording recordings = 1;
336
+ */
337
+ recordings?: RecordingJson[];
338
+ /**
339
+ * Empty on the last page.
340
+ *
341
+ * @generated from field: string next_page_token = 2;
342
+ */
343
+ nextPageToken?: string;
344
+ };
345
+ /**
346
+ * Describes the message toshi.workspace.v1.ListRecordingsResponse.
347
+ * Use `create(ListRecordingsResponseSchema)` to create a new message.
348
+ */
349
+ export declare const ListRecordingsResponseSchema: GenMessage<ListRecordingsResponse, {
350
+ jsonType: ListRecordingsResponseJson;
351
+ }>;
352
+ /**
353
+ * @generated from message toshi.workspace.v1.GetRecordingRequest
354
+ */
355
+ export type GetRecordingRequest = Message<"toshi.workspace.v1.GetRecordingRequest"> & {
356
+ /**
357
+ * @generated from field: string recording_id = 1;
358
+ */
359
+ recordingId: string;
360
+ /**
361
+ * How long the strip's URL lives: 0 is the default (300 seconds), and
362
+ * above 3600 fails with INVALID_ARGUMENT.
363
+ *
364
+ * @generated from field: int64 ttl_seconds = 2;
365
+ */
366
+ ttlSeconds: bigint;
367
+ };
368
+ /**
369
+ * @generated from message toshi.workspace.v1.GetRecordingRequest
370
+ */
371
+ export type GetRecordingRequestJson = {
372
+ /**
373
+ * @generated from field: string recording_id = 1;
374
+ */
375
+ recordingId?: string;
376
+ /**
377
+ * How long the strip's URL lives: 0 is the default (300 seconds), and
378
+ * above 3600 fails with INVALID_ARGUMENT.
379
+ *
380
+ * @generated from field: int64 ttl_seconds = 2;
381
+ */
382
+ ttlSeconds?: string;
383
+ };
384
+ /**
385
+ * Describes the message toshi.workspace.v1.GetRecordingRequest.
386
+ * Use `create(GetRecordingRequestSchema)` to create a new message.
387
+ */
388
+ export declare const GetRecordingRequestSchema: GenMessage<GetRecordingRequest, {
389
+ jsonType: GetRecordingRequestJson;
390
+ }>;
391
+ /**
392
+ * @generated from message toshi.workspace.v1.GetRecordingResponse
393
+ */
394
+ export type GetRecordingResponse = Message<"toshi.workspace.v1.GetRecordingResponse"> & {
395
+ /**
396
+ * @generated from field: toshi.workspace.v1.Recording recording = 1;
397
+ */
398
+ recording?: Recording | undefined;
399
+ /**
400
+ * A signed GET for its object, set only when the recording is ready. It
401
+ * honours a byte Range, so one frame of a strip can be fetched by its
402
+ * offset in the strip's index.
403
+ *
404
+ * @generated from field: string url = 2;
405
+ */
406
+ url: string;
407
+ /**
408
+ * @generated from field: google.protobuf.Timestamp expires_at = 3;
409
+ */
410
+ expiresAt?: Timestamp | undefined;
411
+ };
412
+ /**
413
+ * @generated from message toshi.workspace.v1.GetRecordingResponse
414
+ */
415
+ export type GetRecordingResponseJson = {
416
+ /**
417
+ * @generated from field: toshi.workspace.v1.Recording recording = 1;
418
+ */
419
+ recording?: RecordingJson;
420
+ /**
421
+ * A signed GET for its object, set only when the recording is ready. It
422
+ * honours a byte Range, so one frame of a strip can be fetched by its
423
+ * offset in the strip's index.
424
+ *
425
+ * @generated from field: string url = 2;
426
+ */
427
+ url?: string;
428
+ /**
429
+ * @generated from field: google.protobuf.Timestamp expires_at = 3;
430
+ */
431
+ expiresAt?: TimestampJson;
432
+ };
433
+ /**
434
+ * Describes the message toshi.workspace.v1.GetRecordingResponse.
435
+ * Use `create(GetRecordingResponseSchema)` to create a new message.
436
+ */
437
+ export declare const GetRecordingResponseSchema: GenMessage<GetRecordingResponse, {
438
+ jsonType: GetRecordingResponseJson;
439
+ }>;
440
+ /**
441
+ * RecordingShareLink is one share link of a recording, without the link
442
+ * itself.
443
+ *
444
+ * @generated from message toshi.workspace.v1.RecordingShareLink
445
+ */
446
+ export type RecordingShareLink = Message<"toshi.workspace.v1.RecordingShareLink"> & {
447
+ /**
448
+ * Assigned by the server.
449
+ *
450
+ * @generated from field: string id = 1;
451
+ */
452
+ id: string;
453
+ /**
454
+ * @generated from field: string recording_id = 2;
455
+ */
456
+ recordingId: string;
457
+ /**
458
+ * The recording's kind.
459
+ *
460
+ * @generated from field: toshi.workspace.v1.RecordingKind kind = 3;
461
+ */
462
+ kind: RecordingKind;
463
+ /**
464
+ * @generated from field: toshi.workspace.v1.RecordingShareLinkState state = 4;
465
+ */
466
+ state: RecordingShareLinkState;
467
+ /**
468
+ * @generated from field: google.protobuf.Timestamp created_at = 5;
469
+ */
470
+ createdAt?: Timestamp | undefined;
471
+ /**
472
+ * @generated from field: google.protobuf.Timestamp expires_at = 6;
473
+ */
474
+ expiresAt?: Timestamp | undefined;
475
+ /**
476
+ * The most bytes its fetches may take.
477
+ *
478
+ * @generated from field: int64 max_bytes = 7;
479
+ */
480
+ maxBytes: bigint;
481
+ /**
482
+ * The bytes its fetches have taken so far: the object's size once per
483
+ * fetch.
484
+ *
485
+ * @generated from field: int64 used_bytes = 8;
486
+ */
487
+ usedBytes: bigint;
488
+ /**
489
+ * Unset unless it was revoked.
490
+ *
491
+ * @generated from field: google.protobuf.Timestamp revoked_at = 9;
492
+ */
493
+ revokedAt?: Timestamp | undefined;
494
+ /**
495
+ * Who minted it: a person's sign-in or an API token, as in the audit.
496
+ *
497
+ * @generated from field: string created_by = 10;
498
+ */
499
+ createdBy: string;
500
+ };
501
+ /**
502
+ * RecordingShareLink is one share link of a recording, without the link
503
+ * itself.
504
+ *
505
+ * @generated from message toshi.workspace.v1.RecordingShareLink
506
+ */
507
+ export type RecordingShareLinkJson = {
508
+ /**
509
+ * Assigned by the server.
510
+ *
511
+ * @generated from field: string id = 1;
512
+ */
513
+ id?: string;
514
+ /**
515
+ * @generated from field: string recording_id = 2;
516
+ */
517
+ recordingId?: string;
518
+ /**
519
+ * The recording's kind.
520
+ *
521
+ * @generated from field: toshi.workspace.v1.RecordingKind kind = 3;
522
+ */
523
+ kind?: RecordingKindJson;
524
+ /**
525
+ * @generated from field: toshi.workspace.v1.RecordingShareLinkState state = 4;
526
+ */
527
+ state?: RecordingShareLinkStateJson;
528
+ /**
529
+ * @generated from field: google.protobuf.Timestamp created_at = 5;
530
+ */
531
+ createdAt?: TimestampJson;
532
+ /**
533
+ * @generated from field: google.protobuf.Timestamp expires_at = 6;
534
+ */
535
+ expiresAt?: TimestampJson;
536
+ /**
537
+ * The most bytes its fetches may take.
538
+ *
539
+ * @generated from field: int64 max_bytes = 7;
540
+ */
541
+ maxBytes?: string;
542
+ /**
543
+ * The bytes its fetches have taken so far: the object's size once per
544
+ * fetch.
545
+ *
546
+ * @generated from field: int64 used_bytes = 8;
547
+ */
548
+ usedBytes?: string;
549
+ /**
550
+ * Unset unless it was revoked.
551
+ *
552
+ * @generated from field: google.protobuf.Timestamp revoked_at = 9;
553
+ */
554
+ revokedAt?: TimestampJson;
555
+ /**
556
+ * Who minted it: a person's sign-in or an API token, as in the audit.
557
+ *
558
+ * @generated from field: string created_by = 10;
559
+ */
560
+ createdBy?: string;
561
+ };
562
+ /**
563
+ * Describes the message toshi.workspace.v1.RecordingShareLink.
564
+ * Use `create(RecordingShareLinkSchema)` to create a new message.
565
+ */
566
+ export declare const RecordingShareLinkSchema: GenMessage<RecordingShareLink, {
567
+ jsonType: RecordingShareLinkJson;
568
+ }>;
569
+ /**
570
+ * @generated from message toshi.workspace.v1.CreateRecordingShareLinkRequest
571
+ */
572
+ export type CreateRecordingShareLinkRequest = Message<"toshi.workspace.v1.CreateRecordingShareLinkRequest"> & {
573
+ /**
574
+ * @generated from field: string recording_id = 1;
575
+ */
576
+ recordingId: string;
577
+ /**
578
+ * How long the link stays valid; unset is the server's default, and
579
+ * more than its maximum is INVALID_ARGUMENT.
580
+ *
581
+ * @generated from field: google.protobuf.Duration expires_in = 2;
582
+ */
583
+ expiresIn?: Duration | undefined;
584
+ /**
585
+ * The most bytes its fetches may take; 0 is the server's default, and
586
+ * more than its maximum, or less than the recording's object, is
587
+ * INVALID_ARGUMENT.
588
+ *
589
+ * @generated from field: int64 max_bytes = 3;
590
+ */
591
+ maxBytes: bigint;
592
+ };
593
+ /**
594
+ * @generated from message toshi.workspace.v1.CreateRecordingShareLinkRequest
595
+ */
596
+ export type CreateRecordingShareLinkRequestJson = {
597
+ /**
598
+ * @generated from field: string recording_id = 1;
599
+ */
600
+ recordingId?: string;
601
+ /**
602
+ * How long the link stays valid; unset is the server's default, and
603
+ * more than its maximum is INVALID_ARGUMENT.
604
+ *
605
+ * @generated from field: google.protobuf.Duration expires_in = 2;
606
+ */
607
+ expiresIn?: DurationJson;
608
+ /**
609
+ * The most bytes its fetches may take; 0 is the server's default, and
610
+ * more than its maximum, or less than the recording's object, is
611
+ * INVALID_ARGUMENT.
612
+ *
613
+ * @generated from field: int64 max_bytes = 3;
614
+ */
615
+ maxBytes?: string;
616
+ };
617
+ /**
618
+ * Describes the message toshi.workspace.v1.CreateRecordingShareLinkRequest.
619
+ * Use `create(CreateRecordingShareLinkRequestSchema)` to create a new message.
620
+ */
621
+ export declare const CreateRecordingShareLinkRequestSchema: GenMessage<CreateRecordingShareLinkRequest, {
622
+ jsonType: CreateRecordingShareLinkRequestJson;
623
+ }>;
624
+ /**
625
+ * @generated from message toshi.workspace.v1.CreateRecordingShareLinkResponse
626
+ */
627
+ export type CreateRecordingShareLinkResponse = Message<"toshi.workspace.v1.CreateRecordingShareLinkResponse"> & {
628
+ /**
629
+ * @generated from field: toshi.workspace.v1.RecordingShareLink share_link = 1;
630
+ */
631
+ shareLink?: RecordingShareLink | undefined;
632
+ /**
633
+ * The URL to give the viewer: a GET of it redirects to a signed URL for
634
+ * the recording's object. It is in this answer only.
635
+ *
636
+ * @generated from field: string url = 2;
637
+ */
638
+ url: string;
639
+ /**
640
+ * The URL of the link's player page: a GET of it plays the recording in
641
+ * the page and is charged against the link as a GET of url is. It is in
642
+ * this answer only.
643
+ *
644
+ * @generated from field: string player_url = 3;
645
+ */
646
+ playerUrl: string;
647
+ };
648
+ /**
649
+ * @generated from message toshi.workspace.v1.CreateRecordingShareLinkResponse
650
+ */
651
+ export type CreateRecordingShareLinkResponseJson = {
652
+ /**
653
+ * @generated from field: toshi.workspace.v1.RecordingShareLink share_link = 1;
654
+ */
655
+ shareLink?: RecordingShareLinkJson;
656
+ /**
657
+ * The URL to give the viewer: a GET of it redirects to a signed URL for
658
+ * the recording's object. It is in this answer only.
659
+ *
660
+ * @generated from field: string url = 2;
661
+ */
662
+ url?: string;
663
+ /**
664
+ * The URL of the link's player page: a GET of it plays the recording in
665
+ * the page and is charged against the link as a GET of url is. It is in
666
+ * this answer only.
667
+ *
668
+ * @generated from field: string player_url = 3;
669
+ */
670
+ playerUrl?: string;
671
+ };
672
+ /**
673
+ * Describes the message toshi.workspace.v1.CreateRecordingShareLinkResponse.
674
+ * Use `create(CreateRecordingShareLinkResponseSchema)` to create a new message.
675
+ */
676
+ export declare const CreateRecordingShareLinkResponseSchema: GenMessage<CreateRecordingShareLinkResponse, {
677
+ jsonType: CreateRecordingShareLinkResponseJson;
678
+ }>;
679
+ /**
680
+ * @generated from message toshi.workspace.v1.ListRecordingShareLinksRequest
681
+ */
682
+ export type ListRecordingShareLinksRequest = Message<"toshi.workspace.v1.ListRecordingShareLinksRequest"> & {
683
+ /**
684
+ * @generated from field: string recording_id = 1;
685
+ */
686
+ recordingId: string;
687
+ /**
688
+ * The most share links in one page; zero lets the server choose.
689
+ *
690
+ * @generated from field: int32 page_size = 2;
691
+ */
692
+ pageSize: number;
693
+ /**
694
+ * From an earlier response's next_page_token; empty for the first page.
695
+ *
696
+ * @generated from field: string page_token = 3;
697
+ */
698
+ pageToken: string;
699
+ };
700
+ /**
701
+ * @generated from message toshi.workspace.v1.ListRecordingShareLinksRequest
702
+ */
703
+ export type ListRecordingShareLinksRequestJson = {
704
+ /**
705
+ * @generated from field: string recording_id = 1;
706
+ */
707
+ recordingId?: string;
708
+ /**
709
+ * The most share links in one page; zero lets the server choose.
710
+ *
711
+ * @generated from field: int32 page_size = 2;
712
+ */
713
+ pageSize?: number;
714
+ /**
715
+ * From an earlier response's next_page_token; empty for the first page.
716
+ *
717
+ * @generated from field: string page_token = 3;
718
+ */
719
+ pageToken?: string;
720
+ };
721
+ /**
722
+ * Describes the message toshi.workspace.v1.ListRecordingShareLinksRequest.
723
+ * Use `create(ListRecordingShareLinksRequestSchema)` to create a new message.
724
+ */
725
+ export declare const ListRecordingShareLinksRequestSchema: GenMessage<ListRecordingShareLinksRequest, {
726
+ jsonType: ListRecordingShareLinksRequestJson;
727
+ }>;
728
+ /**
729
+ * @generated from message toshi.workspace.v1.ListRecordingShareLinksResponse
730
+ */
731
+ export type ListRecordingShareLinksResponse = Message<"toshi.workspace.v1.ListRecordingShareLinksResponse"> & {
732
+ /**
733
+ * @generated from field: repeated toshi.workspace.v1.RecordingShareLink share_links = 1;
734
+ */
735
+ shareLinks: RecordingShareLink[];
736
+ /**
737
+ * Empty on the last page.
738
+ *
739
+ * @generated from field: string next_page_token = 2;
740
+ */
741
+ nextPageToken: string;
742
+ };
743
+ /**
744
+ * @generated from message toshi.workspace.v1.ListRecordingShareLinksResponse
745
+ */
746
+ export type ListRecordingShareLinksResponseJson = {
747
+ /**
748
+ * @generated from field: repeated toshi.workspace.v1.RecordingShareLink share_links = 1;
749
+ */
750
+ shareLinks?: RecordingShareLinkJson[];
751
+ /**
752
+ * Empty on the last page.
753
+ *
754
+ * @generated from field: string next_page_token = 2;
755
+ */
756
+ nextPageToken?: string;
757
+ };
758
+ /**
759
+ * Describes the message toshi.workspace.v1.ListRecordingShareLinksResponse.
760
+ * Use `create(ListRecordingShareLinksResponseSchema)` to create a new message.
761
+ */
762
+ export declare const ListRecordingShareLinksResponseSchema: GenMessage<ListRecordingShareLinksResponse, {
763
+ jsonType: ListRecordingShareLinksResponseJson;
764
+ }>;
765
+ /**
766
+ * @generated from message toshi.workspace.v1.RevokeRecordingShareLinkRequest
767
+ */
768
+ export type RevokeRecordingShareLinkRequest = Message<"toshi.workspace.v1.RevokeRecordingShareLinkRequest"> & {
769
+ /**
770
+ * @generated from field: string share_link_id = 1;
771
+ */
772
+ shareLinkId: string;
773
+ };
774
+ /**
775
+ * @generated from message toshi.workspace.v1.RevokeRecordingShareLinkRequest
776
+ */
777
+ export type RevokeRecordingShareLinkRequestJson = {
778
+ /**
779
+ * @generated from field: string share_link_id = 1;
780
+ */
781
+ shareLinkId?: string;
782
+ };
783
+ /**
784
+ * Describes the message toshi.workspace.v1.RevokeRecordingShareLinkRequest.
785
+ * Use `create(RevokeRecordingShareLinkRequestSchema)` to create a new message.
786
+ */
787
+ export declare const RevokeRecordingShareLinkRequestSchema: GenMessage<RevokeRecordingShareLinkRequest, {
788
+ jsonType: RevokeRecordingShareLinkRequestJson;
789
+ }>;
790
+ /**
791
+ * @generated from message toshi.workspace.v1.RevokeRecordingShareLinkResponse
792
+ */
793
+ export type RevokeRecordingShareLinkResponse = Message<"toshi.workspace.v1.RevokeRecordingShareLinkResponse"> & {
794
+ /**
795
+ * @generated from field: toshi.workspace.v1.RecordingShareLink share_link = 1;
796
+ */
797
+ shareLink?: RecordingShareLink | undefined;
798
+ };
799
+ /**
800
+ * @generated from message toshi.workspace.v1.RevokeRecordingShareLinkResponse
801
+ */
802
+ export type RevokeRecordingShareLinkResponseJson = {
803
+ /**
804
+ * @generated from field: toshi.workspace.v1.RecordingShareLink share_link = 1;
805
+ */
806
+ shareLink?: RecordingShareLinkJson;
807
+ };
808
+ /**
809
+ * Describes the message toshi.workspace.v1.RevokeRecordingShareLinkResponse.
810
+ * Use `create(RevokeRecordingShareLinkResponseSchema)` to create a new message.
811
+ */
812
+ export declare const RevokeRecordingShareLinkResponseSchema: GenMessage<RevokeRecordingShareLinkResponse, {
813
+ jsonType: RevokeRecordingShareLinkResponseJson;
814
+ }>;
815
+ /**
816
+ * RecordingState is where a recording is in its life.
817
+ *
818
+ * @generated from enum toshi.workspace.v1.RecordingState
819
+ */
820
+ export declare enum RecordingState {
821
+ /**
822
+ * @generated from enum value: RECORDING_STATE_UNSPECIFIED = 0;
823
+ */
824
+ UNSPECIFIED = 0,
825
+ /**
826
+ * The run attempt may still finish it: its host captures a strip or
827
+ * uploads what it captured, or the run's upload of a video or trace has
828
+ * not completed.
829
+ *
830
+ * @generated from enum value: RECORDING_STATE_CAPTURING = 1;
831
+ */
832
+ CAPTURING = 1,
833
+ /**
834
+ * Its object's upload completed. The object is kept for its retention;
835
+ * the recording stays ready after that.
836
+ *
837
+ * @generated from enum value: RECORDING_STATE_READY = 2;
838
+ */
839
+ READY = 2,
840
+ /**
841
+ * A strip ended without its object, and its host said why.
842
+ *
843
+ * @generated from enum value: RECORDING_STATE_UNAVAILABLE = 3;
844
+ */
845
+ UNAVAILABLE = 3,
846
+ /**
847
+ * A strip ended without its object and without its host's report, or a
848
+ * video's or trace's upload did not complete before its deadline.
849
+ *
850
+ * @generated from enum value: RECORDING_STATE_LOST = 4;
851
+ */
852
+ LOST = 4
853
+ }
854
+ /**
855
+ * RecordingState is where a recording is in its life.
856
+ *
857
+ * @generated from enum toshi.workspace.v1.RecordingState
858
+ */
859
+ export type RecordingStateJson = "RECORDING_STATE_UNSPECIFIED" | "RECORDING_STATE_CAPTURING" | "RECORDING_STATE_READY" | "RECORDING_STATE_UNAVAILABLE" | "RECORDING_STATE_LOST";
860
+ /**
861
+ * Describes the enum toshi.workspace.v1.RecordingState.
862
+ */
863
+ export declare const RecordingStateSchema: GenEnum<RecordingState, RecordingStateJson>;
864
+ /**
865
+ * RecordingKind is what a recording holds.
866
+ *
867
+ * @generated from enum toshi.workspace.v1.RecordingKind
868
+ */
869
+ export declare enum RecordingKind {
870
+ /**
871
+ * @generated from enum value: RECORDING_KIND_UNSPECIFIED = 0;
872
+ */
873
+ UNSPECIFIED = 0,
874
+ /**
875
+ * A screenshot strip of the run's screen, taken by its host.
876
+ *
877
+ * @generated from enum value: RECORDING_KIND_STRIP = 1;
878
+ */
879
+ STRIP = 1,
880
+ /**
881
+ * A video of the run's screen, recorded by its host, or one the run's
882
+ * test framework wrote, such as Playwright's or Cypress's, uploaded with
883
+ * ArtifactUploadService.
884
+ *
885
+ * @generated from enum value: RECORDING_KIND_VIDEO = 2;
886
+ */
887
+ VIDEO = 2,
888
+ /**
889
+ * A trace the run's test framework wrote, such as a Playwright trace,
890
+ * uploaded with ArtifactUploadService.
891
+ *
892
+ * @generated from enum value: RECORDING_KIND_TRACE = 3;
893
+ */
894
+ TRACE = 3
895
+ }
896
+ /**
897
+ * RecordingKind is what a recording holds.
898
+ *
899
+ * @generated from enum toshi.workspace.v1.RecordingKind
900
+ */
901
+ export type RecordingKindJson = "RECORDING_KIND_UNSPECIFIED" | "RECORDING_KIND_STRIP" | "RECORDING_KIND_VIDEO" | "RECORDING_KIND_TRACE";
902
+ /**
903
+ * Describes the enum toshi.workspace.v1.RecordingKind.
904
+ */
905
+ export declare const RecordingKindSchema: GenEnum<RecordingKind, RecordingKindJson>;
906
+ /**
907
+ * RecordingShareLinkState is where a recording's share link is in its
908
+ * life.
909
+ *
910
+ * @generated from enum toshi.workspace.v1.RecordingShareLinkState
911
+ */
912
+ export declare enum RecordingShareLinkState {
913
+ /**
914
+ * @generated from enum value: RECORDING_SHARE_LINK_STATE_UNSPECIFIED = 0;
915
+ */
916
+ UNSPECIFIED = 0,
917
+ /**
918
+ * It fetches the recording's object.
919
+ *
920
+ * @generated from enum value: RECORDING_SHARE_LINK_STATE_ACTIVE = 1;
921
+ */
922
+ ACTIVE = 1,
923
+ /**
924
+ * @generated from enum value: RECORDING_SHARE_LINK_STATE_REVOKED = 2;
925
+ */
926
+ REVOKED = 2,
927
+ /**
928
+ * @generated from enum value: RECORDING_SHARE_LINK_STATE_EXPIRED = 3;
929
+ */
930
+ EXPIRED = 3,
931
+ /**
932
+ * What is left of its byte cap is less than the object's size.
933
+ *
934
+ * @generated from enum value: RECORDING_SHARE_LINK_STATE_ENDED = 4;
935
+ */
936
+ ENDED = 4
937
+ }
938
+ /**
939
+ * RecordingShareLinkState is where a recording's share link is in its
940
+ * life.
941
+ *
942
+ * @generated from enum toshi.workspace.v1.RecordingShareLinkState
943
+ */
944
+ export type RecordingShareLinkStateJson = "RECORDING_SHARE_LINK_STATE_UNSPECIFIED" | "RECORDING_SHARE_LINK_STATE_ACTIVE" | "RECORDING_SHARE_LINK_STATE_REVOKED" | "RECORDING_SHARE_LINK_STATE_EXPIRED" | "RECORDING_SHARE_LINK_STATE_ENDED";
945
+ /**
946
+ * Describes the enum toshi.workspace.v1.RecordingShareLinkState.
947
+ */
948
+ export declare const RecordingShareLinkStateSchema: GenEnum<RecordingShareLinkState, RecordingShareLinkStateJson>;
949
+ /**
950
+ * RecordingService lists a workload's recordings and signs a URL for a
951
+ * recording's object. The caller is a workspace's API token or a dashboard
952
+ * session, as for ArtifactService. A credential limited to a project or an
953
+ * environment sees only its own.
954
+ *
955
+ * @generated from service toshi.workspace.v1.RecordingService
956
+ */
957
+ export declare const RecordingService: GenService<{
958
+ /**
959
+ * ListRecordings returns one workload's recordings, oldest first: a
960
+ * run attempt's strip, and each video or trace a run attempt uploaded as
961
+ * its test framework's recording, so an attempt may have several. Never
962
+ * a URL.
963
+ *
964
+ * A page holds 100 recordings when page_size is zero, and 1000 at most.
965
+ *
966
+ * @generated from rpc toshi.workspace.v1.RecordingService.ListRecordings
967
+ */
968
+ listRecordings: {
969
+ methodKind: "unary";
970
+ input: typeof ListRecordingsRequestSchema;
971
+ output: typeof ListRecordingsResponseSchema;
972
+ };
973
+ /**
974
+ * GetRecording returns one recording and, when it is ready, a signed URL
975
+ * for its object that expires. A ready recording whose object's
976
+ * retention has deleted it is FAILED_PRECONDITION.
977
+ *
978
+ * @generated from rpc toshi.workspace.v1.RecordingService.GetRecording
979
+ */
980
+ getRecording: {
981
+ methodKind: "unary";
982
+ input: typeof GetRecordingRequestSchema;
983
+ output: typeof GetRecordingResponseSchema;
984
+ };
985
+ /**
986
+ * CreateRecordingShareLink mints a share link for a ready recording: a
987
+ * URL that fetches its object without a Toshi sign-in until the link
988
+ * expires, is revoked or has used its byte cap. Each fetch through it
989
+ * counts the object's whole size against the cap, and each fetch and
990
+ * each refusal is in the audit. A recording that is not ready, or whose
991
+ * object's retention has deleted it, is FAILED_PRECONDITION.
992
+ *
993
+ * @generated from rpc toshi.workspace.v1.RecordingService.CreateRecordingShareLink
994
+ */
995
+ createRecordingShareLink: {
996
+ methodKind: "unary";
997
+ input: typeof CreateRecordingShareLinkRequestSchema;
998
+ output: typeof CreateRecordingShareLinkResponseSchema;
999
+ };
1000
+ /**
1001
+ * ListRecordingShareLinks returns a recording's share links, oldest
1002
+ * first, without the links themselves.
1003
+ *
1004
+ * A page holds 100 share links when page_size is zero, and 1000 at most.
1005
+ *
1006
+ * @generated from rpc toshi.workspace.v1.RecordingService.ListRecordingShareLinks
1007
+ */
1008
+ listRecordingShareLinks: {
1009
+ methodKind: "unary";
1010
+ input: typeof ListRecordingShareLinksRequestSchema;
1011
+ output: typeof ListRecordingShareLinksResponseSchema;
1012
+ };
1013
+ /**
1014
+ * RevokeRecordingShareLink ends a share link before it expires. A link
1015
+ * already revoked is returned as it is.
1016
+ *
1017
+ * @generated from rpc toshi.workspace.v1.RecordingService.RevokeRecordingShareLink
1018
+ */
1019
+ revokeRecordingShareLink: {
1020
+ methodKind: "unary";
1021
+ input: typeof RevokeRecordingShareLinkRequestSchema;
1022
+ output: typeof RevokeRecordingShareLinkResponseSchema;
1023
+ };
1024
+ }>;