@toshicloud/sdk 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +138 -41
  2. package/dist/client.d.ts +103 -4
  3. package/dist/client.js +43 -4
  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 +1616 -0
  17. package/dist/gen/toshi/workspace/v1/connections_pb.js +224 -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 +329 -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 +2069 -54
  55. package/dist/gen/toshi/workspace/v1/workloads_pb.js +204 -54
  56. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6634 -933
  57. package/dist/gen/toshi/workspace/v1/workspace_pb.js +912 -93
  58. package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +3209 -1378
  59. package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +211 -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 +230 -23
  66. package/dist/test/alarms.d.ts +29 -0
  67. package/dist/test/alarms.js +144 -0
  68. package/dist/test/fake.js +31 -0
  69. package/dist/test/index.d.ts +12 -2
  70. package/dist/test/index.js +12 -2
  71. package/dist/test/procedures.js +96 -5
  72. package/dist/version.d.ts +1 -1
  73. package/dist/version.js +1 -1
  74. package/dist/wait.d.ts +4 -0
  75. package/dist/wait.js +24 -1
  76. package/package.json +3 -2
@@ -64,7 +64,8 @@ export type DiscoverResponse = Message<"toshi.workspace.v1.DiscoverResponse"> &
64
64
  /**
65
65
  * permissions are the caller's, sorted: what its roles in the workspace
66
66
  * give it at the request's project and environment. Each is
67
- * "<area>.<level>", as docs/api/permissions.md lists them, or a
67
+ * "<area>.<level>", as this API's methods name them in their
68
+ * toshi.permission option, or a
68
69
  * product's own, "<product id>.<level>".
69
70
  *
70
71
  * @generated from field: repeated string permissions = 2;
@@ -74,6 +75,28 @@ export type DiscoverResponse = Message<"toshi.workspace.v1.DiscoverResponse"> &
74
75
  * @generated from field: toshi.workspace.v1.APIVersions versions = 3;
75
76
  */
76
77
  versions?: APIVersions | undefined;
78
+ /**
79
+ * registry_address is the deployment's container registry as a client
80
+ * writes it in an image reference and logs in to it, such as
81
+ * "registry.example.com": a host name, with a port when it is not 443.
82
+ * Empty when the deployment runs no container registry.
83
+ *
84
+ * @generated from field: string registry_address = 4;
85
+ */
86
+ registryAddress: string;
87
+ /**
88
+ * calls are the Workspace API procedures the caller may make at the
89
+ * request's project and environment, sorted, such as
90
+ * "/toshi.workspace.v1.WorkloadService/CreateJob": those its credential
91
+ * takes whose permission its roles give it where the call acts, by the
92
+ * rule that admits a call. A call in a project or an environment is
93
+ * listed when the caller may make it at the request's project and
94
+ * environment, or with none named, anywhere. The workspace's state is
95
+ * not looked at: a suspended workspace lists writes it refuses.
96
+ *
97
+ * @generated from field: repeated string calls = 5;
98
+ */
99
+ calls: string[];
77
100
  };
78
101
  /**
79
102
  * @generated from message toshi.workspace.v1.DiscoverResponse
@@ -88,7 +111,8 @@ export type DiscoverResponseJson = {
88
111
  /**
89
112
  * permissions are the caller's, sorted: what its roles in the workspace
90
113
  * give it at the request's project and environment. Each is
91
- * "<area>.<level>", as docs/api/permissions.md lists them, or a
114
+ * "<area>.<level>", as this API's methods name them in their
115
+ * toshi.permission option, or a
92
116
  * product's own, "<product id>.<level>".
93
117
  *
94
118
  * @generated from field: repeated string permissions = 2;
@@ -98,6 +122,28 @@ export type DiscoverResponseJson = {
98
122
  * @generated from field: toshi.workspace.v1.APIVersions versions = 3;
99
123
  */
100
124
  versions?: APIVersionsJson;
