mcp-server-wom-call 0.0.11 → 0.0.13

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.
Files changed (59) hide show
  1. package/dist/config/constants.d.ts +17 -0
  2. package/dist/config/constants.d.ts.map +1 -0
  3. package/dist/config/index.d.ts +37 -0
  4. package/dist/config/index.d.ts.map +1 -0
  5. package/dist/config/s3.d.ts +20 -0
  6. package/dist/config/s3.d.ts.map +1 -0
  7. package/dist/config/systems.d.ts +40 -0
  8. package/dist/config/systems.d.ts.map +1 -0
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -3
  12. package/dist/index.js.map +1 -1
  13. package/dist/server.d.ts +14 -0
  14. package/dist/server.d.ts.map +1 -0
  15. package/dist/services/esb.d.ts +8 -0
  16. package/dist/services/esb.d.ts.map +1 -0
  17. package/dist/services/s3.d.ts +28 -0
  18. package/dist/services/s3.d.ts.map +1 -0
  19. package/dist/services/workorder.d.ts +15 -0
  20. package/dist/services/workorder.d.ts.map +1 -0
  21. package/dist/tools/base.d.ts +13 -0
  22. package/dist/tools/base.d.ts.map +1 -0
  23. package/dist/tools/index.d.ts +31 -0
  24. package/dist/tools/index.d.ts.map +1 -0
  25. package/dist/tools/upload/index.d.ts +4 -0
  26. package/dist/tools/upload/index.d.ts.map +1 -0
  27. package/dist/tools/upload/multiple.d.ts +10 -0
  28. package/dist/tools/upload/multiple.d.ts.map +1 -0
  29. package/dist/tools/upload/schema.d.ts +4 -0
  30. package/dist/tools/upload/schema.d.ts.map +1 -0
  31. package/dist/tools/upload/single.d.ts +10 -0
  32. package/dist/tools/upload/single.d.ts.map +1 -0
  33. package/dist/tools/workorder/create.d.ts +10 -0
  34. package/dist/tools/workorder/create.d.ts.map +1 -0
  35. package/dist/tools/workorder/index.d.ts +3 -0
  36. package/dist/tools/workorder/index.d.ts.map +1 -0
  37. package/dist/tools/workorder/schema.d.ts +3 -0
  38. package/dist/tools/workorder/schema.d.ts.map +1 -0
  39. package/dist/types/esb.d.ts +30 -0
  40. package/dist/types/esb.d.ts.map +1 -0
  41. package/dist/types/index.d.ts +4 -0
  42. package/dist/types/index.d.ts.map +1 -0
  43. package/dist/types/upload.d.ts +29 -0
  44. package/dist/types/upload.d.ts.map +1 -0
  45. package/dist/types/workorder.d.ts +23 -0
  46. package/dist/types/workorder.d.ts.map +1 -0
  47. package/dist/utils/formatter.d.ts +6 -0
  48. package/dist/utils/formatter.d.ts.map +1 -0
  49. package/dist/utils/logger.d.ts +7 -0
  50. package/dist/utils/logger.d.ts.map +1 -0
  51. package/dist/validators/index.d.ts +4 -0
  52. package/dist/validators/index.d.ts.map +1 -0
  53. package/dist/validators/input.d.ts +20 -0
  54. package/dist/validators/input.d.ts.map +1 -0
  55. package/dist/validators/response.d.ts +16 -0
  56. package/dist/validators/response.d.ts.map +1 -0
  57. package/dist/validators/upload.d.ts +20 -0
  58. package/dist/validators/upload.d.ts.map +1 -0
  59. package/package.json +3 -2
