/* * 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 { SourceAccountV2BatchCreateResult, SourceAccountV2BatchCreateResult$inboundSchema, } from "./sourceaccountv2batchcreateresult.js"; /** * Account ID and resulting object of the batch `Create source account` request. */ export type SourceAccountV2BatchCreateResponse = { /** * Unique ID for the source account. */ sourceAccountId?: string | undefined; /** * Status details and corresponding object of the `Create account` operation. */ result?: SourceAccountV2BatchCreateResult | undefined; }; /** @internal */ export const SourceAccountV2BatchCreateResponse$inboundSchema: z.ZodType< SourceAccountV2BatchCreateResponse, z.ZodTypeDef, unknown > = z.object({ sourceAccountId: z.string().optional(), result: SourceAccountV2BatchCreateResult$inboundSchema.optional(), }); export function sourceAccountV2BatchCreateResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SourceAccountV2BatchCreateResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SourceAccountV2BatchCreateResponse' from JSON`, ); }