125
+ /**
126
+ * registry_address is the deployment's container registry as a client
127
+ * writes it in an image reference and logs in to it, such as
128
+ * "registry.example.com": a host name, with a port when it is not 443.
129
+ * Empty when the deployment runs no container registry.
130
+ *
131
+ * @generated from field: string registry_address = 4;
132
+ */
133
+ registryAddress?: string;
134
+ /**
135
+ * calls are the Workspace API procedures the caller may make at the
136
+ * request's project and environment, sorted, such as
137
+ * "/toshi.workspace.v1.WorkloadService/CreateJob": those its credential
138
+ * takes whose permission its roles give it where the call acts, by the
139
+ * rule that admits a call. A call in a project or an environment is
140
+ * listed when the caller may make it at the request's project and
141
+ * environment, or with none named, anywhere. The workspace's state is
142
+ * not looked at: a suspended workspace lists writes it refuses.
143
+ *
144
+ * @generated from field: repeated string calls = 5;
145
+ */
146
+ calls?: string[];
101
147
  };
102
148
  /**
103
149
  * Describes the message toshi.workspace.v1.DiscoverResponse.
@@ -150,13 +196,36 @@ export type DiscoveredProduct = Message<"toshi.workspace.v1.DiscoveredProduct">
150
196
  */
151
197
  state: ProductState;
152
198
  /**
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.
199
+ * surfaces are what the product adds to Toshi: the path its API is
200
+ * served at.
201
+ *
202
+ * @generated from field: toshi.workspace.v1.DiscoveredSurfaces surfaces = 8;
203
+ */
204
+ surfaces?: DiscoveredSurfaces | undefined;
205
+ /**
206
+ * available reports whether the product is on for the workspace: the
207
+ * build includes it, the deployment's config, the workspace's plan and
208
+ * its settings all turn it on. A call to a product that is not available
209
+ * is refused with FAILED_PRECONDITION and the reason PRODUCT_UNAVAILABLE,
210
+ * whose metadata names the input that turned it off; the workspace's
211
+ * product settings show its plan's entitlement and its own setting.
156
212
  *
157
- * @generated from field: toshi.workspace.v1.ProductSwitch switch = 7;
213
+ * @generated from field: bool available = 10;
158
214
  */
159
- switch: ProductSwitch;
215
+ available: boolean;
216
+ /**
217
+ * stability is how mature the product is in this build.
218
+ *
219
+ * @generated from field: toshi.workspace.v1.ProductStability stability = 11;
220
+ */
221
+ stability: ProductStability;
222
+ /**
223
+ * removal_version is the version a deprecated product is removed in;
224
+ * empty for the other stabilities.
225
+ *
226
+ * @generated from field: string removal_version = 12;
227
+ */
228
+ removalVersion: string;
160
229
  };
161
230
  /**
162
231
  * DiscoveredProduct is one product the build includes.
@@ -202,13 +271,36 @@ export type DiscoveredProductJson = {
202
271
  */
203
272
  state?: ProductStateJson;
204
273
  /**
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.
274
+ * surfaces are what the product adds to Toshi: the path its API is
275
+ * served at.
276
+ *
277
+ * @generated from field: toshi.workspace.v1.DiscoveredSurfaces surfaces = 8;
278
+ */
279
+ surfaces?: DiscoveredSurfacesJson;
280
+ /**
281
+ * available reports whether the product is on for the workspace: the
282
+ * build includes it, the deployment's config, the workspace's plan and
283
+ * its settings all turn it on. A call to a product that is not available
284
+ * is refused with FAILED_PRECONDITION and the reason PRODUCT_UNAVAILABLE,
285
+ * whose metadata names the input that turned it off; the workspace's
286
+ * product settings show its plan's entitlement and its own setting.
208
287
  *
209
- * @generated from field: toshi.workspace.v1.ProductSwitch switch = 7;
288
+ * @generated from field: bool available = 10;
210
289
  */
211
- switch?: ProductSwitchJson;
290
+ available?: boolean;
291
+ /**
292
+ * stability is how mature the product is in this build.
293
+ *
294
+ * @generated from field: toshi.workspace.v1.ProductStability stability = 11;
295
+ */
296
+ stability?: ProductStabilityJson;
297
+ /**
298
+ * removal_version is the version a deprecated product is removed in;
299
+ * empty for the other stabilities.
300
+ *
301
+ * @generated from field: string removal_version = 12;
302
+ */
303
+ removalVersion?: string;
212
304
  };