@@ -0,0 +1,14 @@
1
+ export declare class MCPServer {
2
+ private server;
3
+ private toolRegistry;
4
+ constructor();
5
+ /**
6
+ * Setup request handlers
7
+ */
8
+ private setupHandlers;
9
+ /**
10
+ * Start server
11
+ */
12
+ start(): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAYA,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,YAAY,CAAc;;IAmBlC;;OAEG;IACH,OAAO,CAAC,aAAa;IAsCrB;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAa7B"}
@@ -0,0 +1,8 @@
1
+ import { ESBResponse, WorkOrderData } from '../types';
2
+ export declare class ESBService {
3
+ /**
4
+ * Call ESB API
5
+ */
6
+ call<T = WorkOrderData>(payload: string): Promise<ESBResponse<T>>;
7
+ }
8
+ //# sourceMappingURL=esb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esb.d.ts","sourceRoot":"","sources":["../../src/services/esb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGrD,qBAAa,UAAU;IACrB;;OAEG;IACG,IAAI,CAAC,CAAC,GAAG,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAgCxE"}
@@ -0,0 +1,28 @@
1
+ import { FileUploadInput, UploadedFile } from '../types';
2
+ export declare class S3Service {
3
+ private client;
4
+ private bucket;
5
+ private publicUrl;
6
+ constructor();
7
+ /**
8
+ * Upload single file
9
+ */
10
+ uploadFile(file: FileUploadInput): Promise<UploadedFile>;
11
+ /**
12
+ * Get file buffer from different input sources
13
+ */
14
+ private getFileBuffer;
15
+ /**
16
+ * Download file from URL
17
+ */
18
+ private downloadFromUrl;
19
+ /**
20
+ * Upload multiple files
21
+ */
22
+ uploadFiles(files: FileUploadInput[]): Promise<UploadedFile[]>;
23
+ /**
24
+ * Get MIME type from file extension
25
+ */
26
+ private getMimeType;
27
+ }
28
+ //# sourceMappingURL=s3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../src/services/s3.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAExD,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,SAAS,CAAQ;;IAoBzB;;OAEG;IACG,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC;IA0C9D;;OAEG;YACW,aAAa;IAmB3B;;OAEG;YACW,eAAe;IAW7B;;OAEG;IACG,WAAW,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAKpE;;OAEG;IACH,OAAO,CAAC,WAAW;CA+BpB"}
@@ -0,0 +1,15 @@
1
+ import { WorkOrderInput, WorkOrderData, ESBResponse } from '../types';
2
+ import { ESBService } from './esb';
3
+ export declare class WorkOrderService {
4
+ private esbService;
5
+ constructor(esbService?: ESBService);
6
+ /**
7
+ * Build ESB request payload
8
+ */
9
+ private buildPayload;
10
+ /**
11
+ * Create work order
12
+ */
13
+ create(input: WorkOrderInput): Promise<ESBResponse<WorkOrderData>>;
14
+ }
15
+ //# sourceMappingURL=workorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workorder.d.ts","sourceRoot":"","sources":["../../src/services/workorder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,UAAU,CAAY;gBAElB,UAAU,GAAE,UAA6B;IAIrD;;OAEG;IACH,OAAO,CAAC,YAAY;IAuBpB;;OAEG;IACG,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;CAWzE"}
@@ -0,0 +1,13 @@
1
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare abstract class BaseTool {
3
+ abstract readonly definition: Tool;
4
+ /**
5
+ * Execute tool logic
6
+ */
7
+ abstract execute(args: unknown): Promise<CallToolResult>;
8
+ /**
9
+ * Get tool name
10
+ */
11
+ get name(): string;
12
+ }
13
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/tools/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAEzE,8BAAsB,QAAQ;IAC5B,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAA;IAElC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC;IAExD;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
@@ -0,0 +1,31 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import { BaseTool } from './base';
3
+ /**
4
+ * Tool registry - 在这里注册所有工具
5
+ */
6
+ export declare class ToolRegistry {
7
+ private tools;
8
+ constructor();
9
+ /**
10
+ * Register default tools
11
+ */
12
+ private registerDefaultTools;
13
+ /**
14
+ * Register a tool
15
+ */
16
+ register(tool: BaseTool): void;
17
+ /**
18
+ * Get tool by name
19
+ */
20
+ get(name: string): BaseTool | undefined;
21
+ /**
22
+ * Get all tools
23
+ */
24
+ getAll(): BaseTool[];
25
+ /**
26
+ * Get all tool definitions
27
+ */
28
+ getDefinitions(): Tool[];
29
+ }
30
+ export * from './base';
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAIjC;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAmC;;IAMhD;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAW5B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;IAI9B;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAIvC;;OAEG;IACH,MAAM,IAAI,QAAQ,EAAE;IAIpB;;OAEG;IACH,cAAc,IAAI,IAAI,EAAE;CAGzB;AAED,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './single';
2
+ export * from './multiple';
3
+ export * from './schema';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/upload/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
+ import { BaseTool } from '../base';
3
+ import { S3Service } from '../../services/s3';
4
+ export declare class UploadMultipleFilesTool extends BaseTool {
5
+ private s3Service;
6
+ readonly definition: Tool;
7
+ constructor(s3Service?: S3Service);
8
+ execute(args: unknown): Promise<CallToolResult>;
9
+ }
10
+ //# sourceMappingURL=multiple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiple.d.ts","sourceRoot":"","sources":["../../../src/tools/upload/multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAG7C,qBAAa,uBAAwB,SAAQ,QAAQ;IAGvC,OAAO,CAAC,SAAS;IAF7B,QAAQ,CAAC,UAAU,EAAE,IAAI,CAA6B;gBAElC,SAAS,GAAE,SAA2B;IAIpD,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC;CA2CtD"}
@@ -0,0 +1,4 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const UPLOAD_FILE_TOOL: Tool;
3
+ export declare const UPLOAD_MULTIPLE_FILES_TOOL: Tool;
4
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/tools/upload/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AAGzD,eAAO,MAAM,gBAAgB,EAAE,IAiD9B,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,IA+BxC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
+ import { BaseTool } from '../base';
3
+ import { S3Service } from '../../services/s3';
4
+ export declare class UploadFileTool extends BaseTool {
5
+ private s3Service;
6
+ readonly definition: Tool;
7
+ constructor(s3Service?: S3Service);
8
+ execute(args: unknown): Promise<CallToolResult>;
9
+ }
10
+ //# sourceMappingURL=single.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../src/tools/upload/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAG7C,qBAAa,cAAe,SAAQ,QAAQ;IAG9B,OAAO,CAAC,SAAS;IAF7B,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAmB;gBAExB,SAAS,GAAE,SAA2B;IAIpD,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC;CAwCtD"}
@@ -0,0 +1,10 @@
1
+ import { Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
+ import { BaseTool } from '../base';
3
+ import { WorkOrderService } from '../../services/workorder';
4
+ export declare class CreateWorkOrderTool extends BaseTool {
5
+ private workOrderService;
6
+ readonly definition: Tool;
7
+ constructor(workOrderService?: WorkOrderService);
8
+ execute(args: unknown): Promise<CallToolResult>;
9
+ }
10
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/tools/workorder/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAI3D,qBAAa,mBAAoB,SAAQ,QAAQ;IAI7C,OAAO,CAAC,gBAAgB;IAH1B,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAwB;gBAGvC,gBAAgB,GAAE,gBAAyC;IAK/D,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC;CAmCtD"}
@@ -0,0 +1,3 @@
1
+ export * from './create';
2
+ export * from './schema';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/workorder/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const CREATE_WORKORDER_TOOL: Tool;
3
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/tools/workorder/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AAOzD,eAAO,MAAM,qBAAqB,EAAE,IAgEnC,CAAA"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * ESB protocol attributes
3
+ */
4
+ export interface ESBAttributes {
5
+ App_ID: string;
6
+ Type: string;
7
+ Application_ID: string;
8
+ RETURN_CODE: string;
9
+ Target_ID: string;
10
+ Transaction_ID: string;
11
+ }
12
+ /**
13
+ * Business response data
14
+ */
15
+ export interface ReturnData<T = unknown> {
16
+ msg: string;
17
+ code: number;
18
+ data: T;
19
+ success: boolean;
20
+ }
21
+ /**
22
+ * Complete ESB API response structure
23
+ */
24
+ export interface ESBResponse<T = unknown> {
25
+ RESPONSE: {
26
+ ESB_ATTRS: ESBAttributes;
27
+ RETURN_DATA: ReturnData<T>;
28
+ };
29
+ }
30
+ //# sourceMappingURL=esb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esb.d.ts","sourceRoot":"","sources":["../../src/types/esb.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,OAAO;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,CAAC,CAAA;IACP,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,QAAQ,EAAE;QACR,SAAS,EAAE,aAAa,CAAA;QACxB,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAA;KAC3B,CAAA;CACF"}
@@ -0,0 +1,4 @@
1
+ export * from './esb';
2
+ export * from './workorder';
3
+ export * from './upload';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * File upload input - supports multiple input methods
3
+ */
4
+ export interface FileUploadInput {
5
+ filename: string;
6
+ filepath?: string;
7
+ content?: string;
8
+ url?: string;
9
+ mimetype?: string;
10
+ }
11
+ export interface MultipleFilesUploadInput {
12
+ files: FileUploadInput[];
13
+ }
14
+ export interface UploadedFile {
15
+ fileName: string;
16
+ originalName: string;
17
+ size: number;
18
+ mimetype: string;
19
+ url: string;
20
+ }
21
+ /**
22
+ * Upload response
23
+ */
24
+ export interface UploadResponse {
25
+ success: boolean;
26
+ message: string;
27
+ data: UploadedFile | UploadedFile[];
28
+ }
29
+ //# sourceMappingURL=upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/types/upload.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,eAAe,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,YAAY,GAAG,YAAY,EAAE,CAAA;CACpC"}
@@ -0,0 +1,23 @@
1
+ import { SystemCode } from '@/config';
2
+ export interface Attachment {
3
+ filename: string;
4
+ url: string;
5
+ size?: number;
6
+ }
7
+ export interface WorkOrderInput {
8
+ name?: string;
9
+ email?: string;
10
+ empNo: string;
11
+ system: SystemCode;
12
+ eventId?: string;
13
+ replayId?: string;
14
+ title: string;
15
+ content: string;
16
+ attachments?: Attachment[];
17
+ }
18
+ export interface WorkOrderData {
19
+ workOrderId?: string;
20
+ workOrderNo?: string;
21
+ [key: string]: unknown;
22
+ }
23
+ //# sourceMappingURL=workorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workorder.d.ts","sourceRoot":"","sources":["../../src/types/workorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB"}
@@ -0,0 +1,6 @@
1
+ import { ESBResponse, WorkOrderData } from '@/types';
2
+ /**
3
+ * Format ESB response for display
4
+ */
5
+ export declare function formatESBResponse(response: ESBResponse<WorkOrderData>): string;
6
+ //# sourceMappingURL=formatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../src/utils/formatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEpD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,GACnC,MAAM,CA2BR"}
@@ -0,0 +1,7 @@
1
+ export declare class Logger {
2
+ static info(message: string, ...args: any[]): void;
3
+ static error(message: string, ...args: any[]): void;
4
+ static success(message: string, ...args: any[]): void;
5
+ static warn(message: string, ...args: any[]): void;
6
+ }
7
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,qBAAa,MAAM;IACjB,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIlD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAInD,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIrD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;CAGnD"}
@@ -0,0 +1,4 @@
1
+ export * from './input';
2
+ export * from './response';
3
+ export * from './upload';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { WorkOrderInput } from '../types';
2
+ export declare class InputValidator {
3
+ /**
4
+ * Validate email format
5
+ */
6
+ static isValidEmail(email: string): boolean;
7
+ /**
8
+ * Validate URL format
9
+ */
10
+ static isValidUrl(url: string): boolean;
11
+ /**
12
+ * Validate work order input
13
+ */
14
+ static validateWorkOrderInput(args: unknown): asserts args is WorkOrderInput;
15
+ /**
16
+ * Validate attachments
17
+ */
18
+ private static validateAttachments;
19
+ }
20
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/validators/input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,qBAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAK3C;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IASvC;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,cAAc;IAsD5E;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;CAoBnC"}
@@ -0,0 +1,16 @@
1
+ import { ESBResponse, WorkOrderData } from '@/types';
2
+ export declare class ResponseValidator {
3
+ /**
4
+ * Parse and validate ESB response
5
+ */
6
+ static parseESBResponse(response: unknown): ESBResponse<WorkOrderData>;
7
+ /**
8
+ * Check if ESB response indicates success
9
+ */
10
+ static isSuccess(response: ESBResponse): boolean;
11
+ /**
12
+ * Get error message from response
13
+ */
14
+ static getErrorMessage(response: ESBResponse): string;
15
+ }
16
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/validators/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEpD,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,WAAW,CAAC,aAAa,CAAC;IAkBtE;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO;IAIhD;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM;CAGtD"}
@@ -0,0 +1,20 @@
1
+ import { FileUploadInput, MultipleFilesUploadInput } from '../types';
2
+ export declare class UploadValidator {
3
+ /**
4
+ * Validate base64 string
5
+ */
6
+ static isValidBase64(str: string): boolean;
7
+ /**
8
+ * Validate URL format
9
+ */
10
+ static isValidUrl(str: string): boolean;
11
+ /**
12
+ * Validate single file upload input
13
+ */
14
+ static validateFileUpload(args: unknown): asserts args is FileUploadInput;
15
+ /**
16
+ * Validate multiple files upload input
17
+ */
18
+ static validateMultipleFilesUpload(args: unknown): asserts args is MultipleFilesUploadInput;
19
+ }
20
+ //# sourceMappingURL=upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/validators/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA;AAGpE,qBAAa,eAAe;IAC1B;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAQ1C;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IASvC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,eAAe;IA0CzE;;OAEG;IACH,MAAM,CAAC,2BAA2B,CAChC,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,IAAI,wBAAwB;CAwB5C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-server-wom-call",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "MCP Server for Work Order Management System Integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "dev": "rollup -c -w",
18
18
  "start": "node dist/index.js",
19
19
  "prepublishOnly": "npm run build",
20
- "test:local": "node dist/index.js"
20
+ "test:local": "npx @modelcontextprotocol/inspector node dist/index.js"
21
21
  },
22
22
  "keywords": [
23
23
  "mcp",
@@ -31,6 +31,7 @@
31
31
  "author": "Twyford Ltd.",
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
+ "@aws-sdk/client-s3": "^3.958.0",
34
35
  "@modelcontextprotocol/sdk": "^1.0.1",
35
36
  "dotenv": "^16.0.0"
36
37
  },