@gitpod/gitpod-protocol 0.1.5-svenefftinge-dashboard-invalid-2274.5 → 0.1.5-tar-telemetry-settings-data.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 (349) hide show
  1. package/data/builtin-theia-plugins.json +28 -18
  2. package/data/gitpod-schema.json +25 -24
  3. package/lib/accounting-protocol.d.ts +155 -0
  4. package/lib/accounting-protocol.d.ts.map +1 -0
  5. package/lib/accounting-protocol.js +109 -0
  6. package/lib/accounting-protocol.js.map +1 -0
  7. package/lib/admin-protocol.d.ts +32 -5
  8. package/lib/admin-protocol.d.ts.map +1 -1
  9. package/lib/admin-protocol.js +16 -1
  10. package/lib/admin-protocol.js.map +1 -1
  11. package/lib/analytics.d.ts +45 -0
  12. package/lib/analytics.d.ts.map +1 -0
  13. package/lib/analytics.js +10 -0
  14. package/lib/analytics.js.map +1 -0
  15. package/lib/auth.d.ts +25 -0
  16. package/lib/auth.d.ts.map +1 -0
  17. package/lib/auth.js +16 -0
  18. package/lib/auth.js.map +1 -0
  19. package/lib/context-url.d.ts +31 -0
  20. package/lib/context-url.d.ts.map +1 -0
  21. package/lib/context-url.js +102 -0
  22. package/lib/context-url.js.map +1 -0
  23. package/lib/context-url.spec.d.ts +14 -0
  24. package/lib/context-url.spec.d.ts.map +1 -0
  25. package/lib/context-url.spec.js +94 -0
  26. package/lib/context-url.spec.js.map +1 -0
  27. package/lib/email-protocol.d.ts +2 -3
  28. package/lib/email-protocol.d.ts.map +1 -1
  29. package/lib/email-protocol.js +5 -5
  30. package/lib/email-protocol.js.map +1 -1
  31. package/lib/encryption/container-module.d.ts +1 -1
  32. package/lib/encryption/container-module.js +6 -5
  33. package/lib/encryption/container-module.js.map +1 -1
  34. package/lib/encryption/encryption-engine.d.ts +1 -1
  35. package/lib/encryption/encryption-engine.js +20 -21
  36. package/lib/encryption/encryption-engine.js.map +1 -1
  37. package/lib/encryption/encryption-engine.spec.d.ts +1 -1
  38. package/lib/encryption/encryption-engine.spec.js +30 -37
  39. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  40. package/lib/encryption/encryption-service.d.ts +1 -1
  41. package/lib/encryption/encryption-service.js +30 -44
  42. package/lib/encryption/encryption-service.js.map +1 -1
  43. package/lib/encryption/key-provider.d.ts +1 -1
  44. package/lib/encryption/key-provider.js +26 -31
  45. package/lib/encryption/key-provider.js.map +1 -1
  46. package/lib/env.d.ts +2 -3
  47. package/lib/env.d.ts.map +1 -1
  48. package/lib/env.js +21 -22
  49. package/lib/env.js.map +1 -1
  50. package/lib/gitpod-file-parser.d.ts +1 -1
  51. package/lib/gitpod-file-parser.js +26 -42
  52. package/lib/gitpod-file-parser.js.map +1 -1
  53. package/lib/gitpod-file-parser.spec.d.ts +1 -1
  54. package/lib/gitpod-file-parser.spec.js +117 -117
  55. package/lib/gitpod-file-parser.spec.js.map +1 -1
  56. package/lib/gitpod-service.d.ts +165 -21
  57. package/lib/gitpod-service.d.ts.map +1 -1
  58. package/lib/gitpod-service.js +171 -257
  59. package/lib/gitpod-service.js.map +1 -1
  60. package/lib/headless-workspace-log.d.ts +9 -12
  61. package/lib/headless-workspace-log.d.ts.map +1 -1
  62. package/lib/headless-workspace-log.js +5 -8
  63. package/lib/headless-workspace-log.js.map +1 -1
  64. package/lib/ide-frontend-service.d.ts +5 -1
  65. package/lib/ide-frontend-service.d.ts.map +1 -1
  66. package/lib/ide-frontend-service.js +1 -1
  67. package/lib/ide-protocol.d.ts +105 -0
  68. package/lib/ide-protocol.d.ts.map +1 -0
  69. package/lib/{util/without.js → ide-protocol.js} +2 -2
  70. package/lib/ide-protocol.js.map +1 -0
  71. package/lib/index.d.ts +7 -1
  72. package/lib/index.d.ts.map +1 -1
  73. package/lib/index.js +8 -2
  74. package/lib/index.js.map +1 -1
  75. package/lib/installation-admin-protocol.d.ts +27 -0
  76. package/lib/installation-admin-protocol.d.ts.map +1 -0
  77. package/lib/installation-admin-protocol.js +30 -0
  78. package/lib/installation-admin-protocol.js.map +1 -0
  79. package/lib/license-protocol.d.ts +1 -1
  80. package/lib/license-protocol.js +1 -1
  81. package/lib/messaging/browser/connection.d.ts +5 -3
  82. package/lib/messaging/browser/connection.d.ts.map +1 -1
  83. package/lib/messaging/browser/connection.js +183 -33
  84. package/lib/messaging/browser/connection.js.map +1 -1
  85. package/lib/messaging/browser/window-connection.d.ts +1 -1
  86. package/lib/messaging/browser/window-connection.js +36 -56
  87. package/lib/messaging/browser/window-connection.js.map +1 -1
  88. package/lib/messaging/client-call-metrics.d.ts +35 -0
  89. package/lib/messaging/client-call-metrics.d.ts.map +1 -0
  90. package/lib/messaging/client-call-metrics.js +83 -0
  91. package/lib/messaging/client-call-metrics.js.map +1 -0
  92. package/lib/messaging/error.d.ts +7 -2
  93. package/lib/messaging/error.d.ts.map +1 -1
  94. package/lib/messaging/error.js +14 -4
  95. package/lib/messaging/error.js.map +1 -1
  96. package/lib/messaging/handler.d.ts +10 -0
  97. package/lib/messaging/handler.d.ts.map +1 -1
  98. package/lib/messaging/node/connection.d.ts +1 -17
  99. package/lib/messaging/node/connection.d.ts.map +1 -1
  100. package/lib/messaging/node/connection.js +23 -59
  101. package/lib/messaging/node/connection.js.map +1 -1
  102. package/lib/messaging/proxy-factory.d.ts +2 -0
  103. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  104. package/lib/messaging/proxy-factory.js +74 -159
  105. package/lib/messaging/proxy-factory.js.map +1 -1
  106. package/lib/oss-allowlist.d.ts +14 -0
  107. package/lib/oss-allowlist.d.ts.map +1 -0
  108. package/lib/oss-allowlist.js +8 -0
  109. package/lib/oss-allowlist.js.map +1 -0
  110. package/lib/payment-protocol.d.ts +18 -0
  111. package/lib/payment-protocol.d.ts.map +1 -0
  112. package/lib/payment-protocol.js +13 -0
  113. package/lib/payment-protocol.js.map +1 -0
  114. package/lib/permission.d.ts +10 -5
  115. package/lib/permission.d.ts.map +1 -1
  116. package/lib/permission.js +38 -21
  117. package/lib/permission.js.map +1 -1
  118. package/lib/plans.d.ts +210 -0
  119. package/lib/plans.d.ts.map +1 -0
  120. package/lib/plans.js +570 -0
  121. package/lib/plans.js.map +1 -0
  122. package/lib/protocol.d.ts +134 -59
  123. package/lib/protocol.d.ts.map +1 -1
  124. package/lib/protocol.js +129 -118
  125. package/lib/protocol.js.map +1 -1
  126. package/lib/snapshot-url.d.ts +14 -0
  127. package/lib/snapshot-url.d.ts.map +1 -0
  128. package/lib/snapshot-url.js +26 -0
  129. package/lib/snapshot-url.js.map +1 -0
  130. package/{src/util/without.ts → lib/snapshot-url.spec.d.ts} +3 -4
  131. package/lib/snapshot-url.spec.d.ts.map +1 -0
  132. package/lib/snapshot-url.spec.js +41 -0
  133. package/lib/snapshot-url.spec.js.map +1 -0
  134. package/lib/team-subscription-protocol.d.ts +73 -0
  135. package/lib/team-subscription-protocol.d.ts.map +1 -0
  136. package/lib/team-subscription-protocol.js +63 -0
  137. package/lib/team-subscription-protocol.js.map +1 -0
  138. package/lib/teams-projects-protocol.d.ts +113 -0
  139. package/lib/teams-projects-protocol.d.ts.map +1 -0
  140. package/lib/teams-projects-protocol.js +30 -0
  141. package/lib/teams-projects-protocol.js.map +1 -0
  142. package/lib/theia-plugins.d.ts +1 -1
  143. package/lib/theia-plugins.js +1 -1
  144. package/lib/typings/globals.d.ts +1 -1
  145. package/lib/typings/globals.js +1 -1
  146. package/lib/util/analytics.d.ts +8 -0
  147. package/lib/util/analytics.d.ts.map +1 -0
  148. package/lib/util/analytics.js +79 -0
  149. package/lib/util/analytics.js.map +1 -0
  150. package/lib/util/async-iterator.d.ts +1 -1
  151. package/lib/util/async-iterator.js +56 -134
  152. package/lib/util/async-iterator.js.map +1 -1
  153. package/lib/util/cancelable.d.ts +1 -1
  154. package/lib/util/cancelable.js +18 -60
  155. package/lib/util/cancelable.js.map +1 -1
  156. package/lib/util/date-time.d.ts +1 -1
  157. package/lib/util/date-time.js +9 -9
  158. package/lib/util/date-time.js.map +1 -1
  159. package/lib/util/deep-partial.d.ts +1 -1
  160. package/lib/util/deep-partial.js +1 -1
  161. package/lib/util/deferred.d.ts +1 -1
  162. package/lib/util/deferred.js +11 -13
  163. package/lib/util/deferred.js.map +1 -1
  164. package/lib/util/disposable.js +26 -39
  165. package/lib/util/disposable.js.map +1 -1
  166. package/lib/util/event.js +58 -74
  167. package/lib/util/event.js.map +1 -1
  168. package/lib/util/garbage-collected-cache.d.ts +2 -1
  169. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  170. package/lib/util/garbage-collected-cache.js +27 -47
  171. package/lib/util/garbage-collected-cache.js.map +1 -1
  172. package/lib/util/generate-workspace-id.d.ts +4 -0
  173. package/lib/util/generate-workspace-id.d.ts.map +1 -0
  174. package/lib/util/generate-workspace-id.js +487 -0
  175. package/lib/util/generate-workspace-id.js.map +1 -0
  176. package/lib/util/generate-workspace-id.spec.d.ts +7 -0
  177. package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
  178. package/lib/util/generate-workspace-id.spec.js +87 -0
  179. package/lib/util/generate-workspace-id.spec.js.map +1 -0
  180. package/lib/util/gitpod-cookie.d.ts +20 -0
  181. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  182. package/lib/util/gitpod-cookie.js +44 -0
  183. package/lib/util/gitpod-cookie.js.map +1 -0
  184. package/lib/util/gitpod-host-url.d.ts +5 -3
  185. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  186. package/lib/util/gitpod-host-url.js +99 -92
  187. package/lib/util/gitpod-host-url.js.map +1 -1
  188. package/lib/util/gitpod-host-url.spec.d.ts +16 -0
  189. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -0
  190. package/lib/util/gitpod-host-url.spec.js +124 -0
  191. package/lib/util/gitpod-host-url.spec.js.map +1 -0
  192. package/lib/util/grpc.d.ts +15 -0
  193. package/lib/util/grpc.d.ts.map +1 -0
  194. package/lib/util/grpc.js +18 -0
  195. package/lib/util/grpc.js.map +1 -0
  196. package/lib/util/jaeger-client-types.d.ts +68 -0
  197. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  198. package/lib/util/jaeger-client-types.js +8 -0
  199. package/lib/util/jaeger-client-types.js.map +1 -0
  200. package/lib/util/logging.d.ts +57 -34
  201. package/lib/util/logging.d.ts.map +1 -1
  202. package/lib/util/logging.js +119 -111
  203. package/lib/util/logging.js.map +1 -1
  204. package/lib/util/make-link.d.ts +1 -1
  205. package/lib/util/make-link.js +3 -3
  206. package/lib/util/make-link.js.map +1 -1
  207. package/lib/util/parse-workspace-id.d.ts +14 -4
  208. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  209. package/lib/util/parse-workspace-id.js +39 -9
  210. package/lib/util/parse-workspace-id.js.map +1 -1
  211. package/lib/util/parse-workspace-id.spec.d.ts +9 -1
  212. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  213. package/lib/util/parse-workspace-id.spec.js +128 -48
  214. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  215. package/lib/util/queue.d.ts +1 -1
  216. package/lib/util/queue.js +17 -56
  217. package/lib/util/queue.js.map +1 -1
  218. package/lib/util/queue.spec.d.ts +1 -1
  219. package/lib/util/queue.spec.js +145 -289
  220. package/lib/util/queue.spec.js.map +1 -1
  221. package/lib/util/repeat.d.ts +15 -0
  222. package/lib/util/repeat.d.ts.map +1 -0
  223. package/lib/util/repeat.js +55 -0
  224. package/lib/util/repeat.js.map +1 -0
  225. package/lib/util/semaphore.d.ts +1 -1
  226. package/lib/util/semaphore.js +16 -47
  227. package/lib/util/semaphore.js.map +1 -1
  228. package/lib/util/skip-if.d.ts +1 -1
  229. package/lib/util/skip-if.js +7 -7
  230. package/lib/util/skip-if.js.map +1 -1
  231. package/lib/util/timeutil.d.ts +1 -1
  232. package/lib/util/timeutil.js +29 -17
  233. package/lib/util/timeutil.js.map +1 -1
  234. package/lib/util/timeutil.spec.d.ts +1 -1
  235. package/lib/util/timeutil.spec.js +22 -25
  236. package/lib/util/timeutil.spec.js.map +1 -1
  237. package/lib/util/tracing.d.ts +52 -6
  238. package/lib/util/tracing.d.ts.map +1 -1
  239. package/lib/util/tracing.js +198 -63
  240. package/lib/util/tracing.js.map +1 -1
  241. package/lib/util/tracing.spec.d.ts +7 -0
  242. package/lib/util/tracing.spec.d.ts.map +1 -0
  243. package/lib/util/tracing.spec.js +121 -0
  244. package/lib/util/tracing.spec.js.map +1 -0
  245. package/lib/util/workspace-port-authentication.d.ts +1 -1
  246. package/lib/util/workspace-port-authentication.js +4 -3
  247. package/lib/util/workspace-port-authentication.js.map +1 -1
  248. package/lib/workspace-cluster.d.ts +76 -0
  249. package/lib/workspace-cluster.d.ts.map +1 -0
  250. package/lib/workspace-cluster.js +33 -0
  251. package/lib/workspace-cluster.js.map +1 -0
  252. package/lib/workspace-instance.d.ts +27 -3
  253. package/lib/workspace-instance.d.ts.map +1 -1
  254. package/lib/workspace-instance.js +1 -1
  255. package/lib/wsready.d.ts +1 -1
  256. package/lib/wsready.js +2 -2
  257. package/package.json +33 -17
  258. package/pkg-yarn.lock +18 -9
  259. package/provenance-bundle.jsonl +2 -0
  260. package/src/accounting-protocol.ts +229 -0
  261. package/src/admin-protocol.ts +54 -6
  262. package/src/analytics.ts +54 -0
  263. package/src/auth.ts +27 -0
  264. package/src/context-url.spec.ts +53 -0
  265. package/src/context-url.ts +107 -0
  266. package/src/email-protocol.ts +3 -4
  267. package/src/encryption/container-module.ts +1 -1
  268. package/src/encryption/encryption-engine.spec.ts +1 -1
  269. package/src/encryption/encryption-engine.ts +1 -1
  270. package/src/encryption/encryption-service.ts +1 -1
  271. package/src/encryption/key-provider.ts +1 -1
  272. package/src/env.ts +11 -11
  273. package/src/gitpod-file-parser.spec.ts +1 -1
  274. package/src/gitpod-file-parser.ts +1 -1
  275. package/src/gitpod-service.ts +241 -40
  276. package/src/headless-workspace-log.ts +8 -12
  277. package/src/ide-frontend-service.ts +6 -2
  278. package/src/ide-protocol.ts +119 -0
  279. package/src/index.ts +8 -2
  280. package/src/installation-admin-protocol.ts +42 -0
  281. package/src/license-protocol.ts +1 -1
  282. package/src/messaging/browser/connection.ts +195 -14
  283. package/src/messaging/browser/window-connection.ts +1 -1
  284. package/src/messaging/client-call-metrics.ts +97 -0
  285. package/src/messaging/error.ts +19 -4
  286. package/src/messaging/handler.ts +12 -0
  287. package/src/messaging/node/connection.ts +21 -68
  288. package/src/messaging/proxy-factory.ts +14 -6
  289. package/src/oss-allowlist.ts +15 -0
  290. package/src/payment-protocol.ts +20 -0
  291. package/src/permission.ts +26 -11
  292. package/src/plans.ts +632 -0
  293. package/src/protocol.ts +223 -88
  294. package/src/snapshot-url.spec.ts +25 -0
  295. package/src/snapshot-url.ts +27 -0
  296. package/src/team-subscription-protocol.ts +113 -0
  297. package/src/teams-projects-protocol.ts +147 -0
  298. package/src/theia-plugins.ts +1 -1
  299. package/src/typings/globals.ts +1 -1
  300. package/src/util/analytics.ts +87 -0
  301. package/src/util/async-iterator.ts +1 -1
  302. package/src/util/cancelable.ts +1 -1
  303. package/src/util/date-time.ts +1 -1
  304. package/src/util/deep-partial.ts +1 -1
  305. package/src/util/deferred.ts +2 -2
  306. package/src/util/garbage-collected-cache.ts +10 -4
  307. package/src/util/generate-workspace-id.spec.ts +48 -0
  308. package/src/util/generate-workspace-id.ts +475 -0
  309. package/src/util/gitpod-cookie.ts +39 -0
  310. package/src/util/gitpod-host-url.spec.ts +49 -0
  311. package/src/util/gitpod-host-url.ts +36 -14
  312. package/src/util/grpc.ts +15 -0
  313. package/src/util/jaeger-client-types.ts +102 -0
  314. package/src/util/logging.ts +111 -39
  315. package/src/util/make-link.ts +1 -1
  316. package/src/util/parse-workspace-id.spec.ts +46 -5
  317. package/src/util/parse-workspace-id.ts +39 -8
  318. package/src/util/queue.spec.ts +2 -2
  319. package/src/util/queue.ts +1 -1
  320. package/src/util/repeat.ts +45 -0
  321. package/src/util/semaphore.ts +3 -3
  322. package/src/util/skip-if.ts +2 -2
  323. package/src/util/timeutil.spec.ts +1 -1
  324. package/src/util/timeutil.ts +5 -5
  325. package/src/util/tracing.spec.ts +83 -0
  326. package/src/util/tracing.ts +184 -18
  327. package/src/util/workspace-port-authentication.ts +1 -1
  328. package/src/workspace-cluster.ts +104 -0
  329. package/src/workspace-instance.ts +52 -14
  330. package/src/wsready.ts +2 -2
  331. package/lib/messaging/connection-error-handler.d.ts +0 -27
  332. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  333. package/lib/messaging/connection-error-handler.js +0 -46
  334. package/lib/messaging/connection-error-handler.js.map +0 -1
  335. package/lib/util/repeater.d.ts +0 -22
  336. package/lib/util/repeater.d.ts.map +0 -1
  337. package/lib/util/repeater.js +0 -118
  338. package/lib/util/repeater.js.map +0 -1
  339. package/lib/util/safe-promise.d.ts +0 -11
  340. package/lib/util/safe-promise.d.ts.map +0 -1
  341. package/lib/util/safe-promise.js +0 -34
  342. package/lib/util/safe-promise.js.map +0 -1
  343. package/lib/util/without.d.ts +0 -7
  344. package/lib/util/without.d.ts.map +0 -1
  345. package/lib/util/without.js.map +0 -1
  346. package/src/messaging/connection-error-handler.ts +0 -62
  347. package/src/util/jaeger-client.d.ts +0 -105
  348. package/src/util/repeater.ts +0 -49
  349. package/src/util/safe-promise.ts +0 -26
