// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { powerupPreset1 } from './powerup-preset-1'; import { powerupOn1, powerupOn1Request, powerupOn1Response } from './powerup-on-1'; import { powerupDimming1, powerupDimming1Request, powerupDimming1Response } from './powerup-dimming-1'; /** * The shape of the model inside the application code - what the users use */ export const lightGetPowerup = z.object({ preset: powerupPreset1.optional(), configured: z.boolean().optional(), on1: powerupOn1.optional(), dimming: powerupDimming1.optional(), }); /** * Feature containing properties to configure powerup behaviour of a lightsource. * @typedef {LightGetPowerup} lightGetPowerup - Feature containing properties to configure powerup behaviour of a lightsource. - Feature containing properties to configure powerup behaviour of a lightsource. * @property {PowerupPreset1} - When setting the custom preset the additional properties can be set. For all other presets, no other properties can be included. * @property {boolean} - Indicates if the shown values have been configured in the lightsource. * @property {PowerupOn1} * @property {PowerupDimming1} */ export type LightGetPowerup = 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 lightGetPowerupResponse = z .object({ preset: powerupPreset1.optional(), configured: z.boolean().optional(), on: powerupOn1Response.optional(), dimming: powerupDimming1Response.optional(), }) .transform((data) => ({ preset: data['preset'], configured: data['configured'], on1: data['on'], 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 lightGetPowerupRequest = z .object({ preset: powerupPreset1.nullish(), configured: z.boolean().nullish(), on1: powerupOn1Request.nullish(), dimming: powerupDimming1Request.nullish(), }) .transform((data) => ({ preset: data['preset'], configured: data['configured'], on: data['on1'], dimming: data['dimming'], }));