@toshicloud/sdk 0.4.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.
- package/README.md +102 -19
- package/dist/client.d.ts +40 -4
- package/dist/client.js +35 -4
- package/dist/errors.d.ts +99 -0
- package/dist/errors.js +208 -0
- package/dist/gen/toshi/permission_pb.d.ts +244 -0
- package/dist/gen/toshi/permission_pb.js +94 -0
- package/dist/gen/toshi/workspace/v1/account_pb.d.ts +590 -0
- package/dist/gen/toshi/workspace/v1/account_pb.js +75 -0
- package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +14 -8
- package/dist/gen/toshi/workspace/v1/artifacts_pb.js +10 -7
- package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +191 -6
- package/dist/gen/toshi/workspace/v1/audit_events_pb.js +12 -1
- package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +1194 -21
- package/dist/gen/toshi/workspace/v1/channels_pb.js +186 -39
- package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +1481 -0
- package/dist/gen/toshi/workspace/v1/connections_pb.js +208 -0
- package/dist/gen/toshi/workspace/v1/discovery_pb.d.ts +924 -0
- package/dist/gen/toshi/workspace/v1/discovery_pb.js +231 -0
- package/dist/gen/toshi/workspace/v1/display_pb.d.ts +198 -15
- package/dist/gen/toshi/workspace/v1/display_pb.js +53 -2
- package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +864 -0
- package/dist/gen/toshi/workspace/v1/domains_pb.js +152 -0
- package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +12 -4
- package/dist/gen/toshi/workspace/v1/fillers_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +1297 -0
- package/dist/gen/toshi/workspace/v1/grants_pb.js +271 -0
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +315 -15
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +11 -5
- package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +196 -7
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +13 -7
- package/dist/gen/toshi/workspace/v1/images_pb.d.ts +1463 -0
- package/dist/gen/toshi/workspace/v1/images_pb.js +263 -0
- package/dist/gen/toshi/workspace/v1/products_pb.d.ts +506 -0
- package/dist/gen/toshi/workspace/v1/products_pb.js +60 -0
- package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1474 -99
- package/dist/gen/toshi/workspace/v1/projects_pb.js +151 -33
- package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +181 -14
- package/dist/gen/toshi/workspace/v1/recordings_pb.js +55 -14
- package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1994 -0
- package/dist/gen/toshi/workspace/v1/roles_pb.js +355 -0
- package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +314 -8
- package/dist/gen/toshi/workspace/v1/secrets_pb.js +43 -18
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +14 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +434 -5
- package/dist/gen/toshi/workspace/v1/tokens_pb.js +66 -8
- package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +1099 -0
- package/dist/gen/toshi/workspace/v1/triggers_pb.js +185 -0
- package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +1052 -33
- package/dist/gen/toshi/workspace/v1/volumes_pb.js +170 -11
- package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +66 -8
- package/dist/gen/toshi/workspace/v1/webhook_pb.js +5 -4
- package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2043 -54
- package/dist/gen/toshi/workspace/v1/workloads_pb.js +205 -54
- package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6292 -939
- package/dist/gen/toshi/workspace/v1/workspace_pb.js +801 -88
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +2176 -630
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +192 -74
- package/dist/index.d.ts +10 -1
- package/dist/index.js +10 -1
- package/dist/interceptors.d.ts +11 -1
- package/dist/interceptors.js +38 -4
- package/dist/retry.d.ts +18 -0
- package/dist/retry.js +228 -22
- package/dist/test/procedures.js +100 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wait.d.ts +4 -0
- package/dist/wait.js +24 -1
- package/package.json +3 -2
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { FeatureSource, FeatureSourceJson, FeatureValue, FeatureValueJson, ProductStability, ProductStabilityJson, ProductState, ProductStateJson } from "./discovery_pb.js";
|
|
4
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
5
|
+
/**
|
|
6
|
+
* Describes the file toshi/workspace/v1/products.proto.
|
|
7
|
+
*/
|
|
8
|
+
export declare const file_toshi_workspace_v1_products: GenFile;
|
|
9
|
+
/**
|
|
10
|
+
* @generated from message toshi.workspace.v1.ListProductsRequest
|
|
11
|
+
*/
|
|
12
|
+
export type ListProductsRequest = Message<"toshi.workspace.v1.ListProductsRequest"> & {};
|
|
13
|
+
/**
|
|
14
|
+
* @generated from message toshi.workspace.v1.ListProductsRequest
|
|
15
|
+
*/
|
|
16
|
+
export type ListProductsRequestJson = {};
|
|
17
|
+
/**
|
|
18
|
+
* Describes the message toshi.workspace.v1.ListProductsRequest.
|
|
19
|
+
* Use `create(ListProductsRequestSchema)` to create a new message.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ListProductsRequestSchema: GenMessage<ListProductsRequest, {
|
|
22
|
+
jsonType: ListProductsRequestJson;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* @generated from message toshi.workspace.v1.ListProductsResponse
|
|
26
|
+
*/
|
|
27
|
+
export type ListProductsResponse = Message<"toshi.workspace.v1.ListProductsResponse"> & {
|
|
28
|
+
/**
|
|
29
|
+
* products are the products the deployment includes, by id.
|
|
30
|
+
*
|
|
31
|
+
* @generated from field: repeated toshi.workspace.v1.ProductSettings products = 1;
|
|
32
|
+
*/
|
|
33
|
+
products: ProductSettings[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @generated from message toshi.workspace.v1.ListProductsResponse
|
|
37
|
+
*/
|
|
38
|
+
export type ListProductsResponseJson = {
|
|
39
|
+
/**
|
|
40
|
+
* products are the products the deployment includes, by id.
|
|
41
|
+
*
|
|
42
|
+
* @generated from field: repeated toshi.workspace.v1.ProductSettings products = 1;
|
|
43
|
+
*/
|
|
44
|
+
products?: ProductSettingsJson[];
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Describes the message toshi.workspace.v1.ListProductsResponse.
|
|
48
|
+
* Use `create(ListProductsResponseSchema)` to create a new message.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ListProductsResponseSchema: GenMessage<ListProductsResponse, {
|
|
51
|
+
jsonType: ListProductsResponseJson;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from message toshi.workspace.v1.UpdateProductRequest
|
|
55
|
+
*/
|
|
56
|
+
export type UpdateProductRequest = Message<"toshi.workspace.v1.UpdateProductRequest"> & {
|
|
57
|
+
/**
|
|
58
|
+
* id names the product, such as "runners".
|
|
59
|
+
*
|
|
60
|
+
* @generated from field: string id = 1;
|
|
61
|
+
*/
|
|
62
|
+
id: string;
|
|
63
|
+
/**
|
|
64
|
+
* enabled turns the product on or off for the workspace: it sets the
|
|
65
|
+
* product's own switch, the feature "<id>.enabled". Unset leaves it.
|
|
66
|
+
* Turning on a product the workspace's entitlements leave off is
|
|
67
|
+
* INVALID_ARGUMENT.
|
|
68
|
+
*
|
|
69
|
+
* @generated from field: optional bool enabled = 2;
|
|
70
|
+
*/
|
|
71
|
+
enabled?: boolean | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* settings are the features to set, by key ("<id>.<name>"), each to a
|
|
74
|
+
* value of the feature's type.
|
|
75
|
+
*
|
|
76
|
+
* @generated from field: map<string, toshi.workspace.v1.FeatureValue> settings = 3;
|
|
77
|
+
*/
|
|
78
|
+
settings: {
|
|
79
|
+
[key: string]: FeatureValue;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* clear are the keys of the features whose settings to remove: the
|
|
83
|
+
* entitlement applies again. A key that is also in settings, or that
|
|
84
|
+
* enabled sets, is INVALID_ARGUMENT.
|
|
85
|
+
*
|
|
86
|
+
* @generated from field: repeated string clear = 4;
|
|
87
|
+
*/
|
|
88
|
+
clear: string[];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* @generated from message toshi.workspace.v1.UpdateProductRequest
|
|
92
|
+
*/
|
|
93
|
+
export type UpdateProductRequestJson = {
|
|
94
|
+
/**
|
|
95
|
+
* id names the product, such as "runners".
|
|
96
|
+
*
|
|
97
|
+
* @generated from field: string id = 1;
|
|
98
|
+
*/
|
|
99
|
+
id?: string;
|
|
100
|
+
/**
|
|
101
|
+
* enabled turns the product on or off for the workspace: it sets the
|
|
102
|
+
* product's own switch, the feature "<id>.enabled". Unset leaves it.
|
|
103
|
+
* Turning on a product the workspace's entitlements leave off is
|
|
104
|
+
* INVALID_ARGUMENT.
|
|
105
|
+
*
|
|
106
|
+
* @generated from field: optional bool enabled = 2;
|
|
107
|
+
*/
|
|
108
|
+
enabled?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* settings are the features to set, by key ("<id>.<name>"), each to a
|
|
111
|
+
* value of the feature's type.
|
|
112
|
+
*
|
|
113
|
+
* @generated from field: map<string, toshi.workspace.v1.FeatureValue> settings = 3;
|
|
114
|
+
*/
|
|
115
|
+
settings?: {
|
|
116
|
+
[key: string]: FeatureValueJson;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* clear are the keys of the features whose settings to remove: the
|
|
120
|
+
* entitlement applies again. A key that is also in settings, or that
|
|
121
|
+
* enabled sets, is INVALID_ARGUMENT.
|
|
122
|
+
*
|
|
123
|
+
* @generated from field: repeated string clear = 4;
|
|
124
|
+
*/
|
|
125
|
+
clear?: string[];
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Describes the message toshi.workspace.v1.UpdateProductRequest.
|
|
129
|
+
* Use `create(UpdateProductRequestSchema)` to create a new message.
|
|
130
|
+
*/
|
|
131
|
+
export declare const UpdateProductRequestSchema: GenMessage<UpdateProductRequest, {
|
|
132
|
+
jsonType: UpdateProductRequestJson;
|
|
133
|
+
}>;
|
|
134
|
+
/**
|
|
135
|
+
* @generated from message toshi.workspace.v1.UpdateProductResponse
|
|
136
|
+
*/
|
|
137
|
+
export type UpdateProductResponse = Message<"toshi.workspace.v1.UpdateProductResponse"> & {
|
|
138
|
+
/**
|
|
139
|
+
* product is the product as the workspace has it after the change.
|
|
140
|
+
*
|
|
141
|
+
* @generated from field: toshi.workspace.v1.ProductSettings product = 1;
|
|
142
|
+
*/
|
|
143
|
+
product?: ProductSettings | undefined;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* @generated from message toshi.workspace.v1.UpdateProductResponse
|
|
147
|
+
*/
|
|
148
|
+
export type UpdateProductResponseJson = {
|
|
149
|
+
/**
|
|
150
|
+
* product is the product as the workspace has it after the change.
|
|
151
|
+
*
|
|
152
|
+
* @generated from field: toshi.workspace.v1.ProductSettings product = 1;
|
|
153
|
+
*/
|
|
154
|
+
product?: ProductSettingsJson;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Describes the message toshi.workspace.v1.UpdateProductResponse.
|
|
158
|
+
* Use `create(UpdateProductResponseSchema)` to create a new message.
|
|
159
|
+
*/
|
|
160
|
+
export declare const UpdateProductResponseSchema: GenMessage<UpdateProductResponse, {
|
|
161
|
+
jsonType: UpdateProductResponseJson;
|
|
162
|
+
}>;
|
|
163
|
+
/**
|
|
164
|
+
* ProductSettings is one product as the workspace has it.
|
|
165
|
+
*
|
|
166
|
+
* @generated from message toshi.workspace.v1.ProductSettings
|
|
167
|
+
*/
|
|
168
|
+
export type ProductSettings = Message<"toshi.workspace.v1.ProductSettings"> & {
|
|
169
|
+
/**
|
|
170
|
+
* id names the product, such as "runners": its config section, the
|
|
171
|
+
* prefix of its features and its permissions.
|
|
172
|
+
*
|
|
173
|
+
* @generated from field: string id = 1;
|
|
174
|
+
*/
|
|
175
|
+
id: string;
|
|
176
|
+
/**
|
|
177
|
+
* features are the product's features, in the order the product
|
|
178
|
+
* declares them.
|
|
179
|
+
*
|
|
180
|
+
* @generated from field: repeated toshi.workspace.v1.FeatureSetting features = 3;
|
|
181
|
+
*/
|
|
182
|
+
features: FeatureSetting[];
|
|
183
|
+
/**
|
|
184
|
+
* state is where the product is in the deployment's lifecycle, as
|
|
185
|
+
* DiscoveryService.Discover reports it: a product the deployment's config
|
|
186
|
+
* turns off is winding down (no new work, draining) until its work ends,
|
|
187
|
+
* then stopped.
|
|
188
|
+
*
|
|
189
|
+
* @generated from field: toshi.workspace.v1.ProductState state = 4;
|
|
190
|
+
*/
|
|
191
|
+
state: ProductState;
|
|
192
|
+
/**
|
|
193
|
+
* surfaces are what the product adds to Toshi: the path its API is
|
|
194
|
+
* served at.
|
|
195
|
+
*
|
|
196
|
+
* @generated from field: toshi.workspace.v1.ProductSurfaces surfaces = 6;
|
|
197
|
+
*/
|
|
198
|
+
surfaces?: ProductSurfaces | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* name is the product's name as people read it, such as "Runners", or
|
|
201
|
+
* its id when it names none.
|
|
202
|
+
*
|
|
203
|
+
* @generated from field: string name = 7;
|
|
204
|
+
*/
|
|
205
|
+
name: string;
|
|
206
|
+
/**
|
|
207
|
+
* stability is how mature the product is in this build.
|
|
208
|
+
*
|
|
209
|
+
* @generated from field: toshi.workspace.v1.ProductStability stability = 8;
|
|
210
|
+
*/
|
|
211
|
+
stability: ProductStability;
|
|
212
|
+
/**
|
|
213
|
+
* removal_version is the version a deprecated product is removed in;
|
|
214
|
+
* empty for the other stabilities.
|
|
215
|
+
*
|
|
216
|
+
* @generated from field: string removal_version = 9;
|
|
217
|
+
*/
|
|
218
|
+
removalVersion: string;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* ProductSettings is one product as the workspace has it.
|
|
222
|
+
*
|
|
223
|
+
* @generated from message toshi.workspace.v1.ProductSettings
|
|
224
|
+
*/
|
|
225
|
+
export type ProductSettingsJson = {
|
|
226
|
+
/**
|
|
227
|
+
* id names the product, such as "runners": its config section, the
|
|
228
|
+
* prefix of its features and its permissions.
|
|
229
|
+
*
|
|
230
|
+
* @generated from field: string id = 1;
|
|
231
|
+
*/
|
|
232
|
+
id?: string;
|
|
233
|
+
/**
|
|
234
|
+
* features are the product's features, in the order the product
|
|
235
|
+
* declares them.
|
|
236
|
+
*
|
|
237
|
+
* @generated from field: repeated toshi.workspace.v1.FeatureSetting features = 3;
|
|
238
|
+
*/
|
|
239
|
+
features?: FeatureSettingJson[];
|
|
240
|
+
/**
|
|
241
|
+
* state is where the product is in the deployment's lifecycle, as
|
|
242
|
+
* DiscoveryService.Discover reports it: a product the deployment's config
|
|
243
|
+
* turns off is winding down (no new work, draining) until its work ends,
|
|
244
|
+
* then stopped.
|
|
245
|
+
*
|
|
246
|
+
* @generated from field: toshi.workspace.v1.ProductState state = 4;
|
|
247
|
+
*/
|
|
248
|
+
state?: ProductStateJson;
|
|
249
|
+
/**
|
|
250
|
+
* surfaces are what the product adds to Toshi: the path its API is
|
|
251
|
+
* served at.
|
|
252
|
+
*
|
|
253
|
+
* @generated from field: toshi.workspace.v1.ProductSurfaces surfaces = 6;
|
|
254
|
+
*/
|
|
255
|
+
surfaces?: ProductSurfacesJson;
|
|
256
|
+
/**
|
|
257
|
+
* name is the product's name as people read it, such as "Runners", or
|
|
258
|
+
* its id when it names none.
|
|
259
|
+
*
|
|
260
|
+
* @generated from field: string name = 7;
|
|
261
|
+
*/
|
|
262
|
+
name?: string;
|
|
263
|
+
/**
|
|
264
|
+
* stability is how mature the product is in this build.
|
|
265
|
+
*
|
|
266
|
+
* @generated from field: toshi.workspace.v1.ProductStability stability = 8;
|
|
267
|
+
*/
|
|
268
|
+
stability?: ProductStabilityJson;
|
|
269
|
+
/**
|
|
270
|
+
* removal_version is the version a deprecated product is removed in;
|
|
271
|
+
* empty for the other stabilities.
|
|
272
|
+
*
|
|
273
|
+
* @generated from field: string removal_version = 9;
|
|
274
|
+
*/
|
|
275
|
+
removalVersion?: string;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* Describes the message toshi.workspace.v1.ProductSettings.
|
|
279
|
+
* Use `create(ProductSettingsSchema)` to create a new message.
|
|
280
|
+
*/
|
|
281
|
+
export declare const ProductSettingsSchema: GenMessage<ProductSettings, {
|
|
282
|
+
jsonType: ProductSettingsJson;
|
|
283
|
+
}>;
|
|
284
|
+
/**
|
|
285
|
+
* ProductSurfaces are what a product adds to Toshi, empty when it adds none.
|
|
286
|
+
*
|
|
287
|
+
* @generated from message toshi.workspace.v1.ProductSurfaces
|
|
288
|
+
*/
|
|
289
|
+
export type ProductSurfaces = Message<"toshi.workspace.v1.ProductSurfaces"> & {
|
|
290
|
+
/**
|
|
291
|
+
* api is the path the control plane serves the product's API at, such
|
|
292
|
+
* as "/runners/".
|
|
293
|
+
*
|
|
294
|
+
* @generated from field: string api = 1;
|
|
295
|
+
*/
|
|
296
|
+
api: string;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* ProductSurfaces are what a product adds to Toshi, empty when it adds none.
|
|
300
|
+
*
|
|
301
|
+
* @generated from message toshi.workspace.v1.ProductSurfaces
|
|
302
|
+
*/
|
|
303
|
+
export type ProductSurfacesJson = {
|
|
304
|
+
/**
|
|
305
|
+
* api is the path the control plane serves the product's API at, such
|
|
306
|
+
* as "/runners/".
|
|
307
|
+
*
|
|
308
|
+
* @generated from field: string api = 1;
|
|
309
|
+
*/
|
|
310
|
+
api?: string;
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Describes the message toshi.workspace.v1.ProductSurfaces.
|
|
314
|
+
* Use `create(ProductSurfacesSchema)` to create a new message.
|
|
315
|
+
*/
|
|
316
|
+
export declare const ProductSurfacesSchema: GenMessage<ProductSurfaces, {
|
|
317
|
+
jsonType: ProductSurfacesJson;
|
|
318
|
+
}>;
|
|
319
|
+
/**
|
|
320
|
+
* FeatureSetting is one feature of a product as the workspace has it.
|
|
321
|
+
*
|
|
322
|
+
* @generated from message toshi.workspace.v1.FeatureSetting
|
|
323
|
+
*/
|
|
324
|
+
export type FeatureSetting = Message<"toshi.workspace.v1.FeatureSetting"> & {
|
|
325
|
+
/**
|
|
326
|
+
* key is "<product id>.<name>".
|
|
327
|
+
*
|
|
328
|
+
* @generated from field: string key = 1;
|
|
329
|
+
*/
|
|
330
|
+
key: string;
|
|
331
|
+
/**
|
|
332
|
+
* narrowable reports whether the workspace's settings may narrow the
|
|
333
|
+
* feature. UpdateProduct refuses a setting of a feature that is not.
|
|
334
|
+
*
|
|
335
|
+
* @generated from field: bool narrowable = 2;
|
|
336
|
+
*/
|
|
337
|
+
narrowable: boolean;
|
|
338
|
+
/**
|
|
339
|
+
* entitlement is the most the workspace may choose: the operator's
|
|
340
|
+
* override for the workspace, else its plan's value, else the value of
|
|
341
|
+
* the plan key it falls back to, else the feature's default (source).
|
|
342
|
+
*
|
|
343
|
+
* @generated from field: toshi.workspace.v1.FeatureValue entitlement = 3;
|
|
344
|
+
*/
|
|
345
|
+
entitlement?: FeatureValue | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* setting is the workspace's own choice; unset when it has none. A
|
|
348
|
+
* setting its entitlement no longer contains, after the plan or an
|
|
349
|
+
* override lowered it, is kept and not applied.
|
|
350
|
+
*
|
|
351
|
+
* @generated from field: toshi.workspace.v1.FeatureValue setting = 4;
|
|
352
|
+
*/
|
|
353
|
+
setting?: FeatureValue | undefined;
|
|
354
|
+
/**
|
|
355
|
+
* effective is the value the product uses while it is on: the setting
|
|
356
|
+
* when the entitlement contains it, else the entitlement.
|
|
357
|
+
*
|
|
358
|
+
* @generated from field: toshi.workspace.v1.FeatureValue effective = 5;
|
|
359
|
+
*/
|
|
360
|
+
effective?: FeatureValue | undefined;
|
|
361
|
+
/**
|
|
362
|
+
* changed_by names who made the setting, as the audit log names an
|
|
363
|
+
* actor, and changed_at when; both unset when the workspace has no
|
|
364
|
+
* setting.
|
|
365
|
+
*
|
|
366
|
+
* @generated from field: string changed_by = 6;
|
|
367
|
+
*/
|
|
368
|
+
changedBy: string;
|
|
369
|
+
/**
|
|
370
|
+
* @generated from field: google.protobuf.Timestamp changed_at = 7;
|
|
371
|
+
*/
|
|
372
|
+
changedAt?: Timestamp | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* source says where the entitlement comes from.
|
|
375
|
+
*
|
|
376
|
+
* @generated from field: toshi.workspace.v1.FeatureSource source = 8;
|
|
377
|
+
*/
|
|
378
|
+
source: FeatureSource;
|
|
379
|
+
/**
|
|
380
|
+
* plan_key names the plan key the feature falls back to, empty for none.
|
|
381
|
+
*
|
|
382
|
+
* @generated from field: string plan_key = 9;
|
|
383
|
+
*/
|
|
384
|
+
planKey: string;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* FeatureSetting is one feature of a product as the workspace has it.
|
|
388
|
+
*
|
|
389
|
+
* @generated from message toshi.workspace.v1.FeatureSetting
|
|
390
|
+
*/
|
|
391
|
+
export type FeatureSettingJson = {
|
|
392
|
+
/**
|
|
393
|
+
* key is "<product id>.<name>".
|
|
394
|
+
*
|
|
395
|
+
* @generated from field: string key = 1;
|
|
396
|
+
*/
|
|
397
|
+
key?: string;
|
|
398
|
+
/**
|
|
399
|
+
* narrowable reports whether the workspace's settings may narrow the
|
|
400
|
+
* feature. UpdateProduct refuses a setting of a feature that is not.
|
|
401
|
+
*
|
|
402
|
+
* @generated from field: bool narrowable = 2;
|
|
403
|
+
*/
|
|
404
|
+
narrowable?: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* entitlement is the most the workspace may choose: the operator's
|
|
407
|
+
* override for the workspace, else its plan's value, else the value of
|
|
408
|
+
* the plan key it falls back to, else the feature's default (source).
|
|
409
|
+
*
|
|
410
|
+
* @generated from field: toshi.workspace.v1.FeatureValue entitlement = 3;
|
|
411
|
+
*/
|
|
412
|
+
entitlement?: FeatureValueJson;
|
|
413
|
+
/**
|
|
414
|
+
* setting is the workspace's own choice; unset when it has none. A
|
|
415
|
+
* setting its entitlement no longer contains, after the plan or an
|
|
416
|
+
* override lowered it, is kept and not applied.
|
|
417
|
+
*
|
|
418
|
+
* @generated from field: toshi.workspace.v1.FeatureValue setting = 4;
|
|
419
|
+
*/
|
|
420
|
+
setting?: FeatureValueJson;
|
|
421
|
+
/**
|
|
422
|
+
* effective is the value the product uses while it is on: the setting
|
|
423
|
+
* when the entitlement contains it, else the entitlement.
|
|
424
|
+
*
|
|
425
|
+
* @generated from field: toshi.workspace.v1.FeatureValue effective = 5;
|
|
426
|
+
*/
|
|
427
|
+
effective?: FeatureValueJson;
|
|
428
|
+
/**
|
|
429
|
+
* changed_by names who made the setting, as the audit log names an
|
|
430
|
+
* actor, and changed_at when; both unset when the workspace has no
|
|
431
|
+
* setting.
|
|
432
|
+
*
|
|
433
|
+
* @generated from field: string changed_by = 6;
|
|
434
|
+
*/
|
|
435
|
+
changedBy?: string;
|
|
436
|
+
/**
|
|
437
|
+
* @generated from field: google.protobuf.Timestamp changed_at = 7;
|
|
438
|
+
*/
|
|
439
|
+
changedAt?: TimestampJson;
|
|
440
|
+
/**
|
|
441
|
+
* source says where the entitlement comes from.
|
|
442
|
+
*
|
|
443
|
+
* @generated from field: toshi.workspace.v1.FeatureSource source = 8;
|
|
444
|
+
*/
|
|
445
|
+
source?: FeatureSourceJson;
|
|
446
|
+
/**
|
|
447
|
+
* plan_key names the plan key the feature falls back to, empty for none.
|
|
448
|
+
*
|
|
449
|
+
* @generated from field: string plan_key = 9;
|
|
450
|
+
*/
|
|
451
|
+
planKey?: string;
|
|
452
|
+
};
|
|
453
|
+
/**
|
|
454
|
+
* Describes the message toshi.workspace.v1.FeatureSetting.
|
|
455
|
+
* Use `create(FeatureSettingSchema)` to create a new message.
|
|
456
|
+
*/
|
|
457
|
+
export declare const FeatureSettingSchema: GenMessage<FeatureSetting, {
|
|
458
|
+
jsonType: FeatureSettingJson;
|
|
459
|
+
}>;
|
|
460
|
+
/**
|
|
461
|
+
* ProductService reads and changes the workspace's settings of its
|
|
462
|
+
* products. A product, such as Runners, declares features: typed keys such
|
|
463
|
+
* as "runners.enabled", the product's own switch, or a limit such as
|
|
464
|
+
* "previews.max_count". The workspace's entitlement to each feature comes
|
|
465
|
+
* from its plan and the operator's overrides, and it cannot change it. Its
|
|
466
|
+
* settings are its own choices within the entitlement: they only narrow it,
|
|
467
|
+
* turning a product or a feature off or setting a lower limit.
|
|
468
|
+
*
|
|
469
|
+
* The caller's credential names the workspace, as for WorkloadService.
|
|
470
|
+
*
|
|
471
|
+
* @generated from service toshi.workspace.v1.ProductService
|
|
472
|
+
*/
|
|
473
|
+
export declare const ProductService: GenService<{
|
|
474
|
+
/**
|
|
475
|
+
* ListProducts returns the products the deployment includes, by id, each
|
|
476
|
+
* with its features: the entitlement, the workspace's
|
|
477
|
+
* setting if it has one, the effective value, and who changed the
|
|
478
|
+
* setting last and when.
|
|
479
|
+
*
|
|
480
|
+
* @generated from rpc toshi.workspace.v1.ProductService.ListProducts
|
|
481
|
+
*/
|
|
482
|
+
listProducts: {
|
|
483
|
+
methodKind: "unary";
|
|
484
|
+
input: typeof ListProductsRequestSchema;
|
|
485
|
+
output: typeof ListProductsResponseSchema;
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* UpdateProduct changes the workspace's settings of one product in one
|
|
489
|
+
* call: it turns the product on or off, and sets or clears its features.
|
|
490
|
+
* The caller and the time of the call are recorded with each setting it
|
|
491
|
+
* sets. A setting only narrows the workspace's entitlement: a value wider
|
|
492
|
+
* than the entitlement, a key the product does not declare or that the
|
|
493
|
+
* workspace cannot narrow, or a value of another type than the key's is
|
|
494
|
+
* INVALID_ARGUMENT naming the key, and nothing is changed. A product the
|
|
495
|
+
* deployment does not include is NOT_FOUND.
|
|
496
|
+
*
|
|
497
|
+
* The product's calls follow the change from the next call on.
|
|
498
|
+
*
|
|
499
|
+
* @generated from rpc toshi.workspace.v1.ProductService.UpdateProduct
|
|
500
|
+
*/
|
|
501
|
+
updateProduct: {
|
|
502
|
+
methodKind: "unary";
|
|
503
|
+
input: typeof UpdateProductRequestSchema;
|
|
504
|
+
output: typeof UpdateProductResponseSchema;
|
|
505
|
+
};
|
|
506
|
+
}>;
|
|
@@ -0,0 +1,60 @@
|
|
|
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/products.proto (package toshi.workspace.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
6
|
+
import { file_toshi_permission } from "../../permission_pb.js";
|
|
7
|
+
import { file_toshi_workspace_v1_discovery } from "./discovery_pb.js";
|
|
8
|
+
/**
|
|
9
|
+
* Describes the file toshi/workspace/v1/products.proto.
|
|
10
|
+
*/
|
|
11
|
+
export const file_toshi_workspace_v1_products = /*@__PURE__*/ fileDesc("CiF0b3NoaS93b3Jrc3BhY2UvdjEvcHJvZHVjdHMucHJvdG8SEnRvc2hpLndvcmtzcGFjZS52MSIVChNMaXN0UHJvZHVjdHNSZXF1ZXN0Ik0KFExpc3RQcm9kdWN0c1Jlc3BvbnNlEjUKCHByb2R1Y3RzGAEgAygLMiMudG9zaGkud29ya3NwYWNlLnYxLlByb2R1Y3RTZXR0aW5ncyKWAgoUVXBkYXRlUHJvZHVjdFJlcXVlc3QSCgoCaWQYASABKAkSFAoHZW5hYmxlZBgCIAEoCEgAiAEBEkgKCHNldHRpbmdzGAMgAygLMjYudG9zaGkud29ya3NwYWNlLnYxLlVwZGF0ZVByb2R1Y3RSZXF1ZXN0LlNldHRpbmdzRW50cnkSDQoFY2xlYXIYBCADKAkaUQoNU2V0dGluZ3NFbnRyeRILCgNrZXkYASABKAkSLwoFdmFsdWUYAiABKAsyIC50b3NoaS53b3Jrc3BhY2UudjEuRmVhdHVyZVZhbHVlOgI4AUIKCghfZW5hYmxlZEoECAUQBkoECAYQB1IPYWNjZXB0ZWRfYWNjZXNzUgd2ZXJzaW9uInYKFVVwZGF0ZVByb2R1Y3RSZXNwb25zZRI0Cgdwcm9kdWN0GAEgASgLMiMudG9zaGkud29ya3NwYWNlLnYxLlByb2R1Y3RTZXR0aW5nc0oECAIQA0oECAMQBFISaW5zdGFsbGF0aW9uX3Rva2VuUgd3YXJuaW5nIr0CCg9Qcm9kdWN0U2V0dGluZ3MSCgoCaWQYASABKAkSNAoIZmVhdHVyZXMYAyADKAsyIi50b3NoaS53b3Jrc3BhY2UudjEuRmVhdHVyZVNldHRpbmcSLwoFc3RhdGUYBCABKA4yIC50b3NoaS53b3Jrc3BhY2UudjEuUHJvZHVjdFN0YXRlEjUKCHN1cmZhY2VzGAYgASgLMiMudG9zaGkud29ya3NwYWNlLnYxLlByb2R1Y3RTdXJmYWNlcxIMCgRuYW1lGAcgASgJEjcKCXN0YWJpbGl0eRgIIAEoDjIkLnRvc2hpLndvcmtzcGFjZS52MS5Qcm9kdWN0U3RhYmlsaXR5EhcKD3JlbW92YWxfdmVyc2lvbhgJIAEoCUoECAIQA0oECAUQBlIGc3dpdGNoUgxpbnN0YWxsYXRpb24iRQoPUHJvZHVjdFN1cmZhY2VzEgsKA2FwaRgBIAEoCUoECAIQA0oECAMQBEoECAQQBVIDY2xpUglkYXNoYm9hcmRSA3NkayLZAgoORmVhdHVyZVNldHRpbmcSCwoDa2V5GAEgASgJEhIKCm5hcnJvd2FibGUYAiABKAgSNQoLZW50aXRsZW1lbnQYAyABKAsyIC50b3NoaS53b3Jrc3BhY2UudjEuRmVhdHVyZVZhbHVlEjEKB3NldHRpbmcYBCABKAsyIC50b3NoaS53b3Jrc3BhY2UudjEuRmVhdHVyZVZhbHVlEjMKCWVmZmVjdGl2ZRgFIAEoCzIgLnRvc2hpLndvcmtzcGFjZS52MS5GZWF0dXJlVmFsdWUSEgoKY2hhbmdlZF9ieRgGIAEoCRIuCgpjaGFuZ2VkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIxCgZzb3VyY2UYCCABKA4yIS50b3NoaS53b3Jrc3BhY2UudjEuRmVhdHVyZVNvdXJjZRIQCghwbGFuX2tleRgJIAEoCTKAAgoOUHJvZHVjdFNlcnZpY2USdAoMTGlzdFByb2R1Y3RzEicudG9zaGkud29ya3NwYWNlLnYxLkxpc3RQcm9kdWN0c1JlcXVlc3QaKC50b3NoaS53b3Jrc3BhY2UudjEuTGlzdFByb2R1Y3RzUmVzcG9uc2UiEcLzGA1zZXR0aW5ncy5yZWFkEngKDVVwZGF0ZVByb2R1Y3QSKC50b3NoaS53b3Jrc3BhY2UudjEuVXBkYXRlUHJvZHVjdFJlcXVlc3QaKS50b3NoaS53b3Jrc3BhY2UudjEuVXBkYXRlUHJvZHVjdFJlc3BvbnNlIhLC8xgOc2V0dGluZ3Mud3JpdGVCIlogZ28udG9zaGljbG91ZC5pby9hcGkvd29ya3NwYWNldjFiBnByb3RvMw", [file_google_protobuf_timestamp, file_toshi_permission, file_toshi_workspace_v1_discovery]);
|
|
12
|
+
/**
|
|
13
|
+
* Describes the message toshi.workspace.v1.ListProductsRequest.
|
|
14
|
+
* Use `create(ListProductsRequestSchema)` to create a new message.
|
|
15
|
+
*/
|
|
16
|
+
export const ListProductsRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 0);
|
|
17
|
+
/**
|
|
18
|
+
* Describes the message toshi.workspace.v1.ListProductsResponse.
|
|
19
|
+
* Use `create(ListProductsResponseSchema)` to create a new message.
|
|
20
|
+
*/
|
|
21
|
+
export const ListProductsResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 1);
|
|
22
|
+
/**
|
|
23
|
+
* Describes the message toshi.workspace.v1.UpdateProductRequest.
|
|
24
|
+
* Use `create(UpdateProductRequestSchema)` to create a new message.
|
|
25
|
+
*/
|
|
26
|
+
export const UpdateProductRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 2);
|
|
27
|
+
/**
|
|
28
|
+
* Describes the message toshi.workspace.v1.UpdateProductResponse.
|
|
29
|
+
* Use `create(UpdateProductResponseSchema)` to create a new message.
|
|
30
|
+
*/
|
|
31
|
+
export const UpdateProductResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 3);
|
|
32
|
+
/**
|
|
33
|
+
* Describes the message toshi.workspace.v1.ProductSettings.
|
|
34
|
+
* Use `create(ProductSettingsSchema)` to create a new message.
|
|
35
|
+
*/
|
|
36
|
+
export const ProductSettingsSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 4);
|
|
37
|
+
/**
|
|
38
|
+
* Describes the message toshi.workspace.v1.ProductSurfaces.
|
|
39
|
+
* Use `create(ProductSurfacesSchema)` to create a new message.
|
|
40
|
+
*/
|
|
41
|
+
export const ProductSurfacesSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 5);
|
|
42
|
+
/**
|
|
43
|
+
* Describes the message toshi.workspace.v1.FeatureSetting.
|
|
44
|
+
* Use `create(FeatureSettingSchema)` to create a new message.
|
|
45
|
+
*/
|
|
46
|
+
export const FeatureSettingSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 6);
|
|
47
|
+
/**
|
|
48
|
+
* ProductService reads and changes the workspace's settings of its
|
|
49
|
+
* products. A product, such as Runners, declares features: typed keys such
|
|
50
|
+
* as "runners.enabled", the product's own switch, or a limit such as
|
|
51
|
+
* "previews.max_count". The workspace's entitlement to each feature comes
|
|
52
|
+
* from its plan and the operator's overrides, and it cannot change it. Its
|
|
53
|
+
* settings are its own choices within the entitlement: they only narrow it,
|
|
54
|
+
* turning a product or a feature off or setting a lower limit.
|
|
55
|
+
*
|
|
56
|
+
* The caller's credential names the workspace, as for WorkloadService.
|
|
57
|
+
*
|
|
58
|
+
* @generated from service toshi.workspace.v1.ProductService
|
|
59
|
+
*/
|
|
60
|
+
export const ProductService = /*@__PURE__*/ serviceDesc(file_toshi_workspace_v1_products, 0);
|