@toshicloud/sdk 0.5.0 → 0.5.1

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 (71) hide show
  1. package/README.md +82 -40
  2. package/dist/client.d.ts +33 -2
  3. package/dist/client.js +28 -3
  4. package/dist/errors.d.ts +74 -22
  5. package/dist/errors.js +99 -27
  6. package/dist/gen/toshi/permission_pb.d.ts +207 -2
  7. package/dist/gen/toshi/permission_pb.js +54 -2
  8. package/dist/gen/toshi/workspace/v1/account_pb.d.ts +590 -0
  9. package/dist/gen/toshi/workspace/v1/account_pb.js +75 -0
  10. package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +14 -8
  11. package/dist/gen/toshi/workspace/v1/artifacts_pb.js +9 -7
  12. package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +191 -6
  13. package/dist/gen/toshi/workspace/v1/audit_events_pb.js +11 -1
  14. package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +1194 -21
  15. package/dist/gen/toshi/workspace/v1/channels_pb.js +185 -39
  16. package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +1481 -0
  17. package/dist/gen/toshi/workspace/v1/connections_pb.js +208 -0
  18. package/dist/gen/toshi/workspace/v1/discovery_pb.d.ts +291 -43
  19. package/dist/gen/toshi/workspace/v1/discovery_pb.js +79 -30
  20. package/dist/gen/toshi/workspace/v1/display_pb.d.ts +198 -15
  21. package/dist/gen/toshi/workspace/v1/display_pb.js +52 -2
  22. package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +864 -0
  23. package/dist/gen/toshi/workspace/v1/domains_pb.js +152 -0
  24. package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +12 -4
  25. package/dist/gen/toshi/workspace/v1/fillers_pb.js +1 -1
  26. package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +1297 -0
  27. package/dist/gen/toshi/workspace/v1/grants_pb.js +271 -0
  28. package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +315 -15
  29. package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +10 -5
  30. package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +196 -7
  31. package/dist/gen/toshi/workspace/v1/hosts_pb.js +12 -7
  32. package/dist/gen/toshi/workspace/v1/images_pb.d.ts +1463 -0
  33. package/dist/gen/toshi/workspace/v1/images_pb.js +263 -0
  34. package/dist/gen/toshi/workspace/v1/products_pb.d.ts +99 -296
  35. package/dist/gen/toshi/workspace/v1/products_pb.js +7 -53
  36. package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1474 -99
  37. package/dist/gen/toshi/workspace/v1/projects_pb.js +150 -33
  38. package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +181 -14
  39. package/dist/gen/toshi/workspace/v1/recordings_pb.js +54 -14
  40. package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1994 -0
  41. package/dist/gen/toshi/workspace/v1/roles_pb.js +355 -0
  42. package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +314 -8
  43. package/dist/gen/toshi/workspace/v1/secrets_pb.js +42 -18
  44. package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +14 -0
  45. package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +1 -1
  46. package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +434 -5
  47. package/dist/gen/toshi/workspace/v1/tokens_pb.js +65 -8
  48. package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +1099 -0
  49. package/dist/gen/toshi/workspace/v1/triggers_pb.js +185 -0
  50. package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +1052 -33
  51. package/dist/gen/toshi/workspace/v1/volumes_pb.js +169 -11
  52. package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +66 -8
  53. package/dist/gen/toshi/workspace/v1/webhook_pb.js +4 -4
  54. package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2043 -54
  55. package/dist/gen/toshi/workspace/v1/workloads_pb.js +204 -54
  56. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6290 -937
  57. package/dist/gen/toshi/workspace/v1/workspace_pb.js +801 -88
  58. package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +2176 -630
  59. package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +191 -74
  60. package/dist/index.d.ts +8 -1
  61. package/dist/index.js +8 -1
  62. package/dist/interceptors.d.ts +6 -2
  63. package/dist/interceptors.js +13 -8
  64. package/dist/retry.d.ts +18 -0
  65. package/dist/retry.js +225 -23
  66. package/dist/test/procedures.js +100 -5
  67. package/dist/version.d.ts +1 -1
  68. package/dist/version.js +1 -1
  69. package/dist/wait.d.ts +4 -0
  70. package/dist/wait.js +24 -1
  71. package/package.json +3 -2
@@ -1,5 +1,5 @@
1
1
  import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
