/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export type LearnedSkill = { skillId: string; name: string; description: string; category: string; trigger?: { [k: string]: any } | undefined; spawnConfig?: { [k: string]: any } | undefined; successRate: number; usageCount: number; creator: string; agents: Array; tags?: Array | undefined; createdAt: number; updatedAt?: number | undefined; }; /** @internal */ export const LearnedSkill$inboundSchema: z.ZodMiniType = z.object({ skillId: types.string(), name: types.string(), description: types.string(), category: types.string(), trigger: types.optional(z.record(z.string(), z.any())), spawnConfig: types.optional(z.record(z.string(), z.any())), successRate: types.number(), usageCount: types.number(), creator: types.string(), agents: z.array(types.string()), tags: types.optional(z.array(types.string())), createdAt: types.number(), updatedAt: types.optional(types.number()), }); export function learnedSkillFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LearnedSkill$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LearnedSkill' from JSON`, ); }