// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { color, colorRequest, colorResponse } from '../../common/color'; /** * The shape of the model inside the application code - what the users use */ export const colorColorTemperature2 = z.object({ mirek: z.number().gte(153).lte(500).optional(), color: color.optional(), }); /** * * @typedef {ColorColorTemperature2} colorColorTemperature2 * @property {number} - color temperature in mirek or null when the light color is not in the ct spectrum * @property {Color} */ export type ColorColorTemperature2 = 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 colorColorTemperature2Response = z .object({ mirek: z.number().gte(153).lte(500).optional(), color: colorResponse.optional(), }) .transform((data) => ({ mirek: data['mirek'], color: 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 colorColorTemperature2Request = z .object({ mirek: z.number().nullish(), color: colorRequest.nullish() }) .transform((data) => ({ mirek: data['mirek'], color: data['color'], }));