import { z } from "zod";

const TenderSchema = z.object({
  id: z.string(),
  buyer_organization: z.object({
    name: z.string(),
  }),
  application_deadline: z.number(),
  country_code: z.string(),
  currency: z.string(),
  description: z.string(),
  duration: z.string(),
  duration_unit: z.string(),
  estimated_value: z.number(),
  notice_publication_id: z.string(),
  procedure_code: z.string(),
  procurement_type_code: z.string(),
  publication_date: z.number(),
  status: z.string(),
  submission_deadline: z.number(),
  submission_url: z.string(),
  tender_deadline: z.number(),
  tender_id: z.string(),
  title: z.string(),
});
export const TendersResponse = z.object({
  tenders: z.array(TenderSchema).or(z.null()),
});
export type TTenderResponse = z.infer<typeof TendersResponse>;
export type TTenderDetails = z.infer<typeof TenderSchema>;
