@gitpod/gitpod-protocol 0.1.5-pd-ide-service.12 → 0.1.5-pd-ide-service.17

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 (38) hide show
  1. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  2. package/lib/encryption/encryption-engine.js +3 -3
  3. package/lib/encryption/encryption-engine.js.map +1 -1
  4. package/lib/encryption/encryption-engine.spec.js +1 -1
  5. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  6. package/lib/encryption/key-provider.js +1 -1
  7. package/lib/encryption/key-provider.js.map +1 -1
  8. package/lib/experiments/configcat.d.ts +1 -0
  9. package/lib/experiments/configcat.d.ts.map +1 -1
  10. package/lib/experiments/configcat.js +5 -1
  11. package/lib/experiments/configcat.js.map +1 -1
  12. package/lib/experiments/types.d.ts +2 -1
  13. package/lib/experiments/types.d.ts.map +1 -1
  14. package/lib/gitpod-service.d.ts +1 -2
  15. package/lib/gitpod-service.d.ts.map +1 -1
  16. package/lib/gitpod-service.js.map +1 -1
  17. package/lib/messaging/error.d.ts +1 -0
  18. package/lib/messaging/error.d.ts.map +1 -1
  19. package/lib/messaging/error.js +2 -0
  20. package/lib/messaging/error.js.map +1 -1
  21. package/lib/protocol.d.ts +13 -8
  22. package/lib/protocol.d.ts.map +1 -1
  23. package/lib/protocol.js +1 -8
  24. package/lib/protocol.js.map +1 -1
  25. package/lib/usage.d.ts +1 -2
  26. package/lib/usage.d.ts.map +1 -1
  27. package/package.json +1 -1
  28. package/pkg-yarn.lock +1 -1
  29. package/provenance-bundle.jsonl +1 -1
  30. package/src/encryption/encryption-engine.spec.ts +1 -1
  31. package/src/encryption/encryption-engine.ts +7 -3
  32. package/src/encryption/key-provider.ts +1 -1
  33. package/src/experiments/configcat.ts +4 -0
  34. package/src/experiments/types.ts +4 -1
  35. package/src/gitpod-service.ts +1 -2
  36. package/src/messaging/error.ts +3 -0
  37. package/src/protocol.ts +11 -14
  38. package/src/usage.ts +1 -2
@@ -287,8 +287,7 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
287
287
  getStripePublishableKey(): Promise<string>;
288
288
  getStripeSetupIntentClientSecret(): Promise<string>;
289
289
  findStripeSubscriptionId(attributionId: string): Promise<string | undefined>;
290
- createOrUpdateStripeCustomerForTeam(teamId: string, currency: string): Promise<void>;
291
- createOrUpdateStripeCustomerForUser(currency: string): Promise<void>;
290
+ createStripeCustomerIfNeeded(attributionId: string, currency: string): Promise<void>;
292
291
  subscribeToStripe(attributionId: string, setupIntentId: string): Promise<void>;
293
292
  getStripePortalUrl(attributionId: string): Promise<string>;
294
293
  getUsageLimit(attributionId: string): Promise<number | undefined>;
@@ -94,4 +94,7 @@ export namespace ErrorCodes {
94
94
 
95
95
  // 640 Headless logs are not available (yet)
96
96
  export const HEADLESS_LOG_NOT_YET_AVAILABLE = 640;
97
+
98
+ // 650 Invalid Value
99
+ export const INVALID_VALUE = 650;
97
100
  }
package/src/protocol.ts CHANGED
@@ -286,6 +286,8 @@ export interface UserFeatureSettings {
286
286
  permanentWSFeatureFlags?: NamedWorkspaceFeatureFlag[];
287
287
  }
288
288
 
289
+ export type BillingTier = "paid" | "free";
290
+
289
291
  /**
290
292
  * The values of this type MUST MATCH enum values in WorkspaceFeatureFlag from ws-manager/client/core_pb.d.ts
291
293
  * If they don't we'll break things during workspace startup.
@@ -726,7 +728,7 @@ export interface Workspace {
726
728
 
727
729
  export type WorkspaceSoftDeletion = "user" | "gc";
728
730
 
729
- export type WorkspaceType = "regular" | "prebuild" | "probe"; // TODO(gpl) Removed prove here
731
+ export type WorkspaceType = "regular" | "prebuild";
730
732
 
731
733
  export namespace Workspace {
732
734
  export function getFullRepositoryName(ws: Workspace): string | undefined {
@@ -815,8 +817,8 @@ export interface RepositoryCloneInformation {
815
817
 
816
818
  export interface CoreDumpConfig {
817
819
  enabled?: boolean;
818
- softLimit?: number;
819
- hardLimit?: number;
820
+ softLimit?: number;
821
+ hardLimit?: number;
820
822
  }
821
823
 
822
824
  export interface WorkspaceConfig {
@@ -1163,17 +1165,6 @@ export namespace WithEnvvarsContext {
1163
1165
  }
1164
1166
  }
1165
1167
 
1166
- export interface WorkspaceProbeContext extends WorkspaceContext {
1167
- responseURL: string;
1168
- responseToken: string;
1169
- }
1170
-
1171
- export namespace WorkspaceProbeContext {
1172
- export function is(context: any): context is WorkspaceProbeContext {
1173
- return context && "responseURL" in context && "responseToken" in context;
1174
- }
1175
- }
1176
-
1177
1168
  export type RefType = "branch" | "tag" | "revision";
1178
1169
  export namespace RefType {
1179
1170
  export const getRefType = (commit: Commit): RefType => {
@@ -1520,6 +1511,12 @@ export interface Terms {
1520
1511
  readonly formElements?: object;
1521
1512
  }
1522
1513
 
1514
+ export interface StripeConfig {
1515
+ usageProductPriceIds: { [currency: string]: string };
1516
+ individualUsagePriceIds?: { [currency: string]: string };
1517
+ teamUsagePriceIds?: { [currency: string]: string };
1518
+ }
1519
+
1523
1520
  export type BillingStrategy = "other" | "stripe";
1524
1521
  export interface CostCenter {
1525
1522
  readonly id: AttributionId;
package/src/usage.ts CHANGED
@@ -28,8 +28,7 @@ export interface PaginationRequest {
28
28
  export interface ListUsageResponse {
29
29
  usageEntriesList: Usage[];
30
30
  pagination?: PaginationResponse;
31
- creditBalanceAtStart: number;
32
- creditBalanceAtEnd: number;
31
+ creditsUsed: number;
33
32
  }
34
33
 
35
34
  export interface PaginationResponse {