/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { DataType, DataType$inboundSchema } from "./datatype.js"; export type PushOperationRef = { /** * Unique identifier for a push operation. */ id?: string | undefined; /** * Available data types */ dataType?: DataType | undefined; }; /** @internal */ export const PushOperationRef$inboundSchema: z.ZodType< PushOperationRef, z.ZodTypeDef, unknown > = z.object({ id: z.string().optional(), dataType: DataType$inboundSchema.optional(), }); export function pushOperationRefFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PushOperationRef$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PushOperationRef' from JSON`, ); }