breathe-api
Version:
Model Context Protocol server for Breathe HR APIs with Swagger/OpenAPI support - also works with custom APIs
172 lines • 5.81 kB
TypeScript
import { z } from 'zod';
export declare const HttpMethodSchema: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>;
export type HttpMethod = z.infer<typeof HttpMethodSchema>;
export declare const ApiRequestSchema: z.ZodObject<{
url: z.ZodString;
method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>;
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
data: z.ZodOptional<z.ZodAny>;
timeout: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
url: string;
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
timeout?: number | undefined;
headers?: Record<string, string> | undefined;
params?: Record<string, string> | undefined;
data?: any;
}, {
url: string;
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
timeout?: number | undefined;
headers?: Record<string, string> | undefined;
params?: Record<string, string> | undefined;
data?: any;
}>;
export type ApiRequest = z.infer<typeof ApiRequestSchema>;
export declare const SwaggerSpecSchema: z.ZodObject<{
url: z.ZodOptional<z.ZodString>;
spec: z.ZodOptional<z.ZodAny>;
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
generateTypes: z.ZodDefault<z.ZodBoolean>;
outputPath: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
generateTypes: boolean;
url?: string | undefined;
headers?: Record<string, string> | undefined;
spec?: any;
outputPath?: string | undefined;
}, {
url?: string | undefined;
headers?: Record<string, string> | undefined;
spec?: any;
generateTypes?: boolean | undefined;
outputPath?: string | undefined;
}>;
export type SwaggerSpec = z.infer<typeof SwaggerSpecSchema>;
export declare const CodeGenerationSchema: z.ZodObject<{
swaggerUrl: z.ZodString;
swaggerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
platform: z.ZodEnum<["react", "react-native", "nextjs", "ruby"]>;
outputDir: z.ZodString;
baseUrl: z.ZodOptional<z.ZodString>;
authType: z.ZodDefault<z.ZodEnum<["none", "bearer", "api-key", "oauth"]>>;
features: z.ZodOptional<z.ZodObject<{
hooks: z.ZodDefault<z.ZodBoolean>;
errorHandling: z.ZodDefault<z.ZodBoolean>;
caching: z.ZodDefault<z.ZodBoolean>;
validation: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
validation: boolean;
hooks: boolean;
errorHandling: boolean;
caching: boolean;
}, {
validation?: boolean | undefined;
hooks?: boolean | undefined;
errorHandling?: boolean | undefined;
caching?: boolean | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
swaggerUrl: string;
platform: "react" | "react-native" | "nextjs" | "ruby";
authType: "none" | "bearer" | "api-key" | "oauth";
outputDir: string;
baseUrl?: string | undefined;
swaggerHeaders?: Record<string, string> | undefined;
features?: {
validation: boolean;
hooks: boolean;
errorHandling: boolean;
caching: boolean;
} | undefined;
}, {
swaggerUrl: string;
platform: "react" | "react-native" | "nextjs" | "ruby";
outputDir: string;
baseUrl?: string | undefined;
authType?: "none" | "bearer" | "api-key" | "oauth" | undefined;
swaggerHeaders?: Record<string, string> | undefined;
features?: {
validation?: boolean | undefined;
hooks?: boolean | undefined;
errorHandling?: boolean | undefined;
caching?: boolean | undefined;
} | undefined;
}>;
export type CodeGeneration = z.infer<typeof CodeGenerationSchema>;
export declare const FeatureExplanationSchema: z.ZodObject<{
swaggerUrl: z.ZodOptional<z.ZodString>;
swaggerHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
feature: z.ZodString;
platform: z.ZodDefault<z.ZodEnum<["react", "react-native", "nextjs", "ruby", "both"]>>;
}, "strip", z.ZodTypeAny, {
platform: "react" | "react-native" | "nextjs" | "ruby" | "both";
feature: string;
swaggerUrl?: string | undefined;
swaggerHeaders?: Record<string, string> | undefined;
}, {
feature: string;
swaggerUrl?: string | undefined;
platform?: "react" | "react-native" | "nextjs" | "ruby" | "both" | undefined;
swaggerHeaders?: Record<string, string> | undefined;
}>;
export type FeatureExplanation = z.infer<typeof FeatureExplanationSchema>;
export interface SwaggerPath {
[method: string]: {
summary?: string;
description?: string;
operationId?: string;
parameters?: Array<{
name: string;
in: 'query' | 'header' | 'path' | 'cookie';
required?: boolean;
schema?: any;
}>;
requestBody?: {
content?: {
[contentType: string]: {
schema?: any;
};
};
};
responses?: {
[statusCode: string]: {
description?: string;
content?: {
[contentType: string]: {
schema?: any;
};
};
};
};
};
}
export interface SwaggerDocument {
openapi?: string;
swagger?: string;
info?: {
title?: string;
version?: string;
description?: string;
};
servers?: Array<{
url: string;
description?: string;
}>;
host?: string;
basePath?: string;
schemes?: string[];
paths?: {
[path: string]: SwaggerPath;
};
components?: {
schemas?: {
[key: string]: any;
};
};
definitions?: {
[key: string]: any;
};
}
//# sourceMappingURL=api.d.ts.map