/* * 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 PreconfiguredSkill = { /** * Skill name, used as { type: 'preconfigured', name: '...' } in tool definitions */ name: string; /** * Description of what the skill does */ description: string; object?: "preconfigured_skill" | undefined; }; /** @internal */ export const PreconfiguredSkill$inboundSchema: z.ZodType< PreconfiguredSkill, z.ZodTypeDef, unknown > = z.object({ name: z.string(), description: z.string(), object: z.literal("preconfigured_skill").default("preconfigured_skill"), }); /** @internal */ export type PreconfiguredSkill$Outbound = { name: string; description: string; object: "preconfigured_skill"; }; /** @internal */ export const PreconfiguredSkill$outboundSchema: z.ZodType< PreconfiguredSkill$Outbound, z.ZodTypeDef, PreconfiguredSkill > = z.object({ name: z.string(), description: z.string(), object: z.literal("preconfigured_skill").default( "preconfigured_skill" as const, ), }); export function preconfiguredSkillToJSON( preconfiguredSkill: PreconfiguredSkill, ): string { return JSON.stringify( PreconfiguredSkill$outboundSchema.parse(preconfiguredSkill), ); } export function preconfiguredSkillFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PreconfiguredSkill$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreconfiguredSkill' from JSON`, ); }