@toshicloud/sdk 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -7
- package/dist/client.d.ts +23 -5
- package/dist/client.js +20 -4
- package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +297 -0
- package/dist/gen/toshi/workspace/v1/audit_events_pb.js +37 -0
- package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +920 -0
- package/dist/gen/toshi/workspace/v1/fillers_pb.js +94 -0
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +2048 -0
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +226 -0
- package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +2135 -0
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +301 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +717 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +74 -0
- package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +518 -0
- package/dist/gen/toshi/workspace/v1/tokens_pb.js +88 -0
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +3719 -0
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +270 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/retry.js +45 -0
- package/package.json +10 -2
|
@@ -0,0 +1,717 @@
|
|
|
1
|
+
import type { 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/storage_providers.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_toshi_workspace_v1_storage_providers: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
* StorageProvider is one bucket Toshi keeps the workspace's objects in.
|
|
10
|
+
*
|
|
11
|
+
* @generated from message toshi.workspace.v1.StorageProvider
|
|
12
|
+
*/
|
|
13
|
+
export type StorageProvider = Message<"toshi.workspace.v1.StorageProvider"> & {
|
|
14
|
+
/**
|
|
15
|
+
* @generated from field: string id = 1;
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* @generated from field: string name = 2;
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* "operator", "tenant_bucket" or "local_disk".
|
|
24
|
+
*
|
|
25
|
+
* @generated from field: string mode = 3;
|
|
26
|
+
*/
|
|
27
|
+
mode: string;
|
|
28
|
+
/**
|
|
29
|
+
* @generated from field: string endpoint = 4;
|
|
30
|
+
*/
|
|
31
|
+
endpoint: string;
|
|
32
|
+
/**
|
|
33
|
+
* @generated from field: string region = 5;
|
|
34
|
+
*/
|
|
35
|
+
region: string;
|
|
36
|
+
/**
|
|
37
|
+
* @generated from field: string bucket = 6;
|
|
38
|
+
*/
|
|
39
|
+
bucket: string;
|
|
40
|
+
/**
|
|
41
|
+
* @generated from field: string root_prefix = 7;
|
|
42
|
+
*/
|
|
43
|
+
rootPrefix: string;
|
|
44
|
+
/**
|
|
45
|
+
* @generated from field: bool path_style = 8;
|
|
46
|
+
*/
|
|
47
|
+
pathStyle: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from field: bool cap_lifecycle = 9;
|
|
50
|
+
*/
|
|
51
|
+
capLifecycle: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from field: bool cap_guest_presign = 10;
|
|
54
|
+
*/
|
|
55
|
+
capGuestPresign: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* @generated from field: bool cap_global_replication = 11;
|
|
58
|
+
*/
|
|
59
|
+
capGlobalReplication: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* @generated from field: int64 egress_price_micros_per_gb = 12;
|
|
62
|
+
*/
|
|
63
|
+
egressPriceMicrosPerGb: bigint;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the row holds a wrapped key; its value is never sent.
|
|
66
|
+
*
|
|
67
|
+
* @generated from field: bool credentials_wrapped = 13;
|
|
68
|
+
*/
|
|
69
|
+
credentialsWrapped: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* @generated from field: google.protobuf.Timestamp last_check_at = 14;
|
|
72
|
+
*/
|
|
73
|
+
lastCheckAt?: Timestamp | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Why the last check failed. For a row the operator set, which may name
|
|
76
|
+
* the operator's own references, only that it failed.
|
|
77
|
+
*
|
|
78
|
+
* @generated from field: string last_check_error = 15;
|
|
79
|
+
*/
|
|
80
|
+
lastCheckError: string;
|
|
81
|
+
/**
|
|
82
|
+
* @generated from field: google.protobuf.Timestamp created_at = 16;
|
|
83
|
+
*/
|
|
84
|
+
createdAt?: Timestamp | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* @generated from field: google.protobuf.Timestamp updated_at = 17;
|
|
87
|
+
*/
|
|
88
|
+
updatedAt?: Timestamp | undefined;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* StorageProvider is one bucket Toshi keeps the workspace's objects in.
|
|
92
|
+
*
|
|
93
|
+
* @generated from message toshi.workspace.v1.StorageProvider
|
|
94
|
+
*/
|
|
95
|
+
export type StorageProviderJson = {
|
|
96
|
+
/**
|
|
97
|
+
* @generated from field: string id = 1;
|
|
98
|
+
*/
|
|
99
|
+
id?: string;
|
|
100
|
+
/**
|
|
101
|
+
* @generated from field: string name = 2;
|
|
102
|
+
*/
|
|
103
|
+
name?: string;
|
|
104
|
+
/**
|
|
105
|
+
* "operator", "tenant_bucket" or "local_disk".
|
|
106
|
+
*
|
|
107
|
+
* @generated from field: string mode = 3;
|
|
108
|
+
*/
|
|
109
|
+
mode?: string;
|
|
110
|
+
/**
|
|
111
|
+
* @generated from field: string endpoint = 4;
|
|
112
|
+
*/
|
|
113
|
+
endpoint?: string;
|
|
114
|
+
/**
|
|
115
|
+
* @generated from field: string region = 5;
|
|
116
|
+
*/
|
|
117
|
+
region?: string;
|
|
118
|
+
/**
|
|
119
|
+
* @generated from field: string bucket = 6;
|
|
120
|
+
*/
|
|
121
|
+
bucket?: string;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from field: string root_prefix = 7;
|
|
124
|
+
*/
|
|
125
|
+
rootPrefix?: string;
|
|
126
|
+
/**
|
|
127
|
+
* @generated from field: bool path_style = 8;
|
|
128
|
+
*/
|
|
129
|
+
pathStyle?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* @generated from field: bool cap_lifecycle = 9;
|
|
132
|
+
*/
|
|
133
|
+
capLifecycle?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* @generated from field: bool cap_guest_presign = 10;
|
|
136
|
+
*/
|
|
137
|
+
capGuestPresign?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* @generated from field: bool cap_global_replication = 11;
|
|
140
|
+
*/
|
|
141
|
+
capGlobalReplication?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* @generated from field: int64 egress_price_micros_per_gb = 12;
|
|
144
|
+
*/
|
|
145
|
+
egressPriceMicrosPerGb?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Whether the row holds a wrapped key; its value is never sent.
|
|
148
|
+
*
|
|
149
|
+
* @generated from field: bool credentials_wrapped = 13;
|
|
150
|
+
*/
|
|
151
|
+
credentialsWrapped?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* @generated from field: google.protobuf.Timestamp last_check_at = 14;
|
|
154
|
+
*/
|
|
155
|
+
lastCheckAt?: TimestampJson;
|
|
156
|
+
/**
|
|
157
|
+
* Why the last check failed. For a row the operator set, which may name
|
|
158
|
+
* the operator's own references, only that it failed.
|
|
159
|
+
*
|
|
160
|
+
* @generated from field: string last_check_error = 15;
|
|
161
|
+
*/
|
|
162
|
+
lastCheckError?: string;
|
|
163
|
+
/**
|
|
164
|
+
* @generated from field: google.protobuf.Timestamp created_at = 16;
|
|
165
|
+
*/
|
|
166
|
+
createdAt?: TimestampJson;
|
|
167
|
+
/**
|
|
168
|
+
* @generated from field: google.protobuf.Timestamp updated_at = 17;
|
|
169
|
+
*/
|
|
170
|
+
updatedAt?: TimestampJson;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Describes the message toshi.workspace.v1.StorageProvider.
|
|
174
|
+
* Use `create(StorageProviderSchema)` to create a new message.
|
|
175
|
+
*/
|
|
176
|
+
export declare const StorageProviderSchema: GenMessage<StorageProvider, {
|
|
177
|
+
jsonType: StorageProviderJson;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* CreateStorageProviderRequest describes the workspace's own bucket.
|
|
181
|
+
*
|
|
182
|
+
* @generated from message toshi.workspace.v1.CreateStorageProviderRequest
|
|
183
|
+
*/
|
|
184
|
+
export type CreateStorageProviderRequest = Message<"toshi.workspace.v1.CreateStorageProviderRequest"> & {
|
|
185
|
+
/**
|
|
186
|
+
* @generated from field: string name = 1;
|
|
187
|
+
*/
|
|
188
|
+
name: string;
|
|
189
|
+
/**
|
|
190
|
+
* An https URL.
|
|
191
|
+
*
|
|
192
|
+
* @generated from field: string endpoint = 2;
|
|
193
|
+
*/
|
|
194
|
+
endpoint: string;
|
|
195
|
+
/**
|
|
196
|
+
* @generated from field: string region = 3;
|
|
197
|
+
*/
|
|
198
|
+
region: string;
|
|
199
|
+
/**
|
|
200
|
+
* @generated from field: string bucket = 4;
|
|
201
|
+
*/
|
|
202
|
+
bucket: string;
|
|
203
|
+
/**
|
|
204
|
+
* @generated from field: string root_prefix = 5;
|
|
205
|
+
*/
|
|
206
|
+
rootPrefix: string;
|
|
207
|
+
/**
|
|
208
|
+
* @generated from field: bool path_style = 6;
|
|
209
|
+
*/
|
|
210
|
+
pathStyle: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* @generated from field: bool cap_lifecycle = 7;
|
|
213
|
+
*/
|
|
214
|
+
capLifecycle: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* @generated from field: bool cap_guest_presign = 8;
|
|
217
|
+
*/
|
|
218
|
+
capGuestPresign: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* The bucket's key. The control plane wraps it before the row exists and
|
|
221
|
+
* never returns, logs or audits it. Required.
|
|
222
|
+
*
|
|
223
|
+
* @generated from field: toshi.workspace.v1.StorageCredential credential = 9;
|
|
224
|
+
*/
|
|
225
|
+
credential?: StorageCredential | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* "tenant_bucket", the only mode a workspace stores; empty means it.
|
|
228
|
+
* Another mode fails with INVALID_ARGUMENT.
|
|
229
|
+
*
|
|
230
|
+
* @generated from field: string mode = 10;
|
|
231
|
+
*/
|
|
232
|
+
mode: string;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* CreateStorageProviderRequest describes the workspace's own bucket.
|
|
236
|
+
*
|
|
237
|
+
* @generated from message toshi.workspace.v1.CreateStorageProviderRequest
|
|
238
|
+
*/
|
|
239
|
+
export type CreateStorageProviderRequestJson = {
|
|
240
|
+
/**
|
|
241
|
+
* @generated from field: string name = 1;
|
|
242
|
+
*/
|
|
243
|
+
name?: string;
|
|
244
|
+
/**
|
|
245
|
+
* An https URL.
|
|
246
|
+
*
|
|
247
|
+
* @generated from field: string endpoint = 2;
|
|
248
|
+
*/
|
|
249
|
+
endpoint?: string;
|
|
250
|
+
/**
|
|
251
|
+
* @generated from field: string region = 3;
|
|
252
|
+
*/
|
|
253
|
+
region?: string;
|
|
254
|
+
/**
|
|
255
|
+
* @generated from field: string bucket = 4;
|
|
256
|
+
*/
|
|
257
|
+
bucket?: string;
|
|
258
|
+
/**
|
|
259
|
+
* @generated from field: string root_prefix = 5;
|
|
260
|
+
*/
|
|
261
|
+
rootPrefix?: string;
|
|
262
|
+
/**
|
|
263
|
+
* @generated from field: bool path_style = 6;
|
|
264
|
+
*/
|
|
265
|
+
pathStyle?: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* @generated from field: bool cap_lifecycle = 7;
|
|
268
|
+
*/
|
|
269
|
+
capLifecycle?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* @generated from field: bool cap_guest_presign = 8;
|
|
272
|
+
*/
|
|
273
|
+
capGuestPresign?: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* The bucket's key. The control plane wraps it before the row exists and
|
|
276
|
+
* never returns, logs or audits it. Required.
|
|
277
|
+
*
|
|
278
|
+
* @generated from field: toshi.workspace.v1.StorageCredential credential = 9;
|
|
279
|
+
*/
|
|
280
|
+
credential?: StorageCredentialJson;
|
|
281
|
+
/**
|
|
282
|
+
* "tenant_bucket", the only mode a workspace stores; empty means it.
|
|
283
|
+
* Another mode fails with INVALID_ARGUMENT.
|
|
284
|
+
*
|
|
285
|
+
* @generated from field: string mode = 10;
|
|
286
|
+
*/
|
|
287
|
+
mode?: string;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Describes the message toshi.workspace.v1.CreateStorageProviderRequest.
|
|
291
|
+
* Use `create(CreateStorageProviderRequestSchema)` to create a new message.
|
|
292
|
+
*/
|
|
293
|
+
export declare const CreateStorageProviderRequestSchema: GenMessage<CreateStorageProviderRequest, {
|
|
294
|
+
jsonType: CreateStorageProviderRequestJson;
|
|
295
|
+
}>;
|
|
296
|
+
/**
|
|
297
|
+
* StorageCredential is an S3 access key. It is write-only: no response
|
|
298
|
+
* carries it.
|
|
299
|
+
*
|
|
300
|
+
* @generated from message toshi.workspace.v1.StorageCredential
|
|
301
|
+
*/
|
|
302
|
+
export type StorageCredential = Message<"toshi.workspace.v1.StorageCredential"> & {
|
|
303
|
+
/**
|
|
304
|
+
* @generated from field: string access_key_id = 1;
|
|
305
|
+
*/
|
|
306
|
+
accessKeyId: string;
|
|
307
|
+
/**
|
|
308
|
+
* @generated from field: string secret_access_key = 2;
|
|
309
|
+
*/
|
|
310
|
+
secretAccessKey: string;
|
|
311
|
+
/**
|
|
312
|
+
* Set for a temporary key.
|
|
313
|
+
*
|
|
314
|
+
* @generated from field: string session_token = 3;
|
|
315
|
+
*/
|
|
316
|
+
sessionToken: string;
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* StorageCredential is an S3 access key. It is write-only: no response
|
|
320
|
+
* carries it.
|
|
321
|
+
*
|
|
322
|
+
* @generated from message toshi.workspace.v1.StorageCredential
|
|
323
|
+
*/
|
|
324
|
+
export type StorageCredentialJson = {
|
|
325
|
+
/**
|
|
326
|
+
* @generated from field: string access_key_id = 1;
|
|
327
|
+
*/
|
|
328
|
+
accessKeyId?: string;
|
|
329
|
+
/**
|
|
330
|
+
* @generated from field: string secret_access_key = 2;
|
|
331
|
+
*/
|
|
332
|
+
secretAccessKey?: string;
|
|
333
|
+
/**
|
|
334
|
+
* Set for a temporary key.
|
|
335
|
+
*
|
|
336
|
+
* @generated from field: string session_token = 3;
|
|
337
|
+
*/
|
|
338
|
+
sessionToken?: string;
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Describes the message toshi.workspace.v1.StorageCredential.
|
|
342
|
+
* Use `create(StorageCredentialSchema)` to create a new message.
|
|
343
|
+
*/
|
|
344
|
+
export declare const StorageCredentialSchema: GenMessage<StorageCredential, {
|
|
345
|
+
jsonType: StorageCredentialJson;
|
|
346
|
+
}>;
|
|
347
|
+
/**
|
|
348
|
+
* @generated from message toshi.workspace.v1.CreateStorageProviderResponse
|
|
349
|
+
*/
|
|
350
|
+
export type CreateStorageProviderResponse = Message<"toshi.workspace.v1.CreateStorageProviderResponse"> & {
|
|
351
|
+
/**
|
|
352
|
+
* @generated from field: toshi.workspace.v1.StorageProvider provider = 1;
|
|
353
|
+
*/
|
|
354
|
+
provider?: StorageProvider | undefined;
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* @generated from message toshi.workspace.v1.CreateStorageProviderResponse
|
|
358
|
+
*/
|
|
359
|
+
export type CreateStorageProviderResponseJson = {
|
|
360
|
+
/**
|
|
361
|
+
* @generated from field: toshi.workspace.v1.StorageProvider provider = 1;
|
|
362
|
+
*/
|
|
363
|
+
provider?: StorageProviderJson;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Describes the message toshi.workspace.v1.CreateStorageProviderResponse.
|
|
367
|
+
* Use `create(CreateStorageProviderResponseSchema)` to create a new message.
|
|
368
|
+
*/
|
|
369
|
+
export declare const CreateStorageProviderResponseSchema: GenMessage<CreateStorageProviderResponse, {
|
|
370
|
+
jsonType: CreateStorageProviderResponseJson;
|
|
371
|
+
}>;
|
|
372
|
+
/**
|
|
373
|
+
* @generated from message toshi.workspace.v1.ListStorageProvidersRequest
|
|
374
|
+
*/
|
|
375
|
+
export type ListStorageProvidersRequest = Message<"toshi.workspace.v1.ListStorageProvidersRequest"> & {
|
|
376
|
+
/**
|
|
377
|
+
* Also answer default_provider.
|
|
378
|
+
*
|
|
379
|
+
* @generated from field: bool include_default = 1;
|
|
380
|
+
*/
|
|
381
|
+
includeDefault: boolean;
|
|
382
|
+
/**
|
|
383
|
+
* The most providers in one page; zero lets the server choose.
|
|
384
|
+
*
|
|
385
|
+
* @generated from field: int32 page_size = 2;
|
|
386
|
+
*/
|
|
387
|
+
pageSize: number;
|
|
388
|
+
/**
|
|
389
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
390
|
+
*
|
|
391
|
+
* @generated from field: string page_token = 3;
|
|
392
|
+
*/
|
|
393
|
+
pageToken: string;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* @generated from message toshi.workspace.v1.ListStorageProvidersRequest
|
|
397
|
+
*/
|
|
398
|
+
export type ListStorageProvidersRequestJson = {
|
|
399
|
+
/**
|
|
400
|
+
* Also answer default_provider.
|
|
401
|
+
*
|
|
402
|
+
* @generated from field: bool include_default = 1;
|
|
403
|
+
*/
|
|
404
|
+
includeDefault?: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* The most providers in one page; zero lets the server choose.
|
|
407
|
+
*
|
|
408
|
+
* @generated from field: int32 page_size = 2;
|
|
409
|
+
*/
|
|
410
|
+
pageSize?: number;
|
|
411
|
+
/**
|
|
412
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
413
|
+
*
|
|
414
|
+
* @generated from field: string page_token = 3;
|
|
415
|
+
*/
|
|
416
|
+
pageToken?: string;
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* Describes the message toshi.workspace.v1.ListStorageProvidersRequest.
|
|
420
|
+
* Use `create(ListStorageProvidersRequestSchema)` to create a new message.
|
|
421
|
+
*/
|
|
422
|
+
export declare const ListStorageProvidersRequestSchema: GenMessage<ListStorageProvidersRequest, {
|
|
423
|
+
jsonType: ListStorageProvidersRequestJson;
|
|
424
|
+
}>;
|
|
425
|
+
/**
|
|
426
|
+
* @generated from message toshi.workspace.v1.ListStorageProvidersResponse
|
|
427
|
+
*/
|
|
428
|
+
export type ListStorageProvidersResponse = Message<"toshi.workspace.v1.ListStorageProvidersResponse"> & {
|
|
429
|
+
/**
|
|
430
|
+
* @generated from field: repeated toshi.workspace.v1.StorageProvider providers = 1;
|
|
431
|
+
*/
|
|
432
|
+
providers: StorageProvider[];
|
|
433
|
+
/**
|
|
434
|
+
* With include_default, the operator's provider that serves the
|
|
435
|
+
* workspace's uploads while it has no tenant_bucket provider; unset when
|
|
436
|
+
* none is configured. Every page holds it.
|
|
437
|
+
*
|
|
438
|
+
* @generated from field: toshi.workspace.v1.StorageProvider default_provider = 2;
|
|
439
|
+
*/
|
|
440
|
+
defaultProvider?: StorageProvider | undefined;
|
|
441
|
+
/**
|
|
442
|
+
* Empty on the last page.
|
|
443
|
+
*
|
|
444
|
+
* @generated from field: string next_page_token = 3;
|
|
445
|
+
*/
|
|
446
|
+
nextPageToken: string;
|
|
447
|
+
};
|
|
448
|
+
/**
|
|
449
|
+
* @generated from message toshi.workspace.v1.ListStorageProvidersResponse
|
|
450
|
+
*/
|
|
451
|
+
export type ListStorageProvidersResponseJson = {
|
|
452
|
+
/**
|
|
453
|
+
* @generated from field: repeated toshi.workspace.v1.StorageProvider providers = 1;
|
|
454
|
+
*/
|
|
455
|
+
providers?: StorageProviderJson[];
|
|
456
|
+
/**
|
|
457
|
+
* With include_default, the operator's provider that serves the
|
|
458
|
+
* workspace's uploads while it has no tenant_bucket provider; unset when
|
|
459
|
+
* none is configured. Every page holds it.
|
|
460
|
+
*
|
|
461
|
+
* @generated from field: toshi.workspace.v1.StorageProvider default_provider = 2;
|
|
462
|
+
*/
|
|
463
|
+
defaultProvider?: StorageProviderJson;
|
|
464
|
+
/**
|
|
465
|
+
* Empty on the last page.
|
|
466
|
+
*
|
|
467
|
+
* @generated from field: string next_page_token = 3;
|
|
468
|
+
*/
|
|
469
|
+
nextPageToken?: string;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* Describes the message toshi.workspace.v1.ListStorageProvidersResponse.
|
|
473
|
+
* Use `create(ListStorageProvidersResponseSchema)` to create a new message.
|
|
474
|
+
*/
|
|
475
|
+
export declare const ListStorageProvidersResponseSchema: GenMessage<ListStorageProvidersResponse, {
|
|
476
|
+
jsonType: ListStorageProvidersResponseJson;
|
|
477
|
+
}>;
|
|
478
|
+
/**
|
|
479
|
+
* @generated from message toshi.workspace.v1.CheckStorageProviderRequest
|
|
480
|
+
*/
|
|
481
|
+
export type CheckStorageProviderRequest = Message<"toshi.workspace.v1.CheckStorageProviderRequest"> & {
|
|
482
|
+
/**
|
|
483
|
+
* The provider to check: one is required.
|
|
484
|
+
*
|
|
485
|
+
* @generated from oneof toshi.workspace.v1.CheckStorageProviderRequest.target
|
|
486
|
+
*/
|
|
487
|
+
target: {
|
|
488
|
+
/**
|
|
489
|
+
* A saved provider's id.
|
|
490
|
+
*
|
|
491
|
+
* @generated from field: string id = 1;
|
|
492
|
+
*/
|
|
493
|
+
value: string;
|
|
494
|
+
case: "id";
|
|
495
|
+
} | {
|
|
496
|
+
/**
|
|
497
|
+
* A provider that is not saved, as CreateStorageProvider would take
|
|
498
|
+
* it, with its key.
|
|
499
|
+
*
|
|
500
|
+
* @generated from field: toshi.workspace.v1.CreateStorageProviderRequest provider = 2;
|
|
501
|
+
*/
|
|
502
|
+
value: CreateStorageProviderRequest;
|
|
503
|
+
case: "provider";
|
|
504
|
+
} | {
|
|
505
|
+
case: undefined;
|
|
506
|
+
value?: undefined;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* @generated from message toshi.workspace.v1.CheckStorageProviderRequest
|
|
511
|
+
*/
|
|
512
|
+
export type CheckStorageProviderRequestJson = {
|
|
513
|
+
/**
|
|
514
|
+
* A saved provider's id.
|
|
515
|
+
*
|
|
516
|
+
* @generated from field: string id = 1;
|
|
517
|
+
*/
|
|
518
|
+
id?: string;
|
|
519
|
+
/**
|
|
520
|
+
* A provider that is not saved, as CreateStorageProvider would take
|
|
521
|
+
* it, with its key.
|
|
522
|
+
*
|
|
523
|
+
* @generated from field: toshi.workspace.v1.CreateStorageProviderRequest provider = 2;
|
|
524
|
+
*/
|
|
525
|
+
provider?: CreateStorageProviderRequestJson;
|
|
526
|
+
};
|
|
527
|
+
/**
|
|
528
|
+
* Describes the message toshi.workspace.v1.CheckStorageProviderRequest.
|
|
529
|
+
* Use `create(CheckStorageProviderRequestSchema)` to create a new message.
|
|
530
|
+
*/
|
|
531
|
+
export declare const CheckStorageProviderRequestSchema: GenMessage<CheckStorageProviderRequest, {
|
|
532
|
+
jsonType: CheckStorageProviderRequestJson;
|
|
533
|
+
}>;
|
|
534
|
+
/**
|
|
535
|
+
* @generated from message toshi.workspace.v1.CheckStorageProviderResponse
|
|
536
|
+
*/
|
|
537
|
+
export type CheckStorageProviderResponse = Message<"toshi.workspace.v1.CheckStorageProviderResponse"> & {
|
|
538
|
+
/**
|
|
539
|
+
* The saved provider as stored after the check; unset for one that is
|
|
540
|
+
* not saved.
|
|
541
|
+
*
|
|
542
|
+
* @generated from field: toshi.workspace.v1.StorageProvider provider = 1;
|
|
543
|
+
*/
|
|
544
|
+
provider?: StorageProvider | undefined;
|
|
545
|
+
/**
|
|
546
|
+
* Whether every step of the check passed.
|
|
547
|
+
*
|
|
548
|
+
* @generated from field: bool ok = 2;
|
|
549
|
+
*/
|
|
550
|
+
ok: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* Why the check failed, naming the step; empty when ok.
|
|
553
|
+
*
|
|
554
|
+
* @generated from field: string error = 3;
|
|
555
|
+
*/
|
|
556
|
+
error: string;
|
|
557
|
+
/**
|
|
558
|
+
* @generated from field: google.protobuf.Timestamp checked_at = 4;
|
|
559
|
+
*/
|
|
560
|
+
checkedAt?: Timestamp | undefined;
|
|
561
|
+
};
|
|
562
|
+
/**
|
|
563
|
+
* @generated from message toshi.workspace.v1.CheckStorageProviderResponse
|
|
564
|
+
*/
|
|
565
|
+
export type CheckStorageProviderResponseJson = {
|
|
566
|
+
/**
|
|
567
|
+
* The saved provider as stored after the check; unset for one that is
|
|
568
|
+
* not saved.
|
|
569
|
+
*
|
|
570
|
+
* @generated from field: toshi.workspace.v1.StorageProvider provider = 1;
|
|
571
|
+
*/
|
|
572
|
+
provider?: StorageProviderJson;
|
|
573
|
+
/**
|
|
574
|
+
* Whether every step of the check passed.
|
|
575
|
+
*
|
|
576
|
+
* @generated from field: bool ok = 2;
|
|
577
|
+
*/
|
|
578
|
+
ok?: boolean;
|
|
579
|
+
/**
|
|
580
|
+
* Why the check failed, naming the step; empty when ok.
|
|
581
|
+
*
|
|
582
|
+
* @generated from field: string error = 3;
|
|
583
|
+
*/
|
|
584
|
+
error?: string;
|
|
585
|
+
/**
|
|
586
|
+
* @generated from field: google.protobuf.Timestamp checked_at = 4;
|
|
587
|
+
*/
|
|
588
|
+
checkedAt?: TimestampJson;
|
|
589
|
+
};
|
|
590
|
+
/**
|
|
591
|
+
* Describes the message toshi.workspace.v1.CheckStorageProviderResponse.
|
|
592
|
+
* Use `create(CheckStorageProviderResponseSchema)` to create a new message.
|
|
593
|
+
*/
|
|
594
|
+
export declare const CheckStorageProviderResponseSchema: GenMessage<CheckStorageProviderResponse, {
|
|
595
|
+
jsonType: CheckStorageProviderResponseJson;
|
|
596
|
+
}>;
|
|
597
|
+
/**
|
|
598
|
+
* @generated from message toshi.workspace.v1.DeleteStorageProviderRequest
|
|
599
|
+
*/
|
|
600
|
+
export type DeleteStorageProviderRequest = Message<"toshi.workspace.v1.DeleteStorageProviderRequest"> & {
|
|
601
|
+
/**
|
|
602
|
+
* @generated from field: string id = 1;
|
|
603
|
+
*/
|
|
604
|
+
id: string;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* @generated from message toshi.workspace.v1.DeleteStorageProviderRequest
|
|
608
|
+
*/
|
|
609
|
+
export type DeleteStorageProviderRequestJson = {
|
|
610
|
+
/**
|
|
611
|
+
* @generated from field: string id = 1;
|
|
612
|
+
*/
|
|
613
|
+
id?: string;
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* Describes the message toshi.workspace.v1.DeleteStorageProviderRequest.
|
|
617
|
+
* Use `create(DeleteStorageProviderRequestSchema)` to create a new message.
|
|
618
|
+
*/
|
|
619
|
+
export declare const DeleteStorageProviderRequestSchema: GenMessage<DeleteStorageProviderRequest, {
|
|
620
|
+
jsonType: DeleteStorageProviderRequestJson;
|
|
621
|
+
}>;
|
|
622
|
+
/**
|
|
623
|
+
* @generated from message toshi.workspace.v1.DeleteStorageProviderResponse
|
|
624
|
+
*/
|
|
625
|
+
export type DeleteStorageProviderResponse = Message<"toshi.workspace.v1.DeleteStorageProviderResponse"> & {};
|
|
626
|
+
/**
|
|
627
|
+
* @generated from message toshi.workspace.v1.DeleteStorageProviderResponse
|
|
628
|
+
*/
|
|
629
|
+
export type DeleteStorageProviderResponseJson = {};
|
|
630
|
+
/**
|
|
631
|
+
* Describes the message toshi.workspace.v1.DeleteStorageProviderResponse.
|
|
632
|
+
* Use `create(DeleteStorageProviderResponseSchema)` to create a new message.
|
|
633
|
+
*/
|
|
634
|
+
export declare const DeleteStorageProviderResponseSchema: GenMessage<DeleteStorageProviderResponse, {
|
|
635
|
+
jsonType: DeleteStorageProviderResponseJson;
|
|
636
|
+
}>;
|
|
637
|
+
/**
|
|
638
|
+
* StorageProviderService manages the buckets the workspace keeps its
|
|
639
|
+
* objects in: its own bucket, with a key the control plane wraps, and the
|
|
640
|
+
* rows the operator set for it. No call returns a credential or the
|
|
641
|
+
* operator's reference to one.
|
|
642
|
+
*
|
|
643
|
+
* Only a signed-in session may call these: a token is refused with
|
|
644
|
+
* PERMISSION_DENIED. The session names one of its workspaces in the
|
|
645
|
+
* Toshi-Workspace header. A suspended workspace lists its providers, and so does a
|
|
646
|
+
* closed one during its read-only period; every other call is refused for
|
|
647
|
+
* a suspended workspace with FAILED_PRECONDITION.
|
|
648
|
+
*
|
|
649
|
+
* @generated from service toshi.workspace.v1.StorageProviderService
|
|
650
|
+
*/
|
|
651
|
+
export declare const StorageProviderService: GenService<{
|
|
652
|
+
/**
|
|
653
|
+
* ListStorageProviders returns the workspace's providers, ordered by
|
|
654
|
+
* name. With include_default it also returns the operator's provider the
|
|
655
|
+
* workspace uses while it has none of its own.
|
|
656
|
+
*
|
|
657
|
+
* A page holds 100 providers when page_size is zero, and 1000 at most.
|
|
658
|
+
*
|
|
659
|
+
* @generated from rpc toshi.workspace.v1.StorageProviderService.ListStorageProviders
|
|
660
|
+
*/
|
|
661
|
+
listStorageProviders: {
|
|
662
|
+
methodKind: "unary";
|
|
663
|
+
input: typeof ListStorageProvidersRequestSchema;
|
|
664
|
+
output: typeof ListStorageProvidersResponseSchema;
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* CreateStorageProvider stores the workspace's own bucket: the control
|
|
668
|
+
* plane wraps the key, checks the bucket with it as CheckStorageProvider
|
|
669
|
+
* does and stores the row only when the check passes, else
|
|
670
|
+
* FAILED_PRECONDITION with the check's error. A workspace has one such
|
|
671
|
+
* provider; a second fails with ALREADY_EXISTS, as does a second provider
|
|
672
|
+
* with the lifecycle capability on the same endpoint and bucket. A bad
|
|
673
|
+
* field fails with INVALID_ARGUMENT.
|
|
674
|
+
*
|
|
675
|
+
* @generated from rpc toshi.workspace.v1.StorageProviderService.CreateStorageProvider
|
|
676
|
+
*/
|
|
677
|
+
createStorageProvider: {
|
|
678
|
+
methodKind: "unary";
|
|
679
|
+
input: typeof CreateStorageProviderRequestSchema;
|
|
680
|
+
output: typeof CreateStorageProviderResponseSchema;
|
|
681
|
+
};
|
|
682
|
+
/**
|
|
683
|
+
* CheckStorageProvider checks a provider's bucket: it heads the bucket,
|
|
684
|
+
* refuses a versioned one, then uploads, heads and deletes a probe
|
|
685
|
+
* object. A check that fails is an answer, not an error: ok is false and
|
|
686
|
+
* error names the failing step.
|
|
687
|
+
*
|
|
688
|
+
* With id it checks a provider the workspace saved, records the result
|
|
689
|
+
* and returns the provider as stored; an unknown ID, and another
|
|
690
|
+
* workspace's, fails with NOT_FOUND, and a row the operator set for the
|
|
691
|
+
* workspace, and the default provider, with PERMISSION_DENIED. With
|
|
692
|
+
* provider it checks one that is not saved, with the key in the request,
|
|
693
|
+
* as CreateStorageProvider would before it stores one; it stores and
|
|
694
|
+
* audits nothing, and a request CreateStorageProvider would refuse fails
|
|
695
|
+
* the same way before any connection.
|
|
696
|
+
*
|
|
697
|
+
* @generated from rpc toshi.workspace.v1.StorageProviderService.CheckStorageProvider
|
|
698
|
+
*/
|
|
699
|
+
checkStorageProvider: {
|
|
700
|
+
methodKind: "unary";
|
|
701
|
+
input: typeof CheckStorageProviderRequestSchema;
|
|
702
|
+
output: typeof CheckStorageProviderResponseSchema;
|
|
703
|
+
};
|
|
704
|
+
/**
|
|
705
|
+
* DeleteStorageProvider removes a provider the workspace saved. An
|
|
706
|
+
* unknown ID, and another workspace's, fails with NOT_FOUND; a row the
|
|
707
|
+
* operator set for the workspace, and the default provider, with
|
|
708
|
+
* PERMISSION_DENIED.
|
|
709
|
+
*
|
|
710
|
+
* @generated from rpc toshi.workspace.v1.StorageProviderService.DeleteStorageProvider
|
|
711
|
+
*/
|
|
712
|
+
deleteStorageProvider: {
|
|
713
|
+
methodKind: "unary";
|
|
714
|
+
input: typeof DeleteStorageProviderRequestSchema;
|
|
715
|
+
output: typeof DeleteStorageProviderResponseSchema;
|
|
716
|
+
};
|
|
717
|
+
}>;
|