@edicarlos.lds/businessmap-mcp 1.0.3 → 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 +18 -7
- package/dist/client/businessmap-client.d.ts +29 -24
- package/dist/client/businessmap-client.d.ts.map +1 -1
- package/dist/client/businessmap-client.js +73 -145
- 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/server/mcp-server.d.ts +0 -6
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +14 -873
- 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
|
|
@@ -113,9 +120,14 @@ The BusinessMap MCP server provides the following tools:
|
|
|
113
120
|
- `mcp_businessmap_create_workspace` - Create new workspace
|
|
114
121
|
|
|
115
122
|
### Board Management
|
|
116
|
-
- `mcp_businessmap_list_boards` -
|
|
117
|
-
- `
|
|
118
|
-
- `
|
|
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**
|
|
119
131
|
|
|
120
132
|
### Card Management
|
|
121
133
|
- `mcp_businessmap_list_cards` - Get cards from a board with optional filters
|
|
@@ -129,10 +141,9 @@ The BusinessMap MCP server provides the following tools:
|
|
|
129
141
|
- `mcp_businessmap_get_user` - Get user details
|
|
130
142
|
|
|
131
143
|
### Analytics & Reports
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
- `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`.
|
|
136
147
|
|
|
137
148
|
### System
|
|
138
149
|
- `mcp_businessmap_health_check` - Check API connection
|
|
@@ -1,8 +1,16 @@
|
|
|
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;
|
|
5
7
|
private isInitialized;
|
|
8
|
+
private workspaceClient;
|
|
9
|
+
private boardClient;
|
|
10
|
+
private cardClient;
|
|
11
|
+
private userClient;
|
|
12
|
+
private customFieldClient;
|
|
13
|
+
private utilityClient;
|
|
6
14
|
constructor(config: BusinessMapConfig);
|
|
7
15
|
/**
|
|
8
16
|
* Initialize the client by verifying the connection to the BusinessMap API
|
|
@@ -13,33 +21,30 @@ export declare class BusinessMapClient {
|
|
|
13
21
|
*/
|
|
14
22
|
get initialized(): boolean;
|
|
15
23
|
private transformError;
|
|
16
|
-
getWorkspaces(): Promise<Workspace[]>;
|
|
17
|
-
getWorkspace(workspaceId: number): Promise<Workspace>;
|
|
18
|
-
createWorkspace(params:
|
|
19
|
-
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>;
|
|
20
28
|
deleteWorkspace(workspaceId: number): Promise<void>;
|
|
21
|
-
getBoards(
|
|
22
|
-
getBoard(boardId: number): Promise<Board>;
|
|
23
|
-
createBoard(params:
|
|
24
|
-
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>;
|
|
25
33
|
deleteBoard(boardId: number): Promise<void>;
|
|
26
34
|
getBoardStructure(boardId: number): Promise<any>;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
getCard(cardId: number): Promise<Card>;
|
|
33
|
-
createCard(params:
|
|
34
|
-
updateCard(params:
|
|
35
|
-
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>;
|
|
36
44
|
deleteCard(cardId: number): Promise<void>;
|
|
37
|
-
getUsers(): Promise<User[]>;
|
|
38
|
-
getUser(userId: number): Promise<User>;
|
|
39
|
-
|
|
40
|
-
getCumulativeFlowData(boardId: number, periodStart: string, periodEnd: string): Promise<CumulativeFlowData[]>;
|
|
41
|
-
getCycleTimeReport(boardId: number, periodStart: string, periodEnd: string): Promise<any>;
|
|
42
|
-
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>;
|
|
43
48
|
healthCheck(): Promise<boolean>;
|
|
44
49
|
getApiInfo(): Promise<any>;
|
|
45
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,C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;IAI1D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAI7E,UAAU,CAAC,MAAM,EAAE,MAAM;IAKzB,QAAQ;IAIR,OAAO,CAAC,MAAM,EAAE,MAAM;IAKtB,cAAc,CAAC,aAAa,EAAE,MAAM;IAKpC,WAAW;IAIX,UAAU;CAGjB"}
|
|
@@ -1,8 +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;
|
|
5
6
|
isInitialized = false;
|
|
7
|
+
// Client modules
|
|
8
|
+
workspaceClient;
|
|
9
|
+
boardClient;
|
|
10
|
+
cardClient;
|
|
11
|
+
userClient;
|
|
12
|
+
customFieldClient;
|
|
13
|
+
utilityClient;
|
|
6
14
|
constructor(config) {
|
|
7
15
|
this.config = config;
|
|
8
16
|
this.http = axios.create({
|
|
@@ -18,6 +26,24 @@ export class BusinessMapClient {
|
|
|
18
26
|
this.http.interceptors.response.use((response) => response, (error) => {
|
|
19
27
|
throw this.transformError(error);
|
|
20
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
|
+
});
|
|
21
47
|
}
|
|
22
48
|
/**
|
|
23
49
|
* Initialize the client by verifying the connection to the BusinessMap API
|
|
@@ -35,13 +61,13 @@ export class BusinessMapClient {
|
|
|
35
61
|
throw new Error('API Token is not configured. Please set BUSINESSMAP_API_TOKEN environment variable.');
|
|
36
62
|
}
|
|
37
63
|
// Try to perform a health check first
|
|
38
|
-
const isHealthy = await this.healthCheck();
|
|
64
|
+
const isHealthy = await this.utilityClient.healthCheck();
|
|
39
65
|
if (!isHealthy) {
|
|
40
66
|
throw new Error('API connection failed - please check your API URL and token');
|
|
41
67
|
}
|
|
42
68
|
// Try to fetch API info to verify authentication
|
|
43
69
|
try {
|
|
44
|
-
await this.getApiInfo();
|
|
70
|
+
await this.utilityClient.getApiInfo();
|
|
45
71
|
}
|
|
46
72
|
catch (error) {
|
|
47
73
|
if (error instanceof Error && error.message.includes('401')) {
|
|
@@ -69,187 +95,89 @@ export class BusinessMapClient {
|
|
|
69
95
|
}
|
|
70
96
|
return new Error(`Network Error: ${error.message}`);
|
|
71
97
|
}
|
|
72
|
-
// Workspace Management
|
|
98
|
+
// Workspace Management - Delegated to WorkspaceClient
|
|
73
99
|
async getWorkspaces() {
|
|
74
|
-
|
|
75
|
-
return response.data.data;
|
|
100
|
+
return this.workspaceClient.getWorkspaces();
|
|
76
101
|
}
|
|
77
102
|
async getWorkspace(workspaceId) {
|
|
78
|
-
|
|
79
|
-
return response.data.data;
|
|
103
|
+
return this.workspaceClient.getWorkspace(workspaceId);
|
|
80
104
|
}
|
|
81
105
|
async createWorkspace(params) {
|
|
82
|
-
|
|
83
|
-
throw new Error('Cannot create workspace in read-only mode');
|
|
84
|
-
}
|
|
85
|
-
const response = await this.http.post('/workspaces', params);
|
|
86
|
-
return response.data.data;
|
|
106
|
+
return this.workspaceClient.createWorkspace(params);
|
|
87
107
|
}
|
|
88
108
|
async updateWorkspace(workspaceId, params) {
|
|
89
|
-
|
|
90
|
-
throw new Error('Cannot update workspace in read-only mode');
|
|
91
|
-
}
|
|
92
|
-
const response = await this.http.patch(`/workspaces/${workspaceId}`, params);
|
|
93
|
-
return response.data.data;
|
|
109
|
+
return this.workspaceClient.updateWorkspace(workspaceId, params);
|
|
94
110
|
}
|
|
95
111
|
async deleteWorkspace(workspaceId) {
|
|
96
|
-
|
|
97
|
-
throw new Error('Cannot delete workspace in read-only mode');
|
|
98
|
-
}
|
|
99
|
-
await this.http.delete(`/workspaces/${workspaceId}`);
|
|
112
|
+
return this.workspaceClient.deleteWorkspace(workspaceId);
|
|
100
113
|
}
|
|
101
|
-
// Board Management
|
|
102
|
-
async getBoards(
|
|
103
|
-
|
|
104
|
-
const response = await this.http.get('/boards', { params });
|
|
105
|
-
return response.data.data;
|
|
114
|
+
// Board Management - Delegated to BoardClient
|
|
115
|
+
async getBoards(filters) {
|
|
116
|
+
return this.boardClient.getBoards(filters);
|
|
106
117
|
}
|
|
107
118
|
async getBoard(boardId) {
|
|
108
|
-
|
|
109
|
-
return response.data.data;
|
|
119
|
+
return this.boardClient.getBoard(boardId);
|
|
110
120
|
}
|
|
111
121
|
async createBoard(params) {
|
|
112
|
-
|
|
113
|
-
throw new Error('Cannot create board in read-only mode');
|
|
114
|
-
}
|
|
115
|
-
const response = await this.http.post('/boards', params);
|
|
116
|
-
return response.data.data;
|
|
122
|
+
return this.boardClient.createBoard(params);
|
|
117
123
|
}
|
|
118
124
|
async updateBoard(boardId, params) {
|
|
119
|
-
|
|
120
|
-
throw new Error('Cannot update board in read-only mode');
|
|
121
|
-
}
|
|
122
|
-
const response = await this.http.patch(`/boards/${boardId}`, params);
|
|
123
|
-
return response.data.data;
|
|
125
|
+
return this.boardClient.updateBoard(boardId, params);
|
|
124
126
|
}
|
|
125
127
|
async deleteBoard(boardId) {
|
|
126
|
-
|
|
127
|
-
throw new Error('Cannot delete board in read-only mode');
|
|
128
|
-
}
|
|
129
|
-
await this.http.delete(`/boards/${boardId}`);
|
|
128
|
+
return this.boardClient.deleteBoard(boardId);
|
|
130
129
|
}
|
|
131
130
|
async getBoardStructure(boardId) {
|
|
132
|
-
|
|
133
|
-
return response.data.data;
|
|
131
|
+
return this.boardClient.getBoardStructure(boardId);
|
|
134
132
|
}
|
|
135
|
-
|
|
133
|
+
async getColumns(boardId) {
|
|
134
|
+
return this.boardClient.getColumns(boardId);
|
|
135
|
+
}
|
|
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
|
|
136
146
|
async getCards(boardId, filters) {
|
|
137
|
-
|
|
138
|
-
const response = await this.http.get('/cards', { params });
|
|
139
|
-
return response.data.data;
|
|
147
|
+
return this.cardClient.getCards(boardId, filters);
|
|
140
148
|
}
|
|
141
149
|
async getCard(cardId) {
|
|
142
|
-
|
|
143
|
-
return response.data.data;
|
|
150
|
+
return this.cardClient.getCard(cardId);
|
|
144
151
|
}
|
|
145
152
|
async createCard(params) {
|
|
146
|
-
|
|
147
|
-
throw new Error('Cannot create card in read-only mode');
|
|
148
|
-
}
|
|
149
|
-
const response = await this.http.post('/cards', params);
|
|
150
|
-
return response.data.data;
|
|
153
|
+
return this.cardClient.createCard(params);
|
|
151
154
|
}
|
|
152
155
|
async updateCard(params) {
|
|
153
|
-
|
|
154
|
-
throw new Error('Cannot update card in read-only mode');
|
|
155
|
-
}
|
|
156
|
-
const { card_id, ...updateData } = params;
|
|
157
|
-
const response = await this.http.patch(`/cards/${card_id}`, updateData);
|
|
158
|
-
return response.data.data;
|
|
156
|
+
return this.cardClient.updateCard(params);
|
|
159
157
|
}
|
|
160
|
-
async moveCard(cardId, columnId,
|
|
161
|
-
|
|
162
|
-
throw new Error('Cannot move card in read-only mode');
|
|
163
|
-
}
|
|
164
|
-
const response = await this.http.patch(`/cards/${cardId}`, {
|
|
165
|
-
column_id: columnId,
|
|
166
|
-
swimlane_id: swimlaneId,
|
|
167
|
-
position: position,
|
|
168
|
-
});
|
|
169
|
-
return response.data.data;
|
|
158
|
+
async moveCard(cardId, columnId, laneId, position) {
|
|
159
|
+
return this.cardClient.moveCard(cardId, columnId, laneId, position);
|
|
170
160
|
}
|
|
171
161
|
async deleteCard(cardId) {
|
|
172
|
-
|
|
173
|
-
throw new Error('Cannot delete card in read-only mode');
|
|
174
|
-
}
|
|
175
|
-
await this.http.delete(`/cards/${cardId}`);
|
|
162
|
+
return this.cardClient.deleteCard(cardId);
|
|
176
163
|
}
|
|
177
|
-
// User Management
|
|
164
|
+
// User Management - Delegated to UserClient
|
|
178
165
|
async getUsers() {
|
|
179
|
-
|
|
180
|
-
return response.data.data;
|
|
166
|
+
return this.userClient.getUsers();
|
|
181
167
|
}
|
|
182
168
|
async getUser(userId) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
period_start: periodStart,
|
|
191
|
-
period_end: periodEnd,
|
|
192
|
-
};
|
|
193
|
-
const response = await this.http.get('/analytics/workflow', {
|
|
194
|
-
params,
|
|
195
|
-
});
|
|
196
|
-
return response.data.data;
|
|
197
|
-
}
|
|
198
|
-
async getCumulativeFlowData(boardId, periodStart, periodEnd) {
|
|
199
|
-
const params = {
|
|
200
|
-
board_id: boardId,
|
|
201
|
-
period_start: periodStart,
|
|
202
|
-
period_end: periodEnd,
|
|
203
|
-
};
|
|
204
|
-
const response = await this.http.get('/analytics/cumulative-flow', { params });
|
|
205
|
-
return response.data.data;
|
|
206
|
-
}
|
|
207
|
-
async getCycleTimeReport(boardId, periodStart, periodEnd) {
|
|
208
|
-
const params = {
|
|
209
|
-
board_id: boardId,
|
|
210
|
-
period_start: periodStart,
|
|
211
|
-
period_end: periodEnd,
|
|
212
|
-
};
|
|
213
|
-
const response = await this.http.get('/analytics/cycle-time', { params });
|
|
214
|
-
return response.data.data;
|
|
215
|
-
}
|
|
216
|
-
async getThroughputReport(boardId, periodStart, periodEnd) {
|
|
217
|
-
const params = {
|
|
218
|
-
board_id: boardId,
|
|
219
|
-
period_start: periodStart,
|
|
220
|
-
period_end: periodEnd,
|
|
221
|
-
};
|
|
222
|
-
const response = await this.http.get('/analytics/throughput', { params });
|
|
223
|
-
return response.data.data;
|
|
224
|
-
}
|
|
225
|
-
// 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
|
|
226
176
|
async healthCheck() {
|
|
227
|
-
|
|
228
|
-
// Use /workspaces endpoint as health check since /health may not exist
|
|
229
|
-
await this.http.get('/workspaces');
|
|
230
|
-
return true;
|
|
231
|
-
}
|
|
232
|
-
catch (error) {
|
|
233
|
-
// Log the actual error for debugging
|
|
234
|
-
console.error('Health check failed:', error instanceof Error ? error.message : 'Unknown error');
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
177
|
+
return this.utilityClient.healthCheck();
|
|
237
178
|
}
|
|
238
179
|
async getApiInfo() {
|
|
239
|
-
|
|
240
|
-
const response = await this.http.get('/info');
|
|
241
|
-
return response.data;
|
|
242
|
-
}
|
|
243
|
-
catch (error) {
|
|
244
|
-
// If /info doesn't exist, try /workspaces to at least verify connectivity
|
|
245
|
-
console.error('API info endpoint not available, testing with workspaces...');
|
|
246
|
-
const response = await this.http.get('/workspaces');
|
|
247
|
-
return {
|
|
248
|
-
message: 'API is responding',
|
|
249
|
-
endpoint: '/workspaces',
|
|
250
|
-
status: 'healthy',
|
|
251
|
-
};
|
|
252
|
-
}
|
|
180
|
+
return this.utilityClient.getApiInfo();
|
|
253
181
|
}
|
|
254
182
|
}
|
|
255
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;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C,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,4CAA4C;IAC5C,KAAK,CAAC,QAAQ;QACZ,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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { BusinessMapConfig } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Base interface for client modules
|
|
5
|
+
*/
|
|
6
|
+
export interface BaseClientModule {
|
|
7
|
+
/**
|
|
8
|
+
* Initialize the module with the HTTP client and configuration
|
|
9
|
+
* @param http The axios instance
|
|
10
|
+
* @param config The BusinessMap configuration
|
|
11
|
+
*/
|
|
12
|
+
initialize(http: AxiosInstance, config: BusinessMapConfig): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Base class for client modules with common functionality
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class BaseClientModuleImpl implements BaseClientModule {
|
|
18
|
+
protected http: AxiosInstance;
|
|
19
|
+
protected config: BusinessMapConfig;
|
|
20
|
+
initialize(http: AxiosInstance, config: BusinessMapConfig): void;
|
|
21
|
+
/**
|
|
22
|
+
* Check if the module is in read-only mode
|
|
23
|
+
*/
|
|
24
|
+
protected checkReadOnlyMode(operation: string): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Common HTTP client configuration
|
|
28
|
+
*/
|
|
29
|
+
export interface HttpClientConfig {
|
|
30
|
+
baseURL: string;
|
|
31
|
+
headers: Record<string, string>;
|
|
32
|
+
timeout: number;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=base-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-client.d.ts","sourceRoot":"","sources":["../../../src/client/modules/base-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAClE;AAED;;GAEG;AACH,8BAAsB,oBAAqB,YAAW,gBAAgB;IACpE,SAAS,CAAC,IAAI,EAAG,aAAa,CAAC;IAC/B,SAAS,CAAC,MAAM,EAAG,iBAAiB,CAAC;IAErC,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAKhE;;OAEG;IACH,SAAS,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAKrD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for client modules with common functionality
|
|
3
|
+
*/
|
|
4
|
+
export class BaseClientModuleImpl {
|
|
5
|
+
http;
|
|
6
|
+
config;
|
|
7
|
+
initialize(http, config) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
this.config = config;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Check if the module is in read-only mode
|
|
13
|
+
*/
|
|
14
|
+
checkReadOnlyMode(operation) {
|
|
15
|
+
if (this.config.readOnlyMode) {
|
|
16
|
+
throw new Error(`Cannot ${operation} in read-only mode`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=base-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-client.js","sourceRoot":"","sources":["../../../src/client/modules/base-client.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,MAAM,OAAgB,oBAAoB;IAC9B,IAAI,CAAiB;IACrB,MAAM,CAAqB;IAErC,UAAU,CAAC,IAAmB,EAAE,MAAyB;QACvD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACO,iBAAiB,CAAC,SAAiB;QAC3C,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,oBAAoB,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Board, Column, CreateBoardParams, CreateLaneParams, Lane } from '../../types/index.js';
|
|
2
|
+
import { BaseClientModuleImpl } from './base-client.js';
|
|
3
|
+
export interface BoardFilters {
|
|
4
|
+
board_ids?: number[];
|
|
5
|
+
workspace_ids?: number[];
|
|
6
|
+
expand?: ('workflows' | 'settings' | 'structure')[];
|
|
7
|
+
fields?: ('board_id' | 'workspace_id' | 'is_archived' | 'name' | 'description' | 'revision')[];
|
|
8
|
+
if_assigned?: number;
|
|
9
|
+
is_archived?: number;
|
|
10
|
+
workspace_id?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class BoardClient extends BaseClientModuleImpl {
|
|
13
|
+
/**
|
|
14
|
+
* Get all boards with optional filters
|
|
15
|
+
*/
|
|
16
|
+
getBoards(filters?: BoardFilters): Promise<Board[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Get a specific board by ID
|
|
19
|
+
*/
|
|
20
|
+
getBoard(boardId: number): Promise<Board>;
|
|
21
|
+
/**
|
|
22
|
+
* Create a new board
|
|
23
|
+
*/
|
|
24
|
+
createBoard(params: CreateBoardParams): Promise<Board>;
|
|
25
|
+
/**
|
|
26
|
+
* Update an existing board
|
|
27
|
+
*/
|
|
28
|
+
updateBoard(boardId: number, params: Partial<CreateBoardParams>): Promise<Board>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a board
|
|
31
|
+
*/
|
|
32
|
+
deleteBoard(boardId: number): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Get board structure
|
|
35
|
+
*/
|
|
36
|
+
getBoardStructure(boardId: number): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Get all columns for a board
|
|
39
|
+
*/
|
|
40
|
+
getColumns(boardId: number): Promise<Column[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Get all lanes/swimlanes for a board
|
|
43
|
+
*/
|
|
44
|
+
getLanes(boardId: number): Promise<Lane[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Get a specific lane by ID
|
|
47
|
+
*/
|
|
48
|
+
getLane(laneId: number): Promise<Lane>;
|
|
49
|
+
/**
|
|
50
|
+
* Create a new lane/swimlane
|
|
51
|
+
*/
|
|
52
|
+
createLane(params: CreateLaneParams): Promise<Lane>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=board-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-client.d.ts","sourceRoot":"","sources":["../../../src/client/modules/board-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,IAAI,EACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,YAAY;IAE3B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAGzB,MAAM,CAAC,EAAE,CAAC,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC,EAAE,CAAC;IAGpD,MAAM,CAAC,EAAE,CAAC,UAAU,GAAG,cAAc,GAAG,aAAa,GAAG,MAA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