/* * 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 { SourceAccount, SourceAccount$inboundSchema } from "./sourceaccount.js"; /** * Status details and corresponding object of the `Create account` operation. */ export type SourceAccountBatchCreateResult = { /** * The HTTP status code for the creation of the source account */ statusCode?: number | undefined; /** * A brief description of the error. */ error?: string | null | undefined; /** * The target bank account in a supported accounting software for ingestion into a bank feed. */ account?: SourceAccount | undefined; }; /** @internal */ export const SourceAccountBatchCreateResult$inboundSchema: z.ZodType< SourceAccountBatchCreateResult, z.ZodTypeDef, unknown > = z.object({ statusCode: z.number().int().optional(), error: z.nullable(z.string()).optional(), account: SourceAccount$inboundSchema.optional(), }); export function sourceAccountBatchCreateResultFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SourceAccountBatchCreateResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SourceAccountBatchCreateResult' from JSON`, ); }