@gitpod/gitpod-protocol 0.1.5-procmount.0 → 0.1.5-protected-secrets.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 (422) hide show
  1. package/data/gitpod-schema.json +149 -29
  2. package/lib/accounting-protocol.d.ts +163 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -0
  4. package/lib/accounting-protocol.js +111 -0
  5. package/lib/accounting-protocol.js.map +1 -0
  6. package/lib/admin-protocol.d.ts +39 -4
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js +15 -0
  9. package/lib/admin-protocol.js.map +1 -1
  10. package/lib/analytics.d.ts +44 -0
  11. package/lib/analytics.d.ts.map +1 -0
  12. package/lib/analytics.js +10 -0
  13. package/lib/analytics.js.map +1 -0
  14. package/lib/attribution.d.ts +23 -0
  15. package/lib/attribution.d.ts.map +1 -0
  16. package/lib/attribution.js +50 -0
  17. package/lib/attribution.js.map +1 -0
  18. package/lib/auth.d.ts.map +1 -1
  19. package/lib/billing-mode.d.ts +43 -0
  20. package/lib/billing-mode.d.ts.map +1 -0
  21. package/lib/billing-mode.js +44 -0
  22. package/lib/billing-mode.js.map +1 -0
  23. package/lib/blocked-repositories-protocol.d.ts +13 -0
  24. package/lib/blocked-repositories-protocol.d.ts.map +1 -0
  25. package/lib/blocked-repositories-protocol.js +8 -0
  26. package/lib/blocked-repositories-protocol.js.map +1 -0
  27. package/lib/context-url.d.ts +31 -0
  28. package/lib/context-url.d.ts.map +1 -0
  29. package/lib/context-url.js +102 -0
  30. package/lib/context-url.js.map +1 -0
  31. package/lib/context-url.spec.d.ts +14 -0
  32. package/lib/context-url.spec.d.ts.map +1 -0
  33. package/lib/context-url.spec.js +109 -0
  34. package/lib/context-url.spec.js.map +1 -0
  35. package/lib/encryption/container-module.d.ts.map +1 -1
  36. package/lib/encryption/container-module.js +5 -4
  37. package/lib/encryption/container-module.js.map +1 -1
  38. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  39. package/lib/encryption/encryption-engine.js +25 -26
  40. package/lib/encryption/encryption-engine.js.map +1 -1
  41. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  42. package/lib/encryption/encryption-engine.spec.js +29 -37
  43. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  44. package/lib/encryption/encryption-service.d.ts.map +1 -1
  45. package/lib/encryption/encryption-service.js +30 -44
  46. package/lib/encryption/encryption-service.js.map +1 -1
  47. package/lib/encryption/key-provider.d.ts.map +1 -1
  48. package/lib/encryption/key-provider.js +31 -38
  49. package/lib/encryption/key-provider.js.map +1 -1
  50. package/lib/env.d.ts +0 -6
  51. package/lib/env.d.ts.map +1 -1
  52. package/lib/env.js +7 -27
  53. package/lib/env.js.map +1 -1
  54. package/lib/experiments/always-default.d.ts +8 -0
  55. package/lib/experiments/always-default.d.ts.map +1 -0
  56. package/lib/experiments/always-default.js +20 -0
  57. package/lib/experiments/always-default.js.map +1 -0
  58. package/lib/experiments/configcat-server.d.ts +10 -0
  59. package/lib/experiments/configcat-server.d.ts.map +1 -0
  60. package/lib/experiments/configcat-server.js +36 -0
  61. package/lib/experiments/configcat-server.js.map +1 -0
  62. package/lib/experiments/configcat.d.ts +21 -0
  63. package/lib/experiments/configcat.d.ts.map +1 -0
  64. package/lib/experiments/configcat.js +51 -0
  65. package/lib/experiments/configcat.js.map +1 -0
  66. package/lib/experiments/types.d.ts +22 -0
  67. package/lib/experiments/types.d.ts.map +1 -0
  68. package/lib/experiments/types.js +10 -0
  69. package/lib/experiments/types.js.map +1 -0
  70. package/lib/gitpod-file-parser.d.ts.map +1 -1
  71. package/lib/gitpod-file-parser.js +26 -42
  72. package/lib/gitpod-file-parser.js.map +1 -1
  73. package/lib/gitpod-file-parser.spec.js +145 -142
  74. package/lib/gitpod-file-parser.spec.js.map +1 -1
  75. package/lib/gitpod-service.d.ts +195 -39
  76. package/lib/gitpod-service.d.ts.map +1 -1
  77. package/lib/gitpod-service.js +204 -271
  78. package/lib/gitpod-service.js.map +1 -1
  79. package/lib/headless-workspace-log.d.ts +9 -11
  80. package/lib/headless-workspace-log.d.ts.map +1 -1
  81. package/lib/headless-workspace-log.js +6 -8
  82. package/lib/headless-workspace-log.js.map +1 -1
  83. package/lib/ide-frontend-service.d.ts +5 -1
  84. package/lib/ide-frontend-service.d.ts.map +1 -1
  85. package/lib/ide-protocol.d.ts +113 -0
  86. package/lib/ide-protocol.d.ts.map +1 -0
  87. package/lib/{util/without.js → ide-protocol.js} +2 -2
  88. package/lib/ide-protocol.js.map +1 -0
  89. package/lib/index.d.ts +16 -10
  90. package/lib/index.d.ts.map +1 -1
  91. package/lib/index.js +8 -2
  92. package/lib/index.js.map +1 -1
  93. package/lib/installation-admin-protocol.d.ts +30 -0
  94. package/lib/installation-admin-protocol.d.ts.map +1 -0
  95. package/lib/installation-admin-protocol.js +31 -0
  96. package/lib/installation-admin-protocol.js.map +1 -0
  97. package/lib/license-protocol.d.ts +7 -0
  98. package/lib/license-protocol.d.ts.map +1 -1
  99. package/lib/license-protocol.js.map +1 -1
  100. package/lib/messaging/browser/connection.d.ts +5 -3
  101. package/lib/messaging/browser/connection.d.ts.map +1 -1
  102. package/lib/messaging/browser/connection.js +184 -34
  103. package/lib/messaging/browser/connection.js.map +1 -1
  104. package/lib/messaging/browser/window-connection.d.ts +4 -4
  105. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  106. package/lib/messaging/browser/window-connection.js +42 -59
  107. package/lib/messaging/browser/window-connection.js.map +1 -1
  108. package/lib/messaging/client-call-metrics.d.ts +19 -0
  109. package/lib/messaging/client-call-metrics.d.ts.map +1 -0
  110. package/lib/messaging/client-call-metrics.js +82 -0
  111. package/lib/messaging/client-call-metrics.js.map +1 -0
  112. package/lib/messaging/error.d.ts +11 -2
  113. package/lib/messaging/error.d.ts.map +1 -1
  114. package/lib/messaging/error.js +22 -4
  115. package/lib/messaging/error.js.map +1 -1
  116. package/lib/messaging/handler.d.ts +10 -0
  117. package/lib/messaging/handler.d.ts.map +1 -1
  118. package/lib/messaging/handler.js +1 -1
  119. package/lib/messaging/node/connection.d.ts +1 -17
  120. package/lib/messaging/node/connection.d.ts.map +1 -1
  121. package/lib/messaging/node/connection.js +24 -60
  122. package/lib/messaging/node/connection.js.map +1 -1
  123. package/lib/messaging/proxy-factory.d.ts +3 -1
  124. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  125. package/lib/messaging/proxy-factory.js +75 -162
  126. package/lib/messaging/proxy-factory.js.map +1 -1
  127. package/lib/oss-allowlist.d.ts +14 -0
  128. package/lib/oss-allowlist.d.ts.map +1 -0
  129. package/lib/oss-allowlist.js +8 -0
  130. package/lib/oss-allowlist.js.map +1 -0
  131. package/lib/payment-protocol.d.ts +18 -0
  132. package/lib/payment-protocol.d.ts.map +1 -0
  133. package/lib/payment-protocol.js +13 -0
  134. package/lib/payment-protocol.js.map +1 -0
  135. package/lib/permission.d.ts +10 -3
  136. package/lib/permission.d.ts.map +1 -1
  137. package/lib/permission.js +41 -31
  138. package/lib/permission.js.map +1 -1
  139. package/lib/plans.d.ts +211 -0
  140. package/lib/plans.d.ts.map +1 -0
  141. package/lib/plans.js +609 -0
  142. package/lib/plans.js.map +1 -0
  143. package/lib/protocol.d.ts +285 -95
  144. package/lib/protocol.d.ts.map +1 -1
  145. package/lib/protocol.js +383 -206
  146. package/lib/protocol.js.map +1 -1
  147. package/{src/util/without.ts → lib/protocol.spec.d.ts} +2 -3
  148. package/lib/protocol.spec.d.ts.map +1 -0
  149. package/lib/protocol.spec.js +127 -0
  150. package/lib/protocol.spec.js.map +1 -0
  151. package/lib/snapshot-url.d.ts +14 -0
  152. package/lib/snapshot-url.d.ts.map +1 -0
  153. package/lib/snapshot-url.js +26 -0
  154. package/lib/snapshot-url.js.map +1 -0
  155. package/{src/theia-plugins.ts → lib/snapshot-url.spec.d.ts} +2 -6
  156. package/lib/snapshot-url.spec.d.ts.map +1 -0
  157. package/lib/snapshot-url.spec.js +41 -0
  158. package/lib/snapshot-url.spec.js.map +1 -0
  159. package/lib/team-subscription-protocol.d.ts +92 -0
  160. package/lib/team-subscription-protocol.d.ts.map +1 -0
  161. package/lib/team-subscription-protocol.js +78 -0
  162. package/lib/team-subscription-protocol.js.map +1 -0
  163. package/lib/teams-projects-protocol.d.ts +130 -0
  164. package/lib/teams-projects-protocol.d.ts.map +1 -0
  165. package/lib/teams-projects-protocol.js +30 -0
  166. package/lib/teams-projects-protocol.js.map +1 -0
  167. package/lib/typings/globals.d.ts +2 -2
  168. package/lib/typings/globals.d.ts.map +1 -1
  169. package/lib/usage.d.ts +61 -0
  170. package/lib/usage.d.ts.map +1 -0
  171. package/lib/usage.js +14 -0
  172. package/lib/usage.js.map +1 -0
  173. package/lib/util/analytics.d.ts +8 -0
  174. package/lib/util/analytics.d.ts.map +1 -0
  175. package/lib/util/analytics.js +88 -0
  176. package/lib/util/analytics.js.map +1 -0
  177. package/lib/util/async-iterator.d.ts.map +1 -1
  178. package/lib/util/async-iterator.js +57 -135
  179. package/lib/util/async-iterator.js.map +1 -1
  180. package/lib/util/cancelable.js +17 -59
  181. package/lib/util/cancelable.js.map +1 -1
  182. package/lib/util/date-time.js +11 -11
  183. package/lib/util/date-time.js.map +1 -1
  184. package/lib/util/debug-app.d.ts +25 -0
  185. package/lib/util/debug-app.d.ts.map +1 -0
  186. package/lib/util/debug-app.js +100 -0
  187. package/lib/util/debug-app.js.map +1 -0
  188. package/lib/util/deferred.js +10 -12
  189. package/lib/util/deferred.js.map +1 -1
  190. package/lib/util/disposable.d.ts.map +1 -1
  191. package/lib/util/disposable.js +27 -40
  192. package/lib/util/disposable.js.map +1 -1
  193. package/lib/util/event.d.ts.map +1 -1
  194. package/lib/util/event.js +63 -77
  195. package/lib/util/event.js.map +1 -1
  196. package/lib/util/garbage-collected-cache.d.ts +1 -0
  197. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  198. package/lib/util/garbage-collected-cache.js +32 -47
  199. package/lib/util/garbage-collected-cache.js.map +1 -1
  200. package/lib/util/generate-workspace-id.d.ts +6 -1
  201. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  202. package/lib/util/generate-workspace-id.js +469 -502
  203. package/lib/util/generate-workspace-id.js.map +1 -1
  204. package/lib/util/generate-workspace-id.spec.js +68 -78
  205. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  206. package/lib/util/gitpod-cookie.d.ts +20 -0
  207. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  208. package/lib/util/gitpod-cookie.js +41 -0
  209. package/lib/util/gitpod-cookie.js.map +1 -0
  210. package/lib/util/gitpod-host-url.d.ts +4 -2
  211. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  212. package/lib/util/gitpod-host-url.js +126 -109
  213. package/lib/util/gitpod-host-url.js.map +1 -1
  214. package/lib/util/gitpod-host-url.spec.d.ts +7 -1
  215. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  216. package/lib/util/gitpod-host-url.spec.js +113 -31
  217. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  218. package/lib/util/grpc.d.ts +34 -0
  219. package/lib/util/grpc.d.ts.map +1 -0
  220. package/lib/util/grpc.js +90 -0
  221. package/lib/util/grpc.js.map +1 -0
  222. package/lib/util/jaeger-client-types.d.ts +68 -0
  223. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  224. package/lib/{theia-plugins.js → util/jaeger-client-types.js} +1 -1
  225. package/lib/util/jaeger-client-types.js.map +1 -0
  226. package/lib/util/logging.d.ts +49 -33
  227. package/lib/util/logging.d.ts.map +1 -1
  228. package/lib/util/logging.js +132 -129
  229. package/lib/util/logging.js.map +1 -1
  230. package/lib/util/logging.spec.d.ts +7 -0
  231. package/lib/util/logging.spec.d.ts.map +1 -0
  232. package/lib/util/logging.spec.js +52 -0
  233. package/lib/util/logging.spec.js.map +1 -0
  234. package/lib/util/make-link.js +5 -5
  235. package/lib/util/make-link.js.map +1 -1
  236. package/lib/util/nice-grpc.d.ts +9 -0
  237. package/lib/util/nice-grpc.d.ts.map +1 -0
  238. package/lib/util/nice-grpc.js +119 -0
  239. package/lib/util/nice-grpc.js.map +1 -0
  240. package/lib/util/parse-workspace-id.d.ts +10 -0
  241. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  242. package/lib/util/parse-workspace-id.js +31 -7
  243. package/lib/util/parse-workspace-id.js.map +1 -1
  244. package/lib/util/parse-workspace-id.spec.d.ts +4 -0
  245. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  246. package/lib/util/parse-workspace-id.spec.js +123 -84
  247. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  248. package/lib/util/queue.js +16 -55
  249. package/lib/util/queue.js.map +1 -1
  250. package/lib/util/queue.spec.js +147 -288
  251. package/lib/util/queue.spec.js.map +1 -1
  252. package/lib/util/repeat.d.ts +15 -0
  253. package/lib/util/repeat.d.ts.map +1 -0
  254. package/lib/util/repeat.js +55 -0
  255. package/lib/util/repeat.js.map +1 -0
  256. package/lib/util/semaphore.d.ts.map +1 -1
  257. package/lib/util/semaphore.js +15 -46
  258. package/lib/util/semaphore.js.map +1 -1
  259. package/lib/util/skip-if.d.ts.map +1 -1
  260. package/lib/util/skip-if.js +6 -6
  261. package/lib/util/skip-if.js.map +1 -1
  262. package/lib/util/timeutil.d.ts +2 -0
  263. package/lib/util/timeutil.d.ts.map +1 -1
  264. package/lib/util/timeutil.js +41 -17
  265. package/lib/util/timeutil.js.map +1 -1
  266. package/lib/util/timeutil.spec.d.ts +2 -0
  267. package/lib/util/timeutil.spec.d.ts.map +1 -1
  268. package/lib/util/timeutil.spec.js +54 -23
  269. package/lib/util/timeutil.spec.js.map +1 -1
  270. package/lib/util/tracing.d.ts +52 -6
  271. package/lib/util/tracing.d.ts.map +1 -1
  272. package/lib/util/tracing.js +197 -64
  273. package/lib/util/tracing.js.map +1 -1
  274. package/lib/util/tracing.spec.d.ts +7 -0
  275. package/lib/util/tracing.spec.d.ts.map +1 -0
  276. package/lib/util/tracing.spec.js +121 -0
  277. package/lib/util/tracing.spec.js.map +1 -0
  278. package/lib/util/workspace-port-authentication.d.ts +7 -7
  279. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  280. package/lib/util/workspace-port-authentication.js +10 -12
  281. package/lib/util/workspace-port-authentication.js.map +1 -1
  282. package/lib/webhook-event.d.ts +44 -0
  283. package/lib/webhook-event.d.ts.map +1 -0
  284. package/lib/webhook-event.js +8 -0
  285. package/lib/webhook-event.js.map +1 -0
  286. package/lib/workspace-class.d.ts +14 -0
  287. package/lib/workspace-class.d.ts.map +1 -0
  288. package/lib/workspace-class.js +8 -0
  289. package/lib/workspace-class.js.map +1 -0
  290. package/lib/workspace-cluster.d.ts +75 -0
  291. package/lib/workspace-cluster.d.ts.map +1 -0
  292. package/lib/workspace-cluster.js +31 -0
  293. package/lib/workspace-cluster.js.map +1 -0
  294. package/lib/workspace-instance.d.ts +46 -5
  295. package/lib/workspace-instance.d.ts.map +1 -1
  296. package/lib/wsready.d.ts +1 -1
  297. package/lib/wsready.d.ts.map +1 -1
  298. package/lib/wsready.js +2 -2
  299. package/package.json +40 -18
  300. package/pkg-yarn.lock +23 -10
  301. package/provenance-bundle.jsonl +2 -0
  302. package/src/accounting-protocol.ts +244 -0
  303. package/src/admin-protocol.ts +80 -19
  304. package/src/analytics.ts +52 -0
  305. package/src/attribution.ts +59 -0
  306. package/src/auth.ts +2 -2
  307. package/src/billing-mode.ts +81 -0
  308. package/src/blocked-repositories-protocol.ts +13 -0
  309. package/src/context-url.spec.ts +67 -0
  310. package/src/context-url.ts +109 -0
  311. package/src/encryption/container-module.ts +2 -3
  312. package/src/encryption/encryption-engine.spec.ts +9 -8
  313. package/src/encryption/encryption-engine.ts +20 -16
  314. package/src/encryption/encryption-service.ts +4 -5
  315. package/src/encryption/key-provider.ts +16 -19
  316. package/src/env.ts +0 -22
  317. package/src/experiments/always-default.ts +24 -0
  318. package/src/experiments/configcat-server.ts +41 -0
  319. package/src/experiments/configcat.ts +56 -0
  320. package/src/experiments/types.ts +34 -0
  321. package/src/gitpod-file-parser.spec.ts +55 -61
  322. package/src/gitpod-file-parser.ts +16 -17
  323. package/src/gitpod-service.ts +385 -117
  324. package/src/headless-workspace-log.ts +12 -14
  325. package/src/ide-frontend-service.ts +6 -2
  326. package/src/ide-protocol.ts +129 -0
  327. package/src/index.ts +16 -10
  328. package/src/installation-admin-protocol.ts +45 -0
  329. package/src/license-protocol.ts +12 -6
  330. package/src/messaging/browser/connection.ts +197 -18
  331. package/src/messaging/browser/window-connection.ts +39 -29
  332. package/src/messaging/client-call-metrics.ts +77 -0
  333. package/src/messaging/error.ts +32 -7
  334. package/src/messaging/handler.ts +13 -1
  335. package/src/messaging/node/connection.ts +23 -70
  336. package/src/messaging/proxy-factory.ts +35 -34
  337. package/src/oss-allowlist.ts +15 -0
  338. package/src/payment-protocol.ts +20 -0
  339. package/src/permission.ts +42 -33
  340. package/src/plans.ts +683 -0
  341. package/src/protocol.spec.ts +97 -0
  342. package/src/protocol.ts +680 -282
  343. package/src/snapshot-url.spec.ts +27 -0
  344. package/src/snapshot-url.ts +27 -0
  345. package/src/team-subscription-protocol.ts +150 -0
  346. package/src/teams-projects-protocol.ts +166 -0
  347. package/src/typings/globals.ts +4 -4
  348. package/src/usage.ts +71 -0
  349. package/src/util/analytics.ts +109 -0
  350. package/src/util/async-iterator.ts +4 -5
  351. package/src/util/cancelable.ts +3 -3
  352. package/src/util/date-time.ts +8 -8
  353. package/src/util/debug-app.ts +81 -0
  354. package/src/util/deferred.ts +6 -6
  355. package/src/util/disposable.ts +3 -6
  356. package/src/util/event.ts +9 -11
  357. package/src/util/garbage-collected-cache.ts +16 -8
  358. package/src/util/generate-workspace-id.spec.ts +37 -10
  359. package/src/util/generate-workspace-id.ts +464 -438
  360. package/src/util/gitpod-cookie.ts +38 -0
  361. package/src/util/gitpod-host-url.spec.ts +59 -8
  362. package/src/util/gitpod-host-url.ts +72 -39
  363. package/src/util/grpc.ts +104 -0
  364. package/src/util/jaeger-client-types.ts +102 -0
  365. package/src/util/logging.spec.ts +23 -0
  366. package/src/util/logging.ts +156 -74
  367. package/src/util/make-link.ts +6 -7
  368. package/src/util/nice-grpc.ts +93 -0
  369. package/src/util/parse-workspace-id.spec.ts +37 -8
  370. package/src/util/parse-workspace-id.ts +32 -7
  371. package/src/util/queue.spec.ts +28 -26
  372. package/src/util/repeat.ts +45 -0
  373. package/src/util/semaphore.ts +6 -8
  374. package/src/util/skip-if.ts +10 -7
  375. package/src/util/timeutil.spec.ts +40 -14
  376. package/src/util/timeutil.ts +31 -15
  377. package/src/util/tracing.spec.ts +88 -0
  378. package/src/util/tracing.ts +200 -31
  379. package/src/util/workspace-port-authentication.ts +10 -13
  380. package/src/webhook-event.ts +55 -0
  381. package/src/workspace-class.ts +14 -0
  382. package/src/workspace-cluster.ts +109 -0
  383. package/src/workspace-instance.ts +105 -31
  384. package/src/wsready.ts +3 -3
  385. package/data/builtin-theia-plugins.json +0 -372
  386. package/lib/email-protocol.d.ts +0 -50
  387. package/lib/email-protocol.d.ts.map +0 -1
  388. package/lib/email-protocol.js +0 -28
  389. package/lib/email-protocol.js.map +0 -1
  390. package/lib/messaging/connection-error-handler.d.ts +0 -27
  391. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  392. package/lib/messaging/connection-error-handler.js +0 -46
  393. package/lib/messaging/connection-error-handler.js.map +0 -1
  394. package/lib/theia-plugins.d.ts +0 -11
  395. package/lib/theia-plugins.d.ts.map +0 -1
  396. package/lib/theia-plugins.js.map +0 -1
  397. package/lib/util/context-url.d.ts +0 -13
  398. package/lib/util/context-url.d.ts.map +0 -1
  399. package/lib/util/context-url.js +0 -26
  400. package/lib/util/context-url.js.map +0 -1
  401. package/lib/util/context-url.spec.d.ts +0 -10
  402. package/lib/util/context-url.spec.d.ts.map +0 -1
  403. package/lib/util/context-url.spec.js +0 -52
  404. package/lib/util/context-url.spec.js.map +0 -1
  405. package/lib/util/repeater.d.ts +0 -22
  406. package/lib/util/repeater.d.ts.map +0 -1
  407. package/lib/util/repeater.js +0 -118
  408. package/lib/util/repeater.js.map +0 -1
  409. package/lib/util/safe-promise.d.ts +0 -11
  410. package/lib/util/safe-promise.d.ts.map +0 -1
  411. package/lib/util/safe-promise.js +0 -34
  412. package/lib/util/safe-promise.js.map +0 -1
  413. package/lib/util/without.d.ts +0 -7
  414. package/lib/util/without.d.ts.map +0 -1
  415. package/lib/util/without.js.map +0 -1
  416. package/src/email-protocol.ts +0 -67
  417. package/src/messaging/connection-error-handler.ts +0 -62
  418. package/src/util/context-url.spec.ts +0 -25
  419. package/src/util/context-url.ts +0 -23
  420. package/src/util/jaeger-client.d.ts +0 -105
  421. package/src/util/repeater.ts +0 -49
  422. package/src/util/safe-promise.ts +0 -26
