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.

106 lines • 4.99 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.FeatureFlagBody$outboundSchema = exports.FeatureFlagBody$inboundSchema = exports.Purpose$outboundSchema = exports.Purpose$inboundSchema = exports.Purpose = void 0; exports.featureFlagBodyToJSON = featureFlagBodyToJSON; exports.featureFlagBodyFromJSON = featureFlagBodyFromJSON; const z = __importStar(require("zod/v3")); const schemas_js_1 = require("../../lib/schemas.js"); const clientsideavailabilitypost_js_1 = require("./clientsideavailabilitypost.js"); const customproperty_js_1 = require("./customproperty.js"); const defaults_js_1 = require("./defaults.js"); const flagprerequisitepost_js_1 = require("./flagprerequisitepost.js"); const migrationsettingspost_js_1 = require("./migrationsettingspost.js"); const variation_js_1 = require("./variation.js"); /** * Purpose of the flag */ exports.Purpose = { Migration: "migration", Holdout: "holdout", }; /** @internal */ exports.Purpose$inboundSchema = z .nativeEnum(exports.Purpose); /** @internal */ exports.Purpose$outboundSchema = exports.Purpose$inboundSchema; /** @internal */ exports.FeatureFlagBody$inboundSchema = z.object({ name: z.string(), key: z.string(), description: z.string().optional(), includeInSnippet: z.boolean().optional(), clientSideAvailability: clientsideavailabilitypost_js_1.ClientSideAvailabilityPost$inboundSchema.optional(), variations: z.array(variation_js_1.Variation$inboundSchema).optional(), temporary: z.boolean().optional(), tags: z.array(z.string()).optional(), customProperties: z.record(customproperty_js_1.CustomProperty$inboundSchema).optional(), defaults: defaults_js_1.Defaults$inboundSchema.optional(), purpose: exports.Purpose$inboundSchema.optional(), migrationSettings: migrationsettingspost_js_1.MigrationSettingsPost$inboundSchema.optional(), maintainerId: z.string().optional(), maintainerTeamKey: z.string().optional(), initialPrerequisites: z.array(flagprerequisitepost_js_1.FlagPrerequisitePost$inboundSchema).optional(), isFlagOn: z.boolean().optional(), }); /** @internal */ exports.FeatureFlagBody$outboundSchema = z.object({ name: z.string(), key: z.string(), description: z.string().optional(), includeInSnippet: z.boolean().optional(), clientSideAvailability: clientsideavailabilitypost_js_1.ClientSideAvailabilityPost$outboundSchema.optional(), variations: z.array(variation_js_1.Variation$outboundSchema).optional(), temporary: z.boolean().optional(), tags: z.array(z.string()).optional(), customProperties: z.record(customproperty_js_1.CustomProperty$outboundSchema).optional(), defaults: defaults_js_1.Defaults$outboundSchema.optional(), purpose: exports.Purpose$outboundSchema.optional(), migrationSettings: migrationsettingspost_js_1.MigrationSettingsPost$outboundSchema.optional(), maintainerId: z.string().optional(), maintainerTeamKey: z.string().optional(), initialPrerequisites: z.array(flagprerequisitepost_js_1.FlagPrerequisitePost$outboundSchema).optional(), isFlagOn: z.boolean().optional(), }); function featureFlagBodyToJSON(featureFlagBody) { return JSON.stringify(exports.FeatureFlagBody$outboundSchema.parse(featureFlagBody)); } function featureFlagBodyFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FeatureFlagBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FeatureFlagBody' from JSON`); } //# sourceMappingURL=featureflagbody.js.map