/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const ErrorT$inboundSchema = z
    .object({
    message: z.string(),
});
/** @internal */
export const ErrorT$outboundSchema = z.object({
    message: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ErrorT$;
(function (ErrorT$) {
    /** @deprecated use `ErrorT$inboundSchema` instead. */
    ErrorT$.inboundSchema = ErrorT$inboundSchema;
    /** @deprecated use `ErrorT$outboundSchema` instead. */
    ErrorT$.outboundSchema = ErrorT$outboundSchema;
})(ErrorT$ || (ErrorT$ = {}));
export function errorToJSON(errorT) {
    return JSON.stringify(ErrorT$outboundSchema.parse(errorT));
}
export function errorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorT' from JSON`);
}
//# sourceMappingURL=apierror.js.map