package/lib/protocol.d.ts CHANGED
@@ -5,6 +5,8 @@
5
5
  */
6
6
  import { WorkspaceInstance, PortVisibility } from "./workspace-instance";
7
7
  import { RoleOrPermission } from "./permission";
8
+ import { Project } from "./teams-projects-protocol";
9
+ import { AttributionId } from "./attribution";
8
10
  export interface UserInfo {
9
11
  name?: string;
10
12
  }
@@ -18,7 +20,6 @@ export interface User {
18
20
  /** Optional for backwards compatibility */
19
21
  fullName?: string;
20
22
  identities: Identity[];
21
- allowsMarketingCommunication: boolean;
22
23
  /**
23
24
  * Whether the user has been blocked to use our service, because of TOS violation for example.
24
25
  * Optional for backwards compatibility.
@@ -31,26 +32,76 @@ export interface User {
31
32
  /** Whether the user is logical deleted. This flag is respected by all queries in UserDB */
32
33
  markedDeleted?: boolean;
33
34
  additionalData?: AdditionalUserData;
35
+ usageAttributionId?: string;
36
+ lastVerificationTime?: string;
37
+ verificationPhoneNumber?: string;
34
38
  }
35
39
  export declare namespace User {
36
40
  function is(data: any): data is User;
37
41
  function getIdentity(user: User, authProviderId: string): Identity | undefined;
38
42
  function censor(user: User): User;
39
- function getPrimaryEmail(user: User): string;
43
+ /**
44
+ * Returns the stored email or if it doesn't exist returns the primaryEmail of the first identity this user signed up with.
45
+ * @param user
46
+ * @returns A primaryEmail, or undefined if there is none.
47
+ */
48
+ function getPrimaryEmail(user: User): string | undefined;
40
49
  function getName(user: User): string | undefined;
50
+ function hasPreferredIde(user: User): boolean;
51
+ function isOnboardingUser(user: User): boolean;
52
+ function migrationIDESettings(user: User): void;
53
+ function getProfile(user: User): Profile;
54
+ function setProfile(user: User, profile: Profile): User;
55
+ interface Profile {
56
+ name: string;
57
+ email: string;
58
+ company?: string;
59
+ avatarURL?: string;
60
+ }
61
+ namespace Profile {
62
+ function hasChanges(before: Profile, after: Profile): boolean;
63
+ }
41
64
  }
