mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* Enable feature for embeds when 100 pc is set * Dont consider reserved status for quick availability check
27 lines
734 B
TypeScript
27 lines
734 B
TypeScript
import { z } from "zod";
|
|
|
|
export const ZIsAvailableInputSchema = z.object({
|
|
slots: z.array(
|
|
z.object({
|
|
utcStartIso: z.string(),
|
|
utcEndIso: z.string(),
|
|
})
|
|
),
|
|
eventTypeId: z.number().int(),
|
|
});
|
|
|
|
export type TIsAvailableInputSchema = z.infer<typeof ZIsAvailableInputSchema>;
|
|
|
|
export const ZIsAvailableOutputSchema = z.object({
|
|
slots: z.array(
|
|
z.object({
|
|
utcStartIso: z.string(),
|
|
utcEndIso: z.string(),
|
|
status: z.enum(["available", "reserved", "minBookNoticeViolation", "slotInPast"]),
|
|
realStatus: z.enum(["available", "reserved", "minBookNoticeViolation", "slotInPast"]).optional(),
|
|
})
|
|
),
|
|
});
|
|
|
|
export type TIsAvailableOutputSchema = z.infer<typeof ZIsAvailableOutputSchema>;
|