/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod/v4-mini";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";

export type CustomerEmailUpdateVerifyResponse = {
  token: string;
};

/** @internal */
export const CustomerEmailUpdateVerifyResponse$inboundSchema: z.ZodMiniType<
  CustomerEmailUpdateVerifyResponse,
  unknown
> = z.object({
  token: z.string(),
});

export function customerEmailUpdateVerifyResponseFromJSON(
  jsonString: string,
): SafeParseResult<CustomerEmailUpdateVerifyResponse, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => CustomerEmailUpdateVerifyResponse$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'CustomerEmailUpdateVerifyResponse' from JSON`,
  );
}
