/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { ClosedEnum } from "../../types/enums.js"; export const Severity = { Low: "low", Warning: "warning", High: "high", } as const; export type Severity = ClosedEnum; export type GetApiV1PublicViolationsRequest = { page?: number | undefined; pageSize?: number | undefined; /** * Filter by server */ serverId?: string | undefined; severity?: Severity | undefined; acknowledged?: boolean | null | undefined; }; /** @internal */ export const Severity$outboundSchema: z.ZodMiniEnum = z.enum( Severity, ); /** @internal */ export type GetApiV1PublicViolationsRequest$Outbound = { page: number; pageSize: number; serverId?: string | undefined; severity?: string | undefined; acknowledged?: boolean | null | undefined; }; /** @internal */ export const GetApiV1PublicViolationsRequest$outboundSchema: z.ZodMiniType< GetApiV1PublicViolationsRequest$Outbound, GetApiV1PublicViolationsRequest > = z.object({ page: z._default(z.int(), 1), pageSize: z._default(z.int(), 25), serverId: z.optional(z.string()), severity: z.optional(Severity$outboundSchema), acknowledged: z.optional(z.nullable(z.boolean())), }); export function getApiV1PublicViolationsRequestToJSON( getApiV1PublicViolationsRequest: GetApiV1PublicViolationsRequest, ): string { return JSON.stringify( GetApiV1PublicViolationsRequest$outboundSchema.parse( getApiV1PublicViolationsRequest, ), ); }