21 lines
539 B
TypeScript
21 lines
539 B
TypeScript
import { z } from "zod/v4";
|
|
import { AppEnv } from "../genModels/genEnums.js";
|
|
|
|
export const SubscriptionSchema = z.object({
|
|
id: z.string(),
|
|
stripe_id: z.string().nullable(),
|
|
stripe_schedule_id: z.string().nullable(),
|
|
|
|
created_at: z.number(),
|
|
// metadata: z.record(z.string(), z.any()),
|
|
usage_features: z.array(z.string()),
|
|
org_id: z.string(),
|
|
|
|
current_period_start: z.number().nullable(),
|
|
current_period_end: z.number().nullable(),
|
|
|
|
env: z.nativeEnum(AppEnv),
|
|
});
|
|
|
|
export type Subscription = z.infer<typeof SubscriptionSchema>;
|