213
305
  /**
214
306
  * Describes the message toshi.workspace.v1.DiscoveredProduct.
@@ -217,6 +309,45 @@ export type DiscoveredProductJson = {
217
309
  export declare const DiscoveredProductSchema: GenMessage<DiscoveredProduct, {
218
310
  jsonType: DiscoveredProductJson;
219
311
  }>;
312
+ /**
313
+ * DiscoveredSurfaces are what a product adds to Toshi, empty when it adds
314
+ * none. It mirrors products.proto's ProductSurfaces, field for field,
315
+ * because discovery.proto cannot import products.proto, which imports it.
316
+ *
317
+ * @generated from message toshi.workspace.v1.DiscoveredSurfaces
318
+ */
319
+ export type DiscoveredSurfaces = Message<"toshi.workspace.v1.DiscoveredSurfaces"> & {
320
+ /**
321
+ * api is the path the control plane serves the product's API at, such
322
+ * as "/runners/".
323
+ *
324
+ * @generated from field: string api = 1;
325
+ */
326
+ api: string;
327
+ };
328
+ /**
329
+ * DiscoveredSurfaces are what a product adds to Toshi, empty when it adds
330
+ * none. It mirrors products.proto's ProductSurfaces, field for field,
331
+ * because discovery.proto cannot import products.proto, which imports it.
332
+ *
333
+ * @generated from message toshi.workspace.v1.DiscoveredSurfaces
334
+ */
335
+ export type DiscoveredSurfacesJson = {
336
+ /**
337
+ * api is the path the control plane serves the product's API at, such
338
+ * as "/runners/".
339
+ *
340
+ * @generated from field: string api = 1;
341
+ */
342
+ api?: string;
343
+ };
344
+ /**
345
+ * Describes the message toshi.workspace.v1.DiscoveredSurfaces.
346
+ * Use `create(DiscoveredSurfacesSchema)` to create a new message.
347
+ */
348
+ export declare const DiscoveredSurfacesSchema: GenMessage<DiscoveredSurfaces, {
349
+ jsonType: DiscoveredSurfacesJson;
350
+ }>;
220
351
  /**
221
352
  * ProductFeature is a typed key a product declares.
222
353
  *
@@ -249,7 +380,9 @@ export type ProductFeature = Message<"toshi.workspace.v1.ProductFeature"> & {
249
380
  /**
250
381
  * entitlement is the most the workspace may have of the feature: the
251
382
  * 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.
383
+ * value of the plan key it falls back to, else the feature's default
384
+ * (source). Unset when the config turns the product off or the build
385
+ * does not include it.
253
386
  *
254
387
  * @generated from field: toshi.workspace.v1.FeatureValue entitlement = 5;
255
388
  */
@@ -266,11 +399,42 @@ export type ProductFeature = Message<"toshi.workspace.v1.ProductFeature"> & {
266
399
  /**
267
400
  * effective is the value that applies: the setting when the feature is
268
401
  * narrowable and the entitlement contains it, else the entitlement.
269
- * Unset when the config turns the product off.
402
+ * Unset when the config turns the product off or the build does not
403
+ * include it.
270
404
  *
271
405
  * @generated from field: toshi.workspace.v1.FeatureValue effective = 7;
272
406
  */
273
407
  effective?: FeatureValue | undefined;
408
+ /**
409
+ * default_value is the feature's default in its product's manifest: the
410
+ * entitlement when no override, plan value or plan key gives one.
411
+ *
412
+ * @generated from field: toshi.workspace.v1.FeatureValue default_value = 8;
413
+ */
414
+ defaultValue?: FeatureValue | undefined;
415
+ /**
416
+ * max bounds a count, or both ends of a range: no value of the feature
417
+ * is higher. 0 bounds nothing.
418
+ *
419
+ * @generated from field: int64 max = 9;
420
+ */
421
+ max: bigint;
422
+ /**
423
+ * plan_key names the plan key a count falls back to, such as
424
+ * "preview_max_connections": a plan that sets the key and gives the
425
+ * feature no value of its own entitles the workspace to the key's value.
426
+ * Empty for a feature that falls back to none.
427
+ *
428
+ * @generated from field: string plan_key = 10;
429
+ */
430
+ planKey: string;
431
+ /**
432
+ * source says where the entitlement comes from. Unspecified when the
433
+ * config turns the product off.
434
+ *
435
+ * @generated from field: toshi.workspace.v1.FeatureSource source = 11;
436
+ */
437
+ source: FeatureSource;
274
438
  };
