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.

82 lines • 3.4 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 { Link$inboundSchema, Link$outboundSchema, } from "./link.js"; import { MetricInGroupRep$inboundSchema, MetricInGroupRep$outboundSchema, } from "./metricingrouprep.js"; /** * If this is a metric, then it represents the kind of event the metric tracks. If this is a metric group, then it represents the group type */ export const DependentMetricOrMetricGroupRepKind = { Pageview: "pageview", Click: "click", Custom: "custom", Trace: "trace", Funnel: "funnel", Standard: "standard", }; /** * The method for analyzing metric events. Only set for individual metrics, not metric groups. */ export const DependentMetricOrMetricGroupRepAnalysisType = { Mean: "mean", Percentile: "percentile", }; /** @internal */ export const DependentMetricOrMetricGroupRepKind$inboundSchema = z.nativeEnum(DependentMetricOrMetricGroupRepKind); /** @internal */ export const DependentMetricOrMetricGroupRepKind$outboundSchema = DependentMetricOrMetricGroupRepKind$inboundSchema; /** @internal */ export const DependentMetricOrMetricGroupRepAnalysisType$inboundSchema = z .nativeEnum(DependentMetricOrMetricGroupRepAnalysisType); /** @internal */ export const DependentMetricOrMetricGroupRepAnalysisType$outboundSchema = DependentMetricOrMetricGroupRepAnalysisType$inboundSchema; /** @internal */ export const DependentMetricOrMetricGroupRep$inboundSchema = z.object({ key: z.string(), _versionId: z.string(), name: z.string(), kind: DependentMetricOrMetricGroupRepKind$inboundSchema, isNumeric: z.boolean().optional(), eventKey: z.string().optional(), _links: z.record(Link$inboundSchema), isGroup: z.boolean(), metrics: z.array(MetricInGroupRep$inboundSchema).optional(), analysisType: DependentMetricOrMetricGroupRepAnalysisType$inboundSchema .optional(), analysisUnit: z.string().optional(), }).transform((v) => { return remap$(v, { "_versionId": "versionId", "_links": "links", }); }); /** @internal */ export const DependentMetricOrMetricGroupRep$outboundSchema = z.object({ key: z.string(), versionId: z.string(), name: z.string(), kind: DependentMetricOrMetricGroupRepKind$outboundSchema, isNumeric: z.boolean().optional(), eventKey: z.string().optional(), links: z.record(Link$outboundSchema), isGroup: z.boolean(), metrics: z.array(MetricInGroupRep$outboundSchema).optional(), analysisType: DependentMetricOrMetricGroupRepAnalysisType$outboundSchema .optional(), analysisUnit: z.string().optional(), }).transform((v) => { return remap$(v, { versionId: "_versionId", links: "_links", }); }); export function dependentMetricOrMetricGroupRepToJSON(dependentMetricOrMetricGroupRep) { return JSON.stringify(DependentMetricOrMetricGroupRep$outboundSchema.parse(dependentMetricOrMetricGroupRep)); } export function dependentMetricOrMetricGroupRepFromJSON(jsonString) { return safeParse(jsonString, (x) => DependentMetricOrMetricGroupRep$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DependentMetricOrMetricGroupRep' from JSON`); } //# sourceMappingURL=dependentmetricormetricgrouprep.js.map