fmea-api-mcp-server 1.1.47 → 1.1.49

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/dist/index.js CHANGED
@@ -28,7 +28,7 @@ class ApiDocsServer {
28
28
  constructor() {
29
29
  this.server = new Server({
30
30
  name: "api-docs-mcp",
31
- version: "1.1.47",
31
+ version: "1.1.49",
32
32
  }, {
33
33
  capabilities: {
34
34
  resources: {},
@@ -481,6 +481,25 @@ export class OramaSearchService {
481
481
  if (!action && resource) {
482
482
  action = 'list';
483
483
  }
484
+ // [R39] Approval resource: override action for better sub-routing
485
+ if (resource === 'approval') {
486
+ const hasDecision = lower.includes('decision') || lower.includes('refuse') || lower.includes('reject') || lower.includes('batch');
487
+ const hasRequest = lower.includes('request') || lower.includes('submit') || lower.includes('reviewer') || lower.includes('send');
488
+ if (action === 'update' || hasDecision || hasRequest) {
489
+ action = 'create'; // POST /approvals/decisions or /approvals/requests
490
+ }
491
+ }
492
+ // [R39] Board resource: better differentiation between list/read/create
493
+ if (resource === 'board') {
494
+ const hasRepliesNoun = lower.includes('with replies') || lower.includes('replies') || lower.includes('thread');
495
+ const hasReplyVerb = lower.startsWith('reply') || lower.includes(' reply to') || lower.includes('reply to');
496
+ if (hasReplyVerb) {
497
+ action = 'create'; // POST /board/{boardId}/replies
498
+ }
499
+ else if (hasRepliesNoun && action !== 'create') {
500
+ action = 'read'; // GET /board/{boardId}
501
+ }
502
+ }
484
503
  // [R16] [R22] Heuristic for 'save work' — save block nodes or fmm-diagram
485
504
  if (!resource && lower.includes('save work')) {
486
505
  action = 'update';
package/dist/synonyms.js CHANGED
@@ -59,6 +59,8 @@ export const RESOURCE_ALIASES = {
59
59
  'scoring-criteria': ['scoring criteria', 'scoring', 'score criteria', 'completeness scoring', 'scoring tree'], // [R30] Scoring criteria tree management
60
60
  'process-symbol': ['process symbol', 'process symbols', 'flow chart symbol', 'flowchart symbol', 'process flow'], // [R30] Process flow chart symbols
61
61
  'additional-info': ['additional info', 'additional information', 'extra info', 'supplementary info', 'custom field', 'custom attribute', 'form field'], // [R31] Additional info template management
62
+ 'approval': ['approval board', 'approval request', 'approval decisions', 'approval progress', 'approve or refuse', 'request approval', 'review workflow', 'submit approval', 'approve'], // [R39] Approval workflow
63
+ 'board': ['board comment', 'board discussion', 'discussion board', 'comment thread', 'review comment', 'discussion', 'comment board'], // [R39] Board comments/discussion
62
64
  'notice': ['notice', 'notices', 'announcement', 'bulletin', 'notification'], // [R32] Notice CRUD and visibility
63
65
  'tree-search': ['tree search', 'tree query', 'structure search', 'pattern search', 'subtree match', 'anchor pattern', 'context completion', 'reference node', 'rebuild index', 'reindex'], // [R35] Tree search query and index rebuild
64
66
  };
@@ -169,6 +171,16 @@ export const SYNONYM_GROUPS = {
169
171
  // [R30] FM Checkpoint & Scoring Domain
170
172
  "checkpoint": ["checklist", "check item", "verification", "audit item"],
171
173
  "breadcrumb": ["path", "navigation", "ancestor", "경로", "trail"], // [R31] Removed "hierarchy path" to avoid boosting /tree endpoints
174
+ // [R39] Approval & Board Domain
175
+ "approval": ["approve", "authorization", "sign-off", "decision", "review request"],
176
+ "approve": ["authorize", "accept", "confirm", "approval", "sign off"],
177
+ "refuse": ["reject", "deny", "decline", "disapprove", "refusal"],
178
+ "decision": ["approve", "refuse", "verdict", "choice"],
179
+ "board": ["comment", "discussion", "thread", "forum"],
180
+ "comment": ["board", "remark", "note", "opinion"],
181
+ "discussion": ["comment", "thread", "board", "conversation"],
182
+ "reply": ["response", "comment", "feedback", "answer"],
183
+ "thread": ["discussion", "comments", "replies", "chain"],
172
184
  // [R31] Korean Term Mappings
173
185
  "조회": ["get", "list", "view", "fetch", "search", "retrieve", "read", "show"],
174
186
  "경로": ["breadcrumb", "path", "navigation", "route", "trail"],
@@ -18,7 +18,9 @@ export class ScoreCalculator {
18
18
  'fault-tree': ['failure-mode'],
19
19
  'failure-mode': ['fault-tree', 'fmm-diagram'], // FTA contains failure modes, FMM is a diagram view
20
20
  'fmm-diagram': ['failure-mode', 'tree-search'], // [R19] [R35]
21
- 'project': ['document', 'file', 'member', 'join-request', 'worksheet', 'block-diagram'], // Project contains everything
21
+ 'project': ['document', 'file', 'member', 'join-request', 'worksheet', 'block-diagram', 'approval', 'board'], // Project contains everything [R39]
22
+ 'approval': ['project', 'board'], // [R39] Approval is related to projects and boards
23
+ 'board': ['approval', 'project'], // [R39] Board comments are part of approval workflow
22
24
  'knowledge': ['category'],
23
25
  'category': ['knowledge'],
24
26
  'oauth': ['auth'],
@@ -119,9 +119,17 @@
119
119
  {
120
120
  "name": "fmeaType",
121
121
  "in": "query",
122
- "description": "FMEA project type (e.g. DFMEA, PFMEA)",
122
+ "description": "FMEA project type",
123
123
  "schema": {
124
- "type": "string"
124
+ "type": "string",
125
+ "enum": [
126
+ "DESIGN",
127
+ "PROCESS",
128
+ "EQUIPMENT",
129
+ "FA",
130
+ "FTA",
131
+ "CPLAN"
132
+ ]
125
133
  }
126
134
  }
127
135
  ],
@@ -316,9 +324,17 @@
316
324
  {
317
325
  "name": "fmeaType",
318
326
  "in": "query",
319
- "description": "FMEA project type (e.g. DFMEA, PFMEA)",
327
+ "description": "FMEA project type",
320
328
  "schema": {
321
- "type": "string"
329
+ "type": "string",
330
+ "enum": [
331
+ "DESIGN",
332
+ "PROCESS",
333
+ "EQUIPMENT",
334
+ "FA",
335
+ "FTA",
336
+ "CPLAN"
337
+ ]
322
338
  }
323
339
  }
324
340
  ],
@@ -418,9 +434,17 @@
418
434
  {
419
435
  "name": "fmeaType",
420
436
  "in": "query",
421
- "description": "FMEA project type (e.g. DFMEA, PFMEA)",
437
+ "description": "FMEA project type",
422
438
  "schema": {
423
- "type": "string"
439
+ "type": "string",
440
+ "enum": [
441
+ "DESIGN",
442
+ "PROCESS",
443
+ "EQUIPMENT",
444
+ "FA",
445
+ "FTA",
446
+ "CPLAN"
447
+ ]
424
448
  }
425
449
  },
426
450
  {
@@ -278,9 +278,14 @@
278
278
  {
279
279
  "name": "action",
280
280
  "in": "query",
281
- "description": "Filter by action type (e.g., DEACTIVATE, CREATE)",
281
+ "description": "Filter by action type",
282
282
  "schema": {
283
- "type": "string"
283
+ "type": "string",
284
+ "enum": [
285
+ "ADD",
286
+ "DELETE",
287
+ "UPDATE"
288
+ ]
284
289
  }
285
290
  },
286
291
  {
@@ -0,0 +1,340 @@
1
+ {
2
+ "category": "Approvals",
3
+ "version": "v2",
4
+ "description": "",
5
+ "endpoints": [
6
+ {
7
+ "path": "/api/v2/approvals/board",
8
+ "method": "GET",
9
+ "operationId": "getBoard",
10
+ "summary": "Get approval board",
11
+ "description": "Returns approval progress and board items for a project. Includes progress status, step participants, and opinion list. Optional step filter narrows opinions by type (e.g., REVIEW_OPINION, APPROVAL_OPINION).",
12
+ "tags": [
13
+ "Approval"
14
+ ],
15
+ "parameters": [
16
+ {
17
+ "name": "projectId",
18
+ "in": "query",
19
+ "description": "Project ID (required)",
20
+ "schema": {
21
+ "type": "string"
22
+ }
23
+ },
24
+ {
25
+ "name": "step",
26
+ "in": "query",
27
+ "description": "Step filter (optional): REVIEW_OPINION|APPROVAL_OPINION|APPROVAL_DECISION|REVIEW_REFUSAL|SCORE_PASS|SCORE_FAIL|SCORE_REFUSAL",
28
+ "schema": {
29
+ "type": "string"
30
+ }
31
+ }
32
+ ],
33
+ "requestBody": null,
34
+ "responses": {
35
+ "default": {
36
+ "description": "default response",
37
+ "content": {
38
+ "application/json": {
39
+ "schema": {
40
+ "type": "object",
41
+ "properties": {
42
+ "progress": {
43
+ "type": "object",
44
+ "properties": {
45
+ "isModifyRequest": {
46
+ "type": "boolean"
47
+ },
48
+ "useScore": {
49
+ "type": "boolean"
50
+ },
51
+ "doApproval": {
52
+ "type": "boolean"
53
+ },
54
+ "approvalRound": {
55
+ "type": "integer"
56
+ },
57
+ "refusedStep": {
58
+ "type": "string"
59
+ },
60
+ "steps": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "object",
64
+ "properties": {
65
+ "step": {
66
+ "type": "string",
67
+ "enum": [
68
+ "WRITE",
69
+ "REVIEW",
70
+ "APPROVE",
71
+ "SCORE"
72
+ ]
73
+ },
74
+ "status": {
75
+ "type": "string",
76
+ "enum": [
77
+ "PENDING",
78
+ "ACTIVE",
79
+ "COMPLETED",
80
+ "REFUSED"
81
+ ]
82
+ },
83
+ "participants": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "object",
87
+ "properties": {
88
+ "userId": {
89
+ "type": "string"
90
+ },
91
+ "name": {
92
+ "type": "string"
93
+ },
94
+ "isAuthorizer": {
95
+ "type": "boolean"
96
+ },
97
+ "boardStatus": {
98
+ "type": "string",
99
+ "enum": [
100
+ "REVIEW",
101
+ "ASK_MODIFY",
102
+ "REVIEWED",
103
+ "APPROVE",
104
+ "ASK_MODIFY_REVIEWED",
105
+ "APPROVED",
106
+ "SCORE",
107
+ "ASK_MODIFY_APPROVED",
108
+ "REFUSED",
109
+ "SCORE_PASS",
110
+ "SCORE_FAIL",
111
+ "COMPLETED",
112
+ "CONFIRM_VALIDITY",
113
+ "DATE_EXPIRED"
114
+ ]
115
+ },
116
+ "isAdditionalReviewer": {
117
+ "type": "boolean"
118
+ },
119
+ "isModifyReviewer": {
120
+ "type": "boolean"
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ },
130
+ "items": {
131
+ "type": "array",
132
+ "items": {
133
+ "type": "object",
134
+ "properties": {
135
+ "id": {
136
+ "type": "integer",
137
+ "format": "int64"
138
+ },
139
+ "stepLabel": {
140
+ "type": "string"
141
+ },
142
+ "stepItem": {
143
+ "type": "string"
144
+ },
145
+ "title": {
146
+ "type": "string"
147
+ },
148
+ "content": {
149
+ "type": "string"
150
+ },
151
+ "userId": {
152
+ "type": "string"
153
+ },
154
+ "writerName": {
155
+ "type": "string"
156
+ },
157
+ "createdAt": {
158
+ "type": "string",
159
+ "format": "date-time"
160
+ },
161
+ "score": {
162
+ "type": "integer"
163
+ },
164
+ "status": {
165
+ "type": "string",
166
+ "enum": [
167
+ "REVIEW",
168
+ "ASK_MODIFY",
169
+ "REVIEWED",
170
+ "APPROVE",
171
+ "ASK_MODIFY_REVIEWED",
172
+ "APPROVED",
173
+ "SCORE",
174
+ "ASK_MODIFY_APPROVED",
175
+ "REFUSED",
176
+ "SCORE_PASS",
177
+ "SCORE_FAIL",
178
+ "COMPLETED",
179
+ "CONFIRM_VALIDITY",
180
+ "DATE_EXPIRED"
181
+ ]
182
+ },
183
+ "statusDisplay": {
184
+ "type": "string"
185
+ },
186
+ "department": {
187
+ "type": "string"
188
+ },
189
+ "fileUrl": {
190
+ "type": "string"
191
+ },
192
+ "parentId": {
193
+ "type": "integer",
194
+ "format": "int64"
195
+ },
196
+ "indentLevel": {
197
+ "type": "integer"
198
+ },
199
+ "replies": {
200
+ "type": "array",
201
+ "items": {
202
+ "type": "object",
203
+ "description": "(circular: ApprovalBoardDTO)"
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ },
216
+ {
217
+ "path": "/api/v2/approvals/decisions",
218
+ "method": "POST",
219
+ "operationId": "postDecisions",
220
+ "summary": "Process approval decisions",
221
+ "description": "Processes a batch of approval decisions (approve/refuse/accept/reject). Each decision is processed independently. Returns per-item success/failure results. Partial success is supported - failed items don't affect successful ones.",
222
+ "tags": [
223
+ "Approval"
224
+ ],
225
+ "parameters": [],
226
+ "requestBody": {
227
+ "content": {
228
+ "application/json": {
229
+ "schema": {
230
+ "type": "object",
231
+ "properties": {
232
+ "decisions": {
233
+ "type": "array",
234
+ "items": {
235
+ "type": "object",
236
+ "properties": {
237
+ "projectId": {
238
+ "type": "string"
239
+ },
240
+ "action": {
241
+ "type": "string",
242
+ "enum": [
243
+ "APPROVE",
244
+ "REFUSE",
245
+ "ACCEPT",
246
+ "REJECT"
247
+ ]
248
+ },
249
+ "comment": {
250
+ "type": "string"
251
+ },
252
+ "score": {
253
+ "type": "integer",
254
+ "format": "int32"
255
+ }
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ },
264
+ "responses": {
265
+ "default": {
266
+ "description": "default response",
267
+ "content": {
268
+ "application/json": {
269
+ "schema": {
270
+ "type": "array",
271
+ "items": {
272
+ "type": "object",
273
+ "properties": {
274
+ "projectId": {
275
+ "type": "string"
276
+ },
277
+ "success": {
278
+ "type": "boolean"
279
+ },
280
+ "message": {
281
+ "type": "string"
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
287
+ }
288
+ }
289
+ }
290
+ },
291
+ {
292
+ "path": "/api/v2/approvals/requests",
293
+ "method": "POST",
294
+ "operationId": "postRequests",
295
+ "summary": "Request approval",
296
+ "description": "Submits a project for approval review. Project must be in In-Progress or CanModify status. Sets reviewers, approver, and transitions to Review status.",
297
+ "tags": [
298
+ "Approval"
299
+ ],
300
+ "parameters": [],
301
+ "requestBody": {
302
+ "content": {
303
+ "application/json": {
304
+ "schema": {
305
+ "type": "object",
306
+ "properties": {
307
+ "projectId": {
308
+ "type": "string"
309
+ },
310
+ "reviewerIds": {
311
+ "type": "array",
312
+ "items": {
313
+ "type": "string"
314
+ }
315
+ },
316
+ "approverId": {
317
+ "type": "string"
318
+ },
319
+ "targetDate": {
320
+ "type": "string"
321
+ },
322
+ "requestType": {
323
+ "type": "string"
324
+ }
325
+ }
326
+ }
327
+ }
328
+ }
329
+ },
330
+ "responses": {
331
+ "default": {
332
+ "description": "default response",
333
+ "content": {
334
+ "application/json": {}
335
+ }
336
+ }
337
+ }
338
+ }
339
+ ]
340
+ }
@@ -729,7 +729,7 @@
729
729
  {
730
730
  "name": "blockDiagramType",
731
731
  "in": "path",
732
- "description": "Block diagram type. Valid values: P-DIAGRAM, BOUNDARY-DIAGRAM.",
732
+ "description": "Block diagram type",
733
733
  "required": true,
734
734
  "schema": {
735
735
  "type": "string",