@acorex-platform/module-security-management-server 0.0.15 → 2.0.0-next.42
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.
- package/contracts/src/AXM_USER_ACCESS_STATE_DEFINITION_KEY.js.map +1 -1
- package/contracts/src/AXM_USER_EFFECTIVE_STATE_DEFINITION_KEY.js.map +1 -1
- package/contracts/src/ROLE_PERMISSIONS_PAGE_COMPONENT_KEY.d.ts +2 -0
- package/contracts/src/ROLE_PERMISSIONS_PAGE_COMPONENT_KEY.js +6 -0
- package/contracts/src/ROLE_PERMISSIONS_PAGE_COMPONENT_KEY.js.map +1 -0
- package/contracts/src/USER_ROLES_PAGE_COMPONENT_KEY.d.ts +1 -0
- package/contracts/src/USER_ROLES_PAGE_COMPONENT_KEY.js +5 -0
- package/contracts/src/USER_ROLES_PAGE_COMPONENT_KEY.js.map +1 -0
- package/contracts/src/create-application-role-rows.util.d.ts +15 -0
- package/contracts/src/create-application-role-rows.util.js +67 -0
- package/contracts/src/create-application-role-rows.util.js.map +1 -0
- package/contracts/src/device-session-admin-scope.d.ts +15 -0
- package/contracts/src/device-session-admin-scope.js +16 -0
- package/contracts/src/device-session-admin-scope.js.map +1 -0
- package/contracts/src/entities/device-sessions/device-sessions.entity.js +50 -1
- package/contracts/src/entities/device-sessions/device-sessions.entity.js.map +1 -1
- package/contracts/src/entities/device-sessions/device-sessions.types.d.ts +7 -0
- package/contracts/src/entities/device-sessions/device-sessions.types.js.map +1 -1
- package/contracts/src/entities/device-sessions/index.d.ts +0 -1
- package/contracts/src/entities/device-sessions/index.js +0 -1
- package/contracts/src/entities/device-sessions/index.js.map +1 -1
- package/contracts/src/entities/identity-provider/identity-provider.entity.d.ts +2 -0
- package/contracts/src/entities/identity-provider/identity-provider.entity.js +453 -0
- package/contracts/src/entities/identity-provider/identity-provider.entity.js.map +1 -0
- package/contracts/src/entities/identity-provider/identity-provider.types.d.ts +61 -0
- package/contracts/src/entities/identity-provider/identity-provider.types.js +14 -0
- package/contracts/src/entities/identity-provider/identity-provider.types.js.map +1 -0
- package/contracts/src/entities/identity-provider/index.d.ts +1 -0
- package/contracts/src/entities/identity-provider/index.js +5 -0
- package/contracts/src/entities/identity-provider/index.js.map +1 -0
- package/contracts/src/entities/index.d.ts +4 -0
- package/contracts/src/entities/index.js +4 -0
- package/contracts/src/entities/index.js.map +1 -1
- package/contracts/src/entities/policy/index.d.ts +0 -1
- package/contracts/src/entities/policy/index.js +0 -1
- package/contracts/src/entities/policy/index.js.map +1 -1
- package/contracts/src/entities/policy/policy.entity.js +15 -0
- package/contracts/src/entities/policy/policy.entity.js.map +1 -1
- package/contracts/src/entities/policy/policy.types.js.map +1 -1
- package/contracts/src/entities/profile/index.d.ts +0 -1
- package/contracts/src/entities/profile/index.js +0 -1
- package/contracts/src/entities/profile/index.js.map +1 -1
- package/contracts/src/entities/profile/profile.entity.js +15 -0
- package/contracts/src/entities/profile/profile.entity.js.map +1 -1
- package/contracts/src/entities/profile/profile.types.js.map +1 -1
- package/contracts/src/entities/role-permission/index.d.ts +1 -0
- package/contracts/src/entities/role-permission/index.js +5 -0
- package/contracts/src/entities/role-permission/index.js.map +1 -0
- package/contracts/src/entities/role-permission/role-permission.entity.d.ts +2 -0
- package/contracts/src/entities/role-permission/role-permission.entity.js +163 -0
- package/contracts/src/entities/role-permission/role-permission.entity.js.map +1 -0
- package/contracts/src/entities/role-permission/role-permission.types.d.ts +11 -0
- package/contracts/src/entities/role-permission/role-permission.types.js +5 -0
- package/contracts/src/entities/role-permission/role-permission.types.js.map +1 -0
- package/contracts/src/entities/roles/index.d.ts +0 -1
- package/contracts/src/entities/roles/index.js +0 -1
- package/contracts/src/entities/roles/index.js.map +1 -1
- package/contracts/src/entities/roles/roles.entity.js +73 -144
- package/contracts/src/entities/roles/roles.entity.js.map +1 -1
- package/contracts/src/entities/roles/roles.types.d.ts +4 -1
- package/contracts/src/entities/roles/roles.types.js.map +1 -1
- package/contracts/src/entities/user-role/index.d.ts +1 -0
- package/{src/lib/seed/tenant → contracts/src/entities/user-role}/index.js +1 -1
- package/contracts/src/entities/user-role/index.js.map +1 -0
- package/contracts/src/entities/user-role/user-role.entity.d.ts +2 -0
- package/contracts/src/entities/user-role/user-role.entity.js +164 -0
- package/contracts/src/entities/user-role/user-role.entity.js.map +1 -0
- package/contracts/src/entities/user-role/user-role.types.d.ts +11 -0
- package/contracts/src/entities/user-role/user-role.types.js +5 -0
- package/contracts/src/entities/user-role/user-role.types.js.map +1 -0
- package/contracts/src/entities/user-two-factor/index.d.ts +2 -0
- package/contracts/src/entities/user-two-factor/index.js +8 -0
- package/contracts/src/entities/user-two-factor/index.js.map +1 -0
- package/contracts/src/entities/user-two-factor/user-two-factor.entity.d.ts +6 -0
- package/contracts/src/entities/user-two-factor/user-two-factor.entity.js +103 -0
- package/contracts/src/entities/user-two-factor/user-two-factor.entity.js.map +1 -0
- package/contracts/src/entities/user-two-factor/user-two-factor.types.d.ts +24 -0
- package/contracts/src/entities/user-two-factor/user-two-factor.types.js +4 -0
- package/contracts/src/entities/user-two-factor/user-two-factor.types.js.map +1 -0
- package/contracts/src/entities/users/index.d.ts +1 -1
- package/contracts/src/entities/users/index.js +1 -1
- package/contracts/src/entities/users/index.js.map +1 -1
- package/contracts/src/entities/users/user-provisioning-list-actions.d.ts +8 -0
- package/contracts/src/entities/users/user-provisioning-list-actions.js +95 -0
- package/contracts/src/entities/users/user-provisioning-list-actions.js.map +1 -0
- package/contracts/src/entities/users/users.entity.js +341 -283
- package/contracts/src/entities/users/users.entity.js.map +1 -1
- package/contracts/src/entities/users/users.types.d.ts +24 -1
- package/contracts/src/entities/users/users.types.js.map +1 -1
- package/contracts/src/entity-catalog.d.ts +7 -0
- package/contracts/src/entity-catalog.js +28 -0
- package/contracts/src/entity-catalog.js.map +1 -0
- package/contracts/src/entity-entry.device-sessions.d.ts +1 -0
- package/contracts/src/entity-entry.device-sessions.js +6 -0
- package/contracts/src/entity-entry.device-sessions.js.map +1 -0
- package/contracts/src/entity-entry.identity-provider.d.ts +1 -0
- package/contracts/src/entity-entry.identity-provider.js +6 -0
- package/contracts/src/entity-entry.identity-provider.js.map +1 -0
- package/contracts/src/entity-entry.policy.d.ts +1 -0
- package/contracts/src/entity-entry.policy.js +6 -0
- package/contracts/src/entity-entry.policy.js.map +1 -0
- package/contracts/src/entity-entry.profile.d.ts +1 -0
- package/contracts/src/entity-entry.profile.js +6 -0
- package/contracts/src/entity-entry.profile.js.map +1 -0
- package/contracts/src/entity-entry.role-permission.d.ts +1 -0
- package/contracts/src/entity-entry.role-permission.js +6 -0
- package/contracts/src/entity-entry.role-permission.js.map +1 -0
- package/contracts/src/entity-entry.roles.d.ts +1 -0
- package/contracts/src/entity-entry.roles.js +6 -0
- package/contracts/src/entity-entry.roles.js.map +1 -0
- package/contracts/src/entity-entry.user-role.d.ts +1 -0
- package/contracts/src/entity-entry.user-role.js +6 -0
- package/contracts/src/entity-entry.user-role.js.map +1 -0
- package/contracts/src/entity-entry.user-two-factor.d.ts +1 -0
- package/contracts/src/entity-entry.user-two-factor.js +6 -0
- package/contracts/src/entity-entry.user-two-factor.js.map +1 -0
- package/contracts/src/entity-entry.users.d.ts +1 -0
- package/contracts/src/entity-entry.users.js +6 -0
- package/contracts/src/entity-entry.users.js.map +1 -0
- package/contracts/src/features.keys.d.ts +4 -0
- package/contracts/src/features.keys.js +4 -0
- package/contracts/src/features.keys.js.map +1 -1
- package/contracts/src/index.d.ts +13 -1
- package/contracts/src/index.js +13 -1
- package/contracts/src/index.js.map +1 -1
- package/contracts/src/invite-application-role-rows.util.d.ts +16 -0
- package/contracts/src/invite-application-role-rows.util.js +68 -0
- package/contracts/src/invite-application-role-rows.util.js.map +1 -0
- package/contracts/src/invite-assignable-roles.util.d.ts +34 -0
- package/contracts/src/invite-assignable-roles.util.js +75 -0
- package/contracts/src/invite-assignable-roles.util.js.map +1 -0
- package/contracts/src/lib/context.definitions.d.ts +2 -0
- package/contracts/src/lib/context.definitions.js +15 -0
- package/contracts/src/lib/context.definitions.js.map +1 -0
- package/contracts/src/manifest.d.ts +6 -0
- package/contracts/src/manifest.js +24 -0
- package/contracts/src/manifest.js.map +1 -0
- package/contracts/src/menu.keys.d.ts +1 -0
- package/contracts/src/menu.keys.js +1 -0
- package/contracts/src/menu.keys.js.map +1 -1
- package/contracts/src/permission.keys.d.ts +48 -18
- package/contracts/src/permission.keys.js +49 -21
- package/contracts/src/permission.keys.js.map +1 -1
- package/contracts/src/resolve-user-effective-state.d.ts +10 -0
- package/contracts/src/resolve-user-effective-state.js +46 -0
- package/contracts/src/resolve-user-effective-state.js.map +1 -0
- package/contracts/src/root-config.d.ts +33 -0
- package/contracts/src/root-config.js +33 -0
- package/contracts/src/root-config.js.map +1 -1
- package/contracts/src/server-commands.d.ts +340 -0
- package/contracts/src/server-commands.js +88 -0
- package/contracts/src/server-commands.js.map +1 -0
- package/contracts/src/settings.keys.d.ts +16 -0
- package/contracts/src/settings.keys.js +21 -0
- package/contracts/src/settings.keys.js.map +1 -0
- package/contracts/src/user-access-state.js.map +1 -1
- package/contracts/src/user-effective-state.js.map +1 -1
- package/contracts/src/user-invitation.d.ts +41 -0
- package/contracts/src/user-invitation.js +18 -0
- package/contracts/src/user-invitation.js.map +1 -0
- package/contracts/src/user-password-reset.d.ts +9 -0
- package/contracts/src/user-password-reset.js +5 -0
- package/contracts/src/user-password-reset.js.map +1 -0
- package/package.json +16 -11
- package/server/src/index.d.ts +3 -0
- package/server/src/index.js +11 -0
- package/server/src/index.js.map +1 -0
- package/server/src/lib/effective-access-history/effective-access-history.service.d.ts +35 -0
- package/server/src/lib/effective-access-history/effective-access-history.service.js +486 -0
- package/server/src/lib/effective-access-history/effective-access-history.service.js.map +1 -0
- package/server/src/lib/effective-access-history/effective-access-history.types.d.ts +64 -0
- package/server/src/lib/effective-access-history/effective-access-history.types.js +5 -0
- package/server/src/lib/effective-access-history/effective-access-history.types.js.map +1 -0
- package/server/src/lib/effective-access-history/version-as-of.util.d.ts +37 -0
- package/server/src/lib/effective-access-history/version-as-of.util.js +167 -0
- package/server/src/lib/effective-access-history/version-as-of.util.js.map +1 -0
- package/server/src/lib/entities/index.d.ts +1 -0
- package/server/src/lib/entities/index.js +5 -0
- package/{src/lib/seed/tenant → server/src/lib/entities}/index.js.map +1 -1
- package/server/src/lib/entities/security-management.entity-catalog.d.ts +1 -0
- package/server/src/lib/entities/security-management.entity-catalog.js +12 -0
- package/server/src/lib/entities/security-management.entity-catalog.js.map +1 -0
- package/server/src/lib/handlers/security-report.handlers.d.ts +36 -0
- package/server/src/lib/handlers/security-report.handlers.js +164 -0
- package/server/src/lib/handlers/security-report.handlers.js.map +1 -0
- package/server/src/lib/identity-provider/auth-oauth-clients.constants.d.ts +5 -0
- package/server/src/lib/identity-provider/auth-oauth-clients.constants.js +11 -0
- package/server/src/lib/identity-provider/auth-oauth-clients.constants.js.map +1 -0
- package/server/src/lib/identity-provider/identity-provider-catalog.service.d.ts +20 -0
- package/server/src/lib/identity-provider/identity-provider-catalog.service.js +169 -0
- package/server/src/lib/identity-provider/identity-provider-catalog.service.js.map +1 -0
- package/server/src/lib/identity-provider/identity-provider-ids.constants.d.ts +8 -0
- package/server/src/lib/identity-provider/identity-provider-ids.constants.js +19 -0
- package/server/src/lib/identity-provider/identity-provider-ids.constants.js.map +1 -0
- package/server/src/lib/identity-provider/identity-provider-stub.bootstrap.d.ts +12 -0
- package/server/src/lib/identity-provider/identity-provider-stub.bootstrap.js +48 -0
- package/server/src/lib/identity-provider/identity-provider-stub.bootstrap.js.map +1 -0
- package/server/src/lib/identity-provider/identity-provider.constants.d.ts +1 -0
- package/server/src/lib/identity-provider/identity-provider.constants.js +7 -0
- package/server/src/lib/identity-provider/identity-provider.constants.js.map +1 -0
- package/server/src/lib/middlewares/device-sessions-active.middleware.d.ts +15 -0
- package/server/src/lib/middlewares/device-sessions-active.middleware.js +76 -0
- package/server/src/lib/middlewares/device-sessions-active.middleware.js.map +1 -0
- package/server/src/lib/middlewares/device-sessions-app-scope.middleware.d.ts +29 -0
- package/server/src/lib/middlewares/device-sessions-app-scope.middleware.js +137 -0
- package/server/src/lib/middlewares/device-sessions-app-scope.middleware.js.map +1 -0
- package/server/src/lib/middlewares/device-sessions-app-scope.util.d.ts +41 -0
- package/server/src/lib/middlewares/device-sessions-app-scope.util.js +69 -0
- package/server/src/lib/middlewares/device-sessions-app-scope.util.js.map +1 -0
- package/server/src/lib/middlewares/device-sessions-token-revoke.middleware.d.ts +18 -0
- package/server/src/lib/middlewares/device-sessions-token-revoke.middleware.js +90 -0
- package/server/src/lib/middlewares/device-sessions-token-revoke.middleware.js.map +1 -0
- package/server/src/lib/middlewares/user-assigned-roles.middleware.d.ts +36 -0
- package/server/src/lib/middlewares/user-assigned-roles.middleware.js +359 -0
- package/server/src/lib/middlewares/user-assigned-roles.middleware.js.map +1 -0
- package/server/src/lib/middlewares/user-effective-state.middleware.d.ts +13 -0
- package/server/src/lib/middlewares/user-effective-state.middleware.js +57 -0
- package/server/src/lib/middlewares/user-effective-state.middleware.js.map +1 -0
- package/server/src/lib/middlewares/user-invitation-list.middleware.d.ts +32 -0
- package/server/src/lib/middlewares/user-invitation-list.middleware.js +250 -0
- package/server/src/lib/middlewares/user-invitation-list.middleware.js.map +1 -0
- package/server/src/lib/middlewares/user-profile-write.middleware.d.ts +18 -0
- package/server/src/lib/middlewares/user-profile-write.middleware.js +206 -0
- package/server/src/lib/middlewares/user-profile-write.middleware.js.map +1 -0
- package/server/src/lib/password-reset/change-own-password.command.d.ts +8 -0
- package/server/src/lib/password-reset/change-own-password.command.js +38 -0
- package/server/src/lib/password-reset/change-own-password.command.js.map +1 -0
- package/server/src/lib/password-reset/complete-password-reset.command.d.ts +8 -0
- package/server/src/lib/password-reset/complete-password-reset.command.js +37 -0
- package/server/src/lib/password-reset/complete-password-reset.command.js.map +1 -0
- package/server/src/lib/password-reset/get-own-password-status.command.d.ts +8 -0
- package/server/src/lib/password-reset/get-own-password-status.command.js +31 -0
- package/server/src/lib/password-reset/get-own-password-status.command.js.map +1 -0
- package/server/src/lib/password-reset/send-password-reset-email.command.d.ts +20 -0
- package/server/src/lib/password-reset/send-password-reset-email.command.js +43 -0
- package/server/src/lib/password-reset/send-password-reset-email.command.js.map +1 -0
- package/server/src/lib/password-reset/user-change-password.service.d.ts +24 -0
- package/server/src/lib/password-reset/user-change-password.service.js +92 -0
- package/server/src/lib/password-reset/user-change-password.service.js.map +1 -0
- package/server/src/lib/password-reset/user-password-reset.service.d.ts +26 -0
- package/server/src/lib/password-reset/user-password-reset.service.js +221 -0
- package/server/src/lib/password-reset/user-password-reset.service.js.map +1 -0
- package/server/src/lib/queries/get-permission-holders-history.query.d.ts +4 -0
- package/server/src/lib/queries/get-permission-holders-history.query.definition.d.ts +5 -0
- package/server/src/lib/queries/get-permission-holders-history.query.definition.js +38 -0
- package/server/src/lib/queries/get-permission-holders-history.query.definition.js.map +1 -0
- package/server/src/lib/queries/get-permission-holders-history.query.js +25 -0
- package/server/src/lib/queries/get-permission-holders-history.query.js.map +1 -0
- package/server/src/lib/queries/get-role-holders-history.query.d.ts +4 -0
- package/server/src/lib/queries/get-role-holders-history.query.definition.d.ts +5 -0
- package/server/src/lib/queries/get-role-holders-history.query.definition.js +38 -0
- package/server/src/lib/queries/get-role-holders-history.query.definition.js.map +1 -0
- package/server/src/lib/queries/get-role-holders-history.query.js +25 -0
- package/server/src/lib/queries/get-role-holders-history.query.js.map +1 -0
- package/server/src/lib/queries/get-user-effective-permissions-history.query.d.ts +4 -0
- package/server/src/lib/queries/get-user-effective-permissions-history.query.definition.d.ts +5 -0
- package/server/src/lib/queries/get-user-effective-permissions-history.query.definition.js +35 -0
- package/server/src/lib/queries/get-user-effective-permissions-history.query.definition.js.map +1 -0
- package/server/src/lib/queries/get-user-effective-permissions-history.query.js +26 -0
- package/server/src/lib/queries/get-user-effective-permissions-history.query.js.map +1 -0
- package/server/src/lib/queries/get-user-effective-roles-history.query.d.ts +4 -0
- package/server/src/lib/queries/get-user-effective-roles-history.query.definition.d.ts +5 -0
- package/server/src/lib/queries/get-user-effective-roles-history.query.definition.js +36 -0
- package/server/src/lib/queries/get-user-effective-roles-history.query.definition.js.map +1 -0
- package/server/src/lib/queries/get-user-effective-roles-history.query.js +25 -0
- package/server/src/lib/queries/get-user-effective-roles-history.query.js.map +1 -0
- package/server/src/lib/queries/get-user-password-change-history.query.d.ts +4 -0
- package/server/src/lib/queries/get-user-password-change-history.query.definition.d.ts +5 -0
- package/server/src/lib/queries/get-user-password-change-history.query.definition.js +33 -0
- package/server/src/lib/queries/get-user-password-change-history.query.definition.js.map +1 -0
- package/server/src/lib/queries/get-user-password-change-history.query.js +23 -0
- package/server/src/lib/queries/get-user-password-change-history.query.js.map +1 -0
- package/server/src/lib/queries/security-query.helpers.d.ts +47 -0
- package/server/src/lib/queries/security-query.helpers.js +184 -0
- package/server/src/lib/queries/security-query.helpers.js.map +1 -0
- package/server/src/lib/reports/password-change-history.service.d.ts +14 -0
- package/server/src/lib/reports/password-change-history.service.js +74 -0
- package/server/src/lib/reports/password-change-history.service.js.map +1 -0
- package/server/src/lib/reports/permission-display-catalog.d.ts +7 -0
- package/server/src/lib/reports/permission-display-catalog.js +101 -0
- package/server/src/lib/reports/permission-display-catalog.js.map +1 -0
- package/server/src/lib/reports/security-report-definition.provider.d.ts +5 -0
- package/server/src/lib/reports/security-report-definition.provider.js +23 -0
- package/server/src/lib/reports/security-report-definition.provider.js.map +1 -0
- package/server/src/lib/reports/security-report-parameter-groups.d.ts +343 -0
- package/server/src/lib/reports/security-report-parameter-groups.js +167 -0
- package/server/src/lib/reports/security-report-parameter-groups.js.map +1 -0
- package/server/src/lib/reports/security-report-scope.constants.d.ts +5 -0
- package/server/src/lib/reports/security-report-scope.constants.js +11 -0
- package/server/src/lib/reports/security-report-scope.constants.js.map +1 -0
- package/server/src/lib/reports/security-report.definitions.d.ts +12 -0
- package/server/src/lib/reports/security-report.definitions.js +386 -0
- package/server/src/lib/reports/security-report.definitions.js.map +1 -0
- package/server/src/lib/security-management-entity-storage.bootstrap.d.ts +26 -0
- package/server/src/lib/security-management-entity-storage.bootstrap.js +56 -0
- package/server/src/lib/security-management-entity-storage.bootstrap.js.map +1 -0
- package/server/src/lib/security-management-server.module.d.ts +7 -0
- package/server/src/lib/security-management-server.module.js +190 -0
- package/server/src/lib/security-management-server.module.js.map +1 -0
- package/server/src/lib/two-factor/admin-reset-two-factor.command.d.ts +8 -0
- package/server/src/lib/two-factor/admin-reset-two-factor.command.js +35 -0
- package/server/src/lib/two-factor/admin-reset-two-factor.command.js.map +1 -0
- package/server/src/lib/two-factor/confirm-two-factor-enrollment.command.d.ts +8 -0
- package/server/src/lib/two-factor/confirm-two-factor-enrollment.command.js +34 -0
- package/server/src/lib/two-factor/confirm-two-factor-enrollment.command.js.map +1 -0
- package/server/src/lib/two-factor/disable-two-factor.command.d.ts +8 -0
- package/server/src/lib/two-factor/disable-two-factor.command.js +31 -0
- package/server/src/lib/two-factor/disable-two-factor.command.js.map +1 -0
- package/server/src/lib/two-factor/generate-two-factor-recovery-codes.command.d.ts +8 -0
- package/server/src/lib/two-factor/generate-two-factor-recovery-codes.command.js +34 -0
- package/server/src/lib/two-factor/generate-two-factor-recovery-codes.command.js.map +1 -0
- package/server/src/lib/two-factor/get-two-factor-status.command.d.ts +8 -0
- package/server/src/lib/two-factor/get-two-factor-status.command.js +31 -0
- package/server/src/lib/two-factor/get-two-factor-status.command.js.map +1 -0
- package/server/src/lib/two-factor/recovery-codes.util.d.ts +11 -0
- package/server/src/lib/two-factor/recovery-codes.util.js +73 -0
- package/server/src/lib/two-factor/recovery-codes.util.js.map +1 -0
- package/server/src/lib/two-factor/start-two-factor-enrollment.command.d.ts +8 -0
- package/server/src/lib/two-factor/start-two-factor-enrollment.command.js +31 -0
- package/server/src/lib/two-factor/start-two-factor-enrollment.command.js.map +1 -0
- package/server/src/lib/two-factor/totp.util.d.ts +32 -0
- package/server/src/lib/two-factor/totp.util.js +128 -0
- package/server/src/lib/two-factor/totp.util.js.map +1 -0
- package/server/src/lib/two-factor/two-factor-encryption.util.d.ts +25 -0
- package/server/src/lib/two-factor/two-factor-encryption.util.js +123 -0
- package/server/src/lib/two-factor/two-factor-encryption.util.js.map +1 -0
- package/server/src/lib/two-factor/two-factor-gate.bootstrap.d.ts +9 -0
- package/server/src/lib/two-factor/two-factor-gate.bootstrap.js +65 -0
- package/server/src/lib/two-factor/two-factor-gate.bootstrap.js.map +1 -0
- package/server/src/lib/two-factor/two-factor-redis.store.d.ts +63 -0
- package/server/src/lib/two-factor/two-factor-redis.store.js +321 -0
- package/server/src/lib/two-factor/two-factor-redis.store.js.map +1 -0
- package/server/src/lib/two-factor/user-two-factor.service.d.ts +62 -0
- package/server/src/lib/two-factor/user-two-factor.service.js +573 -0
- package/server/src/lib/two-factor/user-two-factor.service.js.map +1 -0
- package/server/src/lib/two-factor/verify-two-factor-login.command.d.ts +18 -0
- package/server/src/lib/two-factor/verify-two-factor-login.command.js +54 -0
- package/server/src/lib/two-factor/verify-two-factor-login.command.js.map +1 -0
- package/server/src/lib/user-invitation/accept-invitation.command.d.ts +8 -0
- package/server/src/lib/user-invitation/accept-invitation.command.js +41 -0
- package/server/src/lib/user-invitation/accept-invitation.command.js.map +1 -0
- package/server/src/lib/user-invitation/accept-my-invitation.command.d.ts +8 -0
- package/server/src/lib/user-invitation/accept-my-invitation.command.js +40 -0
- package/server/src/lib/user-invitation/accept-my-invitation.command.js.map +1 -0
- package/server/src/lib/user-invitation/approve-join-request.command.d.ts +8 -0
- package/server/src/lib/user-invitation/approve-join-request.command.js +41 -0
- package/server/src/lib/user-invitation/approve-join-request.command.js.map +1 -0
- package/server/src/lib/user-invitation/cancel-invitation.command.d.ts +8 -0
- package/server/src/lib/user-invitation/cancel-invitation.command.js +37 -0
- package/server/src/lib/user-invitation/cancel-invitation.command.js.map +1 -0
- package/server/src/lib/user-invitation/cancel-my-join-request.command.d.ts +8 -0
- package/server/src/lib/user-invitation/cancel-my-join-request.command.js +40 -0
- package/server/src/lib/user-invitation/cancel-my-join-request.command.js.map +1 -0
- package/server/src/lib/user-invitation/create-user-in-tenant.command.d.ts +8 -0
- package/server/src/lib/user-invitation/create-user-in-tenant.command.js +37 -0
- package/server/src/lib/user-invitation/create-user-in-tenant.command.js.map +1 -0
- package/server/src/lib/user-invitation/decline-invitation.command.d.ts +8 -0
- package/server/src/lib/user-invitation/decline-invitation.command.js +37 -0
- package/server/src/lib/user-invitation/decline-invitation.command.js.map +1 -0
- package/server/src/lib/user-invitation/invite-user.command.d.ts +8 -0
- package/server/src/lib/user-invitation/invite-user.command.js +37 -0
- package/server/src/lib/user-invitation/invite-user.command.js.map +1 -0
- package/server/src/lib/user-invitation/list-invite-assignable-roles.command.d.ts +8 -0
- package/server/src/lib/user-invitation/list-invite-assignable-roles.command.js +41 -0
- package/server/src/lib/user-invitation/list-invite-assignable-roles.command.js.map +1 -0
- package/server/src/lib/user-invitation/list-my-join-requests.command.d.ts +8 -0
- package/server/src/lib/user-invitation/list-my-join-requests.command.js +40 -0
- package/server/src/lib/user-invitation/list-my-join-requests.command.js.map +1 -0
- package/server/src/lib/user-invitation/list-my-pending-invitations.command.d.ts +8 -0
- package/server/src/lib/user-invitation/list-my-pending-invitations.command.js +37 -0
- package/server/src/lib/user-invitation/list-my-pending-invitations.command.js.map +1 -0
- package/server/src/lib/user-invitation/list-tenant-entitled-applications.command.d.ts +8 -0
- package/server/src/lib/user-invitation/list-tenant-entitled-applications.command.js +41 -0
- package/server/src/lib/user-invitation/list-tenant-entitled-applications.command.js.map +1 -0
- package/server/src/lib/user-invitation/lookup-tenant-by-unique-name.command.d.ts +8 -0
- package/server/src/lib/user-invitation/lookup-tenant-by-unique-name.command.js +40 -0
- package/server/src/lib/user-invitation/lookup-tenant-by-unique-name.command.js.map +1 -0
- package/server/src/lib/user-invitation/reject-join-request.command.d.ts +8 -0
- package/server/src/lib/user-invitation/reject-join-request.command.js +41 -0
- package/server/src/lib/user-invitation/reject-join-request.command.js.map +1 -0
- package/server/src/lib/user-invitation/request-tenant-membership.command.d.ts +8 -0
- package/server/src/lib/user-invitation/request-tenant-membership.command.js +40 -0
- package/server/src/lib/user-invitation/request-tenant-membership.command.js.map +1 -0
- package/server/src/lib/user-invitation/resend-invitation.command.d.ts +12 -0
- package/server/src/lib/user-invitation/resend-invitation.command.js +37 -0
- package/server/src/lib/user-invitation/resend-invitation.command.js.map +1 -0
- package/server/src/lib/user-invitation/user-invitation-application-access.util.d.ts +25 -0
- package/server/src/lib/user-invitation/user-invitation-application-access.util.js +121 -0
- package/server/src/lib/user-invitation/user-invitation-application-access.util.js.map +1 -0
- package/server/src/lib/user-invitation/user-invitation.service.d.ts +162 -0
- package/server/src/lib/user-invitation/user-invitation.service.js +1658 -0
- package/server/src/lib/user-invitation/user-invitation.service.js.map +1 -0
- package/contracts/src/datasource.keys.d.ts +0 -4
- package/contracts/src/datasource.keys.js +0 -10
- package/contracts/src/datasource.keys.js.map +0 -1
- package/src/index.d.ts +0 -5
- package/src/index.js +0 -13
- package/src/index.js.map +0 -1
- package/src/lib/security-management-server.module.d.ts +0 -2
- package/src/lib/security-management-server.module.js +0 -23
- package/src/lib/security-management-server.module.js.map +0 -1
- package/src/lib/seed/index.d.ts +0 -22
- package/src/lib/seed/index.js +0 -24
- package/src/lib/seed/index.js.map +0 -1
- package/src/lib/seed/policy/index.d.ts +0 -2
- package/src/lib/seed/policy/index.js +0 -6
- package/src/lib/seed/policy/index.js.map +0 -1
- package/src/lib/seed/policy/policy.mock.d.ts +0 -7
- package/src/lib/seed/policy/policy.mock.js +0 -40
- package/src/lib/seed/policy/policy.mock.js.map +0 -1
- package/src/lib/seed/policy/policy.seed.d.ts +0 -5
- package/src/lib/seed/policy/policy.seed.js +0 -31
- package/src/lib/seed/policy/policy.seed.js.map +0 -1
- package/src/lib/seed/role/index.d.ts +0 -4
- package/src/lib/seed/role/index.js +0 -8
- package/src/lib/seed/role/index.js.map +0 -1
- package/src/lib/seed/role/role-ids.constants.d.ts +0 -14
- package/src/lib/seed/role/role-ids.constants.js +0 -20
- package/src/lib/seed/role/role-ids.constants.js.map +0 -1
- package/src/lib/seed/role/role-permission-keys.constants.d.ts +0 -578
- package/src/lib/seed/role/role-permission-keys.constants.js +0 -620
- package/src/lib/seed/role/role-permission-keys.constants.js.map +0 -1
- package/src/lib/seed/role/role.mock.d.ts +0 -4
- package/src/lib/seed/role/role.mock.js +0 -321
- package/src/lib/seed/role/role.mock.js.map +0 -1
- package/src/lib/seed/role/role.seed.d.ts +0 -5
- package/src/lib/seed/role/role.seed.js +0 -31
- package/src/lib/seed/role/role.seed.js.map +0 -1
- package/src/lib/seed/security-management-seed.provider.d.ts +0 -4
- package/src/lib/seed/security-management-seed.provider.js +0 -18
- package/src/lib/seed/security-management-seed.provider.js.map +0 -1
- package/src/lib/seed/security-management-seed.tokens.d.ts +0 -1
- package/src/lib/seed/security-management-seed.tokens.js +0 -7
- package/src/lib/seed/security-management-seed.tokens.js.map +0 -1
- package/src/lib/seed/security-management.seed-catalog.d.ts +0 -2
- package/src/lib/seed/security-management.seed-catalog.js +0 -17
- package/src/lib/seed/security-management.seed-catalog.js.map +0 -1
- package/src/lib/seed/tenant/index.d.ts +0 -1
- package/src/lib/seed/tenant/tenant-ids.constants.d.ts +0 -11
- package/src/lib/seed/tenant/tenant-ids.constants.js +0 -17
- package/src/lib/seed/tenant/tenant-ids.constants.js.map +0 -1
- package/src/lib/seed/user/index.d.ts +0 -4
- package/src/lib/seed/user/index.js +0 -13
- package/src/lib/seed/user/index.js.map +0 -1
- package/src/lib/seed/user/resolve-user-effective-state.util.d.ts +0 -14
- package/src/lib/seed/user/resolve-user-effective-state.util.js +0 -61
- package/src/lib/seed/user/resolve-user-effective-state.util.js.map +0 -1
- package/src/lib/seed/user/user.mock.d.ts +0 -20
- package/src/lib/seed/user/user.mock.js +0 -332
- package/src/lib/seed/user/user.mock.js.map +0 -1
- package/src/lib/seed/user/user.seed.d.ts +0 -5
- package/src/lib/seed/user/user.seed.js +0 -31
- package/src/lib/seed/user/user.seed.js.map +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyTwoFactorLoginCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
7
|
+
const security_1 = require("@acorex-platform/framework-server/security");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_two_factor_service_1 = require("./user-two-factor.service");
|
|
10
|
+
//#region ----- Verify two-factor login command -----
|
|
11
|
+
/**
|
|
12
|
+
* Public command that completes login after a 2FA challenge.
|
|
13
|
+
* Prefer {@link AUTH_VERIFY_TWO_FACTOR_DEFAULT} for cookie-aware SPA sign-in;
|
|
14
|
+
* this key remains available for catalog/runtime callers.
|
|
15
|
+
*/
|
|
16
|
+
let VerifyTwoFactorLoginCommand = class VerifyTwoFactorLoginCommand {
|
|
17
|
+
constructor(twoFactor, auth, credentials, cookies, tokens) {
|
|
18
|
+
this.twoFactor = twoFactor;
|
|
19
|
+
this.auth = auth;
|
|
20
|
+
this.credentials = credentials;
|
|
21
|
+
this.cookies = cookies;
|
|
22
|
+
this.tokens = tokens;
|
|
23
|
+
}
|
|
24
|
+
execute() {
|
|
25
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = { challengeId: '', code: '' }) {
|
|
26
|
+
const verified = yield this.twoFactor.verifyLoginChallenge(input.challengeId, input.code);
|
|
27
|
+
if (!verified.success) {
|
|
28
|
+
return { success: false, message: { code: verified.code } };
|
|
29
|
+
}
|
|
30
|
+
const user = yield this.credentials.findUserById(verified.data.userId);
|
|
31
|
+
if (!user) {
|
|
32
|
+
return { success: false, message: { code: 'TWO_FACTOR_USER_NOT_FOUND' } };
|
|
33
|
+
}
|
|
34
|
+
const request = (0, security_1.resolveAuthHttpRequest)();
|
|
35
|
+
const meta = (0, security_1.resolveAuthRequestMeta)(request);
|
|
36
|
+
const rememberMe = typeof input.rememberMe === 'boolean' ? input.rememberMe : verified.data.rememberMe;
|
|
37
|
+
const data = yield this.auth.completeSignIn(user, meta, Object.assign({}, (typeof rememberMe === 'boolean' ? { persist: rememberMe } : {})));
|
|
38
|
+
(0, security_1.applyAuthTokenCookies)(request, this.cookies, this.tokens, data);
|
|
39
|
+
return { success: true, kind: 'object', data };
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.VerifyTwoFactorLoginCommand = VerifyTwoFactorLoginCommand;
|
|
44
|
+
exports.VerifyTwoFactorLoginCommand = VerifyTwoFactorLoginCommand = tslib_1.__decorate([
|
|
45
|
+
(0, abstract_1.ServerHandler)({ key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.VerifyTwoFactorLogin, auth: 'public' }),
|
|
46
|
+
(0, common_1.Injectable)(),
|
|
47
|
+
tslib_1.__metadata("design:paramtypes", [user_two_factor_service_1.UserTwoFactorService,
|
|
48
|
+
security_1.AuthService,
|
|
49
|
+
security_1.AuthLocalCredentialsService,
|
|
50
|
+
security_1.AuthCookieService,
|
|
51
|
+
security_1.TokenService])
|
|
52
|
+
], VerifyTwoFactorLoginCommand);
|
|
53
|
+
//#endregion
|
|
54
|
+
//# sourceMappingURL=verify-two-factor-login.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-two-factor-login.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/two-factor/verify-two-factor-login.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAE5C,gFAAkF;AAClF,yEASoD;AACpD,gHAG+D;AAE/D,uEAAiE;AAEjE,qDAAqD;AAErD;;;;GAIG;AAGI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAGtC,YACmB,SAA+B,EAC/B,IAAiB,EACjB,WAAwC,EACxC,OAA0B,EAC1B,MAAoB;QAJpB,cAAS,GAAT,SAAS,CAAsB;QAC/B,SAAI,GAAJ,IAAI,CAAa;QACjB,gBAAW,GAAX,WAAW,CAA6B;QACxC,YAAO,GAAP,OAAO,CAAmB;QAC1B,WAAM,GAAN,MAAM,CAAc;IACpC,CAAC;IAEE,OAAO;qEACX,QAAsC,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAEnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAC1F,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACtB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;YAC9D,CAAC;YAED,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACvE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE,EAAE,CAAC;YAC5E,CAAC;YAED,MAAM,OAAO,GAAG,IAAA,iCAAsB,GAAE,CAAC;YACzC,MAAM,IAAI,GAAG,IAAA,iCAAsB,EAAC,OAAO,CAAC,CAAC;YAC7C,MAAM,UAAU,GACd,OAAO,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;YACtF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,oBACjD,CAAC,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACnE,CAAC;YACH,IAAA,gCAAqB,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAEhE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACjD,CAAC;KAAA;CACF,CAAA;AAnCY,kEAA2B;sCAA3B,2BAA2B;IAFvC,IAAA,wBAAa,EAAC,EAAE,GAAG,EAAE,0EAAmC,CAAC,oBAAoB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAChG,IAAA,mBAAU,GAAE;6CAKmB,8CAAoB;QACzB,sBAAW;QACJ,sCAA2B;QAC/B,4BAAiB;QAClB,uBAAY;GAR5B,2BAA2B,CAmCvC;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMAcceptInvitationInput } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class AcceptInvitationCommand implements AXPCommand<AXMAcceptInvitationInput, unknown> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMAcceptInvitationInput): AXPCommandExecuteResultPromise<unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AcceptInvitationCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- AcceptInvitation command ----
|
|
11
|
+
let AcceptInvitationCommand = class AcceptInvitationCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = { token: '' }) {
|
|
17
|
+
try {
|
|
18
|
+
if (input.preview) {
|
|
19
|
+
const preview = yield this.invitations.previewInvitation(input.token);
|
|
20
|
+
return (0, core_1.runtimeCommandSuccessObject)(preview);
|
|
21
|
+
}
|
|
22
|
+
const result = yield this.invitations.acceptInvitation(input);
|
|
23
|
+
if (!result.success) {
|
|
24
|
+
return (0, core_1.runtimeCommandFailure)(result.message, { code: result.code });
|
|
25
|
+
}
|
|
26
|
+
return (0, core_1.runtimeCommandSuccessObject)(result.data, result.message ? { message: { text: result.message } } : undefined);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Invitation command failed.');
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.AcceptInvitationCommand = AcceptInvitationCommand;
|
|
35
|
+
exports.AcceptInvitationCommand = AcceptInvitationCommand = tslib_1.__decorate([
|
|
36
|
+
(0, abstract_1.ServerHandler)({ key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.AcceptInvitation, auth: 'public' }),
|
|
37
|
+
(0, common_1.Injectable)(),
|
|
38
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
39
|
+
], AcceptInvitationCommand);
|
|
40
|
+
//#endregion
|
|
41
|
+
//# sourceMappingURL=accept-invitation.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accept-invitation.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/accept-invitation.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAG+D;AAC/D,uEAAkE;AAElE,4CAA4C;AAIrC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAGlC,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAAkC,EAAE,KAAK,EAAE,EAAE,EAAE;YAG/C,IAAI,CAAC;gBACH,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;oBAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACtE,OAAO,IAAA,kCAA2B,EAAC,OAAO,CAAC,CAAC;gBAC9C,CAAC;gBAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;gBAC9D,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACpB,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBACtE,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAC/B,MAA6B,CAAC,IAAI,EACnC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,CACtE,CAAC;YACJ,CAAC;QAEH,CAAC;KAAA;CACF,CAAA;AA9BY,0DAAuB;kCAAvB,uBAAuB;IAFnC,IAAA,wBAAa,EAAC,EAAE,GAAG,EAAE,0EAAmC,CAAC,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC5F,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,uBAAuB,CA8BnC;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMAcceptMyInvitationInput } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class AcceptMyInvitationCommand implements AXPCommand<AXMAcceptMyInvitationInput, unknown> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMAcceptMyInvitationInput): AXPCommandExecuteResultPromise;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AcceptMyInvitationCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- Accept my invitation command ----
|
|
11
|
+
let AcceptMyInvitationCommand = class AcceptMyInvitationCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = { tenantUserId: '' }) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.acceptMyInvitation(input);
|
|
19
|
+
if (!result.success) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message);
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(undefined, result.message ? { message: { text: result.message } } : undefined);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Failed to accept invitation.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.AcceptMyInvitationCommand = AcceptMyInvitationCommand;
|
|
31
|
+
exports.AcceptMyInvitationCommand = AcceptMyInvitationCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({
|
|
33
|
+
key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.AcceptMyInvitation,
|
|
34
|
+
auth: 'session',
|
|
35
|
+
}),
|
|
36
|
+
(0, common_1.Injectable)(),
|
|
37
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
38
|
+
], AcceptMyInvitationCommand);
|
|
39
|
+
//#endregion
|
|
40
|
+
//# sourceMappingURL=accept-my-invitation.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accept-my-invitation.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/accept-my-invitation.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAG+D;AAE/D,uEAAkE;AAElE,gDAAgD;AAOzC,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAGpC,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAAoC,EAAE,YAAY,EAAE,EAAE,EAAE;YAExD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;gBAChE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACpB,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/C,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAChC,SAAS,EACT,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,8BAA8B,CACxE,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AAvBY,8DAAyB;oCAAzB,yBAAyB;IALrC,IAAA,wBAAa,EAAC;QACb,GAAG,EAAE,0EAAmC,CAAC,kBAAkB;QAC3D,IAAI,EAAE,SAAS;KAChB,CAAC;IACD,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,yBAAyB,CAuBrC;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMApproveJoinRequestInput } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class ApproveJoinRequestCommand implements AXPCommand<AXMApproveJoinRequestInput, unknown> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMApproveJoinRequestInput): AXPCommandExecuteResultPromise<unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApproveJoinRequestCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- ApproveJoinRequest command ----
|
|
11
|
+
let ApproveJoinRequestCommand = class ApproveJoinRequestCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = {}) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.approveJoinRequest(input);
|
|
19
|
+
if (!result.success) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message, { code: result.code });
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(undefined);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Failed to approve join request.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.ApproveJoinRequestCommand = ApproveJoinRequestCommand;
|
|
31
|
+
exports.ApproveJoinRequestCommand = ApproveJoinRequestCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({
|
|
33
|
+
key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.ApproveJoinRequest,
|
|
34
|
+
auth: 'session',
|
|
35
|
+
permissions: [module_security_management_contracts_1.AXPAdministrationPermissionKeys.MaintainUsersAndRoles],
|
|
36
|
+
}),
|
|
37
|
+
(0, common_1.Injectable)(),
|
|
38
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
39
|
+
], ApproveJoinRequestCommand);
|
|
40
|
+
//#endregion
|
|
41
|
+
//# sourceMappingURL=approve-join-request.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approve-join-request.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/approve-join-request.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAI+D;AAC/D,uEAAkE;AAElE,8CAA8C;AAQvC,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAGpC,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAAoC,EAAE;YAEtC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;gBAChE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACpB,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBACtE,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAAC,SAAS,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAiC,CAC3E,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AApBY,8DAAyB;oCAAzB,yBAAyB;IANrC,IAAA,wBAAa,EAAC;QACb,GAAG,EAAE,0EAAmC,CAAC,kBAAkB;QAC3D,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,CAAC,sEAA+B,CAAC,qBAAqB,CAAC;KACrE,CAAC;IACD,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,yBAAyB,CAoBrC;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMCancelInvitationInput } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class CancelInvitationCommand implements AXPCommand<AXMCancelInvitationInput, unknown> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMCancelInvitationInput): AXPCommandExecuteResultPromise<unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CancelInvitationCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- CancelInvitation command ----
|
|
11
|
+
let CancelInvitationCommand = class CancelInvitationCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = {}) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.cancelInvitation(input);
|
|
19
|
+
if (!result.success) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message);
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(result.data, result.message ? { message: { text: result.message } } : undefined);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Invitation command failed.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.CancelInvitationCommand = CancelInvitationCommand;
|
|
31
|
+
exports.CancelInvitationCommand = CancelInvitationCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({ key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.CancelInvitation, auth: 'session', permissions: [module_security_management_contracts_1.AXPAdministrationPermissionKeys.MaintainUsersAndRoles] }),
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
35
|
+
], CancelInvitationCommand);
|
|
36
|
+
//#endregion
|
|
37
|
+
//# sourceMappingURL=cancel-invitation.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-invitation.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/cancel-invitation.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAI+D;AAC/D,uEAAkE;AAElE,4CAA4C;AAIrC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAGlC,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAAkC,EAA8B;YAGhE,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;gBAC9D,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACpB,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/C,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAC/B,MAA6B,CAAC,IAAI,EACnC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,CACtE,CAAC;YACJ,CAAC;QAEH,CAAC;KAAA;CACF,CAAA;AAzBY,0DAAuB;kCAAvB,uBAAuB;IAFnC,IAAA,wBAAa,EAAC,EAAE,GAAG,EAAE,0EAAmC,CAAC,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,sEAA+B,CAAC,qBAAqB,CAAC,EAAE,CAAC;IACnK,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,uBAAuB,CAyBnC;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMCancelMyJoinRequestInput } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class CancelMyJoinRequestCommand implements AXPCommand<AXMCancelMyJoinRequestInput, unknown> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMCancelMyJoinRequestInput): AXPCommandExecuteResultPromise<unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CancelMyJoinRequestCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- CancelMyJoinRequest command ----
|
|
11
|
+
let CancelMyJoinRequestCommand = class CancelMyJoinRequestCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = { tenantUserId: '' }) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.cancelMyJoinRequest(input);
|
|
19
|
+
if (!result.success) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message, { code: result.code });
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(undefined);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Failed to cancel join request.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.CancelMyJoinRequestCommand = CancelMyJoinRequestCommand;
|
|
31
|
+
exports.CancelMyJoinRequestCommand = CancelMyJoinRequestCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({
|
|
33
|
+
key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.CancelMyJoinRequest,
|
|
34
|
+
auth: 'session',
|
|
35
|
+
}),
|
|
36
|
+
(0, common_1.Injectable)(),
|
|
37
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
38
|
+
], CancelMyJoinRequestCommand);
|
|
39
|
+
//#endregion
|
|
40
|
+
//# sourceMappingURL=cancel-my-join-request.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-my-join-request.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/cancel-my-join-request.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAG+D;AAC/D,uEAAkE;AAElE,+CAA+C;AAOxC,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAGrC,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAAqC,EAAE,YAAY,EAAE,EAAE,EAAE;YAEzD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;gBACjE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACpB,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBACtE,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAAC,SAAS,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,gCAAgC,CAC1E,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AApBY,gEAA0B;qCAA1B,0BAA0B;IALtC,IAAA,wBAAa,EAAC;QACb,GAAG,EAAE,0EAAmC,CAAC,mBAAmB;QAC5D,IAAI,EAAE,SAAS;KAChB,CAAC;IACD,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,0BAA0B,CAoBtC;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMCreateUserInTenantInput, type AXMCreateUserInTenantResult } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class CreateUserInTenantCommand implements AXPCommand<AXMCreateUserInTenantInput, AXMCreateUserInTenantResult> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMCreateUserInTenantInput): AXPCommandExecuteResultPromise<AXMCreateUserInTenantResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateUserInTenantCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- CreateUserInTenant command ----
|
|
11
|
+
let CreateUserInTenantCommand = class CreateUserInTenantCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = {}) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.createUserInTenant(input);
|
|
19
|
+
if (!result.success || result.data == null) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message);
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(result.data, result.message ? { message: { text: result.message } } : undefined);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Invitation command failed.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.CreateUserInTenantCommand = CreateUserInTenantCommand;
|
|
31
|
+
exports.CreateUserInTenantCommand = CreateUserInTenantCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({ key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.CreateUserInTenant, auth: 'session', permissions: [module_security_management_contracts_1.AXPAdministrationPermissionKeys.MaintainUsersAndRoles] }),
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
35
|
+
], CreateUserInTenantCommand);
|
|
36
|
+
//#endregion
|
|
37
|
+
//# sourceMappingURL=create-user-in-tenant.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-user-in-tenant.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/create-user-in-tenant.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAK+D;AAC/D,uEAAkE;AAElE,8CAA8C;AAIvC,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAGpC,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAAoC,EAAgC;YAGpE,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;gBAChE,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;oBAC3C,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/C,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAChC,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,CACtE,CAAC;YACJ,CAAC;QAEH,CAAC;KAAA;CACF,CAAA;AAzBY,8DAAyB;oCAAzB,yBAAyB;IAFrC,IAAA,wBAAa,EAAC,EAAE,GAAG,EAAE,0EAAmC,CAAC,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,sEAA+B,CAAC,qBAAqB,CAAC,EAAE,CAAC;IACrK,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,yBAAyB,CAyBrC;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMDeclineInvitationInput } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class DeclineInvitationCommand implements AXPCommand<AXMDeclineInvitationInput, unknown> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMDeclineInvitationInput): AXPCommandExecuteResultPromise<unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclineInvitationCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- DeclineInvitation command ----
|
|
11
|
+
let DeclineInvitationCommand = class DeclineInvitationCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = { tenantUserId: '' }) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.declineInvitation(input);
|
|
19
|
+
if (!result.success) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message);
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(result.data, result.message ? { message: { text: result.message } } : undefined);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Invitation command failed.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.DeclineInvitationCommand = DeclineInvitationCommand;
|
|
31
|
+
exports.DeclineInvitationCommand = DeclineInvitationCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({ key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.DeclineInvitation, auth: 'session' }),
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
35
|
+
], DeclineInvitationCommand);
|
|
36
|
+
//#endregion
|
|
37
|
+
//# sourceMappingURL=decline-invitation.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decline-invitation.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/decline-invitation.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAG+D;AAC/D,uEAAkE;AAElE,6CAA6C;AAItC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAGnC,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAAmC,EAAE,YAAY,EAAE,EAAE,EAAE;YAGvD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBAC/D,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACpB,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/C,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAC/B,MAA6B,CAAC,IAAI,EACnC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,CACtE,CAAC;YACJ,CAAC;QAEH,CAAC;KAAA;CACF,CAAA;AAzBY,4DAAwB;mCAAxB,wBAAwB;IAFpC,IAAA,wBAAa,EAAC,EAAE,GAAG,EAAE,0EAAmC,CAAC,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC9F,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,wBAAwB,CAyBpC;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMInviteUserInput, type AXMInviteUserResult } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class InviteUserCommand implements AXPCommand<AXMInviteUserInput, AXMInviteUserResult> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMInviteUserInput): AXPCommandExecuteResultPromise<AXMInviteUserResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InviteUserCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- InviteUser command ----
|
|
11
|
+
let InviteUserCommand = class InviteUserCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = {}) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.inviteUser(input);
|
|
19
|
+
if (!result.success || result.data == null) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message);
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(result.data, result.message ? { message: { text: result.message } } : undefined);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Invitation command failed.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.InviteUserCommand = InviteUserCommand;
|
|
31
|
+
exports.InviteUserCommand = InviteUserCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({ key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.InviteUser, auth: 'session', permissions: [module_security_management_contracts_1.AXPAdministrationPermissionKeys.MaintainUsersAndRoles] }),
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
35
|
+
], InviteUserCommand);
|
|
36
|
+
//#endregion
|
|
37
|
+
//# sourceMappingURL=invite-user.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invite-user.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/invite-user.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAK+D;AAC/D,uEAAkE;AAElE,sCAAsC;AAI/B,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG5B,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAA4B,EAAwB;YAGpD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBACxD,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;oBAC3C,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/C,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAChC,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,CACtE,CAAC;YACJ,CAAC;QAEH,CAAC;KAAA;CACF,CAAA;AAzBY,8CAAiB;4BAAjB,iBAAiB;IAF7B,IAAA,wBAAa,EAAC,EAAE,GAAG,EAAE,0EAAmC,CAAC,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,sEAA+B,CAAC,qBAAqB,CAAC,EAAE,CAAC;IAC7J,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,iBAAiB,CAyB7B;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMListInviteAssignableRolesInput, type AXMListInviteAssignableRolesResult } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class ListInviteAssignableRolesCommand implements AXPCommand<AXMListInviteAssignableRolesInput, AXMListInviteAssignableRolesResult> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(input?: AXMListInviteAssignableRolesInput): AXPCommandExecuteResultPromise<AXMListInviteAssignableRolesResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListInviteAssignableRolesCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- ListInviteAssignableRoles command ----
|
|
11
|
+
let ListInviteAssignableRolesCommand = class ListInviteAssignableRolesCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (input = {}) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.listInviteAssignableRoles(input.applicationId);
|
|
19
|
+
if (!result.success || result.data == null) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message);
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(result.data, result.message ? { message: { text: result.message } } : undefined);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'List invite roles failed.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.ListInviteAssignableRolesCommand = ListInviteAssignableRolesCommand;
|
|
31
|
+
exports.ListInviteAssignableRolesCommand = ListInviteAssignableRolesCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({
|
|
33
|
+
key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.ListInviteAssignableRoles,
|
|
34
|
+
auth: 'session',
|
|
35
|
+
permissions: [module_security_management_contracts_1.AXPAdministrationPermissionKeys.MaintainUsersAndRoles],
|
|
36
|
+
}),
|
|
37
|
+
(0, common_1.Injectable)(),
|
|
38
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
39
|
+
], ListInviteAssignableRolesCommand);
|
|
40
|
+
//#endregion
|
|
41
|
+
//# sourceMappingURL=list-invite-assignable-roles.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-invite-assignable-roles.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/list-invite-assignable-roles.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAK+D;AAC/D,uEAAkE;AAElE,qDAAqD;AAQ9C,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAG3C,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,QAA2C,EAAE;YAE7C,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;gBACrF,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;oBAC3C,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/C,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAChC,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACnE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,2BAA2B,CACrE,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AAvBY,4EAAgC;2CAAhC,gCAAgC;IAN5C,IAAA,wBAAa,EAAC;QACb,GAAG,EAAE,0EAAmC,CAAC,yBAAyB;QAClE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,CAAC,sEAA+B,CAAC,qBAAqB,CAAC;KACrE,CAAC;IACD,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,gCAAgC,CAuB5C;AAED,YAAY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { type AXMListMyJoinRequestsResult } from '@acorex-platform/module-security-management-client/contracts';
|
|
3
|
+
import { UserInvitationService } from './user-invitation.service';
|
|
4
|
+
export declare class ListMyJoinRequestsCommand implements AXPCommand<Record<string, never>, AXMListMyJoinRequestsResult> {
|
|
5
|
+
private readonly invitations;
|
|
6
|
+
constructor(invitations: UserInvitationService);
|
|
7
|
+
execute(_input?: Record<string, never>): AXPCommandExecuteResultPromise<AXMListMyJoinRequestsResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListMyJoinRequestsCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@acorex-platform/framework-shared/core");
|
|
7
|
+
const abstract_1 = require("@acorex-platform/framework-server/domain/abstract");
|
|
8
|
+
const module_security_management_contracts_1 = require("@acorex-platform/module-security-management-client/contracts");
|
|
9
|
+
const user_invitation_service_1 = require("./user-invitation.service");
|
|
10
|
+
//#region ---- ListMyJoinRequests command ----
|
|
11
|
+
let ListMyJoinRequestsCommand = class ListMyJoinRequestsCommand {
|
|
12
|
+
constructor(invitations) {
|
|
13
|
+
this.invitations = invitations;
|
|
14
|
+
}
|
|
15
|
+
execute() {
|
|
16
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (_input = {}) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield this.invitations.listMyJoinRequests();
|
|
19
|
+
if (!result.success || result.data == null) {
|
|
20
|
+
return (0, core_1.runtimeCommandFailure)(result.message, { code: result.code });
|
|
21
|
+
}
|
|
22
|
+
return (0, core_1.runtimeCommandSuccessObject)(result.data);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return (0, core_1.runtimeCommandFailure)(error instanceof Error ? error.message : 'Failed to list join requests.');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.ListMyJoinRequestsCommand = ListMyJoinRequestsCommand;
|
|
31
|
+
exports.ListMyJoinRequestsCommand = ListMyJoinRequestsCommand = tslib_1.__decorate([
|
|
32
|
+
(0, abstract_1.ServerHandler)({
|
|
33
|
+
key: module_security_management_contracts_1.AXMSecurityManagementServerCommands.ListMyJoinRequests,
|
|
34
|
+
auth: 'session',
|
|
35
|
+
}),
|
|
36
|
+
(0, common_1.Injectable)(),
|
|
37
|
+
tslib_1.__metadata("design:paramtypes", [user_invitation_service_1.UserInvitationService])
|
|
38
|
+
], ListMyJoinRequestsCommand);
|
|
39
|
+
//#endregion
|
|
40
|
+
//# sourceMappingURL=list-my-join-requests.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-my-join-requests.command.js","sourceRoot":"","sources":["../../../../../../../libs/modules/security-management/server/src/lib/user-invitation/list-my-join-requests.command.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,iEAA4G;AAE5G,gFAAkF;AAClF,gHAG+D;AAC/D,uEAAkE;AAElE,8CAA8C;AAOvC,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAGpC,YAA6B,WAAkC;QAAlC,gBAAW,GAAX,WAAW,CAAuB;IAAG,CAAC;IAE7D,OAAO;qEACX,SAAgC,EAAE;YAElC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE,CAAC;gBAC3D,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;oBAC3C,OAAO,IAAA,4BAAqB,EAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBACtE,CAAC;gBACD,OAAO,IAAA,kCAA2B,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAClD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,4BAAqB,EAC1B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,+BAA+B,CACzE,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AApBY,8DAAyB;oCAAzB,yBAAyB;IALrC,IAAA,wBAAa,EAAC;QACb,GAAG,EAAE,0EAAmC,CAAC,kBAAkB;QAC3D,IAAI,EAAE,SAAS;KAChB,CAAC;IACD,IAAA,mBAAU,GAAE;6CAI+B,+CAAqB;GAHpD,yBAAyB,CAoBrC;AAED,YAAY"}
|