UNPKG

@edicarlos.lds/businessmap-mcp

Version:

Model Context Protocol server for BusinessMap (Kanbanize) integration

108 lines 3.35 kB
import { BaseClientModuleImpl } from './base-client.js'; export class BoardClient extends BaseClientModuleImpl { /** * Get all boards with optional filters */ async getBoards(filters) { const params = filters || {}; const response = await this.http.get('/boards', { params }); return response.data.data; } /** * Get a specific board by ID */ async getBoard(boardId) { const response = await this.http.get(`/boards/${boardId}`); return response.data.data; } /** * Create a new board */ async createBoard(params) { this.checkReadOnlyMode('create board'); const response = await this.http.post('/boards', params); return response.data.data; } /** * Update an existing board */ async updateBoard(boardId, params) { this.checkReadOnlyMode('update board'); const response = await this.http.patch(`/boards/${boardId}`, params); return response.data.data; } /** * Delete a board */ async deleteBoard(boardId) { this.checkReadOnlyMode('delete board'); await this.http.delete(`/boards/${boardId}`); } /** * Get board structure */ async getBoardStructure(boardId) { const response = await this.http.get(`/boards/${boardId}/structure`); return response.data.data; } /** * Get all columns for a board */ async getColumns(boardId) { const response = await this.http.get(`/boards/${boardId}/columns`); return response.data.data; } /** * Get all lanes/swimlanes for a board */ async getLanes(boardId) { const response = await this.http.get(`/boards/${boardId}/lanes`); return response.data.data; } /** * Get a specific lane by ID */ async getLane(laneId) { const response = await this.http.get(`/lanes/${laneId}`); return response.data.data; } /** * Create a new lane/swimlane */ async createLane(params) { this.checkReadOnlyMode('create lane'); const response = await this.http.post('/lanes', params); return response.data.data; } /** * Get current board structure with detailed configuration */ async getCurrentBoardStructure(boardId) { const response = await this.http.get(`/boards/${boardId}/currentStructure`); return response.data.data; } /** * Create a new column on a board (main column or sub-column) */ async createColumn(boardId, params) { this.checkReadOnlyMode('create column'); const response = await this.http.post(`/boards/${boardId}/columns`, params); return response.data.data; } /** * Update an existing column on a board */ async updateColumn(boardId, columnId, params) { this.checkReadOnlyMode('update column'); const response = await this.http.patch(`/boards/${boardId}/columns/${columnId}`, params); return response.data.data; } /** * Delete a column from a board */ async deleteColumn(boardId, columnId) { this.checkReadOnlyMode('delete column'); await this.http.delete(`/boards/${boardId}/columns/${columnId}`); } } //# sourceMappingURL=board-client.js.map