@toshicloud/sdk 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +82 -40
  2. package/dist/client.d.ts +33 -2
  3. package/dist/client.js +28 -3
  4. package/dist/errors.d.ts +74 -22
  5. package/dist/errors.js +99 -27
  6. package/dist/gen/toshi/permission_pb.d.ts +207 -2
  7. package/dist/gen/toshi/permission_pb.js +54 -2
  8. package/dist/gen/toshi/workspace/v1/account_pb.d.ts +590 -0
  9. package/dist/gen/toshi/workspace/v1/account_pb.js +75 -0
  10. package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +14 -8
  11. package/dist/gen/toshi/workspace/v1/artifacts_pb.js +9 -7
  12. package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +191 -6
  13. package/dist/gen/toshi/workspace/v1/audit_events_pb.js +11 -1
  14. package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +1194 -21
  15. package/dist/gen/toshi/workspace/v1/channels_pb.js +185 -39
  16. package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +1481 -0
  17. package/dist/gen/toshi/workspace/v1/connections_pb.js +208 -0
  18. package/dist/gen/toshi/workspace/v1/discovery_pb.d.ts +291 -43
  19. package/dist/gen/toshi/workspace/v1/discovery_pb.js +79 -30
  20. package/dist/gen/toshi/workspace/v1/display_pb.d.ts +198 -15
  21. package/dist/gen/toshi/workspace/v1/display_pb.js +52 -2
  22. package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +864 -0
  23. package/dist/gen/toshi/workspace/v1/domains_pb.js +152 -0
  24. package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +12 -4
  25. package/dist/gen/toshi/workspace/v1/fillers_pb.js +1 -1
  26. package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +1297 -0
  27. package/dist/gen/toshi/workspace/v1/grants_pb.js +271 -0
  28. package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +315 -15
  29. package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +10 -5
  30. package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +196 -7
  31. package/dist/gen/toshi/workspace/v1/hosts_pb.js +12 -7
  32. package/dist/gen/toshi/workspace/v1/images_pb.d.ts +1463 -0
  33. package/dist/gen/toshi/workspace/v1/images_pb.js +263 -0
  34. package/dist/gen/toshi/workspace/v1/products_pb.d.ts +99 -296
  35. package/dist/gen/toshi/workspace/v1/products_pb.js +7 -53
  36. package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1474 -99
  37. package/dist/gen/toshi/workspace/v1/projects_pb.js +150 -33
  38. package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +181 -14
  39. package/dist/gen/toshi/workspace/v1/recordings_pb.js +54 -14
  40. package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1994 -0
  41. package/dist/gen/toshi/workspace/v1/roles_pb.js +355 -0
  42. package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +314 -8
  43. package/dist/gen/toshi/workspace/v1/secrets_pb.js +42 -18
  44. package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +14 -0
  45. package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +1 -1
  46. package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +434 -5
  47. package/dist/gen/toshi/workspace/v1/tokens_pb.js +65 -8
  48. package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +1099 -0
  49. package/dist/gen/toshi/workspace/v1/triggers_pb.js +185 -0
  50. package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +1052 -33
  51. package/dist/gen/toshi/workspace/v1/volumes_pb.js +169 -11
  52. package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +66 -8
  53. package/dist/gen/toshi/workspace/v1/webhook_pb.js +4 -4
  54. package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2043 -54
  55. package/dist/gen/toshi/workspace/v1/workloads_pb.js +204 -54
  56. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6290 -937
  57. package/dist/gen/toshi/workspace/v1/workspace_pb.js +801 -88
  58. package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +2176 -630
  59. package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +191 -74
  60. package/dist/index.d.ts +8 -1
  61. package/dist/index.js +8 -1
  62. package/dist/interceptors.d.ts +6 -2
  63. package/dist/interceptors.js +13 -8
  64. package/dist/retry.d.ts +18 -0
  65. package/dist/retry.js +225 -23
  66. package/dist/test/procedures.js +100 -5
  67. package/dist/version.d.ts +1 -1
  68. package/dist/version.js +1 -1
  69. package/dist/wait.d.ts +4 -0
  70. package/dist/wait.js +24 -1
  71. package/package.json +3 -2
