@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.
62 lines (56 loc) • 1.44 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 GetAIConfigRequest = {
/**
* The project key
*/
projectKey: string;
/**
* The AI Config key
*/
configKey: string;
};
/** @internal */
export const GetAIConfigRequest$inboundSchema: z.ZodType<
GetAIConfigRequest,
z.ZodTypeDef,
unknown
> = z.object({
projectKey: z.string(),
configKey: z.string(),
});
/** @internal */
export type GetAIConfigRequest$Outbound = {
projectKey: string;
configKey: string;
};
/** @internal */
export const GetAIConfigRequest$outboundSchema: z.ZodType<
GetAIConfigRequest$Outbound,
z.ZodTypeDef,
GetAIConfigRequest
> = z.object({
projectKey: z.string(),
configKey: z.string(),
});
export function getAIConfigRequestToJSON(
getAIConfigRequest: GetAIConfigRequest,
): string {
return JSON.stringify(
GetAIConfigRequest$outboundSchema.parse(getAIConfigRequest),
);
}
export function getAIConfigRequestFromJSON(
jsonString: string,
): SafeParseResult<GetAIConfigRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAIConfigRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAIConfigRequest' from JSON`,
);
}