@acorex-platform/module-security-management-client 0.0.32 → 0.0.37

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 (60) hide show
  1. package/fesm2022/{acorex-platform-module-security-management-client-acorex-platform-module-security-management-client-Wtvhs7VH.mjs → acorex-platform-module-security-management-client-acorex-platform-module-security-management-client-Ddzg9VYV.mjs} +5 -5
  2. package/fesm2022/acorex-platform-module-security-management-client-acorex-platform-module-security-management-client-Ddzg9VYV.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-device-sessions.mjs +579 -0
  4. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-device-sessions.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-identity-provider.mjs +326 -0
  6. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-identity-provider.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-policy.mjs +284 -0
  8. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-policy.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-profile.mjs +243 -0
  10. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-profile.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-role-permission.mjs +220 -0
  12. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-role-permission.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-roles.mjs +271 -0
  14. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-roles.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-user-role.mjs +221 -0
  16. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-user-role.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-users.mjs +562 -0
  18. package/fesm2022/acorex-platform-module-security-management-client-contracts-entities-users.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-acorex-platform-module-security-management-client-contracts-entity-catalog-CeqvAe30.mjs +102 -0
  20. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-acorex-platform-module-security-management-client-contracts-entity-catalog-CeqvAe30.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-device-sessions.entity-D5wMKRJ3.mjs +503 -0
  22. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-device-sessions.entity-D5wMKRJ3.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-identity-provider.entity-6LBD6MuU.mjs +250 -0
  24. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-identity-provider.entity-6LBD6MuU.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-policy.entity-CVsH_anF.mjs +208 -0
  26. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-policy.entity-CVsH_anF.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-profile.entity-B3m3wpcT.mjs +167 -0
  28. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-profile.entity-B3m3wpcT.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-role-permission.entity-DK99ir3U.mjs +144 -0
  30. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-role-permission.entity-DK99ir3U.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-roles.entity-B5PknTEu.mjs +195 -0
  32. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-roles.entity-B5PknTEu.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-user-role.entity-IHUWsgjf.mjs +145 -0
  34. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-user-role.entity-IHUWsgjf.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-users.entity-DmVp5gj1.mjs +486 -0
  36. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog-users.entity-DmVp5gj1.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog.mjs +2 -0
  38. package/fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-module-security-management-client-contracts.mjs.map +1 -1
  40. package/fesm2022/{acorex-platform-module-security-management-client-index-Dw9MKtB1.mjs → acorex-platform-module-security-management-client-index-C1rCxs2K.mjs} +3 -3
  41. package/fesm2022/{acorex-platform-module-security-management-client-index-Dw9MKtB1.mjs.map → acorex-platform-module-security-management-client-index-C1rCxs2K.mjs.map} +1 -1
  42. package/fesm2022/acorex-platform-module-security-management-client-local-entities.mjs +36 -0
  43. package/fesm2022/acorex-platform-module-security-management-client-local-entities.mjs.map +1 -0
  44. package/fesm2022/acorex-platform-module-security-management-client-send-password-reset-email.command-CoQgWdya.mjs.map +1 -1
  45. package/fesm2022/acorex-platform-module-security-management-client-terminate-session.command-dsU7scOK.mjs.map +1 -1
  46. package/fesm2022/acorex-platform-module-security-management-client.mjs +1 -1
  47. package/package.json +41 -1
  48. package/types/acorex-platform-module-security-management-client-contracts-entities-device-sessions.d.ts +5 -0
  49. package/types/acorex-platform-module-security-management-client-contracts-entities-identity-provider.d.ts +5 -0
  50. package/types/acorex-platform-module-security-management-client-contracts-entities-policy.d.ts +5 -0
  51. package/types/acorex-platform-module-security-management-client-contracts-entities-profile.d.ts +5 -0
  52. package/types/acorex-platform-module-security-management-client-contracts-entities-role-permission.d.ts +5 -0
  53. package/types/acorex-platform-module-security-management-client-contracts-entities-roles.d.ts +5 -0
  54. package/types/acorex-platform-module-security-management-client-contracts-entities-user-role.d.ts +5 -0
  55. package/types/acorex-platform-module-security-management-client-contracts-entities-users.d.ts +5 -0
  56. package/types/acorex-platform-module-security-management-client-contracts-entity-catalog.d.ts +10 -0
  57. package/types/acorex-platform-module-security-management-client-contracts.d.ts +5 -0
  58. package/types/acorex-platform-module-security-management-client-local-entities.d.ts +12 -0
  59. package/types/acorex-platform-module-security-management-client.d.ts +1 -1
  60. package/fesm2022/acorex-platform-module-security-management-client-acorex-platform-module-security-management-client-Wtvhs7VH.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-security-management-client-terminate-session.command-dsU7scOK.mjs","sources":["../../../../libs/modules/security-management/client/src/lib/commands/terminate-session.command.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXPCommonSettings,\n AXPSettingsService,\n} from '@acorex-platform/framework-client/common';\nimport { AXPEntityDefinitionRegistryService, AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport {\n AXPCommand,\n resolveEntityActionCommandInput,\n type AXPCommandExecuteResultPromise,\n type AXPEntityActionCommandInput,\n} from '@acorex-platform/framework-shared/runtime';\nimport { RootConfig } from '@acorex-platform/module-security-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXPTerminateSessionCommandInput = AXPEntityActionCommandInput;\n\n//#endregion\n\n//#region ---- Terminate session command ----\n\n/**\n * Terminates one or more device sessions (entity list / detail actions).\n * Replaces the former `terminate-entity` workflow (loading + terminate loop + success toast).\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPTerminateSessionCommand implements AXPCommand<AXPTerminateSessionCommandInput> {\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly entityService = inject(AXPEntityService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n private readonly deviceSessionsDataAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.deviceSessions.name)\n .data<string, { id: string }>();\n\n async execute(input: AXPTerminateSessionCommandInput = {}): AXPCommandExecuteResultPromise {\n const context = resolveEntityActionCommandInput(input);\n if (!context.entity || context.data == null) {\n return { success: false };\n }\n\n const moduleEntity = context.entity;\n const [moduleName, entityName] = moduleEntity.split('.');\n const data = context.data as Record<string, unknown> | Record<string, unknown>[];\n const meta = { ...((context.meta as Record<string, unknown> | undefined) ?? {}) };\n\n const ids = Array.isArray(data) ? data.map((item) => String(item['id'])) : [String(data['id'])];\n const entity = await this.entityRegistry.resolve(moduleName, entityName);\n\n if (entity.parentKey && !Array.isArray(data) && data[entity.parentKey]) {\n meta['refreshTargetId'] = data[entity.parentKey];\n }\n\n const dialog = this.loadingDialog.show({\n title: await this.translationService.translateAsync('workflow.terminating'),\n mode: 'determinate',\n status: 'Terminating...',\n progressValue: 0,\n text: `0/${ids.length}`,\n buttons: [\n {\n text: await this.translationService.translateAsync('cancel'),\n color: 'danger',\n onClick: () => {\n dialog.close();\n },\n },\n ],\n });\n\n let failedCounter = 0;\n for (const id of ids) {\n try {\n await this.deviceSessionsDataAccessor.update(id, {\n status: 'revoked',\n loggedOutAt: new Date(),\n isActiveSession: false,\n });\n } catch {\n failedCounter++;\n await this.dialogService.alert(\n await this.translationService.translateAsync('workflow.fail-delete-title'),\n await this.translationService.translateAsync('workflow.fail-delete-body', {\n params: { item: 1 },\n }),\n 'danger',\n );\n }\n }\n\n const success = failedCounter === 0;\n setTimeout(() => {\n dialog.close();\n this.entityEvents.publishLayoutRefresh(moduleEntity, meta as Record<string, unknown> | undefined);\n }, 300);\n\n if (success) {\n await this.showSuccessToast();\n }\n\n return success\n ? { success: true, kind: 'object' as const, data: undefined }\n : { success: false };\n }\n\n private async showSuccessToast(): Promise<void> {\n const showResult = await this.settingsService.get(AXPCommonSettings.EnableOperationToasts);\n if (!showResult) {\n return;\n }\n\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync('workflow.session-terminated'),\n content: await this.translationService.translateAsync('workflow.session-terminated-body'),\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;;AAuBA;AAEA;AAEA;;;AAGG;MAEU,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC3D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,yBAAyB,CAAC;QAChD,IAAA,CAAA,0BAA0B,GAAG,IAAI,CAAC;AAChD,aAAA,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI;AAC1E,aAAA,IAAI,EAA0B;AAuFlC,IAAA;AArFC,IAAA,MAAM,OAAO,CAAC,KAAA,GAAyC,EAAE,EAAA;AACvD,QAAA,MAAM,OAAO,GAAG,+BAA+B,CAAC,KAAK,CAAC;QACtD,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,IAAI,IAAI,EAAE;AAC3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MAAM,gBAAgB,GAAA;AAC5B,QAAA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,qBAAqB,CAAC;QAC1F,IAAI,CAAC,UAAU,EAAE;YACf;QACF;AAEA,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACrB,YAAA,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,6BAA6B,CAAC;YAClF,OAAO,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,kCAAkC,CAAC;AACzF,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,eAAe,EAAE,IAAI;AACtB,SAAA,CAAC;IACJ;8GAjGW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-security-management-client-terminate-session.command-dsU7scOK.mjs","sources":["../../../../libs/modules/security-management/client/src/lib/commands/terminate-session.command.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXPCommonSettings,\n AXPSettingsService,\n} from '@acorex-platform/framework-client/common';\nimport { AXPEntityDefinitionRegistryService, AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport {\n AXPCommand,\n resolveEntityActionCommandInput,\n type AXPCommandExecuteResultPromise,\n type AXPEntityActionCommandInput,\n} from '@acorex-platform/framework-shared/runtime';\nimport { RootConfig } from '@acorex-platform/module-security-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXPTerminateSessionCommandInput = AXPEntityActionCommandInput;\n\n//#endregion\n\n//#region ---- Terminate session command ----\n\n/**\n * Terminates one or more device sessions (entity list / detail actions).\n * Replaces the former `terminate-entity` workflow (loading + terminate loop + success toast).\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPTerminateSessionCommand implements AXPCommand<AXPTerminateSessionCommandInput> {\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly entityService = inject(AXPEntityService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n private readonly deviceSessionsDataAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.deviceSessions.name)\n .data<string, { id: string }>();\n\n async execute(input: AXPTerminateSessionCommandInput = {}): AXPCommandExecuteResultPromise {\n const context = resolveEntityActionCommandInput(input);\n if (!context.entity || context.data == null) {\n return { success: false };\n }\n\n const moduleEntity = context.entity;\n const [moduleName, entityName] = moduleEntity.split('.');\n const data = context.data as Record<string, unknown> | Record<string, unknown>[];\n const meta = { ...((context.meta as Record<string, unknown> | undefined) ?? {}) };\n\n const ids = Array.isArray(data) ? data.map((item) => String(item['id'])) : [String(data['id'])];\n const entity = await this.entityRegistry.resolve(moduleName, entityName);\n\n if (entity.parentKey && !Array.isArray(data) && data[entity.parentKey]) {\n meta['refreshTargetId'] = data[entity.parentKey];\n }\n\n const dialog = this.loadingDialog.show({\n title: await this.translationService.translateAsync('workflow.terminating'),\n mode: 'determinate',\n status: 'Terminating...',\n progressValue: 0,\n text: `0/${ids.length}`,\n buttons: [\n {\n text: await this.translationService.translateAsync('cancel'),\n color: 'danger',\n onClick: () => {\n dialog.close();\n },\n },\n ],\n });\n\n let failedCounter = 0;\n for (const id of ids) {\n try {\n await this.deviceSessionsDataAccessor.update(id, {\n status: 'revoked',\n loggedOutAt: new Date(),\n isActiveSession: false,\n });\n } catch {\n failedCounter++;\n await this.dialogService.alert(\n await this.translationService.translateAsync('workflow.fail-delete-title'),\n await this.translationService.translateAsync('workflow.fail-delete-body', {\n params: { item: 1 },\n }),\n 'danger',\n );\n }\n }\n\n const success = failedCounter === 0;\n setTimeout(() => {\n dialog.close();\n this.entityEvents.publishLayoutRefresh(moduleEntity, meta as Record<string, unknown> | undefined);\n }, 300);\n\n if (success) {\n await this.showSuccessToast();\n }\n\n return success\n ? { success: true, kind: 'object' as const, data: undefined }\n : { success: false };\n }\n\n private async showSuccessToast(): Promise<void> {\n const showResult = await this.settingsService.get(AXPCommonSettings.EnableOperationToasts);\n if (!showResult) {\n return;\n }\n\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync('workflow.session-terminated'),\n content: await this.translationService.translateAsync('workflow.session-terminated-body'),\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;;AAuBA;AAEA;AAEA;;;AAGG;MAEU,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC3D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,sBAAsB,CA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UAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -1,2 +1,2 @@
1
- export { A as AXMAssignPermissionsCommand, a as AXMDeviceSessionsService, b as AXMPermissionsModule, c as AXMRolePermissionGrantService, d as AXMRolePermissionsPageComponent, e as AXMRolePermissionsPageComponentProvider, f as AXMSecurityManagementModule, g as AXPPermissionsEditorComponent, h as AXPPermissionsWidget, i as AXPPermissionsWidgetColumnComponent, j as AXPPermissionsWidgetEditComponent, k as AXPPermissionsWidgetViewComponent } from './acorex-platform-module-security-management-client-acorex-platform-module-security-management-client-Wtvhs7VH.mjs';
1
+ export { A as AXMAssignPermissionsCommand, a as AXMDeviceSessionsService, b as AXMPermissionsModule, c as AXMRolePermissionGrantService, d as AXMRolePermissionsPageComponent, e as AXMRolePermissionsPageComponentProvider, f as AXMSecurityManagementModule, g as AXPPermissionsEditorComponent, h as AXPPermissionsWidget, i as AXPPermissionsWidgetColumnComponent, j as AXPPermissionsWidgetEditComponent, k as AXPPermissionsWidgetViewComponent } from './acorex-platform-module-security-management-client-acorex-platform-module-security-management-client-Ddzg9VYV.mjs';
2
2
  //# sourceMappingURL=acorex-platform-module-security-management-client.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex-platform/module-security-management-client",
3
- "version": "0.0.32",
3
+ "version": "0.0.37",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0 || ^22.0.0",
@@ -22,6 +22,46 @@
22
22
  "./contracts": {
23
23
  "types": "./types/acorex-platform-module-security-management-client-contracts.d.ts",
24
24
  "default": "./fesm2022/acorex-platform-module-security-management-client-contracts.mjs"
25
+ },
26
+ "./contracts/entities/device-sessions": {
27
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entities-device-sessions.d.ts",
28
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entities-device-sessions.mjs"
29
+ },
30
+ "./contracts/entities/identity-provider": {
31
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entities-identity-provider.d.ts",
32
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entities-identity-provider.mjs"
33
+ },
34
+ "./contracts/entities/policy": {
35
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entities-policy.d.ts",
36
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entities-policy.mjs"
37
+ },
38
+ "./contracts/entities/profile": {
39
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entities-profile.d.ts",
40
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entities-profile.mjs"
41
+ },
42
+ "./contracts/entities/role-permission": {
43
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entities-role-permission.d.ts",
44
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entities-role-permission.mjs"
45
+ },
46
+ "./contracts/entities/roles": {
47
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entities-roles.d.ts",
48
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entities-roles.mjs"
49
+ },
50
+ "./contracts/entities/user-role": {
51
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entities-user-role.d.ts",
52
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entities-user-role.mjs"
53
+ },
54
+ "./contracts/entities/users": {
55
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entities-users.d.ts",
56
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entities-users.mjs"
57
+ },
58
+ "./contracts/entity-catalog": {
59
+ "types": "./types/acorex-platform-module-security-management-client-contracts-entity-catalog.d.ts",
60
+ "default": "./fesm2022/acorex-platform-module-security-management-client-contracts-entity-catalog.mjs"
61
+ },
62
+ "./local-entities": {
63
+ "types": "./types/acorex-platform-module-security-management-client-local-entities.d.ts",
64
+ "default": "./fesm2022/acorex-platform-module-security-management-client-local-entities.mjs"
25
65
  }
26
66
  },
