/* * 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"; export type DeleteChannelRequest = { /** * The ID of the channel. */ id: string; }; /** * Channel deleted successfully */ export type DeleteChannelResponse = { /** * Whether the channel was deleted. */ deleted: boolean; /** * The ID of the channel. */ id: string; }; /** @internal */ export type DeleteChannelRequest$Outbound = { id: string; }; /** @internal */ export const DeleteChannelRequest$outboundSchema: z.ZodMiniType< DeleteChannelRequest$Outbound, DeleteChannelRequest > = z.object({ id: z.string(), }); export function deleteChannelRequestToJSON( deleteChannelRequest: DeleteChannelRequest, ): string { return JSON.stringify( DeleteChannelRequest$outboundSchema.parse(deleteChannelRequest), ); } /** @internal */ export const DeleteChannelResponse$inboundSchema: z.ZodMiniType< DeleteChannelResponse, unknown > = z.object({ deleted: types.boolean(), id: types.string(), }); export function deleteChannelResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteChannelResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteChannelResponse' from JSON`, ); }