@@ -1,18 +1,23 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
4
  * See License-AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import {
8
- User, WorkspaceInfo, WorkspaceCreationResult, UserMessage, WorkspaceInstanceUser,
9
- WhitelistedRepository, WorkspaceImageBuild, AuthProviderInfo, Branding, CreateWorkspaceMode,
10
- Token, UserEnvVarValue, ResolvePluginsParams, PreparePluginUploadParams,
11
- ResolvedPlugins, Configuration, InstallPluginsParams, UninstallPluginParams, UserInfo, GitpodTokenType, GitpodToken, AuthProviderEntry
8
+ User, WorkspaceInfo, WorkspaceCreationResult, WorkspaceInstanceUser,
9
+ WhitelistedRepository, WorkspaceImageBuild, AuthProviderInfo, CreateWorkspaceMode,
10
+ Token, UserEnvVarValue, ResolvePluginsParams, PreparePluginUploadParams, Terms,
11
+ ResolvedPlugins, Configuration, InstallPluginsParams, UninstallPluginParams, UserInfo, GitpodTokenType,
12
+ GitpodToken, AuthProviderEntry, GuessGitTokenScopesParams, GuessedGitTokenScopes, ProjectEnvVar
12
13
  } from './protocol';
14
+ import {
15
+ Team, TeamMemberInfo,
16
+ TeamMembershipInvite, Project, TeamMemberRole, PrebuildWithStatus, StartPrebuildResult, PartialProject
17
+ } from './teams-projects-protocol';
13
18
  import { JsonRpcProxy, JsonRpcServer } from './messaging/proxy-factory';
