/**
 * Usage/budget query types for cowork-service proxy routes.
 */

import { z } from 'zod';

export const UsageSummaryQuerySchema = z.object({
  days: z.coerce.number().int().min(1).max(365).default(30),
});

export const CheckLimitsSchema = z.object({
  plan: z.string().default('free'),
});

export const BudgetPolicyPayloadSchema = z.object({
  dailyBudgetUsd: z.number().min(0.01),
  monthlyBudgetUsd: z.number().min(0.01),
  modelAllowlist: z.array(z.string().min(1)).default([]),
});

export type UsageSummaryQuery = z.infer<typeof UsageSummaryQuerySchema>;
export type CheckLimitsInput = z.infer<typeof CheckLimitsSchema>;
export type BudgetPolicyPayload = z.infer<typeof BudgetPolicyPayloadSchema>;
