sap-b1-mcp-server
Version:
SAP Business One Service Layer MCP Server
25 lines (24 loc) • 910 B
TypeScript
export interface SuccessResponse<T = any> {
success: true;
count?: number;
data?: T;
message?: string;
pagination?: PaginationInfo;
}
export interface PaginationInfo {
hasNextPage: boolean;
nextLink?: string;
currentPage?: number;
pageSize?: number;
totalCount?: number;
}
export interface ErrorResponse {
success: false;
error: string;
details?: string;
}
export type ToolResponse<T = any> = SuccessResponse<T> | ErrorResponse;
export declare function createSuccessResponse<T>(data?: T, count?: number, message?: string): SuccessResponse<T>;
export declare function createErrorResponse(error: string, details?: string): ErrorResponse;
export declare function createListResponse<T>(items: T[], message?: string, pagination?: PaginationInfo): SuccessResponse<T[]>;
export declare function createItemResponse<T>(item: T, message?: string): SuccessResponse<T>;