// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { color, colorRequest, colorResponse } from './color'; import { dimming, dimmingRequest, dimmingResponse } from './dimming'; /** * The shape of the model inside the application code - what the users use */ export const colorPaletteGet = z.object({ color: color.optional(), dimming: dimming.optional(), }); /** * * @typedef {ColorPaletteGet} colorPaletteGet * @property {Color} * @property {Dimming} */ export type ColorPaletteGet = 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 colorPaletteGetResponse = z .object({ color: colorResponse.optional(), dimming: dimmingResponse.optional(), }) .transform((data) => ({ color: data['color'], 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 colorPaletteGetRequest = z .object({ color: colorRequest.nullish(), dimming: dimmingRequest.nullish() }) .transform((data) => ({ color: data['color'], dimming: data['dimming'], }));