/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; /** * Standard success response */ export type WsSuccess = { /** * Operation success status */ success: boolean; /** * Human-readable success message */ message?: string | undefined; }; /** @internal */ export const WsSuccess$inboundSchema: z.ZodMiniType = z .object({ success: types.boolean(), message: types.optional(types.string()), }); export function wsSuccessFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WsSuccess$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WsSuccess' from JSON`, ); }