@udhuong/admin-core 0.1.1 → 0.1.3
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
- package/src/client/styles/globals.css +2 -1
|
@@ -0,0 +1,69 @@
|
|
|
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.OAuthScopeRepositoryImpl = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const oauth_scope_entity_1 = require("../entities/oauth-scope.entity");
|
|
20
|
+
const oauth_scope_mapper_1 = require("../mappers/oauth-scope.mapper");
|
|
21
|
+
let OAuthScopeRepositoryImpl = class OAuthScopeRepositoryImpl {
|
|
22
|
+
repository;
|
|
23
|
+
mapper;
|
|
24
|
+
constructor(repository, mapper) {
|
|
25
|
+
this.repository = repository;
|
|
26
|
+
this.mapper = mapper;
|
|
27
|
+
}
|
|
28
|
+
async findById(id) {
|
|
29
|
+
const entity = await this.repository.findOne({ where: { id } });
|
|
30
|
+
return this.mapper.toDomain(entity);
|
|
31
|
+
}
|
|
32
|
+
async findByName(name) {
|
|
33
|
+
const entity = await this.repository.findOne({ where: { name } });
|
|
34
|
+
return this.mapper.toDomain(entity);
|
|
35
|
+
}
|
|
36
|
+
async findAll() {
|
|
37
|
+
const entities = await this.repository.find();
|
|
38
|
+
return this.mapper.toDomainList(entities);
|
|
39
|
+
}
|
|
40
|
+
async findByNames(names) {
|
|
41
|
+
const entities = await this.repository.find({ where: { name: (0, typeorm_2.In)(names) } });
|
|
42
|
+
return this.mapper.toDomainList(entities);
|
|
43
|
+
}
|
|
44
|
+
async create(data) {
|
|
45
|
+
const entity = this.repository.create(data);
|
|
46
|
+
const saved = await this.repository.save(entity);
|
|
47
|
+
return this.mapper.toDomain(saved);
|
|
48
|
+
}
|
|
49
|
+
async update(id, data) {
|
|
50
|
+
await this.repository.update(id, data);
|
|
51
|
+
return this.findById(id);
|
|
52
|
+
}
|
|
53
|
+
async save(scope) {
|
|
54
|
+
const entity = this.mapper.toEntity(scope);
|
|
55
|
+
const saved = await this.repository.save(entity);
|
|
56
|
+
return this.mapper.toDomain(saved);
|
|
57
|
+
}
|
|
58
|
+
async delete(id) {
|
|
59
|
+
await this.repository.delete(id);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.OAuthScopeRepositoryImpl = OAuthScopeRepositoryImpl;
|
|
63
|
+
exports.OAuthScopeRepositoryImpl = OAuthScopeRepositoryImpl = __decorate([
|
|
64
|
+
(0, common_1.Injectable)(),
|
|
65
|
+
__param(0, (0, typeorm_1.InjectRepository)(oauth_scope_entity_1.OAuthScopeEntity)),
|
|
66
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
67
|
+
oauth_scope_mapper_1.OAuthScopeMapper])
|
|
68
|
+
], OAuthScopeRepositoryImpl);
|
|
69
|
+
//# sourceMappingURL=oauth-scope.repository.js.map
|
package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-scope.repository.js","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAyC;AAIzC,uEAAkE;AAClE,sEAAiE;AAG1D,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAGhB;IACA;IAHnB,YAEmB,UAAwC,EACxC,MAAwB;QADxB,eAAU,GAAV,UAAU,CAA8B;QACxC,WAAM,GAAN,MAAM,CAAkB;IACxC,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;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AG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AA/CY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,qCAAgB,CAAC,CAAA;qCACN,oBAAU;QACd,qCAAgB;GAJhC,wBAAwB,CA+CpC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { OAuthToken } from '../../../domain/entities/oauth-token';
|
|
3
|
+
import { OAuthTokenRepository } from '../../../domain/repositories/oauth-token.repository';
|
|
4
|
+
import { OAuthTokenEntity } from '../entities/oauth-token.entity';
|
|
5
|
+
import { OAuthTokenMapper } from '../mappers/oauth-token.mapper';
|
|
6
|
+
export declare class OAuthTokenRepositoryImpl implements OAuthTokenRepository {
|
|
7
|
+
private readonly repository;
|
|
8
|
+
private readonly mapper;
|
|
9
|
+
constructor(repository: Repository<OAuthTokenEntity>, mapper: OAuthTokenMapper);
|
|
10
|
+
findById(id: number): Promise<OAuthToken | null>;
|
|
11
|
+
findByToken(token: string): Promise<OAuthToken | null>;
|
|
12
|
+
findByAccessToken(token: string): Promise<OAuthToken | null>;
|
|
13
|
+
findByRefreshToken(token: string): Promise<OAuthToken | null>;
|
|
14
|
+
findActiveByUserId(userId: number): Promise<OAuthToken[]>;
|
|
15
|
+
findBySessionId(sessionId: number): Promise<OAuthToken[]>;
|
|
16
|
+
create(data: Partial<OAuthToken>): Promise<OAuthToken>;
|
|
17
|
+
save(token: OAuthToken): Promise<OAuthToken>;
|
|
18
|
+
revokeByUserId(userId: number): Promise<void>;
|
|
19
|
+
revokeByClientId(clientId: number): Promise<void>;
|
|
20
|
+
delete(id: number): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=oauth-token.repository.d.ts.map
|
package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-token.repository.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/oauth-token.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,qBACa,wBAAyB,YAAW,oBAAoB;IAGjE,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,EACxC,MAAM,EAAE,gBAAgB;IAGrC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAKhD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAOtD,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAO5D,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAO7D,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAUzD,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAOzD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAMtD,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAM5C,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
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.OAuthTokenRepositoryImpl = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const oauth_token_entity_1 = require("../entities/oauth-token.entity");
|
|
20
|
+
const oauth_token_mapper_1 = require("../mappers/oauth-token.mapper");
|
|
21
|
+
const enums_1 = require("../../../domain/enums");
|
|
22
|
+
let OAuthTokenRepositoryImpl = class OAuthTokenRepositoryImpl {
|
|
23
|
+
repository;
|
|
24
|
+
mapper;
|
|
25
|
+
constructor(repository, mapper) {
|
|
26
|
+
this.repository = repository;
|
|
27
|
+
this.mapper = mapper;
|
|
28
|
+
}
|
|
29
|
+
async findById(id) {
|
|
30
|
+
const entity = await this.repository.findOne({ where: { id } });
|
|
31
|
+
return this.mapper.toDomain(entity);
|
|
32
|
+
}
|
|
33
|
+
async findByToken(token) {
|
|
34
|
+
const entity = await this.repository.findOne({
|
|
35
|
+
where: { token },
|
|
36
|
+
});
|
|
37
|
+
return this.mapper.toDomain(entity);
|
|
38
|
+
}
|
|
39
|
+
async findByAccessToken(token) {
|
|
40
|
+
const entity = await this.repository.findOne({
|
|
41
|
+
where: { token, tokenType: enums_1.OAuthTokenType.ACCESS_TOKEN },
|
|
42
|
+
});
|
|
43
|
+
return this.mapper.toDomain(entity);
|
|
44
|
+
}
|
|
45
|
+
async findByRefreshToken(token) {
|
|
46
|
+
const entity = await this.repository.findOne({
|
|
47
|
+
where: { token, tokenType: enums_1.OAuthTokenType.REFRESH_TOKEN },
|
|
48
|
+
});
|
|
49
|
+
return this.mapper.toDomain(entity);
|
|
50
|
+
}
|
|
51
|
+
async findActiveByUserId(userId) {
|
|
52
|
+
const entities = await this.repository.find({
|
|
53
|
+
where: {
|
|
54
|
+
userId,
|
|
55
|
+
revokedAt: (0, typeorm_2.IsNull)(),
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
return this.mapper.toDomainList(entities);
|
|
59
|
+
}
|
|
60
|
+
async findBySessionId(sessionId) {
|
|
61
|
+
const entities = await this.repository.find({
|
|
62
|
+
where: { sessionId },
|
|
63
|
+
});
|
|
64
|
+
return this.mapper.toDomainList(entities);
|
|
65
|
+
}
|
|
66
|
+
async create(data) {
|
|
67
|
+
const entity = this.repository.create(data);
|
|
68
|
+
const saved = await this.repository.save(entity);
|
|
69
|
+
return this.mapper.toDomain(saved);
|
|
70
|
+
}
|
|
71
|
+
async save(token) {
|
|
72
|
+
const entity = this.mapper.toEntity(token);
|
|
73
|
+
const saved = await this.repository.save(entity);
|
|
74
|
+
return this.mapper.toDomain(saved);
|
|
75
|
+
}
|
|
76
|
+
async revokeByUserId(userId) {
|
|
77
|
+
await this.repository.update({ userId }, { revokedAt: new Date() });
|
|
78
|
+
}
|
|
79
|
+
async revokeByClientId(clientId) {
|
|
80
|
+
await this.repository.update({ clientId }, { revokedAt: new Date() });
|
|
81
|
+
}
|
|
82
|
+
async delete(id) {
|
|
83
|
+
await this.repository.delete(id);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
exports.OAuthTokenRepositoryImpl = OAuthTokenRepositoryImpl;
|
|
87
|
+
exports.OAuthTokenRepositoryImpl = OAuthTokenRepositoryImpl = __decorate([
|
|
88
|
+
(0, common_1.Injectable)(),
|
|
89
|
+
__param(0, (0, typeorm_1.InjectRepository)(oauth_token_entity_1.OAuthTokenEntity)),
|
|
90
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
91
|
+
oauth_token_mapper_1.OAuthTokenMapper])
|
|
92
|
+
], OAuthTokenRepositoryImpl);
|
|
93
|
+
//# sourceMappingURL=oauth-token.repository.js.map
|
package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-token.repository.js","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/oauth-token.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAuD;AAIvD,uEAAkE;AAClE,sEAAiE;AACjE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BAAgB,CAAC,QAAgB;QACrC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AAzEY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,qCAAgB,CAAC,CAAA;qCACN,oBAAU;QACd,qCAAgB;GAJhC,wBAAwB,CAyEpC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { Permission } from '../../../domain/entities/permission';
|
|
3
|
+
import { PermissionRepository } from '../../../domain/repositories/permission.repository';
|
|
4
|
+
import { PermissionEntity } from '../entities/permission.entity';
|
|
5
|
+
import { PermissionMapper } from '../mappers/permission.mapper';
|
|
6
|
+
export declare class PermissionRepositoryImpl implements PermissionRepository {
|
|
7
|
+
private readonly repository;
|
|
8
|
+
private readonly mapper;
|
|
9
|
+
constructor(repository: Repository<PermissionEntity>, mapper: PermissionMapper);
|
|
10
|
+
findById(id: number): Promise<Permission | null>;
|
|
11
|
+
findByName(name: string): Promise<Permission | null>;
|
|
12
|
+
findAll(): Promise<Permission[]>;
|
|
13
|
+
findByIds(ids: number[]): Promise<Permission[]>;
|
|
14
|
+
findByResourceAndAction(resource: string, action: string): Promise<Permission | null>;
|
|
15
|
+
create(data: Partial<Permission>): Promise<Permission>;
|
|
16
|
+
update(id: number, data: Partial<Permission>): Promise<Permission>;
|
|
17
|
+
save(permission: Permission): Promise<Permission>;
|
|
18
|
+
delete(id: number): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=permission.repository.d.ts.map
|
package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.repository.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/permission.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,qBACa,wBAAyB,YAAW,oBAAoB;IAGjE,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,EACxC,MAAM,EAAE,gBAAgB;IAGrC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAKhD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAKpD,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAKhC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAK/C,uBAAuB,CAC3B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAOvB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAMtD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAKlE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAMjD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.PermissionRepositoryImpl = 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("../entities/permission.entity");
|
|
20
|
+
const permission_mapper_1 = require("../mappers/permission.mapper");
|
|
21
|
+
let PermissionRepositoryImpl = class PermissionRepositoryImpl {
|
|
22
|
+
repository;
|
|
23
|
+
mapper;
|
|
24
|
+
constructor(repository, mapper) {
|
|
25
|
+
this.repository = repository;
|
|
26
|
+
this.mapper = mapper;
|
|
27
|
+
}
|
|
28
|
+
async findById(id) {
|
|
29
|
+
const entity = await this.repository.findOne({ where: { id } });
|
|
30
|
+
return this.mapper.toDomain(entity);
|
|
31
|
+
}
|
|
32
|
+
async findByName(name) {
|
|
33
|
+
const entity = await this.repository.findOne({ where: { name } });
|
|
34
|
+
return this.mapper.toDomain(entity);
|
|
35
|
+
}
|
|
36
|
+
async findAll() {
|
|
37
|
+
const entities = await this.repository.find();
|
|
38
|
+
return this.mapper.toDomainList(entities);
|
|
39
|
+
}
|
|
40
|
+
async findByIds(ids) {
|
|
41
|
+
const entities = await this.repository.findByIds(ids);
|
|
42
|
+
return this.mapper.toDomainList(entities);
|
|
43
|
+
}
|
|
44
|
+
async findByResourceAndAction(resource, action) {
|
|
45
|
+
const entity = await this.repository.findOne({
|
|
46
|
+
where: { resource, action },
|
|
47
|
+
});
|
|
48
|
+
return this.mapper.toDomain(entity);
|
|
49
|
+
}
|
|
50
|
+
async create(data) {
|
|
51
|
+
const entity = this.repository.create(data);
|
|
52
|
+
const saved = await this.repository.save(entity);
|
|
53
|
+
return this.mapper.toDomain(saved);
|
|
54
|
+
}
|
|
55
|
+
async update(id, data) {
|
|
56
|
+
await this.repository.update(id, data);
|
|
57
|
+
return this.findById(id);
|
|
58
|
+
}
|
|
59
|
+
async save(permission) {
|
|
60
|
+
const entity = this.mapper.toEntity(permission);
|
|
61
|
+
const saved = await this.repository.save(entity);
|
|
62
|
+
return this.mapper.toDomain(saved);
|
|
63
|
+
}
|
|
64
|
+
async delete(id) {
|
|
65
|
+
await this.repository.delete(id);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.PermissionRepositoryImpl = PermissionRepositoryImpl;
|
|
69
|
+
exports.PermissionRepositoryImpl = PermissionRepositoryImpl = __decorate([
|
|
70
|
+
(0, common_1.Injectable)(),
|
|
71
|
+
__param(0, (0, typeorm_1.InjectRepository)(permission_entity_1.PermissionEntity)),
|
|
72
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
73
|
+
permission_mapper_1.PermissionMapper])
|
|
74
|
+
], PermissionRepositoryImpl);
|
|
75
|
+
//# sourceMappingURL=permission.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.repository.js","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/permission.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AAIrC,qEAAiE;AACjE,oEAAgE;AAGzD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAGhB;IACA;IAHnB,YAEmB,UAAwC,EACxC,MAAwB;QADxB,eAAU,GAAV,UAAU,CAA8B;QACxC,WAAM,GAAN,MAAM,CAAkB;IACxC,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAY;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,GAAa;QAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,MAAM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C,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,oCAAgB,CAAC,CAAA;qCACN,oBAAU;QACd,oCAAgB;GAJhC,wBAAwB,CAyDpC"}
|
package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { RolePermission } from '../../../domain/entities/role-permission';
|
|
3
|
+
import { RolePermissionRepository } from '../../../domain/repositories/role-permission.repository';
|
|
4
|
+
import { RolePermissionEntity } from '../entities/role-permission.entity';
|
|
5
|
+
import { RolePermissionMapper } from '../mappers/role-permission.mapper';
|
|
6
|
+
export declare class RolePermissionRepositoryImpl implements RolePermissionRepository {
|
|
7
|
+
private readonly repository;
|
|
8
|
+
private readonly mapper;
|
|
9
|
+
constructor(repository: Repository<RolePermissionEntity>, mapper: RolePermissionMapper);
|
|
10
|
+
findById(id: number): Promise<RolePermission | null>;
|
|
11
|
+
findByRoleId(roleId: number): Promise<RolePermission[]>;
|
|
12
|
+
findByRoleIds(roleIds: number[]): Promise<RolePermission[]>;
|
|
13
|
+
findByPermissionId(permissionId: number): Promise<RolePermission[]>;
|
|
14
|
+
findByRoleIdAndPermissionId(roleId: number, permissionId: number): Promise<RolePermission | null>;
|
|
15
|
+
create(data: Partial<RolePermission>): Promise<RolePermission>;
|
|
16
|
+
delete(id: number): Promise<void>;
|
|
17
|
+
deleteByRoleId(roleId: number): Promise<void>;
|
|
18
|
+
deleteByRoleIdAndPermissionId(roleId: number, permissionId: number): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=role-permission.repository.d.ts.map
|
package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-permission.repository.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/role-permission.repository.ts"],"names":[],"mappings":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ED
|
@@ -0,0 +1,79 @@
|
|
|
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.RolePermissionRepositoryImpl = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const role_permission_entity_1 = require("../entities/role-permission.entity");
|
|
20
|
+
const role_permission_mapper_1 = require("../mappers/role-permission.mapper");
|
|
21
|
+
let RolePermissionRepositoryImpl = class RolePermissionRepositoryImpl {
|
|
22
|
+
repository;
|
|
23
|
+
mapper;
|
|
24
|
+
constructor(repository, mapper) {
|
|
25
|
+
this.repository = repository;
|
|
26
|
+
this.mapper = mapper;
|
|
27
|
+
}
|
|
28
|
+
async findById(id) {
|
|
29
|
+
const entity = await this.repository.findOne({ where: { id } });
|
|
30
|
+
return this.mapper.toDomain(entity);
|
|
31
|
+
}
|
|
32
|
+
async findByRoleId(roleId) {
|
|
33
|
+
const entities = await this.repository.find({
|
|
34
|
+
where: { roleId },
|
|
35
|
+
});
|
|
36
|
+
return entities.map((entity) => this.mapper.toDomain(entity));
|
|
37
|
+
}
|
|
38
|
+
async findByRoleIds(roleIds) {
|
|
39
|
+
if (roleIds.length === 0) {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
const entities = await this.repository.find({
|
|
43
|
+
where: { roleId: (0, typeorm_2.In)(roleIds) },
|
|
44
|
+
});
|
|
45
|
+
return entities.map((entity) => this.mapper.toDomain(entity));
|
|
46
|
+
}
|
|
47
|
+
async findByPermissionId(permissionId) {
|
|
48
|
+
const entities = await this.repository.find({ where: { permissionId } });
|
|
49
|
+
return this.mapper.toDomainList(entities);
|
|
50
|
+
}
|
|
51
|
+
async findByRoleIdAndPermissionId(roleId, permissionId) {
|
|
52
|
+
const entity = await this.repository.findOne({
|
|
53
|
+
where: { roleId, permissionId },
|
|
54
|
+
});
|
|
55
|
+
return this.mapper.toDomain(entity);
|
|
56
|
+
}
|
|
57
|
+
async create(data) {
|
|
58
|
+
const entity = this.repository.create(data);
|
|
59
|
+
const saved = await this.repository.save(entity);
|
|
60
|
+
return this.mapper.toDomain(saved);
|
|
61
|
+
}
|
|
62
|
+
async delete(id) {
|
|
63
|
+
await this.repository.delete(id);
|
|
64
|
+
}
|
|
65
|
+
async deleteByRoleId(roleId) {
|
|
66
|
+
await this.repository.delete({ roleId });
|
|
67
|
+
}
|
|
68
|
+
async deleteByRoleIdAndPermissionId(roleId, permissionId) {
|
|
69
|
+
await this.repository.delete({ roleId, permissionId });
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.RolePermissionRepositoryImpl = RolePermissionRepositoryImpl;
|
|
73
|
+
exports.RolePermissionRepositoryImpl = RolePermissionRepositoryImpl = __decorate([
|
|
74
|
+
(0, common_1.Injectable)(),
|
|
75
|
+
__param(0, (0, typeorm_1.InjectRepository)(role_permission_entity_1.RolePermissionEntity)),
|
|
76
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
77
|
+
role_permission_mapper_1.RolePermissionMapper])
|
|
78
|
+
], RolePermissionRepositoryImpl);
|
|
79
|
+
//# sourceMappingURL=role-permission.repository.js.map
|
package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-permission.repository.js","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/role-permission.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAyC;AAIzC,+EAA0E;AAC1E,8EAAyE;AAGlE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAGpB;IACA;IAHnB,YAEmB,UAA4C,EAC5C,MAA4B;QAD5B,eAAU,GAAV,UAAU,CAAkC;QAC5C,WAAM,GAAN,MAAM,CAAsB;IAC5C,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,MAAc;QAC/B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAC1C,KAAK,EAAE,EAAE,MAAM,EAAE;SAClB,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC7B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC7B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAAiB;QACnC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,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C,cAAc,CAAC,MAAc;QACjC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,6BAA6B,CACjC,MAAc,EACd,YAAoB;QAEpB,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AAvEY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,6CAAoB,CAAC,CAAA;qCACV,oBAAU;QACd,6CAAoB;GAJpC,4BAA4B,CAuExC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { Role } from '../../../domain/entities/role';
|
|
3
|
+
import { RoleRepository } from '../../../domain/repositories/role.repository';
|
|
4
|
+
import { RoleEntity } from '../entities/role.entity';
|
|
5
|
+
import { RoleMapper } from '../mappers/role.mapper';
|
|
6
|
+
export declare class RoleRepositoryImpl implements RoleRepository {
|
|
7
|
+
private readonly repository;
|
|
8
|
+
private readonly mapper;
|
|
9
|
+
constructor(repository: Repository<RoleEntity>, mapper: RoleMapper);
|
|
10
|
+
findById(id: number): Promise<Role | null>;
|
|
11
|
+
findByName(name: string): Promise<Role | null>;
|
|
12
|
+
findAll(): Promise<Role[]>;
|
|
13
|
+
findByIds(ids: number[]): Promise<Role[]>;
|
|
14
|
+
create(data: Partial<Role>): Promise<Role>;
|
|
15
|
+
update(id: number, data: Partial<Role>): Promise<Role>;
|
|
16
|
+
save(role: Role): Promise<Role>;
|
|
17
|
+
delete(id: number): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=role.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.repository.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/role.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,qBACa,kBAAmB,YAAW,cAAc;IAGrD,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,EAClC,MAAM,EAAE,UAAU;IAG/B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK1C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK9C,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAK1B,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAKzC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAM1C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAKtD,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAM/B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.RoleRepositoryImpl = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const role_entity_1 = require("../entities/role.entity");
|
|
20
|
+
const role_mapper_1 = require("../mappers/role.mapper");
|
|
21
|
+
let RoleRepositoryImpl = class RoleRepositoryImpl {
|
|
22
|
+
repository;
|
|
23
|
+
mapper;
|
|
24
|
+
constructor(repository, mapper) {
|
|
25
|
+
this.repository = repository;
|
|
26
|
+
this.mapper = mapper;
|
|
27
|
+
}
|
|
28
|
+
async findById(id) {
|
|
29
|
+
const entity = await this.repository.findOne({ where: { id } });
|
|
30
|
+
return this.mapper.toDomain(entity);
|
|
31
|
+
}
|
|
32
|
+
async findByName(name) {
|
|
33
|
+
const entity = await this.repository.findOne({ where: { name } });
|
|
34
|
+
return this.mapper.toDomain(entity);
|
|
35
|
+
}
|
|
36
|
+
async findAll() {
|
|
37
|
+
const entities = await this.repository.find();
|
|
38
|
+
return this.mapper.toDomainList(entities);
|
|
39
|
+
}
|
|
40
|
+
async findByIds(ids) {
|
|
41
|
+
const entities = await this.repository.findByIds(ids);
|
|
42
|
+
return this.mapper.toDomainList(entities);
|
|
43
|
+
}
|
|
44
|
+
async create(data) {
|
|
45
|
+
const entity = this.repository.create(data);
|
|
46
|
+
const saved = await this.repository.save(entity);
|
|
47
|
+
return this.mapper.toDomain(saved);
|
|
48
|
+
}
|
|
49
|
+
async update(id, data) {
|
|
50
|
+
await this.repository.update(id, data);
|
|
51
|
+
return this.findById(id);
|
|
52
|
+
}
|
|
53
|
+
async save(role) {
|
|
54
|
+
const entity = this.mapper.toEntity(role);
|
|
55
|
+
const saved = await this.repository.save(entity);
|
|
56
|
+
return this.mapper.toDomain(saved);
|
|
57
|
+
}
|
|
58
|
+
async delete(id) {
|
|
59
|
+
await this.repository.delete(id);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.RoleRepositoryImpl = RoleRepositoryImpl;
|
|
63
|
+
exports.RoleRepositoryImpl = RoleRepositoryImpl = __decorate([
|
|
64
|
+
(0, common_1.Injectable)(),
|
|
65
|
+
__param(0, (0, typeorm_1.InjectRepository)(role_entity_1.RoleEntity)),
|
|
66
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
67
|
+
role_mapper_1.RoleMapper])
|
|
68
|
+
], RoleRepositoryImpl);
|
|
69
|
+
//# sourceMappingURL=role.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.repository.js","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/role.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AAIrC,yDAAqD;AACrD,wDAAoD;AAG7C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAGV;IACA;IAHnB,YAEmB,UAAkC,EAClC,MAAkB;QADlB,eAAU,GAAV,UAAU,CAAwB;QAClC,WAAM,GAAN,MAAM,CAAY;IAClC,CAAC;IAEJ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AAE,IAAI,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAU;QACnB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AA/CY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,wBAAU,CAAC,CAAA;qCACA,oBAAU;QACd,wBAAU;GAJ1B,kBAAkB,CA+C9B"}
|
package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { SocialAccount } from '../../../domain/entities/social-account';
|
|
3
|
+
import { SocialAccountRepository } from '../../../domain/repositories/social-account.repository';
|
|
4
|
+
import { SocialProvider } from '../../../domain/enums/oauth.enums';
|
|
5
|
+
import { SocialAccountEntity } from '../entities/social-account.entity';
|
|
6
|
+
import { SocialAccountMapper } from '../mappers/social-account.mapper';
|
|
7
|
+
export declare class SocialAccountRepositoryImpl implements SocialAccountRepository {
|
|
8
|
+
private readonly repository;
|
|
9
|
+
private readonly mapper;
|
|
10
|
+
constructor(repository: Repository<SocialAccountEntity>, mapper: SocialAccountMapper);
|
|
11
|
+
findById(id: number): Promise<SocialAccount | null>;
|
|
12
|
+
findByUserId(userId: number): Promise<SocialAccount[]>;
|
|
13
|
+
findByProviderAndProviderUserId(provider: SocialProvider, providerUserId: string): Promise<SocialAccount | null>;
|
|
14
|
+
findByUserIdAndProvider(userId: number, provider: SocialProvider): Promise<SocialAccount | null>;
|
|
15
|
+
create(data: Partial<SocialAccount>): Promise<SocialAccount>;
|
|
16
|
+
save(account: SocialAccount): Promise<SocialAccount>;
|
|
17
|
+
delete(id: number): Promise<void>;
|
|
18
|
+
deleteByUserId(userId: number): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=social-account.repository.d.ts.map
|
package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social-account.repository.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/social-account.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,qBACa,2BAA4B,YAAW,uBAAuB;IAGvE,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,UAAU,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAC3C,MAAM,EAAE,mBAAmB;IAGxC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAKnD,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAKtD,+BAA+B,CACnC,QAAQ,EAAE,cAAc,EACxB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAO1B,uBAAuB,CAC3B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAO1B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAM5D,IAAI,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAMpD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGpD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
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.SocialAccountRepositoryImpl = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const social_account_entity_1 = require("../entities/social-account.entity");
|
|
20
|
+
const social_account_mapper_1 = require("../mappers/social-account.mapper");
|
|
21
|
+
let SocialAccountRepositoryImpl = class SocialAccountRepositoryImpl {
|
|
22
|
+
repository;
|
|
23
|
+
mapper;
|
|
24
|
+
constructor(repository, mapper) {
|
|
25
|
+
this.repository = repository;
|
|
26
|
+
this.mapper = mapper;
|
|
27
|
+
}
|
|
28
|
+
async findById(id) {
|
|
29
|
+
const entity = await this.repository.findOne({ where: { id } });
|
|
30
|
+
return this.mapper.toDomain(entity);
|
|
31
|
+
}
|
|
32
|
+
async findByUserId(userId) {
|
|
33
|
+
const entities = await this.repository.find({ where: { userId } });
|
|
34
|
+
return this.mapper.toDomainList(entities);
|
|
35
|
+
}
|
|
36
|
+
async findByProviderAndProviderUserId(provider, providerUserId) {
|
|
37
|
+
const entity = await this.repository.findOne({
|
|
38
|
+
where: { provider, providerUserId },
|
|
39
|
+
});
|
|
40
|
+
return this.mapper.toDomain(entity);
|
|
41
|
+
}
|
|
42
|
+
async findByUserIdAndProvider(userId, provider) {
|
|
43
|
+
const entity = await this.repository.findOne({
|
|
44
|
+
where: { userId, provider },
|
|
45
|
+
});
|
|
46
|
+
return this.mapper.toDomain(entity);
|
|
47
|
+
}
|
|
48
|
+
async create(data) {
|
|
49
|
+
const entity = this.repository.create(data);
|
|
50
|
+
const saved = await this.repository.save(entity);
|
|
51
|
+
return this.mapper.toDomain(saved);
|
|
52
|
+
}
|
|
53
|
+
async save(account) {
|
|
54
|
+
const entity = this.mapper.toEntity(account);
|
|
55
|
+
const saved = await this.repository.save(entity);
|
|
56
|
+
return this.mapper.toDomain(saved);
|
|
57
|
+
}
|
|
58
|
+
async delete(id) {
|
|
59
|
+
await this.repository.delete(id);
|
|
60
|
+
}
|
|
61
|
+
async deleteByUserId(userId) {
|
|
62
|
+
await this.repository.delete({ userId });
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.SocialAccountRepositoryImpl = SocialAccountRepositoryImpl;
|
|
66
|
+
exports.SocialAccountRepositoryImpl = SocialAccountRepositoryImpl = __decorate([
|
|
67
|
+
(0, common_1.Injectable)(),
|
|
68
|
+
__param(0, (0, typeorm_1.InjectRepository)(social_account_entity_1.SocialAccountEntity)),
|
|
69
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
70
|
+
social_account_mapper_1.SocialAccountMapper])
|
|
71
|
+
], SocialAccountRepositoryImpl);
|
|
72
|
+
//# sourceMappingURL=social-account.repository.js.map
|
package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social-account.repository.js","sourceRoot":"","sources":["../../../../../../src/server/auth/infrastructure/persistence/repositories/social-account.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AAKrC,6EAAwE;AACxE,4EAAuE;AAGhE,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAGnB;IACA;IAHnB,YAEmB,UAA2C,EAC3C,MAA2B;QAD3B,eAAU,GAAV,UAAU,CAAiC;QAC3C,WAAM,GAAN,MAAM,CAAqB;IAC3C,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,MAAc;QAC/B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,MA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