@acorex-platform/module-application-management-server 0.0.15 → 2.0.0-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 (220) hide show
  1. package/contracts/src/entities/app-term/app-term.entity.js +17 -3
  2. package/contracts/src/entities/app-term/app-term.entity.js.map +1 -1
  3. package/contracts/src/entities/app-term/app-term.types.js.map +1 -1
  4. package/contracts/src/entities/app-term/index.d.ts +0 -1
  5. package/contracts/src/entities/app-term/index.js +0 -1
  6. package/contracts/src/entities/app-term/index.js.map +1 -1
  7. package/contracts/src/entities/app-version/app-version.entity.js +21 -6
  8. package/contracts/src/entities/app-version/app-version.entity.js.map +1 -1
  9. package/contracts/src/entities/app-version/app-version.types.d.ts +8 -2
  10. package/contracts/src/entities/app-version/app-version.types.js.map +1 -1
  11. package/contracts/src/entities/app-version/index.d.ts +0 -1
  12. package/contracts/src/entities/app-version/index.js +0 -1
  13. package/contracts/src/entities/app-version/index.js.map +1 -1
  14. package/contracts/src/entities/application/application.entity.js +22 -2
  15. package/contracts/src/entities/application/application.entity.js.map +1 -1
  16. package/contracts/src/entities/application/application.types.d.ts +3 -3
  17. package/contracts/src/entities/application/application.types.js.map +1 -1
  18. package/contracts/src/entities/application/index.d.ts +0 -1
  19. package/contracts/src/entities/application/index.js +0 -1
  20. package/contracts/src/entities/application/index.js.map +1 -1
  21. package/contracts/src/entities/edition/edition.entity.js +51 -6
  22. package/contracts/src/entities/edition/edition.entity.js.map +1 -1
  23. package/contracts/src/entities/edition/edition.types.d.ts +3 -2
  24. package/contracts/src/entities/edition/edition.types.js.map +1 -1
  25. package/contracts/src/entities/edition/index.d.ts +0 -1
  26. package/contracts/src/entities/edition/index.js +0 -1
  27. package/contracts/src/entities/edition/index.js.map +1 -1
  28. package/contracts/src/entities/index.js.map +1 -1
  29. package/contracts/src/entity-catalog.d.ts +7 -0
  30. package/contracts/src/entity-catalog.js +23 -0
  31. package/contracts/src/entity-catalog.js.map +1 -0
  32. package/contracts/src/entity-entry.app-term.d.ts +1 -0
  33. package/contracts/src/entity-entry.app-term.js +6 -0
  34. package/contracts/src/entity-entry.app-term.js.map +1 -0
  35. package/contracts/src/entity-entry.app-version.d.ts +1 -0
  36. package/contracts/src/entity-entry.app-version.js +6 -0
  37. package/contracts/src/entity-entry.app-version.js.map +1 -0
  38. package/contracts/src/entity-entry.application.d.ts +1 -0
  39. package/contracts/src/entity-entry.application.js +6 -0
  40. package/contracts/src/entity-entry.application.js.map +1 -0
  41. package/contracts/src/entity-entry.edition.d.ts +1 -0
  42. package/contracts/src/entity-entry.edition.js +6 -0
  43. package/contracts/src/entity-entry.edition.js.map +1 -0
  44. package/contracts/src/features.keys.js.map +1 -1
  45. package/contracts/src/index.d.ts +6 -0
  46. package/contracts/src/index.js +6 -0
  47. package/contracts/src/index.js.map +1 -1
  48. package/contracts/src/industry-pack.constants.d.ts +6 -0
  49. package/contracts/src/industry-pack.constants.js +11 -0
  50. package/contracts/src/industry-pack.constants.js.map +1 -0
  51. package/contracts/src/lib/context.definitions.d.ts +2 -0
  52. package/contracts/src/lib/context.definitions.js +15 -0
  53. package/contracts/src/lib/context.definitions.js.map +1 -0
  54. package/contracts/src/manifest.d.ts +6 -0
  55. package/contracts/src/manifest.js +24 -0
  56. package/contracts/src/manifest.js.map +1 -0
  57. package/contracts/src/menu.keys.js.map +1 -1
  58. package/contracts/src/module-setup.provider.d.ts +55 -0
  59. package/contracts/src/module-setup.provider.js +26 -0
  60. package/contracts/src/module-setup.provider.js.map +1 -0
  61. package/contracts/src/offline-read.capabilities.d.ts +2 -0
  62. package/contracts/src/offline-read.capabilities.js +8 -0
  63. package/contracts/src/offline-read.capabilities.js.map +1 -0
  64. package/contracts/src/permission.keys.d.ts +25 -5
  65. package/contracts/src/permission.keys.js +25 -5
  66. package/contracts/src/permission.keys.js.map +1 -1
  67. package/contracts/src/root-config.d.ts +35 -29
  68. package/contracts/src/root-config.js +6 -0
  69. package/contracts/src/root-config.js.map +1 -1
  70. package/contracts/src/server-commands.d.ts +29 -0
  71. package/contracts/src/server-commands.js +9 -0
  72. package/contracts/src/server-commands.js.map +1 -0
  73. package/contracts/src/settings.keys.d.ts +3 -1
  74. package/contracts/src/settings.keys.js +2 -0
  75. package/contracts/src/settings.keys.js.map +1 -1
  76. package/package.json +9 -12
  77. package/server/src/index.d.ts +3 -0
  78. package/server/src/index.js +9 -0
  79. package/server/src/index.js.map +1 -0
  80. package/server/src/lib/application-management-server.module.d.ts +7 -0
  81. package/server/src/lib/application-management-server.module.js +56 -0
  82. package/server/src/lib/application-management-server.module.js.map +1 -0
  83. package/server/src/lib/entities/application-management.entity-catalog.d.ts +1 -0
  84. package/server/src/lib/entities/application-management.entity-catalog.js +12 -0
  85. package/server/src/lib/entities/application-management.entity-catalog.js.map +1 -0
  86. package/server/src/lib/entities/index.d.ts +1 -0
  87. package/server/src/lib/entities/index.js +5 -0
  88. package/{src/lib/seed/reports → server/src/lib/entities}/index.js.map +1 -1
  89. package/server/src/lib/handlers/application-report.handlers.d.ts +14 -0
  90. package/server/src/lib/handlers/application-report.handlers.js +65 -0
  91. package/server/src/lib/handlers/application-report.handlers.js.map +1 -0
  92. package/{src → server/src}/lib/queries/application-query.helpers.js +1 -1
  93. package/server/src/lib/queries/application-query.helpers.js.map +1 -0
  94. package/server/src/lib/queries/get-application-versions-chart-data.query.definition.d.ts +5 -0
  95. package/server/src/lib/queries/get-application-versions-chart-data.query.definition.js +33 -0
  96. package/server/src/lib/queries/get-application-versions-chart-data.query.definition.js.map +1 -0
  97. package/{src → server/src}/lib/queries/get-application-versions-chart-data.query.js +1 -1
  98. package/server/src/lib/queries/get-application-versions-chart-data.query.js.map +1 -0
  99. package/server/src/lib/queries/get-application-versions-timeline.query.definition.d.ts +5 -0
  100. package/server/src/lib/queries/get-application-versions-timeline.query.definition.js +34 -0
  101. package/server/src/lib/queries/get-application-versions-timeline.query.definition.js.map +1 -0
  102. package/{src → server/src}/lib/queries/get-application-versions-timeline.query.js +1 -1
  103. package/server/src/lib/queries/get-application-versions-timeline.query.js.map +1 -0
  104. package/server/src/lib/reports/application-report-definition.provider.js.map +1 -0
  105. package/{src → server/src}/lib/reports/application-report.definitions.js +8 -3
  106. package/server/src/lib/reports/application-report.definitions.js.map +1 -0
  107. package/server/src/lib/setup/index.d.ts +6 -0
  108. package/server/src/lib/setup/index.js +10 -0
  109. package/{src/lib/seed/app-term → server/src/lib/setup}/index.js.map +1 -1
  110. package/server/src/lib/setup/module-setup-aggregator.service.d.ts +13 -0
  111. package/server/src/lib/setup/module-setup-aggregator.service.js +70 -0
  112. package/server/src/lib/setup/module-setup-aggregator.service.js.map +1 -0
  113. package/server/src/lib/setup/subscription-tenant-setup.listener.d.ts +13 -0
  114. package/server/src/lib/setup/subscription-tenant-setup.listener.js +78 -0
  115. package/server/src/lib/setup/subscription-tenant-setup.listener.js.map +1 -0
  116. package/server/src/lib/setup/tenant-setup.command.d.ts +8 -0
  117. package/server/src/lib/setup/tenant-setup.command.js +34 -0
  118. package/server/src/lib/setup/tenant-setup.command.js.map +1 -0
  119. package/server/src/lib/setup/tenant-setup.seed-provider.d.ts +16 -0
  120. package/server/src/lib/setup/tenant-setup.seed-provider.js +59 -0
  121. package/server/src/lib/setup/tenant-setup.seed-provider.js.map +1 -0
  122. package/server/src/lib/setup/tenant-setup.service.d.ts +13 -0
  123. package/server/src/lib/setup/tenant-setup.service.js +161 -0
  124. package/server/src/lib/setup/tenant-setup.service.js.map +1 -0
  125. package/server/src/lib/setup/tenant-subscription-modules.resolver.d.ts +20 -0
  126. package/server/src/lib/setup/tenant-subscription-modules.resolver.js +131 -0
  127. package/server/src/lib/setup/tenant-subscription-modules.resolver.js.map +1 -0
  128. package/src/index.d.ts +0 -5
  129. package/src/index.js +0 -13
  130. package/src/index.js.map +0 -1
  131. package/src/lib/application-management-server.module.d.ts +0 -2
  132. package/src/lib/application-management-server.module.js +0 -32
  133. package/src/lib/application-management-server.module.js.map +0 -1
  134. package/src/lib/handlers/application-report.handlers.d.ts +0 -14
  135. package/src/lib/handlers/application-report.handlers.js +0 -40
  136. package/src/lib/handlers/application-report.handlers.js.map +0 -1
  137. package/src/lib/queries/application-query.helpers.js.map +0 -1
  138. package/src/lib/queries/get-application-versions-chart-data.query.js.map +0 -1
  139. package/src/lib/queries/get-application-versions-timeline.query.js.map +0 -1
  140. package/src/lib/reports/application-report-definition.provider.js.map +0 -1
  141. package/src/lib/reports/application-report.definitions.js.map +0 -1
  142. package/src/lib/seed/app-term/app-term.mock.data.d.ts +0 -2
  143. package/src/lib/seed/app-term/app-term.mock.data.js +0 -296
  144. package/src/lib/seed/app-term/app-term.mock.data.js.map +0 -1
  145. package/src/lib/seed/app-term/app-term.seed.d.ts +0 -5
  146. package/src/lib/seed/app-term/app-term.seed.js +0 -31
  147. package/src/lib/seed/app-term/app-term.seed.js.map +0 -1
  148. package/src/lib/seed/app-term/index.d.ts +0 -2
  149. package/src/lib/seed/app-term/index.js +0 -6
  150. package/src/lib/seed/app-version/app-version.mock.data.d.ts +0 -8
  151. package/src/lib/seed/app-version/app-version.mock.data.js +0 -105
  152. package/src/lib/seed/app-version/app-version.mock.data.js.map +0 -1
  153. package/src/lib/seed/app-version/app-version.seed.d.ts +0 -6
  154. package/src/lib/seed/app-version/app-version.seed.js +0 -34
  155. package/src/lib/seed/app-version/app-version.seed.js.map +0 -1
  156. package/src/lib/seed/app-version/index.d.ts +0 -2
  157. package/src/lib/seed/app-version/index.js +0 -6
  158. package/src/lib/seed/app-version/index.js.map +0 -1
  159. package/src/lib/seed/application/application.mock.d.ts +0 -2
  160. package/src/lib/seed/application/application.mock.js +0 -27
  161. package/src/lib/seed/application/application.mock.js.map +0 -1
  162. package/src/lib/seed/application/application.seed.d.ts +0 -5
  163. package/src/lib/seed/application/application.seed.js +0 -31
  164. package/src/lib/seed/application/application.seed.js.map +0 -1
  165. package/src/lib/seed/application/demo-application-logo-url.util.d.ts +0 -1
  166. package/src/lib/seed/application/demo-application-logo-url.util.js +0 -20
  167. package/src/lib/seed/application/demo-application-logo-url.util.js.map +0 -1
  168. package/src/lib/seed/application/index.d.ts +0 -2
  169. package/src/lib/seed/application/index.js +0 -6
  170. package/src/lib/seed/application/index.js.map +0 -1
  171. package/src/lib/seed/application-category/application-category.mock.d.ts +0 -16
  172. package/src/lib/seed/application-category/application-category.mock.js +0 -78
  173. package/src/lib/seed/application-category/application-category.mock.js.map +0 -1
  174. package/src/lib/seed/application-category/application-category.seed.d.ts +0 -6
  175. package/src/lib/seed/application-category/application-category.seed.js +0 -32
  176. package/src/lib/seed/application-category/application-category.seed.js.map +0 -1
  177. package/src/lib/seed/application-category/index.d.ts +0 -2
  178. package/src/lib/seed/application-category/index.js +0 -6
  179. package/src/lib/seed/application-category/index.js.map +0 -1
  180. package/src/lib/seed/application-management-jql.seed-catalog.d.ts +0 -3
  181. package/src/lib/seed/application-management-jql.seed-catalog.js +0 -22
  182. package/src/lib/seed/application-management-jql.seed-catalog.js.map +0 -1
  183. package/src/lib/seed/application-management-seed.provider.d.ts +0 -4
  184. package/src/lib/seed/application-management-seed.provider.js +0 -18
  185. package/src/lib/seed/application-management-seed.provider.js.map +0 -1
  186. package/src/lib/seed/application-management-seed.tokens.d.ts +0 -1
  187. package/src/lib/seed/application-management-seed.tokens.js +0 -7
  188. package/src/lib/seed/application-management-seed.tokens.js.map +0 -1
  189. package/src/lib/seed/application-management.seed-catalog.d.ts +0 -2
  190. package/src/lib/seed/application-management.seed-catalog.js +0 -21
  191. package/src/lib/seed/application-management.seed-catalog.js.map +0 -1
  192. package/src/lib/seed/application-tree-feature-keys.constants.d.ts +0 -40
  193. package/src/lib/seed/application-tree-feature-keys.constants.js +0 -56
  194. package/src/lib/seed/application-tree-feature-keys.constants.js.map +0 -1
  195. package/src/lib/seed/application-tree.data.d.ts +0 -56
  196. package/src/lib/seed/application-tree.data.js +0 -212
  197. package/src/lib/seed/application-tree.data.js.map +0 -1
  198. package/src/lib/seed/edition/edition.mock.d.ts +0 -10
  199. package/src/lib/seed/edition/edition.mock.js +0 -50
  200. package/src/lib/seed/edition/edition.mock.js.map +0 -1
  201. package/src/lib/seed/edition/edition.seed.d.ts +0 -6
  202. package/src/lib/seed/edition/edition.seed.js +0 -32
  203. package/src/lib/seed/edition/edition.seed.js.map +0 -1
  204. package/src/lib/seed/edition/index.d.ts +0 -2
  205. package/src/lib/seed/edition/index.js +0 -6
  206. package/src/lib/seed/edition/index.js.map +0 -1
  207. package/src/lib/seed/index.d.ts +0 -26
  208. package/src/lib/seed/index.js +0 -28
  209. package/src/lib/seed/index.js.map +0 -1
  210. package/src/lib/seed/reports/index.d.ts +0 -1
  211. package/src/lib/seed/reports/index.js +0 -5
  212. package/src/lib/seed/reports/report.mock.d.ts +0 -9
  213. package/src/lib/seed/reports/report.mock.js +0 -306
  214. package/src/lib/seed/reports/report.mock.js.map +0 -1
  215. /package/{src → server/src}/lib/queries/application-query.helpers.d.ts +0 -0
  216. /package/{src → server/src}/lib/queries/get-application-versions-chart-data.query.d.ts +0 -0
  217. /package/{src → server/src}/lib/queries/get-application-versions-timeline.query.d.ts +0 -0
  218. /package/{src → server/src}/lib/reports/application-report-definition.provider.d.ts +0 -0
  219. /package/{src → server/src}/lib/reports/application-report-definition.provider.js +0 -0
  220. /package/{src → server/src}/lib/reports/application-report.definitions.d.ts +0 -0
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var SubscriptionTenantSetupListener_1;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SubscriptionTenantSetupListener = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const core_1 = require("@acorex-platform/framework-server/core");
7
+ const common_1 = require("@nestjs/common");
8
+ const event_emitter_1 = require("@nestjs/event-emitter");
9
+ const tenant_setup_service_1 = require("./tenant-setup.service");
10
+ //#region ----- Constants -----
11
+ const SUBSCRIPTION_ENTITY = 'SubscriptionManagement.Subscription';
12
+ const ACTIVE_STATUS = 'active';
13
+ const SUBSCRIBER_TYPE_TENANT = 'Tenant';
14
+ //#endregion
15
+ //#region ----- Subscription → tenant setup listener -----
16
+ /**
17
+ * When a tenant subscription is created or updated to active, re-run Tenant.Setup
18
+ * so newly enabled modules receive master data / industry pack contributions.
19
+ */
20
+ let SubscriptionTenantSetupListener = SubscriptionTenantSetupListener_1 = class SubscriptionTenantSetupListener {
21
+ constructor(tenantSetup) {
22
+ this.tenantSetup = tenantSetup;
23
+ this.logger = new common_1.Logger(SubscriptionTenantSetupListener_1.name);
24
+ }
25
+ handleEntityMutation(event) {
26
+ var _a;
27
+ if (event.entityName !== SUBSCRIPTION_ENTITY) {
28
+ return;
29
+ }
30
+ if (event.operation !== 'created' && event.operation !== 'updated') {
31
+ return;
32
+ }
33
+ const record = ((_a = event.data) !== null && _a !== void 0 ? _a : event.previous);
34
+ if (!record) {
35
+ return;
36
+ }
37
+ if (record['subscriberType'] !== SUBSCRIBER_TYPE_TENANT) {
38
+ return;
39
+ }
40
+ if (record['statusId'] !== ACTIVE_STATUS) {
41
+ return;
42
+ }
43
+ const tenantId = (typeof record['subscriberId'] === 'string' && record['subscriberId']) ||
44
+ (typeof event.tenantId === 'string' && event.tenantId) ||
45
+ '';
46
+ if (!tenantId) {
47
+ return;
48
+ }
49
+ void this.runSetup(tenantId);
50
+ }
51
+ runSetup(tenantId) {
52
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
53
+ try {
54
+ yield this.tenantSetup.setup({
55
+ tenantId,
56
+ applyStarterPack: true,
57
+ });
58
+ }
59
+ catch (error) {
60
+ const message = error instanceof Error ? error.message : String(error);
61
+ this.logger.warn(`Tenant setup after subscription change failed (${tenantId}): ${message}`);
62
+ }
63
+ });
64
+ }
65
+ };
66
+ exports.SubscriptionTenantSetupListener = SubscriptionTenantSetupListener;
67
+ tslib_1.__decorate([
68
+ (0, event_emitter_1.OnEvent)(core_1.ENTITY_MUTATION_EVENT_WILDCARD, { async: true }),
69
+ tslib_1.__metadata("design:type", Function),
70
+ tslib_1.__metadata("design:paramtypes", [Object]),
71
+ tslib_1.__metadata("design:returntype", void 0)
72
+ ], SubscriptionTenantSetupListener.prototype, "handleEntityMutation", null);
73
+ exports.SubscriptionTenantSetupListener = SubscriptionTenantSetupListener = SubscriptionTenantSetupListener_1 = tslib_1.__decorate([
74
+ (0, common_1.Injectable)(),
75
+ tslib_1.__metadata("design:paramtypes", [tenant_setup_service_1.TenantSetupService])
76
+ ], SubscriptionTenantSetupListener);
77
+ //#endregion
78
+ //# sourceMappingURL=subscription-tenant-setup.listener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-tenant-setup.listener.js","sourceRoot":"","sources":["../../../../../../../libs/modules/application-management/server/src/lib/setup/subscription-tenant-setup.listener.ts"],"names":[],"mappings":";;;;;AAAA,iEAGgD;AAChD,2CAAoD;AACpD,yDAAgD;AAEhD,iEAA4D;AAE5D,+BAA+B;AAE/B,MAAM,mBAAmB,GAAG,qCAAqC,CAAC;AAClE,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAExC,YAAY;AAEZ,0DAA0D;AAE1D;;;GAGG;AAEI,IAAM,+BAA+B,uCAArC,MAAM,+BAA+B;IAG1C,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;QAF3C,WAAM,GAAG,IAAI,eAAM,CAAC,iCAA+B,CAAC,IAAI,CAAC,CAAC;IAEZ,CAAC;IAGhE,oBAAoB,CAAC,KAA0B;;QAC7C,IAAI,KAAK,CAAC,UAAU,KAAK,mBAAmB,EAAE,CAAC;YAC7C,OAAO;QACT,CAAC;QACD,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YACnE,OAAO;QACT,CAAC;QAED,MAAM,MAAM,GAAG,CAAC,MAAA,KAAK,CAAC,IAAI,mCAAI,KAAK,CAAC,QAAQ,CAAwC,CAAC;QACrF,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO;QACT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orex-platform/framework-shared/runtime';
2
+ import { type AXMSetupTenantInput } from '@acorex-platform/module-application-management-client/contracts';
3
+ import { TenantSetupService } from './tenant-setup.service';
4
+ export declare class TenantSetupCommand implements AXPCommand<AXMSetupTenantInput, unknown> {
5
+ private readonly tenantSetup;
6
+ constructor(tenantSetup: TenantSetupService);
7
+ execute(input?: AXMSetupTenantInput): AXPCommandExecuteResultPromise;
8
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantSetupCommand = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
6
+ const core_1 = require("@acorex-platform/framework-shared/core");
7
+ const module_application_management_contracts_1 = require("@acorex-platform/module-application-management-client/contracts");
8
+ const common_1 = require("@nestjs/common");
9
+ const tenant_setup_service_1 = require("./tenant-setup.service");
10
+ //#region ----- Setup tenant command -----
11
+ let TenantSetupCommand = class TenantSetupCommand {
12
+ constructor(tenantSetup) {
13
+ this.tenantSetup = tenantSetup;
14
+ }
15
+ execute() {
16
+ return tslib_1.__awaiter(this, arguments, void 0, function* (input = {}) {
17
+ try {
18
+ const data = yield this.tenantSetup.setup(input);
19
+ return (0, core_1.runtimeCommandSuccessObject)(data);
20
+ }
21
+ catch (error) {
22
+ return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Tenant setup failed.');
23
+ }
24
+ });
25
+ }
26
+ };
27
+ exports.TenantSetupCommand = TenantSetupCommand;
28
+ exports.TenantSetupCommand = TenantSetupCommand = tslib_1.__decorate([
29
+ (0, abstract_1.ServerHandler)({ key: module_application_management_contracts_1.AXMApplicationManagementServerCommands.SetupTenant }),
30
+ (0, common_1.Injectable)(),
31
+ tslib_1.__metadata("design:paramtypes", [tenant_setup_service_1.TenantSetupService])
32
+ ], TenantSetupCommand);
33
+ //#endregion
34
+ //# sourceMappingURL=tenant-setup.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant-setup.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/application-management/server/src/lib/setup/tenant-setup.command.ts"],"names":[],"mappings":";;;;AAAA,gFAAkF;AAClF,iEAA4G;AAE5G,sHAGkE;AAClE,2CAA4C;AAE5C,iEAA4D;AAE5D,0CAA0C;AAInC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;IAAG,CAAC;IAE1D,OAAO;qEAAC,QAA6B,EAAE;YAC3C,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACjD,OAAO,IAAA,kCAA2B,EAAC,IAAI,CAAC,CAAC;YAC3C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC;YAChG,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AAXY,gDAAkB;6BAAlB,kBAAkB;IAF9B,IAAA,wBAAa,EAAC,EAAE,GAAG,EAAE,gFAAsC,CAAC,WAAW,EAAE,CAAC;IAC1E,IAAA,mBAAU,GAAE;6CAE+B,yCAAkB;GADjD,kBAAkB,CAW9B;AAED,YAAY"}
@@ -0,0 +1,16 @@
1
+ import type { JqlSeedProvider, JqlSeedResolveContext, JqlSeedTaskTarget } from '@acorex-platform/framework-server/jql/seed';
2
+ import { TenantSetupService } from './tenant-setup.service';
3
+ /**
4
+ * After structural seed (tenants, industries, subscriptions), runs
5
+ * {@link TenantSetupService} for every tenant so module master data and
6
+ * industry starter packs are provisioned via the same path as production.
7
+ */
8
+ export declare class TenantSetupSeedProvider implements JqlSeedProvider {
9
+ private readonly tenantSetup;
10
+ readonly name = "tenant-setup";
11
+ readonly phase: "data";
12
+ readonly moduleName = "application-management";
13
+ readonly tags: string[];
14
+ constructor(tenantSetup: TenantSetupService);
15
+ resolve(_context: JqlSeedResolveContext): Promise<readonly JqlSeedTaskTarget[]>;
16
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantSetupSeedProvider = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const tenant_setup_service_1 = require("./tenant-setup.service");
7
+ //#region ----- Tenant setup seed provider -----
8
+ /**
9
+ * After structural seed (tenants, industries, subscriptions), runs
10
+ * {@link TenantSetupService} for every tenant so module master data and
11
+ * industry starter packs are provisioned via the same path as production.
12
+ */
13
+ let TenantSetupSeedProvider = class TenantSetupSeedProvider {
14
+ constructor(tenantSetup) {
15
+ this.tenantSetup = tenantSetup;
16
+ this.name = 'tenant-setup';
17
+ this.phase = 'data';
18
+ this.moduleName = 'application-management';
19
+ this.tags = ['setup', 'tenant', 'core'];
20
+ }
21
+ resolve(_context) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ return [
24
+ {
25
+ key: 'application-management/tenant-setup',
26
+ name: this.name,
27
+ moduleName: this.moduleName,
28
+ providerName: this.name,
29
+ phase: 'data',
30
+ kind: 'task',
31
+ tags: [...this.tags],
32
+ dependsOn: [
33
+ 'tenant-management/TenantDataSeeder',
34
+ 'demo-api/DemoTenantDataSeeder',
35
+ 'business-core/IndustryDataSeeder',
36
+ 'application-management/EditionDataSeeder',
37
+ 'subscription-management/SubscriptionPlanItemDataSeeder',
38
+ 'subscription-management/SubscriptionDataSeeder',
39
+ 'demo-api/DemoSubscriptionDataSeeder',
40
+ 'tenant-management/tenant-organization-settings-materialize',
41
+ ],
42
+ execute: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
43
+ yield this.tenantSetup.setup({
44
+ allTenants: true,
45
+ applyStarterPack: true,
46
+ });
47
+ }),
48
+ },
49
+ ];
50
+ });
51
+ }
52
+ };
53
+ exports.TenantSetupSeedProvider = TenantSetupSeedProvider;
54
+ exports.TenantSetupSeedProvider = TenantSetupSeedProvider = tslib_1.__decorate([
55
+ (0, common_1.Injectable)(),
56
+ tslib_1.__metadata("design:paramtypes", [tenant_setup_service_1.TenantSetupService])
57
+ ], TenantSetupSeedProvider);
58
+ //#endregion
59
+ //# sourceMappingURL=tenant-setup.seed-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant-setup.seed-provider.js","sourceRoot":"","sources":["../../../../../../../libs/modules/application-management/server/src/lib/setup/tenant-setup.seed-provider.ts"],"names":[],"mappings":";;;;AAKA,2CAA4C;AAE5C,iEAA4D;AAE5D,gDAAgD;AAEhD;;;;GAIG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAMlC,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;QALnD,SAAI,GAAG,cAAc,CAAC;QACtB,UAAK,GAAG,MAAe,CAAC;QACxB,eAAU,GAAG,wBAAwB,CAAC;QACtC,SAAI,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEmB,CAAC;IAE1D,OAAO,CAAC,QAA+B;;YAC3C,OAAO;gBACL;oBACE,GAAG,EAAE,qCAAqC;oBAC1C,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,UAAU,EAAE,IAAI,CAAC,UAAU;oBAC3B,YAAY,EAAE,IAAI,CAAC,IAAI;oBACvB,KAAK,EAAE,MAAM;oBACb,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;oBACpB,SAAS,EAAE;wBACT,oCAAoC;wBACpC,+BAA+B;wBAC/B,kCAAkC;wBAClC,0CAA0C;wBAC1C,wDAAwD;wBACxD,gDAAgD;wBAChD,qCAAqC;wBACrC,4DAA4D;qBAC7D;oBACD,OAAO,EAAE,GAAS,EAAE;wBAClB,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;4BAC3B,UAAU,EAAE,IAAI;4BAChB,gBAAgB,EAAE,IAAI;yBACvB,CAAC,CAAC;oBACL,CAAC,CAAA;iBACF;aACF,CAAC;QACJ,CAAC;KAAA;CACF,CAAA;AArCY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;6CAO+B,yCAAkB;GANjD,uBAAuB,CAqCnC;AAED,YAAY"}
@@ -0,0 +1,13 @@
1
+ import type { AXMSetupTenantInput, AXMSetupTenantResult } from '@acorex-platform/module-application-management-client/contracts';
2
+ import { ModuleSetupAggregatorService } from './module-setup-aggregator.service';
3
+ import { TenantSubscriptionModulesResolver } from './tenant-subscription-modules.resolver';
4
+ export declare class TenantSetupService {
5
+ private readonly aggregator;
6
+ private readonly modulesResolver;
7
+ private readonly logger;
8
+ constructor(aggregator: ModuleSetupAggregatorService, modulesResolver: TenantSubscriptionModulesResolver);
9
+ setup(input?: AXMSetupTenantInput): Promise<AXMSetupTenantResult>;
10
+ private setupOneTenant;
11
+ private runProvider;
12
+ private orderProviders;
13
+ }
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ var TenantSetupService_1;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TenantSetupService = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const core_1 = require("@acorex-platform/framework-server/core");
7
+ const common_1 = require("@nestjs/common");
8
+ const module_setup_aggregator_service_1 = require("./module-setup-aggregator.service");
9
+ const tenant_subscription_modules_resolver_1 = require("./tenant-subscription-modules.resolver");
10
+ //#region ----- Tenant setup service -----
11
+ let TenantSetupService = TenantSetupService_1 = class TenantSetupService {
12
+ constructor(aggregator, modulesResolver) {
13
+ this.aggregator = aggregator;
14
+ this.modulesResolver = modulesResolver;
15
+ this.logger = new common_1.Logger(TenantSetupService_1.name);
16
+ }
17
+ setup() {
18
+ return tslib_1.__awaiter(this, arguments, void 0, function* (input = {}) {
19
+ const tenantIds = input.allTenants
20
+ ? yield this.modulesResolver.listTenantIds()
21
+ : input.tenantId
22
+ ? [input.tenantId]
23
+ : [];
24
+ if (tenantIds.length === 0) {
25
+ throw new Error('SetupTenant requires tenantId or allTenants=true');
26
+ }
27
+ const modulesRun = new Set();
28
+ const industryPacksRun = new Set();
29
+ for (const tenantId of tenantIds) {
30
+ const result = yield this.setupOneTenant(tenantId, input);
31
+ for (const moduleName of result.modulesRun) {
32
+ modulesRun.add(moduleName);
33
+ }
34
+ for (const packKey of result.industryPacksRun) {
35
+ industryPacksRun.add(packKey);
36
+ }
37
+ }
38
+ return {
39
+ tenantIds,
40
+ modulesRun: [...modulesRun],
41
+ industryPacksRun: [...industryPacksRun],
42
+ };
43
+ });
44
+ }
45
+ setupOneTenant(tenantId, input) {
46
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
+ var _a;
48
+ const target = yield this.modulesResolver.resolveTenant(tenantId);
49
+ if (!target) {
50
+ this.logger.warn(`SetupTenant skipped — tenant not found: ${tenantId}`);
51
+ return { modulesRun: [], industryPacksRun: [] };
52
+ }
53
+ const applyStarterPack = input.applyStarterPack !== false && !!target.industryCode;
54
+ const moduleFilter = ((_a = input.moduleNames) === null || _a === void 0 ? void 0 : _a.length) ? new Set(input.moduleNames) : null;
55
+ const enabledModules = target.enabledModules.filter((moduleName) => !moduleFilter || moduleFilter.has(moduleName));
56
+ const context = {
57
+ tenantId,
58
+ industryId: target.industryId,
59
+ industryCode: target.industryCode,
60
+ enabledModules: target.enabledModules,
61
+ applyStarterPack,
62
+ };
63
+ const moduleSetups = this.orderProviders(this.aggregator.getModuleSetups().filter((provider) => {
64
+ if (moduleFilter && !moduleFilter.has(provider.moduleName)) {
65
+ return false;
66
+ }
67
+ return provider.always === true || enabledModules.includes(provider.moduleName);
68
+ }));
69
+ const modulesRun = [];
70
+ for (const provider of moduleSetups) {
71
+ this.logger.log(`Module setup ${provider.moduleName} for tenant ${tenantId}` +
72
+ (provider.version ? ` (v${provider.version})` : ''));
73
+ yield this.runProvider(`Module setup ${provider.moduleName}`, tenantId, () => provider.run(context));
74
+ modulesRun.push(provider.moduleName);
75
+ }
76
+ const industryPacksRun = [];
77
+ if (applyStarterPack && target.industryCode) {
78
+ const packs = this.orderProviders(this.aggregator
79
+ .getIndustryPackContributions()
80
+ .filter((provider) => provider.industryCode === target.industryCode &&
81
+ target.enabledModules.includes(provider.moduleName) &&
82
+ (!moduleFilter || moduleFilter.has(provider.moduleName))));
83
+ for (const provider of packs) {
84
+ const key = `${provider.industryCode}:${provider.moduleName}`;
85
+ this.logger.log(`Industry pack ${key} for tenant ${tenantId}`);
86
+ yield this.runProvider(`Industry pack ${key}`, tenantId, () => provider.run(context));
87
+ industryPacksRun.push(key);
88
+ }
89
+ }
90
+ return { modulesRun, industryPacksRun };
91
+ });
92
+ }
93
+ runProvider(label, tenantId, run) {
94
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
95
+ var _a;
96
+ try {
97
+ yield run();
98
+ }
99
+ catch (error) {
100
+ const body = (0, core_1.mapUnknownErrorToAXPErrorBody)(error);
101
+ const details = body.details === undefined ? '' : ` details=${JSON.stringify(body.details)}`;
102
+ const code = body.code ? ` [${body.code}]` : '';
103
+ throw new Error(`${label} failed for tenant ${tenantId}: ${(_a = body.message) !== null && _a !== void 0 ? _a : 'unknown error'}${code}${details}`, { cause: error });
104
+ }
105
+ });
106
+ }
107
+ orderProviders(providers) {
108
+ var _a;
109
+ const keyOf = (provider) => {
110
+ var _a;
111
+ const industryCode = 'industryCode' in provider && typeof provider.industryCode === 'string'
112
+ ? provider.industryCode
113
+ : '';
114
+ return `${industryCode}:${provider.moduleName}:${(_a = provider.layer) !== null && _a !== void 0 ? _a : 'default'}`;
115
+ };
116
+ const byKey = new Map(providers.map((provider) => [keyOf(provider), provider]));
117
+ const byModuleName = new Map();
118
+ for (const provider of providers) {
119
+ const list = (_a = byModuleName.get(provider.moduleName)) !== null && _a !== void 0 ? _a : [];
120
+ list.push(provider);
121
+ byModuleName.set(provider.moduleName, list);
122
+ }
123
+ const visiting = new Set();
124
+ const visited = new Set();
125
+ const ordered = [];
126
+ const visitKey = (key) => {
127
+ var _a, _b;
128
+ if (visited.has(key)) {
129
+ return;
130
+ }
131
+ if (visiting.has(key)) {
132
+ throw new Error(`Circular module setup dependency involving "${key}"`);
133
+ }
134
+ const provider = byKey.get(key);
135
+ if (!provider) {
136
+ return;
137
+ }
138
+ visiting.add(key);
139
+ for (const dep of (_a = provider.dependsOn) !== null && _a !== void 0 ? _a : []) {
140
+ for (const depProvider of (_b = byModuleName.get(dep)) !== null && _b !== void 0 ? _b : []) {
141
+ visitKey(keyOf(depProvider));
142
+ }
143
+ }
144
+ visiting.delete(key);
145
+ visited.add(key);
146
+ ordered.push(provider);
147
+ };
148
+ for (const provider of providers) {
149
+ visitKey(keyOf(provider));
150
+ }
151
+ return ordered;
152
+ }
153
+ };
154
+ exports.TenantSetupService = TenantSetupService;
155
+ exports.TenantSetupService = TenantSetupService = TenantSetupService_1 = tslib_1.__decorate([
156
+ (0, common_1.Injectable)(),
157
+ tslib_1.__metadata("design:paramtypes", [module_setup_aggregator_service_1.ModuleSetupAggregatorService,
158
+ tenant_subscription_modules_resolver_1.TenantSubscriptionModulesResolver])
159
+ ], TenantSetupService);
160
+ //#endregion
161
+ //# sourceMappingURL=tenant-setup.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant-setup.service.js","sourceRoot":"","sources":["../../../../../../../libs/modules/application-management/server/src/lib/setup/tenant-setup.service.ts"],"names":[],"mappings":";;;;;AAAA,iEAAuF;AAQvF,2CAAoD;AAEpD,uFAAiF;AACjF,iGAA2F;AAE3F,0CAA0C;AAGnC,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAG7B,YACmB,UAAwC,EACxC,eAAkD;QADlD,eAAU,GAAV,UAAU,CAA8B;QACxC,oBAAe,GAAf,eAAe,CAAmC;QAJpD,WAAM,GAAG,IAAI,eAAM,CAAC,oBAAkB,CAAC,IAAI,CAAC,CAAC;IAK3D,CAAC;IAEE,KAAK;qE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C,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC/B,CAAC;YACH,CAAC;YACD,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACrB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC,CAAC;QAEF,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5B,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAA;AArLY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;6CAKoB,8DAA4B;QACvB,wEAAiC;GAL1D,kBAAkB,CAqL9B;AAED,YAAY"}
@@ -0,0 +1,20 @@
1
+ import { EntityStorageMiddlewareService } from '@acorex-platform/framework-server/core';
2
+ export interface TenantSetupTarget {
3
+ tenantId: string;
4
+ industryId?: string;
5
+ industryCode?: string;
6
+ enabledModules: string[];
7
+ }
8
+ /**
9
+ * Resolves subscribed modules for a tenant without requiring a user session
10
+ * (used by {@link TenantSetupService} during seed and subscription hooks).
11
+ */
12
+ export declare class TenantSubscriptionModulesResolver {
13
+ private readonly entityStorage;
14
+ constructor(entityStorage: EntityStorageMiddlewareService);
15
+ listTenantIds(): Promise<string[]>;
16
+ resolveTenant(tenantId: string): Promise<TenantSetupTarget | null>;
17
+ private resolveIndustryCode;
18
+ private resolveEnabledModules;
19
+ private listEntities;
20
+ }
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantSubscriptionModulesResolver = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@acorex-platform/framework-server/core");
6
+ const abstract_1 = require("@acorex-platform/framework-server/jql/abstract");
7
+ const common_1 = require("@nestjs/common");
8
+ //#region ----- Types -----
9
+ const TENANT_ENTITY = 'TenantManagement.Tenant';
10
+ const INDUSTRY_ENTITY = 'BusinessCore.Industry';
11
+ const SUBSCRIPTION_ENTITY = 'SubscriptionManagement.Subscription';
12
+ const SUBSCRIPTION_PLAN_ITEM_ENTITY = 'SubscriptionManagement.SubscriptionPlanItem';
13
+ const APPLICATION_ENTITY = 'ApplicationManagement.Application';
14
+ const EDITION_ENTITY = 'ApplicationManagement.Edition';
15
+ const ACTIVE_STATUS = 'active';
16
+ const SUBSCRIBER_TYPE_TENANT = 'Tenant';
17
+ //#endregion
18
+ //#region ----- Tenant subscription modules resolver -----
19
+ /**
20
+ * Resolves subscribed modules for a tenant without requiring a user session
21
+ * (used by {@link TenantSetupService} during seed and subscription hooks).
22
+ */
23
+ let TenantSubscriptionModulesResolver = class TenantSubscriptionModulesResolver {
24
+ constructor(entityStorage) {
25
+ this.entityStorage = entityStorage;
26
+ }
27
+ listTenantIds() {
28
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
29
+ const tenants = yield this.listEntities(TENANT_ENTITY);
30
+ return tenants
31
+ .map((tenant) => (typeof tenant['id'] === 'string' ? tenant['id'] : ''))
32
+ .filter((id) => id.length > 0);
33
+ });
34
+ }
35
+ resolveTenant(tenantId) {
36
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
37
+ const tenant = (yield this.entityStorage.getOneAsEngine(TENANT_ENTITY, tenantId));
38
+ if (!tenant) {
39
+ return null;
40
+ }
41
+ const industryId = typeof tenant['industryId'] === 'string' ? tenant['industryId'] : undefined;
42
+ const industryCode = yield this.resolveIndustryCode(industryId, tenant);
43
+ const enabledModules = yield this.resolveEnabledModules(tenantId);
44
+ return {
45
+ tenantId,
46
+ industryId,
47
+ industryCode,
48
+ enabledModules,
49
+ };
50
+ });
51
+ }
52
+ resolveIndustryCode(industryId, tenant) {
53
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
54
+ const nested = tenant['industry'];
55
+ if (typeof (nested === null || nested === void 0 ? void 0 : nested.code) === 'string' && nested.code.trim()) {
56
+ return nested.code.trim();
57
+ }
58
+ if (!industryId) {
59
+ return undefined;
60
+ }
61
+ const industry = (yield this.entityStorage.getOneAsEngine(INDUSTRY_ENTITY, industryId));
62
+ return typeof (industry === null || industry === void 0 ? void 0 : industry['code']) === 'string' ? industry['code'] : undefined;
63
+ });
64
+ }
65
+ resolveEnabledModules(tenantId) {
66
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
67
+ const [subscriptions, planItems, applications] = yield Promise.all([
68
+ this.listEntities(SUBSCRIPTION_ENTITY),
69
+ this.listEntities(SUBSCRIPTION_PLAN_ITEM_ENTITY),
70
+ this.listEntities(APPLICATION_ENTITY),
71
+ ]);
72
+ const planIds = subscriptions
73
+ .filter((subscription) => subscription['subscriberType'] === SUBSCRIBER_TYPE_TENANT &&
74
+ String(subscription['subscriberId']) === tenantId &&
75
+ subscription['statusId'] === ACTIVE_STATUS &&
76
+ subscription['planId'])
77
+ .map((subscription) => String(subscription['planId']));
78
+ if (planIds.length === 0) {
79
+ return [];
80
+ }
81
+ const editionIds = new Set(planItems
82
+ .filter((planItem) => planIds.includes(String(planItem['planId'])) && planItem['editionId'])
83
+ .map((planItem) => String(planItem['editionId'])));
84
+ if (editionIds.size === 0) {
85
+ return [];
86
+ }
87
+ const modules = new Set();
88
+ for (const application of applications) {
89
+ if (application['statusId'] !== ACTIVE_STATUS) {
90
+ continue;
91
+ }
92
+ const appEditionIds = application['editionIds'];
93
+ if (!Array.isArray(appEditionIds)) {
94
+ continue;
95
+ }
96
+ const matchingEditionIds = appEditionIds
97
+ .map((id) => String(id))
98
+ .filter((id) => editionIds.has(id));
99
+ for (const editionId of matchingEditionIds) {
100
+ const edition = (yield this.entityStorage.getOneAsEngine(EDITION_ENTITY, editionId));
101
+ const modulesAndFeatures = edition === null || edition === void 0 ? void 0 : edition['modulesAndFeatures'];
102
+ const list = modulesAndFeatures === null || modulesAndFeatures === void 0 ? void 0 : modulesAndFeatures.modules;
103
+ if (!Array.isArray(list)) {
104
+ continue;
105
+ }
106
+ for (const moduleName of list) {
107
+ if (typeof moduleName === 'string' && moduleName.trim()) {
108
+ modules.add(moduleName.trim());
109
+ }
110
+ }
111
+ }
112
+ }
113
+ return [...modules].sort();
114
+ });
115
+ }
116
+ listEntities(entityName) {
117
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
118
+ var _a;
119
+ // Engine path — SetupTenant runs without an HTTP session.
120
+ const result = yield this.entityStorage.queryAsEngine(entityName, (0, abstract_1.bypassAllEntityVisibilityFilters)({ skip: 0, take: 5000 }));
121
+ return ((_a = result.items) !== null && _a !== void 0 ? _a : []);
122
+ });
123
+ }
124
+ };
125
+ exports.TenantSubscriptionModulesResolver = TenantSubscriptionModulesResolver;
126
+ exports.TenantSubscriptionModulesResolver = TenantSubscriptionModulesResolver = tslib_1.__decorate([
127
+ (0, common_1.Injectable)(),
128
+ tslib_1.__metadata("design:paramtypes", [core_1.EntityStorageMiddlewareService])
129
+ ], TenantSubscriptionModulesResolver);
130
+ //#endregion
131
+ //# sourceMappingURL=tenant-subscription-modules.resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant-subscription-modules.resolver.js","sourceRoot":"","sources":["../../../../../../../libs/modules/application-management/server/src/lib/setup/tenant-subscription-modules.resolver.ts"],"names":[],"mappings":";;;;AAAA,iEAAwF;AACxF,6EAAkG;AAClG,2CAA4C;AAE5C,2BAA2B;AAE3B,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAChD,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAChD,MAAM,mBAAmB,GAAG,qCAAqC,CAAC;AAClE,MAAM,6BAA6B,GAAG,6CAA6C,CAAC;AACpF,MAAM,kBAAkB,GAAG,mCAAmC,CAAC;AAC/D,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAEvD,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AASxC,YAAY;AAEZ,0DAA0D;AAE1D;;;GAGG;AAE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AAoB,CAAsC,CAAC;oBAChG,MAAM,IAAI,GAAG,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CAAC;oBACzC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;wBACzB,SAAS;oBACX,CAAC;oBACD,KAAK,MAAM,UAAU,IAAI,IAAI,EAAE,CAAC;wBAC9B,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;4BACxD,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;wBACjC,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAED,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7B,CAAC;KAAA;IAEa,YAAY,CAAC,UAAkB;;;YAC3C,0DAA0D;YAC1D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,CACnD,UAAU,EACV,IAAA,2CAAgC,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAC1D,CAAC;YACF,OAAO,CAAC,MAAA,MAAM,CAAC,KAAK,mCAAI,EAAE,CAA8B,CAAC;QAC3D,CAAC;KAAA;CACF,CAAA;AAzHY,8EAAiC;4CAAjC,iCAAiC;IAD7C,IAAA,mBAAU,GAAE;6CAEiC,qCAA8B;GAD/D,iCAAiC,CAyH7C;AAED,YAAY"}
package/src/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from './lib/application-management-server.module';
2
- export { applicationmanagementSeedCatalog } from './lib/seed/application-management.seed-catalog';
3
- export { APPLICATION_MANAGEMENT_MODULE_SEED } from './lib/seed/application-management-seed.tokens';
4
- export { ApplicationManagementSeedCatalogProvider } from './lib/seed/application-management-seed.provider';
5
- export * from './lib/seed';
package/src/index.js DELETED
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApplicationManagementSeedCatalogProvider = exports.APPLICATION_MANAGEMENT_MODULE_SEED = exports.applicationmanagementSeedCatalog = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./lib/application-management-server.module"), exports);
6
- var application_management_seed_catalog_1 = require("./lib/seed/application-management.seed-catalog");
7
- Object.defineProperty(exports, "applicationmanagementSeedCatalog", { enumerable: true, get: function () { return application_management_seed_catalog_1.applicationmanagementSeedCatalog; } });
8
- var application_management_seed_tokens_1 = require("./lib/seed/application-management-seed.tokens");
9
- Object.defineProperty(exports, "APPLICATION_MANAGEMENT_MODULE_SEED", { enumerable: true, get: function () { return application_management_seed_tokens_1.APPLICATION_MANAGEMENT_MODULE_SEED; } });
10
- var application_management_seed_provider_1 = require("./lib/seed/application-management-seed.provider");
11
- Object.defineProperty(exports, "ApplicationManagementSeedCatalogProvider", { enumerable: true, get: function () { return application_management_seed_provider_1.ApplicationManagementSeedCatalogProvider; } });
12
- tslib_1.__exportStar(require("./lib/seed"), exports);
13
- //# sourceMappingURL=index.js.map
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/modules/application-management/server/src/index.ts"],"names":[],"mappings":";;;;AAAA,qFAA2D;AAC3D,sGAAkG;AAAzF,uJAAA,gCAAgC,OAAA;AACzC,oGAAmG;AAA1F,wJAAA,kCAAkC,OAAA;AAC3C,wGAA2G;AAAlG,gKAAA,wCAAwC,OAAA;AACjD,qDAA2B"}
@@ -1,2 +0,0 @@
1
- export declare class ApplicationManagementServerModule {
2
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApplicationManagementServerModule = void 0;
4
- const tslib_1 = require("tslib");
5
- const common_1 = require("@nestjs/common");
6
- const application_management_seed_catalog_1 = require("./seed/application-management.seed-catalog");
7
- const application_management_seed_tokens_1 = require("./seed/application-management-seed.tokens");
8
- const application_management_seed_provider_1 = require("./seed/application-management-seed.provider");
9
- const core_1 = require("@acorex-platform/framework-server/core");
10
- const application_report_handlers_1 = require("./handlers/application-report.handlers");
11
- const application_report_definition_provider_1 = require("./reports/application-report-definition.provider");
12
- //#region ---- Application management backend module ----
13
- let ApplicationManagementServerModule = class ApplicationManagementServerModule {
14
- };
15
- exports.ApplicationManagementServerModule = ApplicationManagementServerModule;
16
- exports.ApplicationManagementServerModule = ApplicationManagementServerModule = tslib_1.__decorate([
17
- (0, common_1.Module)({
18
- imports: [core_1.EntityStorageModule],
19
- providers: [
20
- application_management_seed_provider_1.ApplicationManagementSeedCatalogProvider,
21
- {
22
- provide: application_management_seed_tokens_1.APPLICATION_MANAGEMENT_MODULE_SEED,
23
- useValue: application_management_seed_catalog_1.applicationmanagementSeedCatalog,
24
- },
25
- application_report_handlers_1.GetApplicationVersionsTimelineQueryHandler,
26
- application_report_handlers_1.GetApplicationVersionsChartDataQueryHandler,
27
- application_report_definition_provider_1.ApplicationReportDefinitionProvider
28
- ],
29
- })
30
- ], ApplicationManagementServerModule);
31
- //#endregion
32
- //# sourceMappingURL=application-management-server.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"application-management-server.module.js","sourceRoot":"","sources":["../../../../../libs/modules/application-management/server/src/lib/application-management-server.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,oGAA8F;AAC9F,kGAA+F;AAC/F,sGAAuG;AAEvG,iEAA6E;AAC7E,wFAGgD;AAChD,6GAAuG;AAEvG,yDAAyD;AAclD,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;CAAG,CAAA;AAApC,8EAAiC;4CAAjC,iCAAiC;IAZ7C,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,0BAAmB,CAAC;QAC9B,SAAS,EAAE;YACT,+EAAwC;YACxC;gBACE,OAAO,EAAE,uEAAkC;gBAC3C,QAAQ,EAAE,sEAAgC;aAC3C;YACD,wEAA0C;YAC1C,yEAA2C;YAC3C,4EAAmC;SAAC;KACvC,CAAC;GACW,iCAAiC,CAAG;AAEjD,YAAY"}