@@ -1,6 +1,6 @@
1
- import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
1
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
2
  import type { Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
- import type { FeatureValue, FeatureValueJson, ProductState, ProductStateJson, ProductSwitch, ProductSwitchJson } from "./discovery_pb.js";
3
+ import type { FeatureSource, FeatureSourceJson, FeatureValue, FeatureValueJson, ProductStability, ProductStabilityJson, ProductState, ProductStateJson } from "./discovery_pb.js";
4
4
  import type { Message } from "@bufbuild/protobuf";
5
5
  /**
6
6
  * Describes the file toshi/workspace/v1/products.proto.
@@ -86,21 +86,6 @@ export type UpdateProductRequest = Message<"toshi.workspace.v1.UpdateProductRequ
86
86
  * @generated from field: repeated string clear = 4;
87
87
  */
88
88
  clear: string[];
89
- /**
90
- * accepted_access is the access an outside product, one a catalog source
91
- * offers, asks for, as its catalog entry lists it. Turning such a product
92
- * on for the first time, or again after it was removed, installs it and
93
- * grants it that access, and needs the same permissions here, in any
94
- * order: any other list is FAILED_PRECONDITION with an ErrorInfo of reason
95
- * ACCESS_NOT_ACCEPTED whose metadata "access" lists what the entry asks
96
- * for. Only a caller who holds every permission it asks for may install
97
- * it, a person or a workspace token; one who lacks one is
98
- * PERMISSION_DENIED naming it. Ignored when the product is built in or
99
- * already installed.
100
- *
101
- * @generated from field: repeated string accepted_access = 5;
102
- */
103
- acceptedAccess: string[];
104
89
  };
105
90
  /**
106
91
  * @generated from message toshi.workspace.v1.UpdateProductRequest
@@ -138,21 +123,6 @@ export type UpdateProductRequestJson = {
138
123
  * @generated from field: repeated string clear = 4;
139
124
  */
140
125
  clear?: string[];
141
- /**
142
- * accepted_access is the access an outside product, one a catalog source
143
- * offers, asks for, as its catalog entry lists it. Turning such a product
144
- * on for the first time, or again after it was removed, installs it and
145
- * grants it that access, and needs the same permissions here, in any
146
- * order: any other list is FAILED_PRECONDITION with an ErrorInfo of reason
147
- * ACCESS_NOT_ACCEPTED whose metadata "access" lists what the entry asks
148
- * for. Only a caller who holds every permission it asks for may install
149
- * it, a person or a workspace token; one who lacks one is
150
- * PERMISSION_DENIED naming it. Ignored when the product is built in or
151
- * already installed.
152
- *
153
- * @generated from field: repeated string accepted_access = 5;
154
- */
155
- acceptedAccess?: string[];
156
126
  };
157
127
  /**
158
128
  * Describes the message toshi.workspace.v1.UpdateProductRequest.
@@ -171,14 +141,6 @@ export type UpdateProductResponse = Message<"toshi.workspace.v1.UpdateProductRes
171
141
  * @generated from field: toshi.workspace.v1.ProductSettings product = 1;
172
142
  */
173
143
  product?: ProductSettings | undefined;
174
- /**
175
- * installation_token is the token an outside product's installation calls
176
- * the Workspace API with, "toshi_in_" and 46 characters. Only the call
177
- * that installs the product returns it.
178
- *
179
- * @generated from field: string installation_token = 2;
180
- */
181
- installationToken: string;
182
144
  };
183
145
  /**
184
146
  * @generated from message toshi.workspace.v1.UpdateProductResponse
@@ -190,14 +152,6 @@ export type UpdateProductResponseJson = {
190
152
  * @generated from field: toshi.workspace.v1.ProductSettings product = 1;
191
153
  */
192
154
  product?: ProductSettingsJson;
193
- /**
194
- * installation_token is the token an outside product's installation calls
195
- * the Workspace API with, "toshi_in_" and 46 characters. Only the call
196
- * that installs the product returns it.
197
- *
198
- * @generated from field: string installation_token = 2;
199
- */
200
- installationToken?: string;
201
155
  };
