@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.6 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 DeleteFeatureFlagRequest = {
/**
* The project key
*/
projectKey: string;
/**
* The feature flag key. The key identifies the flag in your code.
*/
featureFlagKey: string;
};
/** @internal */
export const DeleteFeatureFlagRequest$inboundSchema: z.ZodType<
DeleteFeatureFlagRequest,
z.ZodTypeDef,
unknown
> = z.object({
projectKey: z.string(),
featureFlagKey: z.string(),
});
/** @internal */
export type DeleteFeatureFlagRequest$Outbound = {
projectKey: string;
featureFlagKey: string;
};
/** @internal */
export const DeleteFeatureFlagRequest$outboundSchema: z.ZodType<
DeleteFeatureFlagRequest$Outbound,
z.ZodTypeDef,
DeleteFeatureFlagRequest
> = z.object({
projectKey: z.string(),
featureFlagKey: z.string(),
});
export function deleteFeatureFlagRequestToJSON(
deleteFeatureFlagRequest: DeleteFeatureFlagRequest,
): string {
return JSON.stringify(
DeleteFeatureFlagRequest$outboundSchema.parse(deleteFeatureFlagRequest),
);
}
export function deleteFeatureFlagRequestFromJSON(
jsonString: string,
): SafeParseResult<DeleteFeatureFlagRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => DeleteFeatureFlagRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'DeleteFeatureFlagRequest' from JSON`,
);
}