// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { colorMode1 } from './color-mode-1'; import { colorColorTemperature1, colorColorTemperature1Request, colorColorTemperature1Response, } from './color-color-temperature-1'; /** * The shape of the model inside the application code - what the users use */ export const dimmingColor1 = z.object({ mode: colorMode1.optional(), colorTemperature: colorColorTemperature1.optional(), }); /** * * @typedef {DimmingColor1} dimmingColor1 * @property {ColorMode1} - State to activate after powerup. Availability of “color_temperature” and “color” modes depend on the capabilities of the lamp. Colortemperature will set the colortemperature to the specified value after power up. When setting color_temperature, the color_temperature property must be included Color will set the color tot he specified value after power up. When setting color mode, the color property must be included Previous will set color to the state it was in before powering off. * @property {ColorColorTemperature1} */ export type DimmingColor1 = 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 dimmingColor1Response = z .object({ mode: colorMode1.optional(), color_temperature: colorColorTemperature1Response.optional(), }) .transform((data) => ({ mode: data['mode'], colorTemperature: data['color_temperature'], })); /** * 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 dimmingColor1Request = z .object({ mode: colorMode1.nullish(), colorTemperature: colorColorTemperature1Request.nullish() }) .transform((data) => ({ mode: data['mode'], color_temperature: data['colorTemperature'], }));