202
156
  /**
203
157
  * Describes the message toshi.workspace.v1.UpdateProductResponse.
@@ -206,64 +160,6 @@ export type UpdateProductResponseJson = {
206
160
  export declare const UpdateProductResponseSchema: GenMessage<UpdateProductResponse, {
207
161
  jsonType: UpdateProductResponseJson;
208
162
  }>;
209
- /**
210
- * @generated from message toshi.workspace.v1.RemoveProductRequest
211
- */
212
- export type RemoveProductRequest = Message<"toshi.workspace.v1.RemoveProductRequest"> & {
213
- /**
214
- * id names the outside product.
215
- *
216
- * @generated from field: string id = 1;
217
- */
218
- id: string;
219
- };
220
- /**
221
- * @generated from message toshi.workspace.v1.RemoveProductRequest
222
- */
223
- export type RemoveProductRequestJson = {
224
- /**
225
- * id names the outside product.
226
- *
227
- * @generated from field: string id = 1;
228
- */
229
- id?: string;
230
- };
231
- /**
232
- * Describes the message toshi.workspace.v1.RemoveProductRequest.
233
- * Use `create(RemoveProductRequestSchema)` to create a new message.
234
- */
235
- export declare const RemoveProductRequestSchema: GenMessage<RemoveProductRequest, {
236
- jsonType: RemoveProductRequestJson;
237
- }>;
238
- /**
239
- * @generated from message toshi.workspace.v1.RemoveProductResponse
240
- */
241
- export type RemoveProductResponse = Message<"toshi.workspace.v1.RemoveProductResponse"> & {
242
- /**
243
- * product is the product as the workspace has it after the removal.
244
- *
245
- * @generated from field: toshi.workspace.v1.ProductSettings product = 1;
246
- */
247
- product?: ProductSettings | undefined;
248
- };
249
- /**
250
- * @generated from message toshi.workspace.v1.RemoveProductResponse
251
- */
252
- export type RemoveProductResponseJson = {
253
- /**
254
- * product is the product as the workspace has it after the removal.
255
- *
256
- * @generated from field: toshi.workspace.v1.ProductSettings product = 1;
257
- */
258
- product?: ProductSettingsJson;
259
- };
260
- /**
261
- * Describes the message toshi.workspace.v1.RemoveProductResponse.
262
- * Use `create(RemoveProductResponseSchema)` to create a new message.
263
- */
264
- export declare const RemoveProductResponseSchema: GenMessage<RemoveProductResponse, {
265
- jsonType: RemoveProductResponseJson;
266
- }>;
267
163
  /**
268
164
  * ProductSettings is one product as the workspace has it.
269
165
  *
@@ -277,13 +173,6 @@ export type ProductSettings = Message<"toshi.workspace.v1.ProductSettings"> & {
277
173
  * @generated from field: string id = 1;
278
174
  */
279
175
  id: string;
280
- /**
281
- * switch says whether the product is on for the workspace and, when it
282
- * is off, which switch turned it off.
283
- *
284
- * @generated from field: toshi.workspace.v1.ProductSwitch switch = 2;
285
- */
286
- switch: ProductSwitch;
287
176
  /**
288
177
  * features are the product's features, in the order the product
289
178
  * declares them.
@@ -301,14 +190,32 @@ export type ProductSettings = Message<"toshi.workspace.v1.ProductSettings"> & {
301
190
  */
302
191
  state: ProductState;
303
192
  /**
304
- * installation is the workspace's installation of an outside product, a
305
- * removed one included; unset for a built-in product. Such a product
306
- * declares no features, and its switch is ON while the installation is
307
- * active and TURNED_OFF otherwise.
193
+ * surfaces are what the product adds to Toshi: the path its API is
194
+ * served at.
308
195
  *
309
- * @generated from field: toshi.workspace.v1.ProductInstallation installation = 5;
196
+ * @generated from field: toshi.workspace.v1.ProductSurfaces surfaces = 6;
310
197
  */
311
- installation?: ProductInstallation | undefined;
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;
312
219
  };
313
220
  /**
314
221
  * ProductSettings is one product as the workspace has it.
@@ -323,13 +230,6 @@ export type ProductSettingsJson = {
323
230
  * @generated from field: string id = 1;
324
231
  */
325
232
  id?: string;
