// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { gamutPosition, gamutPositionRequest, gamutPositionResponse } from './gamut-position'; /** * The shape of the model inside the application code - what the users use */ export const gamut = z.object({ red: gamutPosition.optional(), green: gamutPosition.optional(), blue: gamutPosition.optional(), }); /** * Color gamut of color bulb. Some bulbs do not properly return the Gamut information. In this case this is not present. * @typedef {Gamut} gamut - Color gamut of color bulb. Some bulbs do not properly return the Gamut information. In this case this is not present. - Color gamut of color bulb. Some bulbs do not properly return the Gamut information. In this case this is not present. * @property {GamutPosition} - CIE XY gamut position * @property {GamutPosition} - CIE XY gamut position * @property {GamutPosition} - CIE XY gamut position */ export type Gamut = 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 gamutResponse = z .object({ red: gamutPositionResponse.optional(), green: gamutPositionResponse.optional(), blue: gamutPositionResponse.optional(), }) .transform((data) => ({ red: data['red'], green: data['green'], blue: data['blue'], })); /** * 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 gamutRequest = z .object({ red: gamutPositionRequest.nullish(), green: gamutPositionRequest.nullish(), blue: gamutPositionRequest.nullish(), }) .transform((data) => ({ red: data['red'], green: data['green'], blue: data['blue'], }));