// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { dimmingMode1 } from './dimming-mode-1'; import { dimming, dimmingRequest, dimmingResponse } from './dimming'; import { dimmingColor1, dimmingColor1Request, dimmingColor1Response } from './dimming-color-1'; /** * The shape of the model inside the application code - what the users use */ export const powerupDimming1 = z.object({ mode: dimmingMode1.optional(), dimming: dimming.optional(), color1: dimmingColor1.optional(), }); /** * * @typedef {PowerupDimming1} powerupDimming1 * @property {DimmingMode1} - Dimming will set the brightness to the specified value after power up. When setting mode “dimming”, the dimming property must be included. Previous will set brightness to the state it was in before powering off. * @property {Dimming} * @property {DimmingColor1} */ export type PowerupDimming1 = 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 powerupDimming1Response = z .object({ mode: dimmingMode1.optional(), dimming: dimmingResponse.optional(), color: dimmingColor1Response.optional(), }) .transform((data) => ({ mode: data['mode'], dimming: data['dimming'], color1: data['color'], })); /** * 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 powerupDimming1Request = z .object({ mode: dimmingMode1.nullish(), dimming: dimmingRequest.nullish(), color1: dimmingColor1Request.nullish() }) .transform((data) => ({ mode: data['mode'], dimming: data['dimming'], color: data['color1'], }));