// 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 { colorTemperature, colorTemperatureRequest, colorTemperatureResponse } from './color-temperature'; import { gradient, gradientRequest, gradientResponse } from './gradient'; import { actionEffects1, actionEffects1Request, actionEffects1Response } from './action-effects-1'; /** * The shape of the model inside the application code - what the users use */ export const actionGetAction = z.object({ on: on.optional(), dimming: dimming.optional(), color: color.optional(), colorTemperature: colorTemperature.optional(), gradient: gradient.optional(), effects: actionEffects1.optional(), }); /** * The action to be executed on recall * @typedef {ActionGetAction} actionGetAction - The action to be executed on recall - The action to be executed on recall * @property {On} * @property {Dimming} * @property {Color} * @property {ColorTemperature} * @property {Gradient} - Basic feature containing gradient properties. * @property {ActionEffects1} - Basic feature containing effect properties. */ export type ActionGetAction = 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 actionGetActionResponse = z .object({ on: onResponse.optional(), dimming: dimmingResponse.optional(), color: colorResponse.optional(), color_temperature: colorTemperatureResponse.optional(), gradient: gradientResponse.optional(), effects: actionEffects1Response.optional(), }) .transform((data) => ({ on: data['on'], dimming: data['dimming'], color: data['color'], colorTemperature: data['color_temperature'], gradient: data['gradient'], effects: data['effects'], })); /** * 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 actionGetActionRequest = z .object({ on: onRequest.nullish(), dimming: dimmingRequest.nullish(), color: colorRequest.nullish(), colorTemperature: colorTemperatureRequest.nullish(), gradient: gradientRequest.nullish(), effects: actionEffects1Request.nullish(), }) .transform((data) => ({ on: data['on'], dimming: data['dimming'], color: data['color'], color_temperature: data['colorTemperature'], gradient: data['gradient'], effects: data['effects'], }));