UNPKG

alepha

Version:

Easy-to-use modern TypeScript framework for building many kind of applications.

22 lines (19 loc) 506 B
import { type Static, z } from "alepha"; export const entitlementsSchema = z.object({ planId: z.string(), planName: z.string(), status: z.enum([ "trialing", "active", "past_due", "suspended", "cancelled", "expired", ]), features: z.array(z.string()), limits: z.record(z.text(), z.integer()), trialEndsAt: z.datetime().optional(), periodEndsAt: z.datetime(), cancelledAt: z.datetime().optional(), }); export type Entitlements = Static<typeof entitlementsSchema>;