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