/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AvailableIndicator, AvailableIndicator$inboundSchema, AvailableIndicator$Outbound, AvailableIndicator$outboundSchema, } from "./availableindicator.js"; export type GetAvailableIndicatorsResponse = { success?: true | undefined; data: Array; }; /** @internal */ export const GetAvailableIndicatorsResponse$inboundSchema: z.ZodType< GetAvailableIndicatorsResponse, z.ZodTypeDef, unknown > = z.object({ success: z.literal(true).default(true).optional(), data: z.array(AvailableIndicator$inboundSchema), }); /** @internal */ export type GetAvailableIndicatorsResponse$Outbound = { success: true; data: Array; }; /** @internal */ export const GetAvailableIndicatorsResponse$outboundSchema: z.ZodType< GetAvailableIndicatorsResponse$Outbound, z.ZodTypeDef, GetAvailableIndicatorsResponse > = z.object({ success: z.literal(true).default(true as const), data: z.array(AvailableIndicator$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAvailableIndicatorsResponse$ { /** @deprecated use `GetAvailableIndicatorsResponse$inboundSchema` instead. */ export const inboundSchema = GetAvailableIndicatorsResponse$inboundSchema; /** @deprecated use `GetAvailableIndicatorsResponse$outboundSchema` instead. */ export const outboundSchema = GetAvailableIndicatorsResponse$outboundSchema; /** @deprecated use `GetAvailableIndicatorsResponse$Outbound` instead. */ export type Outbound = GetAvailableIndicatorsResponse$Outbound; } export function getAvailableIndicatorsResponseToJSON( getAvailableIndicatorsResponse: GetAvailableIndicatorsResponse, ): string { return JSON.stringify( GetAvailableIndicatorsResponse$outboundSchema.parse( getAvailableIndicatorsResponse, ), ); } export function getAvailableIndicatorsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetAvailableIndicatorsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAvailableIndicatorsResponse' from JSON`, ); }