import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import type { BohsaCrmClient } from '../api-client.js'; /** * Shared config for the generic CRUD tool registrars below. Keeps every * get/create/update/delete tool consistent: returns the affected row, decodes * enum codes into `_label`, and surfaces clean errors. */ export interface CrudConfig { /** Human singular, used in tool names + descriptions, e.g. "company". */ resource: string; /** Base API path, e.g. "/api/companies". */ path: string; /** DB table name for enum annotation (optional). */ table?: string; /** Description of the id parameter. */ idDescription?: string; /** Extra guidance appended to create/update data descriptions (e.g. status codes). */ dataHint?: string; } /** Register get_ — fetch a single record by ID. */ export declare function registerGet(server: McpServer, client: BohsaCrmClient, config: CrudConfig): void; /** Register create_ — create a record and return the new row. */ export declare function registerCreate(server: McpServer, client: BohsaCrmClient, config: CrudConfig): void; /** Register update_ — patch/put a record by ID and return the updated row. */ export declare function registerUpdate(server: McpServer, client: BohsaCrmClient, config: CrudConfig, method?: 'patch' | 'put'): void; /** Register delete_ (or archive) — remove a record by ID. */ export declare function registerDelete(server: McpServer, client: BohsaCrmClient, config: CrudConfig, opts?: { verb?: 'delete' | 'archive'; note?: string; }): void; /** Convenience: register several CRUD verbs for one resource at once. */ export declare function registerCrud(server: McpServer, client: BohsaCrmClient, config: CrudConfig, ops: { get?: boolean; create?: boolean; update?: boolean | 'patch' | 'put'; delete?: boolean | { verb?: 'delete' | 'archive'; note?: string; }; }): void; //# sourceMappingURL=crud.d.ts.map