@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.
66 lines • 2.3 kB
JavaScript
/*
* 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 { Access$inboundSchema, Access$outboundSchema, } from "./access.js";
import { BranchRep$inboundSchema, BranchRep$outboundSchema, } from "./branchrep.js";
/**
* The type of repository
*/
export const RepositoryRepType = {
Bitbucket: "bitbucket",
Custom: "custom",
Github: "github",
Gitlab: "gitlab",
};
/** @internal */
export const RepositoryRepType$inboundSchema = z.nativeEnum(RepositoryRepType);
/** @internal */
export const RepositoryRepType$outboundSchema = RepositoryRepType$inboundSchema;
/** @internal */
export const RepositoryRep$inboundSchema = z.object({
name: z.string(),
sourceLink: z.string().optional(),
commitUrlTemplate: z.string().optional(),
hunkUrlTemplate: z.string().optional(),
type: RepositoryRepType$inboundSchema,
defaultBranch: z.string(),
enabled: z.boolean(),
version: z.number().int(),
branches: z.array(BranchRep$inboundSchema).optional(),
_links: z.record(z.any()),
_access: Access$inboundSchema.optional(),
}).transform((v) => {
return remap$(v, {
"_links": "links",
"_access": "access",
});
});
/** @internal */
export const RepositoryRep$outboundSchema = z.object({
name: z.string(),
sourceLink: z.string().optional(),
commitUrlTemplate: z.string().optional(),
hunkUrlTemplate: z.string().optional(),
type: RepositoryRepType$outboundSchema,
defaultBranch: z.string(),
enabled: z.boolean(),
version: z.number().int(),
branches: z.array(BranchRep$outboundSchema).optional(),
links: z.record(z.any()),
access: Access$outboundSchema.optional(),
}).transform((v) => {
return remap$(v, {
links: "_links",
access: "_access",
});
});
export function repositoryRepToJSON(repositoryRep) {
return JSON.stringify(RepositoryRep$outboundSchema.parse(repositoryRep));
}
export function repositoryRepFromJSON(jsonString) {
return safeParse(jsonString, (x) => RepositoryRep$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RepositoryRep' from JSON`);
}
//# sourceMappingURL=repositoryrep.js.map