/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type GroupResponse = { createdAt?: Date | undefined; entityIds?: Array | undefined; entityType?: string | undefined; id?: string | undefined; lookupKey?: string | undefined; metadata?: { [k: string]: string } | undefined; name?: string | undefined; status?: string | undefined; updatedAt?: Date | undefined; }; /** @internal */ export const GroupResponse$inboundSchema: z.ZodMiniType< GroupResponse, unknown > = z.pipe( z.object({ created_at: types.optional(types.date()), entity_ids: types.optional(z.array(types.string())), entity_type: types.optional(types.string()), id: types.optional(types.string()), lookup_key: types.optional(types.string()), metadata: types.optional(z.record(z.string(), types.string())), name: types.optional(types.string()), status: types.optional(types.string()), updated_at: types.optional(types.date()), }), z.transform((v) => { return remap$(v, { "created_at": "createdAt", "entity_ids": "entityIds", "entity_type": "entityType", "lookup_key": "lookupKey", "updated_at": "updatedAt", }); }), ); export function groupResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GroupResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GroupResponse' from JSON`, ); }