/* * 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"; export type GetAssetCalendarResponse = { success?: true | undefined; data: Array; }; /** @internal */ export const GetAssetCalendarResponse$inboundSchema: z.ZodType< GetAssetCalendarResponse, z.ZodTypeDef, unknown > = z.object({ success: z.literal(true).default(true).optional(), data: z.array(z.string()), }); /** @internal */ export type GetAssetCalendarResponse$Outbound = { success: true; data: Array; }; /** @internal */ export const GetAssetCalendarResponse$outboundSchema: z.ZodType< GetAssetCalendarResponse$Outbound, z.ZodTypeDef, GetAssetCalendarResponse > = z.object({ success: z.literal(true).default(true as const), data: z.array(z.string()), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAssetCalendarResponse$ { /** @deprecated use `GetAssetCalendarResponse$inboundSchema` instead. */ export const inboundSchema = GetAssetCalendarResponse$inboundSchema; /** @deprecated use `GetAssetCalendarResponse$outboundSchema` instead. */ export const outboundSchema = GetAssetCalendarResponse$outboundSchema; /** @deprecated use `GetAssetCalendarResponse$Outbound` instead. */ export type Outbound = GetAssetCalendarResponse$Outbound; } export function getAssetCalendarResponseToJSON( getAssetCalendarResponse: GetAssetCalendarResponse, ): string { return JSON.stringify( GetAssetCalendarResponse$outboundSchema.parse(getAssetCalendarResponse), ); } export function getAssetCalendarResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetAssetCalendarResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAssetCalendarResponse' from JSON`, ); }