27
67
  "type": "module"
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function deviceSessionsFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { deviceSessionsFactory };
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function identityProviderFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { identityProviderFactory };
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function policyFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { policyFactory };
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function profileFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { profileFactory };
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function rolePermissionFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { rolePermissionFactory };
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function rolesFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { rolesFactory };
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function userRoleFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { userRoleFactory };
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function usersFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { usersFactory };
@@ -0,0 +1,10 @@
1
+ import { AXPLocalEntityCatalog } from '@acorex-platform/framework-shared/entity';
2
+
3
+ /**
4
+ * Lazy per-entity layout factories. Do not re-export from the contracts barrel
5
+ * so RootConfig imports stay light. Server seed and client `local-entities`
6
+ * consume this catalog explicitly.
7
+ */
8
+ declare const securityManagementLocalEntityCatalog: AXPLocalEntityCatalog;
9
+
10
+ export { securityManagementLocalEntityCatalog };
@@ -273,7 +273,12 @@ interface AXMSecurityManagementDeviceSessionsEntityModel extends AXPEntityModel<
273
273
  id: string;
274
274
  name: string;
275
275
  };
276
+ /** True only for the caller's current login (`sid`); stamped on read. */
276
277
  isActiveSession: boolean;
278
+ /** Login/session id matching access-token `sid`. */
279
+ sessionId?: string;
280
+ /** Stable per-device fingerprint (one active row per user+device). */
281
+ deviceKey?: string;
277
282
  deviceName: string;