326
- /**
327
- * switch says whether the product is on for the workspace and, when it
328
- * is off, which switch turned it off.
329
- *
330
- * @generated from field: toshi.workspace.v1.ProductSwitch switch = 2;
331
- */
332
- switch?: ProductSwitchJson;
333
233
  /**
334
234
  * features are the product's features, in the order the product
335
235
  * declares them.
@@ -347,14 +247,32 @@ export type ProductSettingsJson = {
347
247
  */
348
248
  state?: ProductStateJson;
349
249
  /**
350
- * installation is the workspace's installation of an outside product, a
351
- * removed one included; unset for a built-in product. Such a product
352
- * declares no features, and its switch is ON while the installation is
353
- * active and TURNED_OFF otherwise.
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.
354
265
  *
355
- * @generated from field: toshi.workspace.v1.ProductInstallation installation = 5;
266
+ * @generated from field: toshi.workspace.v1.ProductStability stability = 8;
356
267
  */
357
- installation?: ProductInstallationJson;
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;
358
276
  };
359
277
  /**
360
278
  * Describes the message toshi.workspace.v1.ProductSettings.
@@ -364,117 +282,39 @@ export declare const ProductSettingsSchema: GenMessage<ProductSettings, {
364
282
  jsonType: ProductSettingsJson;
365
283
  }>;
366
284
  /**
367
- * ProductInstallation is a workspace's installation of an outside product.
285
+ * ProductSurfaces are what a product adds to Toshi, empty when it adds none.
368
286
  *
369
- * @generated from message toshi.workspace.v1.ProductInstallation
287
+ * @generated from message toshi.workspace.v1.ProductSurfaces
370
288
  */
