/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 6e0ab02b3706
 */

import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";

export type DeleteFileResponse = {
  /**
   * The ID of the deleted file.
   */
  id: string;
  /**
   * The object type that was deleted
   */
  object: string;
  /**
   * The deletion status.
   */
  deleted: boolean;
};

/** @internal */
export const DeleteFileResponse$inboundSchema: z.ZodType<
  DeleteFileResponse,
  unknown
> = z.object({
  id: z.string(),
  object: z.string(),
  deleted: z.boolean(),
});

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