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.

38 lines • 1.34 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 { ParameterRep$inboundSchema, ParameterRep$outboundSchema, } from "./parameterrep.js"; /** @internal */ export const TreatmentRep$inboundSchema = z.object({ _id: z.string().optional(), name: z.string(), allocationPercent: z.string(), baseline: z.boolean().optional(), parameters: z.array(ParameterRep$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "_id": "id", }); }); /** @internal */ export const TreatmentRep$outboundSchema = z.object({ id: z.string().optional(), name: z.string(), allocationPercent: z.string(), baseline: z.boolean().optional(), parameters: z.array(ParameterRep$outboundSchema).optional(), }).transform((v) => { return remap$(v, { id: "_id", }); }); export function treatmentRepToJSON(treatmentRep) { return JSON.stringify(TreatmentRep$outboundSchema.parse(treatmentRep)); } export function treatmentRepFromJSON(jsonString) { return safeParse(jsonString, (x) => TreatmentRep$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TreatmentRep' from JSON`); } //# sourceMappingURL=treatmentrep.js.map