/* * 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 { Asset, Asset$inboundSchema, Asset$Outbound, Asset$outboundSchema, } from "./asset.js"; export type AvailableIndicator = { name: string; assets: Array; }; /** @internal */ export const AvailableIndicator$inboundSchema: z.ZodType< AvailableIndicator, z.ZodTypeDef, unknown > = z.object({ name: z.string(), assets: z.array(Asset$inboundSchema), }); /** @internal */ export type AvailableIndicator$Outbound = { name: string; assets: Array; }; /** @internal */ export const AvailableIndicator$outboundSchema: z.ZodType< AvailableIndicator$Outbound, z.ZodTypeDef, AvailableIndicator > = z.object({ name: z.string(), assets: z.array(Asset$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AvailableIndicator$ { /** @deprecated use `AvailableIndicator$inboundSchema` instead. */ export const inboundSchema = AvailableIndicator$inboundSchema; /** @deprecated use `AvailableIndicator$outboundSchema` instead. */ export const outboundSchema = AvailableIndicator$outboundSchema; /** @deprecated use `AvailableIndicator$Outbound` instead. */ export type Outbound = AvailableIndicator$Outbound; } export function availableIndicatorToJSON( availableIndicator: AvailableIndicator, ): string { return JSON.stringify( AvailableIndicator$outboundSchema.parse(availableIndicator), ); } export function availableIndicatorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AvailableIndicator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AvailableIndicator' from JSON`, ); }