@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.
37 lines • 1.43 kB
JavaScript
/*
* 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 { FeatureFlag$inboundSchema, FeatureFlag$outboundSchema, } from "./featureflag.js";
import { Link$inboundSchema, Link$outboundSchema, } from "./link.js";
/** @internal */
export const FeatureFlags$inboundSchema = z.object({
items: z.array(FeatureFlag$inboundSchema),
_links: z.record(Link$inboundSchema),
totalCount: z.number().int().optional(),
totalCountWithDifferences: z.number().int().optional(),
}).transform((v) => {
return remap$(v, {
"_links": "links",
});
});
/** @internal */
export const FeatureFlags$outboundSchema = z.object({
items: z.array(FeatureFlag$outboundSchema),
links: z.record(Link$outboundSchema),
totalCount: z.number().int().optional(),
totalCountWithDifferences: z.number().int().optional(),
}).transform((v) => {
return remap$(v, {
links: "_links",
});
});
export function featureFlagsToJSON(featureFlags) {
return JSON.stringify(FeatureFlags$outboundSchema.parse(featureFlags));
}
export function featureFlagsFromJSON(jsonString) {
return safeParse(jsonString, (x) => FeatureFlags$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FeatureFlags' from JSON`);
}
//# sourceMappingURL=featureflags.js.map