/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 8b66aa2d8d8a */ import * as z from "zod/v4"; import { RegistrySharingScope, RegistrySharingScope$outboundSchema, } from "./registrysharingscope.js"; import { ShareRelation, ShareRelation$outboundSchema, } from "./sharerelation.js"; import { SkillDefinition, SkillDefinition$Outbound, SkillDefinition$outboundSchema, } from "./skilldefinition.js"; export type CreateSkillRequest = { /** * Stable object name. */ name: string; /** * Versioned skill content. */ definition: SkillDefinition; /** * Notes for this version. */ notes?: string | null | undefined; sharingScope?: RegistrySharingScope | undefined; /** * Aliases pointing to this version. */ aliases?: Array | undefined; /** * Relation a subject holds on a shared registry object. */ workspaceRelation?: ShareRelation | undefined; }; /** @internal */ export type CreateSkillRequest$Outbound = { name: string; definition: SkillDefinition$Outbound; notes?: string | null | undefined; sharingScope?: string | undefined; aliases?: Array | undefined; workspaceRelation?: string | undefined; }; /** @internal */ export const CreateSkillRequest$outboundSchema: z.ZodType< CreateSkillRequest$Outbound, CreateSkillRequest > = z.object({ name: z.string(), definition: SkillDefinition$outboundSchema, notes: z.nullable(z.string()).optional(), sharingScope: RegistrySharingScope$outboundSchema.optional(), aliases: z.array(z.string()).optional(), workspaceRelation: ShareRelation$outboundSchema.optional(), }); export function createSkillRequestToJSON( createSkillRequest: CreateSkillRequest, ): string { return JSON.stringify( CreateSkillRequest$outboundSchema.parse(createSkillRequest), ); }