@servicelabsco/slabs-access-manager 1.0.52 → 1.0.54
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/controllers/device.auth.controller.d.ts +44 -0
- package/dist/access/controllers/device.auth.controller.js +69 -0
- package/dist/access/controllers/device.auth.controller.js.map +1 -0
- package/dist/access/controllers/index.d.ts +3 -0
- package/dist/access/controllers/index.js +3 -0
- package/dist/access/controllers/index.js.map +1 -1
- package/dist/access/controllers/lock.script.controller.d.ts +5 -1
- package/dist/access/controllers/lock.script.controller.js +24 -2
- package/dist/access/controllers/lock.script.controller.js.map +1 -1
- package/dist/access/controllers/oauth.as.controller.d.ts +52 -0
- package/dist/access/controllers/oauth.as.controller.js +117 -0
- package/dist/access/controllers/oauth.as.controller.js.map +1 -0
- package/dist/access/controllers/oauth.discovery.controller.d.ts +16 -0
- package/dist/access/controllers/oauth.discovery.controller.js +35 -0
- package/dist/access/controllers/oauth.discovery.controller.js.map +1 -0
- package/dist/access/dtos/add.lock.script.dto.d.ts +0 -1
- package/dist/access/dtos/add.lock.script.dto.js +0 -5
- package/dist/access/dtos/add.lock.script.dto.js.map +1 -1
- package/dist/access/dtos/device.decide.dto.d.ts +5 -0
- package/dist/access/dtos/device.decide.dto.js +36 -0
- package/dist/access/dtos/device.decide.dto.js.map +1 -0
- package/dist/access/dtos/device.poll.dto.d.ts +3 -0
- package/dist/access/dtos/device.poll.dto.js +24 -0
- package/dist/access/dtos/device.poll.dto.js.map +1 -0
- package/dist/access/dtos/index.d.ts +4 -0
- package/dist/access/dtos/index.js +4 -0
- package/dist/access/dtos/index.js.map +1 -1
- package/dist/access/dtos/oauth.consent.decide.dto.d.ts +5 -0
- package/dist/access/dtos/oauth.consent.decide.dto.js +38 -0
- package/dist/access/dtos/oauth.consent.decide.dto.js.map +1 -0
- package/dist/access/dtos/oauth.register.dto.d.ts +7 -0
- package/dist/access/dtos/oauth.register.dto.js +51 -0
- package/dist/access/dtos/oauth.register.dto.js.map +1 -0
- package/dist/access/entities/device.code.entity.d.ts +17 -0
- package/dist/access/entities/device.code.entity.js +74 -0
- package/dist/access/entities/device.code.entity.js.map +1 -0
- package/dist/access/entities/index.d.ts +3 -0
- package/dist/access/entities/index.js +3 -0
- package/dist/access/entities/index.js.map +1 -1
- package/dist/access/entities/menu.action.entity.d.ts +1 -0
- package/dist/access/entities/menu.action.entity.js +4 -0
- package/dist/access/entities/menu.action.entity.js.map +1 -1
- package/dist/access/entities/oauth.authorization.entity.d.ts +23 -0
- package/dist/access/entities/oauth.authorization.entity.js +98 -0
- package/dist/access/entities/oauth.authorization.entity.js.map +1 -0
- package/dist/access/entities/oauth.client.entity.d.ts +10 -0
- package/dist/access/entities/oauth.client.entity.js +49 -0
- package/dist/access/entities/oauth.client.entity.js.map +1 -0
- package/dist/access/es6.classes.d.ts +24 -6
- package/dist/access/es6.classes.js +36 -1
- package/dist/access/es6.classes.js.map +1 -1
- package/dist/access/libraries/evaluate.email.rule.js.map +1 -1
- package/dist/access/libraries/extract.client.credentials.d.ts +12 -0
- package/dist/access/libraries/extract.client.credentials.js +41 -0
- package/dist/access/libraries/extract.client.credentials.js.map +1 -0
- package/dist/access/libraries/index.d.ts +2 -0
- package/dist/access/libraries/index.js +2 -0
- package/dist/access/libraries/index.js.map +1 -1
- package/dist/access/libraries/oauth.pkce.d.ts +6 -0
- package/dist/access/libraries/oauth.pkce.js +25 -0
- package/dist/access/libraries/oauth.pkce.js.map +1 -0
- package/dist/access/libraries/process.email.notification.js +3 -3
- package/dist/access/libraries/process.email.notification.js.map +1 -1
- package/dist/access/libraries/process.internal.notification.js +3 -3
- package/dist/access/libraries/process.internal.notification.js.map +1 -1
- package/dist/access/libraries/process.lock.script.data.js +2 -9
- package/dist/access/libraries/process.lock.script.data.js.map +1 -1
- package/dist/access/libraries/sanitize.email.addresses.d.ts +3 -1
- package/dist/access/libraries/sanitize.email.addresses.js +28 -25
- package/dist/access/libraries/sanitize.email.addresses.js.map +1 -1
- package/dist/access/libraries/send.email.notification.js +1 -1
- package/dist/access/libraries/send.email.notification.js.map +1 -1
- package/dist/access/middlewares/external.access.middleware.d.ts +3 -5
- package/dist/access/middlewares/external.access.middleware.js +9 -17
- package/dist/access/middlewares/external.access.middleware.js.map +1 -1
- package/dist/access/middlewares/index.d.ts +1 -0
- package/dist/access/middlewares/index.js +1 -0
- package/dist/access/middlewares/index.js.map +1 -1
- package/dist/access/middlewares/mcp.access.middleware.d.ts +7 -0
- package/dist/access/middlewares/mcp.access.middleware.js +34 -0
- package/dist/access/middlewares/mcp.access.middleware.js.map +1 -0
- package/dist/access/services/credential.resolve.service.d.ts +22 -0
- package/dist/access/services/credential.resolve.service.js +106 -0
- package/dist/access/services/credential.resolve.service.js.map +1 -0
- package/dist/access/services/device.auth.service.d.ts +50 -0
- package/dist/access/services/device.auth.service.js +177 -0
- package/dist/access/services/device.auth.service.js.map +1 -0
- package/dist/access/services/index.d.ts +4 -0
- package/dist/access/services/index.js +4 -0
- package/dist/access/services/index.js.map +1 -1
- package/dist/access/services/lock.script.service.d.ts +6 -0
- package/dist/access/services/lock.script.service.js +41 -0
- package/dist/access/services/lock.script.service.js.map +1 -0
- package/dist/access/services/oauth.as.service.d.ts +96 -0
- package/dist/access/services/oauth.as.service.js +299 -0
- package/dist/access/services/oauth.as.service.js.map +1 -0
- package/dist/app.module.js +2 -1
- package/dist/app.module.js.map +1 -1
- package/dist/config/entity.constants.d.ts +6 -0
- package/dist/config/entity.constants.js +6 -0
- package/dist/config/entity.constants.js.map +1 -1
- package/dist/development/registries/development.entity.registry.js +2 -0
- package/dist/development/registries/development.entity.registry.js.map +1 -1
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/dist/mcp/admin/tools/admin.tool.registry.js +10 -0
- package/dist/mcp/admin/tools/admin.tool.registry.js.map +1 -1
- package/dist/mcp/admin/tools/index.d.ts +1 -0
- package/dist/mcp/admin/tools/index.js +1 -0
- package/dist/mcp/admin/tools/index.js.map +1 -1
- package/dist/mcp/admin/tools/menu_ui_action/index.d.ts +5 -0
- package/dist/mcp/admin/tools/menu_ui_action/index.js +22 -0
- package/dist/mcp/admin/tools/menu_ui_action/index.js.map +1 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.create.tool.d.ts +22 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.create.tool.js +25 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.create.tool.js.map +1 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.delete.tool.d.ts +17 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.delete.tool.js +23 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.delete.tool.js.map +1 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.get.tool.d.ts +17 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.get.tool.js +23 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.get.tool.js.map +1 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.list.tool.d.ts +23 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.list.tool.js +37 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.list.tool.js.map +1 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.update.tool.d.ts +20 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.update.tool.js +25 -0
- package/dist/mcp/admin/tools/menu_ui_action/menu.ui.action.update.tool.js.map +1 -0
- package/dist/mcp/auth/execution.context.interface.d.ts +9 -0
- package/dist/mcp/auth/execution.context.interface.js +3 -0
- package/dist/mcp/auth/execution.context.interface.js.map +1 -0
- package/dist/mcp/auth/index.d.ts +1 -0
- package/dist/mcp/auth/index.js +18 -0
- package/dist/mcp/auth/index.js.map +1 -0
- package/dist/mcp/es6.classes.d.ts +7 -1
- package/dist/mcp/es6.classes.js +14 -1
- package/dist/mcp/es6.classes.js.map +1 -1
- package/dist/mcp/http/admin.mcp.controller.js +1 -1
- package/dist/mcp/http/admin.mcp.controller.js.map +1 -1
- package/dist/mcp/http/business.mcp.controller.js +5 -5
- package/dist/mcp/http/business.mcp.controller.js.map +1 -1
- package/dist/mcp/http/index.d.ts +1 -0
- package/dist/mcp/http/index.js +1 -0
- package/dist/mcp/http/index.js.map +1 -1
- package/dist/mcp/http/mcp.http.module.js +2 -1
- package/dist/mcp/http/mcp.http.module.js.map +1 -1
- package/dist/mcp/http/mcp.request.handler.js +1 -1
- package/dist/mcp/http/mcp.request.handler.js.map +1 -1
- package/dist/mcp/http/prm.controller.d.ts +10 -0
- package/dist/mcp/http/prm.controller.js +45 -0
- package/dist/mcp/http/prm.controller.js.map +1 -0
- package/dist/mcp/http/unauthorized.mcp.response.d.ts +6 -3
- package/dist/mcp/http/unauthorized.mcp.response.js +27 -17
- package/dist/mcp/http/unauthorized.mcp.response.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/migrations/1785056165556-AddDisplayOrderUtlMenuActionsTable.d.ts +5 -0
- package/dist/migrations/1785056165556-AddDisplayOrderUtlMenuActionsTable.js +15 -0
- package/dist/migrations/1785056165556-AddDisplayOrderUtlMenuActionsTable.js.map +1 -0
- package/dist/migrations/1785057482427-CreateDeviceCodesTable.d.ts +5 -0
- package/dist/migrations/1785057482427-CreateDeviceCodesTable.js +25 -0
- package/dist/migrations/1785057482427-CreateDeviceCodesTable.js.map +1 -0
- package/dist/migrations/1785058700995-CreateOauthClientsTable.d.ts +5 -0
- package/dist/migrations/1785058700995-CreateOauthClientsTable.js +23 -0
- package/dist/migrations/1785058700995-CreateOauthClientsTable.js.map +1 -0
- package/dist/migrations/1785058701000-CreateOauthAuthorizationsTable.d.ts +5 -0
- package/dist/migrations/1785058701000-CreateOauthAuthorizationsTable.js +31 -0
- package/dist/migrations/1785058701000-CreateOauthAuthorizationsTable.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
+
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
+
type MenuUiActionCreateInput = {
|
|
5
|
+
menu_id: number;
|
|
6
|
+
ui_action_id: number;
|
|
7
|
+
display_order?: number;
|
|
8
|
+
attributes?: Record<string, unknown>;
|
|
9
|
+
};
|
|
10
|
+
export declare class MenuUiActionCreateTool extends McpTool<MenuUiActionCreateInput> {
|
|
11
|
+
readonly name = "menu_ui_action_create";
|
|
12
|
+
readonly title = "Create menu UI action (admin)";
|
|
13
|
+
readonly description = "Create a menu-UI-action link record directly in the database (admin/development only). Returns the created row.";
|
|
14
|
+
readonly inputSchema: {
|
|
15
|
+
menu_id: z.ZodNumber;
|
|
16
|
+
ui_action_id: z.ZodNumber;
|
|
17
|
+
display_order: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
19
|
+
};
|
|
20
|
+
execute(args: MenuUiActionCreateInput): Promise<McpToolResultInterface>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuUiActionCreateTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
+
const inputSchema = {
|
|
7
|
+
menu_id: zod_1.z.number().int().positive().describe('Menu this UI action is linked to (FK utl_menu_actions.menu_id).'),
|
|
8
|
+
ui_action_id: zod_1.z.number().int().positive().describe('UI action linked to the menu (FK ui_action_id).'),
|
|
9
|
+
display_order: zod_1.z.number().int().optional().describe('Sort order of the UI action within the menu.'),
|
|
10
|
+
attributes: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Arbitrary JSON attributes (json column).'),
|
|
11
|
+
};
|
|
12
|
+
class MenuUiActionCreateTool extends mcp_tool_1.McpTool {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.name = 'menu_ui_action_create';
|
|
16
|
+
this.title = 'Create menu UI action (admin)';
|
|
17
|
+
this.description = 'Create a menu-UI-action link record directly in the database (admin/development only). Returns the created row.';
|
|
18
|
+
this.inputSchema = inputSchema;
|
|
19
|
+
}
|
|
20
|
+
execute(args) {
|
|
21
|
+
return this.run(() => this.client.request({ method: 'POST', path: 'development/menu_ui_action', body: args }));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.MenuUiActionCreateTool = MenuUiActionCreateTool;
|
|
25
|
+
//# sourceMappingURL=menu.ui.action.create.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.ui.action.create.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/menu_ui_action/menu.ui.action.create.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iEAAiE,CAAC;IAChH,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IACrG,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACnG,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAChH,CAAC;AAaF,MAAa,sBAAuB,SAAQ,kBAAgC;IAA5E;;QACa,SAAI,GAAG,uBAAuB,CAAC;QAC/B,UAAK,GAAG,+BAA+B,CAAC;QACxC,gBAAW,GAAG,iHAAiH,CAAC;QAChI,gBAAW,GAAG,WAAW,CAAC;IAKvC,CAAC;IAHG,OAAO,CAAC,IAA6B;QACjC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACnH,CAAC;CACJ;AATD,wDASC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
+
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
+
type MenuUiActionDeleteInput = {
|
|
5
|
+
id: number;
|
|
6
|
+
};
|
|
7
|
+
export declare class MenuUiActionDeleteTool extends McpTool<MenuUiActionDeleteInput> {
|
|
8
|
+
readonly name = "menu_ui_action_delete";
|
|
9
|
+
readonly title = "Delete menu UI action (admin)";
|
|
10
|
+
readonly description = "Soft-delete a menu-UI-action link record by id (sets deleted_at; not a hard delete). Admin/development only.";
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
id: z.ZodNumber;
|
|
13
|
+
};
|
|
14
|
+
protected readonly destructive = true;
|
|
15
|
+
execute(args: MenuUiActionDeleteInput): Promise<McpToolResultInterface>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuUiActionDeleteTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
+
const inputSchema = {
|
|
7
|
+
id: zod_1.z.number().int().positive().describe('Id of the menu-UI-action link row to soft-delete.'),
|
|
8
|
+
};
|
|
9
|
+
class MenuUiActionDeleteTool extends mcp_tool_1.McpTool {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.name = 'menu_ui_action_delete';
|
|
13
|
+
this.title = 'Delete menu UI action (admin)';
|
|
14
|
+
this.description = 'Soft-delete a menu-UI-action link record by id (sets deleted_at; not a hard delete). Admin/development only.';
|
|
15
|
+
this.inputSchema = inputSchema;
|
|
16
|
+
this.destructive = true;
|
|
17
|
+
}
|
|
18
|
+
execute(args) {
|
|
19
|
+
return this.run(() => this.client.request({ method: 'DELETE', path: `development/menu_ui_action/${args.id}` }));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.MenuUiActionDeleteTool = MenuUiActionDeleteTool;
|
|
23
|
+
//# sourceMappingURL=menu.ui.action.delete.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.ui.action.delete.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/menu_ui_action/menu.ui.action.delete.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;CAChG,CAAC;AAQF,MAAa,sBAAuB,SAAQ,kBAAgC;IAA5E;;QACa,SAAI,GAAG,uBAAuB,CAAC;QAC/B,UAAK,GAAG,+BAA+B,CAAC;QACxC,gBAAW,GAAG,8GAA8G,CAAC;QAC7H,gBAAW,GAAG,WAAW,CAAC;QAChB,gBAAW,GAAG,IAAI,CAAC;IAK1C,CAAC;IAHG,OAAO,CAAC,IAA6B;QACjC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,8BAA8B,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACpH,CAAC;CACJ;AAVD,wDAUC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
+
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
+
type MenuUiActionGetInput = {
|
|
5
|
+
id: number;
|
|
6
|
+
};
|
|
7
|
+
export declare class MenuUiActionGetTool extends McpTool<MenuUiActionGetInput> {
|
|
8
|
+
readonly name = "menu_ui_action_get";
|
|
9
|
+
readonly title = "Get menu UI action (admin)";
|
|
10
|
+
readonly description = "Fetch a single menu-UI-action link record by id directly from the database (admin/development only).";
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
id: z.ZodNumber;
|
|
13
|
+
};
|
|
14
|
+
protected readonly readOnly = true;
|
|
15
|
+
execute(args: MenuUiActionGetInput): Promise<McpToolResultInterface>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuUiActionGetTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
+
const inputSchema = {
|
|
7
|
+
id: zod_1.z.number().int().positive().describe('Id of the menu-UI-action link row to fetch.'),
|
|
8
|
+
};
|
|
9
|
+
class MenuUiActionGetTool extends mcp_tool_1.McpTool {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.name = 'menu_ui_action_get';
|
|
13
|
+
this.title = 'Get menu UI action (admin)';
|
|
14
|
+
this.description = 'Fetch a single menu-UI-action link record by id directly from the database (admin/development only).';
|
|
15
|
+
this.inputSchema = inputSchema;
|
|
16
|
+
this.readOnly = true;
|
|
17
|
+
}
|
|
18
|
+
execute(args) {
|
|
19
|
+
return this.run(() => this.client.request({ method: 'GET', path: `development/menu_ui_action/${args.id}` }));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.MenuUiActionGetTool = MenuUiActionGetTool;
|
|
23
|
+
//# sourceMappingURL=menu.ui.action.get.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.ui.action.get.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/menu_ui_action/menu.ui.action.get.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;CAC1F,CAAC;AAOF,MAAa,mBAAoB,SAAQ,kBAA6B;IAAtE;;QACa,SAAI,GAAG,oBAAoB,CAAC;QAC5B,UAAK,GAAG,4BAA4B,CAAC;QACrC,gBAAW,GAAG,sGAAsG,CAAC;QACrH,gBAAW,GAAG,WAAW,CAAC;QAChB,aAAQ,GAAG,IAAI,CAAC;IAKvC,CAAC;IAHG,OAAO,CAAC,IAA0B;QAC9B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,8BAA8B,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACjH,CAAC;CACJ;AAVD,kDAUC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
+
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
+
type MenuUiActionListInput = {
|
|
5
|
+
limit?: number;
|
|
6
|
+
offset?: number;
|
|
7
|
+
order?: string;
|
|
8
|
+
filter?: Record<string, unknown>;
|
|
9
|
+
};
|
|
10
|
+
export declare class MenuUiActionListTool extends McpTool<MenuUiActionListInput> {
|
|
11
|
+
readonly name = "menu_ui_action_list";
|
|
12
|
+
readonly title = "List menu UI actions (admin)";
|
|
13
|
+
readonly description = "List menu-UI-action link records directly from the database with paging, ordering, and column-equality filters (admin/development only).";
|
|
14
|
+
readonly inputSchema: {
|
|
15
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
order: z.ZodOptional<z.ZodString>;
|
|
18
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
19
|
+
};
|
|
20
|
+
protected readonly readOnly = true;
|
|
21
|
+
execute(args: MenuUiActionListInput): Promise<McpToolResultInterface>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuUiActionListTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
+
const inputSchema = {
|
|
7
|
+
limit: zod_1.z.number().int().min(0).optional().describe('Max rows to return (default 50).'),
|
|
8
|
+
offset: zod_1.z.number().int().min(0).optional().describe('Rows to skip (default 0).'),
|
|
9
|
+
order: zod_1.z.string().optional().describe('Order as "column" or "column:asc|desc", e.g. "id:desc".'),
|
|
10
|
+
filter: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Column equality filters, e.g. { "menu_id": 4 }. Non-column keys are ignored.'),
|
|
11
|
+
};
|
|
12
|
+
class MenuUiActionListTool extends mcp_tool_1.McpTool {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.name = 'menu_ui_action_list';
|
|
16
|
+
this.title = 'List menu UI actions (admin)';
|
|
17
|
+
this.description = 'List menu-UI-action link records directly from the database with paging, ordering, and column-equality filters (admin/development only).';
|
|
18
|
+
this.inputSchema = inputSchema;
|
|
19
|
+
this.readOnly = true;
|
|
20
|
+
}
|
|
21
|
+
execute(args) {
|
|
22
|
+
const params = new URLSearchParams();
|
|
23
|
+
if (args.limit !== undefined)
|
|
24
|
+
params.set('limit', String(args.limit));
|
|
25
|
+
if (args.offset !== undefined)
|
|
26
|
+
params.set('offset', String(args.offset));
|
|
27
|
+
if (args.order)
|
|
28
|
+
params.set('order', args.order);
|
|
29
|
+
if (args.filter)
|
|
30
|
+
params.set('filter', JSON.stringify(args.filter));
|
|
31
|
+
const query = params.toString();
|
|
32
|
+
const path = `development/menu_ui_action${query ? `?${query}` : ''}`;
|
|
33
|
+
return this.run(() => this.client.request({ method: 'GET', path }));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.MenuUiActionListTool = MenuUiActionListTool;
|
|
37
|
+
//# sourceMappingURL=menu.ui.action.list.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.ui.action.list.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/menu_ui_action/menu.ui.action.list.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IACtF,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAChF,KAAK,EAAE,OAAC,CAA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C,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC;CACJ;AApBD,oDAoBC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
+
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
+
type MenuUiActionUpdateInput = {
|
|
5
|
+
id: number;
|
|
6
|
+
display_order?: number;
|
|
7
|
+
attributes?: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
export declare class MenuUiActionUpdateTool extends McpTool<MenuUiActionUpdateInput> {
|
|
10
|
+
readonly name = "menu_ui_action_update";
|
|
11
|
+
readonly title = "Update menu UI action (admin)";
|
|
12
|
+
readonly description = "Update fields of a menu-UI-action link record directly in the database (admin/development only). Returns the updated row.";
|
|
13
|
+
readonly inputSchema: {
|
|
14
|
+
id: z.ZodNumber;
|
|
15
|
+
display_order: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
17
|
+
};
|
|
18
|
+
execute(args: MenuUiActionUpdateInput): Promise<McpToolResultInterface>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuUiActionUpdateTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
+
const inputSchema = {
|
|
7
|
+
id: zod_1.z.number().int().positive().describe('Id of the menu-UI-action link row to update.'),
|
|
8
|
+
display_order: zod_1.z.number().int().optional().describe('Sort order of the UI action within the menu.'),
|
|
9
|
+
attributes: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Arbitrary JSON attributes (json column).'),
|
|
10
|
+
};
|
|
11
|
+
class MenuUiActionUpdateTool extends mcp_tool_1.McpTool {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.name = 'menu_ui_action_update';
|
|
15
|
+
this.title = 'Update menu UI action (admin)';
|
|
16
|
+
this.description = 'Update fields of a menu-UI-action link record directly in the database (admin/development only). Returns the updated row.';
|
|
17
|
+
this.inputSchema = inputSchema;
|
|
18
|
+
}
|
|
19
|
+
execute(args) {
|
|
20
|
+
const { id, ...body } = args;
|
|
21
|
+
return this.run(() => this.client.request({ method: 'PUT', path: `development/menu_ui_action/${id}`, body }));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.MenuUiActionUpdateTool = MenuUiActionUpdateTool;
|
|
25
|
+
//# sourceMappingURL=menu.ui.action.update.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.ui.action.update.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/menu_ui_action/menu.ui.action.update.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACxF,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACnG,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAChH,CAAC;AAYF,MAAa,sBAAuB,SAAQ,kBAAgC;IAA5E;;QACa,SAAI,GAAG,uBAAuB,CAAC;QAC/B,UAAK,GAAG,+BAA+B,CAAC;QACxC,gBAAW,GAChB,2HAA2H,CAAC;QACvH,gBAAW,GAAG,WAAW,CAAC;IAOvC,CAAC;IALG,OAAO,CAAC,IAA6B;QACjC,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QAE7B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,8BAA8B,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAClH,CAAC;CACJ;AAZD,wDAYC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.context.interface.js","sourceRoot":"","sources":["../../../src/mcp/auth/execution.context.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './execution.context.interface';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./execution.context.interface"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA6C"}
|
|
@@ -29,6 +29,11 @@ import { MenuRoleDeleteTool } from './admin/tools/menu_role/menu.role.delete.too
|
|
|
29
29
|
import { MenuRoleGetTool } from './admin/tools/menu_role/menu.role.get.tool';
|
|
30
30
|
import { MenuRoleListTool } from './admin/tools/menu_role/menu.role.list.tool';
|
|
31
31
|
import { MenuRoleUpdateTool } from './admin/tools/menu_role/menu.role.update.tool';
|
|
32
|
+
import { MenuUiActionCreateTool } from './admin/tools/menu_ui_action/menu.ui.action.create.tool';
|
|
33
|
+
import { MenuUiActionDeleteTool } from './admin/tools/menu_ui_action/menu.ui.action.delete.tool';
|
|
34
|
+
import { MenuUiActionGetTool } from './admin/tools/menu_ui_action/menu.ui.action.get.tool';
|
|
35
|
+
import { MenuUiActionListTool } from './admin/tools/menu_ui_action/menu.ui.action.list.tool';
|
|
36
|
+
import { MenuUiActionUpdateTool } from './admin/tools/menu_ui_action/menu.ui.action.update.tool';
|
|
32
37
|
import { ModuleCreateTool } from './admin/tools/module/module.create.tool';
|
|
33
38
|
import { ModuleDeleteTool } from './admin/tools/module/module.delete.tool';
|
|
34
39
|
import { ModuleGetTool } from './admin/tools/module/module.get.tool';
|
|
@@ -62,7 +67,8 @@ import { McpTool } from './tools/mcp.tool';
|
|
|
62
67
|
import { SaveListingPreferenceTool } from './tools/save.listing.preference.tool';
|
|
63
68
|
import { ToolRegistry } from './tools/tool.registry';
|
|
64
69
|
declare const es6Classes: {
|
|
65
|
-
admin: (typeof ChildMenuCreateTool | typeof ChildMenuDeleteTool | typeof ChildMenuGetTool | typeof ChildMenuListTool | typeof ChildMenuUpdateTool | typeof ListingColumnCreateTool | typeof ListingColumnDeleteTool | typeof ListingColumnGetTool | typeof ListingColumnListTool | typeof ListingColumnUpdateTool | typeof ListingPageCreateTool | typeof ListingPageDeleteTool | typeof ListingPageGetTool | typeof ListingPageListTool | typeof ListingPageUpdateTool | typeof ListingPreferenceCreateTool | typeof ListingPreferenceDeleteTool | typeof ListingPreferenceGetTool | typeof ListingPreferenceListTool | typeof ListingPreferenceUpdateTool | typeof MenuCreateTool | typeof MenuDeleteTool | typeof MenuGetTool | typeof MenuListTool | typeof MenuUpdateTool | typeof MenuRoleCreateTool | typeof MenuRoleDeleteTool | typeof MenuRoleGetTool | typeof MenuRoleListTool | typeof MenuRoleUpdateTool | typeof ModuleCreateTool | typeof ModuleDeleteTool | typeof ModuleGetTool | typeof ModuleListTool | typeof ModuleUpdateTool | typeof ModuleMenuCreateTool | typeof ModuleMenuDeleteTool | typeof ModuleMenuGetTool | typeof ModuleMenuListTool | typeof ModuleMenuUpdateTool | typeof UiActionCreateTool | typeof UiActionDeleteTool | typeof UiActionGetTool | typeof UiActionListTool | typeof UiActionUpdateTool | typeof UiActionRoleCreateTool | typeof UiActionRoleDeleteTool | typeof UiActionRoleGetTool | typeof UiActionRoleListTool | typeof UiActionRoleUpdateTool | typeof AdminToolRegistry)[];
|
|
70
|
+
admin: (typeof ChildMenuCreateTool | typeof ChildMenuDeleteTool | typeof ChildMenuGetTool | typeof ChildMenuListTool | typeof ChildMenuUpdateTool | typeof ListingColumnCreateTool | typeof ListingColumnDeleteTool | typeof ListingColumnGetTool | typeof ListingColumnListTool | typeof ListingColumnUpdateTool | typeof ListingPageCreateTool | typeof ListingPageDeleteTool | typeof ListingPageGetTool | typeof ListingPageListTool | typeof ListingPageUpdateTool | typeof ListingPreferenceCreateTool | typeof ListingPreferenceDeleteTool | typeof ListingPreferenceGetTool | typeof ListingPreferenceListTool | typeof ListingPreferenceUpdateTool | typeof MenuCreateTool | typeof MenuDeleteTool | typeof MenuGetTool | typeof MenuListTool | typeof MenuUpdateTool | typeof MenuRoleCreateTool | typeof MenuRoleDeleteTool | typeof MenuRoleGetTool | typeof MenuRoleListTool | typeof MenuRoleUpdateTool | typeof MenuUiActionCreateTool | typeof MenuUiActionDeleteTool | typeof MenuUiActionGetTool | typeof MenuUiActionListTool | typeof MenuUiActionUpdateTool | typeof ModuleCreateTool | typeof ModuleDeleteTool | typeof ModuleGetTool | typeof ModuleListTool | typeof ModuleUpdateTool | typeof ModuleMenuCreateTool | typeof ModuleMenuDeleteTool | typeof ModuleMenuGetTool | typeof ModuleMenuListTool | typeof ModuleMenuUpdateTool | typeof UiActionCreateTool | typeof UiActionDeleteTool | typeof UiActionGetTool | typeof UiActionListTool | typeof UiActionUpdateTool | typeof UiActionRoleCreateTool | typeof UiActionRoleDeleteTool | typeof UiActionRoleGetTool | typeof UiActionRoleListTool | typeof UiActionRoleUpdateTool | typeof AdminToolRegistry)[];
|
|
71
|
+
auth: any[];
|
|
66
72
|
client: (typeof DevelopmentKeyAuth | typeof SlabsApiError | typeof SlabsApiClient | typeof ClientCredentialAuth)[];
|
|
67
73
|
http: (typeof AdminMcpController | typeof BusinessMcpController | typeof McpHttpModule)[];
|
|
68
74
|
interfaces: any[];
|
package/dist/mcp/es6.classes.js
CHANGED
|
@@ -31,6 +31,11 @@ const menu_role_delete_tool_1 = require("./admin/tools/menu_role/menu.role.delet
|
|
|
31
31
|
const menu_role_get_tool_1 = require("./admin/tools/menu_role/menu.role.get.tool");
|
|
32
32
|
const menu_role_list_tool_1 = require("./admin/tools/menu_role/menu.role.list.tool");
|
|
33
33
|
const menu_role_update_tool_1 = require("./admin/tools/menu_role/menu.role.update.tool");
|
|
34
|
+
const menu_ui_action_create_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.create.tool");
|
|
35
|
+
const menu_ui_action_delete_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.delete.tool");
|
|
36
|
+
const menu_ui_action_get_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.get.tool");
|
|
37
|
+
const menu_ui_action_list_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.list.tool");
|
|
38
|
+
const menu_ui_action_update_tool_1 = require("./admin/tools/menu_ui_action/menu.ui.action.update.tool");
|
|
34
39
|
const module_create_tool_1 = require("./admin/tools/module/module.create.tool");
|
|
35
40
|
const module_delete_tool_1 = require("./admin/tools/module/module.delete.tool");
|
|
36
41
|
const module_get_tool_1 = require("./admin/tools/module/module.get.tool");
|
|
@@ -59,6 +64,8 @@ const admin_mcp_controller_1 = require("./http/admin.mcp.controller");
|
|
|
59
64
|
const business_mcp_controller_1 = require("./http/business.mcp.controller");
|
|
60
65
|
const mcp_http_module_1 = require("./http/mcp.http.module");
|
|
61
66
|
const mcp_request_handler_1 = require("./http/mcp.request.handler");
|
|
67
|
+
const prm_controller_1 = require("./http/prm.controller");
|
|
68
|
+
const unauthorized_mcp_response_1 = require("./http/unauthorized.mcp.response");
|
|
62
69
|
const delete_listing_preference_tool_1 = require("./tools/delete.listing.preference.tool");
|
|
63
70
|
const get_listing_tool_1 = require("./tools/get.listing.tool");
|
|
64
71
|
const mcp_tool_1 = require("./tools/mcp.tool");
|
|
@@ -97,6 +104,11 @@ const es6Classes = {
|
|
|
97
104
|
menu_role_get_tool_1.MenuRoleGetTool,
|
|
98
105
|
menu_role_list_tool_1.MenuRoleListTool,
|
|
99
106
|
menu_role_update_tool_1.MenuRoleUpdateTool,
|
|
107
|
+
menu_ui_action_create_tool_1.MenuUiActionCreateTool,
|
|
108
|
+
menu_ui_action_delete_tool_1.MenuUiActionDeleteTool,
|
|
109
|
+
menu_ui_action_get_tool_1.MenuUiActionGetTool,
|
|
110
|
+
menu_ui_action_list_tool_1.MenuUiActionListTool,
|
|
111
|
+
menu_ui_action_update_tool_1.MenuUiActionUpdateTool,
|
|
100
112
|
module_create_tool_1.ModuleCreateTool,
|
|
101
113
|
module_delete_tool_1.ModuleDeleteTool,
|
|
102
114
|
module_get_tool_1.ModuleGetTool,
|
|
@@ -118,8 +130,9 @@ const es6Classes = {
|
|
|
118
130
|
ui_action_role_list_tool_1.UiActionRoleListTool,
|
|
119
131
|
ui_action_role_update_tool_1.UiActionRoleUpdateTool,
|
|
120
132
|
],
|
|
133
|
+
auth: [],
|
|
121
134
|
client: [client_credential_auth_1.ClientCredentialAuth, development_key_auth_1.DevelopmentKeyAuth, slabs_api_client_1.SlabsApiClient, slabs_api_error_1.SlabsApiError],
|
|
122
|
-
http: [admin_mcp_controller_1.AdminMcpController, business_mcp_controller_1.BusinessMcpController, mcp_http_module_1.McpHttpModule, mcp_request_handler_1.McpRequestHandler],
|
|
135
|
+
http: [admin_mcp_controller_1.AdminMcpController, business_mcp_controller_1.BusinessMcpController, mcp_http_module_1.McpHttpModule, mcp_request_handler_1.McpRequestHandler, prm_controller_1.PrmController, unauthorized_mcp_response_1.UnauthorizedMcpResponse],
|
|
123
136
|
interfaces: [],
|
|
124
137
|
tools: [delete_listing_preference_tool_1.DeleteListingPreferenceTool, get_listing_tool_1.GetListingTool, mcp_tool_1.McpTool, save_listing_preference_tool_1.SaveListingPreferenceTool, tool_registry_1.ToolRegistry],
|
|
125
138
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/mcp/es6.classes.ts"],"names":[],"mappings":";;AAAA,2EAAsE;AACtE,4FAAsF;AACtF,4FAAsF;AACtF,sFAAgF;AAChF,wFAAkF;AAClF,4FAAsF;AACtF,wGAAkG;AAClG,wGAAkG;AAClG,kGAA4F;AAC5F,oGAA8F;AAC9F,wGAAkG;AAClG,kGAA4F;AAC5F,kGAA4F;AAC5F,4FAAsF;AACtF,8FAAwF;AACxF,kGAA4F;AAC5F,oHAA8G;AAC9G,oHAA8G;AAC9G,8GAAwG;AACxG,gHAA0G;AAC1G,oHAA8G;AAC9G,0EAAqE;AACrE,0EAAqE;AACrE,oEAA+D;AAC/D,sEAAiE;AACjE,0EAAqE;AACrE,yFAAmF;AACnF,yFAAmF;AACnF,mFAA6E;AAC7E,qFAA+E;AAC/E,yFA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CAAoB;QACpB,mDAAsB;KACzB;IACD,MAAM,EAAE,CAAC,6CAAoB,EAAE,yCAAkB,EAAE,iCAAc,EAAE,+BAAa,CAAC;IACjF,IAAI,EAAE,CAAC,yCAAkB,EAAE,+CAAqB,EAAE,+BAAa,EAAE,uCAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/mcp/es6.classes.ts"],"names":[],"mappings":";;AAAA,2EAAsE;AACtE,4FAAsF;AACtF,4FAAsF;AACtF,sFAAgF;AAChF,wFAAkF;AAClF,4FAAsF;AACtF,wGAAkG;AAClG,wGAAkG;AAClG,kGAA4F;AAC5F,oGAA8F;AAC9F,wGAAkG;AAClG,kGAA4F;AAC5F,kGAA4F;AAC5F,4FAAsF;AACtF,8FAAwF;AACxF,kGAA4F;AAC5F,oHAA8G;AAC9G,oHAA8G;AAC9G,8GAAwG;AACxG,gHAA0G;AAC1G,oHAA8G;AAC9G,0EAAqE;AACrE,0EAAqE;AACrE,oEAA+D;AAC/D,sEAAiE;AACjE,0EAAqE;AACrE,yFAAmF;AACnF,yFAAmF;AACnF,mFAA6E;AAC7E,qFAA+E;AAC/E,yFAAmF;AACnF,wGAAiG;AACjG,wGAAiG;AACjG,kGAA2F;AAC3F,oGAA6F;AAC7F,wGAAiG;AACjG,gFAA2E;AAC3E,gFAA2E;AAC3E,0EAAqE;AACrE,4EAAuE;AACvE,gFAA2E;AAC3E,+FAAyF;AACzF,+FAAyF;AACzF,yFAAmF;AACnF,2FAAqF;AACrF,+FAAyF;AACzF,yFAAmF;AACnF,yFAAmF;AACnF,mFAA6E;AAC7E,qFAA+E;AAC/E,yFAAmF;AACnF,wGAAiG;AACjG,wGAAiG;AACjG,kGAA2F;AAC3F,oGAA6F;AAC7F,wGAAiG;AACjG,4EAAuE;AACvE,wEAAmE;AACnE,gEAA2D;AAC3D,8DAAyD;AACzD,sEAAiE;AACjE,4EAAuE;AACvE,4DAAuD;AACvD,oEAA+D;AAC/D,0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,wDAAyB,EAAE,4BAAY,CAAC;CACzG,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
|
@@ -31,7 +31,7 @@ let AdminMcpController = class AdminMcpController {
|
|
|
31
31
|
dispatch(req, res) {
|
|
32
32
|
const key = String(req.headers['x-development-key'] ?? '');
|
|
33
33
|
if (!key) {
|
|
34
|
-
return
|
|
34
|
+
return unauthorized_mcp_response_1.UnauthorizedMcpResponse.unauthorized(res, 'Missing x-development-key header.');
|
|
35
35
|
}
|
|
36
36
|
const auth = new development_key_auth_1.DevelopmentKeyAuth(key);
|
|
37
37
|
return this.handler.handle(req, res, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.mcp.controller.js","sourceRoot":"","sources":["../../../src/mcp/http/admin.mcp.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AAEjE,yEAAoE;AAEpE,4EAAuE;AACvE,+DAA0D;AAC1D,2EAAsE;AAQ/D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC3B,YAA6B,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;IAAG,CAAC;IAG3D,IAAI,CAAQ,GAAY,EAAS,GAAa;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAGD,GAAG,CAAQ,GAAY,EAAS,GAAa;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAEO,QAAQ,CAAC,GAAY,EAAE,GAAa;QACxC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC;QAE3D,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,OAAO,
|
|
1
|
+
{"version":3,"file":"admin.mcp.controller.js","sourceRoot":"","sources":["../../../src/mcp/http/admin.mcp.controller.ts"],"names":[],"mappings":";;;;;;;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A;;;;6CAE9B;6BAXQ,kBAAkB;IAD9B,IAAA,mBAAU,EAAC,WAAW,CAAC;qCAEkB,uCAAiB;GAD9C,kBAAkB,CA4B9B"}
|
|
@@ -14,6 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.BusinessMcpController = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
|
+
const extract_client_credentials_1 = require("../../access/libraries/extract.client.credentials");
|
|
17
18
|
const client_credential_auth_1 = require("../client/client.credential.auth");
|
|
18
19
|
const tool_registry_1 = require("../tools/tool.registry");
|
|
19
20
|
const mcp_request_handler_1 = require("./mcp.request.handler");
|
|
@@ -29,12 +30,11 @@ let BusinessMcpController = class BusinessMcpController {
|
|
|
29
30
|
return this.dispatch(req, res);
|
|
30
31
|
}
|
|
31
32
|
dispatch(req, res) {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return (0, unauthorized_mcp_response_1.unauthorizedMcpResponse)(res, 'Missing x-client-id / x-client-secret headers.');
|
|
33
|
+
const creds = extract_client_credentials_1.ExtractClientCredentials.fromHeaders(req.headers);
|
|
34
|
+
if (!creds) {
|
|
35
|
+
return unauthorized_mcp_response_1.UnauthorizedMcpResponse.unauthorized(res, 'Missing Authorization Bearer token or x-client-id / x-client-secret headers.');
|
|
36
36
|
}
|
|
37
|
-
const auth = new client_credential_auth_1.ClientCredentialAuth(clientId, clientSecret);
|
|
37
|
+
const auth = new client_credential_auth_1.ClientCredentialAuth(creds.clientId, creds.clientSecret);
|
|
38
38
|
return this.handler.handle(req, res, {
|
|
39
39
|
name: 'slabs-access-manager',
|
|
40
40
|
auth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.mcp.controller.js","sourceRoot":"","sources":["../../../src/mcp/http/business.mcp.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AAEj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,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,6CAAoB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;QAE1E,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE;YACjC,IAAI,EAAE,sBAAsB;YAC5B,IAAI;YACJ,KAAK,EAAE,CAAC,MAAsB,EAAE,EAAE,CAAC,IAAI,4BAAY,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE;SACtE,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA5BY,sDAAqB;AAI9B;IADC,IAAA,aAAI,GAAE;IACD,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;iDAE/B;AAGD;IADC,IAAA,YAAG,GAAE;IACD,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;gDAE9B;gCAXQ,qBAAqB;IADjC,IAAA,mBAAU,EAAC,KAAK,CAAC;qCAEwB,uCAAiB;GAD9C,qBAAqB,CA4BjC"}
|
package/dist/mcp/http/index.d.ts
CHANGED
package/dist/mcp/http/index.js
CHANGED
|
@@ -18,5 +18,6 @@ __exportStar(require("./admin.mcp.controller"), exports);
|
|
|
18
18
|
__exportStar(require("./business.mcp.controller"), exports);
|
|
19
19
|
__exportStar(require("./mcp.http.module"), exports);
|
|
20
20
|
__exportStar(require("./mcp.request.handler"), exports);
|
|
21
|
+
__exportStar(require("./prm.controller"), exports);
|
|
21
22
|
__exportStar(require("./unauthorized.mcp.response"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/http/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,8DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/http/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,oDAAkC;AAAA,wDAAsC;AAAA,mDAAiC;AAAA,8DAA2C"}
|
|
@@ -11,12 +11,13 @@ const common_1 = require("@nestjs/common");
|
|
|
11
11
|
const admin_mcp_controller_1 = require("./admin.mcp.controller");
|
|
12
12
|
const business_mcp_controller_1 = require("./business.mcp.controller");
|
|
13
13
|
const mcp_request_handler_1 = require("./mcp.request.handler");
|
|
14
|
+
const prm_controller_1 = require("./prm.controller");
|
|
14
15
|
let McpHttpModule = class McpHttpModule {
|
|
15
16
|
};
|
|
16
17
|
exports.McpHttpModule = McpHttpModule;
|
|
17
18
|
exports.McpHttpModule = McpHttpModule = __decorate([
|
|
18
19
|
(0, common_1.Module)({
|
|
19
|
-
controllers: [business_mcp_controller_1.BusinessMcpController, admin_mcp_controller_1.AdminMcpController],
|
|
20
|
+
controllers: [business_mcp_controller_1.BusinessMcpController, admin_mcp_controller_1.AdminMcpController, prm_controller_1.PrmController],
|
|
20
21
|
providers: [mcp_request_handler_1.McpRequestHandler],
|
|
21
22
|
})
|
|
22
23
|
], McpHttpModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.http.module.js","sourceRoot":"","sources":["../../../src/mcp/http/mcp.http.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,iEAA4D;AAC5D,uEAAkE;AAClE,+DAA0D;
|
|
1
|
+
{"version":3,"file":"mcp.http.module.js","sourceRoot":"","sources":["../../../src/mcp/http/mcp.http.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,iEAA4D;AAC5D,uEAAkE;AAClE,+DAA0D;AAC1D,qDAAiD;AAa1C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAJzB,IAAA,eAAM,EAAC;QACJ,WAAW,EAAE,CAAC,+CAAqB,EAAE,yCAAkB,EAAE,8BAAa,CAAC;QACvE,SAAS,EAAE,CAAC,uCAAiB,CAAC;KACjC,CAAC;GACW,aAAa,CAAG"}
|
|
@@ -31,7 +31,7 @@ let McpRequestHandler = McpRequestHandler_1 = class McpRequestHandler {
|
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
33
|
this.logger.error(`MCP request failed: ${error?.message ?? error}`, error?.stack);
|
|
34
|
-
|
|
34
|
+
unauthorized_mcp_response_1.UnauthorizedMcpResponse.internal(res, 'MCP request handling failed.');
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
safeClose(fn) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.request.handler.js","sourceRoot":"","sources":["../../../src/mcp/http/mcp.request.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,0FAAmG;AACnG,iEAA4D;AAG5D,0DAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"mcp.request.handler.js","sourceRoot":"","sources":["../../../src/mcp/http/mcp.request.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,0FAAmG;AACnG,iEAA4D;AAG5D,0DAAqD;AACrD,2EAAsE;AAgB/D,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAAvB;QACc,WAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAqCjE,CAAC;IA9BG,KAAK,CAAC,MAAM,CAAC,GAAQ,EAAE,GAAQ,EAAE,OAAyB;QACtD,IAAI,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,iCAAc,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YACxE,MAAM,MAAM,GAAG,IAAI,iCAAc,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,C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,0 +1,45 @@
|
|
|
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.PrmController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
let PrmController = class PrmController {
|
|
15
|
+
protectedResourceMetadata() {
|
|
16
|
+
const resource = process.env.MCP_CANONICAL_URI || `${this.baseUrl()}/mcp`;
|
|
17
|
+
const authorizationServer = process.env.MCP_AUTHORIZATION_SERVER || process.env.SERVER_URL || this.baseUrl();
|
|
18
|
+
const scopes = (process.env.MCP_SCOPES_SUPPORTED || 'mcp,reporting:read')
|
|
19
|
+
.split(',')
|
|
20
|
+
.map((s) => s.trim())
|
|
21
|
+
.filter(Boolean);
|
|
22
|
+
return {
|
|
23
|
+
resource,
|
|
24
|
+
authorization_servers: [authorizationServer.replace(/\/+$/, '')],
|
|
25
|
+
scopes_supported: scopes,
|
|
26
|
+
bearer_methods_supported: ['header'],
|
|
27
|
+
resource_documentation: process.env.MCP_RESOURCE_DOCUMENTATION || 'https://developers.finnoto.com/mcp',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
baseUrl() {
|
|
31
|
+
return (process.env.SERVER_URL || `http://127.0.0.1:${process.env.SERVER_PORT || 4000}`).replace(/\/+$/, '');
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.PrmController = PrmController;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, common_1.Get)('oauth-protected-resource'),
|
|
37
|
+
(0, common_1.Header)('Cache-Control', 'public, max-age=3600'),
|
|
38
|
+
__metadata("design:type", Function),
|
|
39
|
+
__metadata("design:paramtypes", []),
|
|
40
|
+
__metadata("design:returntype", void 0)
|
|
41
|
+
], PrmController.prototype, "protectedResourceMetadata", null);
|
|
42
|
+
exports.PrmController = PrmController = __decorate([
|
|
43
|
+
(0, common_1.Controller)('.well-known')
|
|
44
|
+
], PrmController);
|
|
45
|
+
//# sourceMappingURL=prm.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prm.controller.js","sourceRoot":"","sources":["../../../src/mcp/http/prm.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyD;AAOlD,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGtB,yBAAyB;QACrB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;QAC1E,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAC7G,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,oBAAoB,CAAC;aACpE,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aACpB,MAAM,CAAC,OAAO,CAAC,CAAC;QAErB,OAAO;YACH,QAAQ;YACR,qBAAqB,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAChE,gBAAgB,EAAE,MAAM;YACxB,wBAAwB,EAAE,CAAC,QAAQ,CAAC;YACpC,sBAAsB,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B,IAAI,oCAAoC;SACzG,CAAC;IACN,CAAC;IAEO,OAAO;QACX,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,oBAAoB,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACjH,CAAC;CACJ,CAAA;AAvBY,sCAAa;AAGtB;IAFC,IAAA,YAAG,EAAC,0BAA0B,CAAC;IAC/B,IAAA,eAAM,EAAC,eAAe,EAAE,sBAAsB,CAAC;;;;8DAgB/C;wBAlBQ,aAAa;IADzB,IAAA,mBAAU,EAAC,aAAa,CAAC;GACb,aAAa,CAuBzB"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare class UnauthorizedMcpResponse {
|
|
3
|
+
static error(res: Response, status: number, code: number, message: string): void;
|
|
4
|
+
static challenge(): string;
|
|
5
|
+
static unauthorized(res: Response, message: string): void;
|
|
6
|
+
static internal(res: Response, message: string): void;
|
|
7
|
+
}
|