@edicarlos.lds/businessmap-mcp 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -17
- package/dist/client/businessmap-client.d.ts +38 -24
- package/dist/client/businessmap-client.d.ts.map +1 -1
- package/dist/client/businessmap-client.js +115 -128
- package/dist/client/businessmap-client.js.map +1 -1
- package/dist/client/modules/analytics-client.d.ts +13 -0
- package/dist/client/modules/analytics-client.d.ts.map +1 -0
- package/dist/client/modules/analytics-client.js +18 -0
- package/dist/client/modules/analytics-client.js.map +1 -0
- package/dist/client/modules/base-client.d.ts +34 -0
- package/dist/client/modules/base-client.d.ts.map +1 -0
- package/dist/client/modules/base-client.js +20 -0
- package/dist/client/modules/base-client.js.map +1 -0
- package/dist/client/modules/board-client.d.ts +54 -0
- package/dist/client/modules/board-client.d.ts.map +1 -0
- package/dist/client/modules/board-client.js +78 -0
- package/dist/client/modules/board-client.js.map +1 -0
- package/dist/client/modules/card-client.d.ts +93 -0
- package/dist/client/modules/card-client.d.ts.map +1 -0
- package/dist/client/modules/card-client.js +55 -0
- package/dist/client/modules/card-client.js.map +1 -0
- package/dist/client/modules/custom-field-client.d.ts +9 -0
- package/dist/client/modules/custom-field-client.d.ts.map +1 -0
- package/dist/client/modules/custom-field-client.js +11 -0
- package/dist/client/modules/custom-field-client.js.map +1 -0
- package/dist/client/modules/index.d.ts +8 -0
- package/dist/client/modules/index.d.ts.map +1 -0
- package/dist/client/modules/index.js +8 -0
- package/dist/client/modules/index.js.map +1 -0
- package/dist/client/modules/user-client.d.ts +13 -0
- package/dist/client/modules/user-client.d.ts.map +1 -0
- package/dist/client/modules/user-client.js +18 -0
- package/dist/client/modules/user-client.js.map +1 -0
- package/dist/client/modules/utility-client.d.ts +12 -0
- package/dist/client/modules/utility-client.d.ts.map +1 -0
- package/dist/client/modules/utility-client.js +47 -0
- package/dist/client/modules/utility-client.js.map +1 -0
- package/dist/client/modules/workspace-client.d.ts +25 -0
- package/dist/client/modules/workspace-client.d.ts.map +1 -0
- package/dist/client/modules/workspace-client.js +41 -0
- package/dist/client/modules/workspace-client.js.map +1 -0
- package/dist/config/environment.d.ts +1 -1
- package/dist/config/environment.d.ts.map +1 -1
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/dist/server/mcp-server.d.ts +4 -6
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +24 -564
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/server/tools/base-tool.d.ts +34 -0
- package/dist/server/tools/base-tool.d.ts.map +1 -0
- package/dist/server/tools/base-tool.js +30 -0
- package/dist/server/tools/base-tool.js.map +1 -0
- package/dist/server/tools/board-tools.d.ts +15 -0
- package/dist/server/tools/board-tools.d.ts.map +1 -0
- package/dist/server/tools/board-tools.js +315 -0
- package/dist/server/tools/board-tools.js.map +1 -0
- package/dist/server/tools/card-tools.d.ts +14 -0
- package/dist/server/tools/card-tools.d.ts.map +1 -0
- package/dist/server/tools/card-tools.js +618 -0
- package/dist/server/tools/card-tools.js.map +1 -0
- package/dist/server/tools/custom-field-tools.d.ts +8 -0
- package/dist/server/tools/custom-field-tools.d.ts.map +1 -0
- package/dist/server/tools/custom-field-tools.js +25 -0
- package/dist/server/tools/custom-field-tools.js.map +1 -0
- package/dist/server/tools/cycle-time-tools.d.ts +9 -0
- package/dist/server/tools/cycle-time-tools.d.ts.map +1 -0
- package/dist/server/tools/cycle-time-tools.js +43 -0
- package/dist/server/tools/cycle-time-tools.js.map +1 -0
- package/dist/server/tools/index.d.ts +8 -0
- package/dist/server/tools/index.d.ts.map +1 -0
- package/dist/server/tools/index.js +8 -0
- package/dist/server/tools/index.js.map +1 -0
- package/dist/server/tools/user-tools.d.ts +9 -0
- package/dist/server/tools/user-tools.d.ts.map +1 -0
- package/dist/server/tools/user-tools.js +41 -0
- package/dist/server/tools/user-tools.js.map +1 -0
- package/dist/server/tools/utility-tools.d.ts +9 -0
- package/dist/server/tools/utility-tools.d.ts.map +1 -0
- package/dist/server/tools/utility-tools.js +45 -0
- package/dist/server/tools/utility-tools.js.map +1 -0
- package/dist/server/tools/workspace-tools.d.ts +10 -0
- package/dist/server/tools/workspace-tools.d.ts.map +1 -0
- package/dist/server/tools/workspace-tools.js +62 -0
- package/dist/server/tools/workspace-tools.js.map +1 -0
- package/dist/types/analytics.d.ts +32 -0
- package/dist/types/analytics.d.ts.map +1 -0
- package/dist/types/analytics.js +3 -0
- package/dist/types/analytics.js.map +1 -0
- package/dist/types/base.d.ts +22 -0
- package/dist/types/base.d.ts.map +1 -0
- package/dist/types/base.js +3 -0
- package/dist/types/base.js.map +1 -0
- package/dist/types/board.d.ts +27 -0
- package/dist/types/board.d.ts.map +1 -0
- package/dist/types/board.js +3 -0
- package/dist/types/board.js.map +1 -0
- package/dist/types/businessmap.d.ts +50 -16
- package/dist/types/businessmap.d.ts.map +1 -1
- package/dist/types/card.d.ts +286 -0
- package/dist/types/card.d.ts.map +1 -0
- package/dist/types/card.js +3 -0
- package/dist/types/card.js.map +1 -0
- package/dist/types/custom-field.d.ts +17 -0
- package/dist/types/custom-field.d.ts.map +1 -0
- package/dist/types/custom-field.js +3 -0
- package/dist/types/custom-field.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +9 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/lane.d.ts +16 -0
- package/dist/types/lane.d.ts.map +1 -0
- package/dist/types/lane.js +3 -0
- package/dist/types/lane.js.map +1 -0
- package/dist/types/user.d.ts +16 -0
- package/dist/types/user.d.ts.map +1 -0
- package/dist/types/user.js +3 -0
- package/dist/types/user.js.map +1 -0
- package/dist/types/workspace.d.ts +11 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/types/workspace.js +3 -0
- package/dist/types/workspace.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# BusinessMap MCP Server
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/js/@edicarlos.lds%2Fbusinessmap-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/@edicarlos.lds/businessmap-mcp)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
[](https://modelcontextprotocol.io/)
|
|
9
|
+
|
|
3
10
|
Model Context Protocol server for BusinessMap (Kanbanize) integration.
|
|
4
11
|
|
|
5
12
|
## Installation
|
|
@@ -28,11 +35,11 @@ The server requires the following environment variables:
|
|
|
28
35
|
- `BUSINESSMAP_API_URL`: Your BusinessMap API URL (e.g., `https://your-account.kanbanize.com/api/v2`)
|
|
29
36
|
- `BUSINESSMAP_READ_ONLY_MODE`: Set to `"true"` for read-only mode, `"false"` to allow modifications (optional, defaults to `"false"`)
|
|
30
37
|
|
|
31
|
-
|
|
38
|
+
#### Claude Desktop
|
|
32
39
|
|
|
33
|
-
Add the following configuration to your
|
|
40
|
+
Add the following configuration to your `claude_desktop_config.json` file:
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
**Using NPX:**
|
|
36
43
|
|
|
37
44
|
```json
|
|
38
45
|
{
|
|
@@ -50,7 +57,7 @@ Add the following configuration to your Claude Desktop `claude_desktop_config.js
|
|
|
50
57
|
}
|
|
51
58
|
```
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
**Using Global Installation:**
|
|
54
61
|
|
|
55
62
|
```json
|
|
56
63
|
{
|
|
@@ -67,6 +74,12 @@ Add the following configuration to your Claude Desktop `claude_desktop_config.js
|
|
|
67
74
|
}
|
|
68
75
|
```
|
|
69
76
|
|
|
77
|
+
#### Other MCP Clients
|
|
78
|
+
|
|
79
|
+
For other MCP clients, use the appropriate configuration format for your client, ensuring you specify:
|
|
80
|
+
- Command: `npx @edicarlos.lds/businessmap-mcp` (or `businessmap-mcp` if globally installed)
|
|
81
|
+
- Environment variables: `BUSINESSMAP_API_TOKEN`, `BUSINESSMAP_API_URL`, and optionally `BUSINESSMAP_READ_ONLY_MODE`
|
|
82
|
+
|
|
70
83
|
### Manual Setup
|
|
71
84
|
|
|
72
85
|
1. Clone this repository:
|
|
@@ -107,9 +120,14 @@ The BusinessMap MCP server provides the following tools:
|
|
|
107
120
|
- `mcp_businessmap_create_workspace` - Create new workspace
|
|
108
121
|
|
|
109
122
|
### Board Management
|
|
110
|
-
- `mcp_businessmap_list_boards` -
|
|
111
|
-
- `
|
|
112
|
-
- `
|
|
123
|
+
- `mcp_businessmap_list_boards` - List boards in workspace(s)
|
|
124
|
+
- `mcp_businessmap_search_board` - Search for boards by ID or name
|
|
125
|
+
- `mcp_businessmap_get_board` - Get board details with structure
|
|
126
|
+
- `mcp_businessmap_create_board` - Create new board (if not in read-only mode)
|
|
127
|
+
- `mcp_businessmap_get_columns` - Get all columns for a board ✅ **Válido na API oficial**
|
|
128
|
+
- `mcp_businessmap_get_lanes` - Get all lanes/swimlanes for a board ✅ **Válido na API oficial**
|
|
129
|
+
- `mcp_businessmap_get_lane` - Get details of a specific lane/swimlane ✅ **Válido na API oficial**
|
|
130
|
+
- `mcp_businessmap_create_lane` - Create new lane/swimlane (if not in read-only mode) ✅ **Válido na API oficial**
|
|
113
131
|
|
|
114
132
|
### Card Management
|
|
115
133
|
- `mcp_businessmap_list_cards` - Get cards from a board with optional filters
|
|
@@ -123,10 +141,9 @@ The BusinessMap MCP server provides the following tools:
|
|
|
123
141
|
- `mcp_businessmap_get_user` - Get user details
|
|
124
142
|
|
|
125
143
|
### Analytics & Reports
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
- `mcp_businessmap_get_throughput_report` - Get throughput report
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
> **Nota**: Outros endpoints de analytics foram temporariamente removidos pois não existem na API oficial do BusinessMap. Para mais detalhes, consulte `API_ENDPOINTS_REVIEW.md`.
|
|
130
147
|
|
|
131
148
|
### System
|
|
132
149
|
- `mcp_businessmap_health_check` - Check API connection
|
|
@@ -172,14 +189,39 @@ npm run docker:logs
|
|
|
172
189
|
npm run docker:down
|
|
173
190
|
```
|
|
174
191
|
|
|
175
|
-
##
|
|
192
|
+
## Troubleshooting
|
|
176
193
|
|
|
177
|
-
|
|
194
|
+
### Connection Issues
|
|
178
195
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
```
|
|
196
|
+
The server now includes automatic connection verification during startup. If you encounter connection issues:
|
|
197
|
+
|
|
198
|
+
1. **Check your environment variables**:
|
|
199
|
+
```bash
|
|
200
|
+
echo $BUSINESSMAP_API_URL
|
|
201
|
+
echo $BUSINESSMAP_API_TOKEN
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
2. **Test the connection manually**:
|
|
205
|
+
```bash
|
|
206
|
+
chmod +x scripts/test-connection.sh
|
|
207
|
+
./scripts/test-connection.sh
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
3. **Common issues**:
|
|
211
|
+
- **Invalid API URL**: Ensure your URL follows the format `https://your-account.kanbanize.com/api/v2`
|
|
212
|
+
- **Invalid API Token**: Verify your token has the necessary permissions
|
|
213
|
+
- **Network connectivity**: Check if you can reach the API URL from your network
|
|
214
|
+
|
|
215
|
+
### Startup Process
|
|
216
|
+
|
|
217
|
+
The server now performs the following steps during initialization:
|
|
218
|
+
|
|
219
|
+
1. **Configuration validation** - Checks all required environment variables
|
|
220
|
+
2. **API connection verification** - Tests connectivity with up to 3 retry attempts
|
|
221
|
+
3. **Authentication check** - Verifies API token permissions
|
|
222
|
+
4. **Server startup** - Starts the MCP server only after successful connection
|
|
223
|
+
|
|
224
|
+
If the connection fails, the server will display detailed error messages and retry automatically.
|
|
183
225
|
|
|
184
226
|
## License
|
|
185
227
|
|
|
@@ -1,36 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BusinessMapConfig } from '../types/index.js';
|
|
2
|
+
import { BoardClient, CardClient, CardFilters, WorkspaceClient } from './modules/index.js';
|
|
3
|
+
import { BoardFilters } from './modules/board-client.js';
|
|
2
4
|
export declare class BusinessMapClient {
|
|
3
5
|
private http;
|
|
4
6
|
private readonly config;
|
|
7
|
+
private isInitialized;
|
|
8
|
+
private workspaceClient;
|
|
9
|
+
private boardClient;
|
|
10
|
+
private cardClient;
|
|
11
|
+
private userClient;
|
|
12
|
+
private customFieldClient;
|
|
13
|
+
private utilityClient;
|
|
5
14
|
constructor(config: BusinessMapConfig);
|
|
15
|
+
/**
|
|
16
|
+
* Initialize the client by verifying the connection to the BusinessMap API
|
|
17
|
+
*/
|
|
18
|
+
initialize(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Check if the client has been initialized
|
|
21
|
+
*/
|
|
22
|
+
get initialized(): boolean;
|
|
6
23
|
private transformError;
|
|
7
|
-
getWorkspaces(): Promise<Workspace[]>;
|
|
8
|
-
getWorkspace(workspaceId: number): Promise<Workspace>;
|
|
9
|
-
createWorkspace(params:
|
|
10
|
-
updateWorkspace(workspaceId: number, params:
|
|
24
|
+
getWorkspaces(): Promise<import("../types/workspace.js").Workspace[]>;
|
|
25
|
+
getWorkspace(workspaceId: number): Promise<import("../types/workspace.js").Workspace>;
|
|
26
|
+
createWorkspace(params: Parameters<WorkspaceClient['createWorkspace']>[0]): Promise<import("../types/workspace.js").Workspace>;
|
|
27
|
+
updateWorkspace(workspaceId: number, params: Parameters<WorkspaceClient['updateWorkspace']>[1]): Promise<import("../types/workspace.js").Workspace>;
|
|
11
28
|
deleteWorkspace(workspaceId: number): Promise<void>;
|
|
12
|
-
getBoards(
|
|
13
|
-
getBoard(boardId: number): Promise<Board>;
|
|
14
|
-
createBoard(params:
|
|
15
|
-
updateBoard(boardId: number, params:
|
|
29
|
+
getBoards(filters?: BoardFilters): Promise<import("../types/board.js").Board[]>;
|
|
30
|
+
getBoard(boardId: number): Promise<import("../types/board.js").Board>;
|
|
31
|
+
createBoard(params: Parameters<BoardClient['createBoard']>[0]): Promise<import("../types/board.js").Board>;
|
|
32
|
+
updateBoard(boardId: number, params: Parameters<BoardClient['updateBoard']>[1]): Promise<import("../types/board.js").Board>;
|
|
16
33
|
deleteBoard(boardId: number): Promise<void>;
|
|
17
34
|
getBoardStructure(boardId: number): Promise<any>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
getCard(cardId: number): Promise<Card>;
|
|
24
|
-
createCard(params:
|
|
25
|
-
updateCard(params:
|
|
26
|
-
moveCard(cardId: number, columnId: number,
|
|
35
|
+
getColumns(boardId: number): Promise<import("../types/board.js").Column[]>;
|
|
36
|
+
getLanes(boardId: number): Promise<import("../types/lane.js").Lane[]>;
|
|
37
|
+
getLane(laneId: number): Promise<import("../types/lane.js").Lane>;
|
|
38
|
+
createLane(params: Parameters<BoardClient['createLane']>[0]): Promise<import("../types/lane.js").Lane>;
|
|
39
|
+
getCards(boardId: number, filters?: CardFilters): Promise<import("../types/card.js").Card[]>;
|
|
40
|
+
getCard(cardId: number): Promise<import("../types/card.js").Card>;
|
|
41
|
+
createCard(params: Parameters<CardClient['createCard']>[0]): Promise<import("../types/card.js").Card>;
|
|
42
|
+
updateCard(params: Parameters<CardClient['updateCard']>[0]): Promise<import("../types/card.js").Card>;
|
|
43
|
+
moveCard(cardId: number, columnId: number, laneId?: number, position?: number): Promise<import("../types/card.js").Card>;
|
|
27
44
|
deleteCard(cardId: number): Promise<void>;
|
|
28
|
-
getUsers(): Promise<User[]>;
|
|
29
|
-
getUser(userId: number): Promise<User>;
|
|
30
|
-
|
|
31
|
-
getCumulativeFlowData(boardId: number, periodStart: string, periodEnd: string): Promise<CumulativeFlowData[]>;
|
|
32
|
-
getCycleTimeReport(boardId: number, periodStart: string, periodEnd: string): Promise<any>;
|
|
33
|
-
getThroughputReport(boardId: number, periodStart: string, periodEnd: string): Promise<any>;
|
|
45
|
+
getUsers(): Promise<import("../types/user.js").User[]>;
|
|
46
|
+
getUser(userId: number): Promise<import("../types/user.js").User>;
|
|
47
|
+
getCustomField(customFieldId: number): Promise<import("../types/custom-field.js").CustomField>;
|
|
34
48
|
healthCheck(): Promise<boolean>;
|
|
35
49
|
getApiInfo(): Promise<any>;
|
|
36
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"businessmap-client.d.ts","sourceRoot":"","sources":["../../src/client/businessmap-client.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"businessmap-client.d.ts","sourceRoot":"","sources":["../../src/client/businessmap-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EACL,WAAW,EACX,UAAU,EACV,WAAW,EAIX,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,IAAI,CAAgB;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,aAAa,CAAkB;IAGvC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,aAAa,CAAgB;gBAEzB,MAAM,EAAE,iBAAiB;IAyCrC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA8CjC;;OAEG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,OAAO,CAAC,cAAc;IAShB,aAAa;IAIb,YAAY,CAAC,WAAW,EAAE,MAAM;IAIhC,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;IAIzE,eAAe,CACnB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,UAA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jB"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
+
import { BoardClient, CardClient, CustomFieldClient, UserClient, UtilityClient, WorkspaceClient, } from './modules/index.js';
|
|
2
3
|
export class BusinessMapClient {
|
|
3
4
|
http;
|
|
4
5
|
config;
|
|
6
|
+
isInitialized = false;
|
|
7
|
+
// Client modules
|
|
8
|
+
workspaceClient;
|
|
9
|
+
boardClient;
|
|
10
|
+
cardClient;
|
|
11
|
+
userClient;
|
|
12
|
+
customFieldClient;
|
|
13
|
+
utilityClient;
|
|
5
14
|
constructor(config) {
|
|
6
15
|
this.config = config;
|
|
7
16
|
this.http = axios.create({
|
|
@@ -17,6 +26,67 @@ export class BusinessMapClient {
|
|
|
17
26
|
this.http.interceptors.response.use((response) => response, (error) => {
|
|
18
27
|
throw this.transformError(error);
|
|
19
28
|
});
|
|
29
|
+
// Initialize client modules
|
|
30
|
+
this.workspaceClient = new WorkspaceClient();
|
|
31
|
+
this.boardClient = new BoardClient();
|
|
32
|
+
this.cardClient = new CardClient();
|
|
33
|
+
this.userClient = new UserClient();
|
|
34
|
+
this.customFieldClient = new CustomFieldClient();
|
|
35
|
+
this.utilityClient = new UtilityClient();
|
|
36
|
+
// Initialize all modules with http client and config
|
|
37
|
+
[
|
|
38
|
+
this.workspaceClient,
|
|
39
|
+
this.boardClient,
|
|
40
|
+
this.cardClient,
|
|
41
|
+
this.userClient,
|
|
42
|
+
this.customFieldClient,
|
|
43
|
+
this.utilityClient,
|
|
44
|
+
].forEach((module) => {
|
|
45
|
+
module.initialize(this.http, this.config);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Initialize the client by verifying the connection to the BusinessMap API
|
|
50
|
+
*/
|
|
51
|
+
async initialize() {
|
|
52
|
+
if (this.isInitialized) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
// Verify configuration first
|
|
57
|
+
if (!this.config.apiUrl) {
|
|
58
|
+
throw new Error('API URL is not configured. Please set BUSINESSMAP_API_URL environment variable.');
|
|
59
|
+
}
|
|
60
|
+
if (!this.config.apiToken) {
|
|
61
|
+
throw new Error('API Token is not configured. Please set BUSINESSMAP_API_TOKEN environment variable.');
|
|
62
|
+
}
|
|
63
|
+
// Try to perform a health check first
|
|
64
|
+
const isHealthy = await this.utilityClient.healthCheck();
|
|
65
|
+
if (!isHealthy) {
|
|
66
|
+
throw new Error('API connection failed - please check your API URL and token');
|
|
67
|
+
}
|
|
68
|
+
// Try to fetch API info to verify authentication
|
|
69
|
+
try {
|
|
70
|
+
await this.utilityClient.getApiInfo();
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
if (error instanceof Error && error.message.includes('401')) {
|
|
74
|
+
throw new Error('Authentication failed - please verify your API token has the correct permissions');
|
|
75
|
+
}
|
|
76
|
+
throw new Error(`API verification failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
77
|
+
}
|
|
78
|
+
this.isInitialized = true;
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
82
|
+
throw new Error(`Failed to initialize BusinessMap client: ${message}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Check if the client has been initialized
|
|
87
|
+
*/
|
|
88
|
+
get initialized() {
|
|
89
|
+
return this.isInitialized;
|
|
20
90
|
}
|
|
21
91
|
transformError(error) {
|
|
22
92
|
if (error.response) {
|
|
@@ -25,172 +95,89 @@ export class BusinessMapClient {
|
|
|
25
95
|
}
|
|
26
96
|
return new Error(`Network Error: ${error.message}`);
|
|
27
97
|
}
|
|
28
|
-
// Workspace Management
|
|
98
|
+
// Workspace Management - Delegated to WorkspaceClient
|
|
29
99
|
async getWorkspaces() {
|
|
30
|
-
|
|
31
|
-
return response.data.data;
|
|
100
|
+
return this.workspaceClient.getWorkspaces();
|
|
32
101
|
}
|
|
33
102
|
async getWorkspace(workspaceId) {
|
|
34
|
-
|
|
35
|
-
return response.data.data;
|
|
103
|
+
return this.workspaceClient.getWorkspace(workspaceId);
|
|
36
104
|
}
|
|
37
105
|
async createWorkspace(params) {
|
|
38
|
-
|
|
39
|
-
throw new Error('Cannot create workspace in read-only mode');
|
|
40
|
-
}
|
|
41
|
-
const response = await this.http.post('/workspaces', params);
|
|
42
|
-
return response.data.data;
|
|
106
|
+
return this.workspaceClient.createWorkspace(params);
|
|
43
107
|
}
|
|
44
108
|
async updateWorkspace(workspaceId, params) {
|
|
45
|
-
|
|
46
|
-
throw new Error('Cannot update workspace in read-only mode');
|
|
47
|
-
}
|
|
48
|
-
const response = await this.http.patch(`/workspaces/${workspaceId}`, params);
|
|
49
|
-
return response.data.data;
|
|
109
|
+
return this.workspaceClient.updateWorkspace(workspaceId, params);
|
|
50
110
|
}
|
|
51
111
|
async deleteWorkspace(workspaceId) {
|
|
52
|
-
|
|
53
|
-
throw new Error('Cannot delete workspace in read-only mode');
|
|
54
|
-
}
|
|
55
|
-
await this.http.delete(`/workspaces/${workspaceId}`);
|
|
112
|
+
return this.workspaceClient.deleteWorkspace(workspaceId);
|
|
56
113
|
}
|
|
57
|
-
// Board Management
|
|
58
|
-
async getBoards(
|
|
59
|
-
|
|
60
|
-
const response = await this.http.get('/boards', { params });
|
|
61
|
-
return response.data.data;
|
|
114
|
+
// Board Management - Delegated to BoardClient
|
|
115
|
+
async getBoards(filters) {
|
|
116
|
+
return this.boardClient.getBoards(filters);
|
|
62
117
|
}
|
|
63
118
|
async getBoard(boardId) {
|
|
64
|
-
|
|
65
|
-
return response.data.data;
|
|
119
|
+
return this.boardClient.getBoard(boardId);
|
|
66
120
|
}
|
|
67
121
|
async createBoard(params) {
|
|
68
|
-
|
|
69
|
-
throw new Error('Cannot create board in read-only mode');
|
|
70
|
-
}
|
|
71
|
-
const response = await this.http.post('/boards', params);
|
|
72
|
-
return response.data.data;
|
|
122
|
+
return this.boardClient.createBoard(params);
|
|
73
123
|
}
|
|
74
124
|
async updateBoard(boardId, params) {
|
|
75
|
-
|
|
76
|
-
throw new Error('Cannot update board in read-only mode');
|
|
77
|
-
}
|
|
78
|
-
const response = await this.http.patch(`/boards/${boardId}`, params);
|
|
79
|
-
return response.data.data;
|
|
125
|
+
return this.boardClient.updateBoard(boardId, params);
|
|
80
126
|
}
|
|
81
127
|
async deleteBoard(boardId) {
|
|
82
|
-
|
|
83
|
-
throw new Error('Cannot delete board in read-only mode');
|
|
84
|
-
}
|
|
85
|
-
await this.http.delete(`/boards/${boardId}`);
|
|
128
|
+
return this.boardClient.deleteBoard(boardId);
|
|
86
129
|
}
|
|
87
130
|
async getBoardStructure(boardId) {
|
|
88
|
-
|
|
89
|
-
|
|
131
|
+
return this.boardClient.getBoardStructure(boardId);
|
|
132
|
+
}
|
|
133
|
+
async getColumns(boardId) {
|
|
134
|
+
return this.boardClient.getColumns(boardId);
|
|
90
135
|
}
|
|
91
|
-
|
|
136
|
+
async getLanes(boardId) {
|
|
137
|
+
return this.boardClient.getLanes(boardId);
|
|
138
|
+
}
|
|
139
|
+
async getLane(laneId) {
|
|
140
|
+
return this.boardClient.getLane(laneId);
|
|
141
|
+
}
|
|
142
|
+
async createLane(params) {
|
|
143
|
+
return this.boardClient.createLane(params);
|
|
144
|
+
}
|
|
145
|
+
// Card Management - Delegated to CardClient
|
|
92
146
|
async getCards(boardId, filters) {
|
|
93
|
-
|
|
94
|
-
const response = await this.http.get('/cards', { params });
|
|
95
|
-
return response.data.data;
|
|
147
|
+
return this.cardClient.getCards(boardId, filters);
|
|
96
148
|
}
|
|
97
149
|
async getCard(cardId) {
|
|
98
|
-
|
|
99
|
-
return response.data.data;
|
|
150
|
+
return this.cardClient.getCard(cardId);
|
|
100
151
|
}
|
|
101
152
|
async createCard(params) {
|
|
102
|
-
|
|
103
|
-
throw new Error('Cannot create card in read-only mode');
|
|
104
|
-
}
|
|
105
|
-
const response = await this.http.post('/cards', params);
|
|
106
|
-
return response.data.data;
|
|
153
|
+
return this.cardClient.createCard(params);
|
|
107
154
|
}
|
|
108
155
|
async updateCard(params) {
|
|
109
|
-
|
|
110
|
-
throw new Error('Cannot update card in read-only mode');
|
|
111
|
-
}
|
|
112
|
-
const { card_id, ...updateData } = params;
|
|
113
|
-
const response = await this.http.patch(`/cards/${card_id}`, updateData);
|
|
114
|
-
return response.data.data;
|
|
156
|
+
return this.cardClient.updateCard(params);
|
|
115
157
|
}
|
|
116
|
-
async moveCard(cardId, columnId,
|
|
117
|
-
|
|
118
|
-
throw new Error('Cannot move card in read-only mode');
|
|
119
|
-
}
|
|
120
|
-
const response = await this.http.patch(`/cards/${cardId}`, {
|
|
121
|
-
column_id: columnId,
|
|
122
|
-
swimlane_id: swimlaneId,
|
|
123
|
-
position: position,
|
|
124
|
-
});
|
|
125
|
-
return response.data.data;
|
|
158
|
+
async moveCard(cardId, columnId, laneId, position) {
|
|
159
|
+
return this.cardClient.moveCard(cardId, columnId, laneId, position);
|
|
126
160
|
}
|
|
127
161
|
async deleteCard(cardId) {
|
|
128
|
-
|
|
129
|
-
throw new Error('Cannot delete card in read-only mode');
|
|
130
|
-
}
|
|
131
|
-
await this.http.delete(`/cards/${cardId}`);
|
|
162
|
+
return this.cardClient.deleteCard(cardId);
|
|
132
163
|
}
|
|
133
|
-
// User Management
|
|
164
|
+
// User Management - Delegated to UserClient
|
|
134
165
|
async getUsers() {
|
|
135
|
-
|
|
136
|
-
return response.data.data;
|
|
166
|
+
return this.userClient.getUsers();
|
|
137
167
|
}
|
|
138
168
|
async getUser(userId) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
period_start: periodStart,
|
|
147
|
-
period_end: periodEnd,
|
|
148
|
-
};
|
|
149
|
-
const response = await this.http.get('/analytics/workflow', {
|
|
150
|
-
params,
|
|
151
|
-
});
|
|
152
|
-
return response.data.data;
|
|
153
|
-
}
|
|
154
|
-
async getCumulativeFlowData(boardId, periodStart, periodEnd) {
|
|
155
|
-
const params = {
|
|
156
|
-
board_id: boardId,
|
|
157
|
-
period_start: periodStart,
|
|
158
|
-
period_end: periodEnd,
|
|
159
|
-
};
|
|
160
|
-
const response = await this.http.get('/analytics/cumulative-flow', { params });
|
|
161
|
-
return response.data.data;
|
|
162
|
-
}
|
|
163
|
-
async getCycleTimeReport(boardId, periodStart, periodEnd) {
|
|
164
|
-
const params = {
|
|
165
|
-
board_id: boardId,
|
|
166
|
-
period_start: periodStart,
|
|
167
|
-
period_end: periodEnd,
|
|
168
|
-
};
|
|
169
|
-
const response = await this.http.get('/analytics/cycle-time', { params });
|
|
170
|
-
return response.data.data;
|
|
171
|
-
}
|
|
172
|
-
async getThroughputReport(boardId, periodStart, periodEnd) {
|
|
173
|
-
const params = {
|
|
174
|
-
board_id: boardId,
|
|
175
|
-
period_start: periodStart,
|
|
176
|
-
period_end: periodEnd,
|
|
177
|
-
};
|
|
178
|
-
const response = await this.http.get('/analytics/throughput', { params });
|
|
179
|
-
return response.data.data;
|
|
180
|
-
}
|
|
181
|
-
// Utility Methods
|
|
169
|
+
return this.userClient.getUser(userId);
|
|
170
|
+
}
|
|
171
|
+
// Custom Fields - Delegated to CustomFieldClient
|
|
172
|
+
async getCustomField(customFieldId) {
|
|
173
|
+
return this.customFieldClient.getCustomField(customFieldId);
|
|
174
|
+
}
|
|
175
|
+
// Utility Methods - Delegated to UtilityClient
|
|
182
176
|
async healthCheck() {
|
|
183
|
-
|
|
184
|
-
await this.http.get('/health');
|
|
185
|
-
return true;
|
|
186
|
-
}
|
|
187
|
-
catch {
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
177
|
+
return this.utilityClient.healthCheck();
|
|
190
178
|
}
|
|
191
179
|
async getApiInfo() {
|
|
192
|
-
|
|
193
|
-
return response.data;
|
|
180
|
+
return this.utilityClient.getApiInfo();
|
|
194
181
|
}
|
|
195
182
|
}
|
|
196
183
|
//# sourceMappingURL=businessmap-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"businessmap-client.js","sourceRoot":"","sources":["../../src/client/businessmap-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"businessmap-client.js","sourceRoot":"","sources":["../../src/client/businessmap-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EACL,WAAW,EACX,UAAU,EAEV,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,OAAO,iBAAiB;IACpB,IAAI,CAAgB;IACX,MAAM,CAAoB;IACnC,aAAa,GAAY,KAAK,CAAC;IAEvC,iBAAiB;IACT,eAAe,CAAkB;IACjC,WAAW,CAAc;IACzB,UAAU,CAAa;IACvB,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,aAAa,CAAgB;IAErC,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC;YACvB,OAAO,EAAE,MAAM,CAAC,MAAM;YACtB,OAAO,EAAE;gBACP,MAAM,EAAE,MAAM,CAAC,QAAQ;gBACvB,cAAc,EAAE,kBAAkB;gBAClC,MAAM,EAAE,kBAAkB;aAC3B;YACD,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;QAEH,8CAA8C;QAC9C,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CACjC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EACtB,CAAC,KAAiB,EAAE,EAAE;YACpB,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC,CACF,CAAC;QAEF,4BAA4B;QAC5B,IAAI,CAAC,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;QAC7C,IAAI,CAAC,WAA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,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAc;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,cAAc,CAAC,aAAqB;QACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAC9D,CAAC;IAED,+CAA+C;IAC/C,KAAK,CAAC,WAAW;QACf,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CycleTimeColumn, EffectiveCycleTimeColumn } from '../../types/index.js';
|
|
2
|
+
import { BaseClientModuleImpl } from './base-client.js';
|
|
3
|
+
export declare class AnalyticsClient extends BaseClientModuleImpl {
|
|
4
|
+
/**
|
|
5
|
+
* Get cycle time configuration columns for a board
|
|
6
|
+
*/
|
|
7
|
+
getWorkflowCycleTimeColumns(boardId: number): Promise<CycleTimeColumn[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Get effective cycle time configuration columns for a board
|
|
10
|
+
*/
|
|
11
|
+
getWorkflowEffectiveCycleTimeColumns(boardId: number): Promise<EffectiveCycleTimeColumn[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=analytics-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-client.d.ts","sourceRoot":"","sources":["../../../src/client/modules/analytics-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,eAAe,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,qBAAa,eAAgB,SAAQ,oBAAoB;IACvD;;OAEG;IACG,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAO9E;;OAEG;IACG,oCAAoC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,CAAC;CAMjG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseClientModuleImpl } from './base-client.js';
|
|
2
|
+
export class AnalyticsClient extends BaseClientModuleImpl {
|
|
3
|
+
/**
|
|
4
|
+
* Get cycle time configuration columns for a board
|
|
5
|
+
*/
|
|
6
|
+
async getWorkflowCycleTimeColumns(boardId) {
|
|
7
|
+
const response = await this.http.get(`/boards/${boardId}/analytics/cycle_time_columns`);
|
|
8
|
+
return response.data.data;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get effective cycle time configuration columns for a board
|
|
12
|
+
*/
|
|
13
|
+
async getWorkflowEffectiveCycleTimeColumns(boardId) {
|
|
14
|
+
const response = await this.http.get(`/boards/${boardId}/analytics/effective_cycle_time_columns`);
|
|
15
|
+
return response.data.data;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=analytics-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-client.js","sourceRoot":"","sources":["../../../src/client/modules/analytics-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,OAAO,eAAgB,SAAQ,oBAAoB;IACvD;;OAEG;IACH,KAAK,CAAC,2BAA2B,CAAC,OAAe;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAClC,WAAW,OAAO,+BAA+B,CAClD,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,oCAAoC,CAAC,OAAe;QACxD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAClC,WAAW,OAAO,yCAAyC,CAC5D,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B,CAAC;CACF"}
|