@toshicloud/sdk 0.3.2 → 0.5.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.
- package/README.md +189 -30
- package/dist/client.d.ts +30 -4
- package/dist/client.js +19 -6
- package/dist/errors.d.ts +47 -0
- package/dist/errors.js +136 -0
- package/dist/execute.js +15 -0
- package/dist/gen/toshi/permission_pb.d.ts +39 -0
- package/dist/gen/toshi/permission_pb.js +42 -0
- package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +1 -1
- package/dist/gen/toshi/workspace/v1/artifacts_pb.js +3 -2
- package/dist/gen/toshi/workspace/v1/audit_events_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/channels_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/discovery_pb.d.ts +676 -0
- package/dist/gen/toshi/workspace/v1/discovery_pb.js +182 -0
- package/dist/gen/toshi/workspace/v1/display_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/fillers_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/products_pb.d.ts +703 -0
- package/dist/gen/toshi/workspace/v1/products_pb.js +106 -0
- package/dist/gen/toshi/workspace/v1/projects_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/recordings_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/secrets_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/tokens_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/volumes_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/webhook_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/workloads_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +2 -2
- package/dist/gen/toshi/workspace/v1/workspace_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +2 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +5 -1
- package/dist/interceptors.d.ts +17 -2
- package/dist/interceptors.js +69 -4
- package/dist/node/client.d.ts +35 -0
- package/dist/node/client.js +178 -0
- package/dist/node/index.d.ts +3 -0
- package/dist/node/index.js +4 -0
- package/dist/output.js +6 -1
- package/dist/paginate.d.ts +36 -0
- package/dist/paginate.js +37 -0
- package/dist/retry.js +4 -0
- package/dist/run.js +3 -2
- package/dist/stream.d.ts +8 -1
- package/dist/stream.js +24 -2
- package/dist/test/fake.d.ts +88 -0
- package/dist/test/fake.js +845 -0
- package/dist/test/index.d.ts +58 -0
- package/dist/test/index.js +57 -0
- package/dist/test/procedures.d.ts +18 -0
- package/dist/test/procedures.js +219 -0
- package/dist/timeout.d.ts +29 -0
- package/dist/timeout.js +67 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +2 -0
- package/dist/wait.js +15 -12
- package/dist/watch.js +15 -2
- package/package.json +19 -3
|
@@ -0,0 +1,676 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file toshi/workspace/v1/discovery.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_toshi_workspace_v1_discovery: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* @generated from message toshi.workspace.v1.DiscoverRequest
|
|
9
|
+
*/
|
|
10
|
+
export type DiscoverRequest = Message<"toshi.workspace.v1.DiscoverRequest"> & {
|
|
11
|
+
/**
|
|
12
|
+
* project names one of the workspace's projects: the permissions are the
|
|
13
|
+
* caller's in it. Empty is the whole workspace, or for a token limited to
|
|
14
|
+
* a project or environment, that part of it. A token limited to a project
|
|
15
|
+
* names no other.
|
|
16
|
+
*
|
|
17
|
+
* @generated from field: string project = 1;
|
|
18
|
+
*/
|
|
19
|
+
project: string;
|
|
20
|
+
/**
|
|
21
|
+
* environment names an environment of project, and needs project.
|
|
22
|
+
*
|
|
23
|
+
* @generated from field: string environment = 2;
|
|
24
|
+
*/
|
|
25
|
+
environment: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* @generated from message toshi.workspace.v1.DiscoverRequest
|
|
29
|
+
*/
|
|
30
|
+
export type DiscoverRequestJson = {
|
|
31
|
+
/**
|
|
32
|
+
* project names one of the workspace's projects: the permissions are the
|
|
33
|
+
* caller's in it. Empty is the whole workspace, or for a token limited to
|
|
34
|
+
* a project or environment, that part of it. A token limited to a project
|
|
35
|
+
* names no other.
|
|
36
|
+
*
|
|
37
|
+
* @generated from field: string project = 1;
|
|
38
|
+
*/
|
|
39
|
+
project?: string;
|
|
40
|
+
/**
|
|
41
|
+
* environment names an environment of project, and needs project.
|
|
42
|
+
*
|
|
43
|
+
* @generated from field: string environment = 2;
|
|
44
|
+
*/
|
|
45
|
+
environment?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Describes the message toshi.workspace.v1.DiscoverRequest.
|
|
49
|
+
* Use `create(DiscoverRequestSchema)` to create a new message.
|
|
50
|
+
*/
|
|
51
|
+
export declare const DiscoverRequestSchema: GenMessage<DiscoverRequest, {
|
|
52
|
+
jsonType: DiscoverRequestJson;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* @generated from message toshi.workspace.v1.DiscoverResponse
|
|
56
|
+
*/
|
|
57
|
+
export type DiscoverResponse = Message<"toshi.workspace.v1.DiscoverResponse"> & {
|
|
58
|
+
/**
|
|
59
|
+
* products are the products the build includes, by id.
|
|
60
|
+
*
|
|
61
|
+
* @generated from field: repeated toshi.workspace.v1.DiscoveredProduct products = 1;
|
|
62
|
+
*/
|
|
63
|
+
products: DiscoveredProduct[];
|
|
64
|
+
/**
|
|
65
|
+
* permissions are the caller's, sorted: what its roles in the workspace
|
|
66
|
+
* give it at the request's project and environment. Each is
|
|
67
|
+
* "<area>.<level>", as docs/api/permissions.md lists them, or a
|
|
68
|
+
* product's own, "<product id>.<level>".
|
|
69
|
+
*
|
|
70
|
+
* @generated from field: repeated string permissions = 2;
|
|
71
|
+
*/
|
|
72
|
+
permissions: string[];
|
|
73
|
+
/**
|
|
74
|
+
* @generated from field: toshi.workspace.v1.APIVersions versions = 3;
|
|
75
|
+
*/
|
|
76
|
+
versions?: APIVersions | undefined;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @generated from message toshi.workspace.v1.DiscoverResponse
|
|
80
|
+
*/
|
|
81
|
+
export type DiscoverResponseJson = {
|
|
82
|
+
/**
|
|
83
|
+
* products are the products the build includes, by id.
|
|
84
|
+
*
|
|
85
|
+
* @generated from field: repeated toshi.workspace.v1.DiscoveredProduct products = 1;
|
|
86
|
+
*/
|
|
87
|
+
products?: DiscoveredProductJson[];
|
|
88
|
+
/**
|
|
89
|
+
* permissions are the caller's, sorted: what its roles in the workspace
|
|
90
|
+
* give it at the request's project and environment. Each is
|
|
91
|
+
* "<area>.<level>", as docs/api/permissions.md lists them, or a
|
|
92
|
+
* product's own, "<product id>.<level>".
|
|
93
|
+
*
|
|
94
|
+
* @generated from field: repeated string permissions = 2;
|
|
95
|
+
*/
|
|
96
|
+
permissions?: string[];
|
|
97
|
+
/**
|
|
98
|
+
* @generated from field: toshi.workspace.v1.APIVersions versions = 3;
|
|
99
|
+
*/
|
|
100
|
+
versions?: APIVersionsJson;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Describes the message toshi.workspace.v1.DiscoverResponse.
|
|
104
|
+
* Use `create(DiscoverResponseSchema)` to create a new message.
|
|
105
|
+
*/
|
|
106
|
+
export declare const DiscoverResponseSchema: GenMessage<DiscoverResponse, {
|
|
107
|
+
jsonType: DiscoverResponseJson;
|
|
108
|
+
}>;
|
|
109
|
+
/**
|
|
110
|
+
* DiscoveredProduct is one product the build includes.
|
|
111
|
+
*
|
|
112
|
+
* @generated from message toshi.workspace.v1.DiscoveredProduct
|
|
113
|
+
*/
|
|
114
|
+
export type DiscoveredProduct = Message<"toshi.workspace.v1.DiscoveredProduct"> & {
|
|
115
|
+
/**
|
|
116
|
+
* id names the product, such as "runners": its config section and the
|
|
117
|
+
* prefix of its features and permissions.
|
|
118
|
+
*
|
|
119
|
+
* @generated from field: string id = 1;
|
|
120
|
+
*/
|
|
121
|
+
id: string;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from field: string version = 2;
|
|
124
|
+
*/
|
|
125
|
+
version: string;
|
|
126
|
+
/**
|
|
127
|
+
* docs is where the product's documentation lives: a path in the Toshi
|
|
128
|
+
* repository, or a URL.
|
|
129
|
+
*
|
|
130
|
+
* @generated from field: string docs = 3;
|
|
131
|
+
*/
|
|
132
|
+
docs: string;
|
|
133
|
+
/**
|
|
134
|
+
* enabled reports whether the deployment's config turns the product on.
|
|
135
|
+
* A product that is off serves no calls.
|
|
136
|
+
*
|
|
137
|
+
* @generated from field: bool enabled = 4;
|
|
138
|
+
*/
|
|
139
|
+
enabled: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* features are the product's typed keys, by key.
|
|
142
|
+
*
|
|
143
|
+
* @generated from field: repeated toshi.workspace.v1.ProductFeature features = 5;
|
|
144
|
+
*/
|
|
145
|
+
features: ProductFeature[];
|
|
146
|
+
/**
|
|
147
|
+
* state is where the product is in the deployment's lifecycle.
|
|
148
|
+
*
|
|
149
|
+
* @generated from field: toshi.workspace.v1.ProductState state = 6;
|
|
150
|
+
*/
|
|
151
|
+
state: ProductState;
|
|
152
|
+
/**
|
|
153
|
+
* switch says whether the product is on for the workspace and, when it is
|
|
154
|
+
* off, which switch turned it off: the switch a refused call to the
|
|
155
|
+
* product names in its ErrorInfo detail.
|
|
156
|
+
*
|
|
157
|
+
* @generated from field: toshi.workspace.v1.ProductSwitch switch = 7;
|
|
158
|
+
*/
|
|
159
|
+
switch: ProductSwitch;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* DiscoveredProduct is one product the build includes.
|
|
163
|
+
*
|
|
164
|
+
* @generated from message toshi.workspace.v1.DiscoveredProduct
|
|
165
|
+
*/
|
|
166
|
+
export type DiscoveredProductJson = {
|
|
167
|
+
/**
|
|
168
|
+
* id names the product, such as "runners": its config section and the
|
|
169
|
+
* prefix of its features and permissions.
|
|
170
|
+
*
|
|
171
|
+
* @generated from field: string id = 1;
|
|
172
|
+
*/
|
|
173
|
+
id?: string;
|
|
174
|
+
/**
|
|
175
|
+
* @generated from field: string version = 2;
|
|
176
|
+
*/
|
|
177
|
+
version?: string;
|
|
178
|
+
/**
|
|
179
|
+
* docs is where the product's documentation lives: a path in the Toshi
|
|
180
|
+
* repository, or a URL.
|
|
181
|
+
*
|
|
182
|
+
* @generated from field: string docs = 3;
|
|
183
|
+
*/
|
|
184
|
+
docs?: string;
|
|
185
|
+
/**
|
|
186
|
+
* enabled reports whether the deployment's config turns the product on.
|
|
187
|
+
* A product that is off serves no calls.
|
|
188
|
+
*
|
|
189
|
+
* @generated from field: bool enabled = 4;
|
|
190
|
+
*/
|
|
191
|
+
enabled?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* features are the product's typed keys, by key.
|
|
194
|
+
*
|
|
195
|
+
* @generated from field: repeated toshi.workspace.v1.ProductFeature features = 5;
|
|
196
|
+
*/
|
|
197
|
+
features?: ProductFeatureJson[];
|
|
198
|
+
/**
|
|
199
|
+
* state is where the product is in the deployment's lifecycle.
|
|
200
|
+
*
|
|
201
|
+
* @generated from field: toshi.workspace.v1.ProductState state = 6;
|
|
202
|
+
*/
|
|
203
|
+
state?: ProductStateJson;
|
|
204
|
+
/**
|
|
205
|
+
* switch says whether the product is on for the workspace and, when it is
|
|
206
|
+
* off, which switch turned it off: the switch a refused call to the
|
|
207
|
+
* product names in its ErrorInfo detail.
|
|
208
|
+
*
|
|
209
|
+
* @generated from field: toshi.workspace.v1.ProductSwitch switch = 7;
|
|
210
|
+
*/
|
|
211
|
+
switch?: ProductSwitchJson;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Describes the message toshi.workspace.v1.DiscoveredProduct.
|
|
215
|
+
* Use `create(DiscoveredProductSchema)` to create a new message.
|
|
216
|
+
*/
|
|
217
|
+
export declare const DiscoveredProductSchema: GenMessage<DiscoveredProduct, {
|
|
218
|
+
jsonType: DiscoveredProductJson;
|
|
219
|
+
}>;
|
|
220
|
+
/**
|
|
221
|
+
* ProductFeature is a typed key a product declares.
|
|
222
|
+
*
|
|
223
|
+
* @generated from message toshi.workspace.v1.ProductFeature
|
|
224
|
+
*/
|
|
225
|
+
export type ProductFeature = Message<"toshi.workspace.v1.ProductFeature"> & {
|
|
226
|
+
/**
|
|
227
|
+
* key is "<product id>.<name>".
|
|
228
|
+
*
|
|
229
|
+
* @generated from field: string key = 1;
|
|
230
|
+
*/
|
|
231
|
+
key: string;
|
|
232
|
+
/**
|
|
233
|
+
* @generated from field: toshi.workspace.v1.ProductFeatureType type = 2;
|
|
234
|
+
*/
|
|
235
|
+
type: ProductFeatureType;
|
|
236
|
+
/**
|
|
237
|
+
* values are an enum's values; empty for the other types.
|
|
238
|
+
*
|
|
239
|
+
* @generated from field: repeated string values = 3;
|
|
240
|
+
*/
|
|
241
|
+
values: string[];
|
|
242
|
+
/**
|
|
243
|
+
* narrowable reports whether a workspace's settings may narrow the
|
|
244
|
+
* feature within its entitlement: turn it off, or set a lower limit.
|
|
245
|
+
*
|
|
246
|
+
* @generated from field: bool narrowable = 4;
|
|
247
|
+
*/
|
|
248
|
+
narrowable: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* entitlement is the most the workspace may have of the feature: the
|
|
251
|
+
* operator's override for the workspace, else its plan's value, else the
|
|
252
|
+
* feature's default. Unset when the config turns the product off.
|
|
253
|
+
*
|
|
254
|
+
* @generated from field: toshi.workspace.v1.FeatureValue entitlement = 5;
|
|
255
|
+
*/
|
|
256
|
+
entitlement?: FeatureValue | undefined;
|
|
257
|
+
/**
|
|
258
|
+
* setting is the workspace's own value of the feature, unset when it has
|
|
259
|
+
* none or when its entitlements leave the product, or this bool feature,
|
|
260
|
+
* out. A setting the entitlement no longer contains, after the plan or
|
|
261
|
+
* an override lowered it, is kept and not applied.
|
|
262
|
+
*
|
|
263
|
+
* @generated from field: toshi.workspace.v1.FeatureValue setting = 6;
|
|
264
|
+
*/
|
|
265
|
+
setting?: FeatureValue | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* effective is the value that applies: the setting when the feature is
|
|
268
|
+
* narrowable and the entitlement contains it, else the entitlement.
|
|
269
|
+
* Unset when the config turns the product off.
|
|
270
|
+
*
|
|
271
|
+
* @generated from field: toshi.workspace.v1.FeatureValue effective = 7;
|
|
272
|
+
*/
|
|
273
|
+
effective?: FeatureValue | undefined;
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* ProductFeature is a typed key a product declares.
|
|
277
|
+
*
|
|
278
|
+
* @generated from message toshi.workspace.v1.ProductFeature
|
|
279
|
+
*/
|
|
280
|
+
export type ProductFeatureJson = {
|
|
281
|
+
/**
|
|
282
|
+
* key is "<product id>.<name>".
|
|
283
|
+
*
|
|
284
|
+
* @generated from field: string key = 1;
|
|
285
|
+
*/
|
|
286
|
+
key?: string;
|
|
287
|
+
/**
|
|
288
|
+
* @generated from field: toshi.workspace.v1.ProductFeatureType type = 2;
|
|
289
|
+
*/
|
|
290
|
+
type?: ProductFeatureTypeJson;
|
|
291
|
+
/**
|
|
292
|
+
* values are an enum's values; empty for the other types.
|
|
293
|
+
*
|
|
294
|
+
* @generated from field: repeated string values = 3;
|
|
295
|
+
*/
|
|
296
|
+
values?: string[];
|
|
297
|
+
/**
|
|
298
|
+
* narrowable reports whether a workspace's settings may narrow the
|
|
299
|
+
* feature within its entitlement: turn it off, or set a lower limit.
|
|
300
|
+
*
|
|
301
|
+
* @generated from field: bool narrowable = 4;
|
|
302
|
+
*/
|
|
303
|
+
narrowable?: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* entitlement is the most the workspace may have of the feature: the
|
|
306
|
+
* operator's override for the workspace, else its plan's value, else the
|
|
307
|
+
* feature's default. Unset when the config turns the product off.
|
|
308
|
+
*
|
|
309
|
+
* @generated from field: toshi.workspace.v1.FeatureValue entitlement = 5;
|
|
310
|
+
*/
|
|
311
|
+
entitlement?: FeatureValueJson;
|
|
312
|
+
/**
|
|
313
|
+
* setting is the workspace's own value of the feature, unset when it has
|
|
314
|
+
* none or when its entitlements leave the product, or this bool feature,
|
|
315
|
+
* out. A setting the entitlement no longer contains, after the plan or
|
|
316
|
+
* an override lowered it, is kept and not applied.
|
|
317
|
+
*
|
|
318
|
+
* @generated from field: toshi.workspace.v1.FeatureValue setting = 6;
|
|
319
|
+
*/
|
|
320
|
+
setting?: FeatureValueJson;
|
|
321
|
+
/**
|
|
322
|
+
* effective is the value that applies: the setting when the feature is
|
|
323
|
+
* narrowable and the entitlement contains it, else the entitlement.
|
|
324
|
+
* Unset when the config turns the product off.
|
|
325
|
+
*
|
|
326
|
+
* @generated from field: toshi.workspace.v1.FeatureValue effective = 7;
|
|
327
|
+
*/
|
|
328
|
+
effective?: FeatureValueJson;
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* Describes the message toshi.workspace.v1.ProductFeature.
|
|
332
|
+
* Use `create(ProductFeatureSchema)` to create a new message.
|
|
333
|
+
*/
|
|
334
|
+
export declare const ProductFeatureSchema: GenMessage<ProductFeature, {
|
|
335
|
+
jsonType: ProductFeatureJson;
|
|
336
|
+
}>;
|
|
337
|
+
/**
|
|
338
|
+
* FeatureValue is a value of a feature, of the feature's type.
|
|
339
|
+
*
|
|
340
|
+
* @generated from message toshi.workspace.v1.FeatureValue
|
|
341
|
+
*/
|
|
342
|
+
export type FeatureValue = Message<"toshi.workspace.v1.FeatureValue"> & {
|
|
343
|
+
/**
|
|
344
|
+
* @generated from oneof toshi.workspace.v1.FeatureValue.value
|
|
345
|
+
*/
|
|
346
|
+
value: {
|
|
347
|
+
/**
|
|
348
|
+
* A bool feature's value.
|
|
349
|
+
*
|
|
350
|
+
* @generated from field: bool bool = 1;
|
|
351
|
+
*/
|
|
352
|
+
value: boolean;
|
|
353
|
+
case: "bool";
|
|
354
|
+
} | {
|
|
355
|
+
/**
|
|
356
|
+
* A count feature's value, never negative.
|
|
357
|
+
*
|
|
358
|
+
* @generated from field: int64 count = 2;
|
|
359
|
+
*/
|
|
360
|
+
value: bigint;
|
|
361
|
+
case: "count";
|
|
362
|
+
} | {
|
|
363
|
+
/**
|
|
364
|
+
* A range feature's value.
|
|
365
|
+
*
|
|
366
|
+
* @generated from field: toshi.workspace.v1.FeatureRange range = 3;
|
|
367
|
+
*/
|
|
368
|
+
value: FeatureRange;
|
|
369
|
+
case: "range";
|
|
370
|
+
} | {
|
|
371
|
+
/**
|
|
372
|
+
* An enum feature's value, one of its values, or a string feature's.
|
|
373
|
+
*
|
|
374
|
+
* @generated from field: string text = 4;
|
|
375
|
+
*/
|
|
376
|
+
value: string;
|
|
377
|
+
case: "text";
|
|
378
|
+
} | {
|
|
379
|
+
case: undefined;
|
|
380
|
+
value?: undefined;
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* FeatureValue is a value of a feature, of the feature's type.
|
|
385
|
+
*
|
|
386
|
+
* @generated from message toshi.workspace.v1.FeatureValue
|
|
387
|
+
*/
|
|
388
|
+
export type FeatureValueJson = {
|
|
389
|
+
/**
|
|
390
|
+
* A bool feature's value.
|
|
391
|
+
*
|
|
392
|
+
* @generated from field: bool bool = 1;
|
|
393
|
+
*/
|
|
394
|
+
bool?: boolean;
|
|
395
|
+
/**
|
|
396
|
+
* A count feature's value, never negative.
|
|
397
|
+
*
|
|
398
|
+
* @generated from field: int64 count = 2;
|
|
399
|
+
*/
|
|
400
|
+
count?: string;
|
|
401
|
+
/**
|
|
402
|
+
* A range feature's value.
|
|
403
|
+
*
|
|
404
|
+
* @generated from field: toshi.workspace.v1.FeatureRange range = 3;
|
|
405
|
+
*/
|
|
406
|
+
range?: FeatureRangeJson;
|
|
407
|
+
/**
|
|
408
|
+
* An enum feature's value, one of its values, or a string feature's.
|
|
409
|
+
*
|
|
410
|
+
* @generated from field: string text = 4;
|
|
411
|
+
*/
|
|
412
|
+
text?: string;
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* Describes the message toshi.workspace.v1.FeatureValue.
|
|
416
|
+
* Use `create(FeatureValueSchema)` to create a new message.
|
|
417
|
+
*/
|
|
418
|
+
export declare const FeatureValueSchema: GenMessage<FeatureValue, {
|
|
419
|
+
jsonType: FeatureValueJson;
|
|
420
|
+
}>;
|
|
421
|
+
/**
|
|
422
|
+
* FeatureRange is a range feature's value: from min to max, both included.
|
|
423
|
+
*
|
|
424
|
+
* @generated from message toshi.workspace.v1.FeatureRange
|
|
425
|
+
*/
|
|
426
|
+
export type FeatureRange = Message<"toshi.workspace.v1.FeatureRange"> & {
|
|
427
|
+
/**
|
|
428
|
+
* @generated from field: int64 min = 1;
|
|
429
|
+
*/
|
|
430
|
+
min: bigint;
|
|
431
|
+
/**
|
|
432
|
+
* @generated from field: int64 max = 2;
|
|
433
|
+
*/
|
|
434
|
+
max: bigint;
|
|
435
|
+
};
|
|
436
|
+
/**
|
|
437
|
+
* FeatureRange is a range feature's value: from min to max, both included.
|
|
438
|
+
*
|
|
439
|
+
* @generated from message toshi.workspace.v1.FeatureRange
|
|
440
|
+
*/
|
|
441
|
+
export type FeatureRangeJson = {
|
|
442
|
+
/**
|
|
443
|
+
* @generated from field: int64 min = 1;
|
|
444
|
+
*/
|
|
445
|
+
min?: string;
|
|
446
|
+
/**
|
|
447
|
+
* @generated from field: int64 max = 2;
|
|
448
|
+
*/
|
|
449
|
+
max?: string;
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* Describes the message toshi.workspace.v1.FeatureRange.
|
|
453
|
+
* Use `create(FeatureRangeSchema)` to create a new message.
|
|
454
|
+
*/
|
|
455
|
+
export declare const FeatureRangeSchema: GenMessage<FeatureRange, {
|
|
456
|
+
jsonType: FeatureRangeJson;
|
|
457
|
+
}>;
|
|
458
|
+
/**
|
|
459
|
+
* APIVersions are the versions a client checks itself against.
|
|
460
|
+
*
|
|
461
|
+
* @generated from message toshi.workspace.v1.APIVersions
|
|
462
|
+
*/
|
|
463
|
+
export type APIVersions = Message<"toshi.workspace.v1.APIVersions"> & {
|
|
464
|
+
/**
|
|
465
|
+
* api is the Toshi API's version, MAJOR.MINOR.PATCH: the version of the
|
|
466
|
+
* toshi-api module the SDKs are built from.
|
|
467
|
+
*
|
|
468
|
+
* @generated from field: string api = 1;
|
|
469
|
+
*/
|
|
470
|
+
api: string;
|
|
471
|
+
/**
|
|
472
|
+
* control_plane is the control plane's release, as GetVersion returns it.
|
|
473
|
+
*
|
|
474
|
+
* @generated from field: string control_plane = 2;
|
|
475
|
+
*/
|
|
476
|
+
controlPlane: string;
|
|
477
|
+
};
|
|
478
|
+
/**
|
|
479
|
+
* APIVersions are the versions a client checks itself against.
|
|
480
|
+
*
|
|
481
|
+
* @generated from message toshi.workspace.v1.APIVersions
|
|
482
|
+
*/
|
|
483
|
+
export type APIVersionsJson = {
|
|
484
|
+
/**
|
|
485
|
+
* api is the Toshi API's version, MAJOR.MINOR.PATCH: the version of the
|
|
486
|
+
* toshi-api module the SDKs are built from.
|
|
487
|
+
*
|
|
488
|
+
* @generated from field: string api = 1;
|
|
489
|
+
*/
|
|
490
|
+
api?: string;
|
|
491
|
+
/**
|
|
492
|
+
* control_plane is the control plane's release, as GetVersion returns it.
|
|
493
|
+
*
|
|
494
|
+
* @generated from field: string control_plane = 2;
|
|
495
|
+
*/
|
|
496
|
+
controlPlane?: string;
|
|
497
|
+
};
|
|
498
|
+
/**
|
|
499
|
+
* Describes the message toshi.workspace.v1.APIVersions.
|
|
500
|
+
* Use `create(APIVersionsSchema)` to create a new message.
|
|
501
|
+
*/
|
|
502
|
+
export declare const APIVersionsSchema: GenMessage<APIVersions, {
|
|
503
|
+
jsonType: APIVersionsJson;
|
|
504
|
+
}>;
|
|
505
|
+
/**
|
|
506
|
+
* ProductState is where a product is in the deployment's lifecycle. A
|
|
507
|
+
* product the config turns off goes from no new work through draining to
|
|
508
|
+
* stopped as its work ends, and back to enabled when the config turns it on
|
|
509
|
+
* again. None of the states deletes the product's data.
|
|
510
|
+
*
|
|
511
|
+
* @generated from enum toshi.workspace.v1.ProductState
|
|
512
|
+
*/
|
|
513
|
+
export declare enum ProductState {
|
|
514
|
+
/**
|
|
515
|
+
* @generated from enum value: PRODUCT_STATE_UNSPECIFIED = 0;
|
|
516
|
+
*/
|
|
517
|
+
UNSPECIFIED = 0,
|
|
518
|
+
/**
|
|
519
|
+
* The config turns the product on: it takes new work.
|
|
520
|
+
*
|
|
521
|
+
* @generated from enum value: PRODUCT_STATE_ENABLED = 1;
|
|
522
|
+
*/
|
|
523
|
+
ENABLED = 1,
|
|
524
|
+
/**
|
|
525
|
+
* Turned off, with work it accepted that has not started: it takes no new
|
|
526
|
+
* work, and that work still runs.
|
|
527
|
+
*
|
|
528
|
+
* @generated from enum value: PRODUCT_STATE_NO_NEW_WORK = 2;
|
|
529
|
+
*/
|
|
530
|
+
NO_NEW_WORK = 2,
|
|
531
|
+
/**
|
|
532
|
+
* Turned off, with its last work running: that work ends as it would
|
|
533
|
+
* have.
|
|
534
|
+
*
|
|
535
|
+
* @generated from enum value: PRODUCT_STATE_DRAINING = 3;
|
|
536
|
+
*/
|
|
537
|
+
DRAINING = 3,
|
|
538
|
+
/**
|
|
539
|
+
* Turned off, with nothing left to finish.
|
|
540
|
+
*
|
|
541
|
+
* @generated from enum value: PRODUCT_STATE_STOPPED = 4;
|
|
542
|
+
*/
|
|
543
|
+
STOPPED = 4
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* ProductState is where a product is in the deployment's lifecycle. A
|
|
547
|
+
* product the config turns off goes from no new work through draining to
|
|
548
|
+
* stopped as its work ends, and back to enabled when the config turns it on
|
|
549
|
+
* again. None of the states deletes the product's data.
|
|
550
|
+
*
|
|
551
|
+
* @generated from enum toshi.workspace.v1.ProductState
|
|
552
|
+
*/
|
|
553
|
+
export type ProductStateJson = "PRODUCT_STATE_UNSPECIFIED" | "PRODUCT_STATE_ENABLED" | "PRODUCT_STATE_NO_NEW_WORK" | "PRODUCT_STATE_DRAINING" | "PRODUCT_STATE_STOPPED";
|
|
554
|
+
/**
|
|
555
|
+
* Describes the enum toshi.workspace.v1.ProductState.
|
|
556
|
+
*/
|
|
557
|
+
export declare const ProductStateSchema: GenEnum<ProductState, ProductStateJson>;
|
|
558
|
+
/**
|
|
559
|
+
* ProductSwitch is the switch that decides whether a product is on for a
|
|
560
|
+
* workspace. The deployment's config decides first, then the workspace's
|
|
561
|
+
* entitlements, then its settings; the first that turns the product off is
|
|
562
|
+
* the one named.
|
|
563
|
+
*
|
|
564
|
+
* @generated from enum toshi.workspace.v1.ProductSwitch
|
|
565
|
+
*/
|
|
566
|
+
export declare enum ProductSwitch {
|
|
567
|
+
/**
|
|
568
|
+
* @generated from enum value: PRODUCT_SWITCH_UNSPECIFIED = 0;
|
|
569
|
+
*/
|
|
570
|
+
UNSPECIFIED = 0,
|
|
571
|
+
/**
|
|
572
|
+
* No switch turns the product off: it is on for the workspace.
|
|
573
|
+
*
|
|
574
|
+
* @generated from enum value: PRODUCT_SWITCH_ON = 1;
|
|
575
|
+
*/
|
|
576
|
+
ON = 1,
|
|
577
|
+
/**
|
|
578
|
+
* The deployment's config turns the product off ("disabled").
|
|
579
|
+
*
|
|
580
|
+
* @generated from enum value: PRODUCT_SWITCH_DISABLED = 2;
|
|
581
|
+
*/
|
|
582
|
+
DISABLED = 2,
|
|
583
|
+
/**
|
|
584
|
+
* The workspace's entitlements leave the product out ("not_entitled").
|
|
585
|
+
*
|
|
586
|
+
* @generated from enum value: PRODUCT_SWITCH_NOT_ENTITLED = 3;
|
|
587
|
+
*/
|
|
588
|
+
NOT_ENTITLED = 3,
|
|
589
|
+
/**
|
|
590
|
+
* The workspace's settings turn the product off ("turned_off").
|
|
591
|
+
*
|
|
592
|
+
* @generated from enum value: PRODUCT_SWITCH_TURNED_OFF = 4;
|
|
593
|
+
*/
|
|
594
|
+
TURNED_OFF = 4
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* ProductSwitch is the switch that decides whether a product is on for a
|
|
598
|
+
* workspace. The deployment's config decides first, then the workspace's
|
|
599
|
+
* entitlements, then its settings; the first that turns the product off is
|
|
600
|
+
* the one named.
|
|
601
|
+
*
|
|
602
|
+
* @generated from enum toshi.workspace.v1.ProductSwitch
|
|
603
|
+
*/
|
|
604
|
+
export type ProductSwitchJson = "PRODUCT_SWITCH_UNSPECIFIED" | "PRODUCT_SWITCH_ON" | "PRODUCT_SWITCH_DISABLED" | "PRODUCT_SWITCH_NOT_ENTITLED" | "PRODUCT_SWITCH_TURNED_OFF";
|
|
605
|
+
/**
|
|
606
|
+
* Describes the enum toshi.workspace.v1.ProductSwitch.
|
|
607
|
+
*/
|
|
608
|
+
export declare const ProductSwitchSchema: GenEnum<ProductSwitch, ProductSwitchJson>;
|
|
609
|
+
/**
|
|
610
|
+
* ProductFeatureType is the type of a feature's value.
|
|
611
|
+
*
|
|
612
|
+
* @generated from enum toshi.workspace.v1.ProductFeatureType
|
|
613
|
+
*/
|
|
614
|
+
export declare enum ProductFeatureType {
|
|
615
|
+
/**
|
|
616
|
+
* @generated from enum value: PRODUCT_FEATURE_TYPE_UNSPECIFIED = 0;
|
|
617
|
+
*/
|
|
618
|
+
UNSPECIFIED = 0,
|
|
619
|
+
/**
|
|
620
|
+
* @generated from enum value: PRODUCT_FEATURE_TYPE_BOOL = 1;
|
|
621
|
+
*/
|
|
622
|
+
BOOL = 1,
|
|
623
|
+
/**
|
|
624
|
+
* @generated from enum value: PRODUCT_FEATURE_TYPE_COUNT = 2;
|
|
625
|
+
*/
|
|
626
|
+
COUNT = 2,
|
|
627
|
+
/**
|
|
628
|
+
* @generated from enum value: PRODUCT_FEATURE_TYPE_RANGE = 3;
|
|
629
|
+
*/
|
|
630
|
+
RANGE = 3,
|
|
631
|
+
/**
|
|
632
|
+
* @generated from enum value: PRODUCT_FEATURE_TYPE_ENUM = 4;
|
|
633
|
+
*/
|
|
634
|
+
ENUM = 4,
|
|
635
|
+
/**
|
|
636
|
+
* @generated from enum value: PRODUCT_FEATURE_TYPE_STRING = 5;
|
|
637
|
+
*/
|
|
638
|
+
STRING = 5
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* ProductFeatureType is the type of a feature's value.
|
|
642
|
+
*
|
|
643
|
+
* @generated from enum toshi.workspace.v1.ProductFeatureType
|
|
644
|
+
*/
|
|
645
|
+
export type ProductFeatureTypeJson = "PRODUCT_FEATURE_TYPE_UNSPECIFIED" | "PRODUCT_FEATURE_TYPE_BOOL" | "PRODUCT_FEATURE_TYPE_COUNT" | "PRODUCT_FEATURE_TYPE_RANGE" | "PRODUCT_FEATURE_TYPE_ENUM" | "PRODUCT_FEATURE_TYPE_STRING";
|
|
646
|
+
/**
|
|
647
|
+
* Describes the enum toshi.workspace.v1.ProductFeatureType.
|
|
648
|
+
*/
|
|
649
|
+
export declare const ProductFeatureTypeSchema: GenEnum<ProductFeatureType, ProductFeatureTypeJson>;
|
|
650
|
+
/**
|
|
651
|
+
* DiscoveryService tells a client what this deployment serves and what the
|
|
652
|
+
* caller may do in the workspace, in one call: the products the build
|
|
653
|
+
* includes, where each is in the deployment's lifecycle and whether the
|
|
654
|
+
* workspace has it on, each feature's entitlement, setting and effective
|
|
655
|
+
* value, the caller's permissions and the versions of the API and the
|
|
656
|
+
* control plane. A client
|
|
657
|
+
* reads it to decide what to show and what to call.
|
|
658
|
+
*
|
|
659
|
+
* The caller's credential names the workspace, as for WorkloadService.
|
|
660
|
+
*
|
|
661
|
+
* @generated from service toshi.workspace.v1.DiscoveryService
|
|
662
|
+
*/
|
|
663
|
+
export declare const DiscoveryService: GenService<{
|
|
664
|
+
/**
|
|
665
|
+
* Discover returns the products, the caller's permissions in the
|
|
666
|
+
* workspace, or in one of its projects or environments, and the
|
|
667
|
+
* versions. A suspended workspace answers it.
|
|
668
|
+
*
|
|
669
|
+
* @generated from rpc toshi.workspace.v1.DiscoveryService.Discover
|
|
670
|
+
*/
|
|
671
|
+
discover: {
|
|
672
|
+
methodKind: "unary";
|
|
673
|
+
input: typeof DiscoverRequestSchema;
|
|
674
|
+
output: typeof DiscoverResponseSchema;
|
|
675
|
+
};
|
|
676
|
+
}>;
|