14
19
  import { Disposable, CancellationTokenSource } from 'vscode-jsonrpc';
15
- import { HeadlessLogEvent } from './headless-workspace-log';
20
+ import { HeadlessLogUrls } from './headless-workspace-log';
16
21
  import { WorkspaceInstance, WorkspaceInstancePort, WorkspaceInstancePhase } from './workspace-instance';
17
22
  import { AdminServer } from './admin-protocol';
18
23
  import { GitpodHostUrl } from './util/gitpod-host-url';
@@ -20,11 +25,20 @@ import { WebSocketConnectionProvider } from './messaging/browser/connection';
20
25
  import { PermissionName } from './permission';
21
26
  import { LicenseService } from './license-protocol';
22
27
  import { Emitter } from './util/event';
28
+ import { AccountStatement, CreditAlert } from './accounting-protocol';
29
+ import { GithubUpgradeURL, PlanCoupon } from './payment-protocol';
30
+ import { TeamSubscription, TeamSubscriptionSlot, TeamSubscriptionSlotResolved } from './team-subscription-protocol';
31
+ import { RemotePageMessage, RemoteTrackMessage, RemoteIdentifyMessage } from './analytics';
32
+ import { IDEServer } from './ide-protocol';
33
+ import { InstallationAdminSettings, Data } from './installation-admin-protocol';
23
34
 
