@solidxai/core 0.1.10 → 0.1.11-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/controllers/datasource-introspection.controller.d.ts +234 -0
  2. package/dist/controllers/datasource-introspection.controller.d.ts.map +1 -0
  3. package/dist/controllers/datasource-introspection.controller.js +98 -0
  4. package/dist/controllers/datasource-introspection.controller.js.map +1 -0
  5. package/dist/controllers/datasource-management.controller.d.ts +18 -0
  6. package/dist/controllers/datasource-management.controller.d.ts.map +1 -0
  7. package/dist/controllers/datasource-management.controller.js +55 -0
  8. package/dist/controllers/datasource-management.controller.js.map +1 -0
  9. package/dist/dtos/create-datasource-management.dto.d.ts +25 -0
  10. package/dist/dtos/create-datasource-management.dto.d.ts.map +1 -0
  11. package/dist/dtos/create-datasource-management.dto.js +169 -0
  12. package/dist/dtos/create-datasource-management.dto.js.map +1 -0
  13. package/dist/dtos/datasource-introspection-mapping.dto.d.ts +45 -0
  14. package/dist/dtos/datasource-introspection-mapping.dto.d.ts.map +1 -0
  15. package/dist/dtos/datasource-introspection-mapping.dto.js +233 -0
  16. package/dist/dtos/datasource-introspection-mapping.dto.js.map +1 -0
  17. package/dist/index.d.ts +5 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +5 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/interfaces/datasource-introspection-provider.interface.d.ts +26 -0
  22. package/dist/interfaces/datasource-introspection-provider.interface.d.ts.map +1 -0
  23. package/dist/interfaces/datasource-introspection-provider.interface.js +3 -0
  24. package/dist/interfaces/datasource-introspection-provider.interface.js.map +1 -0
  25. package/dist/seeders/seed-data/solid-core-metadata.json +21 -0
  26. package/dist/services/authentication.service.js +1 -1
  27. package/dist/services/authentication.service.js.map +1 -1
  28. package/dist/services/dashboard-providers/mq-dashboard-latency-trend-provider.service.d.ts.map +1 -1
  29. package/dist/services/dashboard-providers/mq-dashboard-latency-trend-provider.service.js +2 -2
  30. package/dist/services/dashboard-providers/mq-dashboard-latency-trend-provider.service.js.map +1 -1
  31. package/dist/services/dashboard-providers/mq-dashboard-messages-over-time-provider.service.d.ts.map +1 -1
  32. package/dist/services/dashboard-providers/mq-dashboard-messages-over-time-provider.service.js +2 -2
  33. package/dist/services/dashboard-providers/mq-dashboard-messages-over-time-provider.service.js.map +1 -1
  34. package/dist/services/dashboard-providers/mq-dashboard-provider-utils.d.ts +3 -0
  35. package/dist/services/dashboard-providers/mq-dashboard-provider-utils.d.ts.map +1 -1
  36. package/dist/services/dashboard-providers/mq-dashboard-provider-utils.js +71 -0
  37. package/dist/services/dashboard-providers/mq-dashboard-provider-utils.js.map +1 -1
  38. package/dist/services/dashboard-providers/mq-dashboard-queue-sla-heatmap-provider.service.d.ts.map +1 -1
  39. package/dist/services/dashboard-providers/mq-dashboard-queue-sla-heatmap-provider.service.js +3 -3
  40. package/dist/services/dashboard-providers/mq-dashboard-queue-sla-heatmap-provider.service.js.map +1 -1
  41. package/dist/services/datasource-introspection/mssql-datasource-introspection-provider.service.d.ts +11 -0
  42. package/dist/services/datasource-introspection/mssql-datasource-introspection-provider.service.d.ts.map +1 -0
  43. package/dist/services/datasource-introspection/mssql-datasource-introspection-provider.service.js +181 -0
  44. package/dist/services/datasource-introspection/mssql-datasource-introspection-provider.service.js.map +1 -0
  45. package/dist/services/datasource-introspection/mysql-datasource-introspection-provider.service.d.ts +11 -0
  46. package/dist/services/datasource-introspection/mysql-datasource-introspection-provider.service.d.ts.map +1 -0
  47. package/dist/services/datasource-introspection/mysql-datasource-introspection-provider.service.js +90 -0
  48. package/dist/services/datasource-introspection/mysql-datasource-introspection-provider.service.js.map +1 -0
  49. package/dist/services/datasource-introspection/postgres-datasource-introspection-provider.service.d.ts +11 -0
  50. package/dist/services/datasource-introspection/postgres-datasource-introspection-provider.service.d.ts.map +1 -0
  51. package/dist/services/datasource-introspection/postgres-datasource-introspection-provider.service.js +156 -0
  52. package/dist/services/datasource-introspection/postgres-datasource-introspection-provider.service.js.map +1 -0
  53. package/dist/services/datasource-introspection.service.d.ts +288 -0
  54. package/dist/services/datasource-introspection.service.d.ts.map +1 -0
  55. package/dist/services/datasource-introspection.service.js +1278 -0
  56. package/dist/services/datasource-introspection.service.js.map +1 -0
  57. package/dist/services/datasource-management.service.d.ts +60 -0
  58. package/dist/services/datasource-management.service.d.ts.map +1 -0
  59. package/dist/services/datasource-management.service.js +461 -0
  60. package/dist/services/datasource-management.service.js.map +1 -0
  61. package/dist/services/field-metadata.service.d.ts.map +1 -1
  62. package/dist/services/field-metadata.service.js +19 -0
  63. package/dist/services/field-metadata.service.js.map +1 -1
  64. package/dist/services/model-metadata.service.d.ts +1 -3
  65. package/dist/services/model-metadata.service.d.ts.map +1 -1
  66. package/dist/services/model-metadata.service.js +47 -15
  67. package/dist/services/model-metadata.service.js.map +1 -1
  68. package/dist/services/role-metadata.service.d.ts +1 -0
  69. package/dist/services/role-metadata.service.d.ts.map +1 -1
  70. package/dist/services/role-metadata.service.js +13 -0
  71. package/dist/services/role-metadata.service.js.map +1 -1
  72. package/dist/services/selection-providers/mq-dashboard-message-broker-variable-options-provider.service.d.ts.map +1 -1
  73. package/dist/services/selection-providers/mq-dashboard-message-broker-variable-options-provider.service.js +2 -3
  74. package/dist/services/selection-providers/mq-dashboard-message-broker-variable-options-provider.service.js.map +1 -1
  75. package/dist/services/selection-providers/mq-dashboard-queue-name-variable-options-provider.service.d.ts.map +1 -1
  76. package/dist/services/selection-providers/mq-dashboard-queue-name-variable-options-provider.service.js +2 -3
  77. package/dist/services/selection-providers/mq-dashboard-queue-name-variable-options-provider.service.js.map +1 -1
  78. package/dist/services/setting.service.d.ts +1 -0
  79. package/dist/services/setting.service.d.ts.map +1 -1
  80. package/dist/services/setting.service.js +32 -8
  81. package/dist/services/setting.service.js.map +1 -1
  82. package/dist/services/solid-ts-morph.service.d.ts +1 -1
  83. package/dist/services/solid-ts-morph.service.d.ts.map +1 -1
  84. package/dist/services/solid-ts-morph.service.js.map +1 -1
  85. package/dist/solid-core.module.d.ts.map +1 -1
  86. package/dist/solid-core.module.js +16 -0
  87. package/dist/solid-core.module.js.map +1 -1
  88. package/package.json +1 -1
  89. package/src/controllers/datasource-introspection.controller.ts +58 -0
  90. package/src/controllers/datasource-management.controller.ts +24 -0
  91. package/src/dtos/create-datasource-management.dto.ts +139 -0
  92. package/src/dtos/datasource-introspection-mapping.dto.ts +182 -0
  93. package/src/index.ts +5 -0
  94. package/src/interfaces/datasource-introspection-provider.interface.ts +28 -0
  95. package/src/seeders/seed-data/solid-core-metadata.json +22 -1
  96. package/src/services/authentication.service.ts +1 -1
  97. package/src/services/dashboard-providers/mq-dashboard-latency-trend-provider.service.ts +9 -4
  98. package/src/services/dashboard-providers/mq-dashboard-messages-over-time-provider.service.ts +9 -4
  99. package/src/services/dashboard-providers/mq-dashboard-provider-utils.ts +82 -0
  100. package/src/services/dashboard-providers/mq-dashboard-queue-sla-heatmap-provider.service.ts +10 -4
  101. package/src/services/datasource-introspection/mssql-datasource-introspection-provider.service.ts +185 -0
  102. package/src/services/datasource-introspection/mysql-datasource-introspection-provider.service.ts +95 -0
  103. package/src/services/datasource-introspection/postgres-datasource-introspection-provider.service.ts +160 -0
  104. package/src/services/datasource-introspection.service.ts +1536 -0
  105. package/src/services/datasource-management.service.ts +566 -0
  106. package/src/services/field-metadata.service.ts +21 -1
  107. package/src/services/model-metadata.service.ts +50 -13
  108. package/src/services/role-metadata.service.ts +14 -0
  109. package/src/services/selection-providers/mq-dashboard-message-broker-variable-options-provider.service.ts +2 -4
  110. package/src/services/selection-providers/mq-dashboard-queue-name-variable-options-provider.service.ts +2 -4
  111. package/src/services/setting.service.ts +43 -12
  112. package/src/services/solid-ts-morph.service.ts +2 -2
  113. package/src/solid-core.module.ts +16 -0
