// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { temperaturePutType } from './temperature-put-type'; /** * The shape of the model inside the application code - what the users use */ export const temperaturePut = z.object({ type_: temperaturePutType.optional(), enabled: z.boolean().optional(), }); /** * * @typedef {TemperaturePut} temperaturePut * @property {TemperaturePutType} - Type of the supported resources (always `temperature` here) * @property {boolean} - true when sensor is activated, false when deactivated */ export type TemperaturePut = 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 temperaturePutResponse = z .object({ type: temperaturePutType.optional(), enabled: z.boolean().optional(), }) .transform((data) => ({ type_: data['type'], enabled: data['enabled'], })); /** * 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 temperaturePutRequest = z .object({ type_: temperaturePutType.nullish(), enabled: z.boolean().nullish() }) .transform((data) => ({ type: data['type_'], enabled: data['enabled'], }));