/* * 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 { Canister, Canister$inboundSchema, Canister$Outbound, Canister$outboundSchema, } from "./canister.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ListCanistersResponse = { data: Array; }; /** @internal */ export const ListCanistersResponse$inboundSchema: z.ZodType< ListCanistersResponse, z.ZodTypeDef, unknown > = z.object({ data: z.array(Canister$inboundSchema), }); /** @internal */ export type ListCanistersResponse$Outbound = { data: Array; }; /** @internal */ export const ListCanistersResponse$outboundSchema: z.ZodType< ListCanistersResponse$Outbound, z.ZodTypeDef, ListCanistersResponse > = z.object({ data: z.array(Canister$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCanistersResponse$ { /** @deprecated use `ListCanistersResponse$inboundSchema` instead. */ export const inboundSchema = ListCanistersResponse$inboundSchema; /** @deprecated use `ListCanistersResponse$outboundSchema` instead. */ export const outboundSchema = ListCanistersResponse$outboundSchema; /** @deprecated use `ListCanistersResponse$Outbound` instead. */ export type Outbound = ListCanistersResponse$Outbound; } export function listCanistersResponseToJSON( listCanistersResponse: ListCanistersResponse, ): string { return JSON.stringify( ListCanistersResponse$outboundSchema.parse(listCanistersResponse), ); } export function listCanistersResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListCanistersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListCanistersResponse' from JSON`, ); }