@edicarlos.lds/businessmap-mcp
Version:
Model Context Protocol server for BusinessMap (Kanbanize) integration
85 lines • 2.52 kB
JavaScript
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;
}
}
//# sourceMappingURL=board-client.js.map