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.

129 lines • 6.3 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.IterationRep$outboundSchema = exports.IterationRep$inboundSchema = exports.Status$outboundSchema = exports.Status$inboundSchema = exports.Status = void 0; exports.iterationRepToJSON = iterationRepToJSON; exports.iterationRepFromJSON = iterationRepFromJSON; const z = __importStar(require("zod/v3")); const primitives_js_1 = require("../../lib/primitives.js"); const schemas_js_1 = require("../../lib/schemas.js"); const covariateinforep_js_1 = require("./covariateinforep.js"); const dependentmetricgrouprepwithmetrics_js_1 = require("./dependentmetricgrouprepwithmetrics.js"); const dependentmetricormetricgrouprep_js_1 = require("./dependentmetricormetricgrouprep.js"); const flagrep_js_1 = require("./flagrep.js"); const layersnapshotrep_js_1 = require("./layersnapshotrep.js"); const metricv2rep_js_1 = require("./metricv2rep.js"); const treatmentrep_js_1 = require("./treatmentrep.js"); /** * The status of the iteration: <code>not_started</code>, <code>running</code>, <code>stopped</code> */ exports.Status = { NotStarted: "not_started", Running: "running", Stopped: "stopped", }; /** @internal */ exports.Status$inboundSchema = z .nativeEnum(exports.Status); /** @internal */ exports.Status$outboundSchema = exports.Status$inboundSchema; /** @internal */ exports.IterationRep$inboundSchema = z.object({ _id: z.string().optional(), hypothesis: z.string().optional(), status: exports.Status$inboundSchema, createdAt: z.number().int(), startedAt: z.number().int().optional(), endedAt: z.number().int().optional(), winningTreatmentId: z.string().optional(), winningReason: z.string().optional(), canReshuffleTraffic: z.boolean().optional(), flags: z.record(flagrep_js_1.FlagRep$inboundSchema).optional(), reallocationFrequencyMillis: z.number().int().optional(), version: z.number().int().optional(), primaryMetric: dependentmetricormetricgrouprep_js_1.DependentMetricOrMetricGroupRep$inboundSchema.optional(), primarySingleMetric: metricv2rep_js_1.MetricV2Rep$inboundSchema.optional(), primaryFunnel: dependentmetricgrouprepwithmetrics_js_1.DependentMetricGroupRepWithMetrics$inboundSchema.optional(), randomizationUnit: z.string().optional(), attributes: z.array(z.string()).optional(), treatments: z.array(treatmentrep_js_1.TreatmentRep$inboundSchema).optional(), secondaryMetrics: z.array(metricv2rep_js_1.MetricV2Rep$inboundSchema).optional(), metrics: z.array(dependentmetricormetricgrouprep_js_1.DependentMetricOrMetricGroupRep$inboundSchema).optional(), layerSnapshot: layersnapshotrep_js_1.LayerSnapshotRep$inboundSchema.optional(), covariateInfo: covariateinforep_js_1.CovariateInfoRep$inboundSchema.optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "_id": "id", }); }); /** @internal */ exports.IterationRep$outboundSchema = z.object({ id: z.string().optional(), hypothesis: z.string().optional(), status: exports.Status$outboundSchema, createdAt: z.number().int(), startedAt: z.number().int().optional(), endedAt: z.number().int().optional(), winningTreatmentId: z.string().optional(), winningReason: z.string().optional(), canReshuffleTraffic: z.boolean().optional(), flags: z.record(flagrep_js_1.FlagRep$outboundSchema).optional(), reallocationFrequencyMillis: z.number().int().optional(), version: z.number().int().optional(), primaryMetric: dependentmetricormetricgrouprep_js_1.DependentMetricOrMetricGroupRep$outboundSchema.optional(), primarySingleMetric: metricv2rep_js_1.MetricV2Rep$outboundSchema.optional(), primaryFunnel: dependentmetricgrouprepwithmetrics_js_1.DependentMetricGroupRepWithMetrics$outboundSchema.optional(), randomizationUnit: z.string().optional(), attributes: z.array(z.string()).optional(), treatments: z.array(treatmentrep_js_1.TreatmentRep$outboundSchema).optional(), secondaryMetrics: z.array(metricv2rep_js_1.MetricV2Rep$outboundSchema).optional(), metrics: z.array(dependentmetricormetricgrouprep_js_1.DependentMetricOrMetricGroupRep$outboundSchema).optional(), layerSnapshot: layersnapshotrep_js_1.LayerSnapshotRep$outboundSchema.optional(), covariateInfo: covariateinforep_js_1.CovariateInfoRep$outboundSchema.optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { id: "_id", }); }); function iterationRepToJSON(iterationRep) { return JSON.stringify(exports.IterationRep$outboundSchema.parse(iterationRep)); } function iterationRepFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.IterationRep$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IterationRep' from JSON`); } //# sourceMappingURL=iterationrep.js.map