@solidxai/core 0.1.10-beta.10 → 0.1.10-beta.12
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/.claude/settings.local.json +15 -0
- package/CLAUDE.md +18 -0
- package/CURRENT_PROMPT +6 -0
- package/dist/commands/refresh-model.command.d.ts +1 -7
- package/dist/commands/refresh-model.command.d.ts.map +1 -1
- package/dist/commands/refresh-model.command.js +4 -49
- package/dist/commands/refresh-model.command.js.map +1 -1
- package/dist/commands/refresh-module.command.d.ts +0 -2
- package/dist/commands/refresh-module.command.d.ts.map +1 -1
- package/dist/commands/refresh-module.command.js +3 -16
- package/dist/commands/refresh-module.command.js.map +1 -1
- package/dist/controllers/mcp-audit-log.controller.d.ts +35 -0
- package/dist/controllers/mcp-audit-log.controller.d.ts.map +1 -0
- package/dist/controllers/mcp-audit-log.controller.js +147 -0
- package/dist/controllers/mcp-audit-log.controller.js.map +1 -0
- package/dist/controllers/model-metadata.controller.d.ts +1 -1
- package/dist/controllers/model-metadata.controller.js +2 -2
- package/dist/controllers/model-metadata.controller.js.map +1 -1
- package/dist/controllers/module-metadata.controller.js +1 -1
- package/dist/controllers/module-metadata.controller.js.map +1 -1
- package/dist/dtos/create-mcp-audit-log.dto.d.ts +19 -0
- package/dist/dtos/create-mcp-audit-log.dto.d.ts.map +1 -0
- package/dist/dtos/create-mcp-audit-log.dto.js +118 -0
- package/dist/dtos/create-mcp-audit-log.dto.js.map +1 -0
- package/dist/dtos/update-mcp-audit-log.dto.d.ts +19 -0
- package/dist/dtos/update-mcp-audit-log.dto.d.ts.map +1 -0
- package/dist/dtos/update-mcp-audit-log.dto.js +117 -0
- package/dist/dtos/update-mcp-audit-log.dto.js.map +1 -0
- package/dist/entities/mcp-audit-log.entity.d.ts +19 -0
- package/dist/entities/mcp-audit-log.entity.d.ts.map +1 -0
- package/dist/entities/mcp-audit-log.entity.js +90 -0
- package/dist/entities/mcp-audit-log.entity.js.map +1 -0
- package/dist/helpers/command.service.d.ts +1 -0
- package/dist/helpers/command.service.d.ts.map +1 -1
- package/dist/helpers/command.service.js +1 -0
- package/dist/helpers/command.service.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +0 -2
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/repository/mcp-audit-log.repository.d.ts +12 -0
- package/dist/repository/mcp-audit-log.repository.d.ts.map +1 -0
- package/dist/repository/mcp-audit-log.repository.js +34 -0
- package/dist/repository/mcp-audit-log.repository.js.map +1 -0
- package/dist/seeders/seed-data/solid-core-metadata.json +346 -0
- package/dist/services/mcp-audit-log.service.d.ts +12 -0
- package/dist/services/mcp-audit-log.service.d.ts.map +1 -0
- package/dist/services/mcp-audit-log.service.js +38 -0
- package/dist/services/mcp-audit-log.service.js.map +1 -0
- package/dist/services/model-metadata.service.d.ts +4 -1
- package/dist/services/model-metadata.service.d.ts.map +1 -1
- package/dist/services/model-metadata.service.js +21 -11
- package/dist/services/model-metadata.service.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts +4 -1
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +19 -2
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +8 -0
- package/dist/solid-core.module.js.map +1 -1
- package/package.json +4 -8
- package/src/commands/refresh-model.command.ts +6 -51
- package/src/commands/refresh-module.command.ts +3 -16
- package/src/controllers/mcp-audit-log.controller.ts +70 -0
- package/src/controllers/model-metadata.controller.ts +1 -1
- package/src/controllers/module-metadata.controller.ts +1 -1
- package/src/dtos/create-mcp-audit-log.dto.ts +84 -0
- package/src/dtos/update-mcp-audit-log.dto.ts +83 -0
- package/src/entities/mcp-audit-log.entity.ts +55 -0
- package/src/helpers/command.service.ts +2 -0
- package/src/index.ts +4 -0
- package/src/interfaces.ts +0 -2
- package/src/repository/mcp-audit-log.repository.ts +17 -0
- package/src/seeders/seed-data/solid-core-metadata.json +346 -0
- package/src/services/1.js +6 -0
- package/src/services/mcp-audit-log.service.ts +19 -0
- package/src/services/model-metadata.service.ts +14 -13
- package/src/services/module-metadata.service.ts +12 -0
- package/src/solid-core.module.ts +8 -0
- package/dist-tests/api/authenticate.spec.js +0 -119
- package/dist-tests/api/authenticate.spec.js.map +0 -1
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +0 -97
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +0 -1
- package/dist-tests/api/ping.spec.js +0 -21
- package/dist-tests/api/ping.spec.js.map +0 -1
- package/dist-tests/helpers/auth.js +0 -41
- package/dist-tests/helpers/auth.js.map +0 -1
- package/dist-tests/helpers/env.js +0 -11
- package/dist-tests/helpers/env.js.map +0 -1
- package/docs/grouping-enhancements.md +0 -89
- package/docs/java-spring/README.md +0 -3
- package/docs/java-spring/solid-core-module-deep-dive-report.md +0 -1317
- package/docs/seed-changes.md +0 -65
- package/docs/test-data-workflow.md +0 -200
- package/docs/type-declaration-import-issue.md +0 -24
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(node -e:*)",
|
|
5
|
+
"WebFetch(domain:docs.solidxai.com)",
|
|
6
|
+
"WebFetch(domain:github.com)",
|
|
7
|
+
"Read(//Users/oswald/projects/Solid_Starters/solidctl/**)",
|
|
8
|
+
"Read(//Users/oswald/projects/Solid_Starters/**)",
|
|
9
|
+
"Bash(find /Users/oswald/projects/Solid_Starters/solid-core-module -type d -name migration* -o -name *database*)"
|
|
10
|
+
],
|
|
11
|
+
"additionalDirectories": [
|
|
12
|
+
"/Users/oswald/projects/Solid_Starters/solidctl"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# This is the SolidX API project.
|
|
2
|
+
This is included as a dependency in consuming projects.
|
|
3
|
+
|
|
4
|
+
# SolidX UI
|
|
5
|
+
# The corresponding UI project is at the below path:
|
|
6
|
+
/Users/oswald/projects/Solid_Starters/solid-core-ui
|
|
7
|
+
|
|
8
|
+
# SolidX Docs
|
|
9
|
+
# The documentation project is at the below path:
|
|
10
|
+
/Users/oswald/projects/solidxai-docs
|
|
11
|
+
|
|
12
|
+
# SolidX Agent
|
|
13
|
+
# The agent project which has the skills for helping users configure, build and use SolidX is at the below path:
|
|
14
|
+
/Users/oswald/projects/Solid_Starters/agent
|
|
15
|
+
|
|
16
|
+
# SolidX Control Plane Commands
|
|
17
|
+
# The control plane commands for managing SolidX instances are in the below path:
|
|
18
|
+
/Users/oswald/projects/Solid_Starters/solidctl
|
package/CURRENT_PROMPT
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Have a look at the generate command in the control plane project. It generates code i.e boilerplate for modules and models. For the generation of api code is delegate to the solid cli in the api project.
|
|
2
|
+
|
|
3
|
+
The modelMetadataService generateCode and moduleMetadataService generateCode are what are called eventually. These are called from both the refresh-model and refresh-module commands and the controllers for module-metadata and model-metadata.
|
|
4
|
+
|
|
5
|
+
Change the code in schematic service to use the solidctl generate command instead of using the schematic command directly. This will ensure that the code generation is consistent and follows the same patterns as the rest of the project.
|
|
6
|
+
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { CommandRunner } from 'nest-commander';
|
|
2
2
|
import { ModelMetadataService } from '../services/model-metadata.service';
|
|
3
3
|
interface CommandOptions {
|
|
4
|
-
name
|
|
5
|
-
id?: number;
|
|
6
|
-
fieldIds?: number[];
|
|
7
|
-
fieldNames?: string[];
|
|
4
|
+
name: string;
|
|
8
5
|
dryRun?: boolean;
|
|
9
6
|
}
|
|
10
7
|
export declare class RefreshModelCommand extends CommandRunner {
|
|
@@ -12,11 +9,8 @@ export declare class RefreshModelCommand extends CommandRunner {
|
|
|
12
9
|
constructor(modelMetadataService: ModelMetadataService);
|
|
13
10
|
private readonly logger;
|
|
14
11
|
run(_passedParam: string[], options?: CommandOptions): Promise<void>;
|
|
15
|
-
parseId(val: string): number;
|
|
16
12
|
parseName(val: string): string;
|
|
17
13
|
parseDryRun(val: string): boolean;
|
|
18
|
-
parseFieldIds(val: string): number[];
|
|
19
|
-
parseFieldNames(val: string): string[];
|
|
20
14
|
private validate;
|
|
21
15
|
}
|
|
22
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-model.command.d.ts","sourceRoot":"","sources":["../../src/commands/refresh-model.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"refresh-model.command.d.ts","sourceRoot":"","sources":["../../src/commands/refresh-model.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,qBAIa,mBAAoB,SAAQ,aAAa;IAGlD,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAI7D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;IAEzD,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB1E,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAQ9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKjC,OAAO,CAAC,QAAQ;CAOjB"}
|
|
@@ -31,17 +31,11 @@ let RefreshModelCommand = RefreshModelCommand_1 = class RefreshModelCommand exte
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
const codeGenerationOptions = {
|
|
34
|
-
modelId: options.id,
|
|
35
34
|
modelUserKey: options.name,
|
|
36
35
|
dryRun: options.dryRun,
|
|
37
|
-
fieldIdsForRefresh: options.fieldIds,
|
|
38
|
-
fieldNamesForRefresh: options.fieldNames,
|
|
39
36
|
};
|
|
40
37
|
await this.modelMetadataService.handleGenerateCode(codeGenerationOptions);
|
|
41
38
|
}
|
|
42
|
-
parseId(val) {
|
|
43
|
-
return +val;
|
|
44
|
-
}
|
|
45
39
|
parseName(val) {
|
|
46
40
|
return val;
|
|
47
41
|
}
|
|
@@ -49,21 +43,9 @@ let RefreshModelCommand = RefreshModelCommand_1 = class RefreshModelCommand exte
|
|
|
49
43
|
this.logger.debug(`Dry run : ${val}`);
|
|
50
44
|
return (val === 'false') ? false : true;
|
|
51
45
|
}
|
|
52
|
-
parseFieldIds(val) {
|
|
53
|
-
if (!val.startsWith('[') || !val.endsWith(']')) {
|
|
54
|
-
throw new common_1.BadRequestException('Field IDs should be a json array');
|
|
55
|
-
}
|
|
56
|
-
return JSON.parse(val).map((id) => parseInt(id));
|
|
57
|
-
}
|
|
58
|
-
parseFieldNames(val) {
|
|
59
|
-
if (!val.startsWith('[') || !val.endsWith(']')) {
|
|
60
|
-
throw new common_1.BadRequestException('Field Names should be a json array');
|
|
61
|
-
}
|
|
62
|
-
return JSON.parse(val).map((name) => name.toString());
|
|
63
|
-
}
|
|
64
46
|
validate(options) {
|
|
65
|
-
if (!options.
|
|
66
|
-
return [new helper_1.CommandError('Model
|
|
47
|
+
if (!options.name) {
|
|
48
|
+
return [new helper_1.CommandError('Model Name is required')];
|
|
67
49
|
}
|
|
68
50
|
return [];
|
|
69
51
|
}
|
|
@@ -71,17 +53,8 @@ let RefreshModelCommand = RefreshModelCommand_1 = class RefreshModelCommand exte
|
|
|
71
53
|
exports.RefreshModelCommand = RefreshModelCommand;
|
|
72
54
|
__decorate([
|
|
73
55
|
(0, nest_commander_1.Option)({
|
|
74
|
-
flags: '-
|
|
75
|
-
description: 'Model
|
|
76
|
-
}),
|
|
77
|
-
__metadata("design:type", Function),
|
|
78
|
-
__metadata("design:paramtypes", [String]),
|
|
79
|
-
__metadata("design:returntype", Number)
|
|
80
|
-
], RefreshModelCommand.prototype, "parseId", null);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, nest_commander_1.Option)({
|
|
83
|
-
flags: '-n, --name [model name]',
|
|
84
|
-
description: 'Model Name from the ss_model_metadata table',
|
|
56
|
+
flags: '-n, --name <model name>',
|
|
57
|
+
description: 'Model name (singularName) from the ss_model_metadata table',
|
|
85
58
|
}),
|
|
86
59
|
__metadata("design:type", Function),
|
|
87
60
|
__metadata("design:paramtypes", [String]),
|
|
@@ -96,24 +69,6 @@ __decorate([
|
|
|
96
69
|
__metadata("design:paramtypes", [String]),
|
|
97
70
|
__metadata("design:returntype", Boolean)
|
|
98
71
|
], RefreshModelCommand.prototype, "parseDryRun", null);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, nest_commander_1.Option)({
|
|
101
|
-
flags: '-fids, --fieldIds [Array of field IDs]',
|
|
102
|
-
description: 'Json array of Field IDs from the ss_field_metadata table',
|
|
103
|
-
}),
|
|
104
|
-
__metadata("design:type", Function),
|
|
105
|
-
__metadata("design:paramtypes", [String]),
|
|
106
|
-
__metadata("design:returntype", Array)
|
|
107
|
-
], RefreshModelCommand.prototype, "parseFieldIds", null);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, nest_commander_1.Option)({
|
|
110
|
-
flags: '-fnames, --fieldNames [Array of field Names]',
|
|
111
|
-
description: 'Json array of Field Names from the ss_field_metadata table',
|
|
112
|
-
}),
|
|
113
|
-
__metadata("design:type", Function),
|
|
114
|
-
__metadata("design:paramtypes", [String]),
|
|
115
|
-
__metadata("design:returntype", Array)
|
|
116
|
-
], RefreshModelCommand.prototype, "parseFieldNames", null);
|
|
117
72
|
exports.RefreshModelCommand = RefreshModelCommand = RefreshModelCommand_1 = __decorate([
|
|
118
73
|
(0, nest_commander_1.Command)({
|
|
119
74
|
name: 'refresh-model',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-model.command.js","sourceRoot":"","sources":["../../src/commands/refresh-model.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"refresh-model.command.js","sourceRoot":"","sources":["../../src/commands/refresh-model.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA4D;AAC5D,mDAAgE;AAChE,+EAA2E;AAC3E,qCAAwC;AAWjC,IAAM,mBAAmB,2BAAzB,MAAM,mBAAoB,SAAQ,8BAAa;IACpD,YAEE,oBAA2D;QAE3D,KAAK,EAAE,CAAC;QAFS,yBAAoB,GAApB,oBAAoB,CAAsB;QAI5C,WAAM,GAAG,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IAD/D,CAAC;IAGD,KAAK,CAAC,GAAG,CAAC,YAAsB,EAAE,OAAwB;QACxD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YACpD,OAAO;QACT,CAAC;QAED,MAAM,qBAAqB,GAAG;YAC5B,YAAY,EAAE,OAAO,CAAC,IAAI;YAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC;QACF,MAAM,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;IAC5E,CAAC;IAMD,SAAS,CAAC,GAAW;QACnB,OAAO,GAAG,CAAC;IACb,CAAC;IAMD,WAAW,CAAC,GAAW;QACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;QACtC,OAAO,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1C,CAAC;IAEO,QAAQ,CAAC,OAAuB;QACtC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,qBAAY,CAAC,wBAAwB,CAAC,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CAEF,CAAA;AA/CY,kDAAmB;AA2B9B;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,4DAA4D;KAC1E,CAAC;;;;oDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,qBAAqB;KACnC,CAAC;;;;sDAID;8BAtCU,mBAAmB;IAJ/B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,0EAA0E;KACxF,CAAC;IAGG,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC,CAAC,CAAA;qCACR,6CAAoB;GAHlD,mBAAmB,CA+C/B","sourcesContent":["import { forwardRef, Inject, Logger } from '@nestjs/common';\nimport { Command, CommandRunner, Option } from 'nest-commander';\nimport { ModelMetadataService } from 'src/services/model-metadata.service';\nimport { CommandError } from './helper';\n\ninterface CommandOptions {\n name: string;\n dryRun?: boolean;\n}\n\n@Command({\n name: 'refresh-model',\n description: 'Updates a model and its fields i.e (entity,dto,service,controller files)',\n})\nexport class RefreshModelCommand extends CommandRunner {\n constructor(\n @Inject(forwardRef(() => ModelMetadataService))\n private readonly modelMetadataService: ModelMetadataService,\n ) {\n super();\n }\n private readonly logger = new Logger(RefreshModelCommand.name);\n\n async run(_passedParam: string[], options?: CommandOptions): Promise<void> {\n const errors = this.validate(options);\n if (errors.length) {\n errors.forEach((error) => this.logger.error(error));\n return;\n }\n\n const codeGenerationOptions = {\n modelUserKey: options.name,\n dryRun: options.dryRun,\n };\n await this.modelMetadataService.handleGenerateCode(codeGenerationOptions);\n }\n\n @Option({\n flags: '-n, --name <model name>',\n description: 'Model name (singularName) from the ss_model_metadata table',\n })\n parseName(val: string): string {\n return val;\n }\n\n @Option({\n flags: '-d, --dryRun [dry run]',\n description: 'Dry run the command',\n })\n parseDryRun(val: string): boolean {\n this.logger.debug(`Dry run : ${val}`);\n return (val === 'false') ? false : true;\n }\n\n private validate(options: CommandOptions): CommandError[] {\n if (!options.name) {\n return [new CommandError('Model Name is required')];\n }\n return [];\n }\n\n}\n"]}
|
|
@@ -2,7 +2,6 @@ import { CommandRunner } from 'nest-commander';
|
|
|
2
2
|
import { ModuleMetadataService } from '../services/module-metadata.service';
|
|
3
3
|
import { CommandError } from './helper';
|
|
4
4
|
interface CommandOptions {
|
|
5
|
-
id: number;
|
|
6
5
|
name: string;
|
|
7
6
|
dryRun: boolean;
|
|
8
7
|
}
|
|
@@ -11,7 +10,6 @@ export declare class RefreshModuleCommand extends CommandRunner {
|
|
|
11
10
|
constructor(moduleMetadataService: ModuleMetadataService);
|
|
12
11
|
private readonly logger;
|
|
13
12
|
run(_passedParam: string[], options?: CommandOptions): Promise<void>;
|
|
14
|
-
parseId(val: string): number;
|
|
15
13
|
parseName(val: string): string;
|
|
16
14
|
parseDryRun(val: string): boolean;
|
|
17
15
|
validate(options: CommandOptions): CommandError[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-module.command.d.ts","sourceRoot":"","sources":["../../src/commands/refresh-module.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,cAAc;IACtB,
|
|
1
|
+
{"version":3,"file":"refresh-module.command.d.ts","sourceRoot":"","sources":["../../src/commands/refresh-module.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,qBAIa,oBAAqB,SAAQ,aAAa;IAEnD,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBAArB,qBAAqB,EAAE,qBAAqB;IAI/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;IAE1D,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB1E,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAQ9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKjC,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,YAAY,EAAE;CAOlD"}
|
|
@@ -28,15 +28,11 @@ let RefreshModuleCommand = RefreshModuleCommand_1 = class RefreshModuleCommand e
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
const codeGenerationOptions = {
|
|
31
|
-
moduleId: options.id,
|
|
32
31
|
moduleUserKey: options.name,
|
|
33
32
|
dryRun: options.dryRun,
|
|
34
33
|
};
|
|
35
34
|
await this.moduleMetadataService.generateCode(codeGenerationOptions);
|
|
36
35
|
}
|
|
37
|
-
parseId(val) {
|
|
38
|
-
return +val;
|
|
39
|
-
}
|
|
40
36
|
parseName(val) {
|
|
41
37
|
return val;
|
|
42
38
|
}
|
|
@@ -45,8 +41,8 @@ let RefreshModuleCommand = RefreshModuleCommand_1 = class RefreshModuleCommand e
|
|
|
45
41
|
return (val === 'false') ? false : true;
|
|
46
42
|
}
|
|
47
43
|
validate(options) {
|
|
48
|
-
if (!options.
|
|
49
|
-
return [new helper_1.CommandError('Module
|
|
44
|
+
if (!options.name) {
|
|
45
|
+
return [new helper_1.CommandError('Module Name is required')];
|
|
50
46
|
}
|
|
51
47
|
return [];
|
|
52
48
|
}
|
|
@@ -54,16 +50,7 @@ let RefreshModuleCommand = RefreshModuleCommand_1 = class RefreshModuleCommand e
|
|
|
54
50
|
exports.RefreshModuleCommand = RefreshModuleCommand;
|
|
55
51
|
__decorate([
|
|
56
52
|
(0, nest_commander_1.Option)({
|
|
57
|
-
flags: '-
|
|
58
|
-
description: 'Module ID from the ss_module_metadata table',
|
|
59
|
-
}),
|
|
60
|
-
__metadata("design:type", Function),
|
|
61
|
-
__metadata("design:paramtypes", [String]),
|
|
62
|
-
__metadata("design:returntype", Number)
|
|
63
|
-
], RefreshModuleCommand.prototype, "parseId", null);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, nest_commander_1.Option)({
|
|
66
|
-
flags: '-n, --name [module name]',
|
|
53
|
+
flags: '-n, --name <module name>',
|
|
67
54
|
description: 'Module Name from the ss_module_metadata table',
|
|
68
55
|
}),
|
|
69
56
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-module.command.js","sourceRoot":"","sources":["../../src/commands/refresh-module.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwC;AACxC,mDAAgE;AAChE,iFAA4E;AAC5E,qCAAwC;
|
|
1
|
+
{"version":3,"file":"refresh-module.command.js","sourceRoot":"","sources":["../../src/commands/refresh-module.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwC;AACxC,mDAAgE;AAChE,iFAA4E;AAC5E,qCAAwC;AAWjC,IAAM,oBAAoB,4BAA1B,MAAM,oBAAqB,SAAQ,8BAAa;IACrD,YACmB,qBAA4C;QAE7D,KAAK,EAAE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M,EAAC;QACN,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,qBAAqB;KACnC,CAAC;;;;uDAID;+BApCU,oBAAoB;IAJhC,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,uFAAuF;KACrG,CAAC;qCAG0C,+CAAqB;GAFpD,oBAAoB,CA6ChC","sourcesContent":["import { Logger } from '@nestjs/common';\nimport { Command, CommandRunner, Option } from 'nest-commander';\nimport { ModuleMetadataService } from '../services/module-metadata.service';\nimport { CommandError } from './helper';\n\ninterface CommandOptions {\n name: string;\n dryRun: boolean;\n}\n\n@Command({\n name: 'refresh-module',\n description: 'Refreshes a module and its model and fields i.e (entity,dto,service,controller files)',\n})\nexport class RefreshModuleCommand extends CommandRunner {\n constructor(\n private readonly moduleMetadataService: ModuleMetadataService,\n ) {\n super();\n }\n private readonly logger = new Logger(RefreshModuleCommand.name);\n\n async run(_passedParam: string[], options?: CommandOptions): Promise<void> {\n const errors = this.validate(options);\n if (errors.length) {\n errors.forEach((error) => this.logger.error(error));\n return;\n }\n const codeGenerationOptions = {\n moduleUserKey: options.name,\n dryRun: options.dryRun,\n };\n await this.moduleMetadataService.generateCode(codeGenerationOptions);\n }\n\n @Option({\n flags: '-n, --name <module name>',\n description: 'Module Name from the ss_module_metadata table',\n })\n parseName(val: string): string {\n return val;\n }\n\n @Option({\n flags: '-d, --dryRun [dry run]',\n description: 'Dry run the command',\n })\n parseDryRun(val: string): boolean {\n this.logger.debug(`Dry run : ${val}`);\n return (val === 'false') ? false : true;\n }\n\n validate(options: CommandOptions): CommandError[] {\n if (!options.name) {\n return [new CommandError('Module Name is required')];\n }\n return [];\n }\n\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CreateMcpAuditLogDto } from '../dtos/create-mcp-audit-log.dto';
|
|
2
|
+
import { UpdateMcpAuditLogDto } from '../dtos/update-mcp-audit-log.dto';
|
|
3
|
+
import { McpAuditLogService } from '../services/mcp-audit-log.service';
|
|
4
|
+
export declare class McpAuditLogController {
|
|
5
|
+
private readonly service;
|
|
6
|
+
constructor(service: McpAuditLogService);
|
|
7
|
+
create(createDto: CreateMcpAuditLogDto, files: Array<Express.Multer.File>): Promise<import("..").McpAuditLog>;
|
|
8
|
+
insertMany(createDtos: CreateMcpAuditLogDto[], filesArray?: Express.Multer.File[][]): Promise<import("..").McpAuditLog[]>;
|
|
9
|
+
update(id: number, updateDto: UpdateMcpAuditLogDto, files: Array<Express.Multer.File>): Promise<import("..").McpAuditLog>;
|
|
10
|
+
partialUpdate(id: number, updateDto: UpdateMcpAuditLogDto, files: Array<Express.Multer.File>): Promise<import("..").McpAuditLog>;
|
|
11
|
+
findMany(query: any): Promise<{
|
|
12
|
+
meta: {
|
|
13
|
+
totalRecords: number;
|
|
14
|
+
};
|
|
15
|
+
groupMeta: any[];
|
|
16
|
+
groupRecords: any[];
|
|
17
|
+
records?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
meta: {
|
|
20
|
+
totalRecords: number;
|
|
21
|
+
currentPage: number;
|
|
22
|
+
nextPage: number;
|
|
23
|
+
prevPage: number;
|
|
24
|
+
totalPages: number;
|
|
25
|
+
perPage: number;
|
|
26
|
+
};
|
|
27
|
+
records: import("..").McpAuditLog[];
|
|
28
|
+
groupMeta?: undefined;
|
|
29
|
+
groupRecords?: undefined;
|
|
30
|
+
}>;
|
|
31
|
+
findOne(id: string, query: any): Promise<import("..").McpAuditLog>;
|
|
32
|
+
deleteMany(ids: number[]): Promise<any>;
|
|
33
|
+
delete(id: number): Promise<import("..").McpAuditLog>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=mcp-audit-log.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-audit-log.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/mcp-audit-log.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,qBAEa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,kBAAkB;IAKxD,MAAM,CAAS,SAAS,EAAE,oBAAoB,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAOlG,UAAU,CAAS,UAAU,EAAE,oBAAoB,EAAE,EAAmB,UAAU,GAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,EAAO;IAOhH,MAAM,CAAc,EAAE,EAAE,MAAM,EAAU,SAAS,EAAE,oBAAoB,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAO3H,aAAa,CAAc,EAAE,EAAE,MAAM,EAAU,SAAS,EAAE,oBAAoB,EAAmB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAYlI,QAAQ,CAAU,KAAK,EAAE,GAAG;;;;;;;;;;;;;;;;;;;;IAM5B,OAAO,CAAc,EAAE,EAAE,MAAM,EAAW,KAAK,EAAE,GAAG;IAMpD,UAAU,CAAS,GAAG,EAAE,MAAM,EAAE;IAMhC,MAAM,CAAc,EAAE,EAAE,MAAM;CAG/B"}
|
|
@@ -0,0 +1,147 @@
|
|
|
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.McpAuditLogController = void 0;
|
|
16
|
+
const openapi = require("@nestjs/swagger");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const platform_express_1 = require("@nestjs/platform-express");
|
|
19
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
20
|
+
const create_mcp_audit_log_dto_1 = require("../dtos/create-mcp-audit-log.dto");
|
|
21
|
+
const update_mcp_audit_log_dto_1 = require("../dtos/update-mcp-audit-log.dto");
|
|
22
|
+
const mcp_audit_log_service_1 = require("../services/mcp-audit-log.service");
|
|
23
|
+
let McpAuditLogController = class McpAuditLogController {
|
|
24
|
+
constructor(service) {
|
|
25
|
+
this.service = service;
|
|
26
|
+
}
|
|
27
|
+
create(createDto, files) {
|
|
28
|
+
return this.service.create(createDto, files);
|
|
29
|
+
}
|
|
30
|
+
insertMany(createDtos, filesArray = []) {
|
|
31
|
+
return this.service.insertMany(createDtos, filesArray);
|
|
32
|
+
}
|
|
33
|
+
update(id, updateDto, files) {
|
|
34
|
+
return this.service.update(id, updateDto, files);
|
|
35
|
+
}
|
|
36
|
+
partialUpdate(id, updateDto, files) {
|
|
37
|
+
return this.service.update(id, updateDto, files, true);
|
|
38
|
+
}
|
|
39
|
+
findMany(query) {
|
|
40
|
+
return this.service.find(query);
|
|
41
|
+
}
|
|
42
|
+
findOne(id, query) {
|
|
43
|
+
return this.service.findOne(+id, query);
|
|
44
|
+
}
|
|
45
|
+
deleteMany(ids) {
|
|
46
|
+
return this.service.deleteMany(ids);
|
|
47
|
+
}
|
|
48
|
+
delete(id) {
|
|
49
|
+
return this.service.delete(id);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.McpAuditLogController = McpAuditLogController;
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
55
|
+
(0, common_1.Post)(),
|
|
56
|
+
(0, common_1.UseInterceptors)((0, platform_express_1.AnyFilesInterceptor)()),
|
|
57
|
+
openapi.ApiResponse({ status: 201, type: require("../entities/mcp-audit-log.entity").McpAuditLog }),
|
|
58
|
+
__param(0, (0, common_1.Body)()),
|
|
59
|
+
__param(1, (0, common_1.UploadedFiles)()),
|
|
60
|
+
__metadata("design:type", Function),
|
|
61
|
+
__metadata("design:paramtypes", [create_mcp_audit_log_dto_1.CreateMcpAuditLogDto, Array]),
|
|
62
|
+
__metadata("design:returntype", void 0)
|
|
63
|
+
], McpAuditLogController.prototype, "create", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
66
|
+
(0, common_1.Post)('/bulk'),
|
|
67
|
+
(0, common_1.UseInterceptors)((0, platform_express_1.AnyFilesInterceptor)()),
|
|
68
|
+
openapi.ApiResponse({ status: 201, type: [require("../entities/mcp-audit-log.entity").McpAuditLog] }),
|
|
69
|
+
__param(0, (0, common_1.Body)()),
|
|
70
|
+
__param(1, (0, common_1.UploadedFiles)()),
|
|
71
|
+
__metadata("design:type", Function),
|
|
72
|
+
__metadata("design:paramtypes", [Array, Array]),
|
|
73
|
+
__metadata("design:returntype", void 0)
|
|
74
|
+
], McpAuditLogController.prototype, "insertMany", null);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
77
|
+
(0, common_1.Put)(':id'),
|
|
78
|
+
(0, common_1.UseInterceptors)((0, platform_express_1.AnyFilesInterceptor)()),
|
|
79
|
+
openapi.ApiResponse({ status: 200, type: require("../entities/mcp-audit-log.entity").McpAuditLog }),
|
|
80
|
+
__param(0, (0, common_1.Param)('id')),
|
|
81
|
+
__param(1, (0, common_1.Body)()),
|
|
82
|
+
__param(2, (0, common_1.UploadedFiles)()),
|
|
83
|
+
__metadata("design:type", Function),
|
|
84
|
+
__metadata("design:paramtypes", [Number, update_mcp_audit_log_dto_1.UpdateMcpAuditLogDto, Array]),
|
|
85
|
+
__metadata("design:returntype", void 0)
|
|
86
|
+
], McpAuditLogController.prototype, "update", null);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
89
|
+
(0, common_1.Patch)(':id'),
|
|
90
|
+
(0, common_1.UseInterceptors)((0, platform_express_1.AnyFilesInterceptor)()),
|
|
91
|
+
openapi.ApiResponse({ status: 200, type: require("../entities/mcp-audit-log.entity").McpAuditLog }),
|
|
92
|
+
__param(0, (0, common_1.Param)('id')),
|
|
93
|
+
__param(1, (0, common_1.Body)()),
|
|
94
|
+
__param(2, (0, common_1.UploadedFiles)()),
|
|
95
|
+
__metadata("design:type", Function),
|
|
96
|
+
__metadata("design:paramtypes", [Number, update_mcp_audit_log_dto_1.UpdateMcpAuditLogDto, Array]),
|
|
97
|
+
__metadata("design:returntype", void 0)
|
|
98
|
+
], McpAuditLogController.prototype, "partialUpdate", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
101
|
+
(0, swagger_1.ApiQuery)({ name: 'limit', required: false, type: Number }),
|
|
102
|
+
(0, swagger_1.ApiQuery)({ name: 'offset', required: false, type: Number }),
|
|
103
|
+
(0, swagger_1.ApiQuery)({ name: 'fields', required: false, type: Array }),
|
|
104
|
+
(0, swagger_1.ApiQuery)({ name: 'sort', required: false, type: Array }),
|
|
105
|
+
(0, swagger_1.ApiQuery)({ name: 'populate', required: false, type: Array }),
|
|
106
|
+
(0, swagger_1.ApiQuery)({ name: 'filters', required: false, type: Array }),
|
|
107
|
+
(0, common_1.Get)(),
|
|
108
|
+
openapi.ApiResponse({ status: 200, type: Object }),
|
|
109
|
+
__param(0, (0, common_1.Query)()),
|
|
110
|
+
__metadata("design:type", Function),
|
|
111
|
+
__metadata("design:paramtypes", [Object]),
|
|
112
|
+
__metadata("design:returntype", void 0)
|
|
113
|
+
], McpAuditLogController.prototype, "findMany", null);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
116
|
+
(0, common_1.Get)(':id'),
|
|
117
|
+
openapi.ApiResponse({ status: 200, type: require("../entities/mcp-audit-log.entity").McpAuditLog }),
|
|
118
|
+
__param(0, (0, common_1.Param)('id')),
|
|
119
|
+
__param(1, (0, common_1.Query)()),
|
|
120
|
+
__metadata("design:type", Function),
|
|
121
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
122
|
+
__metadata("design:returntype", void 0)
|
|
123
|
+
], McpAuditLogController.prototype, "findOne", null);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
126
|
+
(0, common_1.Delete)('/bulk'),
|
|
127
|
+
openapi.ApiResponse({ status: 200, type: Object }),
|
|
128
|
+
__param(0, (0, common_1.Body)()),
|
|
129
|
+
__metadata("design:type", Function),
|
|
130
|
+
__metadata("design:paramtypes", [Array]),
|
|
131
|
+
__metadata("design:returntype", void 0)
|
|
132
|
+
], McpAuditLogController.prototype, "deleteMany", null);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
135
|
+
(0, common_1.Delete)(':id'),
|
|
136
|
+
openapi.ApiResponse({ status: 200, type: require("../entities/mcp-audit-log.entity").McpAuditLog }),
|
|
137
|
+
__param(0, (0, common_1.Param)('id')),
|
|
138
|
+
__metadata("design:type", Function),
|
|
139
|
+
__metadata("design:paramtypes", [Number]),
|
|
140
|
+
__metadata("design:returntype", void 0)
|
|
141
|
+
], McpAuditLogController.prototype, "delete", null);
|
|
142
|
+
exports.McpAuditLogController = McpAuditLogController = __decorate([
|
|
143
|
+
(0, swagger_1.ApiTags)('Solid Core'),
|
|
144
|
+
(0, common_1.Controller)('mcp-audit-log'),
|
|
145
|
+
__metadata("design:paramtypes", [mcp_audit_log_service_1.McpAuditLogService])
|
|
146
|
+
], McpAuditLogController);
|
|
147
|
+
//# sourceMappingURL=mcp-audit-log.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-audit-log.controller.js","sourceRoot":"","sources":["../../src/controllers/mcp-audit-log.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA+H;AAC/H,+DAA+D;AAC/D,6CAAmE;AACnE,+EAAyE;AACzE,+EAAyE;AACzE,6EAAwE;AAIjE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YAA6B,OAA2B;QAA3B,YAAO,GAAP,OAAO,CAAoB;IAAG,CAAC;IAK5D,MAAM,CAAS,SAA+B,EAAmB,KAAiC;QAChG,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAKD,UAAU,CAAS,UAAkC,EAAmB,aAAsC,EAAE;QAC9G,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACzD,CAAC;IAKD,MAAM,CAAc,EAAU,EAAU,SAA+B,EAAmB,KAAiC;QACzH,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;IAKD,aAAa,CAAc,EAAU,EAAU,SAA+B,EAAmB,KAAiC;QAChI,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAUD,QAAQ,CAAU,KAAU;QAC1B,OAAO,IAAI,CA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,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,OAAO,CAAC;;IACJ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;uDAEjB;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,KAAK,CAAC;;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;mDAElB;gCA3DU,qBAAqB;IAFjC,IAAA,iBAAO,EAAC,YAAY,CAAC;IACrB,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAEY,0CAAkB;GAD7C,qBAAqB,CA4DjC","sourcesContent":["import { Body, Controller, Delete, Get, Param, Patch, Post, Put, Query, UploadedFiles, UseInterceptors } from '@nestjs/common';\nimport { AnyFilesInterceptor } from '@nestjs/platform-express';\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { CreateMcpAuditLogDto } from 'src/dtos/create-mcp-audit-log.dto';\nimport { UpdateMcpAuditLogDto } from 'src/dtos/update-mcp-audit-log.dto';\nimport { McpAuditLogService } from 'src/services/mcp-audit-log.service';\n\n@ApiTags('Solid Core')\n@Controller('mcp-audit-log')\nexport class McpAuditLogController {\n constructor(private readonly service: McpAuditLogService) {}\n\n @ApiBearerAuth('jwt')\n @Post()\n @UseInterceptors(AnyFilesInterceptor())\n create(@Body() createDto: CreateMcpAuditLogDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.create(createDto, files);\n }\n\n @ApiBearerAuth('jwt')\n @Post('/bulk')\n @UseInterceptors(AnyFilesInterceptor())\n insertMany(@Body() createDtos: CreateMcpAuditLogDto[], @UploadedFiles() filesArray: Express.Multer.File[][] = []) {\n return this.service.insertMany(createDtos, filesArray);\n }\n\n @ApiBearerAuth('jwt')\n @Put(':id')\n @UseInterceptors(AnyFilesInterceptor())\n update(@Param('id') id: number, @Body() updateDto: UpdateMcpAuditLogDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, updateDto, files);\n }\n\n @ApiBearerAuth('jwt')\n @Patch(':id')\n @UseInterceptors(AnyFilesInterceptor())\n partialUpdate(@Param('id') id: number, @Body() updateDto: UpdateMcpAuditLogDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.service.update(id, updateDto, files, true);\n }\n\n @ApiBearerAuth('jwt')\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n @Get()\n findMany(@Query() query: any) {\n return this.service.find(query);\n }\n\n @ApiBearerAuth('jwt')\n @Get(':id')\n findOne(@Param('id') id: string, @Query() query: any) {\n return this.service.findOne(+id, query);\n }\n\n @ApiBearerAuth('jwt')\n @Delete('/bulk')\n deleteMany(@Body() ids: number[]) {\n return this.service.deleteMany(ids);\n }\n\n @ApiBearerAuth('jwt')\n @Delete(':id')\n delete(@Param('id') id: number) {\n return this.service.delete(id);\n }\n}\n"]}
|
|
@@ -59,7 +59,7 @@ export declare class ModelMetadataController {
|
|
|
59
59
|
message: string;
|
|
60
60
|
success: boolean;
|
|
61
61
|
}>;
|
|
62
|
-
generateCode(id: number): Promise<
|
|
62
|
+
generateCode(id: number): Promise<string>;
|
|
63
63
|
update(id: number, updateModelMetaDataDto: UpdateModelMetaDataDto): Promise<void>;
|
|
64
64
|
deleteMany(ids: number[]): Promise<any>;
|
|
65
65
|
delete(id: number): Promise<import("..").ModelMetadata>;
|
|
@@ -56,7 +56,7 @@ let ModelMetadataController = class ModelMetadataController {
|
|
|
56
56
|
return this.modelMetadataService.updateUserKey(data);
|
|
57
57
|
}
|
|
58
58
|
generateCode(id) {
|
|
59
|
-
return this.modelMetadataService.
|
|
59
|
+
return this.modelMetadataService.generateCodeViaCtl(id);
|
|
60
60
|
}
|
|
61
61
|
update(id, updateModelMetaDataDto) {
|
|
62
62
|
return this.modelMetadataService.update(id, updateModelMetaDataDto);
|
|
@@ -144,7 +144,7 @@ __decorate([
|
|
|
144
144
|
__decorate([
|
|
145
145
|
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
146
146
|
(0, common_1.Post)(':id/generate-code'),
|
|
147
|
-
openapi.ApiResponse({ status: 201, type:
|
|
147
|
+
openapi.ApiResponse({ status: 201, type: String }),
|
|
148
148
|
__param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
|
|
149
149
|
__metadata("design:type", Function),
|
|
150
150
|
__metadata("design:paramtypes", [Number]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-metadata.controller.js","sourceRoot":"","sources":["../../src/controllers/model-metadata.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA8G;AAC9G,6CAAmE;AACnE,qEAAyD;AACzD,iEAA2D;AAC3D,iFAA2E;AAC3E,iFAA2E;AAC3E,+EAA0E;AAC1E,2DAAwD;AAMjD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAGhC,YACqB,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;QAHvD,WAAM,GAAG,IAAI,eAAM,CAAC,yBAAyB,CAAC,CAAC;IAInD,CAAC;IAYC,AAAN,KAAK,CAAC,QAAQ,CACD,cAA8B;QAEvC,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;IAKK,AAAN,KAAK,CAAC,cAAc;QAChB,MAAM,cAAc,GAAmB;YACnC,MAAM,EAAE,CAAC,cAAc,CAAC;YACxB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC;YACT,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,aAAa,EAAE,EAAE;YACjB,IAAI,EAAE,EAAE;SACX,CAAA;QACD,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;IAcK,AAAN,KAAK,CAAC,UAAU,CACH,aAA4B;QAErC,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAC/D,CAAC;IAID,OAAO,CAA4B,EAAU,EAAW,KAAU;QAC9D,OAAO,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IAID,MAAM,CAAS,SAAiC;QAE5C,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;IAKD,aAAa,CAAS,IAAS;QAC3B,OAAO,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAID,YAAY,CAA4B,EAAU;QAC9C,OAAO,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"model-metadata.controller.js","sourceRoot":"","sources":["../../src/controllers/model-metadata.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA8G;AAC9G,6CAAmE;AACnE,qEAAyD;AACzD,iEAA2D;AAC3D,iFAA2E;AAC3E,iFAA2E;AAC3E,+EAA0E;AAC1E,2DAAwD;AAMjD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAGhC,YACqB,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;QAHvD,WAAM,GAAG,IAAI,eAAM,CAAC,yBAAyB,CAAC,CAAC;IAInD,CAAC;IAYC,AAAN,KAAK,CAAC,QAAQ,CACD,cAA8B;QAEvC,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;IAKK,AAAN,KAAK,CAAC,cAAc;QAChB,MAAM,cAAc,GAAmB;YACnC,MAAM,EAAE,CAAC,cAAc,CAAC;YACxB,KAAK,EAAE,KAAK;YACZ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,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,cAAK,GAAE,CAAA;;;;sDAEtD;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,GAAE;;IACC,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAY,kDAAsB;;qDAG/C;AAKD;IAHC,IAAA,yBAAM,GAAE;IAER,IAAA,aAAI,EAAC,kBAAkB,CAAC;;IACV,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAEpB;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,mBAAmB,CAAC;;IACZ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;2DAEtC;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,YAAG,EAAC,KAAK,CAAC;;IACH,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAyB,kDAAsB;;qDAErF;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,OAAO,CAAC;;IACE,WAAA,IAAA,aAAI,GAAE,CAAA;;;;yDAEvB;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,KAAK,CAAC;;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;qDAExB;kCApGQ,uBAAuB;IAJnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;IAC5B,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAOyB,6CAAoB;GAJtD,uBAAuB,CAuGnC","sourcesContent":["import { Body, Controller, Delete, Get, Logger, Param, ParseIntPipe, Post, Put, Query } from '@nestjs/common';\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { Public } from 'src/decorators/public.decorator';\nimport { BasicFilterDto } from '../dtos/basic-filters.dto';\nimport { CreateModelMetadataDto } from '../dtos/create-model-metadata.dto';\nimport { UpdateModelMetaDataDto } from '../dtos/update-model-metadata.dto';\nimport { ModelMetadataService } from '../services/model-metadata.service';\nimport { NavigationDto } from 'src/dtos/navigation.dto';\n\n@Controller('model-metadata')\n@ApiTags(\"Solid Core\")\n// @UseGuards(ThrottlerGuard)\n// @SkipThrottle({ short: true, login: true, burst: true, sustained: true }) //Skip all\nexport class ModelMetadataController {\n private logger = new Logger('ModelMetadataController');\n\n constructor(\n private readonly modelMetadataService: ModelMetadataService\n ) { }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array })\n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n @Get()\n async findMany(\n @Query() basicFilterDto: BasicFilterDto\n ) {\n return this.modelMetadataService.findMany(basicFilterDto);\n }\n\n @Public()\n // @SkipThrottle({ burst: false, short: true, login: true, sustained: true }) //Enable burst only\n @Get('public')\n async findManyPublic() {\n const basicFilterDto: BasicFilterDto = {\n fields: ['singularName'],\n limit: 10000,\n offset: 0,\n filters: [],\n groupBy: [],\n populate: [],\n populateMedia: [],\n sort: []\n }\n return this.modelMetadataService.findMany(basicFilterDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'modelName', required: true, type: String })\n @ApiQuery({ name: 'recordId', required: true, type: Number })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array })\n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n @Get(\"/navigation\")\n async navigation(\n @Query() navigationDto: NavigationDto\n ) {\n return this.modelMetadataService.navigation(navigationDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get(':id')\n findOne(@Param('id', ParseIntPipe) id: number, @Query() query: any) {\n return this.modelMetadataService.findOne(id, query);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post()\n create(@Body() createDto: CreateModelMetadataDto) {\n // this.logger.log(`Creating a new model: ${JSON.stringify(createDto)}`);\n return this.modelMetadataService.create(createDto);\n }\n\n @Public()\n // @SkipThrottle({ short: false, burst: true, login: true, sustained: true }) //Enable short only\n @Post('/update-user-key')\n updateUserKey(@Body() data: any) {\n return this.modelMetadataService.updateUserKey(data);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post(':id/generate-code')\n generateCode(@Param('id', ParseIntPipe) id: number) {\n return this.modelMetadataService.generateCodeViaCtl(id);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Put(':id')\n update(@Param('id') id: number, @Body() updateModelMetaDataDto: UpdateModelMetaDataDto) {\n return this.modelMetadataService.update(id, updateModelMetaDataDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete('/bulk')\n async deleteMany(@Body() ids: number[]) {\n return this.modelMetadataService.deleteMany(ids);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete(':id')\n async delete(@Param('id') id: number) {\n return this.modelMetadataService.remove(id);\n }\n\n\n}\n"]}
|
|
@@ -38,7 +38,7 @@ let ModuleMetadataController = class ModuleMetadataController {
|
|
|
38
38
|
return this.moduleMetadataService.refreshPermission();
|
|
39
39
|
}
|
|
40
40
|
generateCode(id) {
|
|
41
|
-
return this.moduleMetadataService.
|
|
41
|
+
return this.moduleMetadataService.generateCodeViaCtl(id);
|
|
42
42
|
}
|
|
43
43
|
update(id, updateModuleMetadataDto, files) {
|
|
44
44
|
return this.moduleMetadataService.update(id, updateModuleMetadataDto, files);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-metadata.controller.js","sourceRoot":"","sources":["../../src/controllers/module-metadata.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAYwB;AACxB,6CAAmE;AACnE,iEAA2D;AAC3D,mFAA6E;AAC7E,mFAA6E;AAC7E,iFAA4E;AAC5E,+DAA+D;AAIxD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAA6B,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAI,CAAC;IAYxE,AAAN,KAAK,CAAC,QAAQ,CACH,cAA8B;QAEvC,OAAO,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;IAKD,OAAO,CAA4B,EAAU;QAC3C,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAChD,CAAC;IAKD,MAAM,CAAS,SAAkC,EAAmB,KAAiC;QACnG,OAAO,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,SAAS,EAAC,KAAK,CAAC,CAAC;IAC5D,CAAC;IAID,iBAAiB;QACf,OAAO,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;IACxD,CAAC;IAID,YAAY,CAA4B,EAAU;QAChD,OAAO,IAAI,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"module-metadata.controller.js","sourceRoot":"","sources":["../../src/controllers/module-metadata.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAYwB;AACxB,6CAAmE;AACnE,iEAA2D;AAC3D,mFAA6E;AAC7E,mFAA6E;AAC7E,iFAA4E;AAC5E,+DAA+D;AAIxD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAA6B,qBAA4C;QAA5C,0BAAqB,GAArB,qBA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,CAAC;IACpB,IAAA,aAAI,EAAC,qBAAqB,CAAC;;;;;iEAG3B;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,mBAAmB,CAAC;;IACZ,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;4DAEtC;AAMD;IAFC,IAAA,YAAG,EAAC,KAAK,CAAC;IACV,IAAA,wBAAe,EAAC,IAAA,sCAAmB,GAAE,CAAC;;IAC/B,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;IAAqD,WAAA,IAAA,sBAAa,GAAE,CAAA;;6CAA1C,oDAAuB,EAA2B,KAAK;;sDAEvH;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,OAAO,CAAC;;IACE,WAAA,IAAA,aAAI,GAAE,CAAA;;;;0DAEvB;AAKD;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,eAAM,EAAC,KAAK,CAAC;;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;sDAElB;mCAhEU,wBAAwB;IAFpC,IAAA,mBAAU,EAAC,iBAAiB,CAAC;IAC7B,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAEgC,+CAAqB;GAD9D,wBAAwB,CAiEpC","sourcesContent":["import {\n Body,\n Controller,\n Delete,\n Get,\n Param,\n ParseIntPipe,\n Post,\n Put,\n Query,\n UploadedFiles,\n UseInterceptors,\n} from '@nestjs/common';\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { BasicFilterDto } from '../dtos/basic-filters.dto';\nimport { CreateModuleMetadataDto } from '../dtos/create-module-metadata.dto';\nimport { UpdateModuleMetadataDto } from '../dtos/update-module-metadata.dto';\nimport { ModuleMetadataService } from '../services/module-metadata.service';\nimport { AnyFilesInterceptor } from '@nestjs/platform-express';\n\n@Controller('module-metadata')\n@ApiTags(\"Solid Core\")\nexport class ModuleMetadataController {\n constructor(private readonly moduleMetadataService: ModuleMetadataService) { }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array })\n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n @Get()\n async findMany(\n @Query() basicFilterDto: BasicFilterDto\n ) {\n return this.moduleMetadataService.findMany(basicFilterDto);\n }\n\n\n @ApiBearerAuth(\"jwt\")\n @Get(':id')\n findOne(@Param('id', ParseIntPipe) id: number) {\n return this.moduleMetadataService.findOne(id);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post()\n @UseInterceptors(AnyFilesInterceptor())\n create(@Body() createDto: CreateModuleMetadataDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.moduleMetadataService.create(createDto,files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('/refresh-permission')\n refreshPermission() {\n return this.moduleMetadataService.refreshPermission();\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post(':id/generate-code')\n generateCode(@Param('id', ParseIntPipe) id: number) {\n return this.moduleMetadataService.generateCodeViaCtl(id);\n }\n \n\n\n @Put(':id')\n @UseInterceptors(AnyFilesInterceptor())\n update(@Param('id') id: number, @Body() updateModuleMetadataDto: UpdateModuleMetadataDto , @UploadedFiles() files: Array<Express.Multer.File>) {\n return this.moduleMetadataService.update(id, updateModuleMetadataDto,files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Delete('/bulk')\n async deleteMany(@Body() ids: number[]) {\n return this.moduleMetadataService.deleteMany(ids);\n }\n\n\n @ApiBearerAuth(\"jwt\")\n @Delete(':id')\n delete(@Param('id') id: number) {\n return this.moduleMetadataService.remove(id);\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class CreateMcpAuditLogDto {
|
|
2
|
+
userId: number;
|
|
3
|
+
apiKeyId: number;
|
|
4
|
+
username: string;
|
|
5
|
+
transport: string;
|
|
6
|
+
mcpSessionId: string;
|
|
7
|
+
clientAddr: string;
|
|
8
|
+
method: string;
|
|
9
|
+
requestId: string;
|
|
10
|
+
toolName: string;
|
|
11
|
+
requestParams: string;
|
|
12
|
+
status: string;
|
|
13
|
+
responseResult: string;
|
|
14
|
+
errorCode: number;
|
|
15
|
+
errorMessage: string;
|
|
16
|
+
durationMs: number;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=create-mcp-audit-log.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-mcp-audit-log.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-mcp-audit-log.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,oBAAoB;IAI/B,MAAM,EAAE,MAAM,CAAC;IAKf,QAAQ,EAAE,MAAM,CAAC;IAKjB,QAAQ,EAAE,MAAM,CAAC;IAKjB,SAAS,EAAE,MAAM,CAAC;IAKlB,YAAY,EAAE,MAAM,CAAC;IAKrB,UAAU,EAAE,MAAM,CAAC;IAKnB,MAAM,EAAE,MAAM,CAAC;IAKf,SAAS,EAAE,MAAM,CAAC;IAKlB,QAAQ,EAAE,MAAM,CAAC;IAKjB,aAAa,EAAE,MAAM,CAAC;IAKtB,MAAM,EAAE,MAAM,CAAC;IAKf,cAAc,EAAE,MAAM,CAAC;IAKvB,SAAS,EAAE,MAAM,CAAC;IAKlB,YAAY,EAAE,MAAM,CAAC;IAKrB,UAAU,EAAE,MAAM,CAAC;IAKnB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|