- import type { Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
2
+ import type { Duration, DurationJson, FieldMask, FieldMaskJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
3
  import type { Message } from "@bufbuild/protobuf";
4
4
  /**
5
5
  * Describes the file toshi/workspace/v1/volumes.proto.
@@ -54,6 +54,125 @@ export type Volume = Message<"toshi.workspace.v1.Volume"> & {
54
54
  * @generated from field: string attached_workload_id = 8;
55
55
  */
56
56
  attachedWorkloadId: string;
57
+ /**
58
+ * The number of its newest saved version; zero when it has none.
59
+ *
60
+ * @generated from field: int64 latest_version = 9;
61
+ */
62
+ latestVersion: bigint;
63
+ /**
64
+ * When its newest version was saved; unset when it has none.
65
+ *
66
+ * @generated from field: google.protobuf.Timestamp latest_version_time = 10;
67
+ */
68
+ latestVersionTime?: Timestamp | undefined;
69
+ /**
70
+ * When it was lost: it had no saved version when the host that held its
71
+ * only copy was removed, and no run mounts it again. Unset while it is
72
+ * not lost.
73
+ *
74
+ * @generated from field: google.protobuf.Timestamp lost_time = 11;
75
+ */
76
+ lostTime?: Timestamp | undefined;
77
+ /**
78
+ * What its newest version's data can be trusted for; unspecified when it
79
+ * has none.
80
+ *
81
+ * @generated from field: toshi.workspace.v1.VolumeConsistency latest_version_consistency = 12;
82
+ */
83
+ latestVersionConsistency: VolumeConsistency;
84
+ /**
85
+ * How often the service, sandbox or CI job that mounts it snapshots it
86
+ * while its VM runs: its workspace's interval. Unset for a volume that is not a
87
+ * state volume, for one kept as a directory, which is never snapshotted,
88
+ * and when the workspace takes no snapshots or saves no versions.
89
+ *
90
+ * @generated from field: google.protobuf.Duration snapshot_interval = 13;
91
+ */
92
+ snapshotInterval?: Duration | undefined;
93
+ /**
94
+ * Why its newest failed save or snapshot saved no version: a pre_save
95
+ * hook that failed, or a copy its host could not take or upload. Empty
96
+ * when none failed. A later version does not clear it: compare
97
+ * last_save_failure_time with latest_version_time.
98
+ *
99
+ * @generated from field: string last_save_failure = 14;
100
+ */
101
+ lastSaveFailure: string;
102
+ /**
103
+ * When that save or snapshot failed; unset when none failed.
104
+ *
105
+ * @generated from field: google.protobuf.Timestamp last_save_failure_time = 15;
106
+ */
107
+ lastSaveFailureTime?: Timestamp | undefined;
108
+ /**
109
+ * How hosts keep a state volume, fixed by the first run that mounts it:
110
+ * a disk on the VM tiers, a directory on the container tier. Later runs
111
+ * go only to hosts that keep it the same way. Unspecified until a run
112
+ * mounted it, and for a volume that is not a state volume.
113
+ *
114
+ * @generated from field: toshi.workspace.v1.VolumeFormat format = 16;
115
+ */
116
+ format: VolumeFormat;
117
+ /**
118
+ * Set when the volume holds a browser profile: it was made as the state
119
+ * volume of a browser service. A volume made before this field is one
120
+ * when it was attached to a browser service then. Read-only; it never
121
+ * changes.
122
+ *
123
+ * @generated from field: bool profile = 17;
124
+ */
125
+ profile: boolean;
126
+ /**
127
+ * The kind of the workload it is attached to, service or sandbox, and
128
+ * that workload's environment, which GetService and GetSandbox take;
129
+ * both empty when it is attached to none.
130
+ *
131
+ * @generated from field: string attached_workload_kind = 18;
132
+ */
133
+ attachedWorkloadKind: string;
134
+ /**
135
+ * @generated from field: string attached_environment = 19;
136
+ */
137
+ attachedEnvironment: string;
138
+ /**
139
+ * Who manages this object: "manifest" when the project manifest declares
140
+ * it, empty when nothing does. A manifest apply sets managed_by,
141
+ * manifest_digest, manifest_origin and managed_fields together.
142
+ *
143
+ * @generated from field: string managed_by = 20;
144
+ */
145
+ managedBy: string;
146
+ /**
147
+ * The SHA-256 of the manifest file that last set this object, as 64
148
+ * lowercase hex characters. Empty when managed_by is empty.
149
+ *
150
+ * @generated from field: string manifest_digest = 21;
151
+ */
152
+ manifestDigest: string;
153
+ /**
154
+ * The fields of this object the manifest declares, as update mask paths.
155
+ * Empty when managed_by is empty.
156
+ *
157
+ * @generated from field: repeated string managed_fields = 22;
158
+ */
159
+ managedFields: string[];
160
+ /**
161
+ * How the manifest came to manage this object: "created" when a manifest
162
+ * apply created it, "adopted" when an apply took over an object that
163
+ * already existed. Empty when managed_by is empty.
164
+ *
165
+ * @generated from field: string manifest_origin = 23;
166
+ */
167
+ manifestOrigin: string;
168
+ /**
169
+ * Set when its newest version is larger than size_cap_bytes: a run that
170
+ * held it while the cap was lowered saved more. No run mounts it until
171
+ * the cap is raised or a version within the cap is restored.
172
+ *
173
+ * @generated from field: bool latest_version_over_cap = 24;
174
+ */
175
+ latestVersionOverCap: boolean;
57
176
  };
58
177
  /**
59
178
  * Volume is a disk of a project.
@@ -104,6 +223,125 @@ export type VolumeJson = {
104
223
  * @generated from field: string attached_workload_id = 8;
105
224
  */
106
225
  attachedWorkloadId?: string;
226
+ /**
227
+ * The number of its newest saved version; zero when it has none.
228
+ *
229
+ * @generated from field: int64 latest_version = 9;
230
+ */
231
+ latestVersion?: string;
232
+ /**
233
+ * When its newest version was saved; unset when it has none.
234
+ *
235
+ * @generated from field: google.protobuf.Timestamp latest_version_time = 10;
236
+ */
237
+ latestVersionTime?: TimestampJson;
238
+ /**
239
+ * When it was lost: it had no saved version when the host that held its
240
+ * only copy was removed, and no run mounts it again. Unset while it is
241
+ * not lost.
242
+ *
243
+ * @generated from field: google.protobuf.Timestamp lost_time = 11;
244
+ */
245
+ lostTime?: TimestampJson;
246
+ /**
247
+ * What its newest version's data can be trusted for; unspecified when it
248
+ * has none.
249
+ *
250
+ * @generated from field: toshi.workspace.v1.VolumeConsistency latest_version_consistency = 12;
251
+ */
252
+ latestVersionConsistency?: VolumeConsistencyJson;
253
+ /**
254
+ * How often the service, sandbox or CI job that mounts it snapshots it
255
+ * while its VM runs: its workspace's interval. Unset for a volume that is not a
256
+ * state volume, for one kept as a directory, which is never snapshotted,
257
+ * and when the workspace takes no snapshots or saves no versions.
258
+ *
259
+ * @generated from field: google.protobuf.Duration snapshot_interval = 13;
260
+ */
261
+ snapshotInterval?: DurationJson;
262
+ /**
263
+ * Why its newest failed save or snapshot saved no version: a pre_save
264
+ * hook that failed, or a copy its host could not take or upload. Empty
265
+ * when none failed. A later version does not clear it: compare
266
+ * last_save_failure_time with latest_version_time.
267
+ *
268
+ * @generated from field: string last_save_failure = 14;
269
+ */
270
+ lastSaveFailure?: string;
271
+ /**
272
+ * When that save or snapshot failed; unset when none failed.
273
+ *
274
+ * @generated from field: google.protobuf.Timestamp last_save_failure_time = 15;
275
+ */
276
+ lastSaveFailureTime?: TimestampJson;
277
+ /**
278
+ * How hosts keep a state volume, fixed by the first run that mounts it:
279
+ * a disk on the VM tiers, a directory on the container tier. Later runs
280
+ * go only to hosts that keep it the same way. Unspecified until a run
281
+ * mounted it, and for a volume that is not a state volume.
282
+ *
283
+ * @generated from field: toshi.workspace.v1.VolumeFormat format = 16;
284
+ */
285
+ format?: VolumeFormatJson;
286
+ /**
287
+ * Set when the volume holds a browser profile: it was made as the state
288
+ * volume of a browser service. A volume made before this field is one
289
+ * when it was attached to a browser service then. Read-only; it never
290
+ * changes.
291
+ *
292
+ * @generated from field: bool profile = 17;
293
+ */
294
+ profile?: boolean;
295
+ /**
296
+ * The kind of the workload it is attached to, service or sandbox, and
297
+ * that workload's environment, which GetService and GetSandbox take;
298
+ * both empty when it is attached to none.
299
+ *
300
+ * @generated from field: string attached_workload_kind = 18;
301
+ */
302
+ attachedWorkloadKind?: string;
303
+ /**
304
+ * @generated from field: string attached_environment = 19;
305
+ */
306
+ attachedEnvironment?: string;
307
+ /**
308
+ * Who manages this object: "manifest" when the project manifest declares
309
+ * it, empty when nothing does. A manifest apply sets managed_by,
310
+ * manifest_digest, manifest_origin and managed_fields together.
311
+ *
312
+ * @generated from field: string managed_by = 20;
313
+ */
314
+ managedBy?: string;
315
+ /**
316
+ * The SHA-256 of the manifest file that last set this object, as 64
317
+ * lowercase hex characters. Empty when managed_by is empty.
318
+ *
319
+ * @generated from field: string manifest_digest = 21;
320
+ */
321
+ manifestDigest?: string;
322
+ /**
323
+ * The fields of this object the manifest declares, as update mask paths.
324
+ * Empty when managed_by is empty.
325
+ *
326
+ * @generated from field: repeated string managed_fields = 22;
327
+ */
328
+ managedFields?: string[];
329
+ /**
330
+ * How the manifest came to manage this object: "created" when a manifest
331
+ * apply created it, "adopted" when an apply took over an object that
332
+ * already existed. Empty when managed_by is empty.
333
+ *
334
+ * @generated from field: string manifest_origin = 23;
335
+ */
336
+ manifestOrigin?: string;
337
+ /**
338
+ * Set when its newest version is larger than size_cap_bytes: a run that
339
+ * held it while the cap was lowered saved more. No run mounts it until
340
+ * the cap is raised or a version within the cap is restored.
341
+ *
342
+ * @generated from field: bool latest_version_over_cap = 24;
343
+ */
344
+ latestVersionOverCap?: boolean;
107
345
  };
