/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { ClosedEnum } from "../../types/enums.js"; /** * The kind of content the channel moderates. */ export const CreateChannelContentType = { Profile: "profile", Message: "message", Post: "post", Comment: "comment", Event: "event", Product: "product", Review: "review", Voice: "voice", Other: "other", } as const; /** * The kind of content the channel moderates. */ export type CreateChannelContentType = ClosedEnum< typeof CreateChannelContentType >; export type CreateChannelRequestBody = { /** * The channel's name. */ name: string; /** * The key you pass as `channel` when you moderate content. Defaults to the name in lowercase with dashes. Must be unique in the project. */ key?: string | undefined; /** * The channel's description. */ description?: string | undefined; /** * The kind of content the channel moderates. */ contentType?: CreateChannelContentType | undefined; }; export type CreateChannelRequest = { /** * The ID of the project to add the channel to. */ projectId: string; body: CreateChannelRequestBody; }; /** @internal */ export const CreateChannelContentType$outboundSchema: z.ZodMiniEnum< typeof CreateChannelContentType > = z.enum(CreateChannelContentType); /** @internal */ export type CreateChannelRequestBody$Outbound = { name: string; key?: string | undefined; description?: string | undefined; contentType?: string | undefined; }; /** @internal */ export const CreateChannelRequestBody$outboundSchema: z.ZodMiniType< CreateChannelRequestBody$Outbound, CreateChannelRequestBody > = z.object({ name: z.string(), key: z.optional(z.string()), description: z.optional(z.string()), contentType: z.optional(CreateChannelContentType$outboundSchema), }); export function createChannelRequestBodyToJSON( createChannelRequestBody: CreateChannelRequestBody, ): string { return JSON.stringify( CreateChannelRequestBody$outboundSchema.parse(createChannelRequestBody), ); } /** @internal */ export type CreateChannelRequest$Outbound = { projectId: string; body: CreateChannelRequestBody$Outbound; }; /** @internal */ export const CreateChannelRequest$outboundSchema: z.ZodMiniType< CreateChannelRequest$Outbound, CreateChannelRequest > = z.object({ projectId: z.string(), body: z.lazy(() => CreateChannelRequestBody$outboundSchema), }); export function createChannelRequestToJSON( createChannelRequest: CreateChannelRequest, ): string { return JSON.stringify( CreateChannelRequest$outboundSchema.parse(createChannelRequest), ); }