UNPKG

makima-ts

Version:

Typescript SDK for Makima.

40 lines (39 loc) 1.22 kB
import { ToolParams } from './types'; /** * Class representing the Tool API. */ declare class ToolAPI { private baseUrl; constructor(baseUrl: string); /** * Get all tools in the system. * @returns A promise resolving to the list of tools. */ getAll(): Promise<any>; /** * Get the details of a tool by its name. * @param name The name of the tool. * @returns A promise resolving to the tool details. */ get(name: string): Promise<any>; /** * Create a new tool with the provided details. * @param params The tool details. * @returns A promise resolving to the created tool. */ create(params: ToolParams): Promise<any>; /** * Update the details of an existing tool by its name. * @param name The name of the tool. * @param params The tool details to update. * @returns A promise resolving to the updated tool. */ update(name: string, params: Partial<ToolParams>): Promise<any>; /** * Delete a tool by its name. * @param name The name of the tool. * @returns A promise resolving to the result of the deletion. */ delete(name: string): Promise<any>; } export { ToolAPI };