/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListOrgPricesRequest = { orgId: string; model?: string | undefined; }; /** @internal */ export const ListOrgPricesRequest$inboundSchema: z.ZodType< ListOrgPricesRequest, z.ZodTypeDef, unknown > = z.object({ orgId: z.string(), model: z.string().optional(), }); /** @internal */ export type ListOrgPricesRequest$Outbound = { orgId: string; model?: string | undefined; }; /** @internal */ export const ListOrgPricesRequest$outboundSchema: z.ZodType< ListOrgPricesRequest$Outbound, z.ZodTypeDef, ListOrgPricesRequest > = z.object({ orgId: z.string(), model: z.string().optional(), }); export function listOrgPricesRequestToJSON( listOrgPricesRequest: ListOrgPricesRequest, ): string { return JSON.stringify( ListOrgPricesRequest$outboundSchema.parse(listOrgPricesRequest), ); } export function listOrgPricesRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListOrgPricesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListOrgPricesRequest' from JSON`, ); }