diff --git a/.werft/jobs/build/payment/stripe-configmap.yaml b/.werft/jobs/build/payment/stripe-configmap.yaml index aebada69df5e22..5462634180d81d 100644 --- a/.werft/jobs/build/payment/stripe-configmap.yaml +++ b/.werft/jobs/build/payment/stripe-configmap.yaml @@ -9,5 +9,13 @@ data: "usageProductPriceIds": { "EUR": "price_1LiId7GadRXm50o3OayAS2y4", "USD": "price_1LiIdbGadRXm50o3ylg5S44r" + }, + "individualUsagePriceIds": { + "EUR": "price_1LmFcFGadRXm50o3XUrEuajK", + "USD": "price_1LmFclGadRXm50o3mWTkir9g" + }, + "teamUsagePriceIds": { + "EUR": "price_1LiId7GadRXm50o3OayAS2y4", + "USD": "price_1LiIdbGadRXm50o3ylg5S44r" } } diff --git a/components/gitpod-protocol/src/protocol.ts b/components/gitpod-protocol/src/protocol.ts index 862a2378ed83d9..2a8e41427b922f 100644 --- a/components/gitpod-protocol/src/protocol.ts +++ b/components/gitpod-protocol/src/protocol.ts @@ -817,8 +817,8 @@ export interface RepositoryCloneInformation { export interface CoreDumpConfig { enabled?: boolean; - softLimit?: number; - hardLimit?: number; + softLimit?: number; + hardLimit?: number; } export interface WorkspaceConfig { @@ -1522,6 +1522,12 @@ export interface Terms { readonly formElements?: object; } +export interface StripeConfig { + usageProductPriceIds: { [currency: string]: string }; + individualUsagePriceIds?: { [currency: string]: string }; + teamUsagePriceIds?: { [currency: string]: string }; +} + export type BillingStrategy = "other" | "stripe"; export interface CostCenter { readonly id: AttributionId; diff --git a/components/server/src/config.ts b/components/server/src/config.ts index c7bbc9eb25f8bb..2653af0086eb9d 100644 --- a/components/server/src/config.ts +++ b/components/server/src/config.ts @@ -7,7 +7,7 @@ import { GitpodHostUrl } from "@gitpod/gitpod-protocol/lib/util/gitpod-host-url"; import { AuthProviderParams, normalizeAuthProviderParams } from "./auth/auth-provider"; -import { NamedWorkspaceFeatureFlag } from "@gitpod/gitpod-protocol"; +import { NamedWorkspaceFeatureFlag, StripeConfig } from "@gitpod/gitpod-protocol"; import { RateLimiterConfig } from "./auth/rate-limiter"; import { CodeSyncConfig } from "./code-sync/code-sync-service"; @@ -27,7 +27,7 @@ export type Config = Omit< workspaceDefaults: WorkspaceDefaults; chargebeeProviderOptions?: ChargebeeProviderOptions; stripeSecrets?: { publishableKey: string; secretKey: string }; - stripeConfig?: { usageProductPriceIds: { [currency: string]: string } }; + stripeConfig?: StripeConfig; builtinAuthProvidersConfigured: boolean; inactivityPeriodForRepos?: number; }; @@ -266,7 +266,7 @@ export namespace ConfigFile { log.error("Could not load Stripe secrets", error); } } - let stripeConfig: { usageProductPriceIds: { EUR: string; USD: string } } | undefined; + let stripeConfig: StripeConfig | undefined; if (config.enablePayment && config.stripeConfigFile) { try { stripeConfig = JSON.parse(fs.readFileSync(filePathTelepresenceAware(config.stripeConfigFile), "utf-8"));