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.

80 lines (74 loc) • 1.93 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Link, Link$inboundSchema, Link$Outbound, Link$outboundSchema, } from "./link.js"; export type MaintainerTeam = { /** * The key of the maintainer team */ key: string; /** * A human-friendly name for the maintainer team */ name: string; /** * The location and content type of related resources */ links?: { [k: string]: Link } | undefined; }; /** @internal */ export const MaintainerTeam$inboundSchema: z.ZodType< MaintainerTeam, z.ZodTypeDef, unknown > = z.object({ key: z.string(), name: z.string(), _links: z.record(Link$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "_links": "links", }); }); /** @internal */ export type MaintainerTeam$Outbound = { key: string; name: string; _links?: { [k: string]: Link$Outbound } | undefined; }; /** @internal */ export const MaintainerTeam$outboundSchema: z.ZodType< MaintainerTeam$Outbound, z.ZodTypeDef, MaintainerTeam > = z.object({ key: z.string(), name: z.string(), links: z.record(Link$outboundSchema).optional(), }).transform((v) => { return remap$(v, { links: "_links", }); }); export function maintainerTeamToJSON(maintainerTeam: MaintainerTeam): string { return JSON.stringify(MaintainerTeam$outboundSchema.parse(maintainerTeam)); } export function maintainerTeamFromJSON( jsonString: string, ): SafeParseResult<MaintainerTeam, SDKValidationError> { return safeParse( jsonString, (x) => MaintainerTeam$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MaintainerTeam' from JSON`, ); }