/* * 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 UpdateChannelContentType = { 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 UpdateChannelContentType = ClosedEnum< typeof UpdateChannelContentType >; /** * `ACTIVE` flags content. `DRY_RUN` evaluates content without flagging it. */ export const FlaggingMode = { DryRun: "DRY_RUN", Active: "ACTIVE", } as const; /** * `ACTIVE` flags content. `DRY_RUN` evaluates content without flagging it. */ export type FlaggingMode = ClosedEnum; /** * Trade-off between transcription speed and accuracy. */ export const TranscriptionQuality = { Speed: "SPEED", Balanced: "BALANCED", Accuracy: "ACCURACY", } as const; /** * Trade-off between transcription speed and accuracy. */ export type TranscriptionQuality = ClosedEnum; export type UpdateChannelRequestBody = { /** * The channel's name. */ name?: string | undefined; /** * The key you pass as `channel` when you moderate content. Changing it breaks integrations that send the old key. */ key?: string | undefined; /** * The channel's description. */ description?: string | null | undefined; /** * The kind of content the channel moderates. */ contentType?: UpdateChannelContentType | undefined; /** * `ACTIVE` flags content. `DRY_RUN` evaluates content without flagging it. */ flaggingMode?: FlaggingMode | undefined; /** * Whether earlier messages in the conversation are read when moderating a message. */ contextEnabled?: boolean | undefined; /** * Whether images are moderated. */ enableImageModeration?: boolean | undefined; /** * Whether videos are moderated. */ enableVideoModeration?: boolean | undefined; /** * Whether audio is moderated. */ enableAudioModeration?: boolean | undefined; /** * Whether real-time voice streams are moderated. */ enableVoiceModeration?: boolean | undefined; /** * Whether audio and video transcripts are returned in responses. */ includeTranscriptInResponse?: boolean | undefined; /** * Trade-off between transcription speed and accuracy. */ transcriptionQuality?: TranscriptionQuality | undefined; /** * Whether look-alike Unicode characters are normalized before moderation. */ unicodeSpoofDetectionEnabled?: boolean | undefined; /** * Seconds between frames captured from a video. */ frameCaptureInterval?: number | undefined; /** * The most frames moderated per video. */ maxFramesPerVideo?: number | undefined; /** * Whether frames are spread evenly across the whole video. */ spreadFrames?: boolean | undefined; }; export type UpdateChannelRequest = { /** * The ID of the channel to update. */ id: string; body: UpdateChannelRequestBody; }; /** @internal */ export const UpdateChannelContentType$outboundSchema: z.ZodMiniEnum< typeof UpdateChannelContentType > = z.enum(UpdateChannelContentType); /** @internal */ export const FlaggingMode$outboundSchema: z.ZodMiniEnum = z .enum(FlaggingMode); /** @internal */ export const TranscriptionQuality$outboundSchema: z.ZodMiniEnum< typeof TranscriptionQuality > = z.enum(TranscriptionQuality); /** @internal */ export type UpdateChannelRequestBody$Outbound = { name?: string | undefined; key?: string | undefined; description?: string | null | undefined; contentType?: string | undefined; flaggingMode?: string | undefined; contextEnabled?: boolean | undefined; enableImageModeration?: boolean | undefined; enableVideoModeration?: boolean | undefined; enableAudioModeration?: boolean | undefined; enableVoiceModeration?: boolean | undefined; includeTranscriptInResponse?: boolean | undefined; transcriptionQuality?: string | undefined; unicodeSpoofDetectionEnabled?: boolean | undefined; frameCaptureInterval?: number | undefined; maxFramesPerVideo?: number | undefined; spreadFrames?: boolean | undefined; }; /** @internal */ export const UpdateChannelRequestBody$outboundSchema: z.ZodMiniType< UpdateChannelRequestBody$Outbound, UpdateChannelRequestBody > = z.object({ name: z.optional(z.string()), key: z.optional(z.string()), description: z.optional(z.nullable(z.string())), contentType: z.optional(UpdateChannelContentType$outboundSchema), flaggingMode: z.optional(FlaggingMode$outboundSchema), contextEnabled: z.optional(z.boolean()), enableImageModeration: z.optional(z.boolean()), enableVideoModeration: z.optional(z.boolean()), enableAudioModeration: z.optional(z.boolean()), enableVoiceModeration: z.optional(z.boolean()), includeTranscriptInResponse: z.optional(z.boolean()), transcriptionQuality: z.optional(TranscriptionQuality$outboundSchema), unicodeSpoofDetectionEnabled: z.optional(z.boolean()), frameCaptureInterval: z.optional(z.number()), maxFramesPerVideo: z.optional(z.int()), spreadFrames: z.optional(z.boolean()), }); export function updateChannelRequestBodyToJSON( updateChannelRequestBody: UpdateChannelRequestBody, ): string { return JSON.stringify( UpdateChannelRequestBody$outboundSchema.parse(updateChannelRequestBody), ); } /** @internal */ export type UpdateChannelRequest$Outbound = { id: string; body: UpdateChannelRequestBody$Outbound; }; /** @internal */ export const UpdateChannelRequest$outboundSchema: z.ZodMiniType< UpdateChannelRequest$Outbound, UpdateChannelRequest > = z.object({ id: z.string(), body: z.lazy(() => UpdateChannelRequestBody$outboundSchema), }); export function updateChannelRequestToJSON( updateChannelRequest: UpdateChannelRequest, ): string { return JSON.stringify( UpdateChannelRequest$outboundSchema.parse(updateChannelRequest), ); }