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.

85 lines (79 loc) • 2.36 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 { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PatchAIConfigTargetingRequest = { /** * The project key */ projectKey: string; /** * The AI Config key */ configKey: string; /** * AI Config targeting semantic patch instructions */ aiConfigTargetingPatch?: components.AIConfigTargetingPatch | undefined; }; /** @internal */ export const PatchAIConfigTargetingRequest$inboundSchema: z.ZodType< PatchAIConfigTargetingRequest, z.ZodTypeDef, unknown > = z.object({ projectKey: z.string(), configKey: z.string(), AIConfigTargetingPatch: components.AIConfigTargetingPatch$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "AIConfigTargetingPatch": "aiConfigTargetingPatch", }); }); /** @internal */ export type PatchAIConfigTargetingRequest$Outbound = { projectKey: string; configKey: string; AIConfigTargetingPatch?: | components.AIConfigTargetingPatch$Outbound | undefined; }; /** @internal */ export const PatchAIConfigTargetingRequest$outboundSchema: z.ZodType< PatchAIConfigTargetingRequest$Outbound, z.ZodTypeDef, PatchAIConfigTargetingRequest > = z.object({ projectKey: z.string(), configKey: z.string(), aiConfigTargetingPatch: components.AIConfigTargetingPatch$outboundSchema .optional(), }).transform((v) => { return remap$(v, { aiConfigTargetingPatch: "AIConfigTargetingPatch", }); }); export function patchAIConfigTargetingRequestToJSON( patchAIConfigTargetingRequest: PatchAIConfigTargetingRequest, ): string { return JSON.stringify( PatchAIConfigTargetingRequest$outboundSchema.parse( patchAIConfigTargetingRequest, ), ); } export function patchAIConfigTargetingRequestFromJSON( jsonString: string, ): SafeParseResult<PatchAIConfigTargetingRequest, SDKValidationError> { return safeParse( jsonString, (x) => PatchAIConfigTargetingRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchAIConfigTargetingRequest' from JSON`, ); }