@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.
57 lines (51 loc) • 1.34 kB
text/typescript
/*
* 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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type Security = {
apiKey?: string | undefined;
};
/** @internal */
export const Security$inboundSchema: z.ZodType<
Security,
z.ZodTypeDef,
unknown
> = z.object({
ApiKey: z.string().optional(),
}).transform((v) => {
return remap$(v, {
"ApiKey": "apiKey",
});
});
/** @internal */
export type Security$Outbound = {
ApiKey?: string | undefined;
};
/** @internal */
export const Security$outboundSchema: z.ZodType<
Security$Outbound,
z.ZodTypeDef,
Security
> = z.object({
apiKey: z.string().optional(),
}).transform((v) => {
return remap$(v, {
apiKey: "ApiKey",
});
});
export function securityToJSON(security: Security): string {
return JSON.stringify(Security$outboundSchema.parse(security));
}
export function securityFromJSON(
jsonString: string,
): SafeParseResult<Security, SDKValidationError> {
return safeParse(
jsonString,
(x) => Security$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Security' from JSON`,
);
}