Add mcp-gateway/erpnext-mcp/src/types.ts
This commit is contained in:
parent
10a845b748
commit
b4691950d2
1 changed files with 52 additions and 0 deletions
52
mcp-gateway/erpnext-mcp/src/types.ts
Normal file
52
mcp-gateway/erpnext-mcp/src/types.ts
Normal 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;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue