@vreippainen/hevy-mcp-server
Version:
A MCP server for Hevy
35 lines (34 loc) • 942 B
TypeScript
/**
* Utility functions for API responses
*/
export interface ResponseContent {
[key: string]: unknown;
type: 'text';
text: string;
}
export interface Response {
[key: string]: unknown;
content: ResponseContent[];
}
export interface ErrorResponseData {
success: false;
message: string;
}
export interface SuccessResponseData extends Record<string, unknown> {
success: true;
}
/**
* Creates a standardized error response object
* @param message The error message to include in the response
*/
export declare function createErrorResponse(message: string): Response;
/**
* Creates a standardized response object
* @param data The data to include in the response
*/
export declare function createResponse<T>(data: T): Response;
/**
* Creates a standardized success response object
* @param data The data to include in the response
*/
export declare function createSuccessResponse<T>(data: T): Response;