UNPKG

@launchdarkly/mcp-server

Version:

The local [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for [LaunchDarkly](https://launchdarkly.com/) federal and European Union (EU) environments.

52 lines (46 loc) • 1.15 kB
/* * 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 CoreLink = { href: string; type: string; }; /** @internal */ export const CoreLink$inboundSchema: z.ZodType< CoreLink, z.ZodTypeDef, unknown > = z.object({ href: z.string(), type: z.string(), }); /** @internal */ export type CoreLink$Outbound = { href: string; type: string; }; /** @internal */ export const CoreLink$outboundSchema: z.ZodType< CoreLink$Outbound, z.ZodTypeDef, CoreLink > = z.object({ href: z.string(), type: z.string(), }); export function coreLinkToJSON(coreLink: CoreLink): string { return JSON.stringify(CoreLink$outboundSchema.parse(coreLink)); } export function coreLinkFromJSON( jsonString: string, ): SafeParseResult<CoreLink, SDKValidationError> { return safeParse( jsonString, (x) => CoreLink$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CoreLink' from JSON`, ); }