24
35
  export interface GitpodClient {
25
36
  onInstanceUpdate(instance: WorkspaceInstance): void;
26
37
  onWorkspaceImageBuildLogs: WorkspaceImageBuild.LogCallback;
27
- onHeadlessWorkspaceLogs(evt: HeadlessLogEvent): void;
38
+
39
+ onPrebuildUpdate(update: PrebuildWithStatus): void;
40
+
41
+ onCreditAlert(creditAlert: CreditAlert): void;
28
42
 
29
43
  //#region propagating reconnection to iframe
30
44
  notifyDidOpenConnection(): void;
@@ -33,17 +47,18 @@ export interface GitpodClient {
33
47
  }
34
48
 
35
49
  export const GitpodServer = Symbol('GitpodServer');
36
- export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer, LicenseService {
50
+ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer, LicenseService, IDEServer {
37
51
  // User related API
38
52
  getLoggedInUser(): Promise<User>;
53
+ getTerms(): Promise<Terms>;
39
54
  updateLoggedInUser(user: Partial<User>): Promise<User>;
40
55
  getAuthProviders(): Promise<AuthProviderInfo[]>;
41
56
  getOwnAuthProviders(): Promise<AuthProviderEntry[]>;
42
- updateOwnAuthProvider(params: GitpodServer.UpdateOwnAuthProviderParams): Promise<void>;
57
+ updateOwnAuthProvider(params: GitpodServer.UpdateOwnAuthProviderParams): Promise<AuthProviderEntry>;
43
58
  deleteOwnAuthProvider(params: GitpodServer.DeleteOwnAuthProviderParams): Promise<void>;
44
- getBranding(): Promise<Branding>;
45
59
  getConfiguration(): Promise<Configuration>;
46
60
  getToken(query: GitpodServer.GetTokenSearchOptions): Promise<Token | undefined>;
61
+ getGitpodTokenScopes(tokenHash: string): Promise<string[]>;
47
62
  /**
48
63
  * @deprecated
49
64
  */
@@ -57,8 +72,15 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
57
72
  getWorkspaceOwner(workspaceId: string): Promise<UserInfo | undefined>;
58
73
  getWorkspaceUsers(workspaceId: string): Promise<WorkspaceInstanceUser[]>;
59
74
  getFeaturedRepositories(): Promise<WhitelistedRepository[]>;
75
+ getSuggestedContextURLs(): Promise<string[]>;
76
+ /**
77
+ * **Security:**
78
+ * Sensitive information like an owner token is erased, since it allows access for all team members.
79
+ * If you need to access an owner token use `getOwnerToken` instead.
80
+ */
60
81
  getWorkspace(id: string): Promise<WorkspaceInfo>;
61
82
  isWorkspaceOwner(workspaceId: string): Promise<boolean>;
83
+ getOwnerToken(workspaceId: string): Promise<string>;
62
84
 
63
85
  /**
64
86
  * Creates and starts a workspace for the given context URL.
@@ -75,8 +97,8 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
75
97
  updateWorkspaceUserPin(id: string, action: GitpodServer.PinAction): Promise<void>;
76
98
  sendHeartBeat(options: GitpodServer.SendHeartBeatOptions): Promise<void>;
77
99
  watchWorkspaceImageBuildLogs(workspaceId: string): Promise<void>;
78
- watchHeadlessWorkspaceLogs(workspaceId: string): Promise<void>;
79
100
  isPrebuildDone(pwsid: string): Promise<boolean>;
101
+ getHeadlessLog(instanceId: string): Promise<HeadlessLogUrls>;
80
102
 
81
103
  // Workspace timeout
82
104
  setWorkspaceTimeout(workspaceId: string, duration: WorkspaceTimeoutDuration): Promise<SetWorkspaceTimeoutResult>;
@@ -90,19 +112,56 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
90
112
  openPort(workspaceId: string, port: WorkspaceInstancePort): Promise<WorkspaceInstancePort | undefined>;
91
113
  closePort(workspaceId: string, port: number): Promise<void>;
92
114
 
93
- // User messages
94
- getUserMessages(options: GitpodServer.GetUserMessagesOptions): Promise<UserMessage[]>;
95
- updateUserMessages(options: GitpodServer.UpdateUserMessagesOptions): Promise<void>;
96
-
97
115
  // User storage
98
116
  getUserStorageResource(options: GitpodServer.GetUserStorageResourceOptions): Promise<string>;
99
117
  updateUserStorageResource(options: GitpodServer.UpdateUserStorageResourceOptions): Promise<void>;
100
118
 
101
- // user env vars
119
+ // User env vars
102
120
  getEnvVars(): Promise<UserEnvVarValue[]>;
121
+ getAllEnvVars(): Promise<UserEnvVarValue[]>;
103
122
  setEnvVar(variable: UserEnvVarValue): Promise<void>;
104
123
  deleteEnvVar(variable: UserEnvVarValue): Promise<void>;
105
124
 
125
+ // Teams
126
+ getTeams(): Promise<Team[]>;
127
+ getTeamMembers(teamId: string): Promise<TeamMemberInfo[]>;
128
+ createTeam(name: string): Promise<Team>;
129
+ joinTeam(inviteId: string): Promise<Team>;
130
+ setTeamMemberRole(teamId: string, userId: string, role: TeamMemberRole): Promise<void>;
131
+ removeTeamMember(teamId: string, userId: string): Promise<void>;
132
+ getGenericInvite(teamId: string): Promise<TeamMembershipInvite>;
133
+ resetGenericInvite(inviteId: string): Promise<TeamMembershipInvite>;
134
+ deleteTeam(teamId: string, userId: string): Promise<void>;
135
+
136
+ // Admin Settings
137
+ adminGetSettings(): Promise<InstallationAdminSettings>;
138
+ adminUpdateSettings(settings: InstallationAdminSettings): Promise<void>;
139
+ adminGetTelemetryData(): Promise<Data>;
140
+
141
+ // Projects
142
+ getProviderRepositoriesForUser(params: GetProviderRepositoriesParams): Promise<ProviderRepository[]>;
143
+ createProject(params: CreateProjectParams): Promise<Project>;
144
+ deleteProject(projectId: string): Promise<void>;
145
+ getTeamProjects(teamId: string): Promise<Project[]>;
146
+ getUserProjects(): Promise<Project[]>;
147
+ getProjectOverview(projectId: string): Promise<Project.Overview | undefined>;
148
+ findPrebuilds(params: FindPrebuildsParams): Promise<PrebuildWithStatus[]>;
149
+ triggerPrebuild(projectId: string, branchName: string | null): Promise<StartPrebuildResult>;
150
+ cancelPrebuild(projectId: string, prebuildId: string): Promise<void>;
151
+ fetchProjectRepositoryConfiguration(projectId: string): Promise<string | undefined>;
152
+ guessProjectConfiguration(projectId: string): Promise<string | undefined>;
153
+ fetchRepositoryConfiguration(cloneUrl: string): Promise<string | undefined>;
154
+ guessRepositoryConfiguration(cloneUrl: string): Promise<string | undefined>;
155
+ setProjectConfiguration(projectId: string, configString: string): Promise<void>;
156
+ updateProjectPartial(partialProject: PartialProject): Promise<void>;
157
+ setProjectEnvironmentVariable(projectId: string, name: string, value: string, censored: boolean): Promise<void>;
158
+ getProjectEnvironmentVariables(projectId: string): Promise<ProjectEnvVar[]>;
159
+ deleteProjectEnvironmentVariable(variableId: string): Promise<void>;
160
+
161
+ // content service
162
+ getContentBlobUploadUrl(name: string): Promise<string>
163
+ getContentBlobDownloadUrl(name: string): Promise<string>
164
+
106
165
  // Gitpod token
107
166
  getGitpodTokens(): Promise<GitpodToken[]>;
108
167
  generateNewGitpodToken(options: GitpodServer.GenerateNewGitpodTokenOptions): Promise<string>;
@@ -113,10 +172,15 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
113
172
  registerGithubApp(installationId: string): Promise<void>;
114
173
 
115
174
  /**
116
- * Stores a new snapshot for the given workspace and bucketId
175
+ * Stores a new snapshot for the given workspace and bucketId. Returns _before_ the actual snapshot is done. To wait for that, use `waitForSnapshot`.
117
176
  * @return the snapshot id
118
177
  */
119
178
  takeSnapshot(options: GitpodServer.TakeSnapshotOptions): Promise<string>;
179
+ /**
180
+ *
181
+ * @param snapshotId
182
+ */
183
+ waitForSnapshot(snapshotId: string): Promise<void>;
120
184
 
121
185
  /**
122
186
  * Returns the list of snapshots that exist for a workspace.
@@ -141,6 +205,105 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
141
205
  resolvePlugins(workspaceId: string, params: ResolvePluginsParams): Promise<ResolvedPlugins>;
142
206
  installUserPlugins(params: InstallPluginsParams): Promise<boolean>;
143
207
  uninstallUserPlugin(params: UninstallPluginParams): Promise<boolean>;
208
+
209
+ guessGitTokenScopes(params: GuessGitTokenScopesParams): Promise<GuessedGitTokenScopes>;
210
+
211
+ /**
212
+ * gitpod.io concerns
213
+ */
214
+ isStudent(): Promise<boolean>;
215
+ /**
216
+ *
217
+ */
218
+ getAccountStatement(options: GitpodServer.GetAccountStatementOptions): Promise<AccountStatement | undefined>;
219
+ getRemainingUsageHours(): Promise<number>;
220
+
221
+ /**
222
+ *
223
+ */
224
+ getChargebeeSiteId(): Promise<string>;
225
+ createPortalSession(): Promise<{}>;
226
+ checkout(planId: string, planQuantity?: number): Promise<{}>;
227
+ getAvailableCoupons(): Promise<PlanCoupon[]>;
228
+ getAppliedCoupons(): Promise<PlanCoupon[]>;
229
+
230
+ getShowPaymentUI(): Promise<boolean>;
231
+ isChargebeeCustomer(): Promise<boolean>;
232
+
233
+ subscriptionUpgradeTo(subscriptionId: string, chargebeePlanId: string): Promise<void>;
234
+ subscriptionDowngradeTo(subscriptionId: string, chargebeePlanId: string): Promise<void>;
235
+ subscriptionCancel(subscriptionId: string): Promise<void>;
236
+ subscriptionCancelDowngrade(subscriptionId: string): Promise<void>;
237
+
238
+ tsGet(): Promise<TeamSubscription[]>;
239
+ tsGetSlots(): Promise<TeamSubscriptionSlotResolved[]>;
240
+ tsGetUnassignedSlot(teamSubscriptionId: string): Promise<TeamSubscriptionSlot | undefined>
241
+ tsAddSlots(teamSubscriptionId: string, quantity: number): Promise<void>;
242
+ tsAssignSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string, identityStr: string | undefined): Promise<void>
243
+ tsReassignSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string, newIdentityStr: string): Promise<void>;
244
+ tsDeactivateSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string): Promise<void>;
245
+ tsReactivateSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string): Promise<void>;
246
+
247
+ getGithubUpgradeUrls(): Promise<GithubUpgradeURL[]>;
248
+
249
+ /**
250
+ * Analytics
251
+ */
252
+ trackEvent(event: RemoteTrackMessage): Promise<void>;
253
+ trackLocation(event: RemotePageMessage): Promise<void>;
254
+ identifyUser(event: RemoteIdentifyMessage): Promise<void>;
255
+ }
256
+
257
+ export interface RateLimiterError {
258
+ method?: string,
259
+
260
+ /**
261
+ * Retry after this many seconds, earliest.
262
+ * cmp.: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
263
+ */
264
+ retryAfter: number,
265
+ }
266
+
267
+ export interface CreateProjectParams {
268
+ name: string;
269
+ slug?: string;
270
+ account: string;
271
+ provider: string;
272
+ cloneUrl: string;
273
+ teamId?: string;
274
+ userId?: string;
275
+ appInstallationId: string;
276
+ }
277
+ export interface FindPrebuildsParams {
278
+ projectId: string;
279
+ branch?: string;
280
+ latest?: boolean;
281
+ prebuildId?: string;
282
+ // default: 30
283
+ limit?: number;
284
+ }
285
+ export interface GetProviderRepositoriesParams {
286
+ provider: string;
287
+ hints?: { installationId: string } | object;
288
+ }
289
+ export interface ProviderRepository {
290
+ name: string;
291
+ path?: string;
292
+ account: string;
293
+ accountAvatarUrl: string;
294
+ cloneUrl: string;
295
+ updatedAt: string;
296
+ installationId?: number;
297
+ installationUpdatedAt?: string;
298
+
299
+ inUse?: { userName: string };
300
+ }
301
+
302
+ export interface ClientHeaderFields {
303
+ ip?: string;
304
+ userAgent?: string;
305
+ dnt?: string;
306
+ clientRegion?: string;
144
307
  }
145
308
 
146
309
  export const WorkspaceTimeoutValues = ["30m", "60m", "180m"] as const;
@@ -153,6 +316,7 @@ export const createServerMock = function <C extends GitpodClient, S extends Gitp
153
316
  methods.setClient = methods.setClient || (() => { });
154
317
  methods.dispose = methods.dispose || (() => { });
155
318
  return new Proxy<JsonRpcProxy<S>>(methods as any as JsonRpcProxy<S>, {
319
+ // @ts-ignore
156
320
  get: (target: S, property: keyof S) => {
157
321
  const result = target[property];
158
322
  if (!result) {
@@ -185,6 +349,8 @@ export namespace GitpodServer {
185
349
  limit?: number;
186
350
  searchString?: string;
187
351
  pinnedOnly?: boolean;
352
+ projectId?: string | string[];
353
+ includeWithoutProject?: boolean;
188
354
  }
189
355
  export interface GetAccountStatementOptions {
190
356
  date?: string;
@@ -192,6 +358,7 @@ export namespace GitpodServer {
192
358
  export interface CreateWorkspaceOptions {
193
359
  contextUrl: string;
194
360
  mode?: CreateWorkspaceMode;
361
+ forceDefaultConfig?: boolean;
195
362
  }
196
363
  export interface StartWorkspaceOptions {
197
364
  forceDefaultImage: boolean;
@@ -199,13 +366,8 @@ export namespace GitpodServer {
199
366
  export interface TakeSnapshotOptions {
200
367
  workspaceId: string;
201
368
  layoutData?: string;
202
- }
203
- export interface GetUserMessagesOptions {
204
- readonly releaseNotes?: boolean;
205
- readonly workspaceInstanceId: string;
206
- }
207
- export interface UpdateUserMessagesOptions {
208
- readonly messageIds: string[];
369
+ /* this is here to enable backwards-compatibility and untangling rollout between workspace, IDE and meta */
370
+ dontWait?: boolean;
209
371
  }
210
372
  export interface GetUserStorageResourceOptions {
211
373
  readonly uri: string;
@@ -247,10 +409,12 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
247
409
 
248
410
  public registerClient(client: Partial<Client>): Disposable {
249
411
  this.clients.push(client);
250
- const index = this.clients.length;
251
412
  return {
252
413
  dispose: () => {
253
- this.clients.slice(index, 1);
414
+ const index = this.clients.indexOf(client);
415
+ if (index > -1) {
416
+ this.clients.splice(index, 1);
417
+ }
254
418
  }
255
419
  }
256
420
  }
@@ -267,11 +431,11 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
267
431
  }
268
432
  }
269
433
 
270
- onWorkspaceImageBuildLogs(info: WorkspaceImageBuild.StateInfo, content: WorkspaceImageBuild.LogContent | undefined): void {
434
+ onPrebuildUpdate(update: PrebuildWithStatus): void {
271
435
  for (const client of this.clients) {
272
- if (client.onWorkspaceImageBuildLogs) {
436
+ if (client.onPrebuildUpdate) {
273
437
  try {
274
- client.onWorkspaceImageBuildLogs(info, content);
438
+ client.onPrebuildUpdate(update);
275
439
  } catch (error) {
276
440
  console.error(error)
277
441
  }
@@ -279,11 +443,11 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
279
443
  }
280
444
  }
281
445
 
282
- onHeadlessWorkspaceLogs(evt: HeadlessLogEvent): void {
446
+ onWorkspaceImageBuildLogs(info: WorkspaceImageBuild.StateInfo, content: WorkspaceImageBuild.LogContent | undefined): void {
283
447
  for (const client of this.clients) {
284
- if (client.onHeadlessWorkspaceLogs) {
448
+ if (client.onWorkspaceImageBuildLogs) {
285
449
  try {
286
- client.onHeadlessWorkspaceLogs(evt);
450
+ client.onWorkspaceImageBuildLogs(info, content);
287
451
  } catch (error) {
288
452
  console.error(error)
289
453
  }
@@ -315,6 +479,18 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
315
479
  }
316
480
  }
317
481
 
482
+ onCreditAlert(creditAlert: CreditAlert): void {
483
+ for (const client of this.clients) {
484
+ if (client.onCreditAlert) {
485
+ try {
486
+ client.onCreditAlert(creditAlert);
487
+ } catch (error) {
488
+ console.error(error)
489
+ }
490
+ }
491
+ }
492
+ }
493
+
318
494
  }
319
495
 
320
496
  export type GitpodService = GitpodServiceImpl<GitpodClient, GitpodServer>;
@@ -335,7 +511,7 @@ export class WorkspaceInstanceUpdateListener {
335
511
  private readonly onDidChangeEmitter = new Emitter<void>();
336
512
  readonly onDidChange = this.onDidChangeEmitter.event;
337
513
 
338
- private source: 'sync' | 'update' = 'sync';
514
+ private source: 'sync' | 'update' = 'sync';
339
515
 
340
516
  get info(): WorkspaceInfo {
341
517
  return this._info;
@@ -427,11 +603,15 @@ export class WorkspaceInstanceUpdateListener {
427
603
 
428
604
  }
429
605
 
606
+ export interface GitpodServiceOptions {
607
+ onReconnect?: () => (void | Promise<void>)
608
+ }
609
+
430
610
  export class GitpodServiceImpl<Client extends GitpodClient, Server extends GitpodServer> {
431
611
 
432
612
  private readonly compositeClient = new GitpodCompositeClient<Client>();
433
613
 
434
- constructor(public readonly server: JsonRpcProxy<Server>) {
614
+ constructor(public readonly server: JsonRpcProxy<Server>, private options?: GitpodServiceOptions) {
435
615
  server.setClient(this.compositeClient);
436
616
  server.onDidOpenConnection(() => this.compositeClient.notifyDidOpenConnection());
437
617
  server.onDidCloseConnection(() => this.compositeClient.notifyDidCloseConnection());
@@ -451,13 +631,34 @@ export class GitpodServiceImpl<Client extends GitpodClient, Server extends Gitpo
451
631
  this.instanceListeners.set(workspaceId, listener);
452
632
  return listener;
453
633
  }
634
+
635
+ async reconnect(): Promise<void> {
636
+ if (this.options?.onReconnect) {
637
+ await this.options.onReconnect();
638
+ }
639
+ }
454
640
  }
455
641
 
456
- export function createGitpodService<C extends GitpodClient, S extends GitpodServer>(serverUrl: string) {
457
- const url = new GitpodHostUrl(serverUrl)
458
- .asWebsocket()
459
- .withApi({ pathname: GitpodServerPath });
642
+ export function createGitpodService<C extends GitpodClient, S extends GitpodServer>(serverUrl: string | Promise<string>) {
643
+ const toWsUrl = (serverUrl: string) => {
644
+ return new GitpodHostUrl(serverUrl)
645
+ .asWebsocket()
646
+ .withApi({ pathname: GitpodServerPath })
647
+ .toString();
648
+ };
649
+ let url: string | Promise<string>;
650
+ if (typeof serverUrl === "string") {
651
+ url = toWsUrl(serverUrl);
652
+ } else {
653
+ url = serverUrl.then(url => toWsUrl(url));
654
+ }
655
+
460
656
  const connectionProvider = new WebSocketConnectionProvider();
461
- const gitpodServer = connectionProvider.createProxy<S>(url.toString());
462
- return new GitpodServiceImpl<C, S>(gitpodServer);
657
+ let onReconnect = () => { };
658
+ const gitpodServer = connectionProvider.createProxy<S>(url, undefined, {
659
+ onListening: socket => {
660
+ onReconnect = () => socket.reconnect();
661
+ }
662
+ });
663
+ return new GitpodServiceImpl<C, S>(gitpodServer, { onReconnect });
463
664
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
4
  * See License-AGPL.txt in the project root for license information.
5
5
  */
@@ -22,21 +22,17 @@ export namespace HeadlessWorkspaceEventType {
22
22
  }
23
23
  }
24
24
 
25
- export interface HeadlessLogEvent {
25
+ export interface HeadlessWorkspaceEvent {
26
26
  workspaceID: string;
27
27
  text: string;
28
28
  type: HeadlessWorkspaceEventType;
29
29
  }
30
30
 
31
- export enum TheiaHeadlessLogType {
32
- TaskLogLabel = "workspaceTaskOutput",
33
- TaskFailedLabel = "workspaceTaskFailed",
34
- TaskSuccessfulLabel = "workspaceTaskDone"
31
+ export interface HeadlessLogUrls {
32
+ // A map of id to URL
33
+ streams: { [streamID: string]: string };
35
34
  }
36
35
 
37
- export interface TheiaHeadlessLogMessage {
38
- type: TheiaHeadlessLogType;
39
- data?: string;
40
- error?: string;
41
- snapshotURL?: string;
42
- }
36
+ /** cmp. @const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX */
37
+ export const HEADLESS_LOG_STREAM_STATUS_CODE = "X-LogStream-StatusCode";
38
+ export const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX = /X-LogStream-StatusCode: ([0-9]{3})/;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
4
  * See License-AGPL.txt in the project root for license information.
5
5
  */
@@ -7,10 +7,14 @@
7
7
  import { Event } from "./util/event";
8
8
  import { Disposable } from "./util/disposable";
9
9
 
10
- export type IDEFrontendState = 'init' | 'ready' | 'terminated';
10
+ export type IDEFrontendState = 'init' | 'ready' | 'terminated';
11
11
 
12
12
  export interface IDEFrontendService {
13
13
  readonly state: IDEFrontendState;
14
+ /**
15
+ * A cause of the ide frontend application failure when state is terminated.
16
+ */
17
+ readonly failureCause?: Error;
14
18
  readonly onDidChange: Event<void>;
15
19
  /**
16
20
  * Starts the ide frontend application.
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Copyright (c) 2021 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
+ /**
8
+ * `IDEServer` provides a list of available IDEs.
9
+ */
10
+ export interface IDEServer {
11
+ /**
12
+ * Returns the IDE preferences.
13
+ */
14
+ getIDEOptions(): Promise<IDEOptions>;
15
+ }
16
+
17
+ export interface IDEOptions {
18
+ /**
19
+ * A list of available IDEs.
20
+ */
21
+ options: { [key: string]: IDEOption };
22
+
23
+ /**
24
+ * The default (browser) IDE when the user has not specified one.
25
+ */
26
+ defaultIde: string;
27
+
28
+ /**
29
+ * The default desktop IDE when the user has not specified one.
30
+ */
31
+ defaultDesktopIde: string;
32
+
33
+ /**
34
+ * Client specific IDE options.
35
+ */
36
+ clients?: { [id: string]: IDEClient };
37
+ }
38
+
39
+ export interface IDEClient {
40
+ /**
41
+ * The default desktop IDE when the user has not specified one.
42
+ */
43
+ defaultDesktopIDE?: string;
44
+
45
+ /**
46
+ * Desktop IDEs supported by the client.
47
+ */
48
+ desktopIDEs?: string[]
49
+
50
+ /**
51
+ * Steps to install the client on user machine.
52
+ */
53
+ installationSteps?: string[]
54
+ }
55
+
56
+ export interface IDEOption {
57
+ /**
58
+ * To ensure a stable order one can set an `orderKey`.
59
+ */
60
+ orderKey?: string;
61
+
62
+ /**
63
+ * Human readable title text of the IDE (plain text only).
64
+ */
65
+ title: string;
66
+
67
+ /**
68
+ * The type of the IDE, currently 'browser' or 'desktop'.
69
+ */
70
+ type: 'browser' | 'desktop';
71
+
72
+ /**
73
+ * The logo for the IDE. That could be a key in (see
74
+ * components/dashboard/src/images/ideLogos.ts) or a URL.
75
+ */
76
+ logo: string;
77
+
78
+ /**
79
+ * Text of an optional tooltip (plain text only).
80
+ */
81
+ tooltip?: string;
82
+
83
+ /**
84
+ * Text of an optional label next to the IDE option like “Insiders” (plain
85
+ * text only).
86
+ */
87
+ label?: string;
88
+
89
+ /**
90
+ * Notes to the IDE option that are renderd in the preferences when a user
91
+ * chooses this IDE.
92
+ */
93
+ notes?: string[];
94
+
95
+ /**
96
+ * If `true` this IDE option is not visible in the IDE preferences.
97
+ */
98
+ hidden?: boolean;
99
+
100
+ /**
101
+ * The image ref to the IDE image.
102
+ */
103
+ image: string;
104
+
105
+ /**
106
+ * The latest image ref to the IDE image, this image ref always resolve to digest.
107
+ */
108
+ latestImage?: string;
109
+
110
+ /**
111
+ * When this is `true`, the tag of this image is resolved to the latest
112
+ * image digest regularly.
113
+ *
114
+ * This is useful if this image points to a tag like `nightly` that will be
115
+ * updated regularly. When `resolveImageDigest` is `true`, we make sure that
116
+ * we resolve the tag regularly to the most recent image version.
117
+ */
118
+ resolveImageDigest?: boolean;
119
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
4
  * See License-AGPL.txt in the project root for license information.
5
5
  */
@@ -13,4 +13,10 @@ export * from './license-protocol';
13
13
  export * from './workspace-instance';
14
14
  export * from './permission';
15
15
  export * from './admin-protocol';
16
- export * from './email-protocol';
16
+ export * from './email-protocol';
17
+ export * from './headless-workspace-log';
18
+ export * from './context-url';
19
+ export * from './teams-projects-protocol';
20
+ export * from './snapshot-url';
21
+ export * from './oss-allowlist';
22
+ export * from './installation-admin-protocol';