@gitpod/gitpod-protocol 0.1.5-sje-kots-node-reqs.1 → 0.1.5-sje-no-log-envvars.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 (147) hide show
  1. package/data/gitpod-schema.json +71 -129
  2. package/lib/accounting-protocol.d.ts +1 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +4 -0
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +4 -1
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js.map +1 -1
  9. package/lib/attribution.d.ts +3 -0
  10. package/lib/attribution.d.ts.map +1 -1
  11. package/lib/attribution.js +10 -0
  12. package/lib/attribution.js.map +1 -1
  13. package/lib/billing-mode.d.ts +41 -0
  14. package/lib/billing-mode.d.ts.map +1 -0
  15. package/lib/billing-mode.js +44 -0
  16. package/lib/billing-mode.js.map +1 -0
  17. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  18. package/lib/encryption/encryption-engine.js +3 -3
  19. package/lib/encryption/encryption-engine.js.map +1 -1
  20. package/lib/encryption/encryption-engine.spec.js +1 -1
  21. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  22. package/lib/encryption/key-provider.js +1 -1
  23. package/lib/encryption/key-provider.js.map +1 -1
  24. package/lib/experiments/configcat-server.d.ts +2 -0
  25. package/lib/experiments/configcat-server.d.ts.map +1 -1
  26. package/lib/experiments/configcat-server.js +2 -1
  27. package/lib/experiments/configcat-server.js.map +1 -1
  28. package/lib/experiments/configcat.d.ts +1 -1
  29. package/lib/experiments/configcat.d.ts.map +1 -1
  30. package/lib/experiments/configcat.js +4 -5
  31. package/lib/experiments/configcat.js.map +1 -1
  32. package/lib/experiments/types.d.ts +2 -3
  33. package/lib/experiments/types.d.ts.map +1 -1
  34. package/lib/experiments/types.js.map +1 -1
  35. package/lib/gitpod-service.d.ts +23 -24
  36. package/lib/gitpod-service.d.ts.map +1 -1
  37. package/lib/gitpod-service.js +12 -0
  38. package/lib/gitpod-service.js.map +1 -1
  39. package/lib/ide-protocol.d.ts +8 -0
  40. package/lib/ide-protocol.d.ts.map +1 -1
  41. package/lib/index.d.ts +0 -1
  42. package/lib/index.d.ts.map +1 -1
  43. package/lib/index.js +0 -1
  44. package/lib/index.js.map +1 -1
  45. package/lib/messaging/client-call-metrics.d.ts +1 -17
  46. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  47. package/lib/messaging/client-call-metrics.js +1 -2
  48. package/lib/messaging/client-call-metrics.js.map +1 -1
  49. package/lib/messaging/error.d.ts +5 -1
  50. package/lib/messaging/error.d.ts.map +1 -1
  51. package/lib/messaging/error.js +11 -3
  52. package/lib/messaging/error.js.map +1 -1
  53. package/lib/plans.d.ts +1 -0
  54. package/lib/plans.d.ts.map +1 -1
  55. package/lib/plans.js +6 -2
  56. package/lib/plans.js.map +1 -1
  57. package/lib/protocol.d.ts +48 -18
  58. package/lib/protocol.d.ts.map +1 -1
  59. package/lib/protocol.js +34 -9
  60. package/lib/protocol.js.map +1 -1
  61. package/lib/team-subscription-protocol.d.ts +1 -0
  62. package/lib/team-subscription-protocol.d.ts.map +1 -1
  63. package/lib/team-subscription-protocol.js +4 -0
  64. package/lib/team-subscription-protocol.js.map +1 -1
  65. package/lib/teams-projects-protocol.d.ts +0 -1
  66. package/lib/teams-projects-protocol.d.ts.map +1 -1
  67. package/lib/teams-projects-protocol.js.map +1 -1
  68. package/lib/usage.d.ts +49 -10
  69. package/lib/usage.d.ts.map +1 -1
  70. package/lib/usage.js +6 -107
  71. package/lib/usage.js.map +1 -1
  72. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  73. package/lib/util/garbage-collected-cache.js +5 -0
  74. package/lib/util/garbage-collected-cache.js.map +1 -1
  75. package/lib/util/gitpod-host-url.d.ts +3 -0
  76. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  77. package/lib/util/gitpod-host-url.js +18 -0
  78. package/lib/util/gitpod-host-url.js.map +1 -1
  79. package/lib/util/grpc.d.ts +19 -0
  80. package/lib/util/grpc.d.ts.map +1 -1
  81. package/lib/util/grpc.js +73 -1
  82. package/lib/util/grpc.js.map +1 -1
  83. package/lib/util/logging.spec.d.ts +7 -0
  84. package/lib/util/logging.spec.d.ts.map +1 -0
  85. package/lib/util/logging.spec.js +52 -0
  86. package/lib/util/logging.spec.js.map +1 -0
  87. package/lib/util/nice-grpc.d.ts +9 -0
  88. package/lib/util/nice-grpc.d.ts.map +1 -0
  89. package/lib/util/nice-grpc.js +119 -0
  90. package/lib/util/nice-grpc.js.map +1 -0
  91. package/lib/util/timeutil.d.ts +1 -0
  92. package/lib/util/timeutil.d.ts.map +1 -1
  93. package/lib/util/timeutil.js +7 -1
  94. package/lib/util/timeutil.js.map +1 -1
  95. package/lib/util/timeutil.spec.d.ts +2 -0
  96. package/lib/util/timeutil.spec.d.ts.map +1 -1
  97. package/lib/util/timeutil.spec.js +34 -0
  98. package/lib/util/timeutil.spec.js.map +1 -1
  99. package/lib/workspace-class.d.ts +14 -0
  100. package/lib/workspace-class.d.ts.map +1 -0
  101. package/lib/workspace-class.js +8 -0
  102. package/lib/workspace-class.js.map +1 -0
  103. package/lib/workspace-cluster.d.ts +1 -0
  104. package/lib/workspace-cluster.d.ts.map +1 -1
  105. package/lib/workspace-cluster.js.map +1 -1
  106. package/lib/workspace-instance.d.ts +1 -0
  107. package/lib/workspace-instance.d.ts.map +1 -1
  108. package/lib/wsready.js +1 -1
  109. package/package.json +7 -2
  110. package/pkg-yarn.lock +5 -2
  111. package/provenance-bundle.jsonl +1 -1
  112. package/src/accounting-protocol.ts +3 -0
  113. package/src/admin-protocol.ts +4 -1
  114. package/src/attribution.ts +11 -0
  115. package/src/billing-mode.ts +77 -0
  116. package/src/encryption/encryption-engine.spec.ts +1 -1
  117. package/src/encryption/encryption-engine.ts +7 -3
  118. package/src/encryption/key-provider.ts +1 -1
  119. package/src/experiments/configcat-server.ts +3 -0
  120. package/src/experiments/configcat.ts +3 -4
  121. package/src/experiments/types.ts +4 -5
  122. package/src/gitpod-service.ts +39 -26
  123. package/src/ide-protocol.ts +10 -0
  124. package/src/index.ts +0 -1
  125. package/src/messaging/client-call-metrics.ts +1 -20
  126. package/src/messaging/error.ts +16 -4
  127. package/src/plans.ts +6 -2
  128. package/src/protocol.ts +75 -25
  129. package/src/team-subscription-protocol.ts +3 -0
  130. package/src/teams-projects-protocol.ts +0 -1
  131. package/src/usage.ts +53 -128
  132. package/src/util/garbage-collected-cache.ts +5 -0
  133. package/src/util/gitpod-host-url.ts +21 -0
  134. package/src/util/grpc.ts +89 -0
  135. package/src/util/logging.spec.ts +23 -0
  136. package/src/util/nice-grpc.ts +93 -0
  137. package/src/util/timeutil.spec.ts +28 -1
  138. package/src/util/timeutil.ts +6 -0
  139. package/src/workspace-class.ts +14 -0
  140. package/src/workspace-cluster.ts +4 -0
  141. package/src/workspace-instance.ts +3 -0
  142. package/src/wsready.ts +1 -1
  143. package/lib/email-protocol.d.ts +0 -49
  144. package/lib/email-protocol.d.ts.map +0 -1
  145. package/lib/email-protocol.js +0 -28
  146. package/lib/email-protocol.js.map +0 -1
  147. package/src/email-protocol.ts +0 -65
