diff options
Diffstat (limited to 'infra')
| -rw-r--r-- | infra/console.ts | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/infra/console.ts b/infra/console.ts index 539b86f5d..065166da9 100644 --- a/infra/console.ts +++ b/infra/console.ts @@ -101,15 +101,26 @@ export const stripeWebhook = new stripe.WebhookEndpoint("StripeWebhookEndpoint", const zenProduct = new stripe.Product("ZenBlack", { name: "OpenCode Black", }) -const zenPrice = new stripe.Price("ZenBlackPrice", { +const zenPriceProps = { product: zenProduct.id, - unitAmount: 20000, currency: "usd", recurring: { interval: "month", intervalCount: 1, }, +} +const zenPrice200 = new stripe.Price("ZenBlackPrice", { ...zenPriceProps, unitAmount: 20000, }) +const zenPrice100 = new stripe.Price("ZenBlack100Price", { ...zenPriceProps, unitAmount: 10000, }) +const zenPrice20 = new stripe.Price("ZenBlack20Price", { ...zenPriceProps, unitAmount: 2000, }) +const ZEN_BLACK_PRICE = new sst.Linkable("ZEN_BLACK_PRICE", { + properties: { + product: zenProduct.id, + plan200: zenPrice200.id, + plan100: zenPrice100.id, + plan20: zenPrice20.id, + }, }) +const ZEN_BLACK_LIMITS = new sst.Secret("ZEN_BLACK_LIMITS") const ZEN_MODELS = [ new sst.Secret("ZEN_MODELS1"), @@ -121,7 +132,6 @@ const ZEN_MODELS = [ new sst.Secret("ZEN_MODELS7"), new sst.Secret("ZEN_MODELS8"), ] -const ZEN_BLACK = new sst.Secret("ZEN_BLACK") const STRIPE_SECRET_KEY = new sst.Secret("STRIPE_SECRET_KEY") const STRIPE_PUBLISHABLE_KEY = new sst.Secret("STRIPE_PUBLISHABLE_KEY") const AUTH_API_URL = new sst.Linkable("AUTH_API_URL", { @@ -164,7 +174,8 @@ new sst.cloudflare.x.SolidStart("Console", { EMAILOCTOPUS_API_KEY, AWS_SES_ACCESS_KEY_ID, AWS_SES_SECRET_ACCESS_KEY, - ZEN_BLACK, + ZEN_BLACK_PRICE, + ZEN_BLACK_LIMITS, new sst.Secret("ZEN_SESSION_SECRET"), ...ZEN_MODELS, ...($dev |
