// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { colorTemperaturePalettePostColorTemperature, colorTemperaturePalettePostColorTemperatureRequest, colorTemperaturePalettePostColorTemperatureResponse, } from './color-temperature-palette-post-color-temperature'; import { dimming, dimmingRequest, dimmingResponse } from './dimming'; /** * The shape of the model inside the application code - what the users use */ export const colorTemperaturePalettePost = z.object({ colorTemperature: colorTemperaturePalettePostColorTemperature.optional(), dimming: dimming.optional(), }); /** * * @typedef {ColorTemperaturePalettePost} colorTemperaturePalettePost * @property {ColorTemperaturePalettePostColorTemperature} * @property {Dimming} */ export type ColorTemperaturePalettePost = 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 colorTemperaturePalettePostResponse = z .object({ color_temperature: colorTemperaturePalettePostColorTemperatureResponse.optional(), dimming: dimmingResponse.optional(), }) .transform((data) => ({ colorTemperature: data['color_temperature'], dimming: data['dimming'], })); /** * 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 colorTemperaturePalettePostRequest = z .object({ colorTemperature: colorTemperaturePalettePostColorTemperatureRequest.nullish(), dimming: dimmingRequest.nullish(), }) .transform((data) => ({ color_temperature: data['colorTemperature'], dimming: data['dimming'], }));