275
439
  /**
276
440
  * ProductFeature is a typed key a product declares.
@@ -304,7 +468,9 @@ export type ProductFeatureJson = {
304
468
  /**
305
469
  * entitlement is the most the workspace may have of the feature: the
306
470
  * 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.
471
+ * value of the plan key it falls back to, else the feature's default
472
+ * (source). Unset when the config turns the product off or the build
473
+ * does not include it.
308
474
  *
309
475
  * @generated from field: toshi.workspace.v1.FeatureValue entitlement = 5;
310
476
  */
@@ -321,11 +487,42 @@ export type ProductFeatureJson = {
321
487
  /**
322
488
  * effective is the value that applies: the setting when the feature is
323
489
  * narrowable and the entitlement contains it, else the entitlement.
324
- * Unset when the config turns the product off.
490
+ * Unset when the config turns the product off or the build does not
491
+ * include it.
325
492
  *
326
493
  * @generated from field: toshi.workspace.v1.FeatureValue effective = 7;
327
494
  */
328
495
  effective?: FeatureValueJson;
496
+ /**
497
+ * default_value is the feature's default in its product's manifest: the
498
+ * entitlement when no override, plan value or plan key gives one.
499
+ *
500
+ * @generated from field: toshi.workspace.v1.FeatureValue default_value = 8;
501
+ */
502
+ defaultValue?: FeatureValueJson;
503
+ /**
504
+ * max bounds a count, or both ends of a range: no value of the feature
505
+ * is higher. 0 bounds nothing.
506
+ *
507
+ * @generated from field: int64 max = 9;
508
+ */
509
+ max?: string;
510
+ /**
511
+ * plan_key names the plan key a count falls back to, such as
512
+ * "preview_max_connections": a plan that sets the key and gives the
513
+ * feature no value of its own entitles the workspace to the key's value.
514
+ * Empty for a feature that falls back to none.
515
+ *
516
+ * @generated from field: string plan_key = 10;
517
+ */
518
+ planKey?: string;
519
+ /**
520
+ * source says where the entitlement comes from. Unspecified when the
521
+ * config turns the product off.
522
+ *
523
+ * @generated from field: toshi.workspace.v1.FeatureSource source = 11;
524
+ */
525
+ source?: FeatureSourceJson;
329
526
  };
330
527
  /**
331
528
  * Describes the message toshi.workspace.v1.ProductFeature.
@@ -556,56 +753,107 @@ export type ProductStateJson = "PRODUCT_STATE_UNSPECIFIED" | "PRODUCT_STATE_ENAB
556
753
  */
557
754
  export declare const ProductStateSchema: GenEnum<ProductState, ProductStateJson>;
