/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { ClosedEnum } from "../types/enums.js"; /** * Advisory attachment kind. Agents and workflows pass attachments through without model-capability gating. */ export const Type = { Image: "image", Audio: "audio", Video: "video", Pdf: "pdf", File: "file", Text: "text", Json: "json", Url: "url", } as const; /** * Advisory attachment kind. Agents and workflows pass attachments through without model-capability gating. */ export type Type = ClosedEnum; export const Detail = { Auto: "auto", Low: "low", High: "high", } as const; export type Detail = ClosedEnum; export type Attachment = { /** * Advisory attachment kind. Agents and workflows pass attachments through without model-capability gating. */ type?: Type | undefined; url?: string | undefined; uri?: string | undefined; data?: string | undefined; base64?: string | undefined; mimeType?: string | undefined; contentType?: string | undefined; name?: string | undefined; filename?: string | undefined; text?: string | undefined; content?: string | undefined; detail?: Detail | undefined; metadata?: { [k: string]: any } | undefined; [additionalProperties: string]: unknown; }; /** @internal */ export const Type$outboundSchema: z.ZodMiniEnum = z.enum(Type); /** @internal */ export const Detail$outboundSchema: z.ZodMiniEnum = z.enum( Detail, ); /** @internal */ export type Attachment$Outbound = { type?: string | undefined; url?: string | undefined; uri?: string | undefined; data?: string | undefined; base64?: string | undefined; mimeType?: string | undefined; contentType?: string | undefined; name?: string | undefined; filename?: string | undefined; text?: string | undefined; content?: string | undefined; detail?: string | undefined; metadata?: { [k: string]: any } | undefined; [additionalProperties: string]: unknown; }; /** @internal */ export const Attachment$outboundSchema: z.ZodMiniType< Attachment$Outbound, Attachment > = z.catchall( z.object({ type: z.optional(Type$outboundSchema), url: z.optional(z.string()), uri: z.optional(z.string()), data: z.optional(z.string()), base64: z.optional(z.string()), mimeType: z.optional(z.string()), contentType: z.optional(z.string()), name: z.optional(z.string()), filename: z.optional(z.string()), text: z.optional(z.string()), content: z.optional(z.string()), detail: z.optional(Detail$outboundSchema), metadata: z.optional(z.record(z.string(), z.any())), }), z.any(), ); export function attachmentToJSON(attachment: Attachment): string { return JSON.stringify(Attachment$outboundSchema.parse(attachment)); }