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.

83 lines (77 loc) • 2.22 kB
/* * 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 GetAIConfigsRequest = { /** * The project key */ projectKey: string; /** * A sort to apply to the list of AgentControl configs. */ sort?: string | undefined; /** * The number of resources to return. */ limit?: number | undefined; /** * Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. */ offset?: number | undefined; /** * A filter to apply to the list. */ filter?: string | undefined; }; /** @internal */ export const GetAIConfigsRequest$inboundSchema: z.ZodType< GetAIConfigsRequest, z.ZodTypeDef, unknown > = z.object({ projectKey: z.string(), sort: z.string().optional(), limit: z.number().int().optional(), offset: z.number().int().optional(), filter: z.string().optional(), }); /** @internal */ export type GetAIConfigsRequest$Outbound = { projectKey: string; sort?: string | undefined; limit?: number | undefined; offset?: number | undefined; filter?: string | undefined; }; /** @internal */ export const GetAIConfigsRequest$outboundSchema: z.ZodType< GetAIConfigsRequest$Outbound, z.ZodTypeDef, GetAIConfigsRequest > = z.object({ projectKey: z.string(), sort: z.string().optional(), limit: z.number().int().optional(), offset: z.number().int().optional(), filter: z.string().optional(), }); export function getAIConfigsRequestToJSON( getAIConfigsRequest: GetAIConfigsRequest, ): string { return JSON.stringify( GetAIConfigsRequest$outboundSchema.parse(getAIConfigsRequest), ); } export function getAIConfigsRequestFromJSON( jsonString: string, ): SafeParseResult<GetAIConfigsRequest, SDKValidationError> { return safeParse( jsonString, (x) => GetAIConfigsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAIConfigsRequest' from JSON`, ); }