/*
 * 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";

/**
 * Empty response object by design. A successful response indicates this operation was successfully executed.
 */
export type EmptyResponse = {};

/** @internal */
export const EmptyResponse$inboundSchema: z.ZodType<
  EmptyResponse,
  z.ZodTypeDef,
  unknown
> = z.object({});

export function emptyResponseFromJSON(
  jsonString: string,
): SafeParseResult<EmptyResponse, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => EmptyResponse$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'EmptyResponse' from JSON`,
  );
}