108
346
  /**
109
347
  * Describes the message toshi.workspace.v1.Volume.
@@ -112,6 +350,111 @@ export type VolumeJson = {
112
350
  export declare const VolumeSchema: GenMessage<Volume, {
113
351
  jsonType: VolumeJson;
114
352
  }>;
353
+ /**
354
+ * VolumeVersion is a saved copy of a state volume's data.
355
+ *
356
+ * @generated from message toshi.workspace.v1.VolumeVersion
357
+ */
358
+ export type VolumeVersion = Message<"toshi.workspace.v1.VolumeVersion"> & {
359
+ /**
360
+ * One higher than the volume's previous version; the first is 1.
361
+ *
362
+ * @generated from field: int64 number = 1;
363
+ */
364
+ number: bigint;
365
+ /**
366
+ * @generated from field: google.protobuf.Timestamp create_time = 2;
367
+ */
368
+ createTime?: Timestamp | undefined;
369
+ /**
370
+ * The length of the saved copy, in bytes: the disk image, or for a
371
+ * volume kept as a directory the compressed tar of it.
372
+ *
373
+ * @generated from field: int64 size_bytes = 3;
374
+ */
375
+ sizeBytes: bigint;
376
+ /**
377
+ * The hex SHA-256 of the saved copy.
378
+ *
379
+ * @generated from field: string sha256 = 4;
380
+ */
381
+ sha256: string;
382
+ /**
383
+ * The version RestoreVolume copied this one from; zero for one a run
384
+ * saved.
385
+ *
386
+ * @generated from field: int64 restored_from = 5;
387
+ */
388
+ restoredFrom: bigint;
389
+ /**
390
+ * Whether a run saved it when it ended or snapshotted it while it ran.
391
+ *
392
+ * @generated from field: toshi.workspace.v1.VolumeVersionKind kind = 6;
393
+ */
394
+ kind: VolumeVersionKind;
395
+ /**
396
+ * What its data can be trusted for.
397
+ *
398
+ * @generated from field: toshi.workspace.v1.VolumeConsistency consistency = 7;
399
+ */
400
+ consistency: VolumeConsistency;
401
+ };
402
+ /**
403
+ * VolumeVersion is a saved copy of a state volume's data.
404
+ *
405
+ * @generated from message toshi.workspace.v1.VolumeVersion
406
+ */
407
+ export type VolumeVersionJson = {
408
+ /**
409
+ * One higher than the volume's previous version; the first is 1.
410
+ *
411
+ * @generated from field: int64 number = 1;
412
+ */
413
+ number?: string;
414
+ /**
415
+ * @generated from field: google.protobuf.Timestamp create_time = 2;
416
+ */
417
+ createTime?: TimestampJson;
418
+ /**
419
+ * The length of the saved copy, in bytes: the disk image, or for a
420
+ * volume kept as a directory the compressed tar of it.
421
+ *
422
+ * @generated from field: int64 size_bytes = 3;
423
+ */
424
+ sizeBytes?: string;
425
+ /**
426
+ * The hex SHA-256 of the saved copy.
427
+ *
428
+ * @generated from field: string sha256 = 4;
429
+ */
430
+ sha256?: string;
431
+ /**
432
+ * The version RestoreVolume copied this one from; zero for one a run
433
+ * saved.
434
+ *
435
+ * @generated from field: int64 restored_from = 5;
436
+ */
437
+ restoredFrom?: string;
438
+ /**
439
+ * Whether a run saved it when it ended or snapshotted it while it ran.
440
+ *
441
+ * @generated from field: toshi.workspace.v1.VolumeVersionKind kind = 6;
442
+ */
443
+ kind?: VolumeVersionKindJson;
444
+ /**
445
+ * What its data can be trusted for.
446
+ *
447
+ * @generated from field: toshi.workspace.v1.VolumeConsistency consistency = 7;
448
+ */
449
+ consistency?: VolumeConsistencyJson;
450
+ };
451
+ /**
452
+ * Describes the message toshi.workspace.v1.VolumeVersion.
453
+ * Use `create(VolumeVersionSchema)` to create a new message.
454
+ */
455
+ export declare const VolumeVersionSchema: GenMessage<VolumeVersion, {
456
+ jsonType: VolumeVersionJson;
457
+ }>;
115
458
  /**
116
459
  * @generated from message toshi.workspace.v1.ListVolumesRequest
117
460
  */
@@ -132,6 +475,12 @@ export type ListVolumesRequest = Message<"toshi.workspace.v1.ListVolumesRequest"
132
475
  * @generated from field: string page_token = 3;
133
476
  */
134
477
  pageToken: string;
478
+ /**
479
+ * True lists only the volumes that hold a browser profile (profile set).
480
+ *
481
+ * @generated from field: bool profile = 4;
482
+ */
483
+ profile: boolean;
135
484
  };
136
485
  /**
137
486
  * @generated from message toshi.workspace.v1.ListVolumesRequest
@@ -146,57 +495,347 @@ export type ListVolumesRequestJson = {
146
495
  *
147
496
  * @generated from field: int32 page_size = 2;
148
497
  */
