@solidxai/core 0.1.11-beta.0 → 0.1.11-beta.11

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 (226) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/CLAUDE.md +26 -0
  3. package/dist/commands/migrate-removed-fields.command.d.ts +19 -0
  4. package/dist/commands/migrate-removed-fields.command.d.ts.map +1 -0
  5. package/dist/commands/migrate-removed-fields.command.js +77 -0
  6. package/dist/commands/migrate-removed-fields.command.js.map +1 -0
  7. package/dist/controllers/datasource-introspection.controller.d.ts +46 -1
  8. package/dist/controllers/datasource-introspection.controller.d.ts.map +1 -1
  9. package/dist/controllers/datasource-introspection.controller.js +38 -0
  10. package/dist/controllers/datasource-introspection.controller.js.map +1 -1
  11. package/dist/controllers/service.controller.d.ts +1 -0
  12. package/dist/controllers/service.controller.d.ts.map +1 -1
  13. package/dist/controllers/service.controller.js +2 -2
  14. package/dist/controllers/service.controller.js.map +1 -1
  15. package/dist/dtos/datasource-introspection-mapping.dto.d.ts +5 -0
  16. package/dist/dtos/datasource-introspection-mapping.dto.d.ts.map +1 -1
  17. package/dist/dtos/datasource-introspection-mapping.dto.js +24 -2
  18. package/dist/dtos/datasource-introspection-mapping.dto.js.map +1 -1
  19. package/dist/entities/{legacy-common-with-id.entity.d.ts → legacy-common-with-generated-id.entity.d.ts} +2 -2
  20. package/dist/entities/legacy-common-with-generated-id.entity.d.ts.map +1 -0
  21. package/dist/entities/{legacy-common-with-id.entity.js → legacy-common-with-generated-id.entity.js} +4 -4
  22. package/dist/entities/legacy-common-with-generated-id.entity.js.map +1 -0
  23. package/dist/entities/{legacy-common.entity.d.ts → legacy-common.entity-with-existing-id.entity.d.ts} +1 -1
  24. package/dist/entities/legacy-common.entity-with-existing-id.entity.d.ts.map +1 -0
  25. package/dist/entities/{legacy-common.entity.js → legacy-common.entity-with-existing-id.entity.js} +1 -1
  26. package/dist/entities/legacy-common.entity-with-existing-id.entity.js.map +1 -0
  27. package/dist/helpers/command.service.d.ts +2 -0
  28. package/dist/helpers/command.service.d.ts.map +1 -1
  29. package/dist/helpers/command.service.js +6 -2
  30. package/dist/helpers/command.service.js.map +1 -1
  31. package/dist/helpers/environment.helper.d.ts +1 -0
  32. package/dist/helpers/environment.helper.d.ts.map +1 -1
  33. package/dist/helpers/environment.helper.js +4 -0
  34. package/dist/helpers/environment.helper.js.map +1 -1
  35. package/dist/helpers/field-crud-managers/IntFieldCrudManager.d.ts.map +1 -1
  36. package/dist/helpers/field-crud-managers/IntFieldCrudManager.js +4 -1
  37. package/dist/helpers/field-crud-managers/IntFieldCrudManager.js.map +1 -1
  38. package/dist/helpers/model-metadata-helper.service.d.ts +2 -1
  39. package/dist/helpers/model-metadata-helper.service.d.ts.map +1 -1
  40. package/dist/helpers/model-metadata-helper.service.js +9 -5
  41. package/dist/helpers/model-metadata-helper.service.js.map +1 -1
  42. package/dist/helpers/nodemon-heartbeat.d.ts +5 -0
  43. package/dist/helpers/nodemon-heartbeat.d.ts.map +1 -0
  44. package/dist/helpers/nodemon-heartbeat.js +67 -0
  45. package/dist/helpers/nodemon-heartbeat.js.map +1 -0
  46. package/dist/helpers/solid-registry.d.ts +2 -1
  47. package/dist/helpers/solid-registry.d.ts.map +1 -1
  48. package/dist/helpers/solid-registry.js.map +1 -1
  49. package/dist/helpers/typeorm-db-helper.d.ts +1 -0
  50. package/dist/helpers/typeorm-db-helper.d.ts.map +1 -1
  51. package/dist/helpers/typeorm-db-helper.js +12 -0
  52. package/dist/helpers/typeorm-db-helper.js.map +1 -1
  53. package/dist/index.d.ts +3 -2
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +3 -2
  56. package/dist/index.js.map +1 -1
  57. package/dist/interfaces/datasource-introspection-provider.interface.d.ts +1 -0
  58. package/dist/interfaces/datasource-introspection-provider.interface.d.ts.map +1 -1
  59. package/dist/interfaces/datasource-introspection-provider.interface.js.map +1 -1
  60. package/dist/interfaces.d.ts +1 -0
  61. package/dist/interfaces.d.ts.map +1 -1
  62. package/dist/interfaces.js.map +1 -1
  63. package/dist/repository/scheduled-job.repository.d.ts +5 -2
  64. package/dist/repository/scheduled-job.repository.d.ts.map +1 -1
  65. package/dist/repository/scheduled-job.repository.js +66 -3
  66. package/dist/repository/scheduled-job.repository.js.map +1 -1
  67. package/dist/repository/security-rule.repository.d.ts +2 -2
  68. package/dist/repository/security-rule.repository.d.ts.map +1 -1
  69. package/dist/repository/security-rule.repository.js +6 -3
  70. package/dist/repository/security-rule.repository.js.map +1 -1
  71. package/dist/seeders/module-metadata-seeder.service.d.ts +43 -2
  72. package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
  73. package/dist/seeders/module-metadata-seeder.service.js +1173 -232
  74. package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
  75. package/dist/seeders/seed-data/solid-core-metadata.json +128 -34
  76. package/dist/services/action-metadata.service.d.ts +7 -0
  77. package/dist/services/action-metadata.service.d.ts.map +1 -1
  78. package/dist/services/action-metadata.service.js +76 -3
  79. package/dist/services/action-metadata.service.js.map +1 -1
  80. package/dist/services/api-key.service.d.ts.map +1 -1
  81. package/dist/services/api-key.service.js.map +1 -1
  82. package/dist/services/authentication.service.d.ts +2 -0
  83. package/dist/services/authentication.service.d.ts.map +1 -1
  84. package/dist/services/authentication.service.js +32 -11
  85. package/dist/services/authentication.service.js.map +1 -1
  86. package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.d.ts.map +1 -1
  87. package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.js +7 -5
  88. package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.js.map +1 -1
  89. package/dist/services/computed-fields/entity/concat-entity-computed-field-provider.service.d.ts +4 -0
  90. package/dist/services/computed-fields/entity/concat-entity-computed-field-provider.service.d.ts.map +1 -1
  91. package/dist/services/computed-fields/entity/concat-entity-computed-field-provider.service.js +18 -1
  92. package/dist/services/computed-fields/entity/concat-entity-computed-field-provider.service.js.map +1 -1
  93. package/dist/services/crud-helper.service.d.ts.map +1 -1
  94. package/dist/services/crud-helper.service.js +25 -12
  95. package/dist/services/crud-helper.service.js.map +1 -1
  96. package/dist/services/crud.service.d.ts +1 -0
  97. package/dist/services/crud.service.d.ts.map +1 -1
  98. package/dist/services/crud.service.js +27 -0
  99. package/dist/services/crud.service.js.map +1 -1
  100. package/dist/services/datasource-introspection/mssql-datasource-introspection-provider.service.d.ts.map +1 -1
  101. package/dist/services/datasource-introspection/mssql-datasource-introspection-provider.service.js +12 -0
  102. package/dist/services/datasource-introspection/mssql-datasource-introspection-provider.service.js.map +1 -1
  103. package/dist/services/datasource-introspection/mysql-datasource-introspection-provider.service.d.ts.map +1 -1
  104. package/dist/services/datasource-introspection/mysql-datasource-introspection-provider.service.js +2 -0
  105. package/dist/services/datasource-introspection/mysql-datasource-introspection-provider.service.js.map +1 -1
  106. package/dist/services/datasource-introspection/postgres-datasource-introspection-provider.service.d.ts.map +1 -1
  107. package/dist/services/datasource-introspection/postgres-datasource-introspection-provider.service.js +28 -15
  108. package/dist/services/datasource-introspection/postgres-datasource-introspection-provider.service.js.map +1 -1
  109. package/dist/services/datasource-introspection.service.d.ts +62 -2
  110. package/dist/services/datasource-introspection.service.d.ts.map +1 -1
  111. package/dist/services/datasource-introspection.service.js +654 -186
  112. package/dist/services/datasource-introspection.service.js.map +1 -1
  113. package/dist/services/import-transaction.service.d.ts.map +1 -1
  114. package/dist/services/import-transaction.service.js +3 -0
  115. package/dist/services/import-transaction.service.js.map +1 -1
  116. package/dist/services/locale.service.d.ts +14 -0
  117. package/dist/services/locale.service.d.ts.map +1 -1
  118. package/dist/services/locale.service.js +83 -0
  119. package/dist/services/locale.service.js.map +1 -1
  120. package/dist/services/mediaStorageProviders/file-s3-storage-provider.js +10 -10
  121. package/dist/services/mediaStorageProviders/file-s3-storage-provider.js.map +1 -1
  122. package/dist/services/menu-item-metadata.service.d.ts.map +1 -1
  123. package/dist/services/menu-item-metadata.service.js +1 -0
  124. package/dist/services/menu-item-metadata.service.js.map +1 -1
  125. package/dist/services/model-metadata.service.d.ts +3 -0
  126. package/dist/services/model-metadata.service.d.ts.map +1 -1
  127. package/dist/services/model-metadata.service.js +78 -0
  128. package/dist/services/model-metadata.service.js.map +1 -1
  129. package/dist/services/module-metadata.service.d.ts.map +1 -1
  130. package/dist/services/module-metadata.service.js +28 -0
  131. package/dist/services/module-metadata.service.js.map +1 -1
  132. package/dist/services/removed-field-migration.service.d.ts +30 -0
  133. package/dist/services/removed-field-migration.service.d.ts.map +1 -0
  134. package/dist/services/removed-field-migration.service.js +319 -0
  135. package/dist/services/removed-field-migration.service.js.map +1 -0
  136. package/dist/services/role-metadata.service.d.ts +5 -0
  137. package/dist/services/role-metadata.service.d.ts.map +1 -1
  138. package/dist/services/role-metadata.service.js +95 -33
  139. package/dist/services/role-metadata.service.js.map +1 -1
  140. package/dist/services/settings/default-settings-provider.service.d.ts +244 -0
  141. package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
  142. package/dist/services/settings/default-settings-provider.service.js +120 -0
  143. package/dist/services/settings/default-settings-provider.service.js.map +1 -1
  144. package/dist/services/solid-ts-morph.service.d.ts +6 -0
  145. package/dist/services/solid-ts-morph.service.d.ts.map +1 -1
  146. package/dist/services/solid-ts-morph.service.js +43 -0
  147. package/dist/services/solid-ts-morph.service.js.map +1 -1
  148. package/dist/services/view-metadata.service.d.ts +6 -0
  149. package/dist/services/view-metadata.service.d.ts.map +1 -1
  150. package/dist/services/view-metadata.service.js +70 -8
  151. package/dist/services/view-metadata.service.js.map +1 -1
  152. package/dist/solid-core.module.d.ts.map +1 -1
  153. package/dist/solid-core.module.js +4 -0
  154. package/dist/solid-core.module.js.map +1 -1
  155. package/dist/subscribers/audit.subscriber.d.ts +5 -1
  156. package/dist/subscribers/audit.subscriber.d.ts.map +1 -1
  157. package/dist/subscribers/audit.subscriber.js +76 -12
  158. package/dist/subscribers/audit.subscriber.js.map +1 -1
  159. package/dist/subscribers/computed-entity-field.subscriber.d.ts +9 -1
  160. package/dist/subscribers/computed-entity-field.subscriber.d.ts.map +1 -1
  161. package/dist/subscribers/computed-entity-field.subscriber.js +45 -11
  162. package/dist/subscribers/computed-entity-field.subscriber.js.map +1 -1
  163. package/dist/subscribers/created-by-updated-by.subscriber.d.ts.map +1 -1
  164. package/dist/subscribers/created-by-updated-by.subscriber.js.map +1 -1
  165. package/dist/subscribers/field-metadata.subscriber.d.ts.map +1 -1
  166. package/dist/subscribers/field-metadata.subscriber.js.map +1 -1
  167. package/dist/subscribers/scheduled-job.subscriber.d.ts.map +1 -1
  168. package/dist/subscribers/scheduled-job.subscriber.js +3 -2
  169. package/dist/subscribers/scheduled-job.subscriber.js.map +1 -1
  170. package/dist/subscribers/security-rule.subscriber.d.ts.map +1 -1
  171. package/dist/subscribers/security-rule.subscriber.js +5 -3
  172. package/dist/subscribers/security-rule.subscriber.js.map +1 -1
  173. package/package.json +1 -1
  174. package/src/commands/migrate-removed-fields.command.ts +81 -0
  175. package/src/controllers/datasource-introspection.controller.ts +27 -1
  176. package/src/controllers/service.controller.ts +3 -2
  177. package/src/dtos/datasource-introspection-mapping.dto.ts +15 -0
  178. package/src/entities/{legacy-common-with-id.entity.ts → legacy-common-with-generated-id.entity.ts} +1 -1
  179. package/src/helpers/command.service.ts +10 -2
  180. package/src/helpers/environment.helper.ts +11 -0
  181. package/src/helpers/field-crud-managers/IntFieldCrudManager.ts +4 -1
  182. package/src/helpers/model-metadata-helper.service.ts +8 -3
  183. package/src/helpers/nodemon-heartbeat.ts +59 -0
  184. package/src/helpers/solid-registry.ts +7 -1
  185. package/src/helpers/typeorm-db-helper.ts +15 -0
  186. package/src/index.ts +3 -2
  187. package/src/interfaces/datasource-introspection-provider.interface.ts +1 -0
  188. package/src/interfaces.ts +1 -0
  189. package/src/repository/scheduled-job.repository.ts +83 -4
  190. package/src/repository/security-rule.repository.ts +10 -4
  191. package/src/seeders/module-metadata-seeder.service.ts +1415 -264
  192. package/src/seeders/seed-data/solid-core-metadata.json +128 -34
  193. package/src/services/action-metadata.service.ts +87 -2
  194. package/src/services/api-key.service.ts +36 -36
  195. package/src/services/authentication.service.ts +46 -12
  196. package/src/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.ts +11 -5
  197. package/src/services/computed-fields/entity/concat-entity-computed-field-provider.service.ts +15 -1
  198. package/src/services/crud-helper.service.ts +25 -12
  199. package/src/services/crud.service.ts +36 -11
  200. package/src/services/datasource-introspection/mssql-datasource-introspection-provider.service.ts +12 -0
  201. package/src/services/datasource-introspection/mysql-datasource-introspection-provider.service.ts +2 -0
  202. package/src/services/datasource-introspection/postgres-datasource-introspection-provider.service.ts +28 -15
  203. package/src/services/datasource-introspection.service.ts +811 -161
  204. package/src/services/import-transaction.service.ts +5 -0
  205. package/src/services/locale.service.ts +111 -3
  206. package/src/services/mediaStorageProviders/file-s3-storage-provider.ts +2 -2
  207. package/src/services/menu-item-metadata.service.ts +2 -1
  208. package/src/services/model-metadata.service.ts +109 -1
  209. package/src/services/module-metadata.service.ts +36 -0
  210. package/src/services/removed-field-migration.service.ts +334 -0
  211. package/src/services/role-metadata.service.ts +112 -49
  212. package/src/services/settings/default-settings-provider.service.ts +120 -0
  213. package/src/services/solid-ts-morph.service.ts +61 -1
  214. package/src/services/view-metadata.service.ts +83 -9
  215. package/src/solid-core.module.ts +4 -0
  216. package/src/subscribers/audit.subscriber.ts +101 -18
  217. package/src/subscribers/computed-entity-field.subscriber.ts +81 -28
  218. package/src/subscribers/created-by-updated-by.subscriber.ts +3 -0
  219. package/src/subscribers/field-metadata.subscriber.ts +3 -0
  220. package/src/subscribers/scheduled-job.subscriber.ts +3 -2
  221. package/src/subscribers/security-rule.subscriber.ts +8 -3
  222. package/dist/entities/legacy-common-with-id.entity.d.ts.map +0 -1
  223. package/dist/entities/legacy-common-with-id.entity.js.map +0 -1
  224. package/dist/entities/legacy-common.entity.d.ts.map +0 -1
  225. package/dist/entities/legacy-common.entity.js.map +0 -1
  226. /package/src/entities/{legacy-common.entity.ts → legacy-common.entity-with-existing-id.entity.ts} +0 -0
