@gitpod/gitpod-protocol 0.1.5-procmount.0 → 0.1.5-protected-secrets.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +286 -95
  144. package/lib/protocol.d.ts.map +1 -1
  145. package/lib/protocol.js +384 -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 +681 -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,82 @@ 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
+ protected_secrets: undefined;
137
+ workspace_class_limiting: undefined;
138
+ workspace_connection_limiting: undefined;
139
+ workspace_psi: undefined;
93
140
  };
94
- export declare type NamedWorkspaceFeatureFlag = keyof (typeof WorkspaceFeatureFlags);
95
- export interface UserEnvVarValue {
96
- id?: string;
141
+ export declare type NamedWorkspaceFeatureFlag = keyof typeof WorkspaceFeatureFlags;
142
+ export declare namespace NamedWorkspaceFeatureFlag {
143
+ const WORKSPACE_PERSISTED_FEATTURE_FLAGS: NamedWorkspaceFeatureFlag[];
144
+ function isWorkspacePersisted(ff: NamedWorkspaceFeatureFlag): boolean;
145
+ }
146
+ export interface EnvVarWithValue {
97
147
  name: string;
98
- repositoryPattern: string;
99
148
  value: string;
100
149
  }
150
+ export interface ProjectEnvVarWithValue extends EnvVarWithValue {
151
+ id: string;
152
+ projectId: string;
153
+ censored: boolean;
154
+ }
155
+ export declare type ProjectEnvVar = Omit<ProjectEnvVarWithValue, "value">;
156
+ export interface UserEnvVarValue extends EnvVarWithValue {
157
+ id?: string;
158
+ repositoryPattern: string;
159
+ }
101
160
  export interface UserEnvVar extends UserEnvVarValue {
102
161
  id: string;
103
162
  userId: string;
104
163
  deleted?: boolean;
105
164
  }
106
165
  export declare namespace UserEnvVar {
166
+ /**
167
+ * @param variable
168
+ * @returns Either a string containing an error message or undefined.
169
+ */
170
+ function validate(variable: UserEnvVarValue): string | undefined;
107
171
  function normalizeRepoPattern(pattern: string): string;
172
+ function score(value: UserEnvVarValue): number;
108
173
  function filter<T extends UserEnvVarValue>(vars: T[], owner: string, repo: string): T[];
174
+ function splitRepositoryPattern(repositoryPattern: string): string[];
175
+ }
176
+ export interface SSHPublicKeyValue {
177
+ name: string;
178
+ key: string;
179
+ }
180
+ export interface UserSSHPublicKey extends SSHPublicKeyValue {
181
+ id: string;
182
+ key: string;
183
+ userId: string;
184
+ fingerprint: string;
185
+ creationTime: string;
186
+ lastUsedTime?: string;
187
+ }
188
+ export declare type UserSSHPublicKeyValue = Omit<UserSSHPublicKey, "key" | "userId">;
189
+ export declare namespace SSHPublicKeyValue {
190
+ function validate(value: SSHPublicKeyValue): string | undefined;
191
+ function getData(value: SSHPublicKeyValue): {
192
+ type: string;
193
+ key: string;
194
+ email: string | undefined;
195
+ };
196
+ function getFingerprint(value: SSHPublicKeyValue): string;
197
+ const MAXIMUM_KEY_LENGTH = 5;
109
198
  }
110
199
  export interface GitpodToken {
111
200
  /** Hash value (SHA256) of the token (primary key). */
@@ -198,25 +287,31 @@ export interface PendingGithubEvent {
198
287
  creationDate: Date;
199
288
  type: string;
200
289
  event: string;
290
+ deleted: boolean;
201
291
  }
202
292
  export interface Snapshot {
203
293
  id: string;
204
294
  creationTime: string;
295
+ availableTime?: string;
205
296
  originalWorkspaceId: string;
206
297
  bucketId: string;
207
- layoutData?: string;
298
+ state: SnapshotState;
299
+ message?: string;
208
300
  }
209
- export interface LayoutData {
301
+ export interface VolumeSnapshot {
302
+ id: string;
210
303
  workspaceId: string;
211
- lastUpdatedTime: string;
212
- layoutData: string;
304
+ creationTime: string;
305
+ volumeHandle: string;
213
306
  }
307
+ export declare type SnapshotState = "pending" | "available" | "error";
214
308
  export interface Workspace {
215
309
  id: string;
216
310
  creationTime: string;
217
311
  contextURL: string;
218
312
  description: string;
219
313
  ownerId: string;
314
+ projectId?: string;
220
315
  context: WorkspaceContext;
221
316
  config: WorkspaceConfig;
222
317
  /**
@@ -257,7 +352,7 @@ export interface Workspace {
257
352
  basedOnSnapshotId?: string;
258
353
  }
259
354
  export declare type WorkspaceSoftDeletion = "user" | "gc";
260
- export declare type WorkspaceType = "regular" | "prebuild" | "probe";
355
+ export declare type WorkspaceType = "regular" | "prebuild";
261
356
  export declare namespace Workspace {
262
357
  function getFullRepositoryName(ws: Workspace): string | undefined;
263
358
  function getFullRepositoryUrl(ws: Workspace): string | undefined;
@@ -266,33 +361,51 @@ export declare namespace Workspace {
266
361
  function getBranchName(ws: Workspace): string | undefined;
267
362
  function getCommit(ws: Workspace): string | undefined;
268
363
  }
269
- export interface PreparePluginUploadParams {
270
- fullPluginName: string;
364
+ export interface GuessGitTokenScopesParams {
365
+ host: string;
366
+ repoUrl: string;
367
+ gitCommand: string;
368
+ currentToken: GitToken;
369
+ }
370
+ export interface GitToken {
371
+ token: string;
372
+ user: string;
373
+ scopes: string[];
374
+ }
375
+ export interface GuessedGitTokenScopes {
376
+ message?: string;
377
+ scopes?: string[];
271
378
  }
272
- export interface ResolvePluginsParams {
273
- config?: WorkspaceConfig;
274
- builtins?: ResolvedPlugins;
275
- vsxRegistryUrl?: string;
379
+ export interface VSCodeConfig {
380
+ extensions?: string[];
276
381
  }
277
- export interface InstallPluginsParams {
278
- pluginIds: string[];
382
+ export interface JetBrainsConfig {
383
+ intellij?: JetBrainsProductConfig;
384
+ goland?: JetBrainsProductConfig;
385
+ pycharm?: JetBrainsProductConfig;
386
+ phpstorm?: JetBrainsProductConfig;
387
+ rubymine?: JetBrainsProductConfig;
388
+ webstorm?: JetBrainsProductConfig;
279
389
  }
280
- export interface UninstallPluginParams {
281
- pluginId: string;
390
+ export interface JetBrainsProductConfig {
391
+ prebuilds?: JetBrainsPrebuilds;
392
+ vmoptions?: string;
282
393
  }
283
- export declare type ResolvedPluginKind = 'user' | 'workspace' | 'builtin';
284
- export interface ResolvedPlugins {
285
- [pluginId: string]: ResolvedPlugin | undefined;
394
+ export interface JetBrainsPrebuilds {
395
+ version?: "stable" | "latest" | "both";
286
396
  }
287
- export interface ResolvedPlugin {
288
- fullPluginName: string;
397
+ export interface RepositoryCloneInformation {
289
398
  url: string;
290
- kind: ResolvedPluginKind;
399
+ checkoutLocation?: string;
291
400
  }
292
- export interface VSCodeConfig {
293
- extensions?: string[];
401
+ export interface CoreDumpConfig {
402
+ enabled?: boolean;
403
+ softLimit?: number;
404
+ hardLimit?: number;
294
405
  }
295
406
  export interface WorkspaceConfig {
407
+ mainConfiguration?: string;
408
+ additionalRepositories?: RepositoryCloneInformation[];
296
409
  image?: ImageConfig;
297
410
  ports?: PortConfig[];
298
411
  tasks?: TaskConfig[];
@@ -303,15 +416,20 @@ export interface WorkspaceConfig {
303
416
  };
304
417
  github?: GithubAppConfig;
305
418
  vscode?: VSCodeConfig;
419
+ jetbrains?: JetBrainsConfig;
420
+ coreDump?: CoreDumpConfig;
421
+ /** deprecated. Enabled by default **/
422
+ experimentalNetwork?: boolean;
306
423
  /**
307
424
  * Where the config object originates from.
308
425
  *
309
426
  * repo - from the repository
310
427
  * definitly-gp - from github.com/gitpod-io/definitely-gp
311
428
  * derived - computed based on analyzing the repository
429
+ * additional-content - config comes from additional content, usually provided through the project's configuration
312
430
  * default - our static catch-all default config
313
431
  */
314
- _origin?: 'repo' | 'definitely-gp' | 'derived' | 'default';
432
+ _origin?: "repo" | "definitely-gp" | "derived" | "additional-content" | "default";
315
433
  /**
316
434
  * Set of automatically infered feature flags. That's not something the user can set, but
317
435
  * that is set by gitpod at workspace creation time.
@@ -326,7 +444,7 @@ export interface GithubAppPrebuildConfig {
326
444
  branches?: boolean;
327
445
  pullRequests?: boolean;
328
446
  pullRequestsFromForks?: boolean;
329
- addCheck?: boolean;
447
+ addCheck?: boolean | "prevent-merge-on-error";
330
448
  addBadge?: boolean;
331
449
  addLabel?: boolean | string;
332
450
  addComment?: boolean;
@@ -336,9 +454,9 @@ export declare namespace GithubAppPrebuildConfig {
336
454
  }
337
455
  export declare type WorkspaceImageSource = WorkspaceImageSourceDocker | WorkspaceImageSourceReference;
338
456
  export interface WorkspaceImageSourceDocker {
339
- dockerFileHash: string;
340
- dockerFileSource: Commit;
341
457
  dockerFilePath: string;
458
+ dockerFileHash: string;
459
+ dockerFileSource?: Commit;
342
460
  }
343
461
  export declare namespace WorkspaceImageSourceDocker {
344
462
  function is(obj: object): obj is WorkspaceImageSourceDocker;
@@ -350,14 +468,17 @@ export interface WorkspaceImageSourceReference {
350
468
  export declare namespace WorkspaceImageSourceReference {
351
469
  function is(obj: object): obj is WorkspaceImageSourceReference;
352
470
  }
353
- export declare type PrebuiltWorkspaceState = "queued" | "building" | "aborted" | "timeout" | "available";
471
+ export declare type PrebuiltWorkspaceState = "queued" | "building" | "aborted" | "timeout" | "available" | "failed";
354
472
  export interface PrebuiltWorkspace {
355
473
  id: string;
356
474
  cloneURL: string;
475
+ branch?: string;
476
+ projectId?: string;
357
477
  commit: string;
358
478
  buildWorkspaceId: string;
359
479
  creationTime: string;
360
480
  state: PrebuiltWorkspaceState;
481
+ statusVersion: number;
361
482
  error?: string;
362
483
  snapshot?: string;
363
484
  }
@@ -373,6 +494,10 @@ export interface PrebuiltWorkspaceUpdatable {
373
494
  repo: string;
374
495
  isResolved: boolean;
375
496
  installationId: string;
497
+ /**
498
+ * the commitSHA of the commit that triggered the prebuild
499
+ */
500
+ commitSHA?: string;
376
501
  issue?: string;
377
502
  contextUrl?: string;
378
503
  }
@@ -382,11 +507,13 @@ export interface WhitelistedRepository {
382
507
  description?: string;
383
508
  avatar?: string;
384
509
  }
385
- export declare type PortOnOpen = 'open-browser' | 'open-preview' | 'notify' | 'ignore';
510
+ export declare type PortOnOpen = "open-browser" | "open-preview" | "notify" | "ignore";
386
511
  export interface PortConfig {
387
512
  port: number;
388
513
  onOpen?: PortOnOpen;
389
514
  visibility?: PortVisibility;
515
+ description?: string;
516
+ name?: string;
390
517
  }
391
518
  export declare namespace PortConfig {
392
519
  function is(config: any): config is PortConfig;
@@ -405,16 +532,16 @@ export interface TaskConfig {
405
532
  prebuild?: string;
406
533
  command?: string;
407
534
  env?: {
408
- [env: string]: string;
535
+ [env: string]: any;
409
536
  };
410
- openIn?: 'bottom' | 'main' | 'left' | 'right';
411
- openMode?: 'split-top' | 'split-left' | 'split-right' | 'split-bottom' | 'tab-before' | 'tab-after';
537
+ openIn?: "bottom" | "main" | "left" | "right";
538
+ openMode?: "split-top" | "split-left" | "split-right" | "split-bottom" | "tab-before" | "tab-after";
412
539
  }
413
540
  export declare namespace TaskConfig {
414
541
  function is(config: any): config is TaskConfig;
415
542
  }
416
543
  export declare namespace WorkspaceImageBuild {
417
- type Phase = 'BaseImage' | 'GitpodLayer' | 'Error' | 'Done';
544
+ type Phase = "BaseImage" | "GitpodLayer" | "Error" | "Done";
418
545
  interface StateInfo {
419
546
  phase: Phase;
420
547
  currentStep?: number;
@@ -451,8 +578,11 @@ export declare namespace ExternalImageConfigFile {
451
578
  }
452
579
  export interface WorkspaceContext {
453
580
  title: string;
581
+ ref?: string;
582
+ /** 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
583
  normalizedContextURL?: string;
455
584
  forceCreateNewWorkspace?: boolean;
585
+ forceImageBuild?: boolean;
456
586
  }
457
587
  export declare namespace WorkspaceContext {
458
588
  function is(context: any): context is WorkspaceContext;
@@ -463,14 +593,24 @@ export interface WithSnapshot {
463
593
  export declare namespace WithSnapshot {
464
594
  function is(context: any): context is WithSnapshot;
465
595
  }
466
- export interface WithPrebuild {
467
- snapshotBucketId: string;
596
+ export interface WithPrebuild extends WithSnapshot {
468
597
  prebuildWorkspaceId: string;
469
598
  wasPrebuilt: true;
470
599
  }
471
600
  export declare namespace WithPrebuild {
472
601
  function is(context: any): context is WithPrebuild;
473
602
  }
603
+ /**
604
+ * WithDefaultConfig contexts disable the download of the gitpod.yml from the repository
605
+ * and fall back to the built-in configuration.
606
+ */
607
+ export interface WithDefaultConfig {
608
+ withDefaultConfig: true;
609
+ }
610
+ export declare namespace WithDefaultConfig {
611
+ function is(context: any): context is WithDefaultConfig;
612
+ function mark(ctx: WorkspaceContext): WorkspaceContext & WithDefaultConfig;
613
+ }
474
614
  export interface SnapshotContext extends WorkspaceContext, WithSnapshot {
475
615
  snapshotId: string;
476
616
  }
@@ -479,6 +619,13 @@ export declare namespace SnapshotContext {
479
619
  }
480
620
  export interface StartPrebuildContext extends WorkspaceContext {
481
621
  actual: WorkspaceContext;
622
+ commitHistory?: string[];
623
+ additionalRepositoryCommitHistories?: {
624
+ cloneUrl: string;
625
+ commitHistory: string[];
626
+ }[];
627
+ project?: Project;
628
+ branch?: string;
482
629
  }
483
630
  export declare namespace StartPrebuildContext {
484
631
  function is(context: any): context is StartPrebuildContext;
@@ -491,19 +638,19 @@ export interface PrebuiltWorkspaceContext extends WorkspaceContext {
491
638
  export declare namespace PrebuiltWorkspaceContext {
492
639
  function is(context: any): context is PrebuiltWorkspaceContext;
493
640
  }
641
+ export interface WithReferrerContext extends WorkspaceContext {
642
+ referrer: string;
643
+ referrerIde?: string;
644
+ }
645
+ export declare namespace WithReferrerContext {
646
+ function is(context: any): context is WithReferrerContext;
647
+ }
494
648
  export interface WithEnvvarsContext extends WorkspaceContext {
495
- envvars: UserEnvVarValue[];
649
+ envvars: EnvVarWithValue[];
496
650
  }
497
651
  export declare namespace WithEnvvarsContext {
498
652
  function is(context: any): context is WithEnvvarsContext;
499
653
  }
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
654
  export declare type RefType = "branch" | "tag" | "revision";
508
655
  export declare namespace RefType {
509
656
  const getRefType: (commit: Commit) => RefType;
@@ -514,9 +661,45 @@ export interface Commit {
514
661
  ref?: string;
515
662
  refType?: RefType;
516
663
  }
517
- export interface CommitContext extends WorkspaceContext, Commit {
664
+ export interface AdditionalContentContext extends WorkspaceContext {
665
+ /**
666
+ * utf-8 encoded contents that will be copied on top of the workspace's filesystem
667
+ */
668
+ additionalFiles: {
669
+ [filePath: string]: string;
670
+ };
671
+ }
672
+ export declare namespace AdditionalContentContext {
673
+ function is(ctx: any): ctx is AdditionalContentContext;
674
+ function hasDockerConfig(ctx: any, config: WorkspaceConfig): boolean;
675
+ }
676
+ export interface OpenPrebuildContext extends WorkspaceContext {
677
+ openPrebuildID: string;
678
+ }
679
+ export declare namespace OpenPrebuildContext {
680
+ function is(ctx: any): ctx is OpenPrebuildContext;
681
+ }
682
+ export interface CommitContext extends WorkspaceContext, GitCheckoutInfo {
518
683
  /** @deprecated Moved to .repository.cloneUrl, left here for backwards-compatibility for old workspace contextes in the DB */
519
684
  cloneUrl?: string;
685
+ /**
686
+ * The clone and checkout information for additional repositories in case of multi-repo projects.
687
+ */
688
+ additionalRepositoryCheckoutInfo?: GitCheckoutInfo[];
689
+ }
690
+ export declare namespace CommitContext {
691
+ /**
692
+ * Creates a hash for all the commits of the CommitContext and all sub-repo commit infos.
693
+ * The hash is max 255 chars long.
694
+ * @param commitContext
695
+ * @returns hash for commitcontext
696
+ */
697
+ function computeHash(commitContext: CommitContext): string;
698
+ }
699
+ export interface GitCheckoutInfo extends Commit {
700
+ checkoutLocation?: string;
701
+ upstreamRemoteURI?: string;
702
+ localBranch?: string;
520
703
  }
521
704
  export declare namespace CommitContext {
522
705
  function is(commit: any): commit is CommitContext;
@@ -552,6 +735,7 @@ export interface Repository {
552
735
  owner: string;
553
736
  name: string;
554
737
  cloneUrl: string;
738
+ repoKind?: string;
555
739
  description?: string;
556
740
  avatarUrl?: string;
557
741
  webUrl?: string;
@@ -562,6 +746,18 @@ export interface Repository {
562
746
  parent: Repository;
563
747
  };
564
748
  }
749
+ export interface Branch {
750
+ name: string;
751
+ commit: CommitInfo;
752
+ htmlUrl: string;
753
+ }
754
+ export interface CommitInfo {
755
+ author: string;
756
+ sha: string;
757
+ commitMessage: string;
758
+ authorAvatarUrl?: string;
759
+ authorDate?: string;
760
+ }
565
761
  export declare namespace Repository {
566
762
  function fullRepoName(repo: Repository): string;
567
763
  }
@@ -578,6 +774,9 @@ export interface WorkspaceInfo {
578
774
  workspace: Workspace;
579
775
  latestInstance?: WorkspaceInstance;
580
776
  }
777
+ export declare namespace WorkspaceInfo {
778
+ function lastActiveISODate(info: WorkspaceInfo): string;
779
+ }
581
780
  export declare type RunningWorkspaceInfo = WorkspaceInfo & {
582
781
  latestInstance: WorkspaceInstance;
583
782
  };
@@ -588,12 +787,13 @@ export interface WorkspaceCreationResult {
588
787
  runningWorkspacePrebuild?: {
589
788
  prebuildID: string;
590
789
  workspaceID: string;
790
+ instanceID: string;
591
791
  starting: RunningWorkspacePrebuildStarting;
592
792
  sameCluster: boolean;
593
793
  };
594
794
  runningPrebuildWorkspaceID?: string;
595
795
  }
596
- export declare type RunningWorkspacePrebuildStarting = 'queued' | 'starting' | 'running';
796
+ export declare type RunningWorkspacePrebuildStarting = "queued" | "starting" | "running";
597
797
  export declare enum CreateWorkspaceMode {
598
798
  Default = "default",
599
799
  ForceNew = "force-new",
@@ -640,6 +840,8 @@ export interface AuthProviderEntry {
640
840
  readonly ownerId: string;
641
841
  readonly status: AuthProviderEntry.Status;
642
842
  readonly oauth: OAuth2Config;
843
+ /** A random string that is to change whenever oauth changes (enforced on DB level) */
844
+ readonly oauthRevision?: string;
643
845
  }
644
846
  export interface OAuth2Config {
645
847
  readonly clientId: string;
@@ -658,40 +860,12 @@ export interface OAuth2Config {
658
860
  export declare namespace AuthProviderEntry {
659
861
  type Type = "GitHub" | "GitLab" | string;
660
862
  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[];
863
+ type NewEntry = Pick<AuthProviderEntry, "ownerId" | "host" | "type"> & {
864
+ clientId?: string;
865
+ clientSecret?: string;
678
866
  };
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
- }
867
+ type UpdateEntry = Pick<AuthProviderEntry, "id" | "ownerId"> & Pick<OAuth2Config, "clientId" | "clientSecret">;
868
+ function redact(entry: AuthProviderEntry): AuthProviderEntry;
695
869
  }
696
870
  export interface Configuration {
697
871
  readonly daysBeforeGarbageCollection: number;
@@ -730,4 +904,21 @@ export interface Terms {
730
904
  readonly content: string;
731
905
  readonly formElements?: object;
732
906
  }
907
+ export interface StripeConfig {
908
+ individualUsagePriceIds: {
909
+ [currency: string]: string;
910
+ };
911
+ teamUsagePriceIds: {
912
+ [currency: string]: string;
913
+ };
914
+ }
915
+ export declare type BillingStrategy = "other" | "stripe";
916
+ export interface CostCenter {
917
+ readonly id: AttributionId;
918
+ /**
919
+ * Unit: credits
920
+ */
921
+ spendingLimit: number;
922
+ billingStrategy: BillingStrategy;
923
+ }
733
924
  //# sourceMappingURL=protocol.d.ts.map