558
755
  /**
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.
756
+ * ProductStability is how mature a product is. A deployment's
757
+ * products.min_stability turns off a product below it, as the operator's
758
+ * switch does.
759
+ *
760
+ * @generated from enum toshi.workspace.v1.ProductStability
761
+ */
762
+ export declare enum ProductStability {
763
+ /**
764
+ * @generated from enum value: PRODUCT_STABILITY_UNSPECIFIED = 0;
765
+ */
766
+ UNSPECIFIED = 0,
767
+ /**
768
+ * May change or go away in any release.
769
+ *
770
+ * @generated from enum value: PRODUCT_STABILITY_ALPHA = 1;
771
+ */
772
+ ALPHA = 1,
773
+ /**
774
+ * Complete; its configuration and API may still change between minor
775
+ * releases, with notice.
776
+ *
777
+ * @generated from enum value: PRODUCT_STABILITY_BETA = 2;
778
+ */
779
+ BETA = 2,
780
+ /**
781
+ * Changes only compatibly within a major version.
782
+ *
783
+ * @generated from enum value: PRODUCT_STABILITY_STABLE = 3;
784
+ */
785
+ STABLE = 3,
786
+ /**
787
+ * Works as it did until its removal version.
788
+ *
789
+ * @generated from enum value: PRODUCT_STABILITY_DEPRECATED = 4;
790
+ */
791
+ DEPRECATED = 4
792
+ }
793
+ /**
794
+ * ProductStability is how mature a product is. A deployment's
795
+ * products.min_stability turns off a product below it, as the operator's
796
+ * switch does.
797
+ *
798
+ * @generated from enum toshi.workspace.v1.ProductStability
799
+ */
800
+ export type ProductStabilityJson = "PRODUCT_STABILITY_UNSPECIFIED" | "PRODUCT_STABILITY_ALPHA" | "PRODUCT_STABILITY_BETA" | "PRODUCT_STABILITY_STABLE" | "PRODUCT_STABILITY_DEPRECATED";
801
+ /**
802
+ * Describes the enum toshi.workspace.v1.ProductStability.
803
+ */
804
+ export declare const ProductStabilitySchema: GenEnum<ProductStability, ProductStabilityJson>;
805
+ /**
806
+ * FeatureSource is where a workspace's entitlement to a feature comes from,
807
+ * the first that applies in this order: the operator's override, the
808
+ * value its plan gives the feature, the plan key the feature falls back
809
+ * to, and the feature's default.
563
810
  *
564
- * @generated from enum toshi.workspace.v1.ProductSwitch
811
+ * @generated from enum toshi.workspace.v1.FeatureSource
565
812
  */
