export type Environment = 'development' | 'test' | 'staging' | 'production'; export interface AppConfig { environment: Environment; port: number; databaseUrl: string; allowedOrigins: string[]; allowedOriginRegex: RegExp | null; clerk: { /** One per Clerk instance the API accepts, e.g. production and development. */ secretKeys: string[]; jwtKey?: string; }; processingToken: { secret: string; ttlSeconds: number; audience: string; issuer: string; }; internalTokenAudience: string; /** Lifetime free generations for accounts without a subscription. */ freeGenerations: number; /** The Prevision site, for Stripe's success, cancel and portal return links. */ appUrl: string; stripe: StripeConfig; } export type PlanId = 'starter' | 'growth'; export interface StripeConfig { secretKey: string; webhookSecret: string; /** Stripe Price id and monthly generation allowance of each plan. */ plans: Record; /** Public URL of the logo shown on Stripe Checkout. Optional. */ logoUrl?: string; /** The branded billing portal configuration (bpc_...). Optional: Stripe's default otherwise. */ portalConfigurationId?: string; }