/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as models from "../index.js"; export type PostApiV1IndexerproxyTestRequest = { forceTest?: boolean | undefined; indexerProxyResource?: models.IndexerProxyResource | undefined; }; /** @internal */ export const PostApiV1IndexerproxyTestRequest$inboundSchema: z.ZodType< PostApiV1IndexerproxyTestRequest, z.ZodTypeDef, unknown > = z.object({ forceTest: z.boolean().default(false), IndexerProxyResource: models.IndexerProxyResource$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "IndexerProxyResource": "indexerProxyResource", }); }); /** @internal */ export type PostApiV1IndexerproxyTestRequest$Outbound = { forceTest: boolean; IndexerProxyResource?: models.IndexerProxyResource$Outbound | undefined; }; /** @internal */ export const PostApiV1IndexerproxyTestRequest$outboundSchema: z.ZodType< PostApiV1IndexerproxyTestRequest$Outbound, z.ZodTypeDef, PostApiV1IndexerproxyTestRequest > = z.object({ forceTest: z.boolean().default(false), indexerProxyResource: models.IndexerProxyResource$outboundSchema.optional(), }).transform((v) => { return remap$(v, { indexerProxyResource: "IndexerProxyResource", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostApiV1IndexerproxyTestRequest$ { /** @deprecated use `PostApiV1IndexerproxyTestRequest$inboundSchema` instead. */ export const inboundSchema = PostApiV1IndexerproxyTestRequest$inboundSchema; /** @deprecated use `PostApiV1IndexerproxyTestRequest$outboundSchema` instead. */ export const outboundSchema = PostApiV1IndexerproxyTestRequest$outboundSchema; /** @deprecated use `PostApiV1IndexerproxyTestRequest$Outbound` instead. */ export type Outbound = PostApiV1IndexerproxyTestRequest$Outbound; } export function postApiV1IndexerproxyTestRequestToJSON( postApiV1IndexerproxyTestRequest: PostApiV1IndexerproxyTestRequest, ): string { return JSON.stringify( PostApiV1IndexerproxyTestRequest$outboundSchema.parse( postApiV1IndexerproxyTestRequest, ), ); } export function postApiV1IndexerproxyTestRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PostApiV1IndexerproxyTestRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostApiV1IndexerproxyTestRequest' from JSON`, ); }