566
- export declare enum ProductSwitch {
813
+ export declare enum FeatureSource {
567
814
  /**
568
- * @generated from enum value: PRODUCT_SWITCH_UNSPECIFIED = 0;
815
+ * @generated from enum value: FEATURE_SOURCE_UNSPECIFIED = 0;
569
816
  */
570
817
  UNSPECIFIED = 0,
571
818
  /**
572
- * No switch turns the product off: it is on for the workspace.
819
+ * The operator's override for the workspace.
573
820
  *
574
- * @generated from enum value: PRODUCT_SWITCH_ON = 1;
821
+ * @generated from enum value: FEATURE_SOURCE_OVERRIDE = 1;
575
822
  */
576
- ON = 1,
823
+ OVERRIDE = 1,
577
824
  /**
578
- * The deployment's config turns the product off ("disabled").
825
+ * The value the workspace's plan gives the feature.
579
826
  *
580
- * @generated from enum value: PRODUCT_SWITCH_DISABLED = 2;
827
+ * @generated from enum value: FEATURE_SOURCE_PLAN = 2;
581
828
  */
582
- DISABLED = 2,
829
+ PLAN = 2,
583
830
  /**
584
- * The workspace's entitlements leave the product out ("not_entitled").
831
+ * The value of the plan key the feature falls back to, which the
832
+ * workspace's plan sets.
585
833
  *
586
- * @generated from enum value: PRODUCT_SWITCH_NOT_ENTITLED = 3;
834
+ * @generated from enum value: FEATURE_SOURCE_PLAN_KEY = 3;
587
835
  */
588
- NOT_ENTITLED = 3,
836
+ PLAN_KEY = 3,
589
837
  /**
590
- * The workspace's settings turn the product off ("turned_off").
838
+ * The feature's default in its product's manifest.
591
839
  *
592
- * @generated from enum value: PRODUCT_SWITCH_TURNED_OFF = 4;
840
+ * @generated from enum value: FEATURE_SOURCE_DEFAULT = 4;
593
841
  */
594
- TURNED_OFF = 4
842
+ DEFAULT = 4
595
843
  }
596
844
  /**
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.
845
+ * FeatureSource is where a workspace's entitlement to a feature comes from,
846
+ * the first that applies in this order: the operator's override, the
847
+ * value its plan gives the feature, the plan key the feature falls back
848
+ * to, and the feature's default.
601
849
  *
602
- * @generated from enum toshi.workspace.v1.ProductSwitch
850
+ * @generated from enum toshi.workspace.v1.FeatureSource
603
851
  */
604
- export type ProductSwitchJson = "PRODUCT_SWITCH_UNSPECIFIED" | "PRODUCT_SWITCH_ON" | "PRODUCT_SWITCH_DISABLED" | "PRODUCT_SWITCH_NOT_ENTITLED" | "PRODUCT_SWITCH_TURNED_OFF";
852
+ export type FeatureSourceJson = "FEATURE_SOURCE_UNSPECIFIED" | "FEATURE_SOURCE_OVERRIDE" | "FEATURE_SOURCE_PLAN" | "FEATURE_SOURCE_PLAN_KEY" | "FEATURE_SOURCE_DEFAULT";
605
853
  /**
606
- * Describes the enum toshi.workspace.v1.ProductSwitch.
854
+ * Describes the enum toshi.workspace.v1.FeatureSource.
607
855
  */
608
- export declare const ProductSwitchSchema: GenEnum<ProductSwitch, ProductSwitchJson>;
856
+ export declare const FeatureSourceSchema: GenEnum<FeatureSource, FeatureSourceJson>;
609
857
  /**
610
858
  * ProductFeatureType is the type of a feature's value.
611
859
  *
@@ -6,7 +6,7 @@ import { file_toshi_permission } from "../../permission_pb.js";
6
6
  /**
7
7
  * Describes the file toshi/workspace/v1/discovery.proto.
8
8
  */
9
- export const file_toshi_workspace_v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3NwYWNlLnYxLkRpc2NvdmVyUmVxdWVzdBokLnRvc2hpLndvcmtzcGFjZS52MS5EaXNjb3ZlclJlc3BvbnNlIiHC8xgOd29ya3NwYWNlLnJlYWTK8xgLZW52aXJvbm1lbnRCIlogZ28udG9zaGljbG91ZC5pby9hcGkvd29ya3NwYWNldjFiBnByb3RvMw", [file_toshi_permission]);
9
+ export const file_toshi_workspace_v1_discovery = /*@__PURE__*/ fileDesc("CiJ0b3NoaS93b3Jrc3BhY2UvdjEvZGlzY292ZXJ5LnByb3RvEhJ0b3NoaS53b3Jrc3BhY2UudjEiNwoPRGlzY292ZXJSZXF1ZXN0Eg8KB3Byb2plY3QYASABKAkSEwoLZW52aXJvbm1lbnQYAiABKAkivAEKEERpc2NvdmVyUmVzcG9uc2USNwoIcHJvZHVjdHMYASADKAsyJS50b3NoaS53b3Jrc3BhY2UudjEuRGlzY292ZXJlZFByb2R1Y3QSEwoLcGVybWlzc2lvbnMYAiADKAkSMQoIdmVyc2lvbnMYAyABKAsyHy50b3NoaS53b3Jrc3BhY2UudjEuQVBJVmVyc2lvbnMSGAoQcmVnaXN0cnlfYWRkcmVzcxgEIAEoCRINCgVjYWxscxgFIAMoCSL9AgoRRGlzY292ZXJlZFByb2R1Y3QSCgoCaWQYASABKAkSDwoHdmVyc2lvbhgCIAEoCRIMCgRkb2NzGAMgASgJEg8KB2VuYWJsZWQYBCABKAgSNAoIZmVhdHVyZXMYBSADKAsyIi50b3NoaS53b3Jrc3BhY2UudjEuUHJvZHVjdEZlYXR1cmUSLwoFc3RhdGUYBiABKA4yIC50b3NoaS53b3Jrc3BhY2UudjEuUHJvZHVjdFN0YXRlEjgKCHN1cmZhY2VzGAggASgLMiYudG9zaGkud29ya3NwYWNlLnYxLkRpc2NvdmVyZWRTdXJmYWNlcxIRCglhdmFpbGFibGUYCiABKAgSNwoJc3RhYmlsaXR5GAsgASgOMiQudG9zaGkud29ya3NwYWNlLnYxLlByb2R1Y3RTdGFiaWxpdHkSFwoP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IhwvMYDndvcmtzcGFjZS5yZWFkyvMYC2Vudmlyb25tZW50QiJaIGdvLnRvc2hpY2xvdWQuaW8vYXBpL3dvcmtzcGFjZXYxYgZwcm90bzM", [file_toshi_permission]);
10
10
  /**
11
11
  * Describes the message toshi.workspace.v1.DiscoverRequest.
12
12
  * Use `create(DiscoverRequestSchema)` to create a new message.
@@ -22,26 +22,31 @@ export const DiscoverResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_works
22
22
  * Use `create(DiscoveredProductSchema)` to create a new message.
23
23
  */
24
24
  export const DiscoveredProductSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 2);
