summaryrefslogtreecommitdiffhomepage
path: root/infra/console.ts
diff options
context:
space:
mode:
authorFrank <[email protected]>2026-01-22 12:40:42 -0500
committerFrank <[email protected]>2026-01-22 13:02:28 -0500
commita890d51bbc6a5608ad5992c74ee49153775aceb3 (patch)
tree5b4e4b53cfc44db4242b23d3bce48bba4a303a67 /infra/console.ts
parentbb582416f216de684bf6861353a3111cde2c461d (diff)
downloadopencode-a890d51bbc6a5608ad5992c74ee49153775aceb3.tar.gz
opencode-a890d51bbc6a5608ad5992c74ee49153775aceb3.zip
wip: zen black
Diffstat (limited to 'infra/console.ts')
-rw-r--r--infra/console.ts19
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