@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,182 @@
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=ts,json_types=true,import_extension=js"
2
+ // @generated from file toshi/workspace/v1/secrets.proto (package toshi.workspace.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
5
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
6
+ /**
7
+ * Describes the file toshi/workspace/v1/secrets.proto.
8
+ */
9
+ export const file_toshi_workspace_v1_secrets = /*@__PURE__*/ fileDesc("CiB0b3NoaS93b3Jrc3BhY2UvdjEvc2VjcmV0cy5wcm90bxISdG9zaGkud29ya3NwYWNlLnYxInEKCVNlY3JldFNldBIPCgdwcm9qZWN0GAEgASgJEhMKC2Vudmlyb25tZW50GAIgASgJEg4KBnNoYXJlZBgDIAEoCBIuCgpjcmVhdGVkX2F0GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJlCgZTZWNyZXQSDAoEbmFtZRgBIAEoCRIPCgd2ZXJzaW9uGAIgASgDEgwKBHNpemUYAyABKAMSLgoKdXBkYXRlZF9hdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiXgoNU2VjcmV0VmVyc2lvbhIPCgd2ZXJzaW9uGAEgASgDEgwKBHNpemUYAiABKAMSLgoKY3JlYX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3BhY2V2MWIGcHJvdG8z", [file_google_protobuf_timestamp]);
10
+ /**
11
+ * Describes the message toshi.workspace.v1.SecretSet.
12
+ * Use `create(SecretSetSchema)` to create a new message.
13
+ */
14
+ export const SecretSetSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 0);
15
+ /**
16
+ * Describes the message toshi.workspace.v1.Secret.
17
+ * Use `create(SecretSchema)` to create a new message.
18
+ */
19
+ export const SecretSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 1);
20
+ /**
21
+ * Describes the message toshi.workspace.v1.SecretVersion.
22
+ * Use `create(SecretVersionSchema)` to create a new message.
23
+ */
24
+ export const SecretVersionSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 2);
25
+ /**
26
+ * Describes the message toshi.workspace.v1.SecretGrant.
27
+ * Use `create(SecretGrantSchema)` to create a new message.
28
+ */
29
+ export const SecretGrantSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 3);
30
+ /**
31
+ * Describes the message toshi.workspace.v1.CreateSecretSetRequest.
32
+ * Use `create(CreateSecretSetRequestSchema)` to create a new message.
33
+ */
34
+ export const CreateSecretSetRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 4);
35
+ /**
36
+ * Describes the message toshi.workspace.v1.CreateSecretSetResponse.
37
+ * Use `create(CreateSecretSetResponseSchema)` to create a new message.
38
+ */
39
+ export const CreateSecretSetResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 5);
40
+ /**
41
+ * Describes the message toshi.workspace.v1.ListSecretSetsRequest.
42
+ * Use `create(ListSecretSetsRequestSchema)` to create a new message.
43
+ */
44
+ export const ListSecretSetsRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 6);
45
+ /**
46
+ * Describes the message toshi.workspace.v1.ListSecretSetsResponse.
47
+ * Use `create(ListSecretSetsResponseSchema)` to create a new message.
48
+ */
49
+ export const ListSecretSetsResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 7);
50
+ /**
51
+ * Describes the message toshi.workspace.v1.DeleteSecretSetRequest.
52
+ * Use `create(DeleteSecretSetRequestSchema)` to create a new message.
53
+ */
54
+ export const DeleteSecretSetRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 8);
55
+ /**
56
+ * Describes the message toshi.workspace.v1.DeleteSecretSetResponse.
57
+ * Use `create(DeleteSecretSetResponseSchema)` to create a new message.
58
+ */
59
+ export const DeleteSecretSetResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 9);
60
+ /**
61
+ * Describes the message toshi.workspace.v1.PutSecretRequest.
62
+ * Use `create(PutSecretRequestSchema)` to create a new message.
63
+ */
64
+ export const PutSecretRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 10);
65
+ /**
66
+ * Describes the message toshi.workspace.v1.PutSecretResponse.
67
+ * Use `create(PutSecretResponseSchema)` to create a new message.
68
+ */
69
+ export const PutSecretResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 11);
70
+ /**
71
+ * Describes the message toshi.workspace.v1.DeleteSecretRequest.
72
+ * Use `create(DeleteSecretRequestSchema)` to create a new message.
73
+ */
74
+ export const DeleteSecretRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 12);
75
+ /**
76
+ * Describes the message toshi.workspace.v1.DeleteSecretResponse.
77
+ * Use `create(DeleteSecretResponseSchema)` to create a new message.
78
+ */
79
+ export const DeleteSecretResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 13);
80
+ /**
81
+ * Describes the message toshi.workspace.v1.ListSecretsRequest.
82
+ * Use `create(ListSecretsRequestSchema)` to create a new message.
83
+ */
84
+ export const ListSecretsRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 14);
85
+ /**
86
+ * Describes the message toshi.workspace.v1.ListSecretsResponse.
87
+ * Use `create(ListSecretsResponseSchema)` to create a new message.
88
+ */
89
+ export const ListSecretsResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 15);
90
+ /**
91
+ * Describes the message toshi.workspace.v1.ListSecretVersionsRequest.
92
+ * Use `create(ListSecretVersionsRequestSchema)` to create a new message.
93
+ */
94
+ export const ListSecretVersionsRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 16);
95
+ /**
96
+ * Describes the message toshi.workspace.v1.ListSecretVersionsResponse.
97
+ * Use `create(ListSecretVersionsResponseSchema)` to create a new message.
98
+ */
99
+ export const ListSecretVersionsResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 17);
100
+ /**
101
+ * Describes the message toshi.workspace.v1.GrantSecretSetRequest.
102
+ * Use `create(GrantSecretSetRequestSchema)` to create a new message.
103
+ */
104
+ export const GrantSecretSetRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 18);
105
+ /**
106
+ * Describes the message toshi.workspace.v1.GrantSecretSetResponse.
107
+ * Use `create(GrantSecretSetResponseSchema)` to create a new message.
108
+ */
109
+ export const GrantSecretSetResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 19);
110
+ /**
111
+ * Describes the message toshi.workspace.v1.RevokeSecretSetRequest.
112
+ * Use `create(RevokeSecretSetRequestSchema)` to create a new message.
113
+ */
114
+ export const RevokeSecretSetRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 20);
115
+ /**
116
+ * Describes the message toshi.workspace.v1.RevokeSecretSetResponse.
117
+ * Use `create(RevokeSecretSetResponseSchema)` to create a new message.
118
+ */
119
+ export const RevokeSecretSetResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 21);
120
+ /**
121
+ * Describes the message toshi.workspace.v1.ListSecretSetGrantsRequest.
122
+ * Use `create(ListSecretSetGrantsRequestSchema)` to create a new message.
123
+ */
124
+ export const ListSecretSetGrantsRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 22);
125
+ /**
126
+ * Describes the message toshi.workspace.v1.ListSecretSetGrantsResponse.
127
+ * Use `create(ListSecretSetGrantsResponseSchema)` to create a new message.
128
+ */
129
+ export const ListSecretSetGrantsResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_secrets, 23);
130
+ /**
131
+ * SecretGranteeKind is what a set is granted to.
132
+ *
133
+ * @generated from enum toshi.workspace.v1.SecretGranteeKind
134
+ */
135
+ export var SecretGranteeKind;
136
+ (function (SecretGranteeKind) {
137
+ /**
138
+ * @generated from enum value: SECRET_GRANTEE_KIND_UNSPECIFIED = 0;
139
+ */
140
+ SecretGranteeKind[SecretGranteeKind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
141
+ /**
142
+ * VMs of a workload kind: grantee is job, sandbox or service.
143
+ *
144
+ * @generated from enum value: SECRET_GRANTEE_KIND_KIND = 1;
145
+ */
146
+ SecretGranteeKind[SecretGranteeKind["KIND"] = 1] = "KIND";
147
+ /**
148
+ * VMs of an image: grantee is the image's name.
149
+ *
150
+ * @generated from enum value: SECRET_GRANTEE_KIND_IMAGE = 2;
151
+ */
152
+ SecretGranteeKind[SecretGranteeKind["IMAGE"] = 2] = "IMAGE";
153
+ /**
154
+ * One service: grantee is its name.
155
+ *
156
+ * @generated from enum value: SECRET_GRANTEE_KIND_SERVICE = 3;
157
+ */
158
+ SecretGranteeKind[SecretGranteeKind["SERVICE"] = 3] = "SERVICE";
159
+ })(SecretGranteeKind || (SecretGranteeKind = {}));
160
+ /**
161
+ * Describes the enum toshi.workspace.v1.SecretGranteeKind.
162
+ */
163
+ export const SecretGranteeKindSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_secrets, 0);
164
+ /**
165
+ * SecretService keeps a workspace's secrets: a project's sets,
166
+ * their write-only keys and their grants. Each value is sealed with
167
+ * AES-256-GCM under the workspace's data key before the store sees it, and
168
+ * every version of a key is kept until the key or its set is deleted.
169
+ *
170
+ * The caller's credential names the workspace, as for WorkloadService.
171
+ * Every request names a set by its project and either its environment or
172
+ * shared, which is the project's shared set; a request that names both, or
173
+ * neither, fails with INVALID_ARGUMENT. A project or environment the
174
+ * workspace does not have is NOT_FOUND.
175
+ *
176
+ * No call returns a value: a key is answered with its name, version, size
177
+ * and time. The calls take no request_key: a retried PutSecret makes one
178
+ * more version.
179
+ *
180
+ * @generated from service toshi.workspace.v1.SecretService
181
+ */
182
+ export const SecretService = /*@__PURE__*/ serviceDesc(file_toshi_workspace_v1_secrets, 0);
@@ -0,0 +1,444 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
+ import type { Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file toshi/workspace/v1/volumes.proto.
6
+ */
7
+ export declare const file_toshi_workspace_v1_volumes: GenFile;
8
+ /**
9
+ * Volume is a disk of a project.
10
+ *
11
+ * @generated from message toshi.workspace.v1.Volume
12
+ */
13
+ export type Volume = Message<"toshi.workspace.v1.Volume"> & {
14
+ /**
15
+ * @generated from field: string id = 1;
16
+ */
17
+ id: string;
18
+ /**
19
+ * Its name, unique among the project's volumes that are not deleted.
20
+ *
21
+ * @generated from field: string name = 2;
22
+ */
23
+ name: string;
24
+ /**
25
+ * The name of the project it belongs to.
26
+ *
27
+ * @generated from field: string project = 3;
28
+ */
29
+ project: string;
30
+ /**
31
+ * The id of the project it belongs to.
32
+ *
33
+ * @generated from field: string project_id = 4;
34
+ */
35
+ projectId: string;
36
+ /**
37
+ * @generated from field: toshi.workspace.v1.VolumeMode mode = 5;
38
+ */
39
+ mode: VolumeMode;
40
+ /**
41
+ * The most it holds, in bytes.
42
+ *
43
+ * @generated from field: int64 size_cap_bytes = 6;
44
+ */
45
+ sizeCapBytes: bigint;
46
+ /**
47
+ * @generated from field: google.protobuf.Timestamp create_time = 7;
48
+ */
49
+ createTime?: Timestamp | undefined;
50
+ /**
51
+ * The service or sandbox it is attached to; empty when it is attached to
52
+ * none.
53
+ *
54
+ * @generated from field: string attached_workload_id = 8;
55
+ */
56
+ attachedWorkloadId: string;
57
+ };
58
+ /**
59
+ * Volume is a disk of a project.
60
+ *
61
+ * @generated from message toshi.workspace.v1.Volume
62
+ */
63
+ export type VolumeJson = {
64
+ /**
65
+ * @generated from field: string id = 1;
66
+ */
67
+ id?: string;
68
+ /**
69
+ * Its name, unique among the project's volumes that are not deleted.
70
+ *
71
+ * @generated from field: string name = 2;
72
+ */
73
+ name?: string;
74
+ /**
75
+ * The name of the project it belongs to.
76
+ *
77
+ * @generated from field: string project = 3;
78
+ */
79
+ project?: string;
80
+ /**
81
+ * The id of the project it belongs to.
82
+ *
83
+ * @generated from field: string project_id = 4;
84
+ */
85
+ projectId?: string;
86
+ /**
87
+ * @generated from field: toshi.workspace.v1.VolumeMode mode = 5;
88
+ */
89
+ mode?: VolumeModeJson;
90
+ /**
91
+ * The most it holds, in bytes.
92
+ *
93
+ * @generated from field: int64 size_cap_bytes = 6;
94
+ */
95
+ sizeCapBytes?: string;
96
+ /**
97
+ * @generated from field: google.protobuf.Timestamp create_time = 7;
98
+ */
99
+ createTime?: TimestampJson;
100
+ /**
101
+ * The service or sandbox it is attached to; empty when it is attached to
102
+ * none.
103
+ *
104
+ * @generated from field: string attached_workload_id = 8;
105
+ */
106
+ attachedWorkloadId?: string;
107
+ };
108
+ /**
109
+ * Describes the message toshi.workspace.v1.Volume.
110
+ * Use `create(VolumeSchema)` to create a new message.
111
+ */
112
+ export declare const VolumeSchema: GenMessage<Volume, {
113
+ jsonType: VolumeJson;
114
+ }>;
115
+ /**
116
+ * @generated from message toshi.workspace.v1.ListVolumesRequest
117
+ */
118
+ export type ListVolumesRequest = Message<"toshi.workspace.v1.ListVolumesRequest"> & {
119
+ /**
120
+ * @generated from field: string project = 1;
121
+ */
122
+ project: string;
123
+ /**
124
+ * The most volumes in one page; zero lets the server choose.
125
+ *
126
+ * @generated from field: int32 page_size = 2;
127
+ */
128
+ pageSize: number;
129
+ /**
130
+ * From an earlier response's next_page_token; empty for the first page.
131
+ *
132
+ * @generated from field: string page_token = 3;
133
+ */
134
+ pageToken: string;
135
+ };
136
+ /**
137
+ * @generated from message toshi.workspace.v1.ListVolumesRequest
138
+ */
139
+ export type ListVolumesRequestJson = {
140
+ /**
141
+ * @generated from field: string project = 1;
142
+ */
143
+ project?: string;
144
+ /**
145
+ * The most volumes in one page; zero lets the server choose.
146
+ *
147
+ * @generated from field: int32 page_size = 2;
148
+ */
149
+ pageSize?: number;
150
+ /**
151
+ * From an earlier response's next_page_token; empty for the first page.
152
+ *
153
+ * @generated from field: string page_token = 3;
154
+ */
155
+ pageToken?: string;
156
+ };
157
+ /**
158
+ * Describes the message toshi.workspace.v1.ListVolumesRequest.
159
+ * Use `create(ListVolumesRequestSchema)` to create a new message.
160
+ */
161
+ export declare const ListVolumesRequestSchema: GenMessage<ListVolumesRequest, {
162
+ jsonType: ListVolumesRequestJson;
163
+ }>;
164
+ /**
165
+ * @generated from message toshi.workspace.v1.ListVolumesResponse
166
+ */
167
+ export type ListVolumesResponse = Message<"toshi.workspace.v1.ListVolumesResponse"> & {
168
+ /**
169
+ * @generated from field: repeated toshi.workspace.v1.Volume volumes = 1;
170
+ */
171
+ volumes: Volume[];
172
+ /**
173
+ * Empty on the last page.
174
+ *
175
+ * @generated from field: string next_page_token = 2;
176
+ */
177
+ nextPageToken: string;
178
+ };
179
+ /**
180
+ * @generated from message toshi.workspace.v1.ListVolumesResponse
181
+ */
182
+ export type ListVolumesResponseJson = {
183
+ /**
184
+ * @generated from field: repeated toshi.workspace.v1.Volume volumes = 1;
185
+ */
186
+ volumes?: VolumeJson[];
187
+ /**
188
+ * Empty on the last page.
189
+ *
190
+ * @generated from field: string next_page_token = 2;
191
+ */
192
+ nextPageToken?: string;
193
+ };
194
+ /**
195
+ * Describes the message toshi.workspace.v1.ListVolumesResponse.
196
+ * Use `create(ListVolumesResponseSchema)` to create a new message.
197
+ */
198
+ export declare const ListVolumesResponseSchema: GenMessage<ListVolumesResponse, {
199
+ jsonType: ListVolumesResponseJson;
200
+ }>;
201
+ /**
202
+ * @generated from message toshi.workspace.v1.AttachVolumeRequest
203
+ */
204
+ export type AttachVolumeRequest = Message<"toshi.workspace.v1.AttachVolumeRequest"> & {
205
+ /**
206
+ * @generated from field: string project = 1;
207
+ */
208
+ project: string;
209
+ /**
210
+ * @generated from field: string volume_id = 2;
211
+ */
212
+ volumeId: string;
213
+ /**
214
+ * The service's or sandbox's workload id.
215
+ *
216
+ * @generated from field: string workload_id = 3;
217
+ */
218
+ workloadId: string;
219
+ };
220
+ /**
221
+ * @generated from message toshi.workspace.v1.AttachVolumeRequest
222
+ */
223
+ export type AttachVolumeRequestJson = {
224
+ /**
225
+ * @generated from field: string project = 1;
226
+ */
227
+ project?: string;
228
+ /**
229
+ * @generated from field: string volume_id = 2;
230
+ */
231
+ volumeId?: string;
232
+ /**
233
+ * The service's or sandbox's workload id.
234
+ *
235
+ * @generated from field: string workload_id = 3;
236
+ */
237
+ workloadId?: string;
238
+ };
239
+ /**
240
+ * Describes the message toshi.workspace.v1.AttachVolumeRequest.
241
+ * Use `create(AttachVolumeRequestSchema)` to create a new message.
242
+ */
243
+ export declare const AttachVolumeRequestSchema: GenMessage<AttachVolumeRequest, {
244
+ jsonType: AttachVolumeRequestJson;
245
+ }>;
246
+ /**
247
+ * @generated from message toshi.workspace.v1.AttachVolumeResponse
248
+ */
249
+ export type AttachVolumeResponse = Message<"toshi.workspace.v1.AttachVolumeResponse"> & {
250
+ /**
251
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
252
+ */
253
+ volume?: Volume | undefined;
254
+ };
255
+ /**
256
+ * @generated from message toshi.workspace.v1.AttachVolumeResponse
257
+ */
258
+ export type AttachVolumeResponseJson = {
259
+ /**
260
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
261
+ */
262
+ volume?: VolumeJson;
263
+ };
264
+ /**
265
+ * Describes the message toshi.workspace.v1.AttachVolumeResponse.
266
+ * Use `create(AttachVolumeResponseSchema)` to create a new message.
267
+ */
268
+ export declare const AttachVolumeResponseSchema: GenMessage<AttachVolumeResponse, {
269
+ jsonType: AttachVolumeResponseJson;
270
+ }>;
271
+ /**
272
+ * @generated from message toshi.workspace.v1.DetachVolumeRequest
273
+ */
274
+ export type DetachVolumeRequest = Message<"toshi.workspace.v1.DetachVolumeRequest"> & {
275
+ /**
276
+ * @generated from field: string project = 1;
277
+ */
278
+ project: string;
279
+ /**
280
+ * @generated from field: string volume_id = 2;
281
+ */
282
+ volumeId: string;
283
+ };
284
+ /**
285
+ * @generated from message toshi.workspace.v1.DetachVolumeRequest
286
+ */
287
+ export type DetachVolumeRequestJson = {
288
+ /**
289
+ * @generated from field: string project = 1;
290
+ */
291
+ project?: string;
292
+ /**
293
+ * @generated from field: string volume_id = 2;
294
+ */
295
+ volumeId?: string;
296
+ };
297
+ /**
298
+ * Describes the message toshi.workspace.v1.DetachVolumeRequest.
299
+ * Use `create(DetachVolumeRequestSchema)` to create a new message.
300
+ */
301
+ export declare const DetachVolumeRequestSchema: GenMessage<DetachVolumeRequest, {
302
+ jsonType: DetachVolumeRequestJson;
303
+ }>;
304
+ /**
305
+ * @generated from message toshi.workspace.v1.DetachVolumeResponse
306
+ */
307
+ export type DetachVolumeResponse = Message<"toshi.workspace.v1.DetachVolumeResponse"> & {
308
+ /**
309
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
310
+ */
311
+ volume?: Volume | undefined;
312
+ };
313
+ /**
314
+ * @generated from message toshi.workspace.v1.DetachVolumeResponse
315
+ */
316
+ export type DetachVolumeResponseJson = {
317
+ /**
318
+ * @generated from field: toshi.workspace.v1.Volume volume = 1;
319
+ */
320
+ volume?: VolumeJson;
321
+ };
322
+ /**
323
+ * Describes the message toshi.workspace.v1.DetachVolumeResponse.
324
+ * Use `create(DetachVolumeResponseSchema)` to create a new message.
325
+ */
326
+ export declare const DetachVolumeResponseSchema: GenMessage<DetachVolumeResponse, {
327
+ jsonType: DetachVolumeResponseJson;
328
+ }>;
329
+ /**
330
+ * VolumeMode is what a volume holds and how runs use it.
331
+ *
332
+ * @generated from enum toshi.workspace.v1.VolumeMode
333
+ */
334
+ export declare enum VolumeMode {
335
+ /**
336
+ * @generated from enum value: VOLUME_MODE_UNSPECIFIED = 0;
337
+ */
338
+ UNSPECIFIED = 0,
339
+ /**
340
+ * A package or build cache: every run gets an overlay of it, and a
341
+ * trusted success makes the next generation.
342
+ *
343
+ * @generated from enum value: VOLUME_MODE_CACHE = 1;
344
+ */
345
+ CACHE = 1,
346
+ /**
347
+ * Data every run gets an overlay of; nothing a run writes is kept.
348
+ *
349
+ * @generated from enum value: VOLUME_MODE_SEED = 2;
350
+ */
351
+ SEED = 2,
352
+ /**
353
+ * Mounted read-write by one VM at a time; what a run writes is kept
354
+ * for the next.
355
+ *
356
+ * @generated from enum value: VOLUME_MODE_STATE = 3;
357
+ */
358
+ STATE = 3,
359
+ /**
360
+ * Written once and read anywhere.
361
+ *
362
+ * @generated from enum value: VOLUME_MODE_ARTIFACT = 4;
363
+ */
364
+ ARTIFACT = 4
365
+ }
366
+ /**
367
+ * VolumeMode is what a volume holds and how runs use it.
368
+ *
369
+ * @generated from enum toshi.workspace.v1.VolumeMode
370
+ */
371
+ export type VolumeModeJson = "VOLUME_MODE_UNSPECIFIED" | "VOLUME_MODE_CACHE" | "VOLUME_MODE_SEED" | "VOLUME_MODE_STATE" | "VOLUME_MODE_ARTIFACT";
372
+ /**
373
+ * Describes the enum toshi.workspace.v1.VolumeMode.
374
+ */
375
+ export declare const VolumeModeSchema: GenEnum<VolumeMode, VolumeModeJson>;
376
+ /**
377
+ * VolumeService keeps a workspace's volumes: each belongs to one project,
378
+ * and a state volume attaches to one service or sandbox of that project at
379
+ * a time. A state volume is mounted by one VM at a time, whichever run of
380
+ * its workload holds it.
381
+ *
382
+ * The caller's credential names the workspace, as for WorkloadService.
383
+ * Every request names a project; an empty one is the default project. A
384
+ * project the workspace does not have is NOT_FOUND, and so is a volume of
385
+ * another project or workspace and a workload of another workspace. With a
386
+ * token limited to one project, any other project is PERMISSION_DENIED,
387
+ * whether the workspace has it or not, and a workload of another project
388
+ * is NOT_FOUND.
389
+ *
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.
393
+ *
394
+ * @generated from service toshi.workspace.v1.VolumeService
395
+ */
396
+ export declare const VolumeService: GenService<{
397
+ /**
398
+ * ListVolumes returns the project's volumes that are not deleted,
399
+ * ordered by name.
400
+ *
401
+ * A page holds 100 volumes when page_size is zero, and 1000 at most.
402
+ *
403
+ * @generated from rpc toshi.workspace.v1.VolumeService.ListVolumes
404
+ */
405
+ listVolumes: {
406
+ methodKind: "unary";
407
+ input: typeof ListVolumesRequestSchema;
408
+ output: typeof ListVolumesResponseSchema;
409
+ };
410
+ /**
411
+ * AttachVolume attaches a state volume to a service or sandbox: the
412
+ * service's next run mounts it, and a sandbox mounts it when it starts.
413
+ * A workload has at most one volume, and a volume at most one workload.
414
+ * A volume that is not a state volume, a workload that is not a service
415
+ * or a sandbox, or a workload of another project fails with
416
+ * FAILED_PRECONDITION, as does a volume attached to another workload, a
417
+ * workload with a volume already, a volume a run still holds, a service
418
+ * with a live run and a sandbox whose job is no longer queued. A sandbox
419
+ * leaves the queue within moments, so name its volume in the sandbox's
420
+ * create (SandboxSpec.state_volume_id).
421
+ *
422
+ * @generated from rpc toshi.workspace.v1.VolumeService.AttachVolume
423
+ */
424
+ attachVolume: {
425
+ methodKind: "unary";
426
+ input: typeof AttachVolumeRequestSchema;
427
+ output: typeof AttachVolumeResponseSchema;
428
+ };
429
+ /**
430
+ * DetachVolume clears a volume's attachment and keeps the volume and its
431
+ * data. A volume a run still holds, one of a service with a live run and
432
+ * one of a sandbox whose job has been assigned and has not ended fail
433
+ * with FAILED_PRECONDITION. Deleting a sandbox detaches its volume, and
434
+ * so does deleting a service, which is refused while a run holds the
435
+ * volume; neither deletes the volume.
436
+ *
437
+ * @generated from rpc toshi.workspace.v1.VolumeService.DetachVolume
438
+ */
439
+ detachVolume: {
440
+ methodKind: "unary";
441
+ input: typeof DetachVolumeRequestSchema;
442
+ output: typeof DetachVolumeResponseSchema;
443
+ };
444
+ }>;