/* * 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 { PushChangeType, PushChangeType$inboundSchema, } from "./pushchangetype.js"; import { PushOperationRef, PushOperationRef$inboundSchema, } from "./pushoperationref.js"; export type PushOperationChange = { /** * Type of change being applied to record in third party platform. */ type?: PushChangeType | undefined; recordRef?: PushOperationRef | undefined; /** * Unique identifier for the attachment created otherwise null. */ attachmentId?: string | null | undefined; }; /** @internal */ export const PushOperationChange$inboundSchema: z.ZodType< PushOperationChange, z.ZodTypeDef, unknown > = z.object({ type: PushChangeType$inboundSchema.optional(), recordRef: PushOperationRef$inboundSchema.optional(), attachmentId: z.nullable(z.string()).optional(), }); export function pushOperationChangeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PushOperationChange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PushOperationChange' from JSON`, ); }