371
- export type ProductInstallation = Message<"toshi.workspace.v1.ProductInstallation"> & {
289
+ export type ProductSurfaces = Message<"toshi.workspace.v1.ProductSurfaces"> & {
372
290
  /**
373
- * @generated from field: toshi.workspace.v1.InstallationState state = 1;
374
- */
375
- state: InstallationState;
376
- /**
377
- * version and publisher are the catalog entry's when it was installed.
378
- *
379
- * @generated from field: string version = 2;
380
- */
381
- version: string;
382
- /**
383
- * @generated from field: string publisher = 3;
384
- */
385
- publisher: string;
386
- /**
387
- * access are the permissions the workspace granted it, sorted.
291
+ * api is the path the control plane serves the product's API at, such
292
+ * as "/runners/".
388
293
  *
389
- * @generated from field: repeated string access = 4;
294
+ * @generated from field: string api = 1;
390
295
  */
391
- access: string[];
392
- /**
393
- * role_id names the role that holds the access, "Product <id>", granted to
394
- * token_id, the installation's token.
395
- *
396
- * @generated from field: string role_id = 5;
397
- */
398
- roleId: string;
399
- /**
400
- * @generated from field: string token_id = 6;
401
- */
402
- tokenId: string;
403
- /**
404
- * installed_by names who installed it: "person:" and their GitHub user
405
- * id, or "token:" and the workspace token's id.
406
- *
407
- * @generated from field: string installed_by = 7;
408
- */
409
- installedBy: string;
410
- /**
411
- * @generated from field: google.protobuf.Timestamp installed_at = 8;
412
- */
413
- installedAt?: Timestamp | undefined;
414
- /**
415
- * @generated from field: google.protobuf.Timestamp updated_at = 9;
416
- */
417
- updatedAt?: Timestamp | undefined;
296
+ api: string;
418
297
  };
419
298
  /**
420
- * ProductInstallation is a workspace's installation of an outside product.
299
+ * ProductSurfaces are what a product adds to Toshi, empty when it adds none.
421
300
  *
422
- * @generated from message toshi.workspace.v1.ProductInstallation
301
+ * @generated from message toshi.workspace.v1.ProductSurfaces
423
302
  */
424
- export type ProductInstallationJson = {
303
+ export type ProductSurfacesJson = {
425
304
  /**
426
- * @generated from field: toshi.workspace.v1.InstallationState state = 1;
427
- */
428
- state?: InstallationStateJson;
429
- /**
430
- * version and publisher are the catalog entry's when it was installed.
431
- *
432
- * @generated from field: string version = 2;
433
- */
434
- version?: string;
435
- /**
436
- * @generated from field: string publisher = 3;
437
- */
438
- publisher?: string;
439
- /**
440
- * access are the permissions the workspace granted it, sorted.
441
- *
442
- * @generated from field: repeated string access = 4;
443
- */
444
- access?: string[];
445
- /**
446
- * role_id names the role that holds the access, "Product <id>", granted to
447
- * token_id, the installation's token.
305
+ * api is the path the control plane serves the product's API at, such
306
+ * as "/runners/".
448
307
  *
449
- * @generated from field: string role_id = 5;
450
- */
451
- roleId?: string;
452
- /**
453
- * @generated from field: string token_id = 6;
454
- */
455
- tokenId?: string;
456
- /**
457
- * installed_by names who installed it: "person:" and their GitHub user
458
- * id, or "token:" and the workspace token's id.
459
- *
460
- * @generated from field: string installed_by = 7;
461
- */
462
- installedBy?: string;
463
- /**
464
- * @generated from field: google.protobuf.Timestamp installed_at = 8;
465
- */
466
- installedAt?: TimestampJson;
467
- /**
468
- * @generated from field: google.protobuf.Timestamp updated_at = 9;
308
+ * @generated from field: string api = 1;
469
309
  */
470
- updatedAt?: TimestampJson;
310
+ api?: string;
471
311
  };
472
312
  /**
473
- * Describes the message toshi.workspace.v1.ProductInstallation.
474
- * Use `create(ProductInstallationSchema)` to create a new message.
313
+ * Describes the message toshi.workspace.v1.ProductSurfaces.
314
+ * Use `create(ProductSurfacesSchema)` to create a new message.
475
315
  */
476
- export declare const ProductInstallationSchema: GenMessage<ProductInstallation, {
477
- jsonType: ProductInstallationJson;
316
+ export declare const ProductSurfacesSchema: GenMessage<ProductSurfaces, {
317
+ jsonType: ProductSurfacesJson;
478
318
  }>;
479
319
  /**
480
320
  * FeatureSetting is one feature of a product as the workspace has it.
@@ -497,8 +337,8 @@ export type FeatureSetting = Message<"toshi.workspace.v1.FeatureSetting"> & {
497
337
  narrowable: boolean;
498
338
  /**
499
339
  * entitlement is the most the workspace may choose: the operator's
500
- * override for the workspace, else its plan's value, else the feature's
501
- * default.
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).
502
342
  *
503
343
  * @generated from field: toshi.workspace.v1.FeatureValue entitlement = 3;
504
344
  */
@@ -530,6 +370,18 @@ export type FeatureSetting = Message<"toshi.workspace.v1.FeatureSetting"> & {
530
370
  * @generated from field: google.protobuf.Timestamp changed_at = 7;
531
371
  */
532
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;
533
385
  };
534
386
  /**
535
387
  * FeatureSetting is one feature of a product as the workspace has it.
@@ -552,8 +404,8 @@ export type FeatureSettingJson = {
552
404
  narrowable?: boolean;
553
405
  /**
554
406
  * entitlement is the most the workspace may choose: the operator's
555
- * override for the workspace, else its plan's value, else the feature's
556
- * default.
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).
557
409
  *
558
410
  * @generated from field: toshi.workspace.v1.FeatureValue entitlement = 3;
559
411
  */
@@ -585,55 +437,26 @@ export type FeatureSettingJson = {
585
437
  * @generated from field: google.protobuf.Timestamp changed_at = 7;
586
438
  */
587
439
  changedAt?: TimestampJson;
588
- };
589
- /**
590
- * Describes the message toshi.workspace.v1.FeatureSetting.
591
- * Use `create(FeatureSettingSchema)` to create a new message.
592
- */
593
- export declare const FeatureSettingSchema: GenMessage<FeatureSetting, {
594
- jsonType: FeatureSettingJson;
595
- }>;
596
- /**
597
- * InstallationState is where an installation stands.
598
- *
599
- * @generated from enum toshi.workspace.v1.InstallationState
600
- */
601
- export declare enum InstallationState {
602
- /**
603
- * @generated from enum value: INSTALLATION_STATE_UNSPECIFIED = 0;
604
- */
605
- UNSPECIFIED = 0,
606
440
  /**
607
- * The product is on and its token works.
441
+ * source says where the entitlement comes from.
608
442
  *
609
- * @generated from enum value: INSTALLATION_STATE_ACTIVE = 1;
443
+ * @generated from field: toshi.workspace.v1.FeatureSource source = 8;
610
444
  */
611
- ACTIVE = 1,
445
+ source?: FeatureSourceJson;
612
446
  /**
613
- * The product is turned off: its token is refused and its webhook
614
- * endpoints are paused until it is turned on again.
447
+ * plan_key names the plan key the feature falls back to, empty for none.
615
448
  *
616
- * @generated from enum value: INSTALLATION_STATE_SUSPENDED = 2;
449
+ * @generated from field: string plan_key = 9;
617
450
  */
618
- SUSPENDED = 2,
619
- /**
620
- * Its token is revoked and its role deleted; turning it on installs it
621
- * again.
622
- *
623
- * @generated from enum value: INSTALLATION_STATE_REMOVED = 3;
624
- */
625
- REMOVED = 3
626
- }
627
- /**
628
- * InstallationState is where an installation stands.
629
- *
630
- * @generated from enum toshi.workspace.v1.InstallationState
631
- */
632
- export type InstallationStateJson = "INSTALLATION_STATE_UNSPECIFIED" | "INSTALLATION_STATE_ACTIVE" | "INSTALLATION_STATE_SUSPENDED" | "INSTALLATION_STATE_REMOVED";
451
+ planKey?: string;
452
+ };
633
453
  /**
634
- * Describes the enum toshi.workspace.v1.InstallationState.
454
+ * Describes the message toshi.workspace.v1.FeatureSetting.
455
+ * Use `create(FeatureSettingSchema)` to create a new message.
635
456
  */
636
- export declare const InstallationStateSchema: GenEnum<InstallationState, InstallationStateJson>;
457
+ export declare const FeatureSettingSchema: GenMessage<FeatureSetting, {
458
+ jsonType: FeatureSettingJson;
459
+ }>;
637
460
  /**
638
461
  * ProductService reads and changes the workspace's settings of its
639
462
  * products. A product, such as Runners, declares features: typed keys such
@@ -650,10 +473,9 @@ export declare const InstallationStateSchema: GenEnum<InstallationState, Install
650
473
  export declare const ProductService: GenService<{
651
474
  /**
652
475
  * ListProducts returns the products the deployment includes, by id, each
653
- * with its switch and its features: the entitlement, the workspace's
476
+ * with its features: the entitlement, the workspace's
654
477
  * setting if it has one, the effective value, and who changed the
655
- * setting last and when; then the outside products the workspace has
656
- * installed, by id, each with its installation.
478
+ * setting last and when.
657
479
  *
658
480
  * @generated from rpc toshi.workspace.v1.ProductService.ListProducts
659
481
  */
@@ -670,12 +492,7 @@ export declare const ProductService: GenService<{
670
492
  * than the entitlement, a key the product does not declare or that the
671
493
  * workspace cannot narrow, or a value of another type than the key's is
672
494
  * INVALID_ARGUMENT naming the key, and nothing is changed. A product the
673
- * deployment does not include, built in or offered by a catalog source,
674
- * is NOT_FOUND.
675
- *
676
- * An outside product, one a catalog source offers, has no settings but
677
- * enabled: turning it on installs it (accepted_access) or resumes its
678
- * installation, and turning it off suspends it.
495
+ * deployment does not include is NOT_FOUND.
679
496
  *
680
497
  * The product's calls follow the change from the next call on.
681
498
  *
@@ -686,18 +503,4 @@ export declare const ProductService: GenService<{
686
503
  input: typeof UpdateProductRequestSchema;
687
504
  output: typeof UpdateProductResponseSchema;
688
505
  };
689
- /**
690
- * RemoveProduct removes the workspace's installation of an outside
691
- * product: it revokes the installation's token, deletes the role that
692
- * held its access and stops its webhook endpoints. The data the product
693
- * stored in the workspace stays. A product that is not installed, or not
694
- * an outside product, is NOT_FOUND.
695
- *
696
- * @generated from rpc toshi.workspace.v1.ProductService.RemoveProduct
697
- */
698
- removeProduct: {
699
- methodKind: "unary";
700
- input: typeof RemoveProductRequestSchema;
701
- output: typeof RemoveProductResponseSchema;
702
- };
703
506
  }>;
@@ -1,14 +1,14 @@
1
1
  // @generated by protoc-gen-es v2.16.0 with parameter "target=ts,json_types=true,import_extension=js"
2
2
  // @generated from file toshi/workspace/v1/products.proto (package toshi.workspace.v1, syntax proto3)
3
3
  /* eslint-disable */
4
- import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
4
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
5
5
  import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
6
6
  import { file_toshi_permission } from "../../permission_pb.js";
7
7
  import { file_toshi_workspace_v1_discovery } from "./discovery_pb.js";
8
8
  /**
9
9
  * Describes the file toshi/workspace/v1/products.proto.
10
10
  */
11
- export const file_toshi_workspace_v1_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aSU5TVEFMTEFUSU9OX1NUQVRFX1JFTU9WRUQQAzL6AgoOUHJvZHVjdFNlcnZpY2USdAoMTGlzdFByb2R1Y3RzEicudG9zaGkud29ya3NwYWNlLnYxLkxpc3RQcm9kdWN0c1JlcXVlc3QaKC50b3NoaS53b3Jrc3BhY2UudjEuTGlzdFByb2R1Y3RzUmVzcG9uc2UiEcLzGA1zZXR0aW5ncy5yZWFkEngKDVVwZGF0ZVByb2R1Y3QSKC50b3NoaS53b3Jrc3BhY2UudjEuVXBkYXRlUHJvZHVjdFJlcXVlc3QaKS50b3NoaS53b3Jrc3BhY2UudjEuVXBkYXRlUHJvZHVjdFJlc3BvbnNlIhLC8xgOc2V0dGluZ3Mud3JpdGUSeAoNUmVtb3ZlUHJvZHVjdBIoLnRvc2hpLndvcmtzcGFjZS52MS5SZW1vdmVQcm9kdWN0UmVxdWVzdBopLnRvc2hpLndvcmtzcGFjZS52MS5SZW1vdmVQcm9kdWN0UmVzcG9uc2UiEsLzGA5zZXR0aW5ncy53cml0ZUIiWiBnby50b3NoaWNsb3VkLmlvL2FwaS93b3Jrc3BhY2V2MWIGcHJvdG8z", [file_google_protobuf_timestamp, file_toshi_permission, file_toshi_workspace_v1_discovery]);
11
+ export const file_toshi_workspace_v1_products = /*@__PURE__*/ fileDesc("CiF0b3NoaS93b3Jrc3BhY2UvdjEvcHJvZHVjdHMucHJvdG8SEnRvc2hpLndvcmtzcGFjZS52MSIVChNMaXN0UHJvZHVjdHNSZXF1ZXN0Ik0KFExpc3RQcm9kdWN0c1Jlc3BvbnNlEjUKCHByb2R1Y3RzGAEgAygLMiMudG9zaGkud29ya3NwYWNlLnYxLlByb2R1Y3RTZXR0aW5ncyKWAgoUVXBkYXRlUHJvZHVjdFJlcXVlc3QSCgoCaWQYASABKAkSFAoHZW5hYmxlZBgCIAEoCEgAiAEBEkgKCHNldHRpbmdzGAMgAygLMjYudG9zaGkud29ya3NwYWNlLnYxLlVwZGF0ZVByb2R1Y3RSZXF1ZX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53b3Jrc3BhY2UudjEuRmVhdHVyZVZhbHVlEjMKCWVmZmVjdGl2ZRgFIAEoCzIgLnRvc2hpLndvcmtzcGFjZS52MS5GZWF0dXJlVmFsdWUSEgoKY2hhbmdlZF9ieRgGIAEoCRIuCgpjaGFuZ2VkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIxCgZzb3VyY2UYCCABKA4yIS50b3NoaS53b3Jrc3BhY2UudjEuRmVhdHVyZVNvdXJjZRIQCghwbGFuX2tleRgJIAEoCTKAAgoOUHJvZHVjdFNlcnZpY2USdAoMTGlzdFByb2R1Y3RzEicudG9zaGkud29ya3NwYWNlLnYxLkxpc3RQcm9kdWN0c1JlcXVlc3QaKC50b3NoaS53b3Jrc3BhY2UudjEuTGlzdFByb2R1Y3RzUmVzcG9uc2UiEcLzGA1zZXR0aW5ncy5yZWFkEngKDVVwZGF0ZVByb2R1Y3QSKC50b3NoaS53b3Jrc3BhY2UudjEuVXBkYXRlUHJvZHVjdFJlcXVlc3QaKS50b3NoaS53b3Jrc3BhY2UudjEuVXBkYXRlUHJvZHVjdFJlc3BvbnNlIhLC8xgOc2V0dGluZ3Mud3JpdGVCIlogZ28udG9zaGljbG91ZC5pby9hcGkvd29ya3NwYWNldjFiBnByb3RvMw", [file_google_protobuf_timestamp, file_toshi_permission, file_toshi_workspace_v1_discovery]);
12
12
  /**
13
13
  * Describes the message toshi.workspace.v1.ListProductsRequest.
14
14
  * Use `create(ListProductsRequestSchema)` to create a new message.
@@ -29,67 +29,21 @@ export const UpdateProductRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_w
29
29
  * Use `create(UpdateProductResponseSchema)` to create a new message.
30
30
  */
31
31
  export const UpdateProductResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 3);
32
- /**
33
- * Describes the message toshi.workspace.v1.RemoveProductRequest.
34
- * Use `create(RemoveProductRequestSchema)` to create a new message.
35
- */
36
- export const RemoveProductRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 4);
37
- /**
38
- * Describes the message toshi.workspace.v1.RemoveProductResponse.
39
- * Use `create(RemoveProductResponseSchema)` to create a new message.
40
- */
41
- export const RemoveProductResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 5);
42
32
  /**
43
33
  * Describes the message toshi.workspace.v1.ProductSettings.
44
34
  * Use `create(ProductSettingsSchema)` to create a new message.
45
35
  */
