summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/src/black.ts
diff options
context:
space:
mode:
authorGitHub Action <[email protected]>2026-01-22 22:04:55 +0000
committerGitHub Action <[email protected]>2026-01-22 22:04:55 +0000
commitc128579cfcbe4e177124e202251e95e412bd7e67 (patch)
tree390f5b5ff97b97a024f5116934a0e4a3ed9aa8bc /packages/console/core/src/black.ts
parent5f3ab9395fc8f8543724dcda914d38fba0809049 (diff)
downloadopencode-c128579cfcbe4e177124e202251e95e412bd7e67.tar.gz
opencode-c128579cfcbe4e177124e202251e95e412bd7e67.zip
chore: generate
Diffstat (limited to 'packages/console/core/src/black.ts')
-rw-r--r--packages/console/core/src/black.ts45
1 files changed, 27 insertions, 18 deletions
diff --git a/packages/console/core/src/black.ts b/packages/console/core/src/black.ts
index 93134de55..5f8db6273 100644
--- a/packages/console/core/src/black.ts
+++ b/packages/console/core/src/black.ts
@@ -28,28 +28,37 @@ export namespace BlackData {
return input
})
- export const getLimits = fn(z.object({
+ export const getLimits = fn(
+ z.object({
plan: z.enum(SubscriptionPlan),
- }), ({ plan }) => {
- const json = JSON.parse(Resource.ZEN_BLACK_LIMITS.value)
- return Schema.parse(json)[plan]
- })
+ }),
+ ({ plan }) => {
+ const json = JSON.parse(Resource.ZEN_BLACK_LIMITS.value)
+ return Schema.parse(json)[plan]
+ },
+ )
- export const planToPriceID = fn(z.object({
+ export const planToPriceID = fn(
+ z.object({
plan: z.enum(SubscriptionPlan),
- }), ({ plan }) => {
- if (plan === "200") return Resource.ZEN_BLACK_PRICE.plan200
- if (plan === "100") return Resource.ZEN_BLACK_PRICE.plan100
- return Resource.ZEN_BLACK_PRICE.plan20
- })
+ }),
+ ({ plan }) => {
+ if (plan === "200") return Resource.ZEN_BLACK_PRICE.plan200
+ if (plan === "100") return Resource.ZEN_BLACK_PRICE.plan100
+ return Resource.ZEN_BLACK_PRICE.plan20
+ },
+ )
- export const priceIDToPlan = fn(z.object({
- priceID: z.string(),
- }), ({ priceID }) => {
- if (priceID === Resource.ZEN_BLACK_PRICE.plan200) return "200"
- if (priceID === Resource.ZEN_BLACK_PRICE.plan100) return "100"
- return "20"
- })
+ export const priceIDToPlan = fn(
+ z.object({
+ priceID: z.string(),
+ }),
+ ({ priceID }) => {
+ if (priceID === Resource.ZEN_BLACK_PRICE.plan200) return "200"
+ if (priceID === Resource.ZEN_BLACK_PRICE.plan100) return "100"
+ return "20"
+ },
+ )
}
export namespace Black {