42
65
  export interface AdditionalUserData {
43
66
  platforms?: UserPlatform[];
44
67
  emailNotificationSettings?: EmailNotificationSettings;
45
68
  featurePreview?: boolean;
46
69
  ideSettings?: IDESettings;
70
+ whatsNewSeen?: {
71
+ [key: string]: string;
72
+ };
73
+ oauthClientsApproved?: {
74
+ [key: string]: string;
75
+ };
76
+ knownGitHubOrgs?: string[];
77
+ dotfileRepo?: string;
78
+ workspaceClasses?: WorkspaceClasses;
79
+ profile?: ProfileDetails;
80
+ }
81
+ export declare namespace AdditionalUserData {
82
+ function set(user: User, partialData: Partial<AdditionalUserData>): User;
83
+ }
84
+ export interface ProfileDetails {
85
+ lastUpdatedDetailsNudge?: string;
86
+ companyName?: string;
87
+ emailAddress?: string;
47
88
  }
48
89
  export interface EmailNotificationSettings {
49
- disallowTransactionalEmails?: boolean;
90
+ allowsChangelogMail?: boolean;
91
+ allowsDevXMail?: boolean;
92
+ allowsOnboardingMail?: boolean;
50
93
  }
51
94
  export declare type IDESettings = {
95
+ settingVersion?: string;
52
96
  defaultIde?: string;
97
+ useDesktopIde?: boolean;
98
+ defaultDesktopIde?: string;
99
+ useLatestVersion?: boolean;
53
100
  };