@@ -0,0 +1,234 @@
1
+ import { DatasourceIntrospectionMappingDto } from "../dtos/datasource-introspection-mapping.dto";
2
+ import { DatasourceIntrospectionService } from "../services/datasource-introspection.service";
3
+ export declare class DatasourceIntrospectionController {
4
+ private readonly datasourceIntrospectionService;
5
+ constructor(datasourceIntrospectionService: DatasourceIntrospectionService);
6
+ getBootstrap(moduleId: number): Promise<{
7
+ data: {
8
+ module: {
9
+ id: any;
10
+ name: any;
11
+ displayName: any;
12
+ description: any;
13
+ defaultDataSource: any;
14
+ };
15
+ datasources: {
16
+ name: string;
17
+ displayName: string;
18
+ type: import("..").DatasourceType;
19
+ envPrefix: string;
20
+ isDefault: boolean;
21
+ synchronize: boolean;
22
+ host: string;
23
+ port: number;
24
+ database: string;
25
+ }[];
26
+ recommendedDatasourceName: string;
27
+ };
28
+ }>;
29
+ getTables(moduleId: number, datasourceName: string): Promise<{
30
+ data: {
31
+ module: {
32
+ id: any;
33
+ name: any;
34
+ displayName: any;
35
+ description: any;
36
+ defaultDataSource: any;
37
+ };
38
+ datasource: {
39
+ name: string;
40
+ displayName: string;
41
+ type: import("..").DatasourceType;
42
+ envPrefix: string;
43
+ isDefault: boolean;
44
+ synchronize: boolean;
45
+ host: string;
46
+ port: number;
47
+ database: string;
48
+ };
49
+ synchronizeBlocked: boolean;
50
+ synchronizeMessage: string;
51
+ records: any[];
52
+ meta: {
53
+ totalRecords: number;
54
+ };
55
+ };
56
+ } | {
57
+ data: {
58
+ module: {
59
+ id: any;
60
+ name: any;
61
+ displayName: any;
62
+ description: any;
63
+ defaultDataSource: any;
64
+ };
65
+ datasource: {
66
+ name: string;
67
+ displayName: string;
68
+ type: import("..").DatasourceType;
69
+ envPrefix: string;
70
+ isDefault: boolean;
71
+ synchronize: boolean;
72
+ host: string;
73
+ port: number;
74
+ database: string;
75
+ };
76
+ synchronizeBlocked: boolean;
77
+ synchronizeMessage: any;
78
+ records: {
79
+ schema: string | null;
80
+ tableName: string;
81
+ mapped: boolean;
82
+ mappedModelId: number | null;
83
+ mappedModelSingularName: string | null;
84
+ mappedModelDisplayName: string | null;
85
+ mappedModuleId: number | null;
86
+ mappedModuleName: string | null;
87
+ mappedModuleDisplayName: string | null;
88
+ suggestedLegacyTableType: import("..").LegacyTableType;
89
+ suggestedBaseClassName: string;
90
+ suggestedIdColumnName: string | null;
91
+ suggestedUserKeyField: string;
92
+ columnCount: number;
93
+ physicalColumnCount: number;
94
+ }[];
95
+ meta: {
96
+ totalRecords: number;
97
+ };
98
+ };
99
+ }>;
100
+ getTableDetail(moduleId: number, datasourceName: string, tableName: string, schema?: string): Promise<{
101
+ data: {
102
+ module: {
103
+ id: any;
104
+ name: any;
105
+ displayName: any;
106
+ description: any;
107
+ defaultDataSource: any;
108
+ };
109
+ datasource: {
110
+ name: string;
111
+ displayName: string;
112
+ type: import("..").DatasourceType;
113
+ envPrefix: string;
114
+ isDefault: boolean;
115
+ synchronize: boolean;
116
+ host: string;
117
+ port: number;
118
+ database: string;
119
+ };
120
+ table: {
121
+ schema: string | null;
122
+ tableName: string;
123
+ mapped: boolean;
124
+ mappedModelId: number | null;
125
+ mappedModelSingularName: string | null;
126
+ mappedModelDisplayName: string | null;
127
+ mappedModuleId: number | null;
128
+ mappedModuleName: string | null;
129
+ mappedModuleDisplayName: string | null;
130
+ suggestedLegacyTableType: import("..").LegacyTableType;
131
+ suggestedBaseClassName: string;
132
+ suggestedIdColumnName: string | null;
133
+ suggestedUserKeyField: string;
134
+ columnCount: number;
135
+ physicalColumnCount: number;
136
+ };
137
+ columns: {
138
+ columnName: string;
139
+ fieldName: string;
140
+ dataType: string;
141
+ solidFieldType: string;
142
+ ormType: string;
143
+ nullable: boolean;
144
+ defaultValue: string | null;
145
+ characterMaximumLength: number | null;
146
+ numericPrecision: number | null;
147
+ numericScale: number | null;
148
+ ordinalPosition: number | null;
149
+ isAutoGenerated: boolean;
150
+ handledBySuperclass: boolean;
151
+ superclassFieldName: string | null;
152
+ }[];
153
+ rawDdl: {
154
+ statement: string | null;
155
+ available: boolean;
156
+ note: string | null;
157
+ };
158
+ userKeyCandidates: {
159
+ isDefault: boolean;
160
+ name: string;
161
+ label: string;
162
+ score: number;
163
+ reason: string;
164
+ }[];
165
+ suggestedMetadata: {
166
+ singularName: any;
167
+ pluralName: any;
168
+ displayName: any;
169
+ tableName: string;
170
+ schema: string;
171
+ dataSource: string;
172
+ dataSourceType: import("..").DatasourceType;
173
+ legacyTableType: import("..").LegacyTableType;
174
+ baseClassName: string;
175
+ userKeyField: string;
176
+ synchronize: boolean;
177
+ };
178
+ };
179
+ }>;
180
+ previewMapping(moduleId: number, mappingDto: DatasourceIntrospectionMappingDto): Promise<{
181
+ data: {
182
+ operation: "create" | "update";
183
+ mappedModelId: number;
184
+ metadataJson: {
185
+ filePath: string;
186
+ model: Record<string, any>;
187
+ };
188
+ migration: {
189
+ willGenerate: boolean;
190
+ filePath: string | null;
191
+ fileName: string | null;
192
+ className: string | null;
193
+ timestamp: number | null;
194
+ content: string | null;
195
+ note: string;
196
+ missingSystemColumns: string[];
197
+ };
198
+ summary: {
199
+ includedColumnNames: string[];
200
+ removedColumnNames: string[];
201
+ missingSystemColumns: string[];
202
+ generatedSystemColumnCount: number;
203
+ };
204
+ };
205
+ }>;
206
+ applyMapping(moduleId: number, mappingDto: DatasourceIntrospectionMappingDto): Promise<{
207
+ data: {
208
+ modelId: number;
209
+ operation: "create" | "update";
210
+ metadataJson: {
211
+ filePath: string;
212
+ model: Record<string, any>;
213
+ };
214
+ migration: {
215
+ written: boolean;
216
+ willGenerate: boolean;
217
+ filePath: string | null;
218
+ fileName: string | null;
219
+ className: string | null;
220
+ timestamp: number | null;
221
+ content: string | null;
222
+ note: string;
223
+ missingSystemColumns: string[];
224
+ };
225
+ summary: {
226
+ includedColumnNames: string[];
227
+ removedColumnNames: string[];
228
+ missingSystemColumns: string[];
229
+ generatedSystemColumnCount: number;
230
+ };
231
+ };
232
+ }>;
233
+ }
234
+ //# sourceMappingURL=datasource-introspection.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasource-introspection.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/datasource-introspection.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EAAE,8BAA8B,EAAE,MAAM,8CAA8C,CAAC;AAE9F,qBAEa,iCAAiC;IAEtC,OAAO,CAAC,QAAQ,CAAC,8BAA8B;gBAA9B,8BAA8B,EAAE,8BAA8B;IAKnF,YAAY,CACyB,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;IAOrD,SAAS,CAC4B,QAAQ,EAAE,MAAM,EAC5B,cAAc,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO/C,cAAc,CACuB,QAAQ,EAAE,MAAM,EAC5B,cAAc,EAAE,MAAM,EAC3B,SAAS,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOpC,cAAc,CACuB,QAAQ,EAAE,MAAM,EACzC,UAAU,EAAE,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;IAOzD,YAAY,CACyB,QAAQ,EAAE,MAAM,EACzC,UAAU,EAAE,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI5D"}
@@ -0,0 +1,98 @@
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.DatasourceIntrospectionController = void 0;
16
+ const openapi = require("@nestjs/swagger");
17
+ const common_1 = require("@nestjs/common");
18
+ const swagger_1 = require("@nestjs/swagger");
19
+ const datasource_introspection_mapping_dto_1 = require("../dtos/datasource-introspection-mapping.dto");
20
+ const datasource_introspection_service_1 = require("../services/datasource-introspection.service");
21
+ let DatasourceIntrospectionController = class DatasourceIntrospectionController {
22
+ constructor(datasourceIntrospectionService) {
23
+ this.datasourceIntrospectionService = datasourceIntrospectionService;
24
+ }
25
+ getBootstrap(moduleId) {
26
+ return this.datasourceIntrospectionService.getBootstrap(moduleId);
27
+ }
28
+ getTables(moduleId, datasourceName) {
29
+ return this.datasourceIntrospectionService.getTables(moduleId, datasourceName);
30
+ }
31
+ getTableDetail(moduleId, datasourceName, tableName, schema) {
32
+ return this.datasourceIntrospectionService.getTableDetail(moduleId, datasourceName, tableName, schema);
33
+ }
34
+ previewMapping(moduleId, mappingDto) {
35
+ return this.datasourceIntrospectionService.previewMapping(moduleId, mappingDto);
36
+ }
37
+ applyMapping(moduleId, mappingDto) {
38
+ return this.datasourceIntrospectionService.applyMapping(moduleId, mappingDto);
39
+ }
40
+ };
41
+ exports.DatasourceIntrospectionController = DatasourceIntrospectionController;
42
+ __decorate([
43
+ (0, swagger_1.ApiBearerAuth)("jwt"),
44
+ (0, common_1.Get)("modules/:moduleId/bootstrap"),
45
+ openapi.ApiResponse({ status: 200 }),
46
+ __param(0, (0, common_1.Param)("moduleId", common_1.ParseIntPipe)),
47
+ __metadata("design:type", Function),
48
+ __metadata("design:paramtypes", [Number]),
49
+ __metadata("design:returntype", void 0)
50
+ ], DatasourceIntrospectionController.prototype, "getBootstrap", null);
51
+ __decorate([
52
+ (0, swagger_1.ApiBearerAuth)("jwt"),
53
+ (0, common_1.Get)("modules/:moduleId/tables"),
54
+ openapi.ApiResponse({ status: 200, type: Object }),
55
+ __param(0, (0, common_1.Param)("moduleId", common_1.ParseIntPipe)),
56
+ __param(1, (0, common_1.Query)("datasource")),
57
+ __metadata("design:type", Function),
58
+ __metadata("design:paramtypes", [Number, String]),
59
+ __metadata("design:returntype", void 0)
60
+ ], DatasourceIntrospectionController.prototype, "getTables", null);
61
+ __decorate([
62
+ (0, swagger_1.ApiBearerAuth)("jwt"),
63
+ (0, common_1.Get)("modules/:moduleId/table-detail"),
64
+ openapi.ApiResponse({ status: 200 }),
65
+ __param(0, (0, common_1.Param)("moduleId", common_1.ParseIntPipe)),
66
+ __param(1, (0, common_1.Query)("datasource")),
67
+ __param(2, (0, common_1.Query)("table")),
68
+ __param(3, (0, common_1.Query)("schema")),
69
+ __metadata("design:type", Function),
70
+ __metadata("design:paramtypes", [Number, String, String, String]),
71
+ __metadata("design:returntype", void 0)
72
+ ], DatasourceIntrospectionController.prototype, "getTableDetail", null);
73
+ __decorate([
74
+ (0, swagger_1.ApiBearerAuth)("jwt"),
75
+ (0, common_1.Post)("modules/:moduleId/mapping-preview"),
76
+ openapi.ApiResponse({ status: 201 }),
77
+ __param(0, (0, common_1.Param)("moduleId", common_1.ParseIntPipe)),
78
+ __param(1, (0, common_1.Body)()),
79
+ __metadata("design:type", Function),
80
+ __metadata("design:paramtypes", [Number, datasource_introspection_mapping_dto_1.DatasourceIntrospectionMappingDto]),
81
+ __metadata("design:returntype", void 0)
82
+ ], DatasourceIntrospectionController.prototype, "previewMapping", null);
83
+ __decorate([
84
+ (0, swagger_1.ApiBearerAuth)("jwt"),
85
+ (0, common_1.Post)("modules/:moduleId/apply-mapping"),
86
+ openapi.ApiResponse({ status: 201 }),
87
+ __param(0, (0, common_1.Param)("moduleId", common_1.ParseIntPipe)),
88
+ __param(1, (0, common_1.Body)()),
89
+ __metadata("design:type", Function),
90
+ __metadata("design:paramtypes", [Number, datasource_introspection_mapping_dto_1.DatasourceIntrospectionMappingDto]),
91
+ __metadata("design:returntype", void 0)
92
+ ], DatasourceIntrospectionController.prototype, "applyMapping", null);
93
+ exports.DatasourceIntrospectionController = DatasourceIntrospectionController = __decorate([
94
+ (0, common_1.Controller)("datasource-introspection"),
95
+ (0, swagger_1.ApiTags)("Solid Core"),
96
+ __metadata("design:paramtypes", [datasource_introspection_service_1.DatasourceIntrospectionService])
97
+ ], DatasourceIntrospectionController);
98
+ //# sourceMappingURL=datasource-introspection.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasource-introspection.controller.js","sourceRoot":"","sources":["../../src/controllers/datasource-introspection.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyF;AACzF,6CAAyD;AACzD,uGAAiG;AACjG,mGAA8F;AAIvF,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAC1C,YACqB,8BAA8D;QAA9D,mCAA8B,GAA9B,8BAA8B,CAAgC;IAC/E,CAAC;IAIL,YAAY,CACyB,QAAgB;QAEjD,OAAO,IAAI,CAAC,8BAA8B,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACtE,CAAC;IAID,SAAS,CAC4B,QAAgB,EAC5B,cAAsB;QAE3C,OAAO,IAAI,CAAC,8BAA8B,CAAC,SAAS,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IACnF,CAAC;IAID,cAAc,CACuB,QAAgB,EAC5B,cAAsB,EAC3B,SAAiB,EAChB,MAAe;QAEhC,OAAO,IAAI,CAAC,8BAA8B,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC3G,CAAC;IAID,cAAc,CACuB,QAAgB,EACzC,UAA6C;QAErD,OAAO,IAAI,CAAC,8BAA8B,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACpF,CAAC;IAID,YAAY,CACyB,QAAgB,EACzC,UAA6C;QAEr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BAAU,EAAC,0BAA0B,CAAC;IACtC,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAGmC,iEAA8B;GAF1E,iCAAiC,CAkD7C","sourcesContent":["import { Body, Controller, Get, Param, ParseIntPipe, Post, Query } from \"@nestjs/common\";\nimport { ApiBearerAuth, ApiTags } from \"@nestjs/swagger\";\nimport { DatasourceIntrospectionMappingDto } from \"../dtos/datasource-introspection-mapping.dto\";\nimport { DatasourceIntrospectionService } from \"../services/datasource-introspection.service\";\n\n@Controller(\"datasource-introspection\")\n@ApiTags(\"Solid Core\")\nexport class DatasourceIntrospectionController {\n constructor(\n private readonly datasourceIntrospectionService: DatasourceIntrospectionService,\n ) { }\n\n @ApiBearerAuth(\"jwt\")\n @Get(\"modules/:moduleId/bootstrap\")\n getBootstrap(\n @Param(\"moduleId\", ParseIntPipe) moduleId: number,\n ) {\n return this.datasourceIntrospectionService.getBootstrap(moduleId);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get(\"modules/:moduleId/tables\")\n getTables(\n @Param(\"moduleId\", ParseIntPipe) moduleId: number,\n @Query(\"datasource\") datasourceName: string,\n ) {\n return this.datasourceIntrospectionService.getTables(moduleId, datasourceName);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get(\"modules/:moduleId/table-detail\")\n getTableDetail(\n @Param(\"moduleId\", ParseIntPipe) moduleId: number,\n @Query(\"datasource\") datasourceName: string,\n @Query(\"table\") tableName: string,\n @Query(\"schema\") schema?: string,\n ) {\n return this.datasourceIntrospectionService.getTableDetail(moduleId, datasourceName, tableName, schema);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post(\"modules/:moduleId/mapping-preview\")\n previewMapping(\n @Param(\"moduleId\", ParseIntPipe) moduleId: number,\n @Body() mappingDto: DatasourceIntrospectionMappingDto,\n ) {\n return this.datasourceIntrospectionService.previewMapping(moduleId, mappingDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post(\"modules/:moduleId/apply-mapping\")\n applyMapping(\n @Param(\"moduleId\", ParseIntPipe) moduleId: number,\n @Body() mappingDto: DatasourceIntrospectionMappingDto,\n ) {\n return this.datasourceIntrospectionService.applyMapping(moduleId, mappingDto);\n }\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { CreateDatasourceManagementDto } from "../dtos/create-datasource-management.dto";
2
+ import { DatasourceManagementService } from "../services/datasource-management.service";
3
+ export declare class DatasourceManagementController {
4
+ private readonly datasourceManagementService;
5
+ constructor(datasourceManagementService: DatasourceManagementService);
6
+ findMany(): {
7
+ data: {
8
+ records: import("../services/datasource-management.service").DatasourceRecord[];
9
+ meta: {
10
+ totalRecords: number;
11
+ };
12
+ };
13
+ };
14
+ create(createDto: CreateDatasourceManagementDto): Promise<{
15
+ data: import("../services/datasource-management.service").DatasourceRecord;
16
+ }>;
17
+ }
18
+ //# sourceMappingURL=datasource-management.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasource-management.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/datasource-management.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,qBAEa,8BAA8B;IAEnC,OAAO,CAAC,QAAQ,CAAC,2BAA2B;gBAA3B,2BAA2B,EAAE,2BAA2B;IAK7E,QAAQ;;;;;;;;IAMR,MAAM,CAAS,SAAS,EAAE,6BAA6B;;;CAG1D"}
@@ -0,0 +1,55 @@
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.DatasourceManagementController = void 0;
16
+ const openapi = require("@nestjs/swagger");
17
+ const common_1 = require("@nestjs/common");
18
+ const swagger_1 = require("@nestjs/swagger");
19
+ const create_datasource_management_dto_1 = require("../dtos/create-datasource-management.dto");
20
+ const datasource_management_service_1 = require("../services/datasource-management.service");
21
+ let DatasourceManagementController = class DatasourceManagementController {
22
+ constructor(datasourceManagementService) {
23
+ this.datasourceManagementService = datasourceManagementService;
24
+ }
25
+ findMany() {
26
+ return this.datasourceManagementService.findMany();
27
+ }
28
+ create(createDto) {
29
+ return this.datasourceManagementService.create(createDto);
30
+ }
31
+ };
32
+ exports.DatasourceManagementController = DatasourceManagementController;
33
+ __decorate([
34
+ (0, swagger_1.ApiBearerAuth)("jwt"),
35
+ (0, common_1.Get)(),
36
+ openapi.ApiResponse({ status: 200 }),
37
+ __metadata("design:type", Function),
38
+ __metadata("design:paramtypes", []),
39
+ __metadata("design:returntype", void 0)
40
+ ], DatasourceManagementController.prototype, "findMany", null);
41
+ __decorate([
42
+ (0, swagger_1.ApiBearerAuth)("jwt"),
43
+ (0, common_1.Post)(),
44
+ openapi.ApiResponse({ status: 201 }),
45
+ __param(0, (0, common_1.Body)()),
46
+ __metadata("design:type", Function),
47
+ __metadata("design:paramtypes", [create_datasource_management_dto_1.CreateDatasourceManagementDto]),
48
+ __metadata("design:returntype", void 0)
49
+ ], DatasourceManagementController.prototype, "create", null);
50
+ exports.DatasourceManagementController = DatasourceManagementController = __decorate([
51
+ (0, common_1.Controller)("datasource-management"),
52
+ (0, swagger_1.ApiTags)("Solid Core"),
53
+ __metadata("design:paramtypes", [datasource_management_service_1.DatasourceManagementService])
54
+ ], DatasourceManagementController);
55
+ //# sourceMappingURL=datasource-management.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datasource-management.controller.js","sourceRoot":"","sources":["../../src/controllers/datasource-management.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA6D;AAC7D,6CAAyD;AACzD,+FAAyF;AACzF,6FAAwF;AAIjF,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IACvC,YACqB,2BAAwD;QAAxD,gCAA2B,GAA3B,2BAA2B,CAA6B;IACzE,CAAC;IAIL,QAAQ;QACJ,OAAO,IAAI,CAAC,2BAA2B,CAAC,QAAQ,EAAE,CAAC;IACvD,CAAC;IAID,MAAM,CAAS,SAAwC;QACnD,OAAO,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;CACJ,CAAA;AAhBY,wEAA8B;AAOvC;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,YAAG,GAAE;;;;;8DAGL;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,GAAE;;IACC,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAY,gEAA6B;;4DAEtD;yCAfQ,8BAA8B;IAF1C,IAAA,mBAAU,EAAC,uBAAuB,CAAC;IACnC,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAGgC,2DAA2B;GAFpE,8BAA8B,CAgB1C","sourcesContent":["import { Body, Controller, Get, Post } from \"@nestjs/common\";\nimport { ApiBearerAuth, ApiTags } from \"@nestjs/swagger\";\nimport { CreateDatasourceManagementDto } from \"../dtos/create-datasource-management.dto\";\nimport { DatasourceManagementService } from \"../services/datasource-management.service\";\n\n@Controller(\"datasource-management\")\n@ApiTags(\"Solid Core\")\nexport class DatasourceManagementController {\n constructor(\n private readonly datasourceManagementService: DatasourceManagementService,\n ) { }\n\n @ApiBearerAuth(\"jwt\")\n @Get()\n findMany() {\n return this.datasourceManagementService.findMany();\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post()\n create(@Body() createDto: CreateDatasourceManagementDto) {\n return this.datasourceManagementService.create(createDto);\n }\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import { DatasourceType } from "./create-model-metadata.dto";
2
+ export declare class CreateDatasourceManagementDto {
3
+ name: string;
4
+ displayName?: string;
5
+ type: DatasourceType;
6
+ host: string;
7
+ port: number;
8
+ database: string;
9
+ username: string;
10
+ password: string;
11
+ synchronize?: boolean;
12
+ logging?: boolean;
13
+ ssl?: boolean;
14
+ sslRejectUnauthorized?: boolean;
15
+ poolMax?: number;
16
+ connectionTimeoutMs?: number;
17
+ idleTimeoutMs?: number;
18
+ statementTimeoutMs?: number;
19
+ idleInTxTimeoutMs?: number;
20
+ retryAttempts?: number;
21
+ retryDelayMs?: number;
22
+ encrypt?: boolean;
23
+ trustServerCertificate?: boolean;
24
+ }
25
+ //# sourceMappingURL=create-datasource-management.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-datasource-management.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-datasource-management.dto.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,qBAAa,6BAA6B;IAMtC,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,IAAI,EAAE,cAAc,CAAC;IAIrB,IAAI,EAAE,MAAM,CAAC;IAOb,IAAI,EAAE,MAAM,CAAC;IAIb,QAAQ,EAAE,MAAM,CAAC;IAIjB,QAAQ,EAAE,MAAM,CAAC;IAIjB,QAAQ,EAAE,MAAM,CAAC;IAMjB,WAAW,CAAC,EAAE,OAAO,CAAC;IAMtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAMlB,GAAG,CAAC,EAAE,OAAO,CAAC;IAMd,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAOhC,OAAO,CAAC,EAAE,MAAM,CAAC;IAOjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAO7B,aAAa,CAAC,EAAE,MAAM,CAAC;IAOvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAO5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAO3B,aAAa,CAAC,EAAE,MAAM,CAAC;IAOvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAMtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAMlB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC"}
@@ -0,0 +1,169 @@
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.CreateDatasourceManagementDto = void 0;
13
+ const openapi = require("@nestjs/swagger");
14
+ const swagger_1 = require("@nestjs/swagger");
15
+ const class_transformer_1 = require("class-transformer");
16
+ const class_validator_1 = require("class-validator");
17
+ const create_model_metadata_dto_1 = require("./create-model-metadata.dto");
18
+ class CreateDatasourceManagementDto {
19
+ static _OPENAPI_METADATA_FACTORY() {
20
+ return { name: { required: true, type: () => String, pattern: "/^[a-z][a-z0-9-]*$/" }, displayName: { required: false, type: () => String }, type: { required: true, enum: require("./create-model-metadata.dto").DatasourceType, enum: [create_model_metadata_dto_1.DatasourceType.postgres, create_model_metadata_dto_1.DatasourceType.mysql, create_model_metadata_dto_1.DatasourceType.mssql] }, host: { required: true, type: () => String }, port: { required: true, type: () => Number, minimum: 1, maximum: 65535 }, database: { required: true, type: () => String }, username: { required: true, type: () => String }, password: { required: true, type: () => String }, synchronize: { required: false, type: () => Boolean }, logging: { required: false, type: () => Boolean }, ssl: { required: false, type: () => Boolean }, sslRejectUnauthorized: { required: false, type: () => Boolean }, poolMax: { required: false, type: () => Number, minimum: 0 }, connectionTimeoutMs: { required: false, type: () => Number, minimum: 0 }, idleTimeoutMs: { required: false, type: () => Number, minimum: 0 }, statementTimeoutMs: { required: false, type: () => Number, minimum: 0 }, idleInTxTimeoutMs: { required: false, type: () => Number, minimum: 0 }, retryAttempts: { required: false, type: () => Number, minimum: 0 }, retryDelayMs: { required: false, type: () => Number, minimum: 0 }, encrypt: { required: false, type: () => Boolean }, trustServerCertificate: { required: false, type: () => Boolean } };
21
+ }
22
+ }
23
+ exports.CreateDatasourceManagementDto = CreateDatasourceManagementDto;
24
+ __decorate([
25
+ (0, swagger_1.ApiProperty)({ description: "Logical datasource key used in generated filenames and env prefixes." }),
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.Matches)(/^[a-z][a-z0-9-]*$/, {
28
+ message: "Datasource name must start with a lower-case letter and use only lower-case letters, numbers, or hyphens.",
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], CreateDatasourceManagementDto.prototype, "name", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiPropertyOptional)({ description: "Human friendly label shown in the admin interface." }),
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, class_validator_1.IsString)(),
36
+ __metadata("design:type", String)
37
+ ], CreateDatasourceManagementDto.prototype, "displayName", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiProperty)({ enum: [create_model_metadata_dto_1.DatasourceType.postgres, create_model_metadata_dto_1.DatasourceType.mysql, create_model_metadata_dto_1.DatasourceType.mssql] }),
40
+ (0, class_validator_1.IsIn)([create_model_metadata_dto_1.DatasourceType.postgres, create_model_metadata_dto_1.DatasourceType.mysql, create_model_metadata_dto_1.DatasourceType.mssql]),
41
+ __metadata("design:type", String)
42
+ ], CreateDatasourceManagementDto.prototype, "type", void 0);
43
+ __decorate([
44
+ (0, swagger_1.ApiProperty)(),
45
+ (0, class_validator_1.IsString)(),
46
+ __metadata("design:type", String)
47
+ ], CreateDatasourceManagementDto.prototype, "host", void 0);
48
+ __decorate([
49
+ (0, swagger_1.ApiProperty)(),
50
+ (0, class_transformer_1.Type)(() => Number),
51
+ (0, class_validator_1.IsInt)(),
52
+ (0, class_validator_1.Min)(1),
53
+ (0, class_validator_1.Max)(65535),
54
+ __metadata("design:type", Number)
55
+ ], CreateDatasourceManagementDto.prototype, "port", void 0);
56
+ __decorate([
57
+ (0, swagger_1.ApiProperty)(),
58
+ (0, class_validator_1.IsString)(),
59
+ __metadata("design:type", String)
60
+ ], CreateDatasourceManagementDto.prototype, "database", void 0);
61
+ __decorate([
62
+ (0, swagger_1.ApiProperty)(),
63
+ (0, class_validator_1.IsString)(),
64
+ __metadata("design:type", String)
65
+ ], CreateDatasourceManagementDto.prototype, "username", void 0);
66
+ __decorate([
67
+ (0, swagger_1.ApiProperty)(),
68
+ (0, class_validator_1.IsString)(),
69
+ __metadata("design:type", String)
70
+ ], CreateDatasourceManagementDto.prototype, "password", void 0);
71
+ __decorate([
72
+ (0, swagger_1.ApiPropertyOptional)(),
73
+ (0, class_validator_1.IsOptional)(),
74
+ (0, class_transformer_1.Type)(() => Boolean),
75
+ (0, class_validator_1.IsBoolean)(),
76
+ __metadata("design:type", Boolean)
77
+ ], CreateDatasourceManagementDto.prototype, "synchronize", void 0);
78
+ __decorate([
79
+ (0, swagger_1.ApiPropertyOptional)(),
80
+ (0, class_validator_1.IsOptional)(),
81
+ (0, class_transformer_1.Type)(() => Boolean),
82
+ (0, class_validator_1.IsBoolean)(),
83
+ __metadata("design:type", Boolean)
84
+ ], CreateDatasourceManagementDto.prototype, "logging", void 0);
85
+ __decorate([
86
+ (0, swagger_1.ApiPropertyOptional)(),
87
+ (0, class_validator_1.IsOptional)(),
88
+ (0, class_transformer_1.Type)(() => Boolean),
89
+ (0, class_validator_1.IsBoolean)(),
90
+ __metadata("design:type", Boolean)
91
+ ], CreateDatasourceManagementDto.prototype, "ssl", void 0);
92
+ __decorate([
93
+ (0, swagger_1.ApiPropertyOptional)(),
94
+ (0, class_validator_1.IsOptional)(),
95
+ (0, class_transformer_1.Type)(() => Boolean),
96
+ (0, class_validator_1.IsBoolean)(),
97
+ __metadata("design:type", Boolean)
98
+ ], CreateDatasourceManagementDto.prototype, "sslRejectUnauthorized", void 0);
99
+ __decorate([
100
+ (0, swagger_1.ApiPropertyOptional)(),
101
+ (0, class_validator_1.IsOptional)(),
102
+ (0, class_transformer_1.Type)(() => Number),
103
+ (0, class_validator_1.IsInt)(),
104
+ (0, class_validator_1.Min)(0),
105
+ __metadata("design:type", Number)
106
+ ], CreateDatasourceManagementDto.prototype, "poolMax", void 0);
107
+ __decorate([
108
+ (0, swagger_1.ApiPropertyOptional)(),
109
+ (0, class_validator_1.IsOptional)(),
110
+ (0, class_transformer_1.Type)(() => Number),
111
+ (0, class_validator_1.IsInt)(),
112
+ (0, class_validator_1.Min)(0),
113
+ __metadata("design:type", Number)
114
+ ], CreateDatasourceManagementDto.prototype, "connectionTimeoutMs", void 0);
115
+ __decorate([
116
+ (0, swagger_1.ApiPropertyOptional)(),
117
+ (0, class_validator_1.IsOptional)(),
118
+ (0, class_transformer_1.Type)(() => Number),
119
+ (0, class_validator_1.IsInt)(),
120
+ (0, class_validator_1.Min)(0),
121
+ __metadata("design:type", Number)
122
+ ], CreateDatasourceManagementDto.prototype, "idleTimeoutMs", void 0);
123
+ __decorate([
124
+ (0, swagger_1.ApiPropertyOptional)(),
125
+ (0, class_validator_1.IsOptional)(),
126
+ (0, class_transformer_1.Type)(() => Number),
127
+ (0, class_validator_1.IsInt)(),
128
+ (0, class_validator_1.Min)(0),
129
+ __metadata("design:type", Number)
130
+ ], CreateDatasourceManagementDto.prototype, "statementTimeoutMs", void 0);
131
+ __decorate([
132
+ (0, swagger_1.ApiPropertyOptional)(),
133
+ (0, class_validator_1.IsOptional)(),
134
+ (0, class_transformer_1.Type)(() => Number),
135
+ (0, class_validator_1.IsInt)(),
136
+ (0, class_validator_1.Min)(0),
137
+ __metadata("design:type", Number)
138
+ ], CreateDatasourceManagementDto.prototype, "idleInTxTimeoutMs", void 0);
139
+ __decorate([
140
+ (0, swagger_1.ApiPropertyOptional)(),
141
+ (0, class_validator_1.IsOptional)(),
142
+ (0, class_transformer_1.Type)(() => Number),
143
+ (0, class_validator_1.IsInt)(),
144
+ (0, class_validator_1.Min)(0),
145
+ __metadata("design:type", Number)
146
+ ], CreateDatasourceManagementDto.prototype, "retryAttempts", void 0);
147
+ __decorate([
148
+ (0, swagger_1.ApiPropertyOptional)(),
149
+ (0, class_validator_1.IsOptional)(),
150
+ (0, class_transformer_1.Type)(() => Number),
151
+ (0, class_validator_1.IsInt)(),
152
+ (0, class_validator_1.Min)(0),
153
+ __metadata("design:type", Number)
154
+ ], CreateDatasourceManagementDto.prototype, "retryDelayMs", void 0);
155
+ __decorate([
156
+ (0, swagger_1.ApiPropertyOptional)(),
157
+ (0, class_validator_1.IsOptional)(),
158
+ (0, class_transformer_1.Type)(() => Boolean),
159
+ (0, class_validator_1.IsBoolean)(),
160
+ __metadata("design:type", Boolean)
161
+ ], CreateDatasourceManagementDto.prototype, "encrypt", void 0);
162
+ __decorate([
163
+ (0, swagger_1.ApiPropertyOptional)(),
164
+ (0, class_validator_1.IsOptional)(),
165
+ (0, class_transformer_1.Type)(() => Boolean),
166
+ (0, class_validator_1.IsBoolean)(),
167
+ __metadata("design:type", Boolean)
168
+ ], CreateDatasourceManagementDto.prototype, "trustServerCertificate", void 0);
169
+ //# sourceMappingURL=create-datasource-management.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-datasource-management.dto.js","sourceRoot":"","sources":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AU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;yEACqB;AAO5B;IALC,IAAA,6BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;wEACoB;AAO3B;IALC,IAAA,6BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;oEACgB;AAOvB;IALC,IAAA,6BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;mEACe;AAMtB;IAJC,IAAA,6BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IACnB,IAAA,2BAAS,GAAE;;8DACM;AAMlB;IAJC,IAAA,6BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IACnB,IAAA,2BAAS,GAAE;;6EACqB","sourcesContent":["import { ApiProperty, ApiPropertyOptional } from \"@nestjs/swagger\";\nimport { Type } from \"class-transformer\";\nimport {\n IsBoolean,\n IsIn,\n IsInt,\n IsOptional,\n IsString,\n Matches,\n Max,\n Min,\n} from \"class-validator\";\nimport { DatasourceType } from \"./create-model-metadata.dto\";\n\nexport class CreateDatasourceManagementDto {\n @ApiProperty({ description: \"Logical datasource key used in generated filenames and env prefixes.\" })\n @IsString()\n @Matches(/^[a-z][a-z0-9-]*$/, {\n message: \"Datasource name must start with a lower-case letter and use only lower-case letters, numbers, or hyphens.\",\n })\n name: string;\n\n @ApiPropertyOptional({ description: \"Human friendly label shown in the admin interface.\" })\n @IsOptional()\n @IsString()\n displayName?: string;\n\n @ApiProperty({ enum: [DatasourceType.postgres, DatasourceType.mysql, DatasourceType.mssql] })\n @IsIn([DatasourceType.postgres, DatasourceType.mysql, DatasourceType.mssql])\n type: DatasourceType;\n\n @ApiProperty()\n @IsString()\n host: string;\n\n @ApiProperty()\n @Type(() => Number)\n @IsInt()\n @Min(1)\n @Max(65535)\n port: number;\n\n @ApiProperty()\n @IsString()\n database: string;\n\n @ApiProperty()\n @IsString()\n username: string;\n\n @ApiProperty()\n @IsString()\n password: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Boolean)\n @IsBoolean()\n synchronize?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Boolean)\n @IsBoolean()\n logging?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Boolean)\n @IsBoolean()\n ssl?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Boolean)\n @IsBoolean()\n sslRejectUnauthorized?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(0)\n poolMax?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(0)\n connectionTimeoutMs?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(0)\n idleTimeoutMs?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(0)\n statementTimeoutMs?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(0)\n idleInTxTimeoutMs?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(0)\n retryAttempts?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(0)\n retryDelayMs?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Boolean)\n @IsBoolean()\n encrypt?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @Type(() => Boolean)\n @IsBoolean()\n trustServerCertificate?: boolean;\n}\n"]}