@acorex-platform/module-tenant-management-client 0.0.21

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.
@@ -0,0 +1,123 @@
1
+ //#region ---- Tenant context definitions ----
2
+ const AXM_TENANT_CONTEXT_DEFINITIONS = [
3
+ {
4
+ name: 'tenantTitle',
5
+ title: 'Tenant title',
6
+ description: 'Display name of the active tenant from the session (title or name).',
7
+ order: 21,
8
+ capabilities: ['ai'],
9
+ },
10
+ ];
11
+ //#endregion
12
+
13
+ // Management feature removed - module name is used directly as feature key
14
+ const AXMTenantManagementFeatureKeys = {};
15
+
16
+ const AXMTenantManagementMenuKeys = {
17
+ Root: 'TenantManagement:Menu',
18
+ Tenants: 'TenantManagement:Menu:Tenants',
19
+ };
20
+
21
+ /**
22
+ * Applications & Platform capabilities used by this module.
23
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
24
+ */
25
+ const AXPApplicationsPlatformPermissionKeys = {
26
+ Access: 'ApplicationsPlatform:Permission:Access',
27
+ MaintainApplications: 'ApplicationsPlatform:Permission:MaintainApplications',
28
+ MaintainTenants: 'ApplicationsPlatform:Permission:MaintainTenants',
29
+ MaintainPlatformShell: 'ApplicationsPlatform:Permission:MaintainPlatformShell',
30
+ MaintainLandingPages: 'ApplicationsPlatform:Permission:MaintainLandingPages',
31
+ MaintainIdentifiers: 'ApplicationsPlatform:Permission:MaintainIdentifiers',
32
+ MaintainTenantSettings: 'ApplicationsPlatform:Permission:MaintainTenantSettings',
33
+ MaintainPlatformSettings: 'ApplicationsPlatform:Permission:MaintainPlatformSettings',
34
+ MaintainLocales: 'ApplicationsPlatform:Permission:MaintainLocales',
35
+ UseDevTools: 'ApplicationsPlatform:Permission:UseDevTools',
36
+ };
37
+ /**
38
+ * @deprecated Prefer {@link AXPApplicationsPlatformPermissionKeys}.
39
+ * Legacy nested shape kept so existing imports compile during migration.
40
+ */
41
+ const AXMTenantManagementPermissionsKeys = {
42
+ TenantManagement: {
43
+ Management: AXPApplicationsPlatformPermissionKeys.MaintainTenants,
44
+ },
45
+ };
46
+
47
+ const config = {
48
+ i18n: 'tenant-management',
49
+ module: 'TenantManagement',
50
+ };
51
+ const RootConfig = {
52
+ config,
53
+ module: {
54
+ route: 'tenant-management',
55
+ name: config.module,
56
+ title: `@${config.i18n}:module.title`,
57
+ icon: 'fa-light fa-building',
58
+ },
59
+ entities: {
60
+ tenant: {
61
+ name: 'Tenant',
62
+ source: `${config.module}.Tenant`,
63
+ title: `@${config.i18n}:tenants.entities.tenant.title`,
64
+ titlePlural: `@${config.i18n}:tenants.entities.tenant.plural`,
65
+ icon: 'fa-light fa-building',
66
+ },
67
+ tenantUser: {
68
+ name: 'TenantUser',
69
+ source: `${config.module}.TenantUser`,
70
+ title: `@${config.i18n}:tenants.entities.tenant-user.title`,
71
+ titlePlural: `@${config.i18n}:tenants.entities.tenant-user.plural`,
72
+ icon: 'fa-light fa-user-group',
73
+ },
74
+ tenantUserAppAccess: {
75
+ name: 'TenantUserAppAccess',
76
+ source: `${config.module}.TenantUserAppAccess`,
77
+ title: `@${config.i18n}:tenants.entities.tenant-user-app-access.title`,
78
+ titlePlural: `@${config.i18n}:tenants.entities.tenant-user-app-access.plural`,
79
+ icon: 'fa-light fa-app-store',
80
+ },
81
+ resourceShare: {
82
+ name: 'ResourceShare',
83
+ source: `${config.module}.ResourceShare`,
84
+ title: `@${config.i18n}:tenants.entities.resource-share.title`,
85
+ titlePlural: `@${config.i18n}:tenants.entities.resource-share.plural`,
86
+ icon: 'fa-light fa-share-nodes',
87
+ },
88
+ },
89
+ queries: {
90
+ dashboard: {
91
+ activeUsersKpi: `${config.module}:Dashboard:ActiveUsersKpi`,
92
+ usersByRoleDonut: `${config.module}:Dashboard:UsersByRoleDonut`,
93
+ },
94
+ reports: {
95
+ getTenantApplicationAccess: `${config.module}:Reports:GetTenantApplicationAccess`,
96
+ getTenantUserDistribution: `${config.module}:Reports:GetTenantUserDistribution`,
97
+ getTenantRegistrationTimeline: `${config.module}:Reports:GetTenantRegistrationTimeline`,
98
+ getTenantRegistrationChartData: `${config.module}:Reports:GetTenantRegistrationChartData`,
99
+ getSubscriptionsTimeline: `${config.module}:Reports:GetSubscriptionsTimeline`,
100
+ getSubscriptionsChartData: `${config.module}:Reports:GetSubscriptionsChartData`,
101
+ },
102
+ },
103
+ };
104
+ // Keep the old export for backward compatibility
105
+ const AXMTenantManagementModuleConst = {
106
+ moduleName: 'TenantManagement',
107
+ moduleRoute: 'tenant-management',
108
+ i18n: 'tenant-management',
109
+ };
110
+
111
+ //#endregion
112
+
113
+ //#region ---- ResourceShare types ----
114
+ //#endregion
115
+
116
+ //#region ---- Contracts barrel ----
117
+
118
+ /**
119
+ * Generated bundle index. Do not edit.
120
+ */
121
+
122
+ export { AXMTenantManagementFeatureKeys, AXMTenantManagementMenuKeys, AXMTenantManagementModuleConst, AXMTenantManagementPermissionsKeys, AXM_TENANT_CONTEXT_DEFINITIONS, AXPApplicationsPlatformPermissionKeys, RootConfig };
123
+ //# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-tenant-management-client-contracts.mjs","sources":["../../../../libs/modules/tenant-management/contracts/src/lib/context.definitions.ts","../../../../libs/modules/tenant-management/contracts/src/features.keys.ts","../../../../libs/modules/tenant-management/contracts/src/menu.keys.ts","../../../../libs/modules/tenant-management/contracts/src/permissions.keys.ts","../../../../libs/modules/tenant-management/contracts/src/root-config.ts","../../../../libs/modules/tenant-management/contracts/src/entities/tenant-user-app-access/tenant-user-app-access.types.ts","../../../../libs/modules/tenant-management/contracts/src/entities/resource-share/resource-share.types.ts","../../../../libs/modules/tenant-management/contracts/src/index.ts","../../../../libs/modules/tenant-management/contracts/src/acorex-platform-module-tenant-management-client-contracts.ts"],"sourcesContent":["import type { AXPContextDefinition } from '@acorex-platform/framework-shared/core';\n\n//#region ---- Tenant context definitions ----\n\nexport const AXM_TENANT_CONTEXT_DEFINITIONS: AXPContextDefinition[] = [\n {\n name: 'tenantTitle',\n title: 'Tenant title',\n description: 'Display name of the active tenant from the session (title or name).',\n order: 21,\n capabilities: ['ai'],\n },\n];\n\n//#endregion\n","// Management feature removed - module name is used directly as feature key\nexport const AXMTenantManagementFeatureKeys = {} as const;\n\n","export const AXMTenantManagementMenuKeys = {\n Root: 'TenantManagement:Menu',\n Tenants: 'TenantManagement:Menu:Tenants',\n} as const;\n\n","/**\n * Applications & Platform capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPApplicationsPlatformPermissionKeys = {\n Access: 'ApplicationsPlatform:Permission:Access',\n MaintainApplications: 'ApplicationsPlatform:Permission:MaintainApplications',\n MaintainTenants: 'ApplicationsPlatform:Permission:MaintainTenants',\n MaintainPlatformShell: 'ApplicationsPlatform:Permission:MaintainPlatformShell',\n MaintainLandingPages: 'ApplicationsPlatform:Permission:MaintainLandingPages',\n MaintainIdentifiers: 'ApplicationsPlatform:Permission:MaintainIdentifiers',\n MaintainTenantSettings: 'ApplicationsPlatform:Permission:MaintainTenantSettings',\n MaintainPlatformSettings: 'ApplicationsPlatform:Permission:MaintainPlatformSettings',\n MaintainLocales: 'ApplicationsPlatform:Permission:MaintainLocales',\n UseDevTools: 'ApplicationsPlatform:Permission:UseDevTools',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPApplicationsPlatformPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMTenantManagementPermissionsKeys = {\n TenantManagement: {\n Management: AXPApplicationsPlatformPermissionKeys.MaintainTenants,\n },\n} as const;\n","const config = {\n i18n: 'tenant-management',\n module: 'TenantManagement',\n};\n\nexport const RootConfig = {\n config,\n module: {\n route: 'tenant-management',\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-building',\n },\n entities: {\n tenant: {\n name: 'Tenant',\n source: `${config.module}.Tenant`,\n title: `@${config.i18n}:tenants.entities.tenant.title`,\n titlePlural: `@${config.i18n}:tenants.entities.tenant.plural`,\n icon: 'fa-light fa-building',\n },\n tenantUser: {\n name: 'TenantUser',\n source: `${config.module}.TenantUser`,\n title: `@${config.i18n}:tenants.entities.tenant-user.title`,\n titlePlural: `@${config.i18n}:tenants.entities.tenant-user.plural`,\n icon: 'fa-light fa-user-group',\n },\n tenantUserAppAccess: {\n name: 'TenantUserAppAccess',\n source: `${config.module}.TenantUserAppAccess`,\n title: `@${config.i18n}:tenants.entities.tenant-user-app-access.title`,\n titlePlural: `@${config.i18n}:tenants.entities.tenant-user-app-access.plural`,\n icon: 'fa-light fa-app-store',\n },\n resourceShare: {\n name: 'ResourceShare',\n source: `${config.module}.ResourceShare`,\n title: `@${config.i18n}:tenants.entities.resource-share.title`,\n titlePlural: `@${config.i18n}:tenants.entities.resource-share.plural`,\n icon: 'fa-light fa-share-nodes',\n },\n },\n queries: {\n dashboard: {\n activeUsersKpi: `${config.module}:Dashboard:ActiveUsersKpi`,\n usersByRoleDonut: `${config.module}:Dashboard:UsersByRoleDonut`,\n },\n reports: {\n getTenantApplicationAccess: `${config.module}:Reports:GetTenantApplicationAccess`,\n getTenantUserDistribution: `${config.module}:Reports:GetTenantUserDistribution`,\n getTenantRegistrationTimeline: `${config.module}:Reports:GetTenantRegistrationTimeline`,\n getTenantRegistrationChartData: `${config.module}:Reports:GetTenantRegistrationChartData`,\n getSubscriptionsTimeline: `${config.module}:Reports:GetSubscriptionsTimeline`,\n getSubscriptionsChartData: `${config.module}:Reports:GetSubscriptionsChartData`,\n },\n },\n};\n\n// Keep the old export for backward compatibility\nexport const AXMTenantManagementModuleConst = {\n moduleName: 'TenantManagement',\n moduleRoute: 'tenant-management',\n i18n: 'tenant-management',\n} as const;\n","import type { AXPSystemStatusType } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- TenantUserAppAccess model ----\n\n/**\n * Application access grant for a tenant membership (period-based).\n * User → TenantUser → TenantUserAppAccess.\n */\nexport interface AXMTenantManagementTenantUserAppAccessEntityModel\n extends AXPEntityModel<string> {\n tenantUserId: string;\n tenantUser?: {\n id: string;\n userId?: string;\n tenantId?: string;\n };\n\n /** Denormalized for membership filters (same as TenantUser.tenantId). */\n tenantId: string;\n\n applicationId: string;\n application?: {\n id: string;\n title?: string;\n };\n\n statusId?: AXPSystemStatusType;\n startDate: Date;\n endDate?: Date;\n}\n\n//#endregion\n","//#region ---- ResourceShare types ----\n\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\nexport type AXMResourceSharePermission = 'read' | 'contribute' | 'admin';\nexport type AXMResourceShareStatus = 'active' | 'revoked';\n\nexport interface AXMResourceShareResourceInfo {\n /** Entity type, e.g. `ProjectManagement.Project`. */\n type: string;\n id: string;\n}\n\nexport interface AXMResourceShareShareInfo {\n ownerTenantId: string;\n sharedWithTenantId: string;\n applicationId?: string;\n permission: AXMResourceSharePermission;\n status: AXMResourceShareStatus;\n validFrom?: Date | string;\n validTo?: Date | string;\n}\n\nexport interface AXMTenantManagementResourceShareEntityModel extends AXPEntityModel<string> {\n resourceInfo: AXMResourceShareResourceInfo;\n shareInfo: AXMResourceShareShareInfo;\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './lib/context.definitions';\nexport * from './features.keys';\nexport * from './menu.keys';\nexport * from './permissions.keys';\n\nexport * from './root-config';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAEA;AAEO,MAAM,8BAA8B,GAA2B;AACpE,IAAA;AACE,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,KAAK,EAAE,cAAc;AACrB,QAAA,WAAW,EAAE,qEAAqE;AAClF,QAAA,KAAK,EAAE,EAAE;QACT,YAAY,EAAE,CAAC,IAAI,CAAC;AACrB,KAAA;;AAGH;;ACdA;AACO,MAAM,8BAA8B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,gBAAgB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,2BAAA,CAA6B;AAChE,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,0BAA0B,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,mCAAA,CAAqC;AACjF,YAAA,yBAAyB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,kCAAA,CAAoC;AAC/E,YAAA,6BAA6B,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,sCAAA,CAAwC;AACvF,YAAA,8BAA8B,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,uCAAA,CAAyC;AACzF,YAAA,wBAAwB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,iCAAA,CAAmC;AAC7E,YAAA,yBAAyB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,kCAAA,CAAoC;AAChF,SAAA;AACF,KAAA;;AAGH;AACO,MAAM,8BAA8B,GAAG;AAC5C,IAAA,UAAU,EAAE,kBAAkB;AAC9B,IAAA,WAAW,EAAE,mBAAmB;AAChC,IAAA,IAAI,EAAE,mBAAmB;;;AC/B3B;;AChCA;AA4BA;;AC5BA;;ACAA;;AAEG;;;;"}
@@ -0,0 +1,472 @@
1
+ import { AXPMiddlewareAbortError, AXPEntityService, AXP_ENTITY_STORAGE_MIDDLEWARE } from '@acorex-platform/framework-client/layout/entity';
2
+ import { AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_CONTEXT_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/core';
3
+ import { RootConfig, AXPApplicationsPlatformPermissionKeys, AXMTenantManagementMenuKeys } from '@acorex-platform/module-tenant-management-client/contracts';
4
+ import { AXPSearchCommandProvider, createEntitySearchCommand, AXP_STATUS_PROVIDERS, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex-platform/framework-client/common';
5
+ import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';
6
+ import * as i0 from '@angular/core';
7
+ import { Injectable, inject, NgModule } from '@angular/core';
8
+ import { AXPStatusProvider, AXPSystemStatusType, systemStatusToDefinition } from '@acorex-platform/framework-shared/core';
9
+ import { AXPCommonPermissionGroupKeys, AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';
10
+ import { AXM_TENANT_CONTEXT_DEFINITIONS } from '@acorex-platform/module-tenant-management-contracts';
11
+
12
+ //#region ---- Imports ----
13
+ //#endregion
14
+ //#region ---- Manifest Definition ----
15
+ /**
16
+ * Tenant Management Module Manifest.
17
+ * Defines module metadata, features, and provider references.
18
+ */
19
+ const TenantManagementManifest = {
20
+ name: RootConfig.module.name,
21
+ version: '1.0.0',
22
+ title: RootConfig.module.title,
23
+ icon: RootConfig.module.icon,
24
+ i18n: RootConfig.config.i18n,
25
+ type: 'platform',
26
+ domain: 'platform',
27
+ required: true,
28
+ // Module dependencies (optional)
29
+ };
30
+ //#endregion
31
+
32
+ //#region ---- Imports ----
33
+ //#endregion
34
+ //#region ---- Tenant Status Provider ----
35
+ /**
36
+ * Tenant status provider defining lifecycle states for tenants.
37
+ * Used by the status plugin to manage tenant status transitions and metadata.
38
+ */
39
+ class AXMTenantStatusProvider extends AXPStatusProvider {
40
+ constructor() {
41
+ super(...arguments);
42
+ this.key = 'tenant-management.status.tenant';
43
+ this.defaultStatus = AXPSystemStatusType.Active;
44
+ this.statuses = [
45
+ systemStatusToDefinition(AXPSystemStatusType.Active, {
46
+ title: '@tenant-management:tenants.states.active',
47
+ generateView: true,
48
+ }),
49
+ systemStatusToDefinition(AXPSystemStatusType.Inactive, {
50
+ title: '@tenant-management:tenants.states.inactive',
51
+ generateView: true,
52
+ }),
53
+ systemStatusToDefinition(AXPSystemStatusType.Suspended, {
54
+ title: '@tenant-management:tenants.states.suspended',
55
+ generateView: true,
56
+ }),
57
+ systemStatusToDefinition(AXPSystemStatusType.Pending, {
58
+ title: '@tenant-management:tenants.states.pending',
59
+ generateView: true,
60
+ }),
61
+ ];
62
+ this.transitions = [
63
+ {
64
+ from: AXPSystemStatusType.Pending,
65
+ to: AXPSystemStatusType.Active,
66
+ title: '@tenant-management:tenants.transitions.activate',
67
+ },
68
+ {
69
+ from: AXPSystemStatusType.Active,
70
+ to: AXPSystemStatusType.Inactive,
71
+ title: '@tenant-management:tenants.transitions.deactivate',
72
+ },
73
+ {
74
+ from: AXPSystemStatusType.Active,
75
+ to: AXPSystemStatusType.Suspended,
76
+ title: '@tenant-management:tenants.transitions.suspend',
77
+ },
78
+ {
79
+ from: AXPSystemStatusType.Suspended,
80
+ to: AXPSystemStatusType.Active,
81
+ title: '@tenant-management:tenants.transitions.resume',
82
+ },
83
+ {
84
+ from: AXPSystemStatusType.Inactive,
85
+ to: AXPSystemStatusType.Active,
86
+ title: '@tenant-management:tenants.transitions.activate',
87
+ },
88
+ ];
89
+ }
90
+ }
91
+ //#endregion
92
+
93
+ //#region ---- Imports ----
94
+ //#endregion
95
+ //#region ---- Tenant User Account Holder Middleware ----
96
+ /**
97
+ * Tenant User Account Holder Enforcement Middleware
98
+ *
99
+ * Enforces business rules for the isAccountHolder flag:
100
+ * 1. CREATE: Prevents manual creation with isAccountHolder=true (must use TransferOwnership command)
101
+ * 2. UPDATE:
102
+ * - Prevents deactivating account holder
103
+ * - Prevents manually toggling isAccountHolder flag
104
+ * 3. DELETE: Prevents deleting account holder
105
+ *
106
+ * Runs on: TenantUser entity operations
107
+ */
108
+ const tenantUserAccountHolderMiddleware = {
109
+ target: {
110
+ ops: ['create', 'update', 'delete'],
111
+ order: 10, // Early enforcement before other business logic
112
+ },
113
+ execute: async (ctx, next) => {
114
+ const entityFullName = `${RootConfig.module.name}.${RootConfig.entities.tenantUser.name}`;
115
+ // Only apply to TenantUser entity
116
+ if (ctx.entityName !== entityFullName) {
117
+ await next();
118
+ return;
119
+ }
120
+ const backend = ctx.entities;
121
+ //#region ---- CREATE Operation ----
122
+ if (ctx.op === 'create') {
123
+ // Rule 1: Cannot manually create account holder
124
+ // Must use TransferOwnership command instead
125
+ if (ctx.data?.isAccountHolder === true) {
126
+ throw new AXPMiddlewareAbortError('Cannot manually create tenant user as account holder. Use Transfer Ownership command.', {
127
+ status: 400,
128
+ code: 'TENANT_USER_ACCOUNT_HOLDER_MANUAL_CREATE',
129
+ details: {
130
+ entity: ctx.entityName,
131
+ field: 'isAccountHolder',
132
+ },
133
+ });
134
+ }
135
+ // Ensure isAccountHolder is explicitly set to false for new users
136
+ if (ctx.data) {
137
+ ctx.data.isAccountHolder = false;
138
+ }
139
+ }
140
+ //#endregion
141
+ //#region ---- UPDATE Operation ----
142
+ if (ctx.op === 'update') {
143
+ // Load existing record to check current state
144
+ let existing;
145
+ try {
146
+ existing = await backend.getOne(ctx.entityName, ctx.id);
147
+ }
148
+ catch (error) {
149
+ // If record doesn't exist, let it fail naturally in next()
150
+ await next();
151
+ return;
152
+ }
153
+ // Rule 2: Cannot manually toggle isAccountHolder flag
154
+ if (ctx.data?.isAccountHolder !== undefined &&
155
+ ctx.data.isAccountHolder !== existing.isAccountHolder) {
156
+ throw new AXPMiddlewareAbortError('Cannot manually change account holder status. Use Transfer Ownership command.', {
157
+ status: 400,
158
+ code: 'TENANT_USER_ACCOUNT_HOLDER_MANUAL_TOGGLE',
159
+ details: {
160
+ entity: ctx.entityName,
161
+ id: ctx.id,
162
+ currentValue: existing.isAccountHolder,
163
+ attemptedValue: ctx.data.isAccountHolder,
164
+ },
165
+ });
166
+ }
167
+ // Rule 3: Cannot deactivate account holder
168
+ if (existing.isAccountHolder === true) {
169
+ // Check if trying to deactivate (status change to inactive/disabled)
170
+ if (ctx.data?.statusId && ctx.data.statusId !== 'active') {
171
+ throw new AXPMiddlewareAbortError('Cannot deactivate account holder. Transfer ownership to another user first.', {
172
+ status: 400,
173
+ code: 'TENANT_USER_ACCOUNT_HOLDER_DEACTIVATE',
174
+ details: {
175
+ entity: ctx.entityName,
176
+ id: ctx.id,
177
+ tenantId: existing.tenantId,
178
+ userId: existing.userId,
179
+ },
180
+ });
181
+ }
182
+ // Prevent end date before current date for account holder
183
+ if (ctx.data?.endDate) {
184
+ const endDate = new Date(ctx.data.endDate);
185
+ const now = new Date();
186
+ if (endDate < now) {
187
+ throw new AXPMiddlewareAbortError('Cannot set past end date for account holder. Transfer ownership first.', {
188
+ status: 400,
189
+ code: 'TENANT_USER_ACCOUNT_HOLDER_END_DATE',
190
+ details: {
191
+ entity: ctx.entityName,
192
+ id: ctx.id,
193
+ endDate: ctx.data.endDate,
194
+ },
195
+ });
196
+ }
197
+ }
198
+ }
199
+ }
200
+ //#endregion
201
+ //#region ---- DELETE Operation ----
202
+ if (ctx.op === 'delete') {
203
+ // Load existing record to check if it's an account holder
204
+ let existing;
205
+ try {
206
+ existing = await backend.getOne(ctx.entityName, ctx.id);
207
+ }
208
+ catch (error) {
209
+ // If record doesn't exist, let it fail naturally in next()
210
+ await next();
211
+ return;
212
+ }
213
+ // Rule 4: Cannot delete account holder
214
+ if (existing?.isAccountHolder === true) {
215
+ throw new AXPMiddlewareAbortError('Cannot delete account holder. Transfer ownership to another user first.', {
216
+ status: 400,
217
+ code: 'TENANT_USER_ACCOUNT_HOLDER_DELETE',
218
+ details: {
219
+ entity: ctx.entityName,
220
+ id: ctx.id,
221
+ tenantId: existing.tenantId,
222
+ userId: existing.userId,
223
+ },
224
+ });
225
+ }
226
+ }
227
+ //#endregion
228
+ // Execute the operation if all validations passed
229
+ await next();
230
+ },
231
+ };
232
+ //#endregion
233
+
234
+ //#region ---- Middleware Exports ----
235
+ //#endregion
236
+
237
+ //#region ---- Imports ----
238
+ //#endregion
239
+ //#region ---- Feature Definition Provider ----
240
+ /**
241
+ * Tenant Management Feature Definition Provider.
242
+ * Provides feature definitions for the Tenant Management module.
243
+ */
244
+ class AXMTenantManagementFeatureDefinitionProvider {
245
+ async provide(context) {
246
+ // Management feature removed - module name is used directly as feature key
247
+ }
248
+ }
249
+ //#endregion
250
+
251
+ //#endregion
252
+ //#region ---- Permission Definition Provider ----
253
+ /**
254
+ * Registers MaintainTenants under Applications & Platform.
255
+ */
256
+ class AXMTenantManagementPermissionDefinitionProvider {
257
+ async define(context) {
258
+ const keys = AXPApplicationsPlatformPermissionKeys;
259
+ const groups = AXPCommonPermissionGroupKeys;
260
+ const P = '@common:applications-platform.permissions';
261
+ const G = '@common:permission-groups';
262
+ context.addGroup(groups.ApplicationsPlatform.Root, `${G}.applications-platform.title`, `${G}.applications-platform.description`, { order: 110 });
263
+ context
264
+ .addGroup(groups.ApplicationsPlatform.TenancyShell, `${G}.applications-platform-tenancy-shell.title`, `${G}.applications-platform-tenancy-shell.description`, { parent: groups.ApplicationsPlatform.Root, order: 20 })
265
+ .addPermission(keys.MaintainTenants, `${P}.maintain-tenants.title`, `${P}.maintain-tenants.description`, {
266
+ modules: ['TenantManagement'],
267
+ requiredFeatures: ['TenantManagement'],
268
+ })
269
+ .endPermission()
270
+ .endGroup();
271
+ }
272
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementPermissionDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
273
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementPermissionDefinitionProvider }); }
274
+ }
275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementPermissionDefinitionProvider, decorators: [{
276
+ type: Injectable
277
+ }] });
278
+
279
+ //#region ---- Imports ----
280
+ //#endregion
281
+ //#region ---- Menu Provider ----
282
+ class AXMTenantManagementModuleMenuProvider {
283
+ constructor() {
284
+ this.entityService = inject(AXPEntityService);
285
+ }
286
+ async provide(context) {
287
+ const module = RootConfig.module;
288
+ context.find(AXPCommonMenuKeys.Platform).addItems([
289
+ {
290
+ name: AXMTenantManagementMenuKeys.Tenants,
291
+ text: `@${RootConfig.config.i18n}:tenants.entities.tenant.plural`,
292
+ path: this.entityService.createPath(module.name, RootConfig.entities.tenant.name),
293
+ icon: RootConfig.entities.tenant.icon,
294
+ priority: 4,
295
+ policy: {
296
+ features: [module.name],
297
+ permissions: [AXPApplicationsPlatformPermissionKeys.MaintainTenants],
298
+ },
299
+ },
300
+ { name: `${AXMTenantManagementMenuKeys.Root}:divider`, text: '', type: 'break', priority: 5 },
301
+ ]);
302
+ }
303
+ }
304
+ //#endregion
305
+
306
+ const I18N = `@${RootConfig.config.i18n}:tenants.settings.tenant`;
307
+ class AXMTenantSettingProvider {
308
+ async provide(context) {
309
+ context
310
+ .addGroup('tenant', `${I18N}.group.nav-title`, `${I18N}.group.description`, RootConfig.module.icon, `${I18N}.group.title`, 25)
311
+ .addSection('general', `${I18N}.sections.general.title`, `${I18N}.sections.general.description`)
312
+ // TODO: Add tenant-specific settings here when needed
313
+ .endSection()
314
+ .endGroup();
315
+ }
316
+ }
317
+
318
+ //#region ---- Imports ----
319
+ //#endregion
320
+ //#region ---- Search Command Provider ----
321
+ class AXMTenantSearchCommandProvider extends AXPSearchCommandProvider {
322
+ constructor() {
323
+ super(...arguments);
324
+ this.commands = [
325
+ createEntitySearchCommand({
326
+ id: 'create-tenant',
327
+ entityKey: `${RootConfig.module.name}.${RootConfig.entities.tenant.name}`,
328
+ entityInfo: { name: RootConfig.entities.tenant.name, module: RootConfig.module.name, title: RootConfig.entities.tenant.title },
329
+ titleKey: `@${RootConfig.config.i18n}:tenants.actions.create-tenant.title`,
330
+ descriptionKey: `@${RootConfig.config.i18n}:tenants.actions.create-tenant.description`,
331
+ icon: RootConfig.entities.tenant.icon,
332
+ }),
333
+ ];
334
+ }
335
+ }
336
+ //#endregion
337
+
338
+ //#region ---- Tenant context definitions ----
339
+ class AXMTenantManagementContextDefinitionProvider {
340
+ async items() {
341
+ return AXM_TENANT_CONTEXT_DEFINITIONS;
342
+ }
343
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementContextDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
344
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementContextDefinitionProvider }); }
345
+ }
346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementContextDefinitionProvider, decorators: [{
347
+ type: Injectable
348
+ }] });
349
+
350
+ // Entity Modules
351
+ class AXMTenantManagementModule {
352
+ constructor() { }
353
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
354
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementModule }); }
355
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementModule, providers: [
356
+ // Module-specific providers (not part of manifest system)
357
+ {
358
+ provide: AXP_STATUS_PROVIDERS,
359
+ useClass: AXMTenantStatusProvider,
360
+ multi: true,
361
+ },
362
+ {
363
+ provide: AXP_ENTITY_STORAGE_MIDDLEWARE,
364
+ useValue: tenantUserAccountHolderMiddleware,
365
+ multi: true,
366
+ },
367
+ // Module Manifest Provider
368
+ {
369
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
370
+ useValue: TenantManagementManifest,
371
+ multi: true,
372
+ },
373
+ // Provider references (now using tokens)
374
+ {
375
+ provide: AXP_FEATURE_DEFINITION_PROVIDER,
376
+ useClass: AXMTenantManagementFeatureDefinitionProvider,
377
+ multi: true,
378
+ },
379
+ {
380
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
381
+ useClass: AXMTenantManagementPermissionDefinitionProvider,
382
+ multi: true,
383
+ },
384
+ {
385
+ provide: AXP_MENU_PROVIDER,
386
+ useClass: AXMTenantManagementModuleMenuProvider,
387
+ multi: true,
388
+ },
389
+ {
390
+ provide: AXP_SETTING_DEFINITION_PROVIDER,
391
+ useClass: AXMTenantSettingProvider,
392
+ multi: true,
393
+ },
394
+ {
395
+ provide: AXP_SEARCH_PROVIDER,
396
+ useClass: AXMTenantSearchCommandProvider,
397
+ multi: true,
398
+ },
399
+ {
400
+ provide: AXP_CONTEXT_DEFINITION_PROVIDER,
401
+ useClass: AXMTenantManagementContextDefinitionProvider,
402
+ multi: true,
403
+ },
404
+ ] }); }
405
+ }
406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTenantManagementModule, decorators: [{
407
+ type: NgModule,
408
+ args: [{
409
+ imports: [
410
+ // Entity Modules
411
+ ],
412
+ exports: [],
413
+ declarations: [],
414
+ providers: [
415
+ // Module-specific providers (not part of manifest system)
416
+ {
417
+ provide: AXP_STATUS_PROVIDERS,
418
+ useClass: AXMTenantStatusProvider,
419
+ multi: true,
420
+ },
421
+ {
422
+ provide: AXP_ENTITY_STORAGE_MIDDLEWARE,
423
+ useValue: tenantUserAccountHolderMiddleware,
424
+ multi: true,
425
+ },
426
+ // Module Manifest Provider
427
+ {
428
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
429
+ useValue: TenantManagementManifest,
430
+ multi: true,
431
+ },
432
+ // Provider references (now using tokens)
433
+ {
434
+ provide: AXP_FEATURE_DEFINITION_PROVIDER,
435
+ useClass: AXMTenantManagementFeatureDefinitionProvider,
436
+ multi: true,
437
+ },
438
+ {
439
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
440
+ useClass: AXMTenantManagementPermissionDefinitionProvider,
441
+ multi: true,
442
+ },
443
+ {
444
+ provide: AXP_MENU_PROVIDER,
445
+ useClass: AXMTenantManagementModuleMenuProvider,
446
+ multi: true,
447
+ },
448
+ {
449
+ provide: AXP_SETTING_DEFINITION_PROVIDER,
450
+ useClass: AXMTenantSettingProvider,
451
+ multi: true,
452
+ },
453
+ {
454
+ provide: AXP_SEARCH_PROVIDER,
455
+ useClass: AXMTenantSearchCommandProvider,
456
+ multi: true,
457
+ },
458
+ {
459
+ provide: AXP_CONTEXT_DEFINITION_PROVIDER,
460
+ useClass: AXMTenantManagementContextDefinitionProvider,
461
+ multi: true,
462
+ },
463
+ ],
464
+ }]
465
+ }], ctorParameters: () => [] });
466
+
467
+ /**
468
+ * Generated bundle index. Do not edit.
469
+ */
470
+
471
+ export { AXMTenantManagementFeatureDefinitionProvider, AXMTenantManagementModule, AXMTenantManagementModuleMenuProvider, AXMTenantSearchCommandProvider, AXMTenantSettingProvider };
472
+ //# sourceMappingURL=acorex-platform-module-tenant-management-client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-tenant-management-client.mjs","sources":["../../../../libs/modules/tenant-management/client/src/lib/manifest.ts","../../../../libs/modules/tenant-management/client/src/lib/features/tenant-status.provider.ts","../../../../libs/modules/tenant-management/client/src/lib/middlewares/tenant-user-account-holder.middleware.ts","../../../../libs/modules/tenant-management/client/src/lib/middlewares/index.ts","../../../../libs/modules/tenant-management/client/src/lib/feature-definition.provider.ts","../../../../libs/modules/tenant-management/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/tenant-management/client/src/lib/menu.provider.ts","../../../../libs/modules/tenant-management/client/src/lib/setting.provider.ts","../../../../libs/modules/tenant-management/client/src/lib/search-command.provider.ts","../../../../libs/modules/tenant-management/client/src/lib/context-definition.provider.ts","../../../../libs/modules/tenant-management/client/src/lib/tenant-management.module.ts","../../../../libs/modules/tenant-management/client/src/acorex-platform-module-tenant-management-client.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/module-tenant-management-client/contracts';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Tenant Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const TenantManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n required: true,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport { AXPStatusProvider, AXPStatusTransition, AXPSystemStatusType, systemStatusToDefinition } from '@acorex-platform/framework-shared/core';\n\n//#endregion\n\n//#region ---- Tenant Status Provider ----\n\n/**\n * Tenant status provider defining lifecycle states for tenants.\n * Used by the status plugin to manage tenant status transitions and metadata.\n */\nexport class AXMTenantStatusProvider extends AXPStatusProvider {\n readonly key = 'tenant-management.status.tenant';\n\n readonly defaultStatus = AXPSystemStatusType.Active;\n\n readonly statuses = [\n systemStatusToDefinition(AXPSystemStatusType.Active, {\n title: '@tenant-management:tenants.states.active',\n generateView: true,\n }),\n systemStatusToDefinition(AXPSystemStatusType.Inactive, {\n title: '@tenant-management:tenants.states.inactive',\n generateView: true,\n }),\n systemStatusToDefinition(AXPSystemStatusType.Suspended, {\n title: '@tenant-management:tenants.states.suspended',\n generateView: true,\n }),\n systemStatusToDefinition(AXPSystemStatusType.Pending, {\n title: '@tenant-management:tenants.states.pending',\n generateView: true,\n }),\n ];\n\n readonly transitions: AXPStatusTransition[] = [\n {\n from: AXPSystemStatusType.Pending,\n to: AXPSystemStatusType.Active,\n title: '@tenant-management:tenants.transitions.activate',\n },\n {\n from: AXPSystemStatusType.Active,\n to: AXPSystemStatusType.Inactive,\n title: '@tenant-management:tenants.transitions.deactivate',\n },\n {\n from: AXPSystemStatusType.Active,\n to: AXPSystemStatusType.Suspended,\n title: '@tenant-management:tenants.transitions.suspend',\n },\n {\n from: AXPSystemStatusType.Suspended,\n to: AXPSystemStatusType.Active,\n title: '@tenant-management:tenants.transitions.resume',\n },\n {\n from: AXPSystemStatusType.Inactive,\n to: AXPSystemStatusType.Active,\n title: '@tenant-management:tenants.transitions.activate',\n },\n ];\n}\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport { inject } from '@angular/core';\nimport {\n AXPEntityStorageMiddleware,\n AXPMiddlewareAbortError,\n} from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-tenant-management-client/contracts';\n\n//#endregion\n\n//#region ---- Tenant User Account Holder Middleware ----\n\n/**\n * Tenant User Account Holder Enforcement Middleware\n *\n * Enforces business rules for the isAccountHolder flag:\n * 1. CREATE: Prevents manual creation with isAccountHolder=true (must use TransferOwnership command)\n * 2. UPDATE:\n * - Prevents deactivating account holder\n * - Prevents manually toggling isAccountHolder flag\n * 3. DELETE: Prevents deleting account holder\n *\n * Runs on: TenantUser entity operations\n */\nexport const tenantUserAccountHolderMiddleware: AXPEntityStorageMiddleware = {\n target: {\n ops: ['create', 'update', 'delete'],\n order: 10, // Early enforcement before other business logic\n },\n\n execute: async (ctx, next) => {\n const entityFullName = `${RootConfig.module.name}.${RootConfig.entities.tenantUser.name}`;\n\n // Only apply to TenantUser entity\n if (ctx.entityName !== entityFullName) {\n await next();\n return;\n }\n\n const backend = ctx.entities;\n\n //#region ---- CREATE Operation ----\n\n if (ctx.op === 'create') {\n // Rule 1: Cannot manually create account holder\n // Must use TransferOwnership command instead\n if (ctx.data?.isAccountHolder === true) {\n throw new AXPMiddlewareAbortError(\n 'Cannot manually create tenant user as account holder. Use Transfer Ownership command.',\n {\n status: 400,\n code: 'TENANT_USER_ACCOUNT_HOLDER_MANUAL_CREATE',\n details: {\n entity: ctx.entityName,\n field: 'isAccountHolder',\n },\n }\n );\n }\n\n // Ensure isAccountHolder is explicitly set to false for new users\n if (ctx.data) {\n ctx.data.isAccountHolder = false;\n }\n }\n\n //#endregion\n\n //#region ---- UPDATE Operation ----\n\n if (ctx.op === 'update') {\n // Load existing record to check current state\n let existing: any;\n try {\n existing = await backend.getOne(ctx.entityName, ctx.id);\n } catch (error) {\n // If record doesn't exist, let it fail naturally in next()\n await next();\n return;\n }\n\n // Rule 2: Cannot manually toggle isAccountHolder flag\n if (\n ctx.data?.isAccountHolder !== undefined &&\n ctx.data.isAccountHolder !== existing.isAccountHolder\n ) {\n throw new AXPMiddlewareAbortError(\n 'Cannot manually change account holder status. Use Transfer Ownership command.',\n {\n status: 400,\n code: 'TENANT_USER_ACCOUNT_HOLDER_MANUAL_TOGGLE',\n details: {\n entity: ctx.entityName,\n id: ctx.id,\n currentValue: existing.isAccountHolder,\n attemptedValue: ctx.data.isAccountHolder,\n },\n }\n );\n }\n\n // Rule 3: Cannot deactivate account holder\n if (existing.isAccountHolder === true) {\n // Check if trying to deactivate (status change to inactive/disabled)\n if (ctx.data?.statusId && ctx.data.statusId !== 'active') {\n throw new AXPMiddlewareAbortError(\n 'Cannot deactivate account holder. Transfer ownership to another user first.',\n {\n status: 400,\n code: 'TENANT_USER_ACCOUNT_HOLDER_DEACTIVATE',\n details: {\n entity: ctx.entityName,\n id: ctx.id,\n tenantId: existing.tenantId,\n userId: existing.userId,\n },\n }\n );\n }\n\n // Prevent end date before current date for account holder\n if (ctx.data?.endDate) {\n const endDate = new Date(ctx.data.endDate);\n const now = new Date();\n if (endDate < now) {\n throw new AXPMiddlewareAbortError(\n 'Cannot set past end date for account holder. Transfer ownership first.',\n {\n status: 400,\n code: 'TENANT_USER_ACCOUNT_HOLDER_END_DATE',\n details: {\n entity: ctx.entityName,\n id: ctx.id,\n endDate: ctx.data.endDate,\n },\n }\n );\n }\n }\n }\n }\n\n //#endregion\n\n //#region ---- DELETE Operation ----\n\n if (ctx.op === 'delete') {\n // Load existing record to check if it's an account holder\n let existing: any;\n try {\n existing = await backend.getOne(ctx.entityName, ctx.id);\n } catch (error) {\n // If record doesn't exist, let it fail naturally in next()\n await next();\n return;\n }\n\n // Rule 4: Cannot delete account holder\n if (existing?.isAccountHolder === true) {\n throw new AXPMiddlewareAbortError(\n 'Cannot delete account holder. Transfer ownership to another user first.',\n {\n status: 400,\n code: 'TENANT_USER_ACCOUNT_HOLDER_DELETE',\n details: {\n entity: ctx.entityName,\n id: ctx.id,\n tenantId: existing.tenantId,\n userId: existing.userId,\n },\n }\n );\n }\n }\n\n //#endregion\n\n // Execute the operation if all validations passed\n await next();\n },\n};\n\n//#endregion\n\n","//#region ---- Middleware Exports ----\n\nexport { tenantUserAccountHolderMiddleware } from './tenant-user-account-holder.middleware';\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport {\n AXPFeatureDefinitionProvider,\n AXPFeatureDefinitionProviderContext,\n} from '@acorex-platform/framework-client/core';\n\n//#endregion\n\n//#region ---- Feature Definition Provider ----\n\n/**\n * Tenant Management Feature Definition Provider.\n * Provides feature definitions for the Tenant Management module.\n */\nexport class AXMTenantManagementFeatureDefinitionProvider implements AXPFeatureDefinitionProvider {\n async provide(context: AXPFeatureDefinitionProviderContext): Promise<void> {\n // Management feature removed - module name is used directly as feature key\n }\n}\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport {\n AXPApplicationsPlatformPermissionKeys\n} from '@acorex-platform/module-tenant-management-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\n/**\n * Registers MaintainTenants under Applications & Platform.\n */\n@Injectable()\nexport class AXMTenantManagementPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPApplicationsPlatformPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:applications-platform.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(groups.ApplicationsPlatform.Root, `${G}.applications-platform.title`, `${G}.applications-platform.description`, { order: 110 });\n\n context\n .addGroup(\n groups.ApplicationsPlatform.TenancyShell,\n `${G}.applications-platform-tenancy-shell.title`,\n `${G}.applications-platform-tenancy-shell.description`,\n { parent: groups.ApplicationsPlatform.Root, order: 20 },\n )\n .addPermission(keys.MaintainTenants, `${P}.maintain-tenants.title`, `${P}.maintain-tenants.description`, {\n modules: ['TenantManagement'],\n requiredFeatures: ['TenantManagement'],\n })\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject } from '@angular/core';\nimport { RootConfig } from '@acorex-platform/module-tenant-management-client/contracts';\nimport { AXMTenantManagementMenuKeys } from '@acorex-platform/module-tenant-management-client/contracts';\nimport { AXPApplicationsPlatformPermissionKeys } from '@acorex-platform/module-tenant-management-client/contracts';\n\n//#endregion\n\n//#region ---- Menu Provider ----\n\nexport class AXMTenantManagementModuleMenuProvider implements AXPMenuProvider {\n private readonly entityService = inject(AXPEntityService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n\n context.find(AXPCommonMenuKeys.Platform).addItems([\n {\n name: AXMTenantManagementMenuKeys.Tenants,\n text: `@${RootConfig.config.i18n}:tenants.entities.tenant.plural`,\n path: this.entityService.createPath(module.name, RootConfig.entities.tenant.name),\n icon: RootConfig.entities.tenant.icon,\n priority: 4,\n policy: {\n features: [module.name],\n permissions: [AXPApplicationsPlatformPermissionKeys.MaintainTenants],\n },\n },\n { name: `${AXMTenantManagementMenuKeys.Root}:divider`, text: '', type: 'break', priority: 5 },\n ]);\n }\n}\n\n//#endregion\n","import { AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex-platform/framework-client/common';\nimport { RootConfig } from '@acorex-platform/module-tenant-management-client/contracts';\n\nconst I18N = `@${RootConfig.config.i18n}:tenants.settings.tenant`;\n\nexport class AXMTenantSettingProvider implements AXPSettingDefinitionProvider {\n async provide(context: AXPSettingDefinitionProviderContext): Promise<void> {\n context\n .addGroup(\n 'tenant',\n `${I18N}.group.nav-title`,\n `${I18N}.group.description`,\n RootConfig.module.icon,\n `${I18N}.group.title`,\n 25,\n )\n .addSection('general', `${I18N}.sections.general.title`, `${I18N}.sections.general.description`)\n // TODO: Add tenant-specific settings here when needed\n .endSection()\n .endGroup();\n }\n}\n","//#region ---- Imports ----\n\nimport { AXPSearchCommandProvider, createEntitySearchCommand } from '@acorex-platform/framework-client/common';\nimport { RootConfig } from '@acorex-platform/module-tenant-management-client/contracts';\n\n//#endregion\n\n//#region ---- Search Command Provider ----\n\nexport class AXMTenantSearchCommandProvider extends AXPSearchCommandProvider {\n commands = [\n createEntitySearchCommand({\n id: 'create-tenant',\n entityKey: `${RootConfig.module.name}.${RootConfig.entities.tenant.name}`,\n entityInfo: { name: RootConfig.entities.tenant.name, module: RootConfig.module.name, title: RootConfig.entities.tenant.title },\n titleKey: `@${RootConfig.config.i18n}:tenants.actions.create-tenant.title`,\n descriptionKey: `@${RootConfig.config.i18n}:tenants.actions.create-tenant.description`,\n icon: RootConfig.entities.tenant.icon,\n }),\n ];\n}\n\n//#endregion\n\n","import { Injectable } from '@angular/core';\nimport type { AXPContextDefinition, AXPContextDefinitionProvider } from '@acorex-platform/framework-client/core';\nimport { AXM_TENANT_CONTEXT_DEFINITIONS } from '@acorex-platform/module-tenant-management-contracts';\n\n//#region ---- Tenant context definitions ----\n\n@Injectable()\nexport class AXMTenantManagementContextDefinitionProvider implements AXPContextDefinitionProvider {\n async items(): Promise<AXPContextDefinition[]> {\n return AXM_TENANT_CONTEXT_DEFINITIONS;\n }\n}\n\n//#endregion\n","import { AXP_ENTITY_STORAGE_MIDDLEWARE } from '@acorex-platform/framework-client/layout/entity';\nimport { AXP_CONTEXT_DEFINITION_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_MODULE_MANIFEST_PROVIDER } from '@acorex-platform/framework-client/core';\nimport { TenantManagementManifest } from './manifest';\nimport { AXP_STATUS_PROVIDERS, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\nimport { NgModule } from '@angular/core';\nimport { AXMTenantStatusProvider } from './features/tenant-status.provider';\nimport { tenantUserAccountHolderMiddleware } from './middlewares';\nimport { AXMTenantManagementFeatureDefinitionProvider } from './feature-definition.provider';\nimport { AXMTenantManagementPermissionDefinitionProvider } from './permission-definition.provider';\nimport { AXMTenantManagementModuleMenuProvider } from './menu.provider';\n\nimport { AXMTenantSettingProvider } from './setting.provider';\nimport { AXMTenantSearchCommandProvider } from './search-command.provider';\nimport { AXMTenantManagementContextDefinitionProvider } from './context-definition.provider';\n// Entity Modules\n\n@NgModule({\n imports: [\n // Entity Modules\n ],\n exports: [],\n declarations: [],\n providers: [\n // Module-specific providers (not part of manifest system)\n {\n provide: AXP_STATUS_PROVIDERS,\n useClass: AXMTenantStatusProvider,\n multi: true,\n },\n {\n provide: AXP_ENTITY_STORAGE_MIDDLEWARE,\n useValue: tenantUserAccountHolderMiddleware,\n multi: true,\n },\n // Module Manifest Provider\n {\n provide: AXP_MODULE_MANIFEST_PROVIDER,\n useValue: TenantManagementManifest,\n multi: true,\n },\n // Provider references (now using tokens)\n {\n provide: AXP_FEATURE_DEFINITION_PROVIDER,\n useClass: AXMTenantManagementFeatureDefinitionProvider,\n multi: true,\n },\n {\n provide: AXP_PERMISSION_DEFINITION_PROVIDER,\n useClass: AXMTenantManagementPermissionDefinitionProvider,\n multi: true,\n },\n {\n provide: AXP_MENU_PROVIDER,\n useClass: AXMTenantManagementModuleMenuProvider,\n multi: true,\n },\n \n {\n provide: AXP_SETTING_DEFINITION_PROVIDER,\n useClass: AXMTenantSettingProvider,\n multi: true,\n },\n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXMTenantSearchCommandProvider,\n multi: true,\n },\n {\n provide: AXP_CONTEXT_DEFINITION_PROVIDER,\n useClass: AXMTenantManagementContextDefinitionProvider,\n multi: true,\n },\n ],\n})\nexport class AXMTenantManagementModule {\n constructor() { }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AAKA;AAEA;AAEA;;;AAGG;AACI,MAAM,wBAAwB,GAAsB;AACzD,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,UAAU;AAClB,IAAA,QAAQ,EAAE,IAAI;;CAGf;AAED;;AC1BA;AAIA;AAEA;AAEA;;;AAGG;AACG,MAAO,uBAAwB,SAAQ,iBAAiB,CAAA;AAA9D,IAAA,WAAA,GAAA;;QACa,IAAA,CAAA,GAAG,GAAG,iCAAiC;AAEvC,QAAA,IAAA,CAAA,aAAa,GAAG,mBAAmB,CAAC,MAAM;AAE1C,QAAA,IAAA,CAAA,QAAQ,GAAG;AAChB,YAAA,wBAAwB,CAAC,mBAAmB,CAAC,MAAM,EAAE;AACjD,gBAAA,KAAK,EAAE,0CAA0C;AACjD,gBAAA,YAAY,EAAE,IAAI;aACrB,CAAC;AACF,YAAA,wBAAwB,CAAC,mBAAmB,CAAC,QAAQ,EAAE;AACnD,gBAAA,KAAK,EAAE,4CAA4C;AACnD,gBAAA,YAAY,EAAE,IAAI;aACrB,CAAC;AACF,YAAA,wBAAwB,CAAC,mBAAmB,CAAC,SAAS,EAAE;AACpD,gBAAA,KAAK,EAAE,6CAA6C;AACpD,gB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AAA,QAAQ,EAAE,4CAA4C;AACtD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC1ED;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@acorex-platform/module-tenant-management-client",
3
+ "version": "0.0.21",
4
+ "sideEffects": false,
5
+ "peerDependencies": {
6
+ "@angular/common": "^21.0.0",
7
+ "@angular/core": "^21.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2022/acorex-platform-module-tenant-management-client.mjs",
13
+ "typings": "types/acorex-platform-module-tenant-management-client.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/acorex-platform-module-tenant-management-client.d.ts",
20
+ "default": "./fesm2022/acorex-platform-module-tenant-management-client.mjs"
21
+ },
22
+ "./contracts": {
23
+ "types": "./types/acorex-platform-module-tenant-management-client-contracts.d.ts",
24
+ "default": "./fesm2022/acorex-platform-module-tenant-management-client-contracts.mjs"
25
+ }
26
+ },
27
+ "type": "module"
28
+ }
@@ -0,0 +1,226 @@
1
+ import { AXPContextDefinition, AXPMultiLanguageString, AXPSystemStatusType } from '@acorex-platform/framework-shared/core';
2
+ import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';
3
+
4
+ declare const AXM_TENANT_CONTEXT_DEFINITIONS: AXPContextDefinition[];
5
+
6
+ declare const AXMTenantManagementFeatureKeys: {};
7
+
8
+ declare const AXMTenantManagementMenuKeys: {
9
+ readonly Root: "TenantManagement:Menu";
10
+ readonly Tenants: "TenantManagement:Menu:Tenants";
11
+ };
12
+
13
+ /**
14
+ * Applications & Platform capabilities used by this module.
15
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
16
+ */
17
+ declare const AXPApplicationsPlatformPermissionKeys: {
18
+ readonly Access: "ApplicationsPlatform:Permission:Access";
19
+ readonly MaintainApplications: "ApplicationsPlatform:Permission:MaintainApplications";
20
+ readonly MaintainTenants: "ApplicationsPlatform:Permission:MaintainTenants";
21
+ readonly MaintainPlatformShell: "ApplicationsPlatform:Permission:MaintainPlatformShell";
22
+ readonly MaintainLandingPages: "ApplicationsPlatform:Permission:MaintainLandingPages";
23
+ readonly MaintainIdentifiers: "ApplicationsPlatform:Permission:MaintainIdentifiers";
24
+ readonly MaintainTenantSettings: "ApplicationsPlatform:Permission:MaintainTenantSettings";
25
+ readonly MaintainPlatformSettings: "ApplicationsPlatform:Permission:MaintainPlatformSettings";
26
+ readonly MaintainLocales: "ApplicationsPlatform:Permission:MaintainLocales";
27
+ readonly UseDevTools: "ApplicationsPlatform:Permission:UseDevTools";
28
+ };
29
+ /**
30
+ * @deprecated Prefer {@link AXPApplicationsPlatformPermissionKeys}.
31
+ * Legacy nested shape kept so existing imports compile during migration.
32
+ */
33
+ declare const AXMTenantManagementPermissionsKeys: {
34
+ readonly TenantManagement: {
35
+ readonly Management: "ApplicationsPlatform:Permission:MaintainTenants";
36
+ };
37
+ };
38
+
39
+ declare const RootConfig: {
40
+ config: {
41
+ i18n: string;
42
+ module: string;
43
+ };
44
+ module: {
45
+ route: string;
46
+ name: string;
47
+ title: string;
48
+ icon: string;
49
+ };
50
+ entities: {
51
+ tenant: {
52
+ name: string;
53
+ source: string;
54
+ title: string;
55
+ titlePlural: string;
56
+ icon: string;
57
+ };
58
+ tenantUser: {
59
+ name: string;
60
+ source: string;
61
+ title: string;
62
+ titlePlural: string;
63
+ icon: string;
64
+ };
65
+ tenantUserAppAccess: {
66
+ name: string;
67
+ source: string;
68
+ title: string;
69
+ titlePlural: string;
70
+ icon: string;
71
+ };
72
+ resourceShare: {
73
+ name: string;
74
+ source: string;
75
+ title: string;
76
+ titlePlural: string;
77
+ icon: string;
78
+ };
79
+ };
80
+ queries: {
81
+ dashboard: {
82
+ activeUsersKpi: string;
83
+ usersByRoleDonut: string;
84
+ };
85
+ reports: {
86
+ getTenantApplicationAccess: string;
87
+ getTenantUserDistribution: string;
88
+ getTenantRegistrationTimeline: string;
89
+ getTenantRegistrationChartData: string;
90
+ getSubscriptionsTimeline: string;
91
+ getSubscriptionsChartData: string;
92
+ };
93
+ };
94
+ };
95
+ declare const AXMTenantManagementModuleConst: {
96
+ readonly moduleName: "TenantManagement";
97
+ readonly moduleRoute: "tenant-management";
98
+ readonly i18n: "tenant-management";
99
+ };
100
+
101
+ interface AXMTenantManagementTenantEntityModel extends AXPEntityModel<string> {
102
+ name: string;
103
+ title: AXPMultiLanguageString;
104
+ description?: AXPMultiLanguageString;
105
+ statusId?: AXPSystemStatusType;
106
+ logo?: string;
107
+ color?: string;
108
+ email?: string;
109
+ phone?: string;
110
+ website?: string;
111
+ supportEmail?: string;
112
+ infoEmail?: string;
113
+ street1?: string;
114
+ street2?: string;
115
+ postalCode?: string;
116
+ countryId?: string;
117
+ country?: {
118
+ id: string;
119
+ title: AXPMultiLanguageString;
120
+ };
121
+ stateId?: string;
122
+ state?: {
123
+ id: string;
124
+ title: AXPMultiLanguageString;
125
+ };
126
+ cityId?: string;
127
+ city?: {
128
+ id: string;
129
+ title: AXPMultiLanguageString;
130
+ };
131
+ timezone?: string;
132
+ language?: string;
133
+ languageData?: {
134
+ code: string;
135
+ title: string;
136
+ };
137
+ domain?: string;
138
+ subdomain?: string;
139
+ userId?: string;
140
+ user?: any;
141
+ registrationDate?: Date;
142
+ expiryDate?: Date;
143
+ maxUsers?: number;
144
+ maxStorage?: number;
145
+ /**
146
+ * When true, this tenant is the platform operator (Platform Console).
147
+ * Isolation middleware treats sessions on this tenant as platform-scoped
148
+ * (omniscient reads, platform-managed mutations).
149
+ */
150
+ isPlatform?: boolean;
151
+ /** FK → BusinessCore.Industry (drives industry starter packs during Tenant.Setup). */
152
+ industryId?: string;
153
+ industry?: {
154
+ id: string;
155
+ title?: unknown;
156
+ code?: string;
157
+ };
158
+ }
159
+
160
+ interface AXMTenantManagementTenantUserEntityModel extends AXPEntityModel<string> {
161
+ tenantId: string;
162
+ tenant?: {
163
+ id: string;
164
+ title: AXPMultiLanguageString;
165
+ };
166
+ userId: string;
167
+ user?: {
168
+ id: string;
169
+ username: string;
170
+ displayName: string;
171
+ };
172
+ /** Primary account owner for the tenant (at most one). */
173
+ isAccountHolder?: boolean;
174
+ statusId?: AXPSystemStatusType;
175
+ startDate: Date;
176
+ endDate?: Date;
177
+ createdAt?: Date;
178
+ updatedAt?: Date;
179
+ }
180
+
181
+ /**
182
+ * Application access grant for a tenant membership (period-based).
183
+ * User → TenantUser → TenantUserAppAccess.
184
+ */
185
+ interface AXMTenantManagementTenantUserAppAccessEntityModel extends AXPEntityModel<string> {
186
+ tenantUserId: string;
187
+ tenantUser?: {
188
+ id: string;
189
+ userId?: string;
190
+ tenantId?: string;
191
+ };
192
+ /** Denormalized for membership filters (same as TenantUser.tenantId). */
193
+ tenantId: string;
194
+ applicationId: string;
195
+ application?: {
196
+ id: string;
197
+ title?: string;
198
+ };
199
+ statusId?: AXPSystemStatusType;
200
+ startDate: Date;
201
+ endDate?: Date;
202
+ }
203
+
204
+ type AXMResourceSharePermission = 'read' | 'contribute' | 'admin';
205
+ type AXMResourceShareStatus = 'active' | 'revoked';
206
+ interface AXMResourceShareResourceInfo {
207
+ /** Entity type, e.g. `ProjectManagement.Project`. */
208
+ type: string;
209
+ id: string;
210
+ }
211
+ interface AXMResourceShareShareInfo {
212
+ ownerTenantId: string;
213
+ sharedWithTenantId: string;
214
+ applicationId?: string;
215
+ permission: AXMResourceSharePermission;
216
+ status: AXMResourceShareStatus;
217
+ validFrom?: Date | string;
218
+ validTo?: Date | string;
219
+ }
220
+ interface AXMTenantManagementResourceShareEntityModel extends AXPEntityModel<string> {
221
+ resourceInfo: AXMResourceShareResourceInfo;
222
+ shareInfo: AXMResourceShareShareInfo;
223
+ }
224
+
225
+ export { AXMTenantManagementFeatureKeys, AXMTenantManagementMenuKeys, AXMTenantManagementModuleConst, AXMTenantManagementPermissionsKeys, AXM_TENANT_CONTEXT_DEFINITIONS, AXPApplicationsPlatformPermissionKeys, RootConfig };
226
+ export type { AXMResourceSharePermission, AXMResourceShareResourceInfo, AXMResourceShareShareInfo, AXMResourceShareStatus, AXMTenantManagementResourceShareEntityModel, AXMTenantManagementTenantEntityModel, AXMTenantManagementTenantUserAppAccessEntityModel, AXMTenantManagementTenantUserEntityModel };
@@ -0,0 +1,34 @@
1
+ import * as i0 from '@angular/core';
2
+ import { AXPFeatureDefinitionProvider, AXPFeatureDefinitionProviderContext } from '@acorex-platform/framework-client/core';
3
+ import * as _acorex_platform_framework_client_common from '@acorex-platform/framework-client/common';
4
+ import { AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex-platform/framework-client/common';
5
+
6
+ declare class AXMTenantManagementModule {
7
+ constructor();
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMTenantManagementModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXMTenantManagementModule, never, never, never>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXMTenantManagementModule>;
11
+ }
12
+
13
+ /**
14
+ * Tenant Management Feature Definition Provider.
15
+ * Provides feature definitions for the Tenant Management module.
16
+ */
17
+ declare class AXMTenantManagementFeatureDefinitionProvider implements AXPFeatureDefinitionProvider {
18
+ provide(context: AXPFeatureDefinitionProviderContext): Promise<void>;
19
+ }
20
+
21
+ declare class AXMTenantManagementModuleMenuProvider implements AXPMenuProvider {
22
+ private readonly entityService;
23
+ provide(context: AXPMenuProviderContext): Promise<void>;
24
+ }
25
+
26
+ declare class AXMTenantSearchCommandProvider extends AXPSearchCommandProvider {
27
+ commands: _acorex_platform_framework_client_common.AXPSearchResult[];
28
+ }
29
+
30
+ declare class AXMTenantSettingProvider implements AXPSettingDefinitionProvider {
31
+ provide(context: AXPSettingDefinitionProviderContext): Promise<void>;
32
+ }
33
+
34
+ export { AXMTenantManagementFeatureDefinitionProvider, AXMTenantManagementModule, AXMTenantManagementModuleMenuProvider, AXMTenantSearchCommandProvider, AXMTenantSettingProvider };