@hed-hog/core 0.0.328 → 0.0.330
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/ai/ai.service.d.ts +1 -1
- package/dist/auth/auth.controller.d.ts +23 -23
- package/dist/auth/auth.service.d.ts +41 -41
- package/dist/challenge/challenge.service.d.ts +14 -14
- package/dist/core/system.controller.d.ts +1 -1
- package/dist/core/system.service.d.ts +1 -1
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +9 -2
- package/dist/core.module.js.map +1 -1
- package/dist/dashboard/dashboard/dashboard.controller.d.ts +84 -84
- package/dist/dashboard/dashboard/dashboard.service.d.ts +84 -84
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +29 -29
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +29 -29
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts +42 -42
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts +42 -42
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +11 -11
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +11 -11
- package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts +6 -6
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts +6 -6
- package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts +33 -33
- package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts +33 -33
- 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/file/file.controller.d.ts +10 -10
- package/dist/file/file.service.d.ts +22 -22
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/mail/mail.controller.d.ts +15 -15
- package/dist/mail/mail.service.d.ts +15 -15
- package/dist/mail-profile/mail-profile.controller.d.ts +9 -9
- package/dist/mail-profile/mail-profile.service.d.ts +9 -9
- package/dist/mail-sent/mail-sent.controller.d.ts +17 -17
- package/dist/mail-sent/mail-sent.service.d.ts +17 -17
- package/dist/mcp/decorators/mcp-tool.decorator.d.ts +4 -0
- package/dist/mcp/decorators/mcp-tool.decorator.d.ts.map +1 -0
- package/dist/mcp/decorators/mcp-tool.decorator.js +8 -0
- package/dist/mcp/decorators/mcp-tool.decorator.js.map +1 -0
- package/dist/mcp/guards/mcp-auth.guard.d.ts +9 -0
- package/dist/mcp/guards/mcp-auth.guard.d.ts.map +1 -0
- package/dist/mcp/guards/mcp-auth.guard.js +41 -0
- package/dist/mcp/guards/mcp-auth.guard.js.map +1 -0
- package/dist/mcp/guards/mcp-permission.guard.d.ts +8 -0
- package/dist/mcp/guards/mcp-permission.guard.d.ts.map +1 -0
- package/dist/mcp/guards/mcp-permission.guard.js +57 -0
- package/dist/mcp/guards/mcp-permission.guard.js.map +1 -0
- package/dist/mcp/interfaces/mcp-tool-definition.interface.d.ts +7 -0
- package/dist/mcp/interfaces/mcp-tool-definition.interface.d.ts.map +1 -0
- package/dist/mcp/interfaces/mcp-tool-definition.interface.js +3 -0
- package/dist/mcp/interfaces/mcp-tool-definition.interface.js.map +1 -0
- package/dist/mcp/mcp-audit.service.d.ts +17 -0
- package/dist/mcp/mcp-audit.service.d.ts.map +1 -0
- package/dist/mcp/mcp-audit.service.js +46 -0
- package/dist/mcp/mcp-audit.service.js.map +1 -0
- package/dist/mcp/mcp-registry.service.d.ts +21 -0
- package/dist/mcp/mcp-registry.service.d.ts.map +1 -0
- package/dist/mcp/mcp-registry.service.js +69 -0
- package/dist/mcp/mcp-registry.service.js.map +1 -0
- package/dist/mcp/mcp-server.service.d.ts +12 -0
- package/dist/mcp/mcp-server.service.d.ts.map +1 -0
- package/dist/mcp/mcp-server.service.js +94 -0
- package/dist/mcp/mcp-server.service.js.map +1 -0
- package/dist/mcp/mcp.controller.d.ts +8 -0
- package/dist/mcp/mcp.controller.d.ts.map +1 -0
- package/dist/mcp/mcp.controller.js +54 -0
- package/dist/mcp/mcp.controller.js.map +1 -0
- package/dist/mcp/mcp.module.d.ts +3 -0
- package/dist/mcp/mcp.module.d.ts.map +1 -0
- package/dist/mcp/mcp.module.js +49 -0
- package/dist/mcp/mcp.module.js.map +1 -0
- package/dist/mcp/tools/core-settings.mcp-tools.d.ts +12 -0
- package/dist/mcp/tools/core-settings.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-settings.mcp-tools.js +66 -0
- package/dist/mcp/tools/core-settings.mcp-tools.js.map +1 -0
- package/dist/mcp/tools/core-users.mcp-tools.d.ts +55 -0
- package/dist/mcp/tools/core-users.mcp-tools.d.ts.map +1 -0
- package/dist/mcp/tools/core-users.mcp-tools.js +295 -0
- package/dist/mcp/tools/core-users.mcp-tools.js.map +1 -0
- package/dist/mcp/types/mcp-context.type.d.ts +7 -0
- package/dist/mcp/types/mcp-context.type.d.ts.map +1 -0
- package/dist/mcp/types/mcp-context.type.js +3 -0
- package/dist/mcp/types/mcp-context.type.js.map +1 -0
- package/dist/mcp-chat/dto/create-conversation.dto.d.ts +4 -0
- package/dist/mcp-chat/dto/create-conversation.dto.d.ts.map +1 -0
- package/dist/mcp-chat/dto/create-conversation.dto.js +22 -0
- package/dist/mcp-chat/dto/create-conversation.dto.js.map +1 -0
- package/dist/mcp-chat/dto/send-message.dto.d.ts +4 -0
- package/dist/mcp-chat/dto/send-message.dto.d.ts.map +1 -0
- package/dist/mcp-chat/dto/send-message.dto.js +22 -0
- package/dist/mcp-chat/dto/send-message.dto.js.map +1 -0
- package/dist/mcp-chat/mcp-chat.controller.d.ts +55 -0
- package/dist/mcp-chat/mcp-chat.controller.d.ts.map +1 -0
- package/dist/mcp-chat/mcp-chat.controller.js +90 -0
- package/dist/mcp-chat/mcp-chat.controller.js.map +1 -0
- package/dist/mcp-chat/mcp-chat.module.d.ts +3 -0
- package/dist/mcp-chat/mcp-chat.module.d.ts.map +1 -0
- package/dist/mcp-chat/mcp-chat.module.js +30 -0
- package/dist/mcp-chat/mcp-chat.module.js.map +1 -0
- package/dist/mcp-chat/mcp-chat.service.d.ts +50 -0
- package/dist/mcp-chat/mcp-chat.service.d.ts.map +1 -0
- package/dist/mcp-chat/mcp-chat.service.js +290 -0
- package/dist/mcp-chat/mcp-chat.service.js.map +1 -0
- package/dist/menu/menu.controller.d.ts +8 -8
- package/dist/menu/menu.service.d.ts +8 -8
- package/dist/oauth/oauth.service.js +1 -1
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/pdf/components/index.d.ts +57 -0
- package/dist/pdf/components/index.d.ts.map +1 -0
- package/dist/pdf/components/index.js +258 -0
- package/dist/pdf/components/index.js.map +1 -0
- package/dist/pdf/dto/generate-pdf.dto.d.ts +5 -0
- package/dist/pdf/dto/generate-pdf.dto.d.ts.map +1 -0
- package/dist/pdf/dto/generate-pdf.dto.js +27 -0
- package/dist/pdf/dto/generate-pdf.dto.js.map +1 -0
- package/dist/pdf/interfaces/pdf-theme-config.interface.d.ts +10 -0
- package/dist/pdf/interfaces/pdf-theme-config.interface.d.ts.map +1 -0
- package/dist/pdf/interfaces/pdf-theme-config.interface.js +3 -0
- package/dist/pdf/interfaces/pdf-theme-config.interface.js.map +1 -0
- package/dist/pdf/pdf.controller.d.ts +16 -0
- package/dist/pdf/pdf.controller.d.ts.map +1 -0
- package/dist/pdf/pdf.controller.js +100 -0
- package/dist/pdf/pdf.controller.js.map +1 -0
- package/dist/pdf/pdf.module.d.ts +3 -0
- package/dist/pdf/pdf.module.d.ts.map +1 -0
- package/dist/pdf/pdf.module.js +29 -0
- package/dist/pdf/pdf.module.js.map +1 -0
- package/dist/pdf/pdf.service.d.ts +44 -0
- package/dist/pdf/pdf.service.d.ts.map +1 -0
- package/dist/pdf/pdf.service.js +185 -0
- package/dist/pdf/pdf.service.js.map +1 -0
- package/dist/pdf/templates/hcode-institutional.template.d.ts +36 -0
- package/dist/pdf/templates/hcode-institutional.template.d.ts.map +1 -0
- package/dist/pdf/templates/hcode-institutional.template.js +67 -0
- package/dist/pdf/templates/hcode-institutional.template.js.map +1 -0
- package/dist/pdf/themes/hcode.theme.d.ts +25 -0
- package/dist/pdf/themes/hcode.theme.d.ts.map +1 -0
- package/dist/pdf/themes/hcode.theme.js +504 -0
- package/dist/pdf/themes/hcode.theme.js.map +1 -0
- package/dist/profile/profile.controller.d.ts +16 -16
- package/dist/profile/profile.service.d.ts +16 -16
- package/dist/role/role.controller.d.ts +12 -12
- package/dist/role/role.service.d.ts +12 -12
- package/dist/route/dto/create.dto.d.ts +6 -2
- package/dist/route/dto/create.dto.d.ts.map +1 -1
- package/dist/route/dto/create.dto.js +19 -1
- package/dist/route/dto/create.dto.js.map +1 -1
- package/dist/route/dto/update.dto.d.ts +4 -0
- package/dist/route/dto/update.dto.d.ts.map +1 -1
- package/dist/route/dto/update.dto.js +19 -3
- package/dist/route/dto/update.dto.js.map +1 -1
- package/dist/route/route.service.d.ts +1 -1
- package/dist/route/route.service.d.ts.map +1 -1
- package/dist/route/route.service.js +18 -11
- package/dist/route/route.service.js.map +1 -1
- package/dist/screen/screen.controller.d.ts +3 -3
- package/dist/screen/screen.service.d.ts +3 -3
- package/dist/session/session.controller.d.ts +4 -4
- package/dist/session/session.service.d.ts +12 -12
- package/dist/setting/setting.controller.d.ts +13 -13
- package/dist/setting/setting.service.d.ts +13 -13
- package/dist/user/user.controller.d.ts +24 -24
- package/dist/user/user.service.d.ts +55 -55
- package/hedhog/data/menu.yaml +40 -26
- package/hedhog/data/route.yaml +583 -152
- package/hedhog/data/setting_group.yaml +60 -0
- package/hedhog/frontend/app/mcp_chat/page.tsx.ejs +574 -0
- package/hedhog/frontend/app/users/user-sheet.tsx.ejs +5 -9
- package/hedhog/frontend/messages/en.json +19 -0
- package/hedhog/frontend/messages/pt.json +19 -0
- package/hedhog/table/mcp_conversation.yaml +12 -0
- package/hedhog/table/mcp_conversation_message.yaml +23 -0
- package/hedhog/table/mcp_tool_call_log.yaml +22 -0
- package/hedhog/table/route.yaml +33 -22
- package/package.json +7 -6
- package/src/core.module.ts +18 -11
- package/src/index.ts +22 -12
- package/src/mcp/decorators/mcp-tool.decorator.ts +7 -0
- package/src/mcp/guards/mcp-auth.guard.ts +32 -0
- package/src/mcp/guards/mcp-permission.guard.ts +51 -0
- package/src/mcp/interfaces/mcp-tool-definition.interface.ts +6 -0
- package/src/mcp/mcp-audit.service.ts +36 -0
- package/src/mcp/mcp-registry.service.ts +69 -0
- package/src/mcp/mcp-server.service.ts +87 -0
- package/src/mcp/mcp.controller.ts +30 -0
- package/src/mcp/mcp.module.ts +36 -0
- package/src/mcp/tools/core-settings.mcp-tools.ts +53 -0
- package/src/mcp/tools/core-users.mcp-tools.ts +267 -0
- package/src/mcp/types/mcp-context.type.ts +6 -0
- package/src/mcp-chat/dto/create-conversation.dto.ts +7 -0
- package/src/mcp-chat/dto/send-message.dto.ts +7 -0
- package/src/mcp-chat/mcp-chat.controller.ts +60 -0
- package/src/mcp-chat/mcp-chat.module.ts +17 -0
- package/src/mcp-chat/mcp-chat.service.ts +332 -0
- package/src/oauth/oauth.service.ts +12 -12
- package/src/pdf/components/index.ts +316 -0
- package/src/pdf/dto/generate-pdf.dto.ts +11 -0
- package/src/pdf/interfaces/pdf-theme-config.interface.ts +10 -0
- package/src/pdf/pdf.controller.ts +86 -0
- package/src/pdf/pdf.module.ts +17 -0
- package/src/pdf/pdf.service.ts +229 -0
- package/src/pdf/templates/hcode-institutional.template.ts +122 -0
- package/src/pdf/themes/hcode.theme.ts +515 -0
- package/src/route/dto/create.dto.ts +32 -14
- package/src/route/dto/update.dto.ts +31 -16
- package/src/route/route.service.ts +23 -12
|
@@ -73,16 +73,16 @@ export declare class RoleController {
|
|
|
73
73
|
code: string;
|
|
74
74
|
};
|
|
75
75
|
} & {
|
|
76
|
-
name: string;
|
|
77
|
-
id: number;
|
|
78
|
-
description: string | null;
|
|
79
76
|
created_at: Date;
|
|
77
|
+
id: number;
|
|
80
78
|
updated_at: Date;
|
|
79
|
+
name: string;
|
|
81
80
|
locale_id: number;
|
|
81
|
+
description: string | null;
|
|
82
82
|
role_id: number;
|
|
83
83
|
})[];
|
|
84
|
-
id: number;
|
|
85
84
|
created_at: Date;
|
|
85
|
+
id: number;
|
|
86
86
|
updated_at: Date;
|
|
87
87
|
slug: string;
|
|
88
88
|
}>;
|
|
@@ -96,16 +96,16 @@ export declare class RoleController {
|
|
|
96
96
|
code: string;
|
|
97
97
|
};
|
|
98
98
|
} & {
|
|
99
|
-
name: string;
|
|
100
|
-
id: number;
|
|
101
|
-
description: string | null;
|
|
102
99
|
created_at: Date;
|
|
100
|
+
id: number;
|
|
103
101
|
updated_at: Date;
|
|
102
|
+
name: string;
|
|
104
103
|
locale_id: number;
|
|
104
|
+
description: string | null;
|
|
105
105
|
role_id: number;
|
|
106
106
|
})[];
|
|
107
|
-
id: number;
|
|
108
107
|
created_at: Date;
|
|
108
|
+
id: number;
|
|
109
109
|
updated_at: Date;
|
|
110
110
|
slug: string;
|
|
111
111
|
}>;
|
|
@@ -119,16 +119,16 @@ export declare class RoleController {
|
|
|
119
119
|
code: string;
|
|
120
120
|
};
|
|
121
121
|
} & {
|
|
122
|
-
name: string;
|
|
123
|
-
id: number;
|
|
124
|
-
description: string | null;
|
|
125
122
|
created_at: Date;
|
|
123
|
+
id: number;
|
|
126
124
|
updated_at: Date;
|
|
125
|
+
name: string;
|
|
127
126
|
locale_id: number;
|
|
127
|
+
description: string | null;
|
|
128
128
|
role_id: number;
|
|
129
129
|
})[];
|
|
130
|
-
id: number;
|
|
131
130
|
created_at: Date;
|
|
131
|
+
id: number;
|
|
132
132
|
updated_at: Date;
|
|
133
133
|
slug: string;
|
|
134
134
|
}>;
|
|
@@ -79,16 +79,16 @@ export declare class RoleService {
|
|
|
79
79
|
code: string;
|
|
80
80
|
};
|
|
81
81
|
} & {
|
|
82
|
-
name: string;
|
|
83
|
-
id: number;
|
|
84
|
-
description: string | null;
|
|
85
82
|
created_at: Date;
|
|
83
|
+
id: number;
|
|
86
84
|
updated_at: Date;
|
|
85
|
+
name: string;
|
|
87
86
|
locale_id: number;
|
|
87
|
+
description: string | null;
|
|
88
88
|
role_id: number;
|
|
89
89
|
})[];
|
|
90
|
-
id: number;
|
|
91
90
|
created_at: Date;
|
|
91
|
+
id: number;
|
|
92
92
|
updated_at: Date;
|
|
93
93
|
slug: string;
|
|
94
94
|
}>;
|
|
@@ -102,16 +102,16 @@ export declare class RoleService {
|
|
|
102
102
|
code: string;
|
|
103
103
|
};
|
|
104
104
|
} & {
|
|
105
|
-
name: string;
|
|
106
|
-
id: number;
|
|
107
|
-
description: string | null;
|
|
108
105
|
created_at: Date;
|
|
106
|
+
id: number;
|
|
109
107
|
updated_at: Date;
|
|
108
|
+
name: string;
|
|
110
109
|
locale_id: number;
|
|
110
|
+
description: string | null;
|
|
111
111
|
role_id: number;
|
|
112
112
|
})[];
|
|
113
|
-
id: number;
|
|
114
113
|
created_at: Date;
|
|
114
|
+
id: number;
|
|
115
115
|
updated_at: Date;
|
|
116
116
|
slug: string;
|
|
117
117
|
}>;
|
|
@@ -125,16 +125,16 @@ export declare class RoleService {
|
|
|
125
125
|
code: string;
|
|
126
126
|
};
|
|
127
127
|
} & {
|
|
128
|
-
name: string;
|
|
129
|
-
id: number;
|
|
130
|
-
description: string | null;
|
|
131
128
|
created_at: Date;
|
|
129
|
+
id: number;
|
|
132
130
|
updated_at: Date;
|
|
131
|
+
name: string;
|
|
133
132
|
locale_id: number;
|
|
133
|
+
description: string | null;
|
|
134
134
|
role_id: number;
|
|
135
135
|
})[];
|
|
136
|
-
id: number;
|
|
137
136
|
created_at: Date;
|
|
137
|
+
id: number;
|
|
138
138
|
updated_at: Date;
|
|
139
139
|
slug: string;
|
|
140
140
|
}>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { HttpMethod } from '../../types/http-method';
|
|
2
|
+
export type RouteType = 'HTTP' | 'MCP';
|
|
2
3
|
export declare class CreateDTO {
|
|
3
|
-
url
|
|
4
|
-
method
|
|
4
|
+
url?: string;
|
|
5
|
+
method?: HttpMethod;
|
|
6
|
+
type?: RouteType;
|
|
7
|
+
tool_name?: string;
|
|
8
|
+
name?: string;
|
|
5
9
|
}
|
|
6
10
|
//# sourceMappingURL=create.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/route/dto/create.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,qBAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/route/dto/create.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;AAIvC,qBAAa,SAAS;IAGpB,GAAG,CAAC,EAAE,MAAM,CAAC;IAOb,MAAM,CAAC,EAAE,UAAU,CAAC;IAIpB,IAAI,CAAC,EAAE,SAAS,CAAC;IAIjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -12,18 +12,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CreateDTO = void 0;
|
|
13
13
|
const api_locale_1 = require("@hed-hog/api-locale");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const HTTP_METHODS = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS', 'HEAD'];
|
|
15
16
|
class CreateDTO {
|
|
16
17
|
}
|
|
17
18
|
exports.CreateDTO = CreateDTO;
|
|
18
19
|
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
19
21
|
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.urlMustBeString', args.value) }),
|
|
20
22
|
__metadata("design:type", String)
|
|
21
23
|
], CreateDTO.prototype, "url", void 0);
|
|
22
24
|
__decorate([
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
26
|
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.methodMustBeString', args.value) }),
|
|
24
|
-
(0, class_validator_1.IsIn)(
|
|
27
|
+
(0, class_validator_1.IsIn)(HTTP_METHODS, {
|
|
25
28
|
message: (args) => (0, api_locale_1.getLocaleText)('validation.methodMustBeValid', args.value),
|
|
26
29
|
}),
|
|
27
30
|
__metadata("design:type", String)
|
|
28
31
|
], CreateDTO.prototype, "method", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsIn)(['HTTP', 'MCP']),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CreateDTO.prototype, "type", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CreateDTO.prototype, "tool_name", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CreateDTO.prototype, "name", void 0);
|
|
29
47
|
//# sourceMappingURL=create.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/route/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/route/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,qDAA6D;AAK7D,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAElF,MAAa,SAAS;CAuBrB;AAvBD,8BAuBC;AApBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,4BAA4B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;;sCAC5E;AAOb;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IAC3F,IAAA,sBAAI,EAAC,YAAY,EAAE;QAClB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,8BAA8B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC7E,CAAC;;yCACkB;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,sBAAI,EAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;;uCACL;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4CACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uCACG"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { HttpMethod } from '../../types/http-method';
|
|
2
|
+
import { RouteType } from './create.dto';
|
|
2
3
|
export declare class UpdateDTO {
|
|
3
4
|
url?: string;
|
|
4
5
|
method?: HttpMethod;
|
|
6
|
+
type?: RouteType;
|
|
7
|
+
tool_name?: string;
|
|
8
|
+
name?: string;
|
|
5
9
|
}
|
|
6
10
|
//# sourceMappingURL=update.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/route/dto/update.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/route/dto/update.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,qBAAa,SAAS;IAGpB,GAAG,CAAC,EAAE,MAAM,CAAC;IAOb,MAAM,CAAC,EAAE,UAAU,CAAC;IAIpB,IAAI,CAAC,EAAE,SAAS,CAAC;IAIjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -12,20 +12,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.UpdateDTO = void 0;
|
|
13
13
|
const api_locale_1 = require("@hed-hog/api-locale");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const HTTP_METHODS = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS', 'HEAD'];
|
|
15
16
|
class UpdateDTO {
|
|
16
17
|
}
|
|
17
18
|
exports.UpdateDTO = UpdateDTO;
|
|
18
19
|
__decorate([
|
|
19
|
-
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.urlMustBeString', args.value) }),
|
|
20
20
|
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.urlMustBeString', args.value) }),
|
|
21
22
|
__metadata("design:type", String)
|
|
22
23
|
], UpdateDTO.prototype, "url", void 0);
|
|
23
24
|
__decorate([
|
|
24
|
-
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.methodMustBeString', args.value) }),
|
|
25
25
|
(0, class_validator_1.IsOptional)(),
|
|
26
|
-
(0, class_validator_1.
|
|
26
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.methodMustBeString', args.value) }),
|
|
27
|
+
(0, class_validator_1.IsIn)(HTTP_METHODS, {
|
|
27
28
|
message: (args) => (0, api_locale_1.getLocaleText)('validation.methodMustBeValid', args.value),
|
|
28
29
|
}),
|
|
29
30
|
__metadata("design:type", String)
|
|
30
31
|
], UpdateDTO.prototype, "method", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsIn)(['HTTP', 'MCP']),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UpdateDTO.prototype, "type", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UpdateDTO.prototype, "tool_name", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], UpdateDTO.prototype, "name", void 0);
|
|
31
47
|
//# sourceMappingURL=update.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/route/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,qDAA6D;
|
|
1
|
+
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/route/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,qDAA6D;AAI7D,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAElF,MAAa,SAAS;CAuBrB;AAvBD,8BAuBC;AApBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,4BAA4B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;;sCAC5E;AAOb;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IAC3F,IAAA,sBAAI,EAAC,YAAY,EAAE;QAClB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,8BAA8B,EAAE,IAAI,CAAC,KAAK,CAAC;KAC7E,CAAC;;yCACkB;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,sBAAI,EAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;;uCACL;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4CACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uCACG"}
|
|
@@ -18,7 +18,7 @@ export declare class RouteService {
|
|
|
18
18
|
data: any[];
|
|
19
19
|
}>;
|
|
20
20
|
get(routeId: number, locale: string): Promise<any>;
|
|
21
|
-
create({ url, method }: CreateDTO, locale: string): Promise<any>;
|
|
21
|
+
create({ url, method, type, tool_name, name }: CreateDTO, locale: string): Promise<any>;
|
|
22
22
|
update({ id, data }: {
|
|
23
23
|
id: number;
|
|
24
24
|
data: UpdateDTO;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.service.d.ts","sourceRoot":"","sources":["../../src/route/route.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;A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,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAUlD,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAa,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IA2BhG,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAgBnF,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC;QAAC,KAAK,EAAC,MAAM,CAAA;KAAC,CAAC;IAyBlE,SAAS,CACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,aAAa;;;;;;;;;IAiC3B,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAE,OAAO,CAAC;QAAC,KAAK,EAAC,MAAM,CAAA;KAAC,CAAC;IAgBxE,WAAW,CACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,aAAa;;;;;;;;;IAgC3B,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAE,OAAO,CAAC;QAAC,KAAK,EAAC,MAAM,CAAA;KAAC,CAAC;CAejF"}
|
|
@@ -23,7 +23,7 @@ let RouteService = class RouteService {
|
|
|
23
23
|
this.paginationService = paginationService;
|
|
24
24
|
}
|
|
25
25
|
async list(paginationParams) {
|
|
26
|
-
const fields = ['url', 'method'];
|
|
26
|
+
const fields = ['url', 'method', 'tool_name', 'name'];
|
|
27
27
|
const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
|
|
28
28
|
return this.paginationService.paginate(this.prismaService.route, paginationParams, {
|
|
29
29
|
where: {
|
|
@@ -38,17 +38,24 @@ let RouteService = class RouteService {
|
|
|
38
38
|
}
|
|
39
39
|
return route;
|
|
40
40
|
}
|
|
41
|
-
async create({ url, method }, locale) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
url,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
async create({ url, method, type = 'HTTP', tool_name, name }, locale) {
|
|
42
|
+
if (type === 'HTTP' && url && method) {
|
|
43
|
+
const existingRoute = await this.prismaService.route.findFirst({
|
|
44
|
+
where: { url, method },
|
|
45
|
+
});
|
|
46
|
+
if (existingRoute) {
|
|
47
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('itemAlreadyExists', locale, `Route with URL ${url} and method ${method} already exists`).replace('{{item}}', 'Route'));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (type === 'MCP' && tool_name) {
|
|
51
|
+
const existingTool = await this.prismaService.route.findFirst({
|
|
52
|
+
where: { tool_name },
|
|
53
|
+
});
|
|
54
|
+
if (existingTool) {
|
|
55
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('itemAlreadyExists', locale, `MCP tool '${tool_name}' already exists`).replace('{{item}}', 'MCP tool'));
|
|
56
|
+
}
|
|
50
57
|
}
|
|
51
|
-
return this.prismaService.route.create({ data: { url, method } });
|
|
58
|
+
return this.prismaService.route.create({ data: { url, method, type: type, tool_name, name } });
|
|
52
59
|
}
|
|
53
60
|
async update({ id, data }, locale) {
|
|
54
61
|
const routeExists = await this.prismaService.route.findUnique({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.service.js","sourceRoot":"","sources":["../../src/route/route.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAoD;AACpD,4DAA2E;AAC3E,oDAAoD;AACpD,2CAAwG;AAOjG,IAAM,YAAY,GA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,0BAAa;QAET,kCAAiB;GAL5C,YAAY,CA+MxB"}
|
|
@@ -40,22 +40,22 @@ export declare class ScreenController {
|
|
|
40
40
|
count: number;
|
|
41
41
|
}>;
|
|
42
42
|
show(screenId: number): Promise<{
|
|
43
|
-
id: number;
|
|
44
43
|
created_at: Date;
|
|
44
|
+
id: number;
|
|
45
45
|
updated_at: Date;
|
|
46
46
|
slug: string;
|
|
47
47
|
icon: string | null;
|
|
48
48
|
}>;
|
|
49
49
|
create(data: CreateDTO): Promise<{
|
|
50
|
-
id: number;
|
|
51
50
|
created_at: Date;
|
|
51
|
+
id: number;
|
|
52
52
|
updated_at: Date;
|
|
53
53
|
slug: string;
|
|
54
54
|
icon: string | null;
|
|
55
55
|
}>;
|
|
56
56
|
update(screenId: number, data: UpdateDTO): Promise<{
|
|
57
|
-
id: number;
|
|
58
57
|
created_at: Date;
|
|
58
|
+
id: number;
|
|
59
59
|
updated_at: Date;
|
|
60
60
|
slug: string;
|
|
61
61
|
icon: string | null;
|
|
@@ -42,15 +42,15 @@ export declare class ScreenService {
|
|
|
42
42
|
data: any[];
|
|
43
43
|
}>;
|
|
44
44
|
get(screenId: number): Promise<{
|
|
45
|
-
id: number;
|
|
46
45
|
created_at: Date;
|
|
46
|
+
id: number;
|
|
47
47
|
updated_at: Date;
|
|
48
48
|
slug: string;
|
|
49
49
|
icon: string | null;
|
|
50
50
|
}>;
|
|
51
51
|
create({ slug, icon }: CreateDTO): Promise<{
|
|
52
|
-
id: number;
|
|
53
52
|
created_at: Date;
|
|
53
|
+
id: number;
|
|
54
54
|
updated_at: Date;
|
|
55
55
|
slug: string;
|
|
56
56
|
icon: string | null;
|
|
@@ -59,8 +59,8 @@ export declare class ScreenService {
|
|
|
59
59
|
id: number;
|
|
60
60
|
data: UpdateDTO;
|
|
61
61
|
}): Promise<{
|
|
62
|
-
id: number;
|
|
63
62
|
created_at: Date;
|
|
63
|
+
id: number;
|
|
64
64
|
updated_at: Date;
|
|
65
65
|
slug: string;
|
|
66
66
|
icon: string | null;
|
|
@@ -30,15 +30,15 @@ export declare class SessionController {
|
|
|
30
30
|
revokeSession({ id: userId }: {
|
|
31
31
|
id: any;
|
|
32
32
|
}, sessionId: number, locale: string): Promise<{
|
|
33
|
-
id: number;
|
|
34
|
-
hash: string;
|
|
35
33
|
created_at: Date;
|
|
34
|
+
id: number;
|
|
36
35
|
updated_at: Date;
|
|
36
|
+
user_id: number;
|
|
37
|
+
hash: string;
|
|
37
38
|
ip_address: string;
|
|
38
39
|
user_agent: string;
|
|
39
|
-
user_id: number;
|
|
40
|
-
expires_at: Date;
|
|
41
40
|
revoked_at: Date | null;
|
|
41
|
+
expires_at: Date;
|
|
42
42
|
}>;
|
|
43
43
|
}
|
|
44
44
|
//# sourceMappingURL=session.controller.d.ts.map
|
|
@@ -18,29 +18,29 @@ export declare class SessionService {
|
|
|
18
18
|
create(locale: string, userId: number, ipAddress: string, userAgent: string): Promise<{
|
|
19
19
|
token: string;
|
|
20
20
|
session: {
|
|
21
|
-
id: number;
|
|
22
|
-
hash: string;
|
|
23
21
|
created_at: Date;
|
|
22
|
+
id: number;
|
|
24
23
|
updated_at: Date;
|
|
24
|
+
user_id: number;
|
|
25
|
+
hash: string;
|
|
25
26
|
ip_address: string;
|
|
26
27
|
user_agent: string;
|
|
27
|
-
user_id: number;
|
|
28
|
-
expires_at: Date;
|
|
29
28
|
revoked_at: Date | null;
|
|
29
|
+
expires_at: Date;
|
|
30
30
|
};
|
|
31
31
|
}>;
|
|
32
32
|
refresh(locale: string, refreshToken: string, ipAddress: string, userAgent: string): Promise<{
|
|
33
33
|
token: string;
|
|
34
34
|
session: {
|
|
35
|
-
id: number;
|
|
36
|
-
hash: string;
|
|
37
35
|
created_at: Date;
|
|
36
|
+
id: number;
|
|
38
37
|
updated_at: Date;
|
|
38
|
+
user_id: number;
|
|
39
|
+
hash: string;
|
|
39
40
|
ip_address: string;
|
|
40
41
|
user_agent: string;
|
|
41
|
-
user_id: number;
|
|
42
|
-
expires_at: Date;
|
|
43
42
|
revoked_at: Date | null;
|
|
43
|
+
expires_at: Date;
|
|
44
44
|
};
|
|
45
45
|
}>;
|
|
46
46
|
deleteRefreshTokenCookie(res: any, refreshToken: string): Promise<{
|
|
@@ -66,15 +66,15 @@ export declare class SessionService {
|
|
|
66
66
|
revokeAllOtherSessions(userId: number, sessionId: number): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
67
67
|
revokeAllSessions(userId: number): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
68
68
|
revokeUserSession(userId: number, sessionId: number, locale: string): Promise<{
|
|
69
|
-
id: number;
|
|
70
|
-
hash: string;
|
|
71
69
|
created_at: Date;
|
|
70
|
+
id: number;
|
|
72
71
|
updated_at: Date;
|
|
72
|
+
user_id: number;
|
|
73
|
+
hash: string;
|
|
73
74
|
ip_address: string;
|
|
74
75
|
user_agent: string;
|
|
75
|
-
user_id: number;
|
|
76
|
-
expires_at: Date;
|
|
77
76
|
revoked_at: Date | null;
|
|
77
|
+
expires_at: Date;
|
|
78
78
|
}>;
|
|
79
79
|
/**
|
|
80
80
|
* Enforce maximum concurrent sessions limit for a user.
|
|
@@ -40,8 +40,8 @@ export declare class SettingsController {
|
|
|
40
40
|
};
|
|
41
41
|
} & {
|
|
42
42
|
value: string | null;
|
|
43
|
-
id: number;
|
|
44
43
|
created_at: Date;
|
|
44
|
+
id: number;
|
|
45
45
|
updated_at: Date;
|
|
46
46
|
user_id: number;
|
|
47
47
|
setting_id: number;
|
|
@@ -60,14 +60,14 @@ export declare class SettingsController {
|
|
|
60
60
|
}>;
|
|
61
61
|
get(settingId: number): Promise<{
|
|
62
62
|
value: string | null;
|
|
63
|
-
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
64
|
-
id: number;
|
|
65
63
|
created_at: Date;
|
|
64
|
+
id: number;
|
|
66
65
|
updated_at: Date;
|
|
67
66
|
slug: string;
|
|
68
|
-
|
|
67
|
+
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
69
68
|
component: import("@prisma/client").$Enums.setting_component_6e72a03bda_enum;
|
|
70
69
|
user_override: boolean;
|
|
70
|
+
group_id: number;
|
|
71
71
|
subgroup_id: number | null;
|
|
72
72
|
}>;
|
|
73
73
|
importSettings(locale: string, file: MulterFile): Promise<{
|
|
@@ -83,14 +83,14 @@ export declare class SettingsController {
|
|
|
83
83
|
}>;
|
|
84
84
|
create(locale: string, data: CreateDTO): Promise<{
|
|
85
85
|
value: string | null;
|
|
86
|
-
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
87
|
-
id: number;
|
|
88
86
|
created_at: Date;
|
|
87
|
+
id: number;
|
|
89
88
|
updated_at: Date;
|
|
90
89
|
slug: string;
|
|
91
|
-
|
|
90
|
+
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
92
91
|
component: import("@prisma/client").$Enums.setting_component_6e72a03bda_enum;
|
|
93
92
|
user_override: boolean;
|
|
93
|
+
group_id: number;
|
|
94
94
|
subgroup_id: number | null;
|
|
95
95
|
}>;
|
|
96
96
|
updateUserFromSlug(slug: string, { value }: SettingUserDTO, { id }: {
|
|
@@ -102,14 +102,14 @@ export declare class SettingsController {
|
|
|
102
102
|
}>;
|
|
103
103
|
updateFromSlug(slug: string, data: UpdateDTO): Promise<{
|
|
104
104
|
value: string | null;
|
|
105
|
-
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
106
|
-
id: number;
|
|
107
105
|
created_at: Date;
|
|
106
|
+
id: number;
|
|
108
107
|
updated_at: Date;
|
|
109
108
|
slug: string;
|
|
110
|
-
|
|
109
|
+
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
111
110
|
component: import("@prisma/client").$Enums.setting_component_6e72a03bda_enum;
|
|
112
111
|
user_override: boolean;
|
|
112
|
+
group_id: number;
|
|
113
113
|
subgroup_id: number | null;
|
|
114
114
|
}>;
|
|
115
115
|
setManySettings(data: SettingDTO): Promise<{
|
|
@@ -117,14 +117,14 @@ export declare class SettingsController {
|
|
|
117
117
|
}>;
|
|
118
118
|
update(settingId: number, data: UpdateDTO): Promise<{
|
|
119
119
|
value: string | null;
|
|
120
|
-
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
121
|
-
id: number;
|
|
122
120
|
created_at: Date;
|
|
121
|
+
id: number;
|
|
123
122
|
updated_at: Date;
|
|
124
123
|
slug: string;
|
|
125
|
-
|
|
124
|
+
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
126
125
|
component: import("@prisma/client").$Enums.setting_component_6e72a03bda_enum;
|
|
127
126
|
user_override: boolean;
|
|
127
|
+
group_id: number;
|
|
128
128
|
subgroup_id: number | null;
|
|
129
129
|
}>;
|
|
130
130
|
delete(locale: string, data: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
@@ -63,26 +63,26 @@ export declare class SettingService {
|
|
|
63
63
|
}>;
|
|
64
64
|
get(settingId: number): Promise<{
|
|
65
65
|
value: string | null;
|
|
66
|
-
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
67
|
-
id: number;
|
|
68
66
|
created_at: Date;
|
|
67
|
+
id: number;
|
|
69
68
|
updated_at: Date;
|
|
70
69
|
slug: string;
|
|
71
|
-
|
|
70
|
+
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
72
71
|
component: import("@prisma/client").$Enums.setting_component_6e72a03bda_enum;
|
|
73
72
|
user_override: boolean;
|
|
73
|
+
group_id: number;
|
|
74
74
|
subgroup_id: number | null;
|
|
75
75
|
}>;
|
|
76
76
|
create(data: CreateDTO, _locale: string): Promise<{
|
|
77
77
|
value: string | null;
|
|
78
|
-
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
79
|
-
id: number;
|
|
80
78
|
created_at: Date;
|
|
79
|
+
id: number;
|
|
81
80
|
updated_at: Date;
|
|
82
81
|
slug: string;
|
|
83
|
-
|
|
82
|
+
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
84
83
|
component: import("@prisma/client").$Enums.setting_component_6e72a03bda_enum;
|
|
85
84
|
user_override: boolean;
|
|
85
|
+
group_id: number;
|
|
86
86
|
subgroup_id: number | null;
|
|
87
87
|
}>;
|
|
88
88
|
update({ id, data }: {
|
|
@@ -90,26 +90,26 @@ export declare class SettingService {
|
|
|
90
90
|
data: UpdateDTO;
|
|
91
91
|
}): Promise<{
|
|
92
92
|
value: string | null;
|
|
93
|
-
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
94
|
-
id: number;
|
|
95
93
|
created_at: Date;
|
|
94
|
+
id: number;
|
|
96
95
|
updated_at: Date;
|
|
97
96
|
slug: string;
|
|
98
|
-
|
|
97
|
+
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
99
98
|
component: import("@prisma/client").$Enums.setting_component_6e72a03bda_enum;
|
|
100
99
|
user_override: boolean;
|
|
100
|
+
group_id: number;
|
|
101
101
|
subgroup_id: number | null;
|
|
102
102
|
}>;
|
|
103
103
|
updateFromSlug(slug: string, data: UpdateDTO): Promise<{
|
|
104
104
|
value: string | null;
|
|
105
|
-
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
106
|
-
id: number;
|
|
107
105
|
created_at: Date;
|
|
106
|
+
id: number;
|
|
108
107
|
updated_at: Date;
|
|
109
108
|
slug: string;
|
|
110
|
-
|
|
109
|
+
type: import("@prisma/client").$Enums.setting_type_0f055cd5ea_enum;
|
|
111
110
|
component: import("@prisma/client").$Enums.setting_component_6e72a03bda_enum;
|
|
112
111
|
user_override: boolean;
|
|
112
|
+
group_id: number;
|
|
113
113
|
subgroup_id: number | null;
|
|
114
114
|
}>;
|
|
115
115
|
private normalizeValueForComparison;
|
|
@@ -132,8 +132,8 @@ export declare class SettingService {
|
|
|
132
132
|
};
|
|
133
133
|
} & {
|
|
134
134
|
value: string | null;
|
|
135
|
-
id: number;
|
|
136
135
|
created_at: Date;
|
|
136
|
+
id: number;
|
|
137
137
|
updated_at: Date;
|
|
138
138
|
user_id: number;
|
|
139
139
|
setting_id: number;
|