@tmlmobilidade/types
Version:
18 lines (17 loc) • 692 B
JavaScript
/* * */
import { z } from 'zod';
/* * */
export const SamTimelineAccentSchema = z.enum(['green', 'orange', 'red', 'white']);
export const SamTimelineMonthSchema = z.object({
failed_count: z.number().int().nonnegative().default(0),
month: z.string(), // yyyy-MM
successful_count: z.number().int().nonnegative().default(0),
});
export const SamTimelineUndatedSchema = z.object({
failed_count: z.number().int().nonnegative().default(0),
successful_count: z.number().int().nonnegative().default(0),
});
export const SamTimelineSummarySchema = z.object({
months: z.array(SamTimelineMonthSchema).default([]),
undated: SamTimelineUndatedSchema.optional().nullable(),
});