/* * 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"; export type SlackChannelEndpointDto = { /** * Slack channel ID */ channelId: string; }; /** @internal */ export const SlackChannelEndpointDto$inboundSchema: z.ZodType< SlackChannelEndpointDto, z.ZodTypeDef, unknown > = z.object({ channelId: z.string(), }); /** @internal */ export type SlackChannelEndpointDto$Outbound = { channelId: string; }; /** @internal */ export const SlackChannelEndpointDto$outboundSchema: z.ZodType< SlackChannelEndpointDto$Outbound, z.ZodTypeDef, SlackChannelEndpointDto > = z.object({ channelId: z.string(), }); export function slackChannelEndpointDtoToJSON( slackChannelEndpointDto: SlackChannelEndpointDto, ): string { return JSON.stringify( SlackChannelEndpointDto$outboundSchema.parse(slackChannelEndpointDto), ); } export function slackChannelEndpointDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SlackChannelEndpointDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SlackChannelEndpointDto' from JSON`, ); }