/* * 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 ImportMasterJsonResponseDto = { /** * Overall success status of the import operation */ success: boolean; /** * Human-readable message describing the import result */ message: string; /** * List of resource IDs that were successfully imported */ successful?: Array | undefined; /** * List of resource IDs that failed to import */ failed?: Array | undefined; }; /** @internal */ export const ImportMasterJsonResponseDto$inboundSchema: z.ZodType< ImportMasterJsonResponseDto, z.ZodTypeDef, unknown > = z.object({ success: z.boolean(), message: z.string(), successful: z.array(z.string()).optional(), failed: z.array(z.string()).optional(), }); export function importMasterJsonResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ImportMasterJsonResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportMasterJsonResponseDto' from JSON`, ); }