// This file was generated by liblab | https://liblab.com/ import { z } from 'zod'; import { error, errorRequest, errorResponse } from '../../common/error'; import { groupedLightGet, groupedLightGetRequest, groupedLightGetResponse } from '../../common/grouped-light-get'; /** * The shape of the model inside the application code - what the users use */ export const getGroupedLightsOkResponse = z.object({ errors: z.array(error).optional(), data: z.array(groupedLightGet).optional(), }); /** * * @typedef {GetGroupedLightsOkResponse} getGroupedLightsOkResponse * @property {Error[]} * @property {GroupedLightGet[]} */ export type GetGroupedLightsOkResponse = 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 getGroupedLightsOkResponseResponse = z .object({ errors: z.array(errorResponse).optional(), data: z.array(groupedLightGetResponse).optional(), }) .transform((data) => ({ errors: data['errors'], data: data['data'], })); /** * 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 getGroupedLightsOkResponseRequest = z .object({ errors: z.array(errorRequest).nullish(), data: z.array(groupedLightGetRequest).nullish() }) .transform((data) => ({ errors: data['errors'], data: data['data'], }));