/* * 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 { AssetTradingConfig, AssetTradingConfig$inboundSchema, AssetTradingConfig$Outbound, AssetTradingConfig$outboundSchema, } from "./assettradingconfig.js"; /** * ListAssetTradingConfigsResponse is the response message for ListAssetTradingConfig method. */ export type ListAssetTradingConfigsResponse = { /** * The asset trading configs returned in the response. */ assetTradingConfigs?: Array | undefined; /** * The next_page_token value to include in a subsequent ListAssetTradingConfigs request to retrieve the next page of results. */ nextPageToken?: string | undefined; }; /** @internal */ export const ListAssetTradingConfigsResponse$inboundSchema: z.ZodType< ListAssetTradingConfigsResponse, z.ZodTypeDef, unknown > = z.object({ asset_trading_configs: z.array(AssetTradingConfig$inboundSchema).optional(), next_page_token: z.string().optional(), }).transform((v) => { return remap$(v, { "asset_trading_configs": "assetTradingConfigs", "next_page_token": "nextPageToken", }); }); /** @internal */ export type ListAssetTradingConfigsResponse$Outbound = { asset_trading_configs?: Array | undefined; next_page_token?: string | undefined; }; /** @internal */ export const ListAssetTradingConfigsResponse$outboundSchema: z.ZodType< ListAssetTradingConfigsResponse$Outbound, z.ZodTypeDef, ListAssetTradingConfigsResponse > = z.object({ assetTradingConfigs: z.array(AssetTradingConfig$outboundSchema).optional(), nextPageToken: z.string().optional(), }).transform((v) => { return remap$(v, { assetTradingConfigs: "asset_trading_configs", nextPageToken: "next_page_token", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListAssetTradingConfigsResponse$ { /** @deprecated use `ListAssetTradingConfigsResponse$inboundSchema` instead. */ export const inboundSchema = ListAssetTradingConfigsResponse$inboundSchema; /** @deprecated use `ListAssetTradingConfigsResponse$outboundSchema` instead. */ export const outboundSchema = ListAssetTradingConfigsResponse$outboundSchema; /** @deprecated use `ListAssetTradingConfigsResponse$Outbound` instead. */ export type Outbound = ListAssetTradingConfigsResponse$Outbound; } export function listAssetTradingConfigsResponseToJSON( listAssetTradingConfigsResponse: ListAssetTradingConfigsResponse, ): string { return JSON.stringify( ListAssetTradingConfigsResponse$outboundSchema.parse( listAssetTradingConfigsResponse, ), ); } export function listAssetTradingConfigsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListAssetTradingConfigsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAssetTradingConfigsResponse' from JSON`, ); }