25
+ /**
26
+ * Describes the message toshi.workspace.v1.DiscoveredSurfaces.
27
+ * Use `create(DiscoveredSurfacesSchema)` to create a new message.
28
+ */
29
+ export const DiscoveredSurfacesSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 3);
25
30
  /**
26
31
  * Describes the message toshi.workspace.v1.ProductFeature.
27
32
  * Use `create(ProductFeatureSchema)` to create a new message.
28
33
  */
29
- export const ProductFeatureSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 3);
34
+ export const ProductFeatureSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 4);
30
35
  /**
31
36
  * Describes the message toshi.workspace.v1.FeatureValue.
32
37
  * Use `create(FeatureValueSchema)` to create a new message.
33
38
  */
34
- export const FeatureValueSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 4);
39
+ export const FeatureValueSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 5);
35
40
  /**
36
41
  * Describes the message toshi.workspace.v1.FeatureRange.
37
42
  * Use `create(FeatureRangeSchema)` to create a new message.
38
43
  */
39
- export const FeatureRangeSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 5);
44
+ export const FeatureRangeSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 6);
40
45
  /**
41
46
  * Describes the message toshi.workspace.v1.APIVersions.
42
47
  * Use `create(APIVersionsSchema)` to create a new message.
43
48
  */
44
- export const APIVersionsSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 6);
49
+ export const APIVersionsSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_discovery, 7);
45
50
  /**
46
51
  * ProductState is where a product is in the deployment's lifecycle. A
47
52
  * product the config turns off goes from no new work through draining to
@@ -88,48 +93,92 @@ export var ProductState;
88
93
  */
89
94
  export const ProductStateSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_discovery, 0);
90
95
  /**
91
- * ProductSwitch is the switch that decides whether a product is on for a
92
- * workspace. The deployment's config decides first, then the workspace's
93
- * entitlements, then its settings; the first that turns the product off is
94
- * the one named.
96
+ * ProductStability is how mature a product is. A deployment's
97
+ * products.min_stability turns off a product below it, as the operator's
98
+ * switch does.
99
+ *
100
+ * @generated from enum toshi.workspace.v1.ProductStability
101
+ */
102
+ export var ProductStability;
103
+ (function (ProductStability) {
104
+ /**
105
+ * @generated from enum value: PRODUCT_STABILITY_UNSPECIFIED = 0;
106
+ */
107
+ ProductStability[ProductStability["UNSPECIFIED"] = 0] = "UNSPECIFIED";
108
+ /**
109
+ * May change or go away in any release.
110
+ *
111
+ * @generated from enum value: PRODUCT_STABILITY_ALPHA = 1;
112
+ */
113
+ ProductStability[ProductStability["ALPHA"] = 1] = "ALPHA";
114
+ /**
115
+ * Complete; its configuration and API may still change between minor
116
+ * releases, with notice.
117
+ *
118
+ * @generated from enum value: PRODUCT_STABILITY_BETA = 2;
119
+ */
120
+ ProductStability[ProductStability["BETA"] = 2] = "BETA";
121
+ /**
122
+ * Changes only compatibly within a major version.
123
+ *
124
+ * @generated from enum value: PRODUCT_STABILITY_STABLE = 3;
125
+ */
126
+ ProductStability[ProductStability["STABLE"] = 3] = "STABLE";
127
+ /**
128
+ * Works as it did until its removal version.
129
+ *
130
+ * @generated from enum value: PRODUCT_STABILITY_DEPRECATED = 4;
131
+ */
132
+ ProductStability[ProductStability["DEPRECATED"] = 4] = "DEPRECATED";
133
+ })(ProductStability || (ProductStability = {}));
134
+ /**
135
+ * Describes the enum toshi.workspace.v1.ProductStability.
136
+ */
137
+ export const ProductStabilitySchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_discovery, 1);
138
+ /**
139
+ * FeatureSource is where a workspace's entitlement to a feature comes from,
140
+ * the first that applies in this order: the operator's override, the
141
+ * value its plan gives the feature, the plan key the feature falls back
142
+ * to, and the feature's default.
95
143
  *
96
- * @generated from enum toshi.workspace.v1.ProductSwitch
144
+ * @generated from enum toshi.workspace.v1.FeatureSource
97
145
  */
