/* * 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"; /** * The updated configurations after auto-configuration */ export type Integration = {}; export type AutoConfigureIntegrationResponseDto = { /** * Indicates whether the auto-configuration was successful */ success: boolean; /** * Optional message describing the result or any errors that occurred */ message?: string | undefined; /** * The updated configurations after auto-configuration */ integration?: Integration | undefined; }; /** @internal */ export const Integration$inboundSchema: z.ZodType< Integration, z.ZodTypeDef, unknown > = z.object({}); export function integrationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Integration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Integration' from JSON`, ); } /** @internal */ export const AutoConfigureIntegrationResponseDto$inboundSchema: z.ZodType< AutoConfigureIntegrationResponseDto, z.ZodTypeDef, unknown > = z.object({ success: z.boolean(), message: z.string().optional(), integration: z.lazy(() => Integration$inboundSchema).optional(), }); export function autoConfigureIntegrationResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AutoConfigureIntegrationResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AutoConfigureIntegrationResponseDto' from JSON`, ); }