149
- pageSize?: number;
498
+ pageSize?: number;
499
+ /**
500
+ * From an earlier response's next_page_token; empty for the first page.
501
+ *
502
+ * @generated from field: string page_token = 3;
503
+ */
504
+ pageToken?: string;
505
+ /**
506
+ * True lists only the volumes that hold a browser profile (profile set).
507
+ *
508
+ * @generated from field: bool profile = 4;
509
+ */
510
+ profile?: boolean;
511
+ };
512
+ /**
513
+ * Describes the message toshi.workspace.v1.ListVolumesRequest.
514
+ * Use `create(ListVolumesRequestSchema)` to create a new message.
515
+ */
516
+ export declare const ListVolumesRequestSchema: GenMessage<ListVolumesRequest, {
517
+ jsonType: ListVolumesRequestJson;
518
+ }>;
519
+ /**
520
+ * @generated from message toshi.workspace.v1.ListVolumesResponse
521
+ */
522
+ export type ListVolumesResponse = Message<"toshi.workspace.v1.ListVolumesResponse"> & {
523
+ /**
524
+ * @generated from field: repeated toshi.workspace.v1.Volume volumes = 1;
525
+ */
526
+ volumes: Volume[];
527
+ /**
528
+ * Empty on the last page.
529
+ *
530
+ * @generated from field: string next_page_token = 2;
531
+ */
532
+ nextPageToken: string;
533
+ };
534
+ /**
535
+ * @generated from message toshi.workspace.v1.ListVolumesResponse
536
+ */
537
+ export type ListVolumesResponseJson = {
538
+ /**
539
+ * @generated from field: repeated toshi.workspace.v1.Volume volumes = 1;
540
+ */
541
+ volumes?: VolumeJson[];
542
+ /**
543
+ * Empty on the last page.
544
+ *
545
+ * @generated from field: string next_page_token = 2;
546
+ */
547
+ nextPageToken?: string;
548
+ };
549
+ /**
550
+ * Describes the message toshi.workspace.v1.ListVolumesResponse.
551
+ * Use `create(ListVolumesResponseSchema)` to create a new message.
552
+ */
553
+ export declare const ListVolumesResponseSchema: GenMessage<ListVolumesResponse, {
554
+ jsonType: ListVolumesResponseJson;
555
+ }>;
556
+ /**
557
+ * @generated from message toshi.workspace.v1.GetVolumeRequest
558
+ */
559
+ export type GetVolumeRequest = Message<"toshi.workspace.v1.GetVolumeRequest"> & {
560
+ /**
561
+ * @generated from field: string project = 1;
562
+ */
563
+ project: string;
564
+ /**
565
+ * @generated from field: string volume_id = 2;
566
+ */
567
+ volumeId: string;
568
+ };
569
+ /**
570
+ * @generated from message toshi.workspace.v1.GetVolumeRequest
571
+ */
572
+ export type GetVolumeRequestJson = {
573
+ /**
574
+ * @generated from field: string project = 1;
575
+ */
576
+ project?: string;
577
+ /**
578
+ * @generated from field: string volume_id = 2;
579
+ */
580
+ volumeId?: string;
581
+ };
582
+ /**
583
+ * Describes the message toshi.workspace.v1.GetVolumeRequest.
584
+ * Use `create(GetVolumeRequestSchema)` to create a new message.
585
+ */
586
+ export declare const GetVolumeRequestSchema: GenMessage<GetVolumeRequest, {
587
+ jsonType: GetVolumeRequestJson;
588
+ }>;
589
+ /**
590
+ * @generated from message toshi.workspace.v1.GetVolumeResponse
591
+ */
592
+ export type GetVolumeResponse = Message<"toshi.workspace.v1.GetVolumeResponse"> & {
593
+ /**
594
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
595
+ */
596
+ volume?: Volume | undefined;
597
+ };
598
+ /**
599
+ * @generated from message toshi.workspace.v1.GetVolumeResponse
600
+ */
601
+ export type GetVolumeResponseJson = {
602
+ /**
603
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
604
+ */
605
+ volume?: VolumeJson;
606
+ };
607
+ /**
608
+ * Describes the message toshi.workspace.v1.GetVolumeResponse.
609
+ * Use `create(GetVolumeResponseSchema)` to create a new message.
610
+ */
611
+ export declare const GetVolumeResponseSchema: GenMessage<GetVolumeResponse, {
612
+ jsonType: GetVolumeResponseJson;
613
+ }>;
614
+ /**
615
+ * @generated from message toshi.workspace.v1.CreateVolumeRequest
616
+ */
617
+ export type CreateVolumeRequest = Message<"toshi.workspace.v1.CreateVolumeRequest"> & {
618
+ /**
619
+ * @generated from field: string project = 1;
620
+ */
621
+ project: string;
622
+ /**
623
+ * Unique among the project's volumes that are not deleted.
624
+ *
625
+ * @generated from field: string name = 2;
626
+ */
627
+ name: string;
628
+ /**
629
+ * @generated from field: toshi.workspace.v1.VolumeMode mode = 3;
630
+ */
631
+ mode: VolumeMode;
632
+ /**
633
+ * The most it holds, in bytes; zero is 10 GiB.
634
+ *
635
+ * @generated from field: int64 size_cap_bytes = 4;
636
+ */
637
+ sizeCapBytes: bigint;
638
+ /**
639
+ * Required: the same key on every retry of this create.
640
+ *
641
+ * @generated from field: string request_key = 5;
642
+ */
643
+ requestKey: string;
644
+ };
645
+ /**
646
+ * @generated from message toshi.workspace.v1.CreateVolumeRequest
647
+ */
648
+ export type CreateVolumeRequestJson = {
649
+ /**
650
+ * @generated from field: string project = 1;
651
+ */
652
+ project?: string;
653
+ /**
654
+ * Unique among the project's volumes that are not deleted.
655
+ *
656
+ * @generated from field: string name = 2;
657
+ */
658
+ name?: string;
659
+ /**
660
+ * @generated from field: toshi.workspace.v1.VolumeMode mode = 3;
661
+ */
662
+ mode?: VolumeModeJson;
663
+ /**
664
+ * The most it holds, in bytes; zero is 10 GiB.
665
+ *
666
+ * @generated from field: int64 size_cap_bytes = 4;
667
+ */
668
+ sizeCapBytes?: string;
669
+ /**
670
+ * Required: the same key on every retry of this create.
671
+ *
672
+ * @generated from field: string request_key = 5;
673
+ */
674
+ requestKey?: string;
675
+ };
676
+ /**
677
+ * Describes the message toshi.workspace.v1.CreateVolumeRequest.
678
+ * Use `create(CreateVolumeRequestSchema)` to create a new message.
679
+ */
680
+ export declare const CreateVolumeRequestSchema: GenMessage<CreateVolumeRequest, {
681
+ jsonType: CreateVolumeRequestJson;
682
+ }>;
683
+ /**
684
+ * @generated from message toshi.workspace.v1.CreateVolumeResponse
685
+ */
686
+ export type CreateVolumeResponse = Message<"toshi.workspace.v1.CreateVolumeResponse"> & {
687
+ /**
688
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
689
+ */
690
+ volume?: Volume | undefined;
691
+ };
692
+ /**
693
+ * @generated from message toshi.workspace.v1.CreateVolumeResponse
694
+ */
695
+ export type CreateVolumeResponseJson = {
696
+ /**
697
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
698
+ */
699
+ volume?: VolumeJson;
700
+ };
701
+ /**
702
+ * Describes the message toshi.workspace.v1.CreateVolumeResponse.
703
+ * Use `create(CreateVolumeResponseSchema)` to create a new message.
704
+ */
705
+ export declare const CreateVolumeResponseSchema: GenMessage<CreateVolumeResponse, {
706
+ jsonType: CreateVolumeResponseJson;
707
+ }>;
708
+ /**
709
+ * @generated from message toshi.workspace.v1.UpdateVolumeRequest
710
+ */
711
+ export type UpdateVolumeRequest = Message<"toshi.workspace.v1.UpdateVolumeRequest"> & {
712
+ /**
713
+ * @generated from field: string project = 1;
714
+ */
715
+ project: string;
716
+ /**
717
+ * id names the volume; the fields update_mask names carry the new
718
+ * values.
719
+ *
720
+ * @generated from field: toshi.workspace.v1.Volume volume = 2;
721
+ */
722
+ volume?: Volume | undefined;
723
+ /**
724
+ * name, size_cap_bytes, or both. The paths managed_by, manifest_digest,
725
+ * manifest_origin and managed_fields set the management mark and go
726
+ * together: all four or none, and on their own; managed_by "manifest"
727
+ * needs the digest, an origin and at least one field path, and an empty
728
+ * managed_by clears all four.
729
+ *
730
+ * @generated from field: google.protobuf.FieldMask update_mask = 3;
731
+ */
732
+ updateMask?: FieldMask | undefined;
733
+ };
734
+ /**
735
+ * @generated from message toshi.workspace.v1.UpdateVolumeRequest
736
+ */
737
+ export type UpdateVolumeRequestJson = {
738
+ /**
739
+ * @generated from field: string project = 1;
740
+ */
741
+ project?: string;
742
+ /**
743
+ * id names the volume; the fields update_mask names carry the new
744
+ * values.
745
+ *
746
+ * @generated from field: toshi.workspace.v1.Volume volume = 2;
747
+ */
748
+ volume?: VolumeJson;
749
+ /**
750
+ * name, size_cap_bytes, or both. The paths managed_by, manifest_digest,
751
+ * manifest_origin and managed_fields set the management mark and go
752
+ * together: all four or none, and on their own; managed_by "manifest"
753
+ * needs the digest, an origin and at least one field path, and an empty
754
+ * managed_by clears all four.
755
+ *
756
+ * @generated from field: google.protobuf.FieldMask update_mask = 3;
757
+ */
758
+ updateMask?: FieldMaskJson;
759
+ };
760
+ /**
761
+ * Describes the message toshi.workspace.v1.UpdateVolumeRequest.
762
+ * Use `create(UpdateVolumeRequestSchema)` to create a new message.
763
+ */
764
+ export declare const UpdateVolumeRequestSchema: GenMessage<UpdateVolumeRequest, {
765
+ jsonType: UpdateVolumeRequestJson;
766
+ }>;
767
+ /**
768
+ * @generated from message toshi.workspace.v1.UpdateVolumeResponse
769
+ */
770
+ export type UpdateVolumeResponse = Message<"toshi.workspace.v1.UpdateVolumeResponse"> & {
771
+ /**
772
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
773
+ */
774
+ volume?: Volume | undefined;
775
+ };
776
+ /**
777
+ * @generated from message toshi.workspace.v1.UpdateVolumeResponse
778
+ */
779
+ export type UpdateVolumeResponseJson = {
150
780
  /**
151
- * From an earlier response's next_page_token; empty for the first page.
152
- *
153
- * @generated from field: string page_token = 3;
781
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
154
782
  */
155
- pageToken?: string;
783
+ volume?: VolumeJson;
156
784
  };