98
- export var ProductSwitch;
99
- (function (ProductSwitch) {
146
+ export var FeatureSource;
147
+ (function (FeatureSource) {
100
148
  /**
101
- * @generated from enum value: PRODUCT_SWITCH_UNSPECIFIED = 0;
149
+ * @generated from enum value: FEATURE_SOURCE_UNSPECIFIED = 0;
102
150
  */
103
- ProductSwitch[ProductSwitch["UNSPECIFIED"] = 0] = "UNSPECIFIED";
151
+ FeatureSource[FeatureSource["UNSPECIFIED"] = 0] = "UNSPECIFIED";
104
152
  /**
105
- * No switch turns the product off: it is on for the workspace.
153
+ * The operator's override for the workspace.
106
154
  *
107
- * @generated from enum value: PRODUCT_SWITCH_ON = 1;
155
+ * @generated from enum value: FEATURE_SOURCE_OVERRIDE = 1;
108
156
  */
109
- ProductSwitch[ProductSwitch["ON"] = 1] = "ON";
157
+ FeatureSource[FeatureSource["OVERRIDE"] = 1] = "OVERRIDE";
110
158
  /**
111
- * The deployment's config turns the product off ("disabled").
159
+ * The value the workspace's plan gives the feature.
112
160
  *
113
- * @generated from enum value: PRODUCT_SWITCH_DISABLED = 2;
161
+ * @generated from enum value: FEATURE_SOURCE_PLAN = 2;
114
162
  */
115
- ProductSwitch[ProductSwitch["DISABLED"] = 2] = "DISABLED";
163
+ FeatureSource[FeatureSource["PLAN"] = 2] = "PLAN";
116
164
  /**
117
- * The workspace's entitlements leave the product out ("not_entitled").
165
+ * The value of the plan key the feature falls back to, which the
166
+ * workspace's plan sets.
118
167
  *
119
- * @generated from enum value: PRODUCT_SWITCH_NOT_ENTITLED = 3;
168
+ * @generated from enum value: FEATURE_SOURCE_PLAN_KEY = 3;
120
169
  */
121
- ProductSwitch[ProductSwitch["NOT_ENTITLED"] = 3] = "NOT_ENTITLED";
170
+ FeatureSource[FeatureSource["PLAN_KEY"] = 3] = "PLAN_KEY";
122
171
  /**
123
- * The workspace's settings turn the product off ("turned_off").
172
+ * The feature's default in its product's manifest.
124
173
  *
125
- * @generated from enum value: PRODUCT_SWITCH_TURNED_OFF = 4;
174
+ * @generated from enum value: FEATURE_SOURCE_DEFAULT = 4;
126
175
  */
127
- ProductSwitch[ProductSwitch["TURNED_OFF"] = 4] = "TURNED_OFF";
128
- })(ProductSwitch || (ProductSwitch = {}));
176
+ FeatureSource[FeatureSource["DEFAULT"] = 4] = "DEFAULT";
177
+ })(FeatureSource || (FeatureSource = {}));
129
178
  /**
130
- * Describes the enum toshi.workspace.v1.ProductSwitch.
179
+ * Describes the enum toshi.workspace.v1.FeatureSource.
131
180
  */
132
- export const ProductSwitchSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_discovery, 1);
181
+ export const FeatureSourceSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_discovery, 2);
133
182
  /**
134
183
  * ProductFeatureType is the type of a feature's value.
135
184
  *
@@ -165,7 +214,7 @@ export var ProductFeatureType;
165
214
  /**
166
215
  * Describes the enum toshi.workspace.v1.ProductFeatureType.
167
216
  */
168
- export const ProductFeatureTypeSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_discovery, 2);
217
+ export const ProductFeatureTypeSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_discovery, 3);
169
218
  /**
170
219
  * DiscoveryService tells a client what this deployment serves and what the
171
220
  * caller may do in the workspace, in one call: the products the build