53 lines
1 KiB
TypeScript
53 lines
1 KiB
TypeScript
|
|
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;
|
||
|
|
}
|