101
+ export interface WorkspaceClasses {
102
+ regular: string;
103
+ prebuild: string;
104
+ }
54
105
  export interface UserPlatform {
55
106
  uid: string;
56
107
  userAgent: string;
@@ -68,44 +119,81 @@ export interface UserPlatform {
68
119
  browserExtensionUninstalledSince?: string;
69
120
  }
70
121
  export interface UserFeatureSettings {
71
- /**
72
- * This field is used as marker to grant users a free trial for using private repositories,
73
- * independent of any subscription or Chargebee.
74
- * - it is set when the user uses their first private repo
75
- * - whether the trial is expired or not is juged by the UserService
76
- */
77
- privateRepoTrialStartDate?: string;
78
122
  /**
79
123
  * Permanent feature flags are added to each and every workspace instance
80
124
  * this user starts.
81
125
  */
82
126
  permanentWSFeatureFlags?: NamedWorkspaceFeatureFlag[];
83
127
  }
128
+ export declare type BillingTier = "paid" | "free";
84
129
  /**
85
130
  * The values of this type MUST MATCH enum values in WorkspaceFeatureFlag from ws-manager/client/core_pb.d.ts
86
131
  * If they don't we'll break things during workspace startup.
87
132
  */
88
133
  export declare const WorkspaceFeatureFlags: {
89
- registry_facade: undefined;
90
134
  full_workspace_backup: undefined;
91
- fixed_resources: undefined;
92
- user_namespace: undefined;
135
+ persistent_volume_claim: undefined;
136
+ workspace_class_limiting: undefined;
137
+ workspace_connection_limiting: undefined;
138
+ workspace_psi: undefined;
93
139
  };
94
- export declare type NamedWorkspaceFeatureFlag = keyof (typeof WorkspaceFeatureFlags);
95
- export interface UserEnvVarValue {
96
- id?: string;
140
+ export declare type NamedWorkspaceFeatureFlag = keyof typeof WorkspaceFeatureFlags;
141
+ export declare namespace NamedWorkspaceFeatureFlag {
142
+ const WORKSPACE_PERSISTED_FEATTURE_FLAGS: NamedWorkspaceFeatureFlag[];
143
+ function isWorkspacePersisted(ff: NamedWorkspaceFeatureFlag): boolean;
144
+ }
145
+ export interface EnvVarWithValue {
97
146
  name: string;
98
- repositoryPattern: string;
99
147
  value: string;
100
148
  }
149
+ export interface ProjectEnvVarWithValue extends EnvVarWithValue {
150
+ id: string;
151
+ projectId: string;
152
+ censored: boolean;
153
+ }
154
+ export declare type ProjectEnvVar = Omit<ProjectEnvVarWithValue, "value">;
155
+ export interface UserEnvVarValue extends EnvVarWithValue {
156
+ id?: string;
157
+ repositoryPattern: string;
158
+ }
101
159
  export interface UserEnvVar extends UserEnvVarValue {
102
160
  id: string;
103
161
  userId: string;
104
162
  deleted?: boolean;
105
163
  }
106
164
  export declare namespace UserEnvVar {
165
+ /**
166
+ * @param variable
167
+ * @returns Either a string containing an error message or undefined.
168
+ */
169
+ function validate(variable: UserEnvVarValue): string | undefined;
107
170
  function normalizeRepoPattern(pattern: string): string;
171
+ function score(value: UserEnvVarValue): number;
108
172
  function filter<T extends UserEnvVarValue>(vars: T[], owner: string, repo: string): T[];
173
+ function splitRepositoryPattern(repositoryPattern: string): string[];
174
+ }
175
+ export interface SSHPublicKeyValue {
176
+ name: string;
177
+ key: string;
178
+ }
179
+ export interface UserSSHPublicKey extends SSHPublicKeyValue {
180
+ id: string;
181
+ key: string;
182
+ userId: string;
183
+ fingerprint: string;
184
+ creationTime: string;
185
+ lastUsedTime?: string;
186
+ }
187
+ export declare type UserSSHPublicKeyValue = Omit<UserSSHPublicKey, "key" | "userId">;
188
+ export declare namespace SSHPublicKeyValue {
189
+ function validate(value: SSHPublicKeyValue): string | undefined;
190
+ function getData(value: SSHPublicKeyValue): {
191
+ type: string;
192
+ key: string;
193
+ email: string | undefined;
194
+ };
195
+ function getFingerprint(value: SSHPublicKeyValue): string;
196
+ const MAXIMUM_KEY_LENGTH = 5;
109
197
  }
110
198
  export interface GitpodToken {
111
199
  /** Hash value (SHA256) of the token (primary key). */
@@ -198,25 +286,31 @@ export interface PendingGithubEvent {
198
286
  creationDate: Date;
199
287
  type: string;
200
288
  event: string;
289
+ deleted: boolean;
201
290
  }
202
291
  export interface Snapshot {
203
292
  id: string;
204
293
  creationTime: string;
294
+ availableTime?: string;
205
295
  originalWorkspaceId: string;
206
296
  bucketId: string;
207
- layoutData?: string;
297
+ state: SnapshotState;
298
+ message?: string;
208
299
  }
209
- export interface LayoutData {
300
+ export interface VolumeSnapshot {
301
+ id: string;
210
302
  workspaceId: string;
211
- lastUpdatedTime: string;
212
- layoutData: string;
303
+ creationTime: string;
304
+ volumeHandle: string;
213
305
  }
306
+ export declare type SnapshotState = "pending" | "available" | "error";
214
307
  export interface Workspace {
215
308
  id: string;
216
309
  creationTime: string;
217
310
  contextURL: string;
218
311
  description: string;
219
312
  ownerId: string;
313
+ projectId?: string;
220
314
  context: WorkspaceContext;
221
315
  config: WorkspaceConfig;
222
316
  /**
@@ -257,7 +351,7 @@ export interface Workspace {
257
351
  basedOnSnapshotId?: string;
258
352
  }
259
353
  export declare type WorkspaceSoftDeletion = "user" | "gc";
260
- export declare type WorkspaceType = "regular" | "prebuild" | "probe";
354
+ export declare type WorkspaceType = "regular" | "prebuild";
261
355
  export declare namespace Workspace {
262
356
  function getFullRepositoryName(ws: Workspace): string | undefined;
263
357
  function getFullRepositoryUrl(ws: Workspace): string | undefined;
@@ -266,33 +360,51 @@ export declare namespace Workspace {
266
360
  function getBranchName(ws: Workspace): string | undefined;
267
361
  function getCommit(ws: Workspace): string | undefined;
268
362
  }
269
- export interface PreparePluginUploadParams {
270
- fullPluginName: string;
363
+ export interface GuessGitTokenScopesParams {
364
+ host: string;
365
+ repoUrl: string;
366
+ gitCommand: string;
367
+ currentToken: GitToken;
368
+ }
369
+ export interface GitToken {
370
+ token: string;
371
+ user: string;
372
+ scopes: string[];
373
+ }
374
+ export interface GuessedGitTokenScopes {
375
+ message?: string;
376
+ scopes?: string[];
271
377
  }
272
- export interface ResolvePluginsParams {
273
- config?: WorkspaceConfig;
274
- builtins?: ResolvedPlugins;
275
- vsxRegistryUrl?: string;
378
+ export interface VSCodeConfig {
379
+ extensions?: string[];
276
380
  }
277
- export interface InstallPluginsParams {
278
- pluginIds: string[];
381
+ export interface JetBrainsConfig {
382
+ intellij?: JetBrainsProductConfig;
383
+ goland?: JetBrainsProductConfig;
384
+ pycharm?: JetBrainsProductConfig;
385
+ phpstorm?: JetBrainsProductConfig;
386
+ rubymine?: JetBrainsProductConfig;
387
+ webstorm?: JetBrainsProductConfig;
279
388
  }
280
- export interface UninstallPluginParams {
281
- pluginId: string;
389
+ export interface JetBrainsProductConfig {
390
+ prebuilds?: JetBrainsPrebuilds;
391
+ vmoptions?: string;
282
392
  }
283
- export declare type ResolvedPluginKind = 'user' | 'workspace' | 'builtin';
284
- export interface ResolvedPlugins {
285
- [pluginId: string]: ResolvedPlugin | undefined;
393
+ export interface JetBrainsPrebuilds {
394
+ version?: "stable" | "latest" | "both";
286
395
  }
287
- export interface ResolvedPlugin {
288
- fullPluginName: string;
396
+ export interface RepositoryCloneInformation {
289
397
  url: string;
290
- kind: ResolvedPluginKind;
398
+ checkoutLocation?: string;
291
399
  }
292
- export interface VSCodeConfig {
293
- extensions?: string[];
400
+ export interface CoreDumpConfig {
401
+ enabled?: boolean;
402
+ softLimit?: number;
403
+ hardLimit?: number;
294
404
  }
295
405
  export interface WorkspaceConfig {
406
+ mainConfiguration?: string;
407
+ additionalRepositories?: RepositoryCloneInformation[];
296
408
  image?: ImageConfig;
297
409
  ports?: PortConfig[];
298
410
  tasks?: TaskConfig[];
@@ -303,15 +415,20 @@ export interface WorkspaceConfig {
303
415
  };
304
416
  github?: GithubAppConfig;
305
417
  vscode?: VSCodeConfig;
418
+ jetbrains?: JetBrainsConfig;
419
+ coreDump?: CoreDumpConfig;
420
+ /** deprecated. Enabled by default **/
421
+ experimentalNetwork?: boolean;
306
422
  /**
307
423
  * Where the config object originates from.
308
424
  *
309
425
  * repo - from the repository
310
426
  * definitly-gp - from github.com/gitpod-io/definitely-gp
311
427
  * derived - computed based on analyzing the repository
428
+ * additional-content - config comes from additional content, usually provided through the project's configuration
312
429
  * default - our static catch-all default config
313
430
  */
314
- _origin?: 'repo' | 'definitely-gp' | 'derived' | 'default';
431
+ _origin?: "repo" | "definitely-gp" | "derived" | "additional-content" | "default";
315
432
  /**
316
433
  * Set of automatically infered feature flags. That's not something the user can set, but
317
434
  * that is set by gitpod at workspace creation time.
@@ -326,7 +443,7 @@ export interface GithubAppPrebuildConfig {
326
443
  branches?: boolean;
327
444
  pullRequests?: boolean;
328
445
  pullRequestsFromForks?: boolean;
329
- addCheck?: boolean;
446
+ addCheck?: boolean | "prevent-merge-on-error";
330
447
  addBadge?: boolean;
331
448
  addLabel?: boolean | string;
332
449
  addComment?: boolean;
@@ -336,9 +453,9 @@ export declare namespace GithubAppPrebuildConfig {
336
453
  }
337
454
  export declare type WorkspaceImageSource = WorkspaceImageSourceDocker | WorkspaceImageSourceReference;
338
455
  export interface WorkspaceImageSourceDocker {
339
- dockerFileHash: string;
340
- dockerFileSource: Commit;
341
456
  dockerFilePath: string;
457
+ dockerFileHash: string;
458
+ dockerFileSource?: Commit;
342
459
  }
343
460
  export declare namespace WorkspaceImageSourceDocker {
344
461
  function is(obj: object): obj is WorkspaceImageSourceDocker;
@@ -350,14 +467,17 @@ export interface WorkspaceImageSourceReference {
350
467
  export declare namespace WorkspaceImageSourceReference {
351
468
  function is(obj: object): obj is WorkspaceImageSourceReference;
352
469
  }
353
- export declare type PrebuiltWorkspaceState = "queued" | "building" | "aborted" | "timeout" | "available";
470
+ export declare type PrebuiltWorkspaceState = "queued" | "building" | "aborted" | "timeout" | "available" | "failed";
354
471
  export interface PrebuiltWorkspace {
355
472
  id: string;
356
473
  cloneURL: string;
474
+ branch?: string;
475
+ projectId?: string;
357
476
  commit: string;
358
477
  buildWorkspaceId: string;
359
478
  creationTime: string;
360
479
  state: PrebuiltWorkspaceState;
480
+ statusVersion: number;
361
481
  error?: string;
362
482
  snapshot?: string;
363
483
  }
@@ -373,6 +493,10 @@ export interface PrebuiltWorkspaceUpdatable {
373
493
  repo: string;
374
494
  isResolved: boolean;
375
495
  installationId: string;
496
+ /**
497
+ * the commitSHA of the commit that triggered the prebuild
498
+ */
499
+ commitSHA?: string;
376
500
  issue?: string;
377
501
  contextUrl?: string;
378
502
  }
@@ -382,11 +506,13 @@ export interface WhitelistedRepository {
382
506
  description?: string;
383
507
  avatar?: string;
384
508
  }
385
- export declare type PortOnOpen = 'open-browser' | 'open-preview' | 'notify' | 'ignore';
509
+ export declare type PortOnOpen = "open-browser" | "open-preview" | "notify" | "ignore";
386
510
  export interface PortConfig {
387
511
  port: number;
388
512
  onOpen?: PortOnOpen;
389
513
  visibility?: PortVisibility;
514
+ description?: string;
515
+ name?: string;
390
516
  }
391
517
  export declare namespace PortConfig {
392
518
  function is(config: any): config is PortConfig;
@@ -405,16 +531,16 @@ export interface TaskConfig {
405
531
  prebuild?: string;
406
532
  command?: string;
407
533
  env?: {
408
- [env: string]: string;
534
+ [env: string]: any;
409
535
  };
410
- openIn?: 'bottom' | 'main' | 'left' | 'right';
411
- openMode?: 'split-top' | 'split-left' | 'split-right' | 'split-bottom' | 'tab-before' | 'tab-after';
536
+ openIn?: "bottom" | "main" | "left" | "right";
537
+ openMode?: "split-top" | "split-left" | "split-right" | "split-bottom" | "tab-before" | "tab-after";
412
538
  }
413
539
  export declare namespace TaskConfig {
414
540
  function is(config: any): config is TaskConfig;
415
541
  }
416
542
  export declare namespace WorkspaceImageBuild {
417
- type Phase = 'BaseImage' | 'GitpodLayer' | 'Error' | 'Done';
543
+ type Phase = "BaseImage" | "GitpodLayer" | "Error" | "Done";
418
544
  interface StateInfo {
419
545
  phase: Phase;
420
546
  currentStep?: number;
@@ -451,8 +577,11 @@ export declare namespace ExternalImageConfigFile {
451
577
  }
452
578
  export interface WorkspaceContext {
453
579
  title: string;
580
+ ref?: string;
581
+ /** This contains the URL portion of the contextURL (which might contain other modifiers as well). It's optional because it's not set for older workspaces. */
454
582
  normalizedContextURL?: string;
455
583
  forceCreateNewWorkspace?: boolean;
584
+ forceImageBuild?: boolean;
456
585
  }
457
586
  export declare namespace WorkspaceContext {
458
587
  function is(context: any): context is WorkspaceContext;
@@ -463,14 +592,24 @@ export interface WithSnapshot {
463
592
  export declare namespace WithSnapshot {
464
593
  function is(context: any): context is WithSnapshot;
465
594
  }
466
- export interface WithPrebuild {
467
- snapshotBucketId: string;
595
+ export interface WithPrebuild extends WithSnapshot {
468
596
  prebuildWorkspaceId: string;
469
597
  wasPrebuilt: true;
470
598
  }
471
599
  export declare namespace WithPrebuild {
472
600
  function is(context: any): context is WithPrebuild;
473
601
  }
602
+ /**
603
+ * WithDefaultConfig contexts disable the download of the gitpod.yml from the repository
604
+ * and fall back to the built-in configuration.
605
+ */
606
+ export interface WithDefaultConfig {
607
+ withDefaultConfig: true;
608
+ }
609
+ export declare namespace WithDefaultConfig {
610
+ function is(context: any): context is WithDefaultConfig;
611
+ function mark(ctx: WorkspaceContext): WorkspaceContext & WithDefaultConfig;
612
+ }
474
613
  export interface SnapshotContext extends WorkspaceContext, WithSnapshot {
475
614
  snapshotId: string;
476
615
  }
@@ -479,6 +618,13 @@ export declare namespace SnapshotContext {
479
618
  }
480
619
  export interface StartPrebuildContext extends WorkspaceContext {
481
620
  actual: WorkspaceContext;
621
+ commitHistory?: string[];
622
+ additionalRepositoryCommitHistories?: {
623
+ cloneUrl: string;
624
+ commitHistory: string[];
625
+ }[];
626
+ project?: Project;
627
+ branch?: string;
482
628
  }
483
629
  export declare namespace StartPrebuildContext {
484
630
  function is(context: any): context is StartPrebuildContext;
@@ -491,19 +637,19 @@ export interface PrebuiltWorkspaceContext extends WorkspaceContext {
491
637
  export declare namespace PrebuiltWorkspaceContext {
492
638
  function is(context: any): context is PrebuiltWorkspaceContext;
493
639
  }
640
+ export interface WithReferrerContext extends WorkspaceContext {
641
+ referrer: string;
642
+ referrerIde?: string;
643
+ }
644
+ export declare namespace WithReferrerContext {
645
+ function is(context: any): context is WithReferrerContext;
646
+ }
494
647
  export interface WithEnvvarsContext extends WorkspaceContext {
495
- envvars: UserEnvVarValue[];
648
+ envvars: EnvVarWithValue[];
496
649
  }
497
650
  export declare namespace WithEnvvarsContext {
498
651
  function is(context: any): context is WithEnvvarsContext;
499
652
  }
500
- export interface WorkspaceProbeContext extends WorkspaceContext {
501
- responseURL: string;
502
- responseToken: string;
503
- }
504
- export declare namespace WorkspaceProbeContext {
505
- function is(context: any): context is WorkspaceProbeContext;
506
- }
507
653
  export declare type RefType = "branch" | "tag" | "revision";
508
654
  export declare namespace RefType {
509
655
  const getRefType: (commit: Commit) => RefType;
@@ -514,9 +660,45 @@ export interface Commit {
514
660
  ref?: string;
515
661
  refType?: RefType;
516
662
  }
517
- export interface CommitContext extends WorkspaceContext, Commit {
663
+ export interface AdditionalContentContext extends WorkspaceContext {
664
+ /**
665
+ * utf-8 encoded contents that will be copied on top of the workspace's filesystem
666
+ */
667
+ additionalFiles: {
668
+ [filePath: string]: string;
669
+ };
670
+ }
671
+ export declare namespace AdditionalContentContext {
672
+ function is(ctx: any): ctx is AdditionalContentContext;
673
+ function hasDockerConfig(ctx: any, config: WorkspaceConfig): boolean;
674
+ }
675
+ export interface OpenPrebuildContext extends WorkspaceContext {
676
+ openPrebuildID: string;
677
+ }
678
+ export declare namespace OpenPrebuildContext {
679
+ function is(ctx: any): ctx is OpenPrebuildContext;
680
+ }
681
+ export interface CommitContext extends WorkspaceContext, GitCheckoutInfo {
518
682
  /** @deprecated Moved to .repository.cloneUrl, left here for backwards-compatibility for old workspace contextes in the DB */
519
683
  cloneUrl?: string;
684
+ /**
685
+ * The clone and checkout information for additional repositories in case of multi-repo projects.
686
+ */
687
+ additionalRepositoryCheckoutInfo?: GitCheckoutInfo[];
688
+ }
689
+ export declare namespace CommitContext {
690
+ /**
691
+ * Creates a hash for all the commits of the CommitContext and all sub-repo commit infos.
692
+ * The hash is max 255 chars long.
693
+ * @param commitContext
694
+ * @returns hash for commitcontext
695
+ */
696
+ function computeHash(commitContext: CommitContext): string;
697
+ }
698
+ export interface GitCheckoutInfo extends Commit {
699
+ checkoutLocation?: string;
700
+ upstreamRemoteURI?: string;
701
+ localBranch?: string;
520
702
  }
521
703
  export declare namespace CommitContext {
522
704
  function is(commit: any): commit is CommitContext;
@@ -552,6 +734,7 @@ export interface Repository {
552
734
  owner: string;
553
735
  name: string;
554
736
  cloneUrl: string;
737
+ repoKind?: string;
555
738
  description?: string;
556
739
  avatarUrl?: string;
557
740
  webUrl?: string;
@@ -562,6 +745,18 @@ export interface Repository {
562
745
  parent: Repository;
563
746
  };
564
747
  }
748
+ export interface Branch {
749
+ name: string;
750
+ commit: CommitInfo;
751
+ htmlUrl: string;
752
+ }
753
+ export interface CommitInfo {
754
+ author: string;
755
+ sha: string;
756
+ commitMessage: string;
757
+ authorAvatarUrl?: string;
758
+ authorDate?: string;
759
+ }
565
760
  export declare namespace Repository {
566
761
  function fullRepoName(repo: Repository): string;
567
762
  }
@@ -578,6 +773,9 @@ export interface WorkspaceInfo {
578
773
  workspace: Workspace;
579
774
  latestInstance?: WorkspaceInstance;
580
775
  }
776
+ export declare namespace WorkspaceInfo {
777
+ function lastActiveISODate(info: WorkspaceInfo): string;
778
+ }
581
779
  export declare type RunningWorkspaceInfo = WorkspaceInfo & {
582
780
  latestInstance: WorkspaceInstance;
583
781
  };
@@ -588,12 +786,13 @@ export interface WorkspaceCreationResult {
588
786
  runningWorkspacePrebuild?: {
589
787
  prebuildID: string;
590
788
  workspaceID: string;
789
+ instanceID: string;
591
790
  starting: RunningWorkspacePrebuildStarting;
592
791
  sameCluster: boolean;
593
792
  };
594
793
  runningPrebuildWorkspaceID?: string;
595
794
  }
596
- export declare type RunningWorkspacePrebuildStarting = 'queued' | 'starting' | 'running';
795
+ export declare type RunningWorkspacePrebuildStarting = "queued" | "starting" | "running";
597
796
  export declare enum CreateWorkspaceMode {
598
797
  Default = "default",
599
798
  ForceNew = "force-new",
@@ -640,6 +839,8 @@ export interface AuthProviderEntry {
640
839
  readonly ownerId: string;
641
840
  readonly status: AuthProviderEntry.Status;
642
841
  readonly oauth: OAuth2Config;
842
+ /** A random string that is to change whenever oauth changes (enforced on DB level) */
843
+ readonly oauthRevision?: string;
643
844
  }
644
845
  export interface OAuth2Config {
645
846
  readonly clientId: string;
@@ -658,40 +859,12 @@ export interface OAuth2Config {
658
859
  export declare namespace AuthProviderEntry {
659
860
  type Type = "GitHub" | "GitLab" | string;
660
861
  type Status = "pending" | "verified";
661
- type NewEntry = Pick<AuthProviderEntry, "ownerId" | "host" | "type">;
662
- type UpdateEntry = Pick<AuthProviderEntry, "id" | "ownerId"> & Pick<OAuth2Config, "clientId" | "clientSecret">;
663
- }
664
- export interface Branding {
665
- readonly name: string;
666
- readonly favicon?: string;
667
- /** Either including domain OR absolute path (interpreted relative to host URL) */
668
- readonly logo: string;
669
- readonly startupLogo: string;
670
- readonly showProductivityTips: boolean;
671
- readonly redirectUrlIfNotAuthenticated?: string;
672
- readonly redirectUrlAfterLogout?: string;
673
- readonly homepage: string;
674
- readonly ide?: {
675
- readonly logo: string;
676
- readonly showReleaseNotes: boolean;
677
- readonly helpMenu: Branding.Link[];
862
+ type NewEntry = Pick<AuthProviderEntry, "ownerId" | "host" | "type"> & {
863
+ clientId?: string;
864
+ clientSecret?: string;
678
865
  };
679
- readonly links: {
680
- readonly header: Branding.Link[];
681
- readonly footer: Branding.Link[];
682
- readonly social: Branding.SocialLink[];
683
- readonly legal: Branding.Link[];
684
- };
685
- }
686
- export declare namespace Branding {
687
- interface Link {
688
- readonly name: string;
689
- readonly url: string;
690
- }
691
- interface SocialLink {
692
- readonly type: string;
693
- readonly url: string;
694
- }
866
+ type UpdateEntry = Pick<AuthProviderEntry, "id" | "ownerId"> & Pick<OAuth2Config, "clientId" | "clientSecret">;
867
+ function redact(entry: AuthProviderEntry): AuthProviderEntry;
695
868
  }
696
869
  export interface Configuration {
697
870
  readonly daysBeforeGarbageCollection: number;
@@ -730,4 +903,21 @@ export interface Terms {
730
903
  readonly content: string;
731
904
  readonly formElements?: object;
732
905
  }
906
+ export interface StripeConfig {
907
+ individualUsagePriceIds: {
908
+ [currency: string]: string;
909
+ };
910
+ teamUsagePriceIds: {
911
+ [currency: string]: string;
912
+ };
913
+ }
914
+ export declare type BillingStrategy = "other" | "stripe";
915
+ export interface CostCenter {
916
+ readonly id: AttributionId;
917
+ /**
918
+ * Unit: credits
919
+ */
920
+ spendingLimit: number;
921
+ billingStrategy: BillingStrategy;
922
+ }
733
923
  //# sourceMappingURL=protocol.d.ts.map