@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.
71 lines (65 loc) • 1.75 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type GetAIConfigVariationRequest = {
/**
* The project key
*/
projectKey: string;
/**
* The AI Config key
*/
configKey: string;
/**
* The AI Config variation key
*/
variationKey: string;
};
/** @internal */
export const GetAIConfigVariationRequest$inboundSchema: z.ZodType<
GetAIConfigVariationRequest,
z.ZodTypeDef,
unknown
> = z.object({
projectKey: z.string(),
configKey: z.string(),
variationKey: z.string(),
});
/** @internal */
export type GetAIConfigVariationRequest$Outbound = {
projectKey: string;
configKey: string;
variationKey: string;
};
/** @internal */
export const GetAIConfigVariationRequest$outboundSchema: z.ZodType<
GetAIConfigVariationRequest$Outbound,
z.ZodTypeDef,
GetAIConfigVariationRequest
> = z.object({
projectKey: z.string(),
configKey: z.string(),
variationKey: z.string(),
});
export function getAIConfigVariationRequestToJSON(
getAIConfigVariationRequest: GetAIConfigVariationRequest,
): string {
return JSON.stringify(
GetAIConfigVariationRequest$outboundSchema.parse(
getAIConfigVariationRequest,
),
);
}
export function getAIConfigVariationRequestFromJSON(
jsonString: string,
): SafeParseResult<GetAIConfigVariationRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAIConfigVariationRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAIConfigVariationRequest' from JSON`,
);
}