/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { AgentConnector, AgentConnector$Outbound, AgentConnector$outboundSchema, } from "./agent-connector.js"; export type Protocol = { name?: string | undefined; version?: string | undefined; }; export type AgentCard = { schemaVersion?: string | undefined; name: string; description: string; x402?: boolean | undefined; x402Support?: boolean | undefined; image?: string | undefined; avatar?: string | undefined; avatarUrl?: string | undefined; walletAddress: string; walletTimestamp?: number | undefined; dnaHash: string; network: string; model: string; target?: string | undefined; creatorFee?: number | undefined; framework?: string | undefined; licensePrice?: string | undefined; licenses?: number | undefined; cloneable?: boolean | undefined; skills?: Array | undefined; connectors?: Array | undefined; protocols?: Array | undefined; creator?: string | undefined; cid?: string | undefined; createdAt?: Date | undefined; }; /** @internal */ export type Protocol$Outbound = { name?: string | undefined; version?: string | undefined; }; /** @internal */ export const Protocol$outboundSchema: z.ZodMiniType< Protocol$Outbound, Protocol > = z.object({ name: z.optional(z.string()), version: z.optional(z.string()), }); export function protocolToJSON(protocol: Protocol): string { return JSON.stringify(Protocol$outboundSchema.parse(protocol)); } /** @internal */ export type AgentCard$Outbound = { schemaVersion?: string | undefined; name: string; description: string; x402?: boolean | undefined; x402Support?: boolean | undefined; image?: string | undefined; avatar?: string | undefined; avatarUrl?: string | undefined; walletAddress: string; walletTimestamp?: number | undefined; dnaHash: string; network: string; model: string; target?: string | undefined; creatorFee?: number | undefined; framework?: string | undefined; licensePrice?: string | undefined; licenses?: number | undefined; cloneable?: boolean | undefined; skills?: Array | undefined; connectors?: Array | undefined; protocols?: Array | undefined; creator?: string | undefined; cid?: string | undefined; createdAt?: string | undefined; }; /** @internal */ export const AgentCard$outboundSchema: z.ZodMiniType< AgentCard$Outbound, AgentCard > = z.object({ schemaVersion: z.optional(z.string()), name: z.string(), description: z.string(), x402: z.optional(z.boolean()), x402Support: z.optional(z.boolean()), image: z.optional(z.string()), avatar: z.optional(z.string()), avatarUrl: z.optional(z.string()), walletAddress: z.string(), walletTimestamp: z.optional(z.int()), dnaHash: z.string(), network: z.string(), model: z.string(), target: z.optional(z.string()), creatorFee: z.optional(z.number()), framework: z.optional(z.string()), licensePrice: z.optional(z.string()), licenses: z.optional(z.int()), cloneable: z.optional(z.boolean()), skills: z.optional(z.array(z.string())), connectors: z.optional(z.array(AgentConnector$outboundSchema)), protocols: z.optional(z.array(z.lazy(() => Protocol$outboundSchema))), creator: z.optional(z.string()), cid: z.optional(z.string()), createdAt: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))), }); export function agentCardToJSON(agentCard: AgentCard): string { return JSON.stringify(AgentCard$outboundSchema.parse(agentCard)); }