// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { on, onRequest, onResponse } from './on'; import { dimming, dimmingRequest, dimmingResponse } from './dimming'; import { color, colorRequest, colorResponse } from './color'; import { actionColorTemperature, actionColorTemperatureRequest, actionColorTemperatureResponse, } from './action-color-temperature'; import { gradient, gradientRequest, gradientResponse } from './gradient'; import { actionEffects2, actionEffects2Request, actionEffects2Response } from './action-effects-2'; import { dynamics2, dynamics2Request, dynamics2Response } from './dynamics-2'; /** * The shape of the model inside the application code - what the users use */ export const actionPostAction = z.object({ on: on.optional(), dimming: dimming.optional(), color: color.optional(), colorTemperature: actionColorTemperature.optional(), gradient: gradient.optional(), effects: actionEffects2.optional(), dynamics: dynamics2.optional(), }); /** * The action to be executed on recall * @typedef {ActionPostAction} actionPostAction - The action to be executed on recall - The action to be executed on recall * @property {On} * @property {Dimming} * @property {Color} * @property {ActionColorTemperature} * @property {Gradient} - Basic feature containing gradient properties. * @property {ActionEffects2} - Basic feature containing effect properties. * @property {Dynamics2} */ export type ActionPostAction = 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 actionPostActionResponse = z .object({ on: onResponse.optional(), dimming: dimmingResponse.optional(), color: colorResponse.optional(), color_temperature: actionColorTemperatureResponse.optional(), gradient: gradientResponse.optional(), effects: actionEffects2Response.optional(), dynamics: dynamics2Response.optional(), }) .transform((data) => ({ on: data['on'], dimming: data['dimming'], color: data['color'], colorTemperature: data['color_temperature'], gradient: data['gradient'], effects: data['effects'], dynamics: data['dynamics'], })); /** * 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 actionPostActionRequest = z .object({ on: onRequest.nullish(), dimming: dimmingRequest.nullish(), color: colorRequest.nullish(), colorTemperature: actionColorTemperatureRequest.nullish(), gradient: gradientRequest.nullish(), effects: actionEffects2Request.nullish(), dynamics: dynamics2Request.nullish(), }) .transform((data) => ({ on: data['on'], dimming: data['dimming'], color: data['color'], color_temperature: data['colorTemperature'], gradient: data['gradient'], effects: data['effects'], dynamics: data['dynamics'], }));