jsonv-ts
Version:
JSON Schema builder and validator for TypeScript with static type inference, Hono middleware for OpenAPI generation and validation, and MCP server/client implementation. Lightweight, dependency-free, and built on Web Standards.
72 lines (71 loc) • 2.44 kB
TypeScript
import * as s from "jsonv-ts";
import { RpcMessage, type TRpcRequest } from "../rpc";
export declare class ResourcesListMessage extends RpcMessage {
method: string;
params: s.ObjectSchema<{}, s.IObjectOptions> & s.IObjectOptions;
respond(message: TRpcRequest): Promise<import("..").TRpcResponse<{
resources: {
[x: string]: string | number | {
[key: string]: unknown;
} | undefined;
name: any;
title: string | undefined;
description: string | undefined;
mimeType: string | undefined;
size: number | undefined;
_meta: {
[key: string]: unknown;
} | undefined;
}[];
}>>;
}
export declare class ResourcesTemplatesListMessage extends RpcMessage {
method: string;
params: s.ObjectSchema<{}, s.IObjectOptions> & s.IObjectOptions;
respond(message: TRpcRequest): Promise<import("..").TRpcResponse<{
resourceTemplates: {
[x: string]: string | number | {
[key: string]: unknown;
} | undefined;
name: any;
title: string | undefined;
description: string | undefined;
mimeType: string | undefined;
size: number | undefined;
_meta: {
[key: string]: unknown;
} | undefined;
}[];
}>>;
}
export declare class ResourcesReadMessage extends RpcMessage {
method: string;
params: s.ObjectSchema<{
readonly uri: s.StringSchema<s.IStringOptions> & s.IStringOptions;
}, s.IObjectOptions> & s.IObjectOptions;
respond(message: TRpcRequest<typeof this.params>, request: Request): Promise<import("..").TRpcResponse<{
contents: ({
mimeType: string;
title?: string;
description?: string;
text?: string;
uri: `${string}://${string}`;
name: string;
size: number | undefined;
_meta: {
[key: string]: unknown;
} | undefined;
} | {
mimeType: string;
title?: string;
description?: string;
blob?: string;
uri: `${string}://${string}`;
name: string;
size: number | undefined;
_meta: {
[key: string]: unknown;
} | undefined;
})[];
}>>;
}