/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The status enum for the performed action */ export const DeleteMessageResponseDtoStatus = { Deleted: "deleted", } as const; /** * The status enum for the performed action */ export type DeleteMessageResponseDtoStatus = ClosedEnum< typeof DeleteMessageResponseDtoStatus >; export type DeleteMessageResponseDto = { /** * A boolean stating the success of the action */ acknowledged: boolean; /** * The status enum for the performed action */ status: DeleteMessageResponseDtoStatus; }; /** @internal */ export const DeleteMessageResponseDtoStatus$inboundSchema: z.ZodNativeEnum< typeof DeleteMessageResponseDtoStatus > = z.nativeEnum(DeleteMessageResponseDtoStatus); /** @internal */ export const DeleteMessageResponseDto$inboundSchema: z.ZodType< DeleteMessageResponseDto, z.ZodTypeDef, unknown > = z.object({ acknowledged: z.boolean(), status: DeleteMessageResponseDtoStatus$inboundSchema, }); export function deleteMessageResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteMessageResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteMessageResponseDto' from JSON`, ); }