Add erpnext-mcp/src/types.ts

This commit is contained in:
Zac Gaetano 2026-03-31 15:33:30 -04:00
parent bba62faf23
commit 6b8287d727

52
erpnext-mcp/src/types.ts Normal file
View file

@ -0,0 +1,52 @@
export interface ERPNextConfig {
baseUrl: string;
apiKey: string;
apiSecret: string;
}
export interface ERPNextListParams {
fields?: string[];
filters?: Array<[string, string, string, string | number | boolean]>;
or_filters?: Array<[string, string, string, string | number | boolean]>;
order_by?: string;
limit_start?: number;
limit_page_length?: number;
group_by?: string;
}
export interface ERPNextResponse<T = unknown> {
data: T;
message?: string;
}
export interface ERPNextListResponse<T = unknown> {
data: T[];
}
export interface PaginatedResult<T = unknown> {
total: number;
count: number;
offset: number;
items: T[];
has_more: boolean;
next_offset?: number;
}
export interface DocInfo {
name: string;
doctype: string;
[key: string]: unknown;
}
export interface ToolCategory {
name: string;
description: string;
tools: ToolDefinition[];
}
export interface ToolDefinition {
name: string;
title: string;
description: string;
register: (server: unknown, client: unknown) => void;
}