// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; /** * The shape of the model inside the application code - what the users use */ export const dimming = z.object({ brightness: z.number().gte(0).lte(100).optional(), }); /** * * @typedef {Dimming} dimming * @property {number} - Brightness percentage. value cannot be 0, writing 0 changes it to lowest possible brightness */ export type Dimming = z.infer; /** * The shape of the model mapping from the api schema into the application shape. * Is equal to application shape if all property names match the api schema */ export const dimmingResponse = z .object({ brightness: z.number().gte(0).lte(100).optional(), }) .transform((data) => ({ brightness: data['brightness'], })); /** * The shape of the model mapping from the application shape into the api schema. * Is equal to application shape if all property names match the api schema */ export const dimmingRequest = z.object({ brightness: z.number().nullish() }).transform((data) => ({ brightness: data['brightness'], }));