import { z } from 'zod';

export const createCheckoutInput = z.object({
  priceId: z.string(),
  userId: z.string(),
  successUrl: z.string().url(),
  cancelUrl: z.string().url(),
  customerEmail: z.string().email().optional(),
});

export const getSessionInput = z.object({
  sessionId: z.string(),
});

export const createCheckoutSchema = createCheckoutInput;
export const getSessionSchema = getSessionInput;

export type CreateCheckoutInput = z.infer<typeof createCheckoutInput>;
export type GetSessionInput = z.infer<typeof getSessionInput>;
