@udhuong/admin-core 0.1.1 → 0.1.2
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/dist/server/admin-core-options.interface.d.ts +53 -0
- package/dist/server/admin-core-options.interface.d.ts.map +1 -0
- package/dist/server/admin-core-options.interface.js +5 -0
- package/dist/server/admin-core-options.interface.js.map +1 -0
- package/dist/server/admin-core.module.d.ts +8 -0
- package/dist/server/admin-core.module.d.ts.map +1 -0
- package/dist/server/admin-core.module.js +292 -0
- package/dist/server/admin-core.module.js.map +1 -0
- package/dist/server/auth/application/actions/auth/change-password.action.d.ts +12 -0
- package/dist/server/auth/application/actions/auth/change-password.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/change-password.action.js +56 -0
- package/dist/server/auth/application/actions/auth/change-password.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/client-credentials.action.d.ts +16 -0
- package/dist/server/auth/application/actions/auth/client-credentials.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/client-credentials.action.js +101 -0
- package/dist/server/auth/application/actions/auth/client-credentials.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/forgot-password.action.d.ts +12 -0
- package/dist/server/auth/application/actions/auth/forgot-password.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/forgot-password.action.js +50 -0
- package/dist/server/auth/application/actions/auth/forgot-password.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/get-roles-permissions.action.d.ts +13 -0
- package/dist/server/auth/application/actions/auth/get-roles-permissions.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/get-roles-permissions.action.js +53 -0
- package/dist/server/auth/application/actions/auth/get-roles-permissions.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/get-user-profile.action.d.ts +10 -0
- package/dist/server/auth/application/actions/auth/get-user-profile.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/get-user-profile.action.js +43 -0
- package/dist/server/auth/application/actions/auth/get-user-profile.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/index.d.ts +14 -0
- package/dist/server/auth/application/actions/auth/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/index.js +30 -0
- package/dist/server/auth/application/actions/auth/index.js.map +1 -0
- package/dist/server/auth/application/actions/auth/login.action.d.ts +23 -0
- package/dist/server/auth/application/actions/auth/login.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/login.action.js +175 -0
- package/dist/server/auth/application/actions/auth/login.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/logout.action.d.ts +8 -0
- package/dist/server/auth/application/actions/auth/logout.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/logout.action.js +48 -0
- package/dist/server/auth/application/actions/auth/logout.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/refresh-token.action.d.ts +24 -0
- package/dist/server/auth/application/actions/auth/refresh-token.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/refresh-token.action.js +165 -0
- package/dist/server/auth/application/actions/auth/refresh-token.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/register.action.d.ts +16 -0
- package/dist/server/auth/application/actions/auth/register.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/register.action.js +83 -0
- package/dist/server/auth/application/actions/auth/register.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/resend-verification-email.action.d.ts +12 -0
- package/dist/server/auth/application/actions/auth/resend-verification-email.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/resend-verification-email.action.js +61 -0
- package/dist/server/auth/application/actions/auth/resend-verification-email.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/reset-password.action.d.ts +10 -0
- package/dist/server/auth/application/actions/auth/reset-password.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/reset-password.action.js +52 -0
- package/dist/server/auth/application/actions/auth/reset-password.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/update-profile.action.d.ts +8 -0
- package/dist/server/auth/application/actions/auth/update-profile.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/update-profile.action.js +63 -0
- package/dist/server/auth/application/actions/auth/update-profile.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/verify-email.action.d.ts +9 -0
- package/dist/server/auth/application/actions/auth/verify-email.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/verify-email.action.js +54 -0
- package/dist/server/auth/application/actions/auth/verify-email.action.js.map +1 -0
- package/dist/server/auth/application/actions/index.d.ts +5 -0
- package/dist/server/auth/application/actions/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/index.js +21 -0
- package/dist/server/auth/application/actions/index.js.map +1 -0
- package/dist/server/auth/application/actions/session/get-active-sessions.action.d.ts +8 -0
- package/dist/server/auth/application/actions/session/get-active-sessions.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/session/get-active-sessions.action.js +40 -0
- package/dist/server/auth/application/actions/session/get-active-sessions.action.js.map +1 -0
- package/dist/server/auth/application/actions/session/index.d.ts +4 -0
- package/dist/server/auth/application/actions/session/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/session/index.js +20 -0
- package/dist/server/auth/application/actions/session/index.js.map +1 -0
- package/dist/server/auth/application/actions/session/revoke-all-sessions.action.d.ts +9 -0
- package/dist/server/auth/application/actions/session/revoke-all-sessions.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/session/revoke-all-sessions.action.js +54 -0
- package/dist/server/auth/application/actions/session/revoke-all-sessions.action.js.map +1 -0
- package/dist/server/auth/application/actions/session/revoke-session.action.d.ts +9 -0
- package/dist/server/auth/application/actions/session/revoke-session.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/session/revoke-session.action.js +52 -0
- package/dist/server/auth/application/actions/session/revoke-session.action.js.map +1 -0
- package/dist/server/auth/application/actions/social/index.d.ts +2 -0
- package/dist/server/auth/application/actions/social/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/social/index.js +18 -0
- package/dist/server/auth/application/actions/social/index.js.map +1 -0
- package/dist/server/auth/application/actions/social/social-login.action.d.ts +22 -0
- package/dist/server/auth/application/actions/social/social-login.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/social/social-login.action.js +159 -0
- package/dist/server/auth/application/actions/social/social-login.action.js.map +1 -0
- package/dist/server/auth/application/actions/two-factor/disable-2fa.action.d.ts +9 -0
- package/dist/server/auth/application/actions/two-factor/disable-2fa.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/two-factor/disable-2fa.action.js +49 -0
- package/dist/server/auth/application/actions/two-factor/disable-2fa.action.js.map +1 -0
- package/dist/server/auth/application/actions/two-factor/enable-2fa.action.d.ts +13 -0
- package/dist/server/auth/application/actions/two-factor/enable-2fa.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/two-factor/enable-2fa.action.js +135 -0
- package/dist/server/auth/application/actions/two-factor/enable-2fa.action.js.map +1 -0
- package/dist/server/auth/application/actions/two-factor/index.d.ts +4 -0
- package/dist/server/auth/application/actions/two-factor/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/two-factor/index.js +20 -0
- package/dist/server/auth/application/actions/two-factor/index.js.map +1 -0
- package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.d.ts +10 -0
- package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.js +97 -0
- package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.js.map +1 -0
- package/dist/server/auth/application/dto/change-password.dto.d.ts +5 -0
- package/dist/server/auth/application/dto/change-password.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/change-password.dto.js +33 -0
- package/dist/server/auth/application/dto/change-password.dto.js.map +1 -0
- package/dist/server/auth/application/dto/client-credentials.dto.d.ts +7 -0
- package/dist/server/auth/application/dto/client-credentials.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/client-credentials.dto.js +42 -0
- package/dist/server/auth/application/dto/client-credentials.dto.js.map +1 -0
- package/dist/server/auth/application/dto/enable-2fa-response.d.ts +7 -0
- package/dist/server/auth/application/dto/enable-2fa-response.d.ts.map +1 -0
- package/dist/server/auth/application/dto/enable-2fa-response.js +13 -0
- package/dist/server/auth/application/dto/enable-2fa-response.js.map +1 -0
- package/dist/server/auth/application/dto/enable-2fa.dto.d.ts +4 -0
- package/dist/server/auth/application/dto/enable-2fa.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/enable-2fa.dto.js +23 -0
- package/dist/server/auth/application/dto/enable-2fa.dto.js.map +1 -0
- package/dist/server/auth/application/dto/forgot-password.dto.d.ts +4 -0
- package/dist/server/auth/application/dto/forgot-password.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/forgot-password.dto.js +23 -0
- package/dist/server/auth/application/dto/forgot-password.dto.js.map +1 -0
- package/dist/server/auth/application/dto/index.d.ts +17 -0
- package/dist/server/auth/application/dto/index.d.ts.map +1 -0
- package/dist/server/auth/application/dto/index.js +33 -0
- package/dist/server/auth/application/dto/index.js.map +1 -0
- package/dist/server/auth/application/dto/login-response.d.ts +25 -0
- package/dist/server/auth/application/dto/login-response.d.ts.map +1 -0
- package/dist/server/auth/application/dto/login-response.js +15 -0
- package/dist/server/auth/application/dto/login-response.js.map +1 -0
- package/dist/server/auth/application/dto/login.dto.d.ts +10 -0
- package/dist/server/auth/application/dto/login.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/login.dto.js +59 -0
- package/dist/server/auth/application/dto/login.dto.js.map +1 -0
- package/dist/server/auth/application/dto/refresh-token.dto.d.ts +5 -0
- package/dist/server/auth/application/dto/refresh-token.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/refresh-token.dto.js +30 -0
- package/dist/server/auth/application/dto/refresh-token.dto.js.map +1 -0
- package/dist/server/auth/application/dto/register.dto.d.ts +7 -0
- package/dist/server/auth/application/dto/register.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/register.dto.js +47 -0
- package/dist/server/auth/application/dto/register.dto.js.map +1 -0
- package/dist/server/auth/application/dto/reset-password.dto.d.ts +5 -0
- package/dist/server/auth/application/dto/reset-password.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/reset-password.dto.js +33 -0
- package/dist/server/auth/application/dto/reset-password.dto.js.map +1 -0
- package/dist/server/auth/application/dto/social-login.dto.d.ts +10 -0
- package/dist/server/auth/application/dto/social-login.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/social-login.dto.js +54 -0
- package/dist/server/auth/application/dto/social-login.dto.js.map +1 -0
- package/dist/server/auth/application/dto/token-response.d.ts +9 -0
- package/dist/server/auth/application/dto/token-response.d.ts.map +1 -0
- package/dist/server/auth/application/dto/token-response.js +15 -0
- package/dist/server/auth/application/dto/token-response.js.map +1 -0
- package/dist/server/auth/application/dto/update-profile.dto.d.ts +7 -0
- package/dist/server/auth/application/dto/update-profile.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/update-profile.dto.js +41 -0
- package/dist/server/auth/application/dto/update-profile.dto.js.map +1 -0
- package/dist/server/auth/application/dto/user-response.d.ts +14 -0
- package/dist/server/auth/application/dto/user-response.d.ts.map +1 -0
- package/dist/server/auth/application/dto/user-response.js +20 -0
- package/dist/server/auth/application/dto/user-response.js.map +1 -0
- package/dist/server/auth/application/dto/verify-2fa.dto.d.ts +4 -0
- package/dist/server/auth/application/dto/verify-2fa.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/verify-2fa.dto.js +24 -0
- package/dist/server/auth/application/dto/verify-2fa.dto.js.map +1 -0
- package/dist/server/auth/application/dto/verify-email.dto.d.ts +4 -0
- package/dist/server/auth/application/dto/verify-email.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/verify-email.dto.js +23 -0
- package/dist/server/auth/application/dto/verify-email.dto.js.map +1 -0
- package/dist/server/auth/application/dtos/create-role.dto.d.ts +6 -0
- package/dist/server/auth/application/dtos/create-role.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dtos/create-role.dto.js +35 -0
- package/dist/server/auth/application/dtos/create-role.dto.js.map +1 -0
- package/dist/server/auth/application/dtos/index.d.ts +4 -0
- package/dist/server/auth/application/dtos/index.d.ts.map +1 -0
- package/dist/server/auth/application/dtos/index.js +20 -0
- package/dist/server/auth/application/dtos/index.js.map +1 -0
- package/dist/server/auth/application/dtos/query-role.dto.d.ts +6 -0
- package/dist/server/auth/application/dtos/query-role.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dtos/query-role.dto.js +35 -0
- package/dist/server/auth/application/dtos/query-role.dto.js.map +1 -0
- package/dist/server/auth/application/dtos/update-role.dto.d.ts +6 -0
- package/dist/server/auth/application/dtos/update-role.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dtos/update-role.dto.js +36 -0
- package/dist/server/auth/application/dtos/update-role.dto.js.map +1 -0
- package/dist/server/auth/application/index.d.ts +4 -0
- package/dist/server/auth/application/index.d.ts.map +1 -0
- package/dist/server/auth/application/index.js +20 -0
- package/dist/server/auth/application/index.js.map +1 -0
- package/dist/server/auth/application/ports/email.service.d.ts +12 -0
- package/dist/server/auth/application/ports/email.service.d.ts.map +1 -0
- package/dist/server/auth/application/ports/email.service.js +5 -0
- package/dist/server/auth/application/ports/email.service.js.map +1 -0
- package/dist/server/auth/application/ports/hash.service.d.ts +7 -0
- package/dist/server/auth/application/ports/hash.service.d.ts.map +1 -0
- package/dist/server/auth/application/ports/hash.service.js +5 -0
- package/dist/server/auth/application/ports/hash.service.js.map +1 -0
- package/dist/server/auth/application/ports/index.d.ts +5 -0
- package/dist/server/auth/application/ports/index.d.ts.map +1 -0
- package/dist/server/auth/application/ports/index.js +21 -0
- package/dist/server/auth/application/ports/index.js.map +1 -0
- package/dist/server/auth/application/ports/social-auth.service.d.ts +13 -0
- package/dist/server/auth/application/ports/social-auth.service.d.ts.map +1 -0
- package/dist/server/auth/application/ports/social-auth.service.js +7 -0
- package/dist/server/auth/application/ports/social-auth.service.js.map +1 -0
- package/dist/server/auth/application/ports/token.service.d.ts +36 -0
- package/dist/server/auth/application/ports/token.service.d.ts.map +1 -0
- package/dist/server/auth/application/ports/token.service.js +5 -0
- package/dist/server/auth/application/ports/token.service.js.map +1 -0
- package/dist/server/auth/application/services/auth-user.service.d.ts +29 -0
- package/dist/server/auth/application/services/auth-user.service.d.ts.map +1 -0
- package/dist/server/auth/application/services/auth-user.service.js +165 -0
- package/dist/server/auth/application/services/auth-user.service.js.map +1 -0
- package/dist/server/auth/application/services/permission.service.d.ts +13 -0
- package/dist/server/auth/application/services/permission.service.d.ts.map +1 -0
- package/dist/server/auth/application/services/permission.service.js +56 -0
- package/dist/server/auth/application/services/permission.service.js.map +1 -0
- package/dist/server/auth/application/services/role.service.d.ts +61 -0
- package/dist/server/auth/application/services/role.service.d.ts.map +1 -0
- package/dist/server/auth/application/services/role.service.js +178 -0
- package/dist/server/auth/application/services/role.service.js.map +1 -0
- package/dist/server/auth/domain/constants/auth-events.const.d.ts +17 -0
- package/dist/server/auth/domain/constants/auth-events.const.d.ts.map +1 -0
- package/dist/server/auth/domain/constants/auth-events.const.js +19 -0
- package/dist/server/auth/domain/constants/auth-events.const.js.map +1 -0
- package/dist/server/auth/domain/constants/index.d.ts +3 -0
- package/dist/server/auth/domain/constants/index.d.ts.map +1 -0
- package/dist/server/auth/domain/constants/index.js +19 -0
- package/dist/server/auth/domain/constants/index.js.map +1 -0
- package/dist/server/auth/domain/constants/oauth.config.d.ts +50 -0
- package/dist/server/auth/domain/constants/oauth.config.d.ts.map +1 -0
- package/dist/server/auth/domain/constants/oauth.config.js +53 -0
- package/dist/server/auth/domain/constants/oauth.config.js.map +1 -0
- package/dist/server/auth/domain/constants/scopes.d.ts +26 -0
- package/dist/server/auth/domain/constants/scopes.d.ts.map +1 -0
- package/dist/server/auth/domain/constants/scopes.js +52 -0
- package/dist/server/auth/domain/constants/scopes.js.map +1 -0
- package/dist/server/auth/domain/entities/auth-user.d.ts +52 -0
- package/dist/server/auth/domain/entities/auth-user.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/auth-user.js +134 -0
- package/dist/server/auth/domain/entities/auth-user.js.map +1 -0
- package/dist/server/auth/domain/entities/email-verification-token.d.ts +13 -0
- package/dist/server/auth/domain/entities/email-verification-token.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/email-verification-token.js +27 -0
- package/dist/server/auth/domain/entities/email-verification-token.js.map +1 -0
- package/dist/server/auth/domain/entities/index.d.ts +17 -0
- package/dist/server/auth/domain/entities/index.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/index.js +33 -0
- package/dist/server/auth/domain/entities/index.js.map +1 -0
- package/dist/server/auth/domain/entities/login-history.d.ts +18 -0
- package/dist/server/auth/domain/entities/login-history.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/login-history.js +30 -0
- package/dist/server/auth/domain/entities/login-history.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-audit-log.d.ts +15 -0
- package/dist/server/auth/domain/entities/oauth-audit-log.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-audit-log.js +34 -0
- package/dist/server/auth/domain/entities/oauth-audit-log.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-authorization-code.d.ts +19 -0
- package/dist/server/auth/domain/entities/oauth-authorization-code.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-authorization-code.js +37 -0
- package/dist/server/auth/domain/entities/oauth-authorization-code.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-client-consent.d.ts +14 -0
- package/dist/server/auth/domain/entities/oauth-client-consent.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-client-consent.js +30 -0
- package/dist/server/auth/domain/entities/oauth-client-consent.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-client.d.ts +31 -0
- package/dist/server/auth/domain/entities/oauth-client.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-client.js +51 -0
- package/dist/server/auth/domain/entities/oauth-client.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-scope.d.ts +10 -0
- package/dist/server/auth/domain/entities/oauth-scope.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-scope.js +18 -0
- package/dist/server/auth/domain/entities/oauth-scope.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-token.d.ts +20 -0
- package/dist/server/auth/domain/entities/oauth-token.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-token.js +38 -0
- package/dist/server/auth/domain/entities/oauth-token.js.map +1 -0
- package/dist/server/auth/domain/entities/permission.d.ts +14 -0
- package/dist/server/auth/domain/entities/permission.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/permission.js +26 -0
- package/dist/server/auth/domain/entities/permission.js.map +1 -0
- package/dist/server/auth/domain/entities/role-permission.d.ts +8 -0
- package/dist/server/auth/domain/entities/role-permission.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/role-permission.js +14 -0
- package/dist/server/auth/domain/entities/role-permission.js.map +1 -0
- package/dist/server/auth/domain/entities/role.d.ts +13 -0
- package/dist/server/auth/domain/entities/role.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/role.js +26 -0
- package/dist/server/auth/domain/entities/role.js.map +1 -0
- package/dist/server/auth/domain/entities/social-account.d.ts +20 -0
- package/dist/server/auth/domain/entities/social-account.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/social-account.js +37 -0
- package/dist/server/auth/domain/entities/social-account.js.map +1 -0
- package/dist/server/auth/domain/entities/user-role.d.ts +8 -0
- package/dist/server/auth/domain/entities/user-role.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/user-role.js +14 -0
- package/dist/server/auth/domain/entities/user-role.js.map +1 -0
- package/dist/server/auth/domain/entities/user-session.d.ts +25 -0
- package/dist/server/auth/domain/entities/user-session.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/user-session.js +50 -0
- package/dist/server/auth/domain/entities/user-session.js.map +1 -0
- package/dist/server/auth/domain/entities/user-two-factor.d.ts +25 -0
- package/dist/server/auth/domain/entities/user-two-factor.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/user-two-factor.js +66 -0
- package/dist/server/auth/domain/entities/user-two-factor.js.map +1 -0
- package/dist/server/auth/domain/enums/index.d.ts +2 -0
- package/dist/server/auth/domain/enums/index.d.ts.map +1 -0
- package/dist/server/auth/domain/enums/index.js +18 -0
- package/dist/server/auth/domain/enums/index.js.map +1 -0
- package/dist/server/auth/domain/enums/oauth.enums.d.ts +69 -0
- package/dist/server/auth/domain/enums/oauth.enums.d.ts.map +1 -0
- package/dist/server/auth/domain/enums/oauth.enums.js +130 -0
- package/dist/server/auth/domain/enums/oauth.enums.js.map +1 -0
- package/dist/server/auth/domain/events/auth-user.events.d.ts +37 -0
- package/dist/server/auth/domain/events/auth-user.events.d.ts.map +1 -0
- package/dist/server/auth/domain/events/auth-user.events.js +70 -0
- package/dist/server/auth/domain/events/auth-user.events.js.map +1 -0
- package/dist/server/auth/domain/index.d.ts +3 -0
- package/dist/server/auth/domain/index.d.ts.map +1 -0
- package/dist/server/auth/domain/index.js +19 -0
- package/dist/server/auth/domain/index.js.map +1 -0
- package/dist/server/auth/domain/interfaces/auth.interface.d.ts +41 -0
- package/dist/server/auth/domain/interfaces/auth.interface.d.ts.map +1 -0
- package/dist/server/auth/domain/interfaces/auth.interface.js +3 -0
- package/dist/server/auth/domain/interfaces/auth.interface.js.map +1 -0
- package/dist/server/auth/domain/interfaces/index.d.ts +2 -0
- package/dist/server/auth/domain/interfaces/index.d.ts.map +1 -0
- package/dist/server/auth/domain/interfaces/index.js +18 -0
- package/dist/server/auth/domain/interfaces/index.js.map +1 -0
- package/dist/server/auth/domain/repositories/auth-user.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/auth-user.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/auth-user.repository.js +5 -0
- package/dist/server/auth/domain/repositories/auth-user.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/email-verification-token.repository.d.ts +13 -0
- package/dist/server/auth/domain/repositories/email-verification-token.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/email-verification-token.repository.js +5 -0
- package/dist/server/auth/domain/repositories/email-verification-token.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/index.d.ts +17 -0
- package/dist/server/auth/domain/repositories/index.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/index.js +33 -0
- package/dist/server/auth/domain/repositories/index.js.map +1 -0
- package/dist/server/auth/domain/repositories/login-history.repository.d.ts +11 -0
- package/dist/server/auth/domain/repositories/login-history.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/login-history.repository.js +5 -0
- package/dist/server/auth/domain/repositories/login-history.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-audit-log.repository.d.ts +12 -0
- package/dist/server/auth/domain/repositories/oauth-audit-log.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-audit-log.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-audit-log.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.d.ts +12 -0
- package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-client-consent.repository.d.ts +12 -0
- package/dist/server/auth/domain/repositories/oauth-client-consent.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-client-consent.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-client-consent.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-client.repository.d.ts +12 -0
- package/dist/server/auth/domain/repositories/oauth-client.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-client.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-client.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-scope.repository.d.ts +13 -0
- package/dist/server/auth/domain/repositories/oauth-scope.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-scope.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-scope.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-token.repository.d.ts +15 -0
- package/dist/server/auth/domain/repositories/oauth-token.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-token.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-token.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/permission.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/permission.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/permission.repository.js +5 -0
- package/dist/server/auth/domain/repositories/permission.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/role-permission.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/role-permission.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/role-permission.repository.js +5 -0
- package/dist/server/auth/domain/repositories/role-permission.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/role.repository.d.ts +13 -0
- package/dist/server/auth/domain/repositories/role.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/role.repository.js +5 -0
- package/dist/server/auth/domain/repositories/role.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/social-account.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/social-account.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/social-account.repository.js +5 -0
- package/dist/server/auth/domain/repositories/social-account.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/user-role.repository.d.ts +13 -0
- package/dist/server/auth/domain/repositories/user-role.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/user-role.repository.js +5 -0
- package/dist/server/auth/domain/repositories/user-role.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/user-session.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/user-session.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/user-session.repository.js +5 -0
- package/dist/server/auth/domain/repositories/user-session.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/user-two-factor.repository.d.ts +11 -0
- package/dist/server/auth/domain/repositories/user-two-factor.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/user-two-factor.repository.js +5 -0
- package/dist/server/auth/domain/repositories/user-two-factor.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.d.ts +6 -0
- package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.js +1386 -0
- package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.d.ts +13 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.js +75 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.d.ts +15 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.js +83 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.d.ts +9 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.js +137 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.d.ts +13 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.js +226 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.d.ts +13 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.js +161 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/index.d.ts +17 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/index.js +63 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/index.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.d.ts +3 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.js +58 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.js.map +1 -0
- package/dist/server/auth/infrastructure/index.d.ts +5 -0
- package/dist/server/auth/infrastructure/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/index.js +21 -0
- package/dist/server/auth/infrastructure/index.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.d.ts +23 -0
- package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.js +120 -0
- package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.d.ts +9 -0
- package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.js +50 -0
- package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/index.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/entities/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/index.js +33 -0
- package/dist/server/auth/infrastructure/persistence/entities/index.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.d.ts +14 -0
- package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.js +71 -0
- package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.d.ts +12 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.js +65 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.d.ts +14 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.js +75 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.d.ts +11 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.js +60 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.d.ts +23 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.js +120 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.js +45 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.d.ts +14 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.js +75 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/permission.entity.d.ts +9 -0
- package/dist/server/auth/infrastructure/persistence/entities/permission.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/permission.entity.js +50 -0
- package/dist/server/auth/infrastructure/persistence/entities/permission.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.d.ts +7 -0
- package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.js +40 -0
- package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/role.entity.d.ts +9 -0
- package/dist/server/auth/infrastructure/persistence/entities/role.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/role.entity.js +50 -0
- package/dist/server/auth/infrastructure/persistence/entities/role.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.js +86 -0
- package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.d.ts +7 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.js +40 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.js +95 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.d.ts +15 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.js +76 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.d.ts +9 -0
- package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.js +75 -0
- package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.js +46 -0
- package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/index.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/mappers/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/index.js +33 -0
- package/dist/server/auth/infrastructure/persistence/mappers/index.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.js +54 -0
- package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.js +52 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.js +56 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.js +46 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.js +74 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.js +44 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.js +56 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.js +46 -0
- package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.js +42 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.js +46 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.js +58 -0
- package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.js +42 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.js +62 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.js +56 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.js +74 -0
- package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.d.ts +19 -0
- package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.js +67 -0
- package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/index.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/repositories/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/index.js +33 -0
- package/dist/server/auth/infrastructure/persistence/repositories/index.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.js +70 -0
- package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.js +77 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.js +64 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.js +66 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.js +65 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.d.ts +19 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.js +69 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.d.ts +22 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.js +93 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.js +75 -0
- package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.js +79 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role.repository.d.ts +19 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role.repository.js +69 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.js +72 -0
- package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.d.ts +19 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.js +66 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.js +85 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.js +60 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.d.ts +17 -0
- package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.js +105 -0
- package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.js.map +1 -0
- package/dist/server/auth/infrastructure/schedulers/index.d.ts +2 -0
- package/dist/server/auth/infrastructure/schedulers/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/schedulers/index.js +18 -0
- package/dist/server/auth/infrastructure/schedulers/index.js.map +1 -0
- package/dist/server/auth/infrastructure/services/authorization-code.service.d.ts +22 -0
- package/dist/server/auth/infrastructure/services/authorization-code.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/authorization-code.service.js +176 -0
- package/dist/server/auth/infrastructure/services/authorization-code.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/bcrypt-hash.service.d.ts +8 -0
- package/dist/server/auth/infrastructure/services/bcrypt-hash.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/bcrypt-hash.service.js +61 -0
- package/dist/server/auth/infrastructure/services/bcrypt-hash.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/consent.service.d.ts +19 -0
- package/dist/server/auth/infrastructure/services/consent.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/consent.service.js +121 -0
- package/dist/server/auth/infrastructure/services/consent.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/email-verification.service.d.ts +11 -0
- package/dist/server/auth/infrastructure/services/email-verification.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/email-verification.service.js +52 -0
- package/dist/server/auth/infrastructure/services/email-verification.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/google-auth.service.d.ts +11 -0
- package/dist/server/auth/infrastructure/services/google-auth.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/google-auth.service.js +68 -0
- package/dist/server/auth/infrastructure/services/google-auth.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/index.d.ts +11 -0
- package/dist/server/auth/infrastructure/services/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/index.js +27 -0
- package/dist/server/auth/infrastructure/services/index.js.map +1 -0
- package/dist/server/auth/infrastructure/services/jwt-token.service.d.ts +41 -0
- package/dist/server/auth/infrastructure/services/jwt-token.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/jwt-token.service.js +112 -0
- package/dist/server/auth/infrastructure/services/jwt-token.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/nodemailer-email.service.d.ts +17 -0
- package/dist/server/auth/infrastructure/services/nodemailer-email.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/nodemailer-email.service.js +125 -0
- package/dist/server/auth/infrastructure/services/nodemailer-email.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/oauth-token.service.d.ts +27 -0
- package/dist/server/auth/infrastructure/services/oauth-token.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/oauth-token.service.js +215 -0
- package/dist/server/auth/infrastructure/services/oauth-token.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/root-account.service.d.ts +19 -0
- package/dist/server/auth/infrastructure/services/root-account.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/root-account.service.js +91 -0
- package/dist/server/auth/infrastructure/services/root-account.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/session.service.d.ts +11 -0
- package/dist/server/auth/infrastructure/services/session.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/session.service.js +49 -0
- package/dist/server/auth/infrastructure/services/session.service.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/facebook.strategy.d.ts +16 -0
- package/dist/server/auth/infrastructure/strategies/facebook.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/facebook.strategy.js +100 -0
- package/dist/server/auth/infrastructure/strategies/facebook.strategy.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/github.strategy.d.ts +16 -0
- package/dist/server/auth/infrastructure/strategies/github.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/github.strategy.js +99 -0
- package/dist/server/auth/infrastructure/strategies/github.strategy.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/google.strategy.d.ts +16 -0
- package/dist/server/auth/infrastructure/strategies/google.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/google.strategy.js +99 -0
- package/dist/server/auth/infrastructure/strategies/google.strategy.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/index.d.ts +2 -0
- package/dist/server/auth/infrastructure/strategies/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/index.js +18 -0
- package/dist/server/auth/infrastructure/strategies/index.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/jwt.strategy.d.ts +20 -0
- package/dist/server/auth/infrastructure/strategies/jwt.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/jwt.strategy.js +68 -0
- package/dist/server/auth/infrastructure/strategies/jwt.strategy.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/local.strategy.d.ts +13 -0
- package/dist/server/auth/infrastructure/strategies/local.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/local.strategy.js +83 -0
- package/dist/server/auth/infrastructure/strategies/local.strategy.js.map +1 -0
- package/dist/server/auth/oauth.module.d.ts +3 -0
- package/dist/server/auth/oauth.module.d.ts.map +1 -0
- package/dist/server/auth/oauth.module.js +235 -0
- package/dist/server/auth/oauth.module.js.map +1 -0
- package/dist/server/auth/presentation/controllers/auth.controller.d.ts +72 -0
- package/dist/server/auth/presentation/controllers/auth.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/auth.controller.js +280 -0
- package/dist/server/auth/presentation/controllers/auth.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/email.controller.d.ts +17 -0
- package/dist/server/auth/presentation/controllers/email.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/email.controller.js +75 -0
- package/dist/server/auth/presentation/controllers/email.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/index.d.ts +9 -0
- package/dist/server/auth/presentation/controllers/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/index.js +25 -0
- package/dist/server/auth/presentation/controllers/index.js.map +1 -0
- package/dist/server/auth/presentation/controllers/password.controller.d.ts +19 -0
- package/dist/server/auth/presentation/controllers/password.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/password.controller.js +75 -0
- package/dist/server/auth/presentation/controllers/password.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/permission.controller.d.ts +11 -0
- package/dist/server/auth/presentation/controllers/permission.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/permission.controller.js +43 -0
- package/dist/server/auth/presentation/controllers/permission.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/role.controller.d.ts +32 -0
- package/dist/server/auth/presentation/controllers/role.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/role.controller.js +97 -0
- package/dist/server/auth/presentation/controllers/role.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/session.controller.d.ts +23 -0
- package/dist/server/auth/presentation/controllers/session.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/session.controller.js +92 -0
- package/dist/server/auth/presentation/controllers/session.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/social-auth.controller.d.ts +12 -0
- package/dist/server/auth/presentation/controllers/social-auth.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/social-auth.controller.js +58 -0
- package/dist/server/auth/presentation/controllers/social-auth.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/two-factor.controller.d.ts +23 -0
- package/dist/server/auth/presentation/controllers/two-factor.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/two-factor.controller.js +94 -0
- package/dist/server/auth/presentation/controllers/two-factor.controller.js.map +1 -0
- package/dist/server/auth/presentation/decorators/auth.decorator.d.ts +7 -0
- package/dist/server/auth/presentation/decorators/auth.decorator.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/auth.decorator.js +14 -0
- package/dist/server/auth/presentation/decorators/auth.decorator.js.map +1 -0
- package/dist/server/auth/presentation/decorators/current-session-id.decorator.d.ts +2 -0
- package/dist/server/auth/presentation/decorators/current-session-id.decorator.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/current-session-id.decorator.js +9 -0
- package/dist/server/auth/presentation/decorators/current-session-id.decorator.js.map +1 -0
- package/dist/server/auth/presentation/decorators/index.d.ts +4 -0
- package/dist/server/auth/presentation/decorators/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/index.js +20 -0
- package/dist/server/auth/presentation/decorators/index.js.map +1 -0
- package/dist/server/auth/presentation/decorators/require-permissions.decorator.d.ts +3 -0
- package/dist/server/auth/presentation/decorators/require-permissions.decorator.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/require-permissions.decorator.js +8 -0
- package/dist/server/auth/presentation/decorators/require-permissions.decorator.js.map +1 -0
- package/dist/server/auth/presentation/decorators/user.decorator.d.ts +7 -0
- package/dist/server/auth/presentation/decorators/user.decorator.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/user.decorator.js +29 -0
- package/dist/server/auth/presentation/decorators/user.decorator.js.map +1 -0
- package/dist/server/auth/presentation/filters/global-exception.filter.d.ts +5 -0
- package/dist/server/auth/presentation/filters/global-exception.filter.d.ts.map +1 -0
- package/dist/server/auth/presentation/filters/global-exception.filter.js +44 -0
- package/dist/server/auth/presentation/filters/global-exception.filter.js.map +1 -0
- package/dist/server/auth/presentation/filters/index.d.ts +2 -0
- package/dist/server/auth/presentation/filters/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/filters/index.js +18 -0
- package/dist/server/auth/presentation/filters/index.js.map +1 -0
- package/dist/server/auth/presentation/guards/index.d.ts +3 -0
- package/dist/server/auth/presentation/guards/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/guards/index.js +19 -0
- package/dist/server/auth/presentation/guards/index.js.map +1 -0
- package/dist/server/auth/presentation/guards/jwt-auth.guard.d.ts +11 -0
- package/dist/server/auth/presentation/guards/jwt-auth.guard.d.ts.map +1 -0
- package/dist/server/auth/presentation/guards/jwt-auth.guard.js +45 -0
- package/dist/server/auth/presentation/guards/jwt-auth.guard.js.map +1 -0
- package/dist/server/auth/presentation/guards/permission.guard.d.ts +17 -0
- package/dist/server/auth/presentation/guards/permission.guard.d.ts.map +1 -0
- package/dist/server/auth/presentation/guards/permission.guard.js +87 -0
- package/dist/server/auth/presentation/guards/permission.guard.js.map +1 -0
- package/dist/server/auth/presentation/index.d.ts +4 -0
- package/dist/server/auth/presentation/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/index.js +20 -0
- package/dist/server/auth/presentation/index.js.map +1 -0
- package/dist/server/auth/presentation/responses/oauth.response.d.ts +26 -0
- package/dist/server/auth/presentation/responses/oauth.response.d.ts.map +1 -0
- package/dist/server/auth/presentation/responses/oauth.response.js +33 -0
- package/dist/server/auth/presentation/responses/oauth.response.js.map +1 -0
- package/dist/server/auth/presentation/validators/index.d.ts +2 -0
- package/dist/server/auth/presentation/validators/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/validators/index.js +18 -0
- package/dist/server/auth/presentation/validators/index.js.map +1 -0
- package/dist/server/auth/presentation/validators/is-username-unique.validator.d.ts +10 -0
- package/dist/server/auth/presentation/validators/is-username-unique.validator.d.ts.map +1 -0
- package/dist/server/auth/presentation/validators/is-username-unique.validator.js +54 -0
- package/dist/server/auth/presentation/validators/is-username-unique.validator.js.map +1 -0
- package/dist/server/auth/presentation/validators/password.validator.d.ts +4 -0
- package/dist/server/auth/presentation/validators/password.validator.d.ts.map +1 -0
- package/dist/server/auth/presentation/validators/password.validator.js +56 -0
- package/dist/server/auth/presentation/validators/password.validator.js.map +1 -0
- package/dist/server/common/events/mail/index.d.ts +7 -0
- package/dist/server/common/events/mail/index.d.ts.map +1 -0
- package/dist/server/common/events/mail/index.js +16 -0
- package/dist/server/common/events/mail/index.js.map +1 -0
- package/dist/server/common/events/mail/mail-events.constants.d.ts +9 -0
- package/dist/server/common/events/mail/mail-events.constants.d.ts.map +1 -0
- package/dist/server/common/events/mail/mail-events.constants.js +11 -0
- package/dist/server/common/events/mail/mail-events.constants.js.map +1 -0
- package/dist/server/common/events/mail/send-password-changed.event.d.ts +7 -0
- package/dist/server/common/events/mail/send-password-changed.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-password-changed.event.js +15 -0
- package/dist/server/common/events/mail/send-password-changed.event.js.map +1 -0
- package/dist/server/common/events/mail/send-password-reset.event.d.ts +7 -0
- package/dist/server/common/events/mail/send-password-reset.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-password-reset.event.js +15 -0
- package/dist/server/common/events/mail/send-password-reset.event.js.map +1 -0
- package/dist/server/common/events/mail/send-user-welcome.event.d.ts +7 -0
- package/dist/server/common/events/mail/send-user-welcome.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-user-welcome.event.js +15 -0
- package/dist/server/common/events/mail/send-user-welcome.event.js.map +1 -0
- package/dist/server/common/events/mail/send-verification-email.event.d.ts +7 -0
- package/dist/server/common/events/mail/send-verification-email.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-verification-email.event.js +15 -0
- package/dist/server/common/events/mail/send-verification-email.event.js.map +1 -0
- package/dist/server/common/events/mail/send-welcome-email.event.d.ts +6 -0
- package/dist/server/common/events/mail/send-welcome-email.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-welcome-email.event.js +13 -0
- package/dist/server/common/events/mail/send-welcome-email.event.js.map +1 -0
- package/dist/server/index.d.ts +40 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +139 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/lib/responder.d.ts +33 -0
- package/dist/server/lib/responder.d.ts.map +1 -0
- package/dist/server/lib/responder.js +75 -0
- package/dist/server/lib/responder.js.map +1 -0
- package/dist/server/shared/index.d.ts +3 -0
- package/dist/server/shared/index.d.ts.map +1 -0
- package/dist/server/shared/index.js +12 -0
- package/dist/server/shared/index.js.map +1 -0
- package/dist/server/shared/permissions.d.ts +78 -0
- package/dist/server/shared/permissions.d.ts.map +1 -0
- package/dist/server/shared/permissions.js +74 -0
- package/dist/server/shared/permissions.js.map +1 -0
- package/dist/server/shared/roles.d.ts +30 -0
- package/dist/server/shared/roles.d.ts.map +1 -0
- package/dist/server/shared/roles.js +31 -0
- package/dist/server/shared/roles.js.map +1 -0
- package/dist/server/user/application/dto/admin-user.dto.d.ts +51 -0
- package/dist/server/user/application/dto/admin-user.dto.d.ts.map +1 -0
- package/dist/server/user/application/dto/admin-user.dto.js +225 -0
- package/dist/server/user/application/dto/admin-user.dto.js.map +1 -0
- package/dist/server/user/application/dto/user-preferences.dto.d.ts +36 -0
- package/dist/server/user/application/dto/user-preferences.dto.d.ts.map +1 -0
- package/dist/server/user/application/dto/user-preferences.dto.js +76 -0
- package/dist/server/user/application/dto/user-preferences.dto.js.map +1 -0
- package/dist/server/user/application/listeners/auth-user-event.listener.d.ts +11 -0
- package/dist/server/user/application/listeners/auth-user-event.listener.d.ts.map +1 -0
- package/dist/server/user/application/listeners/auth-user-event.listener.js +114 -0
- package/dist/server/user/application/listeners/auth-user-event.listener.js.map +1 -0
- package/dist/server/user/application/repositories/user-setting.repository.d.ts +13 -0
- package/dist/server/user/application/repositories/user-setting.repository.d.ts.map +1 -0
- package/dist/server/user/application/repositories/user-setting.repository.js +84 -0
- package/dist/server/user/application/repositories/user-setting.repository.js.map +1 -0
- package/dist/server/user/application/services/user-preferences.service.d.ts +12 -0
- package/dist/server/user/application/services/user-preferences.service.d.ts.map +1 -0
- package/dist/server/user/application/services/user-preferences.service.js +65 -0
- package/dist/server/user/application/services/user-preferences.service.js.map +1 -0
- package/dist/server/user/application/services/user.service.d.ts +56 -0
- package/dist/server/user/application/services/user.service.d.ts.map +1 -0
- package/dist/server/user/application/services/user.service.js +213 -0
- package/dist/server/user/application/services/user.service.js.map +1 -0
- package/dist/server/user/domain/constants/user-events.const.d.ts +9 -0
- package/dist/server/user/domain/constants/user-events.const.d.ts.map +1 -0
- package/dist/server/user/domain/constants/user-events.const.js +11 -0
- package/dist/server/user/domain/constants/user-events.const.js.map +1 -0
- package/dist/server/user/domain/entities/user.entity.d.ts +37 -0
- package/dist/server/user/domain/entities/user.entity.d.ts.map +1 -0
- package/dist/server/user/domain/entities/user.entity.js +71 -0
- package/dist/server/user/domain/entities/user.entity.js.map +1 -0
- package/dist/server/user/domain/repositories/user.repository.d.ts +26 -0
- package/dist/server/user/domain/repositories/user.repository.d.ts.map +1 -0
- package/dist/server/user/domain/repositories/user.repository.js +3 -0
- package/dist/server/user/domain/repositories/user.repository.js.map +1 -0
- package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.d.ts +29 -0
- package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.d.ts.map +1 -0
- package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.js +82 -0
- package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.js.map +1 -0
- package/dist/server/user/infrastructure/persistence/entities/user.entity.d.ts +19 -0
- package/dist/server/user/infrastructure/persistence/entities/user.entity.d.ts.map +1 -0
- package/dist/server/user/infrastructure/persistence/entities/user.entity.js +100 -0
- package/dist/server/user/infrastructure/persistence/entities/user.entity.js.map +1 -0
- package/dist/server/user/infrastructure/persistence/mappers/user.mapper.d.ts +8 -0
- package/dist/server/user/infrastructure/persistence/mappers/user.mapper.d.ts.map +1 -0
- package/dist/server/user/infrastructure/persistence/mappers/user.mapper.js +59 -0
- package/dist/server/user/infrastructure/persistence/mappers/user.mapper.js.map +1 -0
- package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.d.ts +31 -0
- package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.d.ts.map +1 -0
- package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.js +123 -0
- package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.js.map +1 -0
- package/dist/server/user/presentation/controllers/admin-user.controller.d.ts +77 -0
- package/dist/server/user/presentation/controllers/admin-user.controller.d.ts.map +1 -0
- package/dist/server/user/presentation/controllers/admin-user.controller.js +358 -0
- package/dist/server/user/presentation/controllers/admin-user.controller.js.map +1 -0
- package/dist/server/user/user.module.d.ts +3 -0
- package/dist/server/user/user.module.d.ts.map +1 -0
- package/dist/server/user/user.module.js +46 -0
- package/dist/server/user/user.module.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-role.dto.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dtos/query-role.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,YAAY;IAGvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.QueryRoleDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class QueryRoleDto {
|
|
15
|
+
page;
|
|
16
|
+
limit;
|
|
17
|
+
search;
|
|
18
|
+
}
|
|
19
|
+
exports.QueryRoleDto = QueryRoleDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
(0, class_validator_1.IsNumberString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], QueryRoleDto.prototype, "page", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_validator_1.IsNumberString)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], QueryRoleDto.prototype, "limit", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], QueryRoleDto.prototype, "search", void 0);
|
|
35
|
+
//# sourceMappingURL=query-role.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-role.dto.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dtos/query-role.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,MAAa,YAAY;IAGvB,IAAI,CAAU;IAId,KAAK,CAAU;IAIf,MAAM,CAAU;CACjB;AAZD,oCAYC;AATC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;;0CACH;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;;2CACF;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4CACK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-role.dto.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dtos/update-role.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa;IAGxB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateRoleDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class UpdateRoleDto {
|
|
15
|
+
name;
|
|
16
|
+
description;
|
|
17
|
+
permissionIds;
|
|
18
|
+
}
|
|
19
|
+
exports.UpdateRoleDto = UpdateRoleDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], UpdateRoleDto.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], UpdateRoleDto.prototype, "description", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsArray)(),
|
|
32
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
__metadata("design:type", Array)
|
|
35
|
+
], UpdateRoleDto.prototype, "permissionIds", void 0);
|
|
36
|
+
//# sourceMappingURL=update-role.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-role.dto.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dtos/update-role.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,MAAa,aAAa;IAGxB,IAAI,CAAU;IAId,WAAW,CAAU;IAKrB,aAAa,CAAY;CAC1B;AAbD,sCAaC;AAVC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACQ;AAKrB;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACrB,IAAA,4BAAU,GAAE;;oDACY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/application/index.ts"],"names":[],"mappings":"AACA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dto"), exports);
|
|
18
|
+
__exportStar(require("./ports"), exports);
|
|
19
|
+
__exportStar(require("./actions"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/server/auth/application/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,wCAAsB;AACtB,0CAAwB;AACxB,4CAA0B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const EMAIL_SERVICE_TOKEN: unique symbol;
|
|
2
|
+
export interface EmailService {
|
|
3
|
+
sendVerificationEmail(email: string, token: string, displayName?: string): Promise<void>;
|
|
4
|
+
sendPasswordResetEmail(email: string, token: string, displayName?: string): Promise<void>;
|
|
5
|
+
sendNewDeviceLoginEmail(email: string, deviceInfo: {
|
|
6
|
+
deviceName: string;
|
|
7
|
+
ipAddress: string;
|
|
8
|
+
location?: string;
|
|
9
|
+
}): Promise<void>;
|
|
10
|
+
send2FABackupCodesEmail(email: string, backupCodes: string[]): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=email.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.service.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/email.service.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,eAAyB,CAAC;AAM1D,MAAM,WAAW,YAAY;IAI3B,qBAAqB,CACnB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IAKjB,sBAAsB,CACpB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IAKjB,uBAAuB,CACrB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE;QACV,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GACA,OAAO,CAAC,IAAI,CAAC,CAAC;IAKjB,uBAAuB,CACrB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.service.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/email.service.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const HASH_SERVICE_TOKEN: unique symbol;
|
|
2
|
+
export interface HashService {
|
|
3
|
+
hash(password: string): Promise<string>;
|
|
4
|
+
compare(password: string, hash: string): Promise<boolean>;
|
|
5
|
+
isValidHash(hash: string): boolean;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=hash.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.service.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/hash.service.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,eAAwB,CAAC;AAMxD,MAAM,WAAW,WAAW;IAI1B,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAKxC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAK1D,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.service.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/hash.service.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./email.service"), exports);
|
|
18
|
+
__exportStar(require("./hash.service"), exports);
|
|
19
|
+
__exportStar(require("./token.service"), exports);
|
|
20
|
+
__exportStar(require("./social-auth.service"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,iDAA+B;AAC/B,kDAAgC;AAChC,wDAAsC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SocialProvider } from '../../domain/enums/oauth.enums';
|
|
2
|
+
export interface SocialUserInfo {
|
|
3
|
+
providerId: string;
|
|
4
|
+
email: string;
|
|
5
|
+
displayName?: string;
|
|
6
|
+
avatar?: string;
|
|
7
|
+
provider: SocialProvider;
|
|
8
|
+
}
|
|
9
|
+
export declare abstract class SocialAuthService {
|
|
10
|
+
abstract getUserInfo(accessToken: string): Promise<SocialUserInfo>;
|
|
11
|
+
abstract verifyToken(accessToken: string): Promise<boolean>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=social-auth.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social-auth.service.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/social-auth.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKhE,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAMD,8BAAsB,iBAAiB;IAIrC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAKlE,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAC5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social-auth.service.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/social-auth.service.ts"],"names":[],"mappings":";;;AAiBA,MAAsB,iBAAiB;CAUtC;AAVD,8CAUC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const TOKEN_SERVICE_TOKEN: unique symbol;
|
|
2
|
+
export interface TokenService {
|
|
3
|
+
generateAccessToken(payload: {
|
|
4
|
+
userId: number;
|
|
5
|
+
email: string;
|
|
6
|
+
roles?: string[];
|
|
7
|
+
permissions?: string[];
|
|
8
|
+
}): string;
|
|
9
|
+
generateRefreshToken(payload: {
|
|
10
|
+
userId: number;
|
|
11
|
+
sessionId: number;
|
|
12
|
+
}): string;
|
|
13
|
+
verifyAccessToken(token: string): {
|
|
14
|
+
userId: number;
|
|
15
|
+
email: string;
|
|
16
|
+
roles?: string[];
|
|
17
|
+
permissions?: string[];
|
|
18
|
+
};
|
|
19
|
+
verifyRefreshToken(token: string): {
|
|
20
|
+
userId: number;
|
|
21
|
+
sessionId: number;
|
|
22
|
+
};
|
|
23
|
+
generateEmailVerificationToken(userId: number): string;
|
|
24
|
+
verifyEmailVerificationToken(token: string): {
|
|
25
|
+
userId: number;
|
|
26
|
+
};
|
|
27
|
+
generatePasswordResetToken(userId: number): string;
|
|
28
|
+
verifyPasswordResetToken(token: string): {
|
|
29
|
+
userId: number;
|
|
30
|
+
};
|
|
31
|
+
generateClientAccessToken(payload: {
|
|
32
|
+
clientId: number;
|
|
33
|
+
scopes: string[];
|
|
34
|
+
}): string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=token.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.service.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/token.service.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,eAAyB,CAAC;AAM1D,MAAM,WAAW,YAAY;IAI3B,mBAAmB,CAAC,OAAO,EAAE;QAC3B,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,GAAG,MAAM,CAAC;IAKX,oBAAoB,CAAC,OAAO,EAAE;QAC5B,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,MAAM,CAAC;IAKX,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG;QAChC,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IAKF,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG;QACjC,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAKF,8BAA8B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAKvD,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAKhE,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAKnD,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAM5D,yBAAyB,CAAC,OAAO,EAAE;QACjC,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,GAAG,MAAM,CAAC;CACZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.service.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/ports/token.service.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
2
|
+
import { AuthUser } from '../../domain/entities/auth-user';
|
|
3
|
+
import { AuthUserRepository } from '../../domain/repositories/auth-user.repository';
|
|
4
|
+
import { AuthUserStatus } from '../../domain/enums/oauth.enums';
|
|
5
|
+
export declare class AuthUserService {
|
|
6
|
+
private readonly authUserRepository;
|
|
7
|
+
private readonly eventEmitter;
|
|
8
|
+
constructor(authUserRepository: AuthUserRepository, eventEmitter: EventEmitter2);
|
|
9
|
+
create(data: {
|
|
10
|
+
email: string;
|
|
11
|
+
password?: string;
|
|
12
|
+
displayName?: string;
|
|
13
|
+
username?: string;
|
|
14
|
+
avatar?: string;
|
|
15
|
+
}): Promise<AuthUser>;
|
|
16
|
+
update(id: number, data: {
|
|
17
|
+
email?: string;
|
|
18
|
+
displayName?: string;
|
|
19
|
+
username?: string;
|
|
20
|
+
avatar?: string;
|
|
21
|
+
}): Promise<AuthUser>;
|
|
22
|
+
delete(id: number): Promise<void>;
|
|
23
|
+
verifyEmail(id: number): Promise<AuthUser>;
|
|
24
|
+
changePassword(id: number, newPassword: string): Promise<AuthUser>;
|
|
25
|
+
changeStatus(id: number, newStatus: AuthUserStatus): Promise<AuthUser>;
|
|
26
|
+
findByEmail(email: string): Promise<AuthUser | null>;
|
|
27
|
+
findById(id: number): Promise<AuthUser | null>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=auth-user.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-user.service.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/services/auth-user.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAA8B,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAUhH,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAMhE,qBACa,eAAe;IAGxB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,aAAa;IAMxC,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAmDf,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GACA,OAAO,CAAC,QAAQ,CAAC;IA0Cd,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBjC,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAqB1C,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAsBlE,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAsBtE,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAOpD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;CAGrD"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
45
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.AuthUserService = void 0;
|
|
49
|
+
const common_1 = require("@nestjs/common");
|
|
50
|
+
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
51
|
+
const bcrypt = __importStar(require("bcrypt"));
|
|
52
|
+
const auth_user_repository_1 = require("../../domain/repositories/auth-user.repository");
|
|
53
|
+
const auth_events_const_1 = require("../../domain/constants/auth-events.const");
|
|
54
|
+
const auth_user_events_1 = require("../../domain/events/auth-user.events");
|
|
55
|
+
const oauth_enums_1 = require("../../domain/enums/oauth.enums");
|
|
56
|
+
let AuthUserService = class AuthUserService {
|
|
57
|
+
authUserRepository;
|
|
58
|
+
eventEmitter;
|
|
59
|
+
constructor(authUserRepository, eventEmitter) {
|
|
60
|
+
this.authUserRepository = authUserRepository;
|
|
61
|
+
this.eventEmitter = eventEmitter;
|
|
62
|
+
}
|
|
63
|
+
async create(data) {
|
|
64
|
+
const existingUser = await this.authUserRepository.findByEmail(data.email);
|
|
65
|
+
if (existingUser) {
|
|
66
|
+
throw new common_1.ConflictException('Email already exists');
|
|
67
|
+
}
|
|
68
|
+
if (data.username) {
|
|
69
|
+
const existingUsername = await this.authUserRepository.findByUsername(data.username);
|
|
70
|
+
if (existingUsername) {
|
|
71
|
+
throw new common_1.ConflictException('Username already exists');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
let passwordHash;
|
|
75
|
+
if (data.password) {
|
|
76
|
+
passwordHash = await bcrypt.hash(data.password, 10);
|
|
77
|
+
}
|
|
78
|
+
const authUser = await this.authUserRepository.create({
|
|
79
|
+
email: data.email,
|
|
80
|
+
username: data.username,
|
|
81
|
+
displayName: data.displayName,
|
|
82
|
+
avatar: data.avatar,
|
|
83
|
+
passwordHash,
|
|
84
|
+
status: oauth_enums_1.AuthUserStatus.ACTIVE,
|
|
85
|
+
failedLoginAttempts: 0,
|
|
86
|
+
twoFactorEnabled: false,
|
|
87
|
+
});
|
|
88
|
+
this.eventEmitter.emit(auth_events_const_1.AUTH_EVENTS.AUTH_USER_CREATED, new auth_user_events_1.AuthUserCreatedEvent(authUser.id, authUser.email, authUser.displayName, authUser.avatar, authUser.username));
|
|
89
|
+
return authUser;
|
|
90
|
+
}
|
|
91
|
+
async update(id, data) {
|
|
92
|
+
const authUser = await this.authUserRepository.findById(id);
|
|
93
|
+
if (!authUser) {
|
|
94
|
+
throw new common_1.NotFoundException('Auth user not found');
|
|
95
|
+
}
|
|
96
|
+
if (data.email && data.email !== authUser.email) {
|
|
97
|
+
const existingEmail = await this.authUserRepository.findByEmail(data.email);
|
|
98
|
+
if (existingEmail) {
|
|
99
|
+
throw new common_1.ConflictException('Email already exists');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (data.username && data.username !== authUser.username) {
|
|
103
|
+
const existingUsername = await this.authUserRepository.findByUsername(data.username);
|
|
104
|
+
if (existingUsername) {
|
|
105
|
+
throw new common_1.ConflictException('Username already exists');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const updated = await this.authUserRepository.update(id, data);
|
|
109
|
+
this.eventEmitter.emit(auth_events_const_1.AUTH_EVENTS.AUTH_USER_UPDATED, new auth_user_events_1.AuthUserUpdatedEvent(updated.id, updated.email, updated.displayName, updated.avatar, updated.username));
|
|
110
|
+
return updated;
|
|
111
|
+
}
|
|
112
|
+
async delete(id) {
|
|
113
|
+
const authUser = await this.authUserRepository.findById(id);
|
|
114
|
+
if (!authUser) {
|
|
115
|
+
throw new common_1.NotFoundException('Auth user not found');
|
|
116
|
+
}
|
|
117
|
+
await this.authUserRepository.delete(id);
|
|
118
|
+
this.eventEmitter.emit(auth_events_const_1.AUTH_EVENTS.AUTH_USER_DELETED, new auth_user_events_1.AuthUserDeletedEvent(id));
|
|
119
|
+
}
|
|
120
|
+
async verifyEmail(id) {
|
|
121
|
+
const authUser = await this.authUserRepository.findById(id);
|
|
122
|
+
if (!authUser) {
|
|
123
|
+
throw new common_1.NotFoundException('Auth user not found');
|
|
124
|
+
}
|
|
125
|
+
authUser.verifyEmail();
|
|
126
|
+
const updated = await this.authUserRepository.save(authUser);
|
|
127
|
+
this.eventEmitter.emit(auth_events_const_1.AUTH_EVENTS.AUTH_USER_EMAIL_VERIFIED, new auth_user_events_1.AuthUserEmailVerifiedEvent(updated.id, updated.email));
|
|
128
|
+
return updated;
|
|
129
|
+
}
|
|
130
|
+
async changePassword(id, newPassword) {
|
|
131
|
+
const authUser = await this.authUserRepository.findById(id);
|
|
132
|
+
if (!authUser) {
|
|
133
|
+
throw new common_1.NotFoundException('Auth user not found');
|
|
134
|
+
}
|
|
135
|
+
const passwordHash = await bcrypt.hash(newPassword, 10);
|
|
136
|
+
authUser.updatePassword(passwordHash);
|
|
137
|
+
const updated = await this.authUserRepository.save(authUser);
|
|
138
|
+
this.eventEmitter.emit(auth_events_const_1.AUTH_EVENTS.AUTH_USER_PASSWORD_CHANGED, new auth_user_events_1.AuthUserPasswordChangedEvent(updated.id, updated.email));
|
|
139
|
+
return updated;
|
|
140
|
+
}
|
|
141
|
+
async changeStatus(id, newStatus) {
|
|
142
|
+
const authUser = await this.authUserRepository.findById(id);
|
|
143
|
+
if (!authUser) {
|
|
144
|
+
throw new common_1.NotFoundException('Auth user not found');
|
|
145
|
+
}
|
|
146
|
+
const oldStatus = authUser.status;
|
|
147
|
+
authUser.status = newStatus;
|
|
148
|
+
const updated = await this.authUserRepository.save(authUser);
|
|
149
|
+
this.eventEmitter.emit(auth_events_const_1.AUTH_EVENTS.AUTH_USER_STATUS_CHANGED, new auth_user_events_1.AuthUserStatusChangedEvent(updated.id, oldStatus, newStatus));
|
|
150
|
+
return updated;
|
|
151
|
+
}
|
|
152
|
+
async findByEmail(email) {
|
|
153
|
+
return this.authUserRepository.findByEmail(email);
|
|
154
|
+
}
|
|
155
|
+
async findById(id) {
|
|
156
|
+
return this.authUserRepository.findById(id);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
exports.AuthUserService = AuthUserService;
|
|
160
|
+
exports.AuthUserService = AuthUserService = __decorate([
|
|
161
|
+
(0, common_1.Injectable)(),
|
|
162
|
+
__param(0, (0, common_1.Inject)(auth_user_repository_1.AUTH_USER_REPOSITORY_TOKEN)),
|
|
163
|
+
__metadata("design:paramtypes", [Object, event_emitter_1.EventEmitter2])
|
|
164
|
+
], AuthUserService);
|
|
165
|
+
//# sourceMappingURL=auth-user.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-user.service.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/services/auth-user.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA0F;AAC1F,yDAAsD;AACtD,+CAAiC;AAEjC,yFAAgH;AAChH,gFAAuE;AACvE,2EAO8C;AAC9C,gEAAgE;AAOzD,IAAM,eAAe,GAArB,MAAM,eAAe;IAGP;IACA;IAHnB,YAEmB,kBAAsC,EACtC,YAA2B;QAD3B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,iBAAY,GAAZ,YAAY,CAAe;IAC3C,CAAC;IAKJ,KAAK,CAAC,MAAM,CAAC,IAMZ;QAEC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3E,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,IAAI,0BAAiB,CAAC,sBAAsB,CAAC,CAAC;QACtD,CAAC;QAGD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACrF,IAAI,gBAAgB,EAAE,CAAC;gBACrB,MAAM,IAAI,0BAAiB,CAAC,yBAAyB,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QAGD,IAAI,YAAgC,CAAC;QACrC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,YAAY,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACtD,CAAC;QAGD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;YACpD,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,YAAY;YACZ,MAAM,EAAE,4BAAc,CAAC,MAAM;YAC7B,mBAAmB,EAAE,CAAC;YACtB,gBAAgB,EAAE,KAAK;SACxB,CAAC,CAAC;QAGH,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,+BAAW,CAAC,iBAAiB,EAC7B,IAAI,uCAAoB,CACtB,QAAQ,CAAC,EAAE,EACX,QAAQ,CAAC,KAAK,EACd,QAAQ,CAAC,WAAW,EACpB,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,QAAQ,CAClB,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAKD,KAAK,CAAC,MAAM,CACV,EAAU,EACV,IAKC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAAiB,CAAC,qBAAqB,CAAC,CAAC;QACrD,CAAC;QAGD,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,EAAE,CAAC;YAChD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5E,IAAI,aAAa,EAAE,CAAC;gBAClB,MAAM,IAAI,0BAAiB,CAAC,sBAAsB,CAAC,CAAC;YACtD,CAAC;QACH,CAAC;QAGD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACzD,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACrF,IAAI,gBAAgB,EAAE,CAAC;gBACrB,MAAM,IAAI,0BAAiB,CAAC,yBAAyB,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAG/D,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,+BAAW,CAAC,iBAAiB,EAC7B,IAAI,uCAAoB,CACtB,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,QAAQ,CACjB,CACF,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAKD,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAAiB,CAAC,qBAAqB,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAGzC,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,+BAAW,CAAC,iBAAiB,EAC7B,IAAI,uCAAoB,CAAC,EAAE,CAAC,CAC7B,CAAC;IACJ,CAAC;IAKD,KAAK,CAAC,WAAW,CAAC,EAAU;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAAiB,CAAC,qBAAqB,CAAC,CAAC;QACrD,CAAC;QAED,QAAQ,CAAC,WAAW,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAG7D,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,+BAAW,CAAC,wBAAwB,EACpC,IAAI,6CAA0B,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAC1D,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAKD,KAAK,CAAC,cAAc,CAAC,EAAU,EAAE,WAAmB;QAClD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAAiB,CAAC,qBAAqB,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACxD,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAG7D,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,+BAAW,CAAC,0BAA0B,EACtC,IAAI,+CAA4B,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAC5D,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAKD,KAAK,CAAC,YAAY,CAAC,EAAU,EAAE,SAAyB;QACtD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAAiB,CAAC,qBAAqB,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC;QAClC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;QAC5B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAG7D,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,+BAAW,CAAC,wBAAwB,EACpC,IAAI,6CAA0B,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CACjE,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAKD,KAAK,CAAC,WAAW,CAAC,KAAa;QAC7B,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;IAKD,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,OAAO,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF,CAAA;AAlNY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,iDAA0B,CAAC,CAAA;6CAEJ,6BAAa;GAJnC,eAAe,CAkN3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { PermissionEntity } from '../../infrastructure/persistence/entities/permission.entity';
|
|
3
|
+
export declare class PermissionService {
|
|
4
|
+
private permissionRepository;
|
|
5
|
+
constructor(permissionRepository: Repository<PermissionEntity>);
|
|
6
|
+
findAll(): Promise<{
|
|
7
|
+
items: PermissionEntity[];
|
|
8
|
+
grouped: Record<string, PermissionEntity[]>;
|
|
9
|
+
total: number;
|
|
10
|
+
}>;
|
|
11
|
+
findByIds(ids: number[]): Promise<PermissionEntity[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=permission.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.service.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/services/permission.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAE/F,qBACa,iBAAiB;IAG1B,OAAO,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAGtD,OAAO;;;;;IAyBP,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE;CAG9B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PermissionService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const permission_entity_1 = require("../../infrastructure/persistence/entities/permission.entity");
|
|
20
|
+
let PermissionService = class PermissionService {
|
|
21
|
+
permissionRepository;
|
|
22
|
+
constructor(permissionRepository) {
|
|
23
|
+
this.permissionRepository = permissionRepository;
|
|
24
|
+
}
|
|
25
|
+
async findAll() {
|
|
26
|
+
const permissions = await this.permissionRepository.find({
|
|
27
|
+
order: {
|
|
28
|
+
resource: 'ASC',
|
|
29
|
+
action: 'ASC',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const groupedPermissions = permissions.reduce((acc, permission) => {
|
|
33
|
+
const resource = permission.resource;
|
|
34
|
+
if (!acc[resource]) {
|
|
35
|
+
acc[resource] = [];
|
|
36
|
+
}
|
|
37
|
+
acc[resource].push(permission);
|
|
38
|
+
return acc;
|
|
39
|
+
}, {});
|
|
40
|
+
return {
|
|
41
|
+
items: permissions,
|
|
42
|
+
grouped: groupedPermissions,
|
|
43
|
+
total: permissions.length,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
async findByIds(ids) {
|
|
47
|
+
return this.permissionRepository.findByIds(ids);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.PermissionService = PermissionService;
|
|
51
|
+
exports.PermissionService = PermissionService = __decorate([
|
|
52
|
+
(0, common_1.Injectable)(),
|
|
53
|
+
__param(0, (0, typeorm_1.InjectRepository)(permission_entity_1.PermissionEntity)),
|
|
54
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
55
|
+
], PermissionService);
|
|
56
|
+
//# sourceMappingURL=permission.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.service.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/services/permission.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AACrC,mGAA+F;AAGxF,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAGlB;IAFV,YAEU,oBAAkD;QAAlD,yBAAoB,GAApB,oBAAoB,CAA8B;IACzD,CAAC;IAEJ,KAAK,CAAC,OAAO;QACX,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC;YACvD,KAAK,EAAE;gBACL,QAAQ,EAAE,KAAK;gBACf,MAAM,EAAE,KAAK;aACd;SACF,CAAC,CAAC;QAGH,MAAM,kBAAkB,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE;YAChE,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACnB,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;YACrB,CAAC;YACD,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC/B,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAwC,CAAC,CAAC;QAE7C,OAAO;YACL,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,kBAAkB;YAC3B,KAAK,EAAE,WAAW,CAAC,MAAM;SAC1B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,GAAa;QAC3B,OAAO,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AAlCY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,oCAAgB,CAAC,CAAA;qCACL,oBAAU;GAH/B,iBAAiB,CAkC7B"}
|