@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.
30 lines • 1.35 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { ExperimentAllocationRep$inboundSchema, ExperimentAllocationRep$outboundSchema, } from "./experimentallocationrep.js";
import { WeightedVariation$inboundSchema, WeightedVariation$outboundSchema, } from "./weightedvariation.js";
/** @internal */
export const Rollout$inboundSchema = z.object({
variations: z.array(WeightedVariation$inboundSchema),
experimentAllocation: ExperimentAllocationRep$inboundSchema.optional(),
seed: z.number().int().optional(),
bucketBy: z.string().optional(),
contextKind: z.string().optional(),
});
/** @internal */
export const Rollout$outboundSchema = z.object({
variations: z.array(WeightedVariation$outboundSchema),
experimentAllocation: ExperimentAllocationRep$outboundSchema.optional(),
seed: z.number().int().optional(),
bucketBy: z.string().optional(),
contextKind: z.string().optional(),
});
export function rolloutToJSON(rollout) {
return JSON.stringify(Rollout$outboundSchema.parse(rollout));
}
export function rolloutFromJSON(jsonString) {
return safeParse(jsonString, (x) => Rollout$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Rollout' from JSON`);
}
//# sourceMappingURL=rollout.js.map