@hed-hog/core 0.0.350 → 0.0.351
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/access-log/access-log.controller.d.ts +16 -0
- package/dist/access-log/access-log.controller.d.ts.map +1 -0
- package/dist/access-log/access-log.controller.js +44 -0
- package/dist/access-log/access-log.controller.js.map +1 -0
- package/dist/access-log/access-log.interceptor.d.ts +9 -0
- package/dist/access-log/access-log.interceptor.d.ts.map +1 -0
- package/dist/access-log/access-log.interceptor.js +46 -0
- package/dist/access-log/access-log.interceptor.js.map +1 -0
- package/dist/access-log/access-log.module.d.ts +3 -0
- package/dist/access-log/access-log.module.d.ts.map +1 -0
- package/dist/access-log/access-log.module.js +29 -0
- package/dist/access-log/access-log.module.js.map +1 -0
- package/dist/access-log/access-log.service.d.ts +47 -0
- package/dist/access-log/access-log.service.d.ts.map +1 -0
- package/dist/access-log/access-log.service.js +113 -0
- package/dist/access-log/access-log.service.js.map +1 -0
- package/dist/access-log/dto/query-access-log.dto.d.ts +8 -0
- package/dist/access-log/dto/query-access-log.dto.d.ts.map +1 -0
- package/dist/access-log/dto/query-access-log.dto.js +42 -0
- package/dist/access-log/dto/query-access-log.dto.js.map +1 -0
- package/dist/auth/auth.controller.d.ts +9 -9
- package/dist/auth/auth.service.d.ts +19 -19
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +0 -4
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/challenge/challenge.service.d.ts +2 -2
- package/dist/challenge/challenge.service.d.ts.map +1 -1
- package/dist/challenge/challenge.service.js +0 -1
- package/dist/challenge/challenge.service.js.map +1 -1
- package/dist/core/system.module.d.ts.map +1 -1
- package/dist/core/system.module.js +1 -0
- package/dist/core/system.module.js.map +1 -1
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +12 -0
- package/dist/core.module.js.map +1 -1
- package/dist/dashboard/dashboard-user/dashboard-user.controller.d.ts +3 -3
- package/dist/dashboard/dashboard-user/dashboard-user.service.d.ts +3 -3
- package/dist/dashboard/dashboard.module.d.ts.map +1 -1
- package/dist/dashboard/dashboard.module.js +4 -1
- package/dist/dashboard/dashboard.module.js.map +1 -1
- package/dist/file/file.controller.js +0 -1
- package/dist/file/file.controller.js.map +1 -1
- package/dist/file/file.service.d.ts +65 -0
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +151 -3
- package/dist/file/file.service.js.map +1 -1
- package/dist/file/provider/abstract.provider.d.ts +8 -0
- package/dist/file/provider/abstract.provider.d.ts.map +1 -1
- package/dist/file/provider/abstract.provider.js.map +1 -1
- package/dist/file/provider/azure.provider.d.ts +4 -0
- package/dist/file/provider/azure.provider.d.ts.map +1 -1
- package/dist/file/provider/azure.provider.js +14 -0
- package/dist/file/provider/azure.provider.js.map +1 -1
- package/dist/file/provider/gcs.provider.d.ts +4 -0
- package/dist/file/provider/gcs.provider.d.ts.map +1 -1
- package/dist/file/provider/gcs.provider.js +14 -0
- package/dist/file/provider/gcs.provider.js.map +1 -1
- package/dist/file/provider/local.provider.d.ts +4 -0
- package/dist/file/provider/local.provider.d.ts.map +1 -1
- package/dist/file/provider/local.provider.js +19 -0
- package/dist/file/provider/local.provider.js.map +1 -1
- package/dist/file/provider/provider.factory.d.ts.map +1 -1
- package/dist/file/provider/provider.factory.js +3 -0
- package/dist/file/provider/provider.factory.js.map +1 -1
- package/dist/file/provider/s3.provider.d.ts +4 -0
- package/dist/file/provider/s3.provider.d.ts.map +1 -1
- package/dist/file/provider/s3.provider.js +17 -0
- package/dist/file/provider/s3.provider.js.map +1 -1
- package/dist/mcp/mcp-audit.service.d.ts +3 -1
- package/dist/mcp/mcp-audit.service.d.ts.map +1 -1
- package/dist/mcp/mcp-audit.service.js +14 -2
- package/dist/mcp/mcp-audit.service.js.map +1 -1
- package/dist/mcp/mcp.controller.d.ts +3 -1
- package/dist/mcp/mcp.controller.d.ts.map +1 -1
- package/dist/mcp/mcp.controller.js +10 -2
- package/dist/mcp/mcp.controller.js.map +1 -1
- package/dist/mcp/mcp.module.d.ts.map +1 -1
- package/dist/mcp/mcp.module.js +72 -0
- package/dist/mcp/mcp.module.js.map +1 -1
- package/dist/mcp/tools/core-ai.mcp-tools.d.ts +45 -0
- package/dist/mcp/tools/core-ai.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-ai.mcp-tools.js +214 -0
- package/dist/mcp/tools/core-ai.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.d.ts +21 -0
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.js +89 -0
- package/dist/mcp/tools/core-dashboard-items.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-dashboard.mcp-tools.d.ts +29 -0
- package/dist/mcp/tools/core-dashboard.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-dashboard.mcp-tools.js +149 -0
- package/dist/mcp/tools/core-dashboard.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.d.ts +30 -0
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.js +185 -0
- package/dist/mcp/tools/core-event-webhooks.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-files.mcp-tools.d.ts +26 -0
- package/dist/mcp/tools/core-files.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-files.mcp-tools.js +140 -0
- package/dist/mcp/tools/core-files.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-integration-events.mcp-tools.d.ts +26 -0
- package/dist/mcp/tools/core-integration-events.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-integration-events.mcp-tools.js +168 -0
- package/dist/mcp/tools/core-integration-events.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-mail-profile.mcp-tools.d.ts +32 -0
- package/dist/mcp/tools/core-mail-profile.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-mail-profile.mcp-tools.js +178 -0
- package/dist/mcp/tools/core-mail-profile.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-mail-sent.mcp-tools.d.ts +14 -0
- package/dist/mcp/tools/core-mail-sent.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-mail-sent.mcp-tools.js +106 -0
- package/dist/mcp/tools/core-mail-sent.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-mail.mcp-tools.d.ts +36 -0
- package/dist/mcp/tools/core-mail.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-mail.mcp-tools.js +184 -0
- package/dist/mcp/tools/core-mail.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-mcp-chat.mcp-tools.d.ts +21 -0
- package/dist/mcp/tools/core-mcp-chat.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-mcp-chat.mcp-tools.js +118 -0
- package/dist/mcp/tools/core-mcp-chat.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-menus.mcp-tools.d.ts +40 -0
- package/dist/mcp/tools/core-menus.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-menus.mcp-tools.js +268 -0
- package/dist/mcp/tools/core-menus.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-notifications.mcp-tools.d.ts +31 -0
- package/dist/mcp/tools/core-notifications.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-notifications.mcp-tools.js +178 -0
- package/dist/mcp/tools/core-notifications.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-profile.mcp-tools.d.ts +20 -0
- package/dist/mcp/tools/core-profile.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-profile.mcp-tools.js +111 -0
- package/dist/mcp/tools/core-profile.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-roles.mcp-tools.d.ts +70 -0
- package/dist/mcp/tools/core-roles.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-roles.mcp-tools.js +355 -0
- package/dist/mcp/tools/core-roles.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-routes.mcp-tools.d.ts +52 -0
- package/dist/mcp/tools/core-routes.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-routes.mcp-tools.js +254 -0
- package/dist/mcp/tools/core-routes.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-screens.mcp-tools.d.ts +47 -0
- package/dist/mcp/tools/core-screens.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-screens.mcp-tools.js +250 -0
- package/dist/mcp/tools/core-screens.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-sessions.mcp-tools.d.ts +20 -0
- package/dist/mcp/tools/core-sessions.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-sessions.mcp-tools.js +128 -0
- package/dist/mcp/tools/core-sessions.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-settings.mcp-tools.d.ts +25 -0
- package/dist/mcp/tools/core-settings.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-settings.mcp-tools.js +138 -0
- package/dist/mcp/tools/core-settings.mcp-tools.js.map +1 -1
- package/dist/mcp/tools/core-system.mcp-tools.d.ts +8 -0
- package/dist/mcp/tools/core-system.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-system.mcp-tools.js +40 -0
- package/dist/mcp/tools/core-system.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-webhooks.mcp-tools.d.ts +46 -0
- package/dist/mcp/tools/core-webhooks.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-webhooks.mcp-tools.js +266 -0
- package/dist/mcp/tools/core-webhooks.mcp-tools.js.map +1 -0
- package/dist/mcp-chat/mcp-chat.controller.d.ts +1 -1
- package/dist/mcp-chat/mcp-chat.service.d.ts +25 -2
- package/dist/mcp-chat/mcp-chat.service.d.ts.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.js +666 -36
- package/dist/mcp-chat/mcp-chat.service.js.map +1 -1
- package/dist/notification/notification.controller.d.ts +8 -4
- package/dist/notification/notification.controller.d.ts.map +1 -1
- package/dist/notification/notification.controller.js +12 -0
- package/dist/notification/notification.controller.js.map +1 -1
- package/dist/notification/notification.service.d.ts +19 -5
- package/dist/notification/notification.service.d.ts.map +1 -1
- package/dist/notification/notification.service.js +155 -9
- package/dist/notification/notification.service.js.map +1 -1
- package/dist/pdf/pdf.service.js +1 -1
- package/dist/pdf/pdf.service.js.map +1 -1
- package/dist/profile/profile.controller.d.ts +3 -3
- package/dist/profile/profile.controller.js +0 -1
- package/dist/profile/profile.controller.js.map +1 -1
- package/dist/profile/profile.module.d.ts.map +1 -1
- package/dist/profile/profile.module.js +1 -0
- package/dist/profile/profile.module.js.map +1 -1
- package/dist/profile/profile.service.d.ts +3 -3
- package/dist/session/session.controller.d.ts +2 -2
- package/dist/session/session.service.d.ts +6 -6
- package/dist/setting/setting.controller.d.ts +1 -1
- package/dist/setting/setting.service.d.ts +1 -1
- package/dist/setting/setting.service.d.ts.map +1 -1
- package/dist/setting/setting.service.js +1 -4
- package/dist/setting/setting.service.js.map +1 -1
- package/dist/task/task.service.d.ts +1 -0
- package/dist/task/task.service.d.ts.map +1 -1
- package/dist/task/task.service.js +25 -0
- package/dist/task/task.service.js.map +1 -1
- package/dist/token/token.service.d.ts.map +1 -1
- package/dist/token/token.service.js +0 -1
- package/dist/token/token.service.js.map +1 -1
- package/dist/user/user.controller.d.ts +9 -9
- package/dist/user/user.service.d.ts +21 -21
- package/dist/webhook-integration/dto/webhook-action.dto.d.ts +22 -0
- package/dist/webhook-integration/dto/webhook-action.dto.d.ts.map +1 -0
- package/dist/webhook-integration/dto/webhook-action.dto.js +120 -0
- package/dist/webhook-integration/dto/webhook-action.dto.js.map +1 -0
- package/dist/webhook-integration/webhook-integration.controller.d.ts +7 -5
- package/dist/webhook-integration/webhook-integration.controller.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.controller.js +18 -5
- package/dist/webhook-integration/webhook-integration.controller.js.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.d.ts +14 -5
- package/dist/webhook-integration/webhook-integration.service.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.js +174 -41
- package/dist/webhook-integration/webhook-integration.service.js.map +1 -1
- package/hedhog/data/menu.yaml +15 -0
- package/hedhog/data/route.yaml +1304 -0
- package/hedhog/data/setting_group.yaml +67 -0
- package/hedhog/data/setting_subgroup.yaml +16 -0
- package/hedhog/frontend/app/access-log/page.tsx.ejs +772 -0
- package/hedhog/frontend/app/ai_agent/page.tsx.ejs +10 -3
- package/hedhog/frontend/app/dashboard/dashboard-home-tabs.tsx.ejs +33 -13
- package/hedhog/frontend/app/dashboard/management/tabs/components-tab.tsx.ejs +12 -5
- package/hedhog/frontend/app/dashboard/management/tabs/dashboards-tab.tsx.ejs +12 -5
- package/hedhog/frontend/app/integrations-webhooks/page.tsx.ejs +1817 -356
- package/hedhog/frontend/app/mcp_chat/chat-components.tsx.ejs +43 -5
- package/hedhog/frontend/app/mcp_chat/page.tsx.ejs +35 -7
- package/hedhog/frontend/app/menu/page.tsx.ejs +9 -3
- package/hedhog/frontend/app/roles/page.tsx.ejs +18 -6
- package/hedhog/frontend/app/routes/page.tsx.ejs +9 -3
- package/hedhog/frontend/app/setting-list/page.tsx.ejs +344 -171
- package/hedhog/frontend/app/users/user-access-sheet.tsx.ejs +310 -304
- package/hedhog/frontend/app/users/user-sheet.tsx.ejs +25 -7
- package/hedhog/frontend/messages/en.json +104 -3
- package/hedhog/frontend/messages/pt.json +104 -3
- package/hedhog/table/access_log.yaml +31 -0
- package/package.json +5 -4
- package/src/access-log/access-log.controller.ts +29 -0
- package/src/access-log/access-log.interceptor.ts +38 -0
- package/src/access-log/access-log.module.ts +16 -0
- package/src/access-log/access-log.service.ts +129 -0
- package/src/access-log/dto/query-access-log.dto.ts +23 -0
- package/src/auth/auth.service.ts +0 -7
- package/src/challenge/challenge.service.ts +0 -2
- package/src/core/system.module.ts +1 -0
- package/src/core.module.ts +12 -0
- package/src/dashboard/dashboard.module.ts +4 -1
- package/src/file/file.controller.ts +14 -14
- package/src/file/file.service.ts +198 -4
- package/src/file/provider/abstract.provider.ts +10 -0
- package/src/file/provider/azure.provider.ts +24 -0
- package/src/file/provider/gcs.provider.ts +20 -0
- package/src/file/provider/local.provider.ts +30 -2
- package/src/file/provider/provider.factory.ts +3 -0
- package/src/file/provider/s3.provider.ts +22 -0
- package/src/mcp/mcp-audit.service.ts +47 -36
- package/src/mcp/mcp.controller.ts +40 -30
- package/src/mcp/mcp.module.ts +72 -0
- package/src/mcp/tools/core-ai.mcp-tools.ts +156 -0
- package/src/mcp/tools/core-dashboard-items.mcp-tools.ts +63 -0
- package/src/mcp/tools/core-dashboard.mcp-tools.ts +103 -0
- package/src/mcp/tools/core-event-webhooks.mcp-tools.ts +134 -0
- package/src/mcp/tools/core-files.mcp-tools.ts +105 -0
- package/src/mcp/tools/core-integration-events.mcp-tools.ts +118 -0
- package/src/mcp/tools/core-mail-profile.mcp-tools.ts +128 -0
- package/src/mcp/tools/core-mail-sent.mcp-tools.ts +76 -0
- package/src/mcp/tools/core-mail.mcp-tools.ts +130 -0
- package/src/mcp/tools/core-mcp-chat.mcp-tools.ts +81 -0
- package/src/mcp/tools/core-menus.mcp-tools.ts +197 -0
- package/src/mcp/tools/core-notifications.mcp-tools.ts +128 -0
- package/src/mcp/tools/core-profile.mcp-tools.ts +74 -0
- package/src/mcp/tools/core-roles.mcp-tools.ts +288 -0
- package/src/mcp/tools/core-routes.mcp-tools.ts +196 -0
- package/src/mcp/tools/core-screens.mcp-tools.ts +186 -0
- package/src/mcp/tools/core-sessions.mcp-tools.ts +97 -0
- package/src/mcp/tools/core-settings.mcp-tools.ts +171 -53
- package/src/mcp/tools/core-system.mcp-tools.ts +19 -0
- package/src/mcp/tools/core-webhooks.mcp-tools.ts +199 -0
- package/src/mcp-chat/mcp-chat.service.ts +887 -38
- package/src/notification/notification.controller.ts +20 -8
- package/src/notification/notification.service.ts +209 -9
- package/src/pdf/pdf.service.ts +1 -1
- package/src/profile/profile.controller.ts +1 -1
- package/src/profile/profile.module.ts +1 -0
- package/src/setting/setting.service.ts +8 -11
- package/src/task/task.service.ts +31 -0
- package/src/token/token.service.ts +0 -2
- package/src/webhook-integration/dto/webhook-action.dto.ts +96 -0
- package/src/webhook-integration/webhook-integration.controller.ts +124 -103
- package/src/webhook-integration/webhook-integration.service.ts +267 -64
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CoreMailSentMcpTools = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const mail_sent_service_1 = require("../../mail-sent/mail-sent.service");
|
|
15
|
+
const mcp_tool_decorator_1 = require("../decorators/mcp-tool.decorator");
|
|
16
|
+
let CoreMailSentMcpTools = class CoreMailSentMcpTools {
|
|
17
|
+
constructor(mailSentService) {
|
|
18
|
+
this.mailSentService = mailSentService;
|
|
19
|
+
}
|
|
20
|
+
async listMailSent(args, _context) {
|
|
21
|
+
var _a, _b, _c, _d, _e;
|
|
22
|
+
return this.mailSentService.list({
|
|
23
|
+
page: (_a = args.page) !== null && _a !== void 0 ? _a : 1,
|
|
24
|
+
pageSize: (_b = args.pageSize) !== null && _b !== void 0 ? _b : 20,
|
|
25
|
+
search: (_c = args.search) !== null && _c !== void 0 ? _c : '',
|
|
26
|
+
sortField: (_d = args.sortField) !== null && _d !== void 0 ? _d : 'id',
|
|
27
|
+
sortOrder: (_e = args.sortOrder) !== null && _e !== void 0 ? _e : 'asc',
|
|
28
|
+
fields: '',
|
|
29
|
+
status: args.status,
|
|
30
|
+
hasError: args.hasError,
|
|
31
|
+
recipientEmail: args.recipientEmail,
|
|
32
|
+
createdAtFrom: args.createdAtFrom,
|
|
33
|
+
createdAtTo: args.createdAtTo,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async getMailSent(args, context) {
|
|
37
|
+
return this.mailSentService.get(context.locale, args.id);
|
|
38
|
+
}
|
|
39
|
+
async deleteMailSent(args, context) {
|
|
40
|
+
return this.mailSentService.delete(context.locale, { ids: args.ids });
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.CoreMailSentMcpTools = CoreMailSentMcpTools;
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
46
|
+
name: 'core.mail-sent.list',
|
|
47
|
+
description: 'Lists sent mail records with optional filters. Admin only.',
|
|
48
|
+
inputSchema: {
|
|
49
|
+
type: 'object',
|
|
50
|
+
properties: {
|
|
51
|
+
page: { type: 'number', description: 'Page number (default: 1)' },
|
|
52
|
+
pageSize: { type: 'number', description: 'Items per page (default: 20)' },
|
|
53
|
+
search: { type: 'string', description: 'Search term' },
|
|
54
|
+
sortField: { type: 'string', description: 'Field to sort by' },
|
|
55
|
+
sortOrder: { type: 'string', enum: ['asc', 'desc'], description: 'Sort direction' },
|
|
56
|
+
status: { type: 'string', description: 'Filter by status (e.g. sent, failed)' },
|
|
57
|
+
hasError: { type: 'boolean', description: 'Filter by error presence' },
|
|
58
|
+
recipientEmail: { type: 'string', description: 'Filter by recipient email' },
|
|
59
|
+
createdAtFrom: { type: 'string', description: 'Start date filter (ISO 8601)' },
|
|
60
|
+
createdAtTo: { type: 'string', description: 'End date filter (ISO 8601)' },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
readOnly: true,
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Function),
|
|
66
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
67
|
+
__metadata("design:returntype", Promise)
|
|
68
|
+
], CoreMailSentMcpTools.prototype, "listMailSent", null);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
71
|
+
name: 'core.mail-sent.get',
|
|
72
|
+
description: 'Returns a single sent mail record by ID. Admin only.',
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
properties: {
|
|
76
|
+
id: { type: 'number', description: 'Sent mail record ID' },
|
|
77
|
+
},
|
|
78
|
+
required: ['id'],
|
|
79
|
+
},
|
|
80
|
+
readOnly: true,
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], CoreMailSentMcpTools.prototype, "getMailSent", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
88
|
+
name: 'core.mail-sent.delete',
|
|
89
|
+
description: 'Deletes one or more sent mail records by their IDs. Admin only.',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
ids: { type: 'array', items: { type: 'number' }, description: 'Sent mail record IDs to delete' },
|
|
94
|
+
},
|
|
95
|
+
required: ['ids'],
|
|
96
|
+
},
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", Function),
|
|
99
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
100
|
+
__metadata("design:returntype", Promise)
|
|
101
|
+
], CoreMailSentMcpTools.prototype, "deleteMailSent", null);
|
|
102
|
+
exports.CoreMailSentMcpTools = CoreMailSentMcpTools = __decorate([
|
|
103
|
+
(0, common_1.Injectable)(),
|
|
104
|
+
__metadata("design:paramtypes", [mail_sent_service_1.MailSentService])
|
|
105
|
+
], CoreMailSentMcpTools);
|
|
106
|
+
//# sourceMappingURL=core-mail-sent.mcp-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-mail-sent.mcp-tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/core-mail-sent.mcp-tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yEAAoE;AACpE,yEAA2D;AAIpD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAsB3D,AAAN,KAAK,CAAC,YAAY,CAAC,IAAyB,EAAE,QAAoB;;QAChE,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;YAC/B,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,CAAC;YACpB,QAAQ,EAAE,MAAA,IAAI,CAAC,QAAQ,mCAAI,EAAE;YAC7B,MAAM,EAAE,MAAA,IAAI,CAAC,MAAM,mCAAI,EAAE;YACzB,SAAS,EAAE,MAAA,IAAI,CAAC,SAAS,mCAAI,IAAI;YACjC,SAAS,EAAE,MAAA,IAAI,CAAC,SAAS,mCAAI,KAAK;YAClC,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;SACvB,CAAC,CAAC;IACZ,CAAC;IAcK,AAA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QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;gBAC9E,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;aAC3E;SACF;QACD,QAAQ,EAAE,IAAI;KACf,CAAC;;;;wDAeD;AAcK;IAZL,IAAA,4BAAO,EAAC;QACP,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,sDAAsD;QACnE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE;aAC3D;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;QACD,QAAQ,EAAE,IAAI;KACf,CAAC;;;;uDAGD;AAaK;IAXL,IAAA,4BAAO,EAAC;QACP,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,iEAAiE;QAC9E,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE;aACjG;YACD,QAAQ,EAAE,CAAC,KAAK,CAAC;SAClB;KACF,CAAC;;;;0DAGD;+BApEU,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEmC,mCAAe;GADlD,oBAAoB,CAqEhC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MailService } from '../../mail/mail.service';
|
|
2
|
+
import { McpContext } from '../types/mcp-context.type';
|
|
3
|
+
export declare class CoreMailMcpTools {
|
|
4
|
+
private readonly mailService;
|
|
5
|
+
constructor(mailService: MailService);
|
|
6
|
+
listMails(args: {
|
|
7
|
+
page?: number;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
search?: string;
|
|
10
|
+
sortField?: string;
|
|
11
|
+
sortOrder?: string;
|
|
12
|
+
}, context: McpContext): Promise<any>;
|
|
13
|
+
getMail(args: {
|
|
14
|
+
id: number;
|
|
15
|
+
}, context: McpContext): Promise<any>;
|
|
16
|
+
createMail(args: {
|
|
17
|
+
slug: string;
|
|
18
|
+
subject?: string;
|
|
19
|
+
body?: string;
|
|
20
|
+
}, _context: McpContext): Promise<any>;
|
|
21
|
+
updateMail(args: {
|
|
22
|
+
id: number;
|
|
23
|
+
slug?: string;
|
|
24
|
+
subject?: string;
|
|
25
|
+
body?: string;
|
|
26
|
+
}, _context: McpContext): Promise<any>;
|
|
27
|
+
deleteMails(args: {
|
|
28
|
+
ids: number[];
|
|
29
|
+
}, _context: McpContext): Promise<any>;
|
|
30
|
+
testMail(args: {
|
|
31
|
+
to: string;
|
|
32
|
+
templateId: number;
|
|
33
|
+
}, context: McpContext): Promise<any>;
|
|
34
|
+
reloadMailConfig(_args: Record<string, any>, _context: McpContext): Promise<any>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=core-mail.mcp-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-mail.mcp-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/core-mail.mcp-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,qBACa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAiB/C,SAAS,CACb,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,EACnG,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,GAAG,CAAC;IAuBT,OAAO,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAiBhE,UAAU,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAkBvG,UAAU,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAgBpH,WAAW,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAgBxE,QAAQ,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IASrF,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;CAGvF"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.CoreMailMcpTools = void 0;
|
|
24
|
+
const common_1 = require("@nestjs/common");
|
|
25
|
+
const mail_service_1 = require("../../mail/mail.service");
|
|
26
|
+
const mcp_tool_decorator_1 = require("../decorators/mcp-tool.decorator");
|
|
27
|
+
let CoreMailMcpTools = class CoreMailMcpTools {
|
|
28
|
+
constructor(mailService) {
|
|
29
|
+
this.mailService = mailService;
|
|
30
|
+
}
|
|
31
|
+
async listMails(args, context) {
|
|
32
|
+
var _a, _b, _c, _d, _e;
|
|
33
|
+
return this.mailService.list(context.locale, {
|
|
34
|
+
page: (_a = args.page) !== null && _a !== void 0 ? _a : 1,
|
|
35
|
+
pageSize: (_b = args.pageSize) !== null && _b !== void 0 ? _b : 20,
|
|
36
|
+
search: (_c = args.search) !== null && _c !== void 0 ? _c : '',
|
|
37
|
+
sortField: (_d = args.sortField) !== null && _d !== void 0 ? _d : 'id',
|
|
38
|
+
sortOrder: (_e = args.sortOrder) !== null && _e !== void 0 ? _e : 'asc',
|
|
39
|
+
fields: '',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async getMail(args, context) {
|
|
43
|
+
return this.mailService.get(context.locale, args.id);
|
|
44
|
+
}
|
|
45
|
+
async createMail(args, _context) {
|
|
46
|
+
return this.mailService.create(args);
|
|
47
|
+
}
|
|
48
|
+
async updateMail(args, _context) {
|
|
49
|
+
const { id } = args, data = __rest(args, ["id"]);
|
|
50
|
+
return this.mailService.update({ id, data: data });
|
|
51
|
+
}
|
|
52
|
+
async deleteMails(args, _context) {
|
|
53
|
+
return this.mailService.delete({ ids: args.ids });
|
|
54
|
+
}
|
|
55
|
+
async testMail(args, context) {
|
|
56
|
+
return this.mailService.sendTestMail(context.locale, args);
|
|
57
|
+
}
|
|
58
|
+
async reloadMailConfig(_args, _context) {
|
|
59
|
+
return this.mailService.reloadConfig();
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.CoreMailMcpTools = CoreMailMcpTools;
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
65
|
+
name: 'core.mail.list',
|
|
66
|
+
description: 'Lists mail templates with optional pagination. Admin only.',
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
page: { type: 'number', description: 'Page number (default: 1)' },
|
|
71
|
+
pageSize: { type: 'number', description: 'Items per page (default: 20)' },
|
|
72
|
+
search: { type: 'string', description: 'Search term' },
|
|
73
|
+
sortField: { type: 'string', description: 'Field to sort by' },
|
|
74
|
+
sortOrder: { type: 'string', enum: ['asc', 'desc'], description: 'Sort direction' },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
readOnly: true,
|
|
78
|
+
}),
|
|
79
|
+
__metadata("design:type", Function),
|
|
80
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
81
|
+
__metadata("design:returntype", Promise)
|
|
82
|
+
], CoreMailMcpTools.prototype, "listMails", null);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
85
|
+
name: 'core.mail.get',
|
|
86
|
+
description: 'Returns a single mail template by ID. Admin only.',
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: {
|
|
90
|
+
id: { type: 'number', description: 'Mail template ID' },
|
|
91
|
+
},
|
|
92
|
+
required: ['id'],
|
|
93
|
+
},
|
|
94
|
+
readOnly: true,
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
98
|
+
__metadata("design:returntype", Promise)
|
|
99
|
+
], CoreMailMcpTools.prototype, "getMail", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
102
|
+
name: 'core.mail.create',
|
|
103
|
+
description: 'Creates a new mail template. Admin only.',
|
|
104
|
+
inputSchema: {
|
|
105
|
+
type: 'object',
|
|
106
|
+
properties: {
|
|
107
|
+
slug: { type: 'string', description: 'Template slug (unique identifier)' },
|
|
108
|
+
subject: { type: 'string', description: 'Email subject' },
|
|
109
|
+
body: { type: 'string', description: 'Email body (HTML)' },
|
|
110
|
+
},
|
|
111
|
+
required: ['slug'],
|
|
112
|
+
},
|
|
113
|
+
}),
|
|
114
|
+
__metadata("design:type", Function),
|
|
115
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
116
|
+
__metadata("design:returntype", Promise)
|
|
117
|
+
], CoreMailMcpTools.prototype, "createMail", null);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
120
|
+
name: 'core.mail.update',
|
|
121
|
+
description: 'Updates an existing mail template by ID. Admin only.',
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
properties: {
|
|
125
|
+
id: { type: 'number', description: 'Mail template ID' },
|
|
126
|
+
slug: { type: 'string', description: 'New slug' },
|
|
127
|
+
subject: { type: 'string', description: 'New subject' },
|
|
128
|
+
body: { type: 'string', description: 'New body (HTML)' },
|
|
129
|
+
},
|
|
130
|
+
required: ['id'],
|
|
131
|
+
},
|
|
132
|
+
}),
|
|
133
|
+
__metadata("design:type", Function),
|
|
134
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
135
|
+
__metadata("design:returntype", Promise)
|
|
136
|
+
], CoreMailMcpTools.prototype, "updateMail", null);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
139
|
+
name: 'core.mail.delete',
|
|
140
|
+
description: 'Deletes one or more mail templates by their IDs. Admin only.',
|
|
141
|
+
inputSchema: {
|
|
142
|
+
type: 'object',
|
|
143
|
+
properties: {
|
|
144
|
+
ids: { type: 'array', items: { type: 'number' }, description: 'Template IDs to delete' },
|
|
145
|
+
},
|
|
146
|
+
required: ['ids'],
|
|
147
|
+
},
|
|
148
|
+
}),
|
|
149
|
+
__metadata("design:type", Function),
|
|
150
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
151
|
+
__metadata("design:returntype", Promise)
|
|
152
|
+
], CoreMailMcpTools.prototype, "deleteMails", null);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
155
|
+
name: 'core.mail.test',
|
|
156
|
+
description: 'Sends a test email using a specific template. Admin only.',
|
|
157
|
+
inputSchema: {
|
|
158
|
+
type: 'object',
|
|
159
|
+
properties: {
|
|
160
|
+
to: { type: 'string', description: 'Recipient email address' },
|
|
161
|
+
templateId: { type: 'number', description: 'Mail template ID' },
|
|
162
|
+
},
|
|
163
|
+
required: ['to', 'templateId'],
|
|
164
|
+
},
|
|
165
|
+
}),
|
|
166
|
+
__metadata("design:type", Function),
|
|
167
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
168
|
+
__metadata("design:returntype", Promise)
|
|
169
|
+
], CoreMailMcpTools.prototype, "testMail", null);
|
|
170
|
+
__decorate([
|
|
171
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
172
|
+
name: 'core.mail.reload',
|
|
173
|
+
description: 'Reloads the mail configuration from settings. Admin only.',
|
|
174
|
+
inputSchema: { type: 'object', properties: {} },
|
|
175
|
+
}),
|
|
176
|
+
__metadata("design:type", Function),
|
|
177
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
178
|
+
__metadata("design:returntype", Promise)
|
|
179
|
+
], CoreMailMcpTools.prototype, "reloadMailConfig", null);
|
|
180
|
+
exports.CoreMailMcpTools = CoreMailMcpTools = __decorate([
|
|
181
|
+
(0, common_1.Injectable)(),
|
|
182
|
+
__metadata("design:paramtypes", [mail_service_1.MailService])
|
|
183
|
+
], CoreMailMcpTools);
|
|
184
|
+
//# sourceMappingURL=core-mail.mcp-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-mail.mcp-tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/core-mail.mcp-tools.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,0DAAsD;AACtD,yEAA2D;AAIpD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAA6B,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IAAG,CAAC;IAiBnD,AAAN,KAAK,CAAC,SAAS,CACb,IAAmG,EACnG,OAAmB;;QAEnB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAC3C,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,CAAC;YACpB,QAAQ,EAAE,MAAA,IAAI,CAAC,QAAQ,mCAAI,EAAE;YAC7B,MAAM,EAAE,MAAA,IAAI,CAAC,MAAM,mCAAI,EAAE;YACzB,SAAS,EAAE,MAAA,IAAI,CAAC,SAAS,mCAAI,IAAI;YAC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YACD,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC;SAC/B;KACF,CAAC;;;;gDAGD;AAOK;IALL,IAAA,4BAAO,EAAC;QACP,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,2DAA2D;QACxE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;KAChD,CAAC;;;;wDAGD;2BA1HU,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAE+B,0BAAW;GAD1C,gBAAgB,CA2H5B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { McpChatService } from '../../mcp-chat/mcp-chat.service';
|
|
2
|
+
import { McpContext } from '../types/mcp-context.type';
|
|
3
|
+
export declare class CoreMcpChatMcpTools {
|
|
4
|
+
private readonly mcpChatService;
|
|
5
|
+
constructor(mcpChatService: McpChatService);
|
|
6
|
+
listConversations(_args: Record<string, any>, context: McpContext): Promise<any>;
|
|
7
|
+
createConversation(args: {
|
|
8
|
+
title: string;
|
|
9
|
+
}, context: McpContext): Promise<any>;
|
|
10
|
+
deleteConversations(args: {
|
|
11
|
+
ids: number[];
|
|
12
|
+
}, context: McpContext): Promise<any>;
|
|
13
|
+
getMessages(args: {
|
|
14
|
+
conversationId: number;
|
|
15
|
+
}, context: McpContext): Promise<any>;
|
|
16
|
+
sendMessage(args: {
|
|
17
|
+
conversationId: number;
|
|
18
|
+
message: string;
|
|
19
|
+
}, context: McpContext): Promise<any>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=core-mcp-chat.mcp-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-mcp-chat.mcp-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/core-mcp-chat.mcp-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,qBACa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAQrD,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAehF,kBAAkB,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAe9E,mBAAmB,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAgB/E,WAAW,CAAC,IAAI,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAgBhF,WAAW,CAAC,IAAI,EAAE;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;CAGxG"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CoreMcpChatMcpTools = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const mcp_chat_service_1 = require("../../mcp-chat/mcp-chat.service");
|
|
15
|
+
const mcp_tool_decorator_1 = require("../decorators/mcp-tool.decorator");
|
|
16
|
+
let CoreMcpChatMcpTools = class CoreMcpChatMcpTools {
|
|
17
|
+
constructor(mcpChatService) {
|
|
18
|
+
this.mcpChatService = mcpChatService;
|
|
19
|
+
}
|
|
20
|
+
async listConversations(_args, context) {
|
|
21
|
+
return this.mcpChatService.listConversations(context.userId);
|
|
22
|
+
}
|
|
23
|
+
async createConversation(args, context) {
|
|
24
|
+
return this.mcpChatService.createConversation(context.userId, { title: args.title });
|
|
25
|
+
}
|
|
26
|
+
async deleteConversations(args, context) {
|
|
27
|
+
return this.mcpChatService.deleteConversations(context.userId, args.ids);
|
|
28
|
+
}
|
|
29
|
+
async getMessages(args, context) {
|
|
30
|
+
return this.mcpChatService.getMessages(args.conversationId, context.userId);
|
|
31
|
+
}
|
|
32
|
+
async sendMessage(args, context) {
|
|
33
|
+
return this.mcpChatService.sendMessage(args.conversationId, context.userId, context.locale, args.message);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.CoreMcpChatMcpTools = CoreMcpChatMcpTools;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
39
|
+
name: 'core.mcp-chat.conversations.list',
|
|
40
|
+
description: 'Lists MCP chat conversations for the authenticated user.',
|
|
41
|
+
inputSchema: { type: 'object', properties: {} },
|
|
42
|
+
readOnly: true,
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Function),
|
|
45
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
46
|
+
__metadata("design:returntype", Promise)
|
|
47
|
+
], CoreMcpChatMcpTools.prototype, "listConversations", null);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
50
|
+
name: 'core.mcp-chat.conversations.create',
|
|
51
|
+
description: 'Creates a new MCP chat conversation.',
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: 'object',
|
|
54
|
+
properties: {
|
|
55
|
+
title: { type: 'string', description: 'Conversation title' },
|
|
56
|
+
},
|
|
57
|
+
required: ['title'],
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", Function),
|
|
61
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
62
|
+
__metadata("design:returntype", Promise)
|
|
63
|
+
], CoreMcpChatMcpTools.prototype, "createConversation", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
66
|
+
name: 'core.mcp-chat.conversations.delete',
|
|
67
|
+
description: 'Deletes one or more MCP chat conversations.',
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
ids: { type: 'array', items: { type: 'number' }, description: 'Conversation IDs to delete' },
|
|
72
|
+
},
|
|
73
|
+
required: ['ids'],
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", Function),
|
|
77
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
78
|
+
__metadata("design:returntype", Promise)
|
|
79
|
+
], CoreMcpChatMcpTools.prototype, "deleteConversations", null);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
82
|
+
name: 'core.mcp-chat.messages.list',
|
|
83
|
+
description: 'Returns messages in a conversation.',
|
|
84
|
+
inputSchema: {
|
|
85
|
+
type: 'object',
|
|
86
|
+
properties: {
|
|
87
|
+
conversationId: { type: 'number', description: 'Conversation ID' },
|
|
88
|
+
},
|
|
89
|
+
required: ['conversationId'],
|
|
90
|
+
},
|
|
91
|
+
readOnly: true,
|
|
92
|
+
}),
|
|
93
|
+
__metadata("design:type", Function),
|
|
94
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
95
|
+
__metadata("design:returntype", Promise)
|
|
96
|
+
], CoreMcpChatMcpTools.prototype, "getMessages", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, mcp_tool_decorator_1.McpTool)({
|
|
99
|
+
name: 'core.mcp-chat.messages.send',
|
|
100
|
+
description: 'Sends a message in a conversation and returns the AI response.',
|
|
101
|
+
inputSchema: {
|
|
102
|
+
type: 'object',
|
|
103
|
+
properties: {
|
|
104
|
+
conversationId: { type: 'number', description: 'Conversation ID' },
|
|
105
|
+
message: { type: 'string', description: 'Message to send' },
|
|
106
|
+
},
|
|
107
|
+
required: ['conversationId', 'message'],
|
|
108
|
+
},
|
|
109
|
+
}),
|
|
110
|
+
__metadata("design:type", Function),
|
|
111
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
112
|
+
__metadata("design:returntype", Promise)
|
|
113
|
+
], CoreMcpChatMcpTools.prototype, "sendMessage", null);
|
|
114
|
+
exports.CoreMcpChatMcpTools = CoreMcpChatMcpTools = __decorate([
|
|
115
|
+
(0, common_1.Injectable)(),
|
|
116
|
+
__metadata("design:paramtypes", [mcp_chat_service_1.McpChatService])
|
|
117
|
+
], CoreMcpChatMcpTools);
|
|
118
|
+
//# sourceMappingURL=core-mcp-chat.mcp-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-mcp-chat.mcp-tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/core-mcp-chat.mcp-tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sEAAiE;AACjE,yEAA2D;AAIpD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAA6B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAQzD,AAAN,KAAK,CAAC,iBAAiB,CAAC,KAA0B,EAAE,OAAmB;QACr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C,iCAAc;GADhD,mBAAmB,CA0E/B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { MenuService } from '../../menu/menu.service';
|
|
2
|
+
import { McpContext } from '../types/mcp-context.type';
|
|
3
|
+
export declare class CoreMenusMcpTools {
|
|
4
|
+
private readonly menuService;
|
|
5
|
+
constructor(menuService: MenuService);
|
|
6
|
+
getSystemMenu(_args: Record<string, any>, context: McpContext): Promise<any>;
|
|
7
|
+
getMenuStats(_args: Record<string, any>, _context: McpContext): Promise<any>;
|
|
8
|
+
listAllMenus(_args: Record<string, any>, context: McpContext): Promise<any>;
|
|
9
|
+
listMenus(args: {
|
|
10
|
+
page?: number;
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
search?: string;
|
|
13
|
+
sortField?: string;
|
|
14
|
+
sortOrder?: string;
|
|
15
|
+
}, context: McpContext): Promise<any>;
|
|
16
|
+
getMenu(args: {
|
|
17
|
+
menuId: number;
|
|
18
|
+
}, context: McpContext): Promise<any>;
|
|
19
|
+
createMenu(args: Record<string, any>, context: McpContext): Promise<any>;
|
|
20
|
+
updateMenu(args: {
|
|
21
|
+
menuId: number;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}, context: McpContext): Promise<any>;
|
|
24
|
+
deleteMenus(args: {
|
|
25
|
+
ids: number[];
|
|
26
|
+
}, context: McpContext): Promise<any>;
|
|
27
|
+
updateMenuOrder(args: {
|
|
28
|
+
ids: number[];
|
|
29
|
+
}, context: McpContext): Promise<any>;
|
|
30
|
+
listMenuRoles(args: {
|
|
31
|
+
menuId: number;
|
|
32
|
+
page?: number;
|
|
33
|
+
pageSize?: number;
|
|
34
|
+
}, context: McpContext): Promise<any>;
|
|
35
|
+
updateMenuRoles(args: {
|
|
36
|
+
menuId: number;
|
|
37
|
+
ids: number[];
|
|
38
|
+
}, context: McpContext): Promise<any>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=core-menus.mcp-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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