@gitpod/gitpod-protocol 0.1.5-release-2022.6.1.0 → 0.1.5-release-2022.9.2.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 (160) hide show
  1. package/data/gitpod-schema.json +63 -129
  2. package/lib/accounting-protocol.d.ts +1 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +4 -0
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +7 -0
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js.map +1 -1
  9. package/lib/attribution.d.ts +20 -0
  10. package/lib/attribution.d.ts.map +1 -0
  11. package/lib/attribution.js +40 -0
  12. package/lib/attribution.js.map +1 -0
  13. package/lib/billing-mode.d.ts +41 -0
  14. package/lib/billing-mode.d.ts.map +1 -0
  15. package/lib/billing-mode.js +44 -0
  16. package/lib/billing-mode.js.map +1 -0
  17. package/lib/blocked-repositories-protocol.d.ts +13 -0
  18. package/lib/blocked-repositories-protocol.d.ts.map +1 -0
  19. package/lib/blocked-repositories-protocol.js +8 -0
  20. package/lib/blocked-repositories-protocol.js.map +1 -0
  21. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  22. package/lib/encryption/encryption-engine.js +3 -3
  23. package/lib/encryption/encryption-engine.js.map +1 -1
  24. package/lib/encryption/encryption-engine.spec.js +1 -1
  25. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  26. package/lib/encryption/key-provider.js +1 -1
  27. package/lib/encryption/key-provider.js.map +1 -1
  28. package/lib/experiments/configcat-server.d.ts +2 -0
  29. package/lib/experiments/configcat-server.d.ts.map +1 -1
  30. package/lib/experiments/configcat-server.js +3 -1
  31. package/lib/experiments/configcat-server.js.map +1 -1
  32. package/lib/experiments/configcat.d.ts +4 -2
  33. package/lib/experiments/configcat.d.ts.map +1 -1
  34. package/lib/experiments/configcat.js +13 -3
  35. package/lib/experiments/configcat.js.map +1 -1
  36. package/lib/experiments/types.d.ts +8 -3
  37. package/lib/experiments/types.d.ts.map +1 -1
  38. package/lib/experiments/types.js +2 -0
  39. package/lib/experiments/types.js.map +1 -1
  40. package/lib/gitpod-service.d.ts +32 -15
  41. package/lib/gitpod-service.d.ts.map +1 -1
  42. package/lib/gitpod-service.js +13 -1
  43. package/lib/gitpod-service.js.map +1 -1
  44. package/lib/ide-protocol.d.ts +8 -0
  45. package/lib/ide-protocol.d.ts.map +1 -1
  46. package/lib/index.d.ts +1 -0
  47. package/lib/index.d.ts.map +1 -1
  48. package/lib/index.js +1 -0
  49. package/lib/index.js.map +1 -1
  50. package/lib/messaging/client-call-metrics.d.ts +1 -17
  51. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  52. package/lib/messaging/client-call-metrics.js +1 -2
  53. package/lib/messaging/client-call-metrics.js.map +1 -1
  54. package/lib/messaging/error.d.ts +5 -1
  55. package/lib/messaging/error.d.ts.map +1 -1
  56. package/lib/messaging/error.js +11 -3
  57. package/lib/messaging/error.js.map +1 -1
  58. package/lib/plans.d.ts +1 -0
  59. package/lib/plans.d.ts.map +1 -1
  60. package/lib/plans.js +4 -0
  61. package/lib/plans.js.map +1 -1
  62. package/lib/protocol.d.ts +88 -4
  63. package/lib/protocol.d.ts.map +1 -1
  64. package/lib/protocol.js +116 -3
  65. package/lib/protocol.js.map +1 -1
  66. package/lib/protocol.spec.d.ts +7 -0
  67. package/lib/protocol.spec.d.ts.map +1 -0
  68. package/lib/protocol.spec.js +127 -0
  69. package/lib/protocol.spec.js.map +1 -0
  70. package/lib/team-subscription-protocol.d.ts +1 -0
  71. package/lib/team-subscription-protocol.d.ts.map +1 -1
  72. package/lib/team-subscription-protocol.js +4 -0
  73. package/lib/team-subscription-protocol.js.map +1 -1
  74. package/lib/teams-projects-protocol.d.ts +13 -1
  75. package/lib/teams-projects-protocol.d.ts.map +1 -1
  76. package/lib/teams-projects-protocol.js.map +1 -1
  77. package/lib/usage.d.ts +61 -0
  78. package/lib/usage.d.ts.map +1 -0
  79. package/lib/usage.js +14 -0
  80. package/lib/usage.js.map +1 -0
  81. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  82. package/lib/util/garbage-collected-cache.js +5 -0
  83. package/lib/util/garbage-collected-cache.js.map +1 -1
  84. package/lib/util/gitpod-host-url.d.ts +3 -0
  85. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  86. package/lib/util/gitpod-host-url.js +18 -0
  87. package/lib/util/gitpod-host-url.js.map +1 -1
  88. package/lib/util/grpc.d.ts +19 -0
  89. package/lib/util/grpc.d.ts.map +1 -1
  90. package/lib/util/grpc.js +73 -1
  91. package/lib/util/grpc.js.map +1 -1
  92. package/lib/util/logging.d.ts.map +1 -1
  93. package/lib/util/logging.js +8 -1
  94. package/lib/util/logging.js.map +1 -1
  95. package/lib/util/logging.spec.d.ts +7 -0
  96. package/lib/util/logging.spec.d.ts.map +1 -0
  97. package/lib/util/logging.spec.js +52 -0
  98. package/lib/util/logging.spec.js.map +1 -0
  99. package/lib/util/timeutil.d.ts +1 -0
  100. package/lib/util/timeutil.d.ts.map +1 -1
  101. package/lib/util/timeutil.js +7 -1
  102. package/lib/util/timeutil.js.map +1 -1
  103. package/lib/util/timeutil.spec.d.ts +2 -0
  104. package/lib/util/timeutil.spec.d.ts.map +1 -1
  105. package/lib/util/timeutil.spec.js +34 -0
  106. package/lib/util/timeutil.spec.js.map +1 -1
  107. package/lib/webhook-event.d.ts +44 -0
  108. package/lib/webhook-event.d.ts.map +1 -0
  109. package/lib/webhook-event.js +8 -0
  110. package/lib/webhook-event.js.map +1 -0
  111. package/lib/workspace-class.d.ts +14 -0
  112. package/lib/workspace-class.d.ts.map +1 -0
  113. package/lib/workspace-class.js +8 -0
  114. package/lib/workspace-class.js.map +1 -0
  115. package/lib/workspace-cluster.d.ts +5 -7
  116. package/lib/workspace-cluster.d.ts.map +1 -1
  117. package/lib/workspace-cluster.js.map +1 -1
  118. package/lib/workspace-instance.d.ts +2 -0
  119. package/lib/workspace-instance.d.ts.map +1 -1
  120. package/lib/wsready.d.ts +3 -3
  121. package/lib/wsready.d.ts.map +1 -1
  122. package/lib/wsready.js +0 -2
  123. package/lib/wsready.js.map +1 -1
  124. package/package.json +5 -2
  125. package/pkg-yarn.lock +3 -2
  126. package/provenance-bundle.jsonl +1 -1
  127. package/src/accounting-protocol.ts +3 -0
  128. package/src/admin-protocol.ts +10 -0
  129. package/src/attribution.ts +48 -0
  130. package/src/billing-mode.ts +77 -0
  131. package/src/blocked-repositories-protocol.ts +13 -0
  132. package/src/encryption/encryption-engine.spec.ts +1 -1
  133. package/src/encryption/encryption-engine.ts +7 -3
  134. package/src/encryption/key-provider.ts +1 -1
  135. package/src/experiments/configcat-server.ts +4 -0
  136. package/src/experiments/configcat.ts +14 -5
  137. package/src/experiments/types.ts +13 -7
  138. package/src/gitpod-service.ts +54 -14
  139. package/src/ide-protocol.ts +10 -0
  140. package/src/index.ts +1 -0
  141. package/src/messaging/client-call-metrics.ts +1 -20
  142. package/src/messaging/error.ts +16 -4
  143. package/src/plans.ts +4 -0
  144. package/src/protocol.spec.ts +97 -0
  145. package/src/protocol.ts +192 -6
  146. package/src/team-subscription-protocol.ts +3 -0
  147. package/src/teams-projects-protocol.ts +14 -1
  148. package/src/usage.ts +71 -0
  149. package/src/util/garbage-collected-cache.ts +5 -0
  150. package/src/util/gitpod-host-url.ts +21 -0
  151. package/src/util/grpc.ts +89 -0
  152. package/src/util/logging.spec.ts +23 -0
  153. package/src/util/logging.ts +11 -2
  154. package/src/util/timeutil.spec.ts +28 -1
  155. package/src/util/timeutil.ts +6 -0
  156. package/src/webhook-event.ts +55 -0
  157. package/src/workspace-class.ts +14 -0
  158. package/src/workspace-cluster.ts +2 -4
  159. package/src/workspace-instance.ts +8 -0
  160. package/src/wsready.ts +5 -4
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
+ * Licensed under the GNU Affero General Public License (AGPL).
4
+ * See License-AGPL.txt in the project root for license information.
5
+ */
6
+
7
+ export interface WebhookEvent {
8
+ id: string;
9
+ creationTime: string;
10
+ type: "push" | string;
11
+
12
+ /**
13
+ * Typically the webhook installer is referenced here.
14
+ */
15
+ authorizedUserId?: string;
16
+
17
+ /**
18
+ * webhook event's payload
19
+ */
20
+ rawEvent: string;
21
+
22
+ /**
23
+ * The general status of the received webhook event.
24
+ */
25
+ status: WebhookEvent.Status;
26
+
27
+ /**
28
+ * Optional message to help understand errors with handling events.
29
+ */
30
+ message?: string;
31
+
32
+ /**
33
+ * If the webhook event is considered to trigger a prebuild, the `prebuildStatus`
34
+ * contains a more specific status.
35
+ */
36
+ prebuildStatus?: WebhookEvent.PrebuildStatus;
37
+
38
+ /**
39
+ * If `prebuildStatus` is `prebuild_triggered` this points to a prebuild.
40
+ */
41
+ prebuildId?: string;
42
+
43
+ projectId?: string;
44
+
45
+ cloneUrl?: string;
46
+
47
+ branch?: string;
48
+
49
+ commit?: string;
50
+ }
51
+
52
+ export namespace WebhookEvent {
53
+ export type Status = "received" | "dismissed_unauthorized" | "ignored" | "processed";
54
+ export type PrebuildStatus = "ignored_unconfigured" | "prebuild_trigger_failed" | "prebuild_triggered";
55
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
+ * Licensed under the GNU Affero General Public License (AGPL).
4
+ * See License-AGPL.txt in the project root for license information.
5
+ */
6
+
7
+ export interface SupportedWorkspaceClass {
8
+ id: string;
9
+ category: string;
10
+ displayName: string;
11
+ description: string;
12
+ powerups: number;
13
+ isSelected: boolean;
14
+ }
@@ -56,12 +56,10 @@ export type WorkspaceManagerConnectionInfo = Pick<WorkspaceCluster, "name" | "ur
56
56
  export type AdmissionConstraint =
57
57
  | AdmissionConstraintFeaturePreview
58
58
  | AdmissionConstraintHasPermission
59
- | AdmissionConstraintHasUserLevel
60
- | AdmissionConstraintHasMoreResources;
59
+ | AdmissionConstraintHasClass;
61
60
  export type AdmissionConstraintFeaturePreview = { type: "has-feature-preview" };
62
61
  export type AdmissionConstraintHasPermission = { type: "has-permission"; permission: PermissionName };
63
- export type AdmissionConstraintHasUserLevel = { type: "has-user-level"; level: string };
64
- export type AdmissionConstraintHasMoreResources = { type: "has-more-resources" };
62
+ export type AdmissionConstraintHasClass = { type: "has-class"; id: string; displayName: string };
65
63
 
66
64
  export namespace AdmissionConstraint {
67
65
  export function is(o: any): o is AdmissionConstraint {
@@ -72,6 +72,11 @@ export interface WorkspaceInstance {
72
72
 
73
73
  // WorkspaceInstanceStatus describes the current state of a workspace instance
74
74
  export interface WorkspaceInstanceStatus {
75
+ // version is the current version of the workspace instance status
76
+ // Note: consider this value opague. The only guarantee given is that it imposes
77
+ // a partial order on status updates, i.e. a.version > b.version -> a newer than b.
78
+ version?: number;
79
+
75
80
  // phase describes a high-level state of the workspace instance
76
81
  phase: WorkspaceInstancePhase;
77
82
 
@@ -241,6 +246,9 @@ export interface WorkspaceInstanceConfiguration {
241
246
  // desktopIdeImage is the ref of the desktop IDE image this instance uses.
242
247
  desktopIdeImage?: string;
243
248
 
249
+ // desktopIdePluginImage is the ref of the desktop IDE plugin image this instance uses.
250
+ desktopIdePluginImage?: string;
251
+
244
252
  // supervisorImage is the ref of the supervisor image this instance uses.
245
253
  supervisorImage?: string;
246
254
 
package/src/wsready.ts CHANGED
@@ -4,14 +4,15 @@
4
4
  * See License-AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
- // generated using github.com/32leaves/bel on 2022-05-18 18:19:49.011672619 +0000 UTC m=+0.006607361
7
+ // generated using github.com/32leaves/bel on 2022-07-21 07:41:48.081573085 +0000 UTC m=+0.009109470
8
8
  // DO NOT MODIFY
9
9
 
10
+ export interface WorkspaceReadyMessage {
11
+ source: WorkspaceInitSource;
12
+ }
13
+
10
14
  export enum WorkspaceInitSource {
11
15
  WorkspaceInitFromBackup = "from-backup",
12
16
  WorkspaceInitFromPrebuild = "from-prebuild",
13
17
  WorkspaceInitFromOther = "from-other",
14
18
  }
15
- export interface WorkspaceReadyMessage {
16
- source: WorkspaceInitSource;
17
- }