diff --git a/erpnext-mcp/src/types.ts b/erpnext-mcp/src/types.ts new file mode 100644 index 0000000..5efefff --- /dev/null +++ b/erpnext-mcp/src/types.ts @@ -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 { + data: T; + message?: string; +} + +export interface ERPNextListResponse { + data: T[]; +} + +export interface PaginatedResult { + 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; +}