157
785
  /**
158
- * Describes the message toshi.workspace.v1.ListVolumesRequest.
159
- * Use `create(ListVolumesRequestSchema)` to create a new message.
786
+ * Describes the message toshi.workspace.v1.UpdateVolumeResponse.
787
+ * Use `create(UpdateVolumeResponseSchema)` to create a new message.
160
788
  */
161
- export declare const ListVolumesRequestSchema: GenMessage<ListVolumesRequest, {
162
- jsonType: ListVolumesRequestJson;
789
+ export declare const UpdateVolumeResponseSchema: GenMessage<UpdateVolumeResponse, {
790
+ jsonType: UpdateVolumeResponseJson;
163
791
  }>;
164
792
  /**
165
- * @generated from message toshi.workspace.v1.ListVolumesResponse
793
+ * @generated from message toshi.workspace.v1.DeleteVolumeRequest
166
794
  */
167
- export type ListVolumesResponse = Message<"toshi.workspace.v1.ListVolumesResponse"> & {
795
+ export type DeleteVolumeRequest = Message<"toshi.workspace.v1.DeleteVolumeRequest"> & {
168
796
  /**
169
- * @generated from field: repeated toshi.workspace.v1.Volume volumes = 1;
797
+ * @generated from field: string project = 1;
170
798
  */
171
- volumes: Volume[];
799
+ project: string;
172
800
  /**
173
- * Empty on the last page.
174
- *
175
- * @generated from field: string next_page_token = 2;
801
+ * @generated from field: string volume_id = 2;
176
802
  */
177
- nextPageToken: string;
803
+ volumeId: string;
178
804
  };
179
805
  /**
180
- * @generated from message toshi.workspace.v1.ListVolumesResponse
806
+ * @generated from message toshi.workspace.v1.DeleteVolumeRequest
181
807
  */
182
- export type ListVolumesResponseJson = {
808
+ export type DeleteVolumeRequestJson = {
183
809
  /**
184
- * @generated from field: repeated toshi.workspace.v1.Volume volumes = 1;
810
+ * @generated from field: string project = 1;
185
811
  */
186
- volumes?: VolumeJson[];
812
+ project?: string;
187
813
  /**
188
- * Empty on the last page.
189
- *
190
- * @generated from field: string next_page_token = 2;
814
+ * @generated from field: string volume_id = 2;
191
815
  */
192
- nextPageToken?: string;
816
+ volumeId?: string;
193
817
  };
194
818
  /**
195
- * Describes the message toshi.workspace.v1.ListVolumesResponse.
196
- * Use `create(ListVolumesResponseSchema)` to create a new message.
819
+ * Describes the message toshi.workspace.v1.DeleteVolumeRequest.
820
+ * Use `create(DeleteVolumeRequestSchema)` to create a new message.
197
821
  */
198
- export declare const ListVolumesResponseSchema: GenMessage<ListVolumesResponse, {
199
- jsonType: ListVolumesResponseJson;
822
+ export declare const DeleteVolumeRequestSchema: GenMessage<DeleteVolumeRequest, {
823
+ jsonType: DeleteVolumeRequestJson;
824
+ }>;
825
+ /**
826
+ * @generated from message toshi.workspace.v1.DeleteVolumeResponse
827
+ */
828
+ export type DeleteVolumeResponse = Message<"toshi.workspace.v1.DeleteVolumeResponse"> & {};
829
+ /**
830
+ * @generated from message toshi.workspace.v1.DeleteVolumeResponse
831
+ */
832
+ export type DeleteVolumeResponseJson = {};
833
+ /**
834
+ * Describes the message toshi.workspace.v1.DeleteVolumeResponse.
835
+ * Use `create(DeleteVolumeResponseSchema)` to create a new message.
836
+ */
837
+ export declare const DeleteVolumeResponseSchema: GenMessage<DeleteVolumeResponse, {
838
+ jsonType: DeleteVolumeResponseJson;
200
839
  }>;
201
840
  /**
202
841
  * @generated from message toshi.workspace.v1.AttachVolumeRequest
@@ -326,6 +965,182 @@ export type DetachVolumeResponseJson = {
326
965
  export declare const DetachVolumeResponseSchema: GenMessage<DetachVolumeResponse, {
327
966
  jsonType: DetachVolumeResponseJson;
328
967
  }>;
968
+ /**
969
+ * @generated from message toshi.workspace.v1.ListVolumeVersionsRequest
970
+ */
971
+ export type ListVolumeVersionsRequest = Message<"toshi.workspace.v1.ListVolumeVersionsRequest"> & {
972
+ /**
973
+ * @generated from field: string project = 1;
974
+ */
975
+ project: string;
976
+ /**
977
+ * @generated from field: string volume_id = 2;
978
+ */
979
+ volumeId: string;
980
+ /**
981
+ * The most versions in one page; zero lets the server choose.
982
+ *
983
+ * @generated from field: int32 page_size = 3;
984
+ */
985
+ pageSize: number;
986
+ /**
987
+ * From an earlier response's next_page_token; empty for the first page.
988
+ *
989
+ * @generated from field: string page_token = 4;
990
+ */
991
+ pageToken: string;
992
+ };
993
+ /**
994
+ * @generated from message toshi.workspace.v1.ListVolumeVersionsRequest
995
+ */
996
+ export type ListVolumeVersionsRequestJson = {
997
+ /**
998
+ * @generated from field: string project = 1;
999
+ */
1000
+ project?: string;
1001
+ /**
1002
+ * @generated from field: string volume_id = 2;
1003
+ */
1004
+ volumeId?: string;
1005
+ /**
1006
+ * The most versions in one page; zero lets the server choose.
1007
+ *
1008
+ * @generated from field: int32 page_size = 3;
1009
+ */
1010
+ pageSize?: number;
1011
+ /**
1012
+ * From an earlier response's next_page_token; empty for the first page.
1013
+ *
1014
+ * @generated from field: string page_token = 4;
1015
+ */
1016
+ pageToken?: string;
1017
+ };
1018
+ /**
1019
+ * Describes the message toshi.workspace.v1.ListVolumeVersionsRequest.
1020
+ * Use `create(ListVolumeVersionsRequestSchema)` to create a new message.
1021
+ */
1022
+ export declare const ListVolumeVersionsRequestSchema: GenMessage<ListVolumeVersionsRequest, {
1023
+ jsonType: ListVolumeVersionsRequestJson;
1024
+ }>;
1025
+ /**
1026
+ * @generated from message toshi.workspace.v1.ListVolumeVersionsResponse
1027
+ */
1028
+ export type ListVolumeVersionsResponse = Message<"toshi.workspace.v1.ListVolumeVersionsResponse"> & {
1029
+ /**
1030
+ * @generated from field: repeated toshi.workspace.v1.VolumeVersion versions = 1;
1031
+ */
1032
+ versions: VolumeVersion[];
1033
+ /**
1034
+ * Empty on the last page.
1035
+ *
1036
+ * @generated from field: string next_page_token = 2;
1037
+ */
1038
+ nextPageToken: string;
1039
+ };
1040
+ /**
1041
+ * @generated from message toshi.workspace.v1.ListVolumeVersionsResponse
1042
+ */
1043
+ export type ListVolumeVersionsResponseJson = {
1044
+ /**
1045
+ * @generated from field: repeated toshi.workspace.v1.VolumeVersion versions = 1;
1046
+ */
1047
+ versions?: VolumeVersionJson[];
1048
+ /**
1049
+ * Empty on the last page.
1050
+ *
1051
+ * @generated from field: string next_page_token = 2;
1052
+ */
1053
+ nextPageToken?: string;
1054
+ };
1055
+ /**
1056
+ * Describes the message toshi.workspace.v1.ListVolumeVersionsResponse.
1057
+ * Use `create(ListVolumeVersionsResponseSchema)` to create a new message.
1058
+ */
1059
+ export declare const ListVolumeVersionsResponseSchema: GenMessage<ListVolumeVersionsResponse, {
1060
+ jsonType: ListVolumeVersionsResponseJson;
1061
+ }>;
1062
+ /**
1063
+ * @generated from message toshi.workspace.v1.RestoreVolumeRequest
1064
+ */
1065
+ export type RestoreVolumeRequest = Message<"toshi.workspace.v1.RestoreVolumeRequest"> & {
1066
+ /**
1067
+ * @generated from field: string project = 1;
1068
+ */
1069
+ project: string;
1070
+ /**
1071
+ * @generated from field: string volume_id = 2;
1072
+ */
1073
+ volumeId: string;
1074
+ /**
1075
+ * The number of the version to copy.
1076
+ *
1077
+ * @generated from field: int64 version = 3;
1078
+ */
1079
+ version: bigint;
1080
+ };
1081
+ /**
1082
+ * @generated from message toshi.workspace.v1.RestoreVolumeRequest
1083
+ */
1084
+ export type RestoreVolumeRequestJson = {
1085
+ /**
1086
+ * @generated from field: string project = 1;
1087
+ */
1088
+ project?: string;
1089
+ /**
1090
+ * @generated from field: string volume_id = 2;
1091
+ */
1092
+ volumeId?: string;
1093
+ /**
1094
+ * The number of the version to copy.
1095
+ *
1096
+ * @generated from field: int64 version = 3;
1097
+ */
1098
+ version?: string;
1099
+ };
1100
+ /**
1101
+ * Describes the message toshi.workspace.v1.RestoreVolumeRequest.
1102
+ * Use `create(RestoreVolumeRequestSchema)` to create a new message.
1103
+ */
1104
+ export declare const RestoreVolumeRequestSchema: GenMessage<RestoreVolumeRequest, {
1105
+ jsonType: RestoreVolumeRequestJson;
1106
+ }>;
1107
+ /**
1108
+ * @generated from message toshi.workspace.v1.RestoreVolumeResponse
1109
+ */
1110
+ export type RestoreVolumeResponse = Message<"toshi.workspace.v1.RestoreVolumeResponse"> & {
1111
+ /**
1112
+ * The version the restore recorded.
1113
+ *
1114
+ * @generated from field: toshi.workspace.v1.VolumeVersion version = 1;
1115
+ */
1116
+ version?: VolumeVersion | undefined;
1117
+ /**
1118
+ * @generated from field: toshi.workspace.v1.Volume volume = 2;
1119
+ */
1120
+ volume?: Volume | undefined;
1121
+ };
1122
+ /**
1123
+ * @generated from message toshi.workspace.v1.RestoreVolumeResponse
1124
+ */
1125
+ export type RestoreVolumeResponseJson = {
1126
+ /**
1127
+ * The version the restore recorded.
1128
+ *
1129
+ * @generated from field: toshi.workspace.v1.VolumeVersion version = 1;
1130
+ */
1131
+ version?: VolumeVersionJson;
1132
+ /**
1133
+ * @generated from field: toshi.workspace.v1.Volume volume = 2;
1134
+ */
1135
+ volume?: VolumeJson;
1136
+ };
1137
+ /**
1138
+ * Describes the message toshi.workspace.v1.RestoreVolumeResponse.
1139
+ * Use `create(RestoreVolumeResponseSchema)` to create a new message.
1140
+ */
1141
+ export declare const RestoreVolumeResponseSchema: GenMessage<RestoreVolumeResponse, {
1142
+ jsonType: RestoreVolumeResponseJson;
1143
+ }>;
329
1144
  /**
330
1145
  * VolumeMode is what a volume holds and how runs use it.
331
1146
  *
@@ -373,6 +1188,113 @@ export type VolumeModeJson = "VOLUME_MODE_UNSPECIFIED" | "VOLUME_MODE_CACHE" | "
373
1188
  * Describes the enum toshi.workspace.v1.VolumeMode.
374
1189
  */
375
1190
  export declare const VolumeModeSchema: GenEnum<VolumeMode, VolumeModeJson>;
1191
+ /**
1192
+ * VolumeFormat is how hosts keep a state volume, and so what its saved
1193
+ * versions hold.
1194
+ *
1195
+ * @generated from enum toshi.workspace.v1.VolumeFormat
1196
+ */
1197
+ export declare enum VolumeFormat {
1198
+ /**
1199
+ * @generated from enum value: VOLUME_FORMAT_UNSPECIFIED = 0;
1200
+ */
1201
+ UNSPECIFIED = 0,
1202
+ /**
1203
+ * A disk image a VM attaches. A version holds the image.
1204
+ *
1205
+ * @generated from enum value: VOLUME_FORMAT_DISK = 1;
1206
+ */
1207
+ DISK = 1,
1208
+ /**
1209
+ * A directory a container mounts. A version holds a tar of it.
1210
+ *
1211
+ * @generated from enum value: VOLUME_FORMAT_DIRECTORY = 2;
1212
+ */
1213
+ DIRECTORY = 2
1214
+ }
1215
+ /**
1216
+ * VolumeFormat is how hosts keep a state volume, and so what its saved
1217
+ * versions hold.
1218
+ *
1219
+ * @generated from enum toshi.workspace.v1.VolumeFormat
1220
+ */
1221
+ export type VolumeFormatJson = "VOLUME_FORMAT_UNSPECIFIED" | "VOLUME_FORMAT_DISK" | "VOLUME_FORMAT_DIRECTORY";
1222
+ /**
1223
+ * Describes the enum toshi.workspace.v1.VolumeFormat.
1224
+ */
1225
+ export declare const VolumeFormatSchema: GenEnum<VolumeFormat, VolumeFormatJson>;
1226
+ /**
1227
+ * VolumeVersionKind is how a run made a volume version.
1228
+ *
1229
+ * @generated from enum toshi.workspace.v1.VolumeVersionKind
1230
+ */
1231
+ export declare enum VolumeVersionKind {
1232
+ /**
1233
+ * @generated from enum value: VOLUME_VERSION_KIND_UNSPECIFIED = 0;
1234
+ */
1235
+ UNSPECIFIED = 0,
1236
+ /**
1237
+ * Saved when the run that mounted the volume ended, or restored from
1238
+ * such a version.
1239
+ *
1240
+ * @generated from enum value: VOLUME_VERSION_KIND_SAVE = 1;
1241
+ */
1242
+ SAVE = 1,
1243
+ /**
1244
+ * Taken while the run's VM ran. A run's complete snapshot, and its save,
1245
+ * replace its earlier snapshots; an incremental snapshot keeps the ones
1246
+ * it is based on.
1247
+ *
1248
+ * @generated from enum value: VOLUME_VERSION_KIND_SNAPSHOT = 2;
1249
+ */
1250
+ SNAPSHOT = 2
1251
+ }
1252
+ /**
1253
+ * VolumeVersionKind is how a run made a volume version.
1254
+ *
1255
+ * @generated from enum toshi.workspace.v1.VolumeVersionKind
1256
+ */
1257
+ export type VolumeVersionKindJson = "VOLUME_VERSION_KIND_UNSPECIFIED" | "VOLUME_VERSION_KIND_SAVE" | "VOLUME_VERSION_KIND_SNAPSHOT";
1258
+ /**
1259
+ * Describes the enum toshi.workspace.v1.VolumeVersionKind.
1260
+ */
1261
+ export declare const VolumeVersionKindSchema: GenEnum<VolumeVersionKind, VolumeVersionKindJson>;
1262
+ /**
1263
+ * VolumeConsistency is what a volume version's data can be trusted for.
1264
+ *
1265
+ * @generated from enum toshi.workspace.v1.VolumeConsistency
1266
+ */
1267
+ export declare enum VolumeConsistency {
1268
+ /**
1269
+ * @generated from enum value: VOLUME_CONSISTENCY_UNSPECIFIED = 0;
1270
+ */
1271
+ UNSPECIFIED = 0,
1272
+ /**
1273
+ * The data as a power cut would leave it: a file system recovers it, an
1274
+ * application may need to repair what it was writing.
1275
+ *
1276
+ * @generated from enum value: VOLUME_CONSISTENCY_CRASH = 1;
1277
+ */
1278
+ CRASH = 1,
1279
+ /**
1280
+ * The application settled it first: the service's pre_snapshot hook
1281
+ * exited 0 before the snapshot, the run's pre_save hook exited 0 before
1282
+ * the save, or the guest unmounted the volume cleanly before the save.
1283
+ *
1284
+ * @generated from enum value: VOLUME_CONSISTENCY_APPLICATION = 2;
1285
+ */
1286
+ APPLICATION = 2
1287
+ }
1288
+ /**
1289
+ * VolumeConsistency is what a volume version's data can be trusted for.
1290
+ *
1291
+ * @generated from enum toshi.workspace.v1.VolumeConsistency
1292
+ */
1293
+ export type VolumeConsistencyJson = "VOLUME_CONSISTENCY_UNSPECIFIED" | "VOLUME_CONSISTENCY_CRASH" | "VOLUME_CONSISTENCY_APPLICATION";
1294
+ /**
1295
+ * Describes the enum toshi.workspace.v1.VolumeConsistency.
1296
+ */
1297
+ export declare const VolumeConsistencySchema: GenEnum<VolumeConsistency, VolumeConsistencyJson>;
376
1298
  /**
377
1299
  * VolumeService keeps a workspace's volumes: each belongs to one project,
378
1300
  * and a state volume attaches to one service or sandbox of that project at
@@ -387,9 +1309,11 @@ export declare const VolumeModeSchema: GenEnum<VolumeMode, VolumeModeJson>;
387
1309
  * whether the workspace has it or not, and a workload of another project
388
1310
  * is NOT_FOUND.
389
1311
  *
390
- * The calls take no request_key: attaching a volume to the workload it is
391
- * attached to, while no run holds it, and detaching a detached volume
392
- * return it as it is.
1312
+ * CreateVolume takes a request_key; the other calls take none: attaching a
1313
+ * volume to the workload it is attached to, while no run holds it, and
1314
+ * detaching a detached volume return it as it is. UpdateVolume sent twice
1315
+ * ends with the same values. RestoreVolume sent twice records two
1316
+ * versions, each a copy of the one it names.
393
1317
  *
394
1318
  * @generated from service toshi.workspace.v1.VolumeService
395
1319
  */
@@ -407,6 +1331,51 @@ export declare const VolumeService: GenService<{
407
1331
  input: typeof ListVolumesRequestSchema;
408
1332
  output: typeof ListVolumesResponseSchema;
409
1333
  };
1334
+ /**
1335
+ * GetVolume returns one of the project's volumes that is not deleted.
1336
+ *
1337
+ * @generated from rpc toshi.workspace.v1.VolumeService.GetVolume
1338
+ */
1339
+ getVolume: {
1340
+ methodKind: "unary";
1341
+ input: typeof GetVolumeRequestSchema;
1342
+ output: typeof GetVolumeResponseSchema;
1343
+ };
1344
+ /**
1345
+ * CreateVolume makes a volume in the project, in any of the four modes:
1346
+ * empty, with no version, and attached to nothing. A name another of the
1347
+ * project's volumes has, deleted ones aside, fails with ALREADY_EXISTS. A
1348
+ * name a service could not take, a missing mode and a negative size cap
1349
+ * fail with INVALID_ARGUMENT; a size cap of zero is 10 GiB.
1350
+ *
1351
+ * The same request sent again with its request_key returns the volume the
1352
+ * first one made; the key with a different request fails with
1353
+ * FAILED_PRECONDITION.
1354
+ *
1355
+ * @generated from rpc toshi.workspace.v1.VolumeService.CreateVolume
1356
+ */
1357
+ createVolume: {
1358
+ methodKind: "unary";
1359
+ input: typeof CreateVolumeRequestSchema;
1360
+ output: typeof CreateVolumeResponseSchema;
1361
+ };
1362
+ /**
1363
+ * UpdateVolume renames a volume or changes its size cap, the two paths
1364
+ * update_mask may name; its mode is fixed. A name another of the
1365
+ * project's volumes has, deleted ones aside, fails with ALREADY_EXISTS.
1366
+ * A size cap below the newest version's size, a negative one, a mode
1367
+ * path and any other path fail with INVALID_ARGUMENT; a size cap of zero
1368
+ * is 10 GiB. A volume may be renamed while attached or held by a run; an
1369
+ * environment that allows a CI job's state volume by its old name no
1370
+ * longer matches it.
1371
+ *
1372
+ * @generated from rpc toshi.workspace.v1.VolumeService.UpdateVolume
1373
+ */
1374
+ updateVolume: {
1375
+ methodKind: "unary";
1376
+ input: typeof UpdateVolumeRequestSchema;
1377
+ output: typeof UpdateVolumeResponseSchema;
1378
+ };
410
1379
  /**
411
1380
  * AttachVolume attaches a state volume to a service or sandbox: the
412
1381
  * service's next run mounts it, and a sandbox mounts it when it starts.
@@ -441,4 +1410,54 @@ export declare const VolumeService: GenService<{
441
1410
  input: typeof DetachVolumeRequestSchema;
442
1411
  output: typeof DetachVolumeResponseSchema;
443
1412
  };
1413
+ /**
1414
+ * DeleteVolume deletes a volume with its saved versions and their data.
1415
+ * A volume attached to a service or sandbox, one a run holds and one a
1416
+ * job that has not ended names fail with FAILED_PRECONDITION. Its name is
1417
+ * free for a new volume at once, and its versions' data is removed from
1418
+ * object storage shortly after. An environment that allows a CI job's
1419
+ * state volume by name keeps that name, and a later volume of the name
1420
+ * matches it.
1421
+ *
1422
+ * @generated from rpc toshi.workspace.v1.VolumeService.DeleteVolume
1423
+ */
1424
+ deleteVolume: {
1425
+ methodKind: "unary";
1426
+ input: typeof DeleteVolumeRequestSchema;
1427
+ output: typeof DeleteVolumeResponseSchema;
1428
+ };
1429
+ /**
1430
+ * ListVolumeVersions returns a state volume's saved versions, newest
1431
+ * first. A run that releases the volume saves its data as the next
1432
+ * version when the workspace has object storage. The volume keeps its
1433
+ * five newest saves and any version after the oldest of them, the one a
1434
+ * run holding it started from and any a kept version is based on; the
1435
+ * others expire and are not listed.
1436
+ *
1437
+ * A page holds 100 versions when page_size is zero, and 1000 at most.
1438
+ *
1439
+ * @generated from rpc toshi.workspace.v1.VolumeService.ListVolumeVersions
1440
+ */
1441
+ listVolumeVersions: {
1442
+ methodKind: "unary";
1443
+ input: typeof ListVolumeVersionsRequestSchema;
1444
+ output: typeof ListVolumeVersionsResponseSchema;
1445
+ };
1446
+ /**
1447
+ * RestoreVolume copies one of a state volume's versions as its next
1448
+ * version, so the next run that mounts the volume starts from that data.
1449
+ * The new version names the version it was copied from. A volume a run
1450
+ * holds fails with FAILED_PRECONDITION, as do a volume that is not a
1451
+ * state volume and an expired version, and so does a control plane that
1452
+ * keeps no versions. A version below 1 fails with INVALID_ARGUMENT, and
1453
+ * one the volume does not have is NOT_FOUND. A copy the storage provider
1454
+ * cannot make fails with UNAVAILABLE.
1455
+ *
1456
+ * @generated from rpc toshi.workspace.v1.VolumeService.RestoreVolume
1457
+ */
1458
+ restoreVolume: {
1459
+ methodKind: "unary";
1460
+ input: typeof RestoreVolumeRequestSchema;
1461
+ output: typeof RestoreVolumeResponseSchema;
1462
+ };
444
1463
  }>;