import { Prisma } from '../generated/prisma/client.js'; /** A subscription that currently grants its plan's allowance. */ export const activeSubscriptionWhere = (userId: string, now = new Date()): Prisma.SubscriptionWhereInput => ({ userId, status: { in: ['active', 'trialing'] }, currentPeriodEnd: { gt: now }, });