46
- export const ProductSettingsSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 6);
36
+ export const ProductSettingsSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 4);
47
37
  /**
48
- * Describes the message toshi.workspace.v1.ProductInstallation.
49
- * Use `create(ProductInstallationSchema)` to create a new message.
38
+ * Describes the message toshi.workspace.v1.ProductSurfaces.
39
+ * Use `create(ProductSurfacesSchema)` to create a new message.
50
40
  */
51
- export const ProductInstallationSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 7);
41
+ export const ProductSurfacesSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 5);
52
42
  /**
53
43
  * Describes the message toshi.workspace.v1.FeatureSetting.
54
44
  * Use `create(FeatureSettingSchema)` to create a new message.
55
45
  */
56
- export const FeatureSettingSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 8);
57
- /**
58
- * InstallationState is where an installation stands.
59
- *
60
- * @generated from enum toshi.workspace.v1.InstallationState
61
- */
62
- export var InstallationState;
63
- (function (InstallationState) {
64
- /**
65
- * @generated from enum value: INSTALLATION_STATE_UNSPECIFIED = 0;
66
- */
67
- InstallationState[InstallationState["UNSPECIFIED"] = 0] = "UNSPECIFIED";
68
- /**
69
- * The product is on and its token works.
70
- *
71
- * @generated from enum value: INSTALLATION_STATE_ACTIVE = 1;
72
- */
73
- InstallationState[InstallationState["ACTIVE"] = 1] = "ACTIVE";
74
- /**
75
- * The product is turned off: its token is refused and its webhook
76
- * endpoints are paused until it is turned on again.
77
- *
78
- * @generated from enum value: INSTALLATION_STATE_SUSPENDED = 2;
79
- */
80
- InstallationState[InstallationState["SUSPENDED"] = 2] = "SUSPENDED";
81
- /**
82
- * Its token is revoked and its role deleted; turning it on installs it
83
- * again.
84
- *
85
- * @generated from enum value: INSTALLATION_STATE_REMOVED = 3;
86
- */
87
- InstallationState[InstallationState["REMOVED"] = 3] = "REMOVED";
88
- })(InstallationState || (InstallationState = {}));
89
- /**
90
- * Describes the enum toshi.workspace.v1.InstallationState.
91
- */
92
- export const InstallationStateSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_products, 0);
46
+ export const FeatureSettingSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_products, 6);
93
47
  /**
94
48
  * ProductService reads and changes the workspace's settings of its
95
49
  * products. A product, such as Runners, declares features: typed keys such