/* * 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 PostApiV1IndexerproxyActionNameRequest = { name: string; indexerProxyResource?: models.IndexerProxyResource | undefined; }; /** @internal */ export const PostApiV1IndexerproxyActionNameRequest$inboundSchema: z.ZodType< PostApiV1IndexerproxyActionNameRequest, z.ZodTypeDef, unknown > = z.object({ name: z.string(), IndexerProxyResource: models.IndexerProxyResource$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "IndexerProxyResource": "indexerProxyResource", }); }); /** @internal */ export type PostApiV1IndexerproxyActionNameRequest$Outbound = { name: string; IndexerProxyResource?: models.IndexerProxyResource$Outbound | undefined; }; /** @internal */ export const PostApiV1IndexerproxyActionNameRequest$outboundSchema: z.ZodType< PostApiV1IndexerproxyActionNameRequest$Outbound, z.ZodTypeDef, PostApiV1IndexerproxyActionNameRequest > = z.object({ name: z.string(), 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 PostApiV1IndexerproxyActionNameRequest$ { /** @deprecated use `PostApiV1IndexerproxyActionNameRequest$inboundSchema` instead. */ export const inboundSchema = PostApiV1IndexerproxyActionNameRequest$inboundSchema; /** @deprecated use `PostApiV1IndexerproxyActionNameRequest$outboundSchema` instead. */ export const outboundSchema = PostApiV1IndexerproxyActionNameRequest$outboundSchema; /** @deprecated use `PostApiV1IndexerproxyActionNameRequest$Outbound` instead. */ export type Outbound = PostApiV1IndexerproxyActionNameRequest$Outbound; } export function postApiV1IndexerproxyActionNameRequestToJSON( postApiV1IndexerproxyActionNameRequest: PostApiV1IndexerproxyActionNameRequest, ): string { return JSON.stringify( PostApiV1IndexerproxyActionNameRequest$outboundSchema.parse( postApiV1IndexerproxyActionNameRequest, ), ); } export function postApiV1IndexerproxyActionNameRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PostApiV1IndexerproxyActionNameRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostApiV1IndexerproxyActionNameRequest' from JSON`, ); }