278
283
  operatingSystem: string;
279
284
  browser: string;
@@ -0,0 +1,12 @@
1
+ import * as _angular_core from '@angular/core';
2
+ export { securityManagementLocalEntityCatalog } from '@acorex-platform/module-security-management-client/contracts/entity-catalog';
3
+
4
+ /**
5
+ * Registers security-management layouts on the client from packaged factories.
6
+ * Each `import()` targets a secondary entry so unused entities stay out of the
7
+ * bundle. Do not add this to the demo app; demo continues to load layouts via
8
+ * `Domain:GetEntityLayout`.
9
+ */
10
+ declare function provideSecurityManagementLocalEntities(): _angular_core.EnvironmentProviders;
11
+
12
+ export { provideSecurityManagementLocalEntities };
@@ -12,7 +12,7 @@ import { AXPWidgetConfig } from '@acorex-platform/framework-shared/widget-core';
12
12
 
13
13
  /**
14
14
  * Terminates device sessions for the current or specified session.
15
- * Implementations are provided by connectivity layers (e.g. mock or API).
15
+ * Implementations are provided by connectivity layers (e.g. API: AXCDeviceSessionService).
16
16
  */
17
17
  declare abstract class AXMDeviceSessionsService {
18
18
  abstract terminate(id: string): Promise<boolean>;