/* * 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"; export type WebhookDataRepresentativeUpdated = { accountID: string; representativeID: string; }; /** @internal */ export const WebhookDataRepresentativeUpdated$inboundSchema: z.ZodType< WebhookDataRepresentativeUpdated, z.ZodTypeDef, unknown > = z.object({ accountID: z.string(), representativeID: z.string(), }); /** @internal */ export type WebhookDataRepresentativeUpdated$Outbound = { accountID: string; representativeID: string; }; /** @internal */ export const WebhookDataRepresentativeUpdated$outboundSchema: z.ZodType< WebhookDataRepresentativeUpdated$Outbound, z.ZodTypeDef, WebhookDataRepresentativeUpdated > = z.object({ accountID: z.string(), representativeID: z.string(), }); export function webhookDataRepresentativeUpdatedToJSON( webhookDataRepresentativeUpdated: WebhookDataRepresentativeUpdated, ): string { return JSON.stringify( WebhookDataRepresentativeUpdated$outboundSchema.parse( webhookDataRepresentativeUpdated, ), ); } export function webhookDataRepresentativeUpdatedFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WebhookDataRepresentativeUpdated$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookDataRepresentativeUpdated' from JSON`, ); }