@@ -1,65 +0,0 @@
1
- /**
2
- * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
- * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
5
- */
6
-
7
- import { v4 as uuidv4 } from "uuid";
8
-
9
- export type EMailState = "scheduledInternal" | "scheduledSendgrid";
10
-
11
- export interface EMailStatus {
12
- /** The time the email entry was inserted into the DB */
13
- scheduledInternalTime: string;
14
- /** The time the email state transitioned to "scheduledSendgrid" */
15
- scheduledSendgridTime?: string;
16
- /** In case of any errors during sending with Sendgrid it gets noted here */
17
- error?: string;
18
- }
19
- export namespace EMailStatus {
20
- export function getState(status: EMailStatus): EMailState {
21
- if (status.scheduledSendgridTime) {
22
- return "scheduledSendgrid";
23
- }
24
- return "scheduledInternal";
25
- }
26
- }
27
-
28
- export interface EmailAddress {
29
- name?: string;
30
- email: string;
31
- }
32
-
33
- export interface EMailParameters {
34
- /** undefined means default from template */
35
- subject?: string;
36
- /** The sender address */
37
- senderAddress: string | EmailAddress;
38
- /** The replyTo address */
39
- replyToAddress?: string | EmailAddress;
40
- /** The SendGrid template id */
41
- templateId: string;
42
- /** The parameters for the SendGrid template */
43
- templateParams: {};
44
- }
45
-
46
- export type EMail = {
47
- /** The unique id of this email (uuid/v4 for now) */
48
- uid: string;
49
- /** The id of the user this email was sent to */
50
- userId: string;
51
- /** The address this email was sent to */
52
- recipientAddress: string;
53
- /** Which campaign scheduled this email */
54
- campaignId: string;
55
- /** The parameters this email was sent with (template id, template params, etc) */
56
- params: EMailParameters;
57
- } & EMailStatus;
58
-
59
- export namespace EMail {
60
- export const create = (ts: Omit<EMail, "uid">): EMail => {
61
- const withId = ts as EMail;
62
- withId.uid = uuidv4();
63
- return withId;
64
- };
65
- }