@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.
54 lines (48 loc) • 1.28 kB
text/typescript
/*
* 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";
import {
CoreLink,
CoreLink$inboundSchema,
CoreLink$Outbound,
CoreLink$outboundSchema,
} from "./corelink.js";
export type ParentLink = {
parent: CoreLink;
};
/** @internal */
export const ParentLink$inboundSchema: z.ZodType<
ParentLink,
z.ZodTypeDef,
unknown
> = z.object({
parent: CoreLink$inboundSchema,
});
/** @internal */
export type ParentLink$Outbound = {
parent: CoreLink$Outbound;
};
/** @internal */
export const ParentLink$outboundSchema: z.ZodType<
ParentLink$Outbound,
z.ZodTypeDef,
ParentLink
> = z.object({
parent: CoreLink$outboundSchema,
});
export function parentLinkToJSON(parentLink: ParentLink): string {
return JSON.stringify(ParentLink$outboundSchema.parse(parentLink));
}
export function parentLinkFromJSON(
jsonString: string,
): SafeParseResult<ParentLink, SDKValidationError> {
return safeParse(
jsonString,
(x) => ParentLink$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ParentLink' from JSON`,
);
}