@@ -6,7 +6,8 @@
6
6
  "WebFetch(domain:github.com)",
7
7
  "Read(//Users/oswald/projects/Solid_Starters/solidctl/**)",
8
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*)"
9
+ "Bash(find /Users/oswald/projects/Solid_Starters/solid-core-module -type d -name migration* -o -name *database*)",
10
+ "Bash(node verify-imports.js)"
10
11
  ],
11
12
  "additionalDirectories": [
12
13
  "/Users/oswald/projects/Solid_Starters/solidctl"
package/CLAUDE.md ADDED
@@ -0,0 +1,26 @@
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
19
+
20
+ # Testing reference project
21
+ # This is the reference library management project that is used for testing and development of SolidX features. It is located at the below path:
22
+ /Users/oswald/projects/Solid_Starters/solid-library-management
23
+
24
+ # Code Builder project
25
+ # This is the project that contains the code builder which generates code based on user input and templates. It is located at the below path:
26
+ /Users/oswald/projects/Solid_Starters/solid-code-builder
@@ -0,0 +1,19 @@
1
+ import { CommandRunner } from "nest-commander";
2
+ import { RemovedFieldMigrationService } from "../services/removed-field-migration.service";
3
+ import { ModelMetadataService } from "../services/model-metadata.service";
4
+ interface CommandOptions {
5
+ name: string;
6
+ dryRun?: boolean;
7
+ }
8
+ export declare class MigrateRemovedFieldsCommand extends CommandRunner {
9
+ private readonly removedFieldMigrationService;
10
+ private readonly modelMetadataService;
11
+ constructor(removedFieldMigrationService: RemovedFieldMigrationService, modelMetadataService: ModelMetadataService);
12
+ private readonly logger;
13
+ run(_passedParam: string[], options?: CommandOptions): Promise<void>;
14
+ parseName(val: string): string;
15
+ parseDryRun(val: string): boolean;
16
+ private validate;
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=migrate-removed-fields.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-removed-fields.command.d.ts","sourceRoot":"","sources":["../../src/commands/migrate-removed-fields.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAE5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,UAAU,cAAc;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,qBAIa,2BAA4B,SAAQ,aAAa;IAEtD,OAAO,CAAC,QAAQ,CAAC,4BAA4B;IAC7C,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBADpB,4BAA4B,EAAE,4BAA4B,EAC1D,oBAAoB,EAAE,oBAAoB;IAM/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgD;IAEjE,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC1E,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAQ9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKjC,OAAO,CAAC,QAAQ;CAMnB"}
@@ -0,0 +1,77 @@
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 MigrateRemovedFieldsCommand_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.MigrateRemovedFieldsCommand = void 0;
14
+ const common_1 = require("@nestjs/common");
15
+ const nest_commander_1 = require("nest-commander");
16
+ const removed_field_migration_service_1 = require("../services/removed-field-migration.service");
17
+ const helper_1 = require("./helper");
18
+ const model_metadata_service_1 = require("../services/model-metadata.service");
19
+ let MigrateRemovedFieldsCommand = MigrateRemovedFieldsCommand_1 = class MigrateRemovedFieldsCommand extends nest_commander_1.CommandRunner {
20
+ constructor(removedFieldMigrationService, modelMetadataService) {
21
+ super();
22
+ this.removedFieldMigrationService = removedFieldMigrationService;
23
+ this.modelMetadataService = modelMetadataService;
24
+ this.logger = new common_1.Logger(MigrateRemovedFieldsCommand_1.name);
25
+ }
26
+ async run(_passedParam, options) {
27
+ const errors = this.validate(options);
28
+ if (errors.length) {
29
+ errors.forEach((error) => this.logger.error(error));
30
+ return;
31
+ }
32
+ const dryRun = options?.dryRun ?? true;
33
+ const result = await this.removedFieldMigrationService.migrateMarkedFields(options.name, dryRun);
34
+ result.operations.forEach((operation) => this.logger.log(operation));
35
+ }
36
+ parseName(val) {
37
+ return val;
38
+ }
39
+ parseDryRun(val) {
40
+ this.logger.debug(`Dry run : ${val}`);
41
+ return val === "false" ? false : true;
42
+ }
43
+ validate(options) {
44
+ if (!options?.name) {
45
+ return [new helper_1.CommandError("Model Name is required")];
46
+ }
47
+ return [];
48
+ }
49
+ };
50
+ exports.MigrateRemovedFieldsCommand = MigrateRemovedFieldsCommand;
51
+ __decorate([
52
+ (0, nest_commander_1.Option)({
53
+ flags: "-n, --name <model name>",
54
+ description: "Model name (singularName) from the ss_model_metadata table",
55
+ }),
56
+ __metadata("design:type", Function),
57
+ __metadata("design:paramtypes", [String]),
58
+ __metadata("design:returntype", String)
59
+ ], MigrateRemovedFieldsCommand.prototype, "parseName", null);
60
+ __decorate([
61
+ (0, nest_commander_1.Option)({
62
+ flags: "-d, --dryRun [dry run]",
63
+ description: "Dry run the command",
64
+ }),
65
+ __metadata("design:type", Function),
66
+ __metadata("design:paramtypes", [String]),
67
+ __metadata("design:returntype", Boolean)
68
+ ], MigrateRemovedFieldsCommand.prototype, "parseDryRun", null);
69
+ exports.MigrateRemovedFieldsCommand = MigrateRemovedFieldsCommand = MigrateRemovedFieldsCommand_1 = __decorate([
70
+ (0, nest_commander_1.Command)({
71
+ name: "migrate-removed-fields",
72
+ description: "Drops live database artifacts for fields marked for removal and cleans the related metadata.",
73
+ }),
74
+ __metadata("design:paramtypes", [removed_field_migration_service_1.RemovedFieldMigrationService,
75
+ model_metadata_service_1.ModelMetadataService])
76
+ ], MigrateRemovedFieldsCommand);
77
+ //# sourceMappingURL=migrate-removed-fields.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-removed-fields.command.js","sourceRoot":"","sources":["../../src/commands/migrate-removed-fields.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwC;AACxC,mDAAgE;AAChE,iGAA4F;AAC5F,qCAAwC;AACxC,+EAA2E;AAWpE,IAAM,2BAA2B,mCAAjC,MAAM,2BAA4B,SAAQ,8BAAa;IAC1D,YACqB,4BAA0D,EAC1D,oBAA0C;QAG3D,KAAK,EAAE,CAAC;QAJS,iCAA4B,GAA5B,4BAA4B,CAA8B;QAC1D,yBAAoB,GAApB,oBAAoB,CAAsB;QAM9C,WAAM,GAAG,IAAI,eAAM,CAAC,6BAA2B,CAAC,IAAI,C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IAAA,uBAAM,EAAC;QACJ,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,qBAAqB;KACrC,CAAC;;;;8DAID;sCAzDQ,2BAA2B;IAJvC,IAAA,wBAAO,EAAC;QACL,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,8FAA8F;KAC9G,CAAC;qCAGqD,8DAA4B;QACpC,6CAAoB;GAHtD,2BAA2B,CAiEvC","sourcesContent":["import { Logger } from \"@nestjs/common\";\nimport { Command, CommandRunner, Option } from \"nest-commander\";\nimport { RemovedFieldMigrationService } from \"src/services/removed-field-migration.service\";\nimport { CommandError } from \"./helper\";\nimport { ModelMetadataService } from \"src/services/model-metadata.service\";\n\ninterface CommandOptions {\n name: string;\n dryRun?: boolean;\n}\n\n@Command({\n name: \"migrate-removed-fields\",\n description: \"Drops live database artifacts for fields marked for removal and cleans the related metadata.\",\n})\nexport class MigrateRemovedFieldsCommand extends CommandRunner {\n constructor(\n private readonly removedFieldMigrationService: RemovedFieldMigrationService,\n private readonly modelMetadataService: ModelMetadataService,\n\n ) {\n super();\n }\n\n private readonly logger = new Logger(MigrateRemovedFieldsCommand.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 dryRun = options?.dryRun ?? true;\n\n // STEP 1: Capture fields BEFORE migration deletes metadata\n // const model = await this.modelMetadataService.findOneByUserKey(\n // options.name,\n // [\"module\", \"fields\"],\n // );\n\n // const fieldsForRemoval = model.fields.filter(\n // field => field.isMarkedForRemoval,\n // );\n\n // // STEP 2: Run remove-fields schematic first\n // if (!dryRun && fieldsForRemoval.length > 0) {\n // // await this.modelMetadataService.executeRemoveFieldsOnly(options.name,fieldsForRemoval.map(f => f.name),false,);\n // await this.modelMetadataService.executeRemoveFieldsWithModel(model, fieldsForRemoval.map(f => f.name),false,);\n // }\n\n // STEP 3: Then perform DB + metadata cleanup\n const result = await this.removedFieldMigrationService.migrateMarkedFields(options.name, dryRun,);\n\n result.operations.forEach((operation) => this.logger.log(operation));\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"]}
@@ -1,4 +1,4 @@
1
- import { DatasourceIntrospectionMappingDto } from "../dtos/datasource-introspection-mapping.dto";
1
+ import { DatasourceIntrospectionMappingDto, DatasourceIntrospectionRunMigrationDto } from "../dtos/datasource-introspection-mapping.dto";
2
2
  import { DatasourceIntrospectionService } from "../services/datasource-introspection.service";
3
3
  export declare class DatasourceIntrospectionController {
4
4
  private readonly datasourceIntrospectionService;
@@ -91,6 +91,10 @@ export declare class DatasourceIntrospectionController {
91
91
  suggestedUserKeyField: string;
92
92
  columnCount: number;
93
93
  physicalColumnCount: number;
94
+ hasPrimaryKey: boolean;
95
+ primaryKeyColumnCount: number;
96
+ primaryKeyColumnNames: string[];
97
+ mappingBlockedReason: string | null;
94
98
  }[];
95
99
  meta: {
96
100
  totalRecords: number;
@@ -133,10 +137,15 @@ export declare class DatasourceIntrospectionController {
133
137
  suggestedUserKeyField: string;
134
138
  columnCount: number;
135
139
  physicalColumnCount: number;
140
+ hasPrimaryKey: boolean;
141
+ primaryKeyColumnCount: number;
142
+ primaryKeyColumnNames: string[];
143
+ mappingBlockedReason: string | null;
136
144
  };
137
145
  columns: {
138
146
  columnName: string;
139
147
  fieldName: string;
148
+ displayName: string;
140
149
  dataType: string;
141
150
  solidFieldType: string;
142
151
  ormType: string;
@@ -147,6 +156,7 @@ export declare class DatasourceIntrospectionController {
147
156
  numericScale: number | null;
148
157
  ordinalPosition: number | null;
149
158
  isAutoGenerated: boolean;
159
+ isPrimaryKey: boolean;
150
160
  handledBySuperclass: boolean;
151
161
  superclassFieldName: string | null;
152
162
  }[];
@@ -211,6 +221,18 @@ export declare class DatasourceIntrospectionController {
211
221
  filePath: string;
212
222
  model: Record<string, any>;
213
223
  };
224
+ summary: {
225
+ includedColumnNames: string[];
226
+ removedColumnNames: string[];
227
+ missingSystemColumns: string[];
228
+ generatedSystemColumnCount: number;
229
+ };
230
+ };
231
+ }>;
232
+ createMigrationArtifacts(moduleId: number, mappingDto: DatasourceIntrospectionMappingDto): Promise<{
233
+ data: {
234
+ modelId: number;
235
+ operation: "create" | "update";
214
236
  migration: {
215
237
  written: boolean;
216
238
  willGenerate: boolean;
@@ -222,6 +244,13 @@ export declare class DatasourceIntrospectionController {
222
244
  note: string;
223
245
  missingSystemColumns: string[];
224
246
  };
247
+ datasourceFile: {
248
+ filePath: string;
249
+ created: boolean;
250
+ updated: boolean;
251
+ entityRegistered: boolean;
252
+ migrationGlobRegistered: boolean;
253
+ };
225
254
  summary: {
226
255
  includedColumnNames: string[];
227
256
  removedColumnNames: string[];
@@ -230,5 +259,21 @@ export declare class DatasourceIntrospectionController {
230
259
  };
231
260
  };
232
261
  }>;
262
+ generateCode(moduleId: number): Promise<{
263
+ data: {
264
+ moduleId: number;
265
+ output: string;
266
+ message: string;
267
+ };
268
+ }>;
269
+ runMigration(moduleId: number, payload: DatasourceIntrospectionRunMigrationDto): Promise<{
270
+ data: {
271
+ moduleId: number;
272
+ datasource: string;
273
+ output: string;
274
+ command: string;
275
+ message: string;
276
+ };
277
+ }>;
233
278
  }
234
279
  //# sourceMappingURL=datasource-introspection.controller.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"datasource-introspection.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/datasource-introspection.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,sCAAsC,EAAE,MAAM,8CAA8C,CAAC;AACzI,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;;;;;;;;;;;;;;;;IAOzD,wBAAwB,CACa,QAAQ,EAAE,MAAM,EACzC,UAAU,EAAE,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOzD,YAAY,CACyB,QAAQ,EAAE,MAAM;;;;;;;IAOrD,YAAY,CACyB,QAAQ,EAAE,MAAM,EACzC,OAAO,EAAE,sCAAsC;;;;;;;;;CAI9D"}
@@ -37,6 +37,15 @@ let DatasourceIntrospectionController = class DatasourceIntrospectionController
37
37
  applyMapping(moduleId, mappingDto) {
38
38
  return this.datasourceIntrospectionService.applyMapping(moduleId, mappingDto);
39
39
  }
40
+ createMigrationArtifacts(moduleId, mappingDto) {
41
+ return this.datasourceIntrospectionService.createMigrationArtifacts(moduleId, mappingDto);
42
+ }
43
+ generateCode(moduleId) {
44
+ return this.datasourceIntrospectionService.generateCode(moduleId);
45
+ }
46
+ runMigration(moduleId, payload) {
47
+ return this.datasourceIntrospectionService.runMigration(moduleId, payload.datasource);
48
+ }
40
49
  };
41
50
  exports.DatasourceIntrospectionController = DatasourceIntrospectionController;
42
51
  __decorate([
@@ -90,6 +99,35 @@ __decorate([
90
99
  __metadata("design:paramtypes", [Number, datasource_introspection_mapping_dto_1.DatasourceIntrospectionMappingDto]),
91
100
  __metadata("design:returntype", void 0)
92
101
  ], DatasourceIntrospectionController.prototype, "applyMapping", null);
102
+ __decorate([
103
+ (0, swagger_1.ApiBearerAuth)("jwt"),
104
+ (0, common_1.Post)("modules/:moduleId/create-migration-artifacts"),
105
+ openapi.ApiResponse({ status: 201 }),
106
+ __param(0, (0, common_1.Param)("moduleId", common_1.ParseIntPipe)),
107
+ __param(1, (0, common_1.Body)()),
108
+ __metadata("design:type", Function),
109
+ __metadata("design:paramtypes", [Number, datasource_introspection_mapping_dto_1.DatasourceIntrospectionMappingDto]),
110
+ __metadata("design:returntype", void 0)
111
+ ], DatasourceIntrospectionController.prototype, "createMigrationArtifacts", null);
112
+ __decorate([
113
+ (0, swagger_1.ApiBearerAuth)("jwt"),
114
+ (0, common_1.Post)("modules/:moduleId/generate-code"),
115
+ openapi.ApiResponse({ status: 201 }),
116
+ __param(0, (0, common_1.Param)("moduleId", common_1.ParseIntPipe)),
117
+ __metadata("design:type", Function),
118
+ __metadata("design:paramtypes", [Number]),
119
+ __metadata("design:returntype", void 0)
120
+ ], DatasourceIntrospectionController.prototype, "generateCode", null);
121
+ __decorate([
122
+ (0, swagger_1.ApiBearerAuth)("jwt"),
123
+ (0, common_1.Post)("modules/:moduleId/run-migration"),
124
+ openapi.ApiResponse({ status: 201 }),
125
+ __param(0, (0, common_1.Param)("moduleId", common_1.ParseIntPipe)),
126
+ __param(1, (0, common_1.Body)()),
127
+ __metadata("design:type", Function),
128
+ __metadata("design:paramtypes", [Number, datasource_introspection_mapping_dto_1.DatasourceIntrospectionRunMigrationDto]),
129
+ __metadata("design:returntype", void 0)
130
+ ], DatasourceIntrospectionController.prototype, "runMigration", null);
93
131
  exports.DatasourceIntrospectionController = DatasourceIntrospectionController = __decorate([
94
132
  (0, common_1.Controller)("datasource-introspection"),
95
133
  (0, swagger_1.ApiTags)("Solid Core"),
@@ -1 +1 @@
1
- {"version":3,"file":"datasource-introspection.controller.js","sourceRoot":"","sources":["../../src/controllers/datasource-introspection.controller.ts"],"names":[],"mappings":";;;;;;;;;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AC,YAAY,CAAC,CAAA;;;;kEAGvB;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,YAAG,EAAC,gCAAgC,CAAC;;IAEjC,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;IACd,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;;;;uEAGnB;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,mCAAmC,CAAC;;IAErC,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAa,wEAAiC;;uEAGxD;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,iCAAiC,CAAC;;IAEnC,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAa,wEAAiC;;qEAGxD;4CAjDQ,iCAAiC;IAF7C,IAAA,mBAAU,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"]}
1
+ {"version":3,"file":"datasource-introspection.controller.js","sourceRoot":"","sources":["../../src/controllers/datasource-introspection.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyF;AACzF,6CAAyD;AACzD,uGAAyI;AACzI,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,C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UAAU,EAAE,qBAAY,CAAC,CAAA;;;;qEAGnC;AAID;IAFC,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,iCAAiC,CAAC;;IAEnC,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAU,6EAAsC;;qEAG1D;4CA3EQ,iCAAiC;IAF7C,IAAA,mBAAU,EAAC,0BAA0B,CAAC;IACtC,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAGmC,iEAA8B;GAF1E,iCAAiC,CA4E7C","sourcesContent":["import { Body, Controller, Get, Param, ParseIntPipe, Post, Query } from \"@nestjs/common\";\nimport { ApiBearerAuth, ApiTags } from \"@nestjs/swagger\";\nimport { DatasourceIntrospectionMappingDto, DatasourceIntrospectionRunMigrationDto } 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 @ApiBearerAuth(\"jwt\")\n @Post(\"modules/:moduleId/create-migration-artifacts\")\n createMigrationArtifacts(\n @Param(\"moduleId\", ParseIntPipe) moduleId: number,\n @Body() mappingDto: DatasourceIntrospectionMappingDto,\n ) {\n return this.datasourceIntrospectionService.createMigrationArtifacts(moduleId, mappingDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post(\"modules/:moduleId/generate-code\")\n generateCode(\n @Param(\"moduleId\", ParseIntPipe) moduleId: number,\n ) {\n return this.datasourceIntrospectionService.generateCode(moduleId);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post(\"modules/:moduleId/run-migration\")\n runMigration(\n @Param(\"moduleId\", ParseIntPipe) moduleId: number,\n @Body() payload: DatasourceIntrospectionRunMigrationDto,\n ) {\n return this.datasourceIntrospectionService.runMigration(moduleId, payload.datasource);\n }\n}\n"]}
@@ -4,6 +4,7 @@ import { SolidRegistry } from '../helpers/solid-registry';
4
4
  export interface PostProcessCodeGenConfig {
5
5
  runModuleMetadataSeeder?: boolean;
6
6
  runSolidIngestion?: boolean;
7
+ modulesToSeed?: string[];
7
8
  }
8
9
  export declare class ServiceController {
9
10
  private readonly solidRegistry;
@@ -1 +1 @@
1
- {"version":3,"file":"service.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/service.controller.ts"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gBAGxC,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,kBAAkB;IAKpD,QAAQ;;;IA+DF,QAAQ,CAAS,QAAQ,EAAE,GAAG;;;IAkB9B,yBAAyB,CAAS,MAAM,EAAE,wBAAwB;CAmD3E"}
@@ -43,7 +43,7 @@ let ServiceController = ServiceController_1 = class ServiceController {
43
43
  return;
44
44
  }
45
45
  this.logger.log(`Running the seed() method for seeder :${seeder.constructor.name}`);
46
- await seeder.seed();
46
+ await seeder.seed({ modulesToSeed: seedData?.modulesToSeed });
47
47
  return { message: `seed data for ${seederName}` };
48
48
  }
49
49
  async postProcessCodeGeneration(config) {
@@ -60,7 +60,7 @@ let ServiceController = ServiceController_1 = class ServiceController {
60
60
  this.logger.error(`Seeder service ModuleMetadataSeederService not found. Does your service have a seed() method?`);
61
61
  }
62
62
  else {
63
- await seeder.seed();
63
+ await seeder.seed({ modulesToSeed: config.modulesToSeed });
64
64
  }
65
65
  }
66
66
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"service.controller.js","sourceRoot":"","sources":["../../src/controllers/service.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,6CAAyD;AAEzD,qEAAyD;AACzD,0EAAsE;AAEtE,uEAAmE;AACnE,8DAA0D;AAUnD,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAG1B,YACqB,aAA4B,EAC5B,gBAAkC,EAClC,WAA+B;QAF/B,kBAAa,GAAb,aAAa,CAAe;QAC5B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,gBAAW,GAAX,WAAW,CAAoB;QALnC,WAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAMzD,CAAC;IAIL,QAAQ;QACJ,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC9B,CAAC;IA6DK,AAAN,KAAK,CAAC,QAAQ,CAAS,QAAa;QAChC,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gBACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+FAA+F,CAAC,CAAC;YACvH,CAAC;iBAAM,CAAC;gBACJ,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qFAAqF,CAAC,CAAC;QAC7G,CAAC;QAGD,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;QAKrG,CAAC;IACL,CAAC;CAqBJ,CAAA;AA/IY,8CAAiB;AAW1B;IAFC,IAAA,yBAAM,GAAE;IACR,IAAA,YAAG,EAAC,MAAM,CAAC;;;;;iDAGX;AA6DK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,MAAM,CAAC;;IACG,WAAA,IAAA,aAAI,GAAE,CAAA;;;;iDAcrB;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,8BAA8B,CAAC;;IACJ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;kEA8BtC;4BA1HQ,iBAAiB;IAJ7B,IAAA,mBAAU,EAAC,EAAE,CAAC;IACd,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAOkB,8BAAa;QACV,qCAAgB;QACrB,yCAAkB;GAN3C,iBAAiB,CA+I7B","sourcesContent":["import { Body, Controller, Get, Logger, Post } from '@nestjs/common';\nimport { ApiBearerAuth, ApiTags } from '@nestjs/swagger';\nimport { ActiveUser } from 'src/decorators/active-user.decorator';\nimport { Public } from 'src/decorators/public.decorator';\nimport { ErrorMapperService } from 'src/helpers/error-mapper.service';\nimport { ActiveUserData } from 'src/interfaces/active-user-data.interface';\nimport { MqMessageService } from 'src/services/mq-message.service';\nimport { SolidRegistry } from '../helpers/solid-registry';\n\nexport interface PostProcessCodeGenConfig {\n runModuleMetadataSeeder?: boolean; // If true, regenerate module metadata\n runSolidIngestion?: boolean; // If true, run solid ingestion command\n}\n@Controller('')\n@ApiTags(\"Solid Core\")\n// @UseGuards(ThrottlerGuard)\n// @SkipThrottle({ short: true, login: true, burst: true, sustained: true }) // Skip all\nexport class ServiceController {\n private readonly logger = new Logger(ServiceController.name);\n\n constructor(\n private readonly solidRegistry: SolidRegistry,\n private readonly mqMessageService: MqMessageService,\n private readonly errorMapper: ErrorMapperService,\n ) { }\n\n @Public()\n @Get('ping')\n pingPong() {\n return { pong: 'v1.0.2' };\n }\n\n // @ApiBearerAuth(\"jwt\")\n // @Get('mcp/ping')\n // async mcpPingPong(@ActiveUser() activeUser: ActiveUserData) {\n // // TODO: do a MCP client invocation, wait for response and return.\n // // If failure then decide shape to return.\n\n // const threadId = `pingPongTxn-${activeUser.sub}`;\n // const dto = { prompt: \"Can you do 1 + 1\", moduleName: \"solidCoreModule\" }\n // const { queueMessageId, aiInteractionId } = await this.aiInteractionService.triggerMcpClientJob(\n // dto,\n // activeUser.sub,\n // true,\n // threadId\n // );\n\n // this.logger.debug(`mcp ping pong job triggered: queueMessageId=${queueMessageId}, aiInteractionId=${aiInteractionId}`);\n\n // // Wait up to 2 minutes, start at 500ms poll, back off to max 2s, throw if failed:\n // const result = await this.mqMessageService.waitForTerminalStatus(queueMessageId, {\n // timeoutMs: 2 * 60 * 1000,\n // intervalMs: 500,\n // maxIntervalMs: 2000,\n // throwOnFailure: false,\n // });\n\n // this.logger.debug(`mcp ping pong job finished with stage=${result.stage}`)\n\n // this.logger.debug(`mcp ping pong trying to find genai (child) interaction for aiInteraction for id=${aiInteractionId}`)\n\n // // @ts-ignore\n // const genAiInteractions = await this.aiInteractionService.find({\n // filters: {\n // parentInteraction: {\n // id: {\n // $eq: aiInteractionId\n // }\n // }\n // }\n // });\n\n // const genAiInteraction = genAiInteractions['records'][0];\n // this.logger.debug(genAiInteraction.message);\n\n // this.logger.debug(`identified gen-ai interaction with id=${genAiInteraction.id}`);\n // this.logger.debug(`proceeding with applying the gen-ai interaction`)\n\n // return {\n // mcpPong: 'v1.0.2',\n // genAiInteraction: {\n // status: genAiInteraction.status,\n // errorCode: genAiInteraction.status === 'failed' ? this.errorMapper.mapMessage(genAiInteraction.errorMessage, genAiInteraction.metadata) : '',\n // errorMessage: genAiInteraction.errorMessage,\n // }\n // };\n // }\n\n // @SkipThrottle({ short: false, login: true, burst: true, sustained: true }) //Enable the short throttle only\n @ApiBearerAuth(\"jwt\")\n @Post('seed')\n async seedData(@Body() seedData: any) {\n const seederName = seedData?.seeder ?? 'ModuleMetadataSeederService';\n const seeder = this.solidRegistry\n .getSeeders()\n .filter((seeder) => seeder.name === seederName)\n .map((seeder) => seeder.instance)\n .pop();\n if (!seeder) {\n this.logger.error(`Seeder service ${seederName} not found. Does your service have a seed() method?`);\n return;\n }\n this.logger.log(`Running the seed() method for seeder :${seeder.constructor.name}`);\n await seeder.seed();\n return { message: `seed data for ${seederName}` };\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('code-generation/post-process')\n async postProcessCodeGeneration(@Body() config: PostProcessCodeGenConfig) {\n // Set defaults if not provided\n config.runModuleMetadataSeeder = config.runModuleMetadataSeeder ?? true;\n config.runSolidIngestion = config.runSolidIngestion ?? true;\n\n // Run the Module Metadata Seeder Service\n if (config.runModuleMetadataSeeder) {\n this.logger.debug(`Running the Module Metadata Seeder Service as part of post-process code generation`);\n const seeder = this.solidRegistry\n .getSeeders()\n .filter((seeder) => seeder.name === 'ModuleMetadataSeederService')\n .map((seeder) => seeder.instance)\n .pop();\n if (!seeder) {\n this.logger.error(`Seeder service ModuleMetadataSeederService not found. Does your service have a seed() method?`);\n } else {\n await seeder.seed();\n }\n } else {\n this.logger.debug(`Skipping the Module Metadata Seeder Service as part of post-process code generation`);\n }\n\n // Run the Solid ingestion command\n if (config.runSolidIngestion) {\n this.logger.debug(`Running the Solid ingestion command as part of post-process code generation`);\n\n // TODO: disabled this till we figure out a way to make this stable...\n // This keeps failing for a variety of reasons... \n // await this.ingestMetadataService.ingest();\n }\n }\n\n\n // @Public()\n // @Get('play')\n // play() {\n // return this.solidRegistry.getControllers();\n // }\n\n // //This method identifies a provider as a seeder if it has a seed method i.e duck typing\n // private isSeeder(provider: InstanceWrapper) {\n // const { instance } = provider;\n // if (!instance) return false;\n\n // const seedMethod = this.metadataScanner\n // .getAllMethodNames(Object.getPrototypeOf(instance))\n // .find((methodName) => methodName === 'seed');\n // if (!seedMethod) return false;\n // return true;\n // }\n\n}\n"]}
1
+ {"version":3,"file":"service.controller.js","sourceRoot":"","sources":["../../src/controllers/service.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,6CAAyD;AAEzD,qEAAyD;AACzD,0EAAsE;AAEtE,uEAAmE;AACnE,8DAA0D;AAWnD,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAG1B,YACqB,aAA4B,EAC5B,gBAAkC,EAClC,WAA+B;QAF/B,kBAAa,GAAb,aAAa,CAAe;QAC5B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,gBAAW,GAAX,WAAW,CAAoB;QALnC,WAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAMzD,CAAC;IAIL,QAAQ;QACJ,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC9B,CAAC;IA6DK,AAAN,KAAK,CAAC,QAAQ,CAAS,QAAa;QAChC,MAAM,UAAU,GAAG,QAAQ,EAAE,MAAM,IAAI,6BAA6B,CAAC;QACrE,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa;aAC5B,UAAU,EAAE;aACZ,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC;aAC9C,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;aAChC,GAAG,EAAE,CAAC;QACX,IAAI,CAAC,MAAM,EAA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QAC7G,CAAC;QAGD,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;QAKrG,CAAC;IACL,CAAC;CAqBJ,CAAA;AA/IY,8CAAiB;AAW1B;IAFC,IAAA,yBAAM,GAAE;IACR,IAAA,YAAG,EAAC,MAAM,CAAC;;;;;iDAGX;AA6DK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,MAAM,CAAC;;IACG,WAAA,IAAA,aAAI,GAAE,CAAA;;;;iDAcrB;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,aAAI,EAAC,8BAA8B,CAAC;;IACJ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;kEA8BtC;4BA1HQ,iBAAiB;IAJ7B,IAAA,mBAAU,EAAC,EAAE,CAAC;IACd,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAOkB,8BAAa;QACV,qCAAgB;QACrB,yCAAkB;GAN3C,iBAAiB,CA+I7B","sourcesContent":["import { Body, Controller, Get, Logger, Post } from '@nestjs/common';\nimport { ApiBearerAuth, ApiTags } from '@nestjs/swagger';\nimport { ActiveUser } from 'src/decorators/active-user.decorator';\nimport { Public } from 'src/decorators/public.decorator';\nimport { ErrorMapperService } from 'src/helpers/error-mapper.service';\nimport { ActiveUserData } from 'src/interfaces/active-user-data.interface';\nimport { MqMessageService } from 'src/services/mq-message.service';\nimport { SolidRegistry } from '../helpers/solid-registry';\n\nexport interface PostProcessCodeGenConfig {\n runModuleMetadataSeeder?: boolean; // If true, regenerate module metadata\n runSolidIngestion?: boolean; // If true, run solid ingestion command\n modulesToSeed?: string[]; // If provided, only seed these specific modules\n}\n@Controller('')\n@ApiTags(\"Solid Core\")\n// @UseGuards(ThrottlerGuard)\n// @SkipThrottle({ short: true, login: true, burst: true, sustained: true }) // Skip all\nexport class ServiceController {\n private readonly logger = new Logger(ServiceController.name);\n\n constructor(\n private readonly solidRegistry: SolidRegistry,\n private readonly mqMessageService: MqMessageService,\n private readonly errorMapper: ErrorMapperService,\n ) { }\n\n @Public()\n @Get('ping')\n pingPong() {\n return { pong: 'v1.0.2' };\n }\n\n // @ApiBearerAuth(\"jwt\")\n // @Get('mcp/ping')\n // async mcpPingPong(@ActiveUser() activeUser: ActiveUserData) {\n // // TODO: do a MCP client invocation, wait for response and return.\n // // If failure then decide shape to return.\n\n // const threadId = `pingPongTxn-${activeUser.sub}`;\n // const dto = { prompt: \"Can you do 1 + 1\", moduleName: \"solidCoreModule\" }\n // const { queueMessageId, aiInteractionId } = await this.aiInteractionService.triggerMcpClientJob(\n // dto,\n // activeUser.sub,\n // true,\n // threadId\n // );\n\n // this.logger.debug(`mcp ping pong job triggered: queueMessageId=${queueMessageId}, aiInteractionId=${aiInteractionId}`);\n\n // // Wait up to 2 minutes, start at 500ms poll, back off to max 2s, throw if failed:\n // const result = await this.mqMessageService.waitForTerminalStatus(queueMessageId, {\n // timeoutMs: 2 * 60 * 1000,\n // intervalMs: 500,\n // maxIntervalMs: 2000,\n // throwOnFailure: false,\n // });\n\n // this.logger.debug(`mcp ping pong job finished with stage=${result.stage}`)\n\n // this.logger.debug(`mcp ping pong trying to find genai (child) interaction for aiInteraction for id=${aiInteractionId}`)\n\n // // @ts-ignore\n // const genAiInteractions = await this.aiInteractionService.find({\n // filters: {\n // parentInteraction: {\n // id: {\n // $eq: aiInteractionId\n // }\n // }\n // }\n // });\n\n // const genAiInteraction = genAiInteractions['records'][0];\n // this.logger.debug(genAiInteraction.message);\n\n // this.logger.debug(`identified gen-ai interaction with id=${genAiInteraction.id}`);\n // this.logger.debug(`proceeding with applying the gen-ai interaction`)\n\n // return {\n // mcpPong: 'v1.0.2',\n // genAiInteraction: {\n // status: genAiInteraction.status,\n // errorCode: genAiInteraction.status === 'failed' ? this.errorMapper.mapMessage(genAiInteraction.errorMessage, genAiInteraction.metadata) : '',\n // errorMessage: genAiInteraction.errorMessage,\n // }\n // };\n // }\n\n // @SkipThrottle({ short: false, login: true, burst: true, sustained: true }) //Enable the short throttle only\n @ApiBearerAuth(\"jwt\")\n @Post('seed')\n async seedData(@Body() seedData: any) {\n const seederName = seedData?.seeder ?? 'ModuleMetadataSeederService';\n const seeder = this.solidRegistry\n .getSeeders()\n .filter((seeder) => seeder.name === seederName)\n .map((seeder) => seeder.instance)\n .pop();\n if (!seeder) {\n this.logger.error(`Seeder service ${seederName} not found. Does your service have a seed() method?`);\n return;\n }\n this.logger.log(`Running the seed() method for seeder :${seeder.constructor.name}`);\n await seeder.seed({ modulesToSeed: seedData?.modulesToSeed });\n return { message: `seed data for ${seederName}` };\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('code-generation/post-process')\n async postProcessCodeGeneration(@Body() config: PostProcessCodeGenConfig) {\n // Set defaults if not provided\n config.runModuleMetadataSeeder = config.runModuleMetadataSeeder ?? true;\n config.runSolidIngestion = config.runSolidIngestion ?? true;\n\n // Run the Module Metadata Seeder Service\n if (config.runModuleMetadataSeeder) {\n this.logger.debug(`Running the Module Metadata Seeder Service as part of post-process code generation`);\n const seeder = this.solidRegistry\n .getSeeders()\n .filter((seeder) => seeder.name === 'ModuleMetadataSeederService')\n .map((seeder) => seeder.instance)\n .pop();\n if (!seeder) {\n this.logger.error(`Seeder service ModuleMetadataSeederService not found. Does your service have a seed() method?`);\n } else {\n await seeder.seed({ modulesToSeed: config.modulesToSeed });\n }\n } else {\n this.logger.debug(`Skipping the Module Metadata Seeder Service as part of post-process code generation`);\n }\n\n // Run the Solid ingestion command\n if (config.runSolidIngestion) {\n this.logger.debug(`Running the Solid ingestion command as part of post-process code generation`);\n\n // TODO: disabled this till we figure out a way to make this stable...\n // This keeps failing for a variety of reasons... \n // await this.ingestMetadataService.ingest();\n }\n }\n\n\n // @Public()\n // @Get('play')\n // play() {\n // return this.solidRegistry.getControllers();\n // }\n\n // //This method identifies a provider as a seeder if it has a seed method i.e duck typing\n // private isSeeder(provider: InstanceWrapper) {\n // const { instance } = provider;\n // if (!instance) return false;\n\n // const seedMethod = this.metadataScanner\n // .getAllMethodNames(Object.getPrototypeOf(instance))\n // .find((methodName) => methodName === 'seed');\n // if (!seedMethod) return false;\n // return true;\n // }\n\n}\n"]}
@@ -3,6 +3,7 @@ import { LegacyTableType } from "../enums/legacy-table-type.enum";
3
3
  export declare class DatasourceIntrospectionMappingColumnDto {
4
4
  columnName: string;
5
5
  fieldName: string;
6
+ displayName: string;
6
7
  dataType: string;
7
8
  solidFieldType: SolidFieldType;
8
9
  ormType: OrmType;
@@ -19,6 +20,7 @@ export declare class DatasourceIntrospectionMappingColumnDto {
19
20
  include: boolean;
20
21
  matched: boolean;
21
22
  isPrimaryKey: boolean;
23
+ fieldConfig?: Record<string, any>;
22
24
  }
23
25
  export declare class DatasourceIntrospectionMappingDto {
24
26
  mapped: boolean;
@@ -42,4 +44,7 @@ export declare class DatasourceIntrospectionMappingDto {
42
44
  columns: DatasourceIntrospectionMappingColumnDto[];
43
45
  reviewedModel?: Record<string, any>;
44
46
  }
47
+ export declare class DatasourceIntrospectionRunMigrationDto {
48
+ datasource: string;
49
+ }
45
50
  //# sourceMappingURL=datasource-introspection-mapping.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"datasource-introspection-mapping.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/datasource-introspection-mapping.dto.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,qBAAa,uCAAuC;IAGhD,UAAU,EAAE,MAAM,CAAC;IAInB,SAAS,EAAE,MAAM,CAAC;IAIlB,QAAQ,EAAE,MAAM,CAAC;IAIjB,cAAc,EAAE,cAAc,CAAC;IAI/B,OAAO,EAAE,OAAO,CAAC;IAIjB,QAAQ,EAAE,OAAO,CAAC;IAIlB,YAAY,CAAC,EAAE,MAA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AAW,EAAE,MAAM,CAAC;IAIpB,WAAW,EAAE,MAAM,CAAC;IAIpB,SAAS,EAAE,MAAM,CAAC;IAKlB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIvB,UAAU,EAAE,MAAM,CAAC;IAInB,cAAc,EAAE,MAAM,CAAC;IAIvB,eAAe,EAAE,eAAe,CAAC;IAIjC,aAAa,EAAE,MAAM,CAAC;IAItB,YAAY,EAAE,MAAM,CAAC;IAIrB,mBAAmB,EAAE,OAAO,CAAC;IAI7B,gBAAgB,EAAE,OAAO,CAAC;IAI1B,oBAAoB,EAAE,OAAO,CAAC;IAI9B,oBAAoB,EAAE,OAAO,CAAC;IAK9B,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAM1C,OAAO,EAAE,uCAAuC,EAAE,CAAC;IAKnD,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACvC;AAED,qBAAa,sCAAsC;IAG/C,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DatasourceIntrospectionMappingDto = exports.DatasourceIntrospectionMappingColumnDto = void 0;
12
+ exports.DatasourceIntrospectionRunMigrationDto = exports.DatasourceIntrospectionMappingDto = exports.DatasourceIntrospectionMappingColumnDto = void 0;
13
13
  const openapi = require("@nestjs/swagger");
14
14
  const swagger_1 = require("@nestjs/swagger");
15
15
  const class_transformer_1 = require("class-transformer");
@@ -18,7 +18,7 @@ const create_field_metadata_dto_1 = require("./create-field-metadata.dto");
18
18
  const legacy_table_type_enum_1 = require("../enums/legacy-table-type.enum");
19
19
  class DatasourceIntrospectionMappingColumnDto {
20
20
  static _OPENAPI_METADATA_FACTORY() {
21
- return { columnName: { required: true, type: () => String }, fieldName: { required: true, type: () => String }, dataType: { required: true, type: () => String }, solidFieldType: { required: true, enum: require("./create-field-metadata.dto").SolidFieldType }, ormType: { required: true, type: () => Object }, nullable: { required: true, type: () => Boolean }, defaultValue: { required: false, type: () => String, nullable: true }, characterMaximumLength: { required: false, type: () => Number, nullable: true }, numericPrecision: { required: false, type: () => Number, nullable: true }, numericScale: { required: false, type: () => Number, nullable: true }, ordinalPosition: { required: false, type: () => Number, nullable: true }, isAutoGenerated: { required: true, type: () => Boolean }, handledBySuperclass: { required: true, type: () => Boolean }, superclassFieldName: { required: false, type: () => String, nullable: true }, fieldId: { required: false, type: () => Number, nullable: true }, include: { required: true, type: () => Boolean }, matched: { required: true, type: () => Boolean }, isPrimaryKey: { required: true, type: () => Boolean } };
21
+ return { columnName: { required: true, type: () => String }, fieldName: { required: true, type: () => String }, displayName: { required: true, type: () => String }, dataType: { required: true, type: () => String }, solidFieldType: { required: true, enum: require("./create-field-metadata.dto").SolidFieldType }, ormType: { required: true, type: () => Object }, nullable: { required: true, type: () => Boolean }, defaultValue: { required: false, type: () => String, nullable: true }, characterMaximumLength: { required: false, type: () => Number, nullable: true }, numericPrecision: { required: false, type: () => Number, nullable: true }, numericScale: { required: false, type: () => Number, nullable: true }, ordinalPosition: { required: false, type: () => Number, nullable: true }, isAutoGenerated: { required: true, type: () => Boolean }, handledBySuperclass: { required: true, type: () => Boolean }, superclassFieldName: { required: false, type: () => String, nullable: true }, fieldId: { required: false, type: () => Number, nullable: true }, include: { required: true, type: () => Boolean }, matched: { required: true, type: () => Boolean }, isPrimaryKey: { required: true, type: () => Boolean }, fieldConfig: { required: false, type: () => Object } };
22
22
  }
23
23
  }
24
24
  exports.DatasourceIntrospectionMappingColumnDto = DatasourceIntrospectionMappingColumnDto;
@@ -32,6 +32,11 @@ __decorate([
32
32
  (0, class_validator_1.IsString)(),
33
33
  __metadata("design:type", String)
34
34
  ], DatasourceIntrospectionMappingColumnDto.prototype, "fieldName", void 0);
35
+ __decorate([
36
+ (0, swagger_1.ApiProperty)(),
37
+ (0, class_validator_1.IsString)(),
38
+ __metadata("design:type", String)
39
+ ], DatasourceIntrospectionMappingColumnDto.prototype, "displayName", void 0);
35
40
  __decorate([
36
41
  (0, swagger_1.ApiProperty)(),
37
42
  (0, class_validator_1.IsString)(),
@@ -118,6 +123,12 @@ __decorate([
118
123
  (0, class_validator_1.IsBoolean)(),
119
124
  __metadata("design:type", Boolean)
120
125
  ], DatasourceIntrospectionMappingColumnDto.prototype, "isPrimaryKey", void 0);
126
+ __decorate([
127
+ (0, swagger_1.ApiProperty)({ required: false, type: "object", additionalProperties: true }),
128
+ (0, class_validator_1.IsOptional)(),
129
+ (0, class_validator_1.IsObject)(),
130
+ __metadata("design:type", Object)
131
+ ], DatasourceIntrospectionMappingColumnDto.prototype, "fieldConfig", void 0);
121
132
  class DatasourceIntrospectionMappingDto {
122
133
  static _OPENAPI_METADATA_FACTORY() {
123
134
  return { mapped: { required: true, type: () => Boolean }, modelId: { required: false, type: () => Number, nullable: true }, singularName: { required: true, type: () => String }, pluralName: { required: true, type: () => String }, displayName: { required: true, type: () => String }, description: { required: true, type: () => String }, tableName: { required: true, type: () => String }, schema: { required: false, type: () => String, nullable: true }, dataSource: { required: true, type: () => String }, dataSourceType: { required: true, type: () => String }, legacyTableType: { required: true, enum: require("../enums/legacy-table-type.enum").LegacyTableType }, baseClassName: { required: true, type: () => String }, userKeyField: { required: true, type: () => String }, enableAuditTracking: { required: true, type: () => Boolean }, enableSoftDelete: { required: true, type: () => Boolean }, draftPublishWorkflow: { required: true, type: () => Boolean }, internationalisation: { required: true, type: () => Boolean }, plannedMigrationTimestamp: { required: false, type: () => Number, nullable: true }, columns: { required: true, type: () => [require("./datasource-introspection-mapping.dto").DatasourceIntrospectionMappingColumnDto] }, reviewedModel: { required: false, type: () => Object } };
@@ -230,4 +241,15 @@ __decorate([
230
241
  (0, class_validator_1.IsObject)(),
231
242
  __metadata("design:type", Object)
232
243
  ], DatasourceIntrospectionMappingDto.prototype, "reviewedModel", void 0);
244
+ class DatasourceIntrospectionRunMigrationDto {
245
+ static _OPENAPI_METADATA_FACTORY() {
246
+ return { datasource: { required: true, type: () => String } };
247
+ }
248
+ }
249
+ exports.DatasourceIntrospectionRunMigrationDto = DatasourceIntrospectionRunMigrationDto;
250
+ __decorate([
251
+ (0, swagger_1.ApiProperty)(),
252
+ (0, class_validator_1.IsString)(),
253
+ __metadata("design:type", String)
254
+ ], DatasourceIntrospectionRunMigrationDto.prototype, "datasource", void 0);
233
255
  //# sourceMappingURL=datasource-introspection-mapping.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"datasource-introspection-mapping.dto.js","sourceRoot":"","sources":["../../src/dtos/datasource-introspection-mapping.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,yDAAyC;AACzC,qDASyB;AACzB,2EAAsE;AACtE,4EAAmE;AAEnE,MAAa,uCAAuC;;;;CA8EnD;AA9ED,0FA8EC;AA3EG;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;2EACQ;AAInB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;0EACO;AAIlB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;yEACM;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,0CAAc,EAAE,CAAC;IACrC,IAAA,wBAAM,EAAC,0CAAc,CAAC;;+EACQ;AAI/B;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;wEACM;AAIjB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,2BAAS,GAAE;;yEACM;AAIlB;IAFC,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChD,IAAA,4BAAU,GAAE;;6EACgB;AAK7B;IAHC,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK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,GAAE;IACb,IAAA,2BAAS,GAAE;;+EACkB;AAI9B;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,2BAAS,GAAE;;+EACkB;AAK9B;IAHC,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChD,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;oFACkC;AAM1C;IAJC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,uCAAuC,CAAC,EAAE,CAAC;IACtE,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,uCAAuC,CAAC;;kEACD;AAKnD;IAHC,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAChD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;wEACyB","sourcesContent":["import { ApiProperty } from \"@nestjs/swagger\";\nimport { Type } from \"class-transformer\";\nimport {\n IsArray,\n IsBoolean,\n IsEnum,\n IsInt,\n IsObject,\n IsOptional,\n IsString,\n ValidateNested,\n} from \"class-validator\";\nimport { OrmType, SolidFieldType } from \"./create-field-metadata.dto\";\nimport { LegacyTableType } from \"src/enums/legacy-table-type.enum\";\n\nexport class DatasourceIntrospectionMappingColumnDto {\n @ApiProperty()\n @IsString()\n columnName: string;\n\n @ApiProperty()\n @IsString()\n fieldName: string;\n\n @ApiProperty()\n @IsString()\n dataType: string;\n\n @ApiProperty({ enum: SolidFieldType })\n @IsEnum(SolidFieldType)\n solidFieldType: SolidFieldType;\n\n @ApiProperty()\n @IsString()\n ormType: OrmType;\n\n @ApiProperty()\n @IsBoolean()\n nullable: boolean;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n defaultValue?: string | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n characterMaximumLength?: number | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n numericPrecision?: number | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n numericScale?: number | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n ordinalPosition?: number | null;\n\n @ApiProperty()\n @IsBoolean()\n isAutoGenerated: boolean;\n\n @ApiProperty()\n @IsBoolean()\n handledBySuperclass: boolean;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsString()\n superclassFieldName?: string | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n fieldId?: number | null;\n\n @ApiProperty()\n @IsBoolean()\n include: boolean;\n\n @ApiProperty()\n @IsBoolean()\n matched: boolean;\n\n @ApiProperty()\n @IsBoolean()\n isPrimaryKey: boolean;\n}\n\nexport class DatasourceIntrospectionMappingDto {\n @ApiProperty()\n @IsBoolean()\n mapped: boolean;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n modelId?: number | null;\n\n @ApiProperty()\n @IsString()\n singularName: string;\n\n @ApiProperty()\n @IsString()\n pluralName: string;\n\n @ApiProperty()\n @IsString()\n displayName: string;\n\n @ApiProperty()\n @IsString()\n description: string;\n\n @ApiProperty()\n @IsString()\n tableName: string;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsString()\n schema?: string | null;\n\n @ApiProperty()\n @IsString()\n dataSource: string;\n\n @ApiProperty()\n @IsString()\n dataSourceType: string;\n\n @ApiProperty({ enum: LegacyTableType })\n @IsEnum(LegacyTableType)\n legacyTableType: LegacyTableType;\n\n @ApiProperty()\n @IsString()\n baseClassName: string;\n\n @ApiProperty()\n @IsString()\n userKeyField: string;\n\n @ApiProperty()\n @IsBoolean()\n enableAuditTracking: boolean;\n\n @ApiProperty()\n @IsBoolean()\n enableSoftDelete: boolean;\n\n @ApiProperty()\n @IsBoolean()\n draftPublishWorkflow: boolean;\n\n @ApiProperty()\n @IsBoolean()\n internationalisation: boolean;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n plannedMigrationTimestamp?: number | null;\n\n @ApiProperty({ type: () => [DatasourceIntrospectionMappingColumnDto] })\n @IsArray()\n @ValidateNested({ each: true })\n @Type(() => DatasourceIntrospectionMappingColumnDto)\n columns: DatasourceIntrospectionMappingColumnDto[];\n\n @ApiProperty({ required: false, type: \"object\" })\n @IsOptional()\n @IsObject()\n reviewedModel?: Record<string, any>;\n}\n"]}
1
+ {"version":3,"file":"datasource-introspection-mapping.dto.js","sourceRoot":"","sources":["../../src/dtos/datasource-introspection-mapping.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,yDAAyC;AACzC,qDASyB;AACzB,2EAAsE;AACtE,4EAAmE;AAEnE,MAAa,uCAAuC;;;;CAuFnD;AAvFD,0FAuFC;AApFG;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;2EACQ;AAInB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;0EACO;AAIlB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;4EACS;AAIpB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;yEACM;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,0CAAc,EAAE,CAAC;IACrC,IAAA,wBAAM,EAAC,0CAAc,CAAC;;+EACQ;AAI/B;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;wEACM;AAIjB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,2BAAS,GAAE;;yEACM;AAIlB;IAFC,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChD,IA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,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;wEACW;AAItB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;uEACU;AAIrB;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,2BAAS,GAAE;;8EACiB;AAI7B;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,2BAAS,GAAE;;2EACc;AAI1B;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,2BAAS,GAAE;;+EACkB;AAI9B;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,2BAAS,GAAE;;+EACkB;AAK9B;IAHC,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChD,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;oFACkC;AAM1C;IAJC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,uCAAuC,CAAC,EAAE,CAAC;IACtE,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,uCAAuC,CAAC;;kEACD;AAKnD;IAHC,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAChD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;wEACyB;AAGxC,MAAa,sCAAsC;;;;CAIlD;AAJD,wFAIC;AADG;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;0EACQ","sourcesContent":["import { ApiProperty } from \"@nestjs/swagger\";\nimport { Type } from \"class-transformer\";\nimport {\n IsArray,\n IsBoolean,\n IsEnum,\n IsInt,\n IsObject,\n IsOptional,\n IsString,\n ValidateNested,\n} from \"class-validator\";\nimport { OrmType, SolidFieldType } from \"./create-field-metadata.dto\";\nimport { LegacyTableType } from \"src/enums/legacy-table-type.enum\";\n\nexport class DatasourceIntrospectionMappingColumnDto {\n @ApiProperty()\n @IsString()\n columnName: string;\n\n @ApiProperty()\n @IsString()\n fieldName: string;\n\n @ApiProperty()\n @IsString()\n displayName: string;\n\n @ApiProperty()\n @IsString()\n dataType: string;\n\n @ApiProperty({ enum: SolidFieldType })\n @IsEnum(SolidFieldType)\n solidFieldType: SolidFieldType;\n\n @ApiProperty()\n @IsString()\n ormType: OrmType;\n\n @ApiProperty()\n @IsBoolean()\n nullable: boolean;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n defaultValue?: string | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n characterMaximumLength?: number | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n numericPrecision?: number | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n numericScale?: number | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n ordinalPosition?: number | null;\n\n @ApiProperty()\n @IsBoolean()\n isAutoGenerated: boolean;\n\n @ApiProperty()\n @IsBoolean()\n handledBySuperclass: boolean;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsString()\n superclassFieldName?: string | null;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n fieldId?: number | null;\n\n @ApiProperty()\n @IsBoolean()\n include: boolean;\n\n @ApiProperty()\n @IsBoolean()\n matched: boolean;\n\n @ApiProperty()\n @IsBoolean()\n isPrimaryKey: boolean;\n\n @ApiProperty({ required: false, type: \"object\", additionalProperties: true })\n @IsOptional()\n @IsObject()\n fieldConfig?: Record<string, any>;\n}\n\nexport class DatasourceIntrospectionMappingDto {\n @ApiProperty()\n @IsBoolean()\n mapped: boolean;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n modelId?: number | null;\n\n @ApiProperty()\n @IsString()\n singularName: string;\n\n @ApiProperty()\n @IsString()\n pluralName: string;\n\n @ApiProperty()\n @IsString()\n displayName: string;\n\n @ApiProperty()\n @IsString()\n description: string;\n\n @ApiProperty()\n @IsString()\n tableName: string;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsString()\n schema?: string | null;\n\n @ApiProperty()\n @IsString()\n dataSource: string;\n\n @ApiProperty()\n @IsString()\n dataSourceType: string;\n\n @ApiProperty({ enum: LegacyTableType })\n @IsEnum(LegacyTableType)\n legacyTableType: LegacyTableType;\n\n @ApiProperty()\n @IsString()\n baseClassName: string;\n\n @ApiProperty()\n @IsString()\n userKeyField: string;\n\n @ApiProperty()\n @IsBoolean()\n enableAuditTracking: boolean;\n\n @ApiProperty()\n @IsBoolean()\n enableSoftDelete: boolean;\n\n @ApiProperty()\n @IsBoolean()\n draftPublishWorkflow: boolean;\n\n @ApiProperty()\n @IsBoolean()\n internationalisation: boolean;\n\n @ApiProperty({ required: false, nullable: true })\n @IsOptional()\n @IsInt()\n plannedMigrationTimestamp?: number | null;\n\n @ApiProperty({ type: () => [DatasourceIntrospectionMappingColumnDto] })\n @IsArray()\n @ValidateNested({ each: true })\n @Type(() => DatasourceIntrospectionMappingColumnDto)\n columns: DatasourceIntrospectionMappingColumnDto[];\n\n @ApiProperty({ required: false, type: \"object\" })\n @IsOptional()\n @IsObject()\n reviewedModel?: Record<string, any>;\n}\n\nexport class DatasourceIntrospectionRunMigrationDto {\n @ApiProperty()\n @IsString()\n datasource: string;\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { LegacyCommonEntityWithExistingId } from "./legacy-common.entity";
1
+ import { LegacyCommonEntityWithExistingId } from "./legacy-common.entity-with-existing-id.entity";
2
2
  export declare abstract class LegacyCommonEntityWithGeneratedId extends LegacyCommonEntityWithExistingId {
3
3
  id: number;
4
4
  }
5
- //# sourceMappingURL=legacy-common-with-id.entity.d.ts.map
5
+ //# sourceMappingURL=legacy-common-with-generated-id.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-common-with-generated-id.entity.d.ts","sourceRoot":"","sources":["../../src/entities/legacy-common-with-generated-id.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,gCAAgC,EAAE,MAAM,gDAAgD,CAAC;AAE9H,8BACsB,iCAAkC,SAAQ,gCAAgC;IAI5F,EAAE,EAAE,MAAM,CAAA;CACb"}
@@ -13,8 +13,8 @@ exports.LegacyCommonEntityWithGeneratedId = void 0;
13
13
  const openapi = require("@nestjs/swagger");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const typeorm_1 = require("typeorm");
16
- const legacy_common_entity_1 = require("./legacy-common.entity");
17
- let LegacyCommonEntityWithGeneratedId = class LegacyCommonEntityWithGeneratedId extends legacy_common_entity_1.LegacyCommonEntityWithExistingId {
16
+ const legacy_common_entity_with_existing_id_entity_1 = require("./legacy-common.entity-with-existing-id.entity");
17
+ let LegacyCommonEntityWithGeneratedId = class LegacyCommonEntityWithGeneratedId extends legacy_common_entity_with_existing_id_entity_1.LegacyCommonEntityWithExistingId {
18
18
  static _OPENAPI_METADATA_FACTORY() {
19
19
  return { id: { required: true, type: () => Number } };
20
20
  }
@@ -22,11 +22,11 @@ let LegacyCommonEntityWithGeneratedId = class LegacyCommonEntityWithGeneratedId
22
22
  exports.LegacyCommonEntityWithGeneratedId = LegacyCommonEntityWithGeneratedId;
23
23
  __decorate([
24
24
  (0, class_transformer_1.Expose)(),
25
- (0, typeorm_1.Column)({ type: 'integer', name: `${legacy_common_entity_1.LEGACY_TABLE_FIELDS_PREFIX}_id`, unique: true }),
25
+ (0, typeorm_1.Column)({ type: 'integer', name: `${legacy_common_entity_with_existing_id_entity_1.LEGACY_TABLE_FIELDS_PREFIX}_id`, unique: true }),
26
26
  (0, typeorm_1.Generated)("increment"),
27
27
  __metadata("design:type", Number)
28
28
  ], LegacyCommonEntityWithGeneratedId.prototype, "id", void 0);
29
29
  exports.LegacyCommonEntityWithGeneratedId = LegacyCommonEntityWithGeneratedId = __decorate([
30
30
  (0, class_transformer_1.Exclude)()
31
31
  ], LegacyCommonEntityWithGeneratedId);
32
- //# sourceMappingURL=legacy-common-with-id.entity.js.map
32
+ //# sourceMappingURL=legacy-common-with-generated-id.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-common-with-generated-id.entity.js","sourceRoot":"","sources":["../../src/entities/legacy-common-with-generated-id.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAoD;AACpD,qCAA4C;AAC5C,iHAA8H;AAGvH,IAAe,iCAAiC,GAAhD,MAAe,iCAAkC,SAAQ,+EAAgC;;;;CAK/F,CAAA;AALqB,8EAAiC;AAInD;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,yEAA0B,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACnF,IAAA,mBAAS,EAAC,WAAW,CAAC;;6DACb;4CAJQ,iCAAiC;IADtD,IAAA,2BAAO,GAAE;GACY,iCAAiC,CAKtD","sourcesContent":["import { Exclude, Expose } from \"class-transformer\";\nimport { Column, Generated } from \"typeorm\";\nimport { LEGACY_TABLE_FIELDS_PREFIX, LegacyCommonEntityWithExistingId } from \"./legacy-common.entity-with-existing-id.entity\";\n\n@Exclude()\nexport abstract class LegacyCommonEntityWithGeneratedId extends LegacyCommonEntityWithExistingId {\n @Expose()\n @Column({ type: 'integer', name: `${LEGACY_TABLE_FIELDS_PREFIX}_id`, unique: true })\n @Generated(\"increment\")\n id: number\n}"]}
@@ -10,4 +10,4 @@ export declare abstract class LegacyCommonEntityWithExistingId {
10
10
  createdBy: number | null;
11
11
  updatedBy: number | null;
12
12
  }
13
- //# sourceMappingURL=legacy-common.entity.d.ts.map
13
+ //# sourceMappingURL=legacy-common.entity-with-existing-id.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-common.entity-with-existing-id.entity.d.ts","sourceRoot":"","sources":["../../src/entities/legacy-common.entity-with-existing-id.entity.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,8BACsB,gCAAgC;IAOlD,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAGvB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAIvB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAGvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAI9B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAIzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAI1B,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAgBrC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAIzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}