diff --git a/infra/console.ts b/infra/console.ts index 269cb0b9c657..5a5e42b77a02 100644 --- a/infra/console.ts +++ b/infra/console.ts @@ -2,92 +2,6 @@ import { domain } from "./stage" import { EMAILOCTOPUS_API_KEY } from "./app" import { SECRET } from "./secret" -//////////////// -// GATEWAY -//////////////// - -const zenLiteProduct = new stripe.Product("ZenLite", { - name: "OpenCode Go", -}) -const zenLiteCouponFirstMonth50 = new stripe.Coupon("ZenLiteCouponFirstMonth50", { - name: "First month 50% off", - percentOff: 50, - appliesToProducts: [zenLiteProduct.id], - duration: "once", -}) -const zenLiteCouponFirstMonth100 = new stripe.Coupon("ZenLiteCouponFirstMonth100", { - name: "First month 100% off", - percentOff: 100, - appliesToProducts: [zenLiteProduct.id], - duration: "once", -}) -const zenLiteCouponThreeMonths100 = new stripe.Coupon("ZenLiteCoupon3Months100", { - name: "3 months 100% off", - percentOff: 100, - appliesToProducts: [zenLiteProduct.id], - duration: "repeating", - durationInMonths: 3, -}) -const zenLiteCouponSixMonths100 = new stripe.Coupon("ZenLiteCoupon6Months100", { - name: "6 months 100% off", - percentOff: 100, - appliesToProducts: [zenLiteProduct.id], - duration: "repeating", - durationInMonths: 6, -}) -const zenLiteCouponTwelveMonths100 = new stripe.Coupon("ZenLiteCoupon12Months100", { - name: "12 months 100% off", - percentOff: 100, - appliesToProducts: [zenLiteProduct.id], - duration: "repeating", - durationInMonths: 12, -}) -const zenLitePrice = new stripe.Price("ZenLitePrice", { - product: zenLiteProduct.id, - currency: "usd", - recurring: { - interval: "month", - intervalCount: 1, - }, - unitAmount: 1000, -}) -const ZEN_LITE_PRICE = new sst.Linkable("ZEN_LITE_PRICE", { - properties: { - // Use existing Go resources in dev's checkout Stripe account. - product: $app.stage === "dev" ? "prod_U1tUscpmwtV2bG" : zenLiteProduct.id, - price: $app.stage === "dev" ? "price_1T3phhE7fOCwHSD4zS6w2NPy" : zenLitePrice.id, - priceInr: 92900, - firstMonth50Coupon: zenLiteCouponFirstMonth50.id, - firstMonth100Coupon: zenLiteCouponFirstMonth100.id, - threeMonths100Coupon: zenLiteCouponThreeMonths100.id, - sixMonths100Coupon: zenLiteCouponSixMonths100.id, - twelveMonths100Coupon: zenLiteCouponTwelveMonths100.id, - }, -}) - -const zenBlackProduct = new stripe.Product("ZenBlack", { - name: "OpenCode Black", -}) -const zenBlackPriceProps = { - product: zenBlackProduct.id, - currency: "usd", - recurring: { - interval: "month", - intervalCount: 1, - }, -} -const zenBlackPrice200 = new stripe.Price("ZenBlackPrice", { ...zenBlackPriceProps, unitAmount: 20000 }) -const zenBlackPrice100 = new stripe.Price("ZenBlack100Price", { ...zenBlackPriceProps, unitAmount: 10000 }) -const zenBlackPrice20 = new stripe.Price("ZenBlack20Price", { ...zenBlackPriceProps, unitAmount: 2000 }) -const ZEN_BLACK_PRICE = new sst.Linkable("ZEN_BLACK_PRICE", { - properties: { - product: zenBlackProduct.id, - plan200: zenBlackPrice200.id, - plan100: zenBlackPrice100.id, - plan20: zenBlackPrice20.id, - }, -}) - // Preview stages have no new Console or inference deployment to forward to. const migrationDomain = $app.stage === "production" ? "opencode.ai" : $app.stage === "dev" ? "dev.opencode.ai" : undefined diff --git a/sst-env.d.ts b/sst-env.d.ts index 3f1bf1321ec2..29f1674dd251 100644 --- a/sst-env.d.ts +++ b/sst-env.d.ts @@ -102,24 +102,6 @@ declare module "sst" { "type": "sst.cloudflare.StaticSite" "url": string } - "ZEN_BLACK_PRICE": { - "plan100": string - "plan20": string - "plan200": string - "product": string - "type": "sst.sst.Linkable" - } - "ZEN_LITE_PRICE": { - "firstMonth100Coupon": string - "firstMonth50Coupon": string - "price": string - "priceInr": number - "product": string - "sixMonths100Coupon": string - "threeMonths100Coupon": string - "twelveMonths100Coupon": string - "type": "sst.sst.Linkable" - } "ZenData": import("@cloudflare/workers-types").R2Bucket "ZenDataNew": import("@cloudflare/workers-types").R2Bucket }