@skyapp-labs/blueprint-backend-core 1.0.9
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/CHANGELOG.md +6 -0
- package/README.md +954 -0
- package/dist/common/base/base.entity.d.ts +12 -0
- package/dist/common/base/base.entity.d.ts.map +1 -0
- package/dist/common/base/base.entity.js +48 -0
- package/dist/common/base/base.entity.js.map +1 -0
- package/dist/common/base/base.repository.d.ts +26 -0
- package/dist/common/base/base.repository.d.ts.map +1 -0
- package/dist/common/base/base.repository.js +61 -0
- package/dist/common/base/base.repository.js.map +1 -0
- package/dist/common/constants/index.d.ts +9 -0
- package/dist/common/constants/index.d.ts.map +1 -0
- package/dist/common/constants/index.js +13 -0
- package/dist/common/constants/index.js.map +1 -0
- package/dist/common/decorators/auth-method-aware.decorator.d.ts +3 -0
- package/dist/common/decorators/auth-method-aware.decorator.d.ts.map +1 -0
- package/dist/common/decorators/auth-method-aware.decorator.js +8 -0
- package/dist/common/decorators/auth-method-aware.decorator.js.map +1 -0
- package/dist/common/decorators/index.d.ts +8 -0
- package/dist/common/decorators/index.d.ts.map +1 -0
- package/dist/common/decorators/index.js +24 -0
- package/dist/common/decorators/index.js.map +1 -0
- package/dist/common/dto/index.d.ts +2 -0
- package/dist/common/dto/index.d.ts.map +1 -0
- package/dist/common/dto/index.js +18 -0
- package/dist/common/dto/index.js.map +1 -0
- package/dist/common/dto/pagination.dto.d.ts +6 -0
- package/dist/common/dto/pagination.dto.d.ts.map +1 -0
- package/dist/common/dto/pagination.dto.js +45 -0
- package/dist/common/dto/pagination.dto.js.map +1 -0
- package/dist/common/filters/http-exception.filter.d.ts +9 -0
- package/dist/common/filters/http-exception.filter.d.ts.map +1 -0
- package/dist/common/filters/http-exception.filter.js +71 -0
- package/dist/common/filters/http-exception.filter.js.map +1 -0
- package/dist/common/filters/index.d.ts +2 -0
- package/dist/common/filters/index.d.ts.map +1 -0
- package/dist/common/filters/index.js +18 -0
- package/dist/common/filters/index.js.map +1 -0
- package/dist/common/guards/auth.guard.d.ts +11 -0
- package/dist/common/guards/auth.guard.d.ts.map +1 -0
- package/dist/common/guards/auth.guard.js +42 -0
- package/dist/common/guards/auth.guard.js.map +1 -0
- package/dist/common/guards/index.d.ts +5 -0
- package/dist/common/guards/index.d.ts.map +1 -0
- package/dist/common/guards/index.js +21 -0
- package/dist/common/guards/index.js.map +1 -0
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts +12 -0
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts.map +1 -0
- package/dist/common/guards/login-ip-rate-limit.guard.js +70 -0
- package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +12 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts.map +1 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.js +70 -0
- package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -0
- package/dist/common/guards/permissions.guard.d.ts +8 -0
- package/dist/common/guards/permissions.guard.d.ts.map +1 -0
- package/dist/common/guards/permissions.guard.js +41 -0
- package/dist/common/guards/permissions.guard.js.map +1 -0
- package/dist/common/index.d.ts +13 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +33 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/interceptors/index.d.ts +2 -0
- package/dist/common/interceptors/index.d.ts.map +1 -0
- package/dist/common/interceptors/index.js +18 -0
- package/dist/common/interceptors/index.js.map +1 -0
- package/dist/common/interceptors/logging.interceptor.d.ts +10 -0
- package/dist/common/interceptors/logging.interceptor.d.ts.map +1 -0
- package/dist/common/interceptors/logging.interceptor.js +50 -0
- package/dist/common/interceptors/logging.interceptor.js.map +1 -0
- package/dist/common/interfaces/index.d.ts +2 -0
- package/dist/common/interfaces/index.d.ts.map +1 -0
- package/dist/common/interfaces/index.js +18 -0
- package/dist/common/interfaces/index.js.map +1 -0
- package/dist/common/interfaces/request-user.interface.d.ts +5 -0
- package/dist/common/interfaces/request-user.interface.d.ts.map +1 -0
- package/dist/common/interfaces/request-user.interface.js +3 -0
- package/dist/common/interfaces/request-user.interface.js.map +1 -0
- package/dist/common/middlewares/index.d.ts +6 -0
- package/dist/common/middlewares/index.d.ts.map +1 -0
- package/dist/common/middlewares/index.js +23 -0
- package/dist/common/middlewares/index.js.map +1 -0
- package/dist/common/pipes/config-aware-validation.pipe.d.ts +9 -0
- package/dist/common/pipes/config-aware-validation.pipe.d.ts.map +1 -0
- package/dist/common/pipes/config-aware-validation.pipe.js +38 -0
- package/dist/common/pipes/config-aware-validation.pipe.js.map +1 -0
- package/dist/common/pipes/index.d.ts +14 -0
- package/dist/common/pipes/index.d.ts.map +1 -0
- package/dist/common/pipes/index.js +62 -0
- package/dist/common/pipes/index.js.map +1 -0
- package/dist/common/utils/index.d.ts +8 -0
- package/dist/common/utils/index.d.ts.map +1 -0
- package/dist/common/utils/index.js +33 -0
- package/dist/common/utils/index.js.map +1 -0
- package/dist/common/utils/request.utils.d.ts +7 -0
- package/dist/common/utils/request.utils.d.ts.map +1 -0
- package/dist/common/utils/request.utils.js +12 -0
- package/dist/common/utils/request.utils.js.map +1 -0
- package/dist/config/app.config.d.ts +66 -0
- package/dist/config/app.config.d.ts.map +1 -0
- package/dist/config/app.config.js +43 -0
- package/dist/config/app.config.js.map +1 -0
- package/dist/config/database.config.d.ts +16 -0
- package/dist/config/database.config.d.ts.map +1 -0
- package/dist/config/database.config.js +13 -0
- package/dist/config/database.config.js.map +1 -0
- package/dist/config/env.validation.d.ts +34 -0
- package/dist/config/env.validation.d.ts.map +1 -0
- package/dist/config/env.validation.js +172 -0
- package/dist/config/env.validation.js.map +1 -0
- package/dist/config/firebase.module.d.ts +5 -0
- package/dist/config/firebase.module.d.ts.map +1 -0
- package/dist/config/firebase.module.js +21 -0
- package/dist/config/firebase.module.js.map +1 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +17 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/keycloak.module.d.ts +6 -0
- package/dist/config/keycloak.module.d.ts.map +1 -0
- package/dist/config/keycloak.module.js +92 -0
- package/dist/config/keycloak.module.js.map +1 -0
- package/dist/config/redis.module.d.ts +10 -0
- package/dist/config/redis.module.d.ts.map +1 -0
- package/dist/config/redis.module.js +111 -0
- package/dist/config/redis.module.js.map +1 -0
- package/dist/core.module.d.ts +12 -0
- package/dist/core.module.d.ts.map +1 -0
- package/dist/core.module.js +53 -0
- package/dist/core.module.js.map +1 -0
- package/dist/database/data-source.d.ts +5 -0
- package/dist/database/data-source.d.ts.map +1 -0
- package/dist/database/data-source.js +56 -0
- package/dist/database/data-source.js.map +1 -0
- package/dist/database/migrations/1775258543167-full-schema.d.ts +7 -0
- package/dist/database/migrations/1775258543167-full-schema.d.ts.map +1 -0
- package/dist/database/migrations/1775258543167-full-schema.js +100 -0
- package/dist/database/migrations/1775258543167-full-schema.js.map +1 -0
- package/dist/database/seeds/roles.seed.d.ts +11 -0
- package/dist/database/seeds/roles.seed.d.ts.map +1 -0
- package/dist/database/seeds/roles.seed.js +66 -0
- package/dist/database/seeds/roles.seed.js.map +1 -0
- package/dist/database/seeds/run-seed.d.ts +2 -0
- package/dist/database/seeds/run-seed.d.ts.map +1 -0
- package/dist/database/seeds/run-seed.js +32 -0
- package/dist/database/seeds/run-seed.js.map +1 -0
- package/dist/database/seeds/settings.seed.d.ts +9 -0
- package/dist/database/seeds/settings.seed.d.ts.map +1 -0
- package/dist/database/seeds/settings.seed.js +450 -0
- package/dist/database/seeds/settings.seed.js.map +1 -0
- package/dist/database/seeds/user.seed.d.ts +9 -0
- package/dist/database/seeds/user.seed.d.ts.map +1 -0
- package/dist/database/seeds/user.seed.js +90 -0
- package/dist/database/seeds/user.seed.js.map +1 -0
- package/dist/database/typeorm.service.d.ts +13 -0
- package/dist/database/typeorm.service.d.ts.map +1 -0
- package/dist/database/typeorm.service.js +52 -0
- package/dist/database/typeorm.service.js.map +1 -0
- package/dist/health/health.controller.d.ts +29 -0
- package/dist/health/health.controller.d.ts.map +1 -0
- package/dist/health/health.controller.js +182 -0
- package/dist/health/health.controller.js.map +1 -0
- package/dist/health/health.module.d.ts +3 -0
- package/dist/health/health.module.d.ts.map +1 -0
- package/dist/health/health.module.js +50 -0
- package/dist/health/health.module.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs/index.d.ts +6 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +10 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/jobs.module.d.ts +6 -0
- package/dist/jobs/jobs.module.d.ts.map +1 -0
- package/dist/jobs/jobs.module.js +63 -0
- package/dist/jobs/jobs.module.js.map +1 -0
- package/dist/jobs/processors/jobs.processor.d.ts +24 -0
- package/dist/jobs/processors/jobs.processor.d.ts.map +1 -0
- package/dist/jobs/processors/jobs.processor.js +164 -0
- package/dist/jobs/processors/jobs.processor.js.map +1 -0
- package/dist/jobs/queues/jobs.queue.d.ts +25 -0
- package/dist/jobs/queues/jobs.queue.d.ts.map +1 -0
- package/dist/jobs/queues/jobs.queue.js +55 -0
- package/dist/jobs/queues/jobs.queue.js.map +1 -0
- package/dist/jobs/queues/queue-names.d.ts +5 -0
- package/dist/jobs/queues/queue-names.d.ts.map +1 -0
- package/dist/jobs/queues/queue-names.js +7 -0
- package/dist/jobs/queues/queue-names.js.map +1 -0
- package/dist/modules/admin/admin.module.d.ts +3 -0
- package/dist/modules/admin/admin.module.d.ts.map +1 -0
- package/dist/modules/admin/admin.module.js +24 -0
- package/dist/modules/admin/admin.module.js.map +1 -0
- package/dist/modules/admin/controllers/admin.controller.d.ts +27 -0
- package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -0
- package/dist/modules/admin/controllers/admin.controller.js +110 -0
- package/dist/modules/admin/controllers/admin.controller.js.map +1 -0
- package/dist/modules/admin/dto/admin-log.dto.d.ts +17 -0
- package/dist/modules/admin/dto/admin-log.dto.d.ts.map +1 -0
- package/dist/modules/admin/dto/admin-log.dto.js +57 -0
- package/dist/modules/admin/dto/admin-log.dto.js.map +1 -0
- package/dist/modules/admin/entities/admin-log.entity.d.ts +12 -0
- package/dist/modules/admin/entities/admin-log.entity.d.ts.map +1 -0
- package/dist/modules/admin/entities/admin-log.entity.js +53 -0
- package/dist/modules/admin/entities/admin-log.entity.js.map +1 -0
- package/dist/modules/admin/services/admin-log.service.d.ts +11 -0
- package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -0
- package/dist/modules/admin/services/admin-log.service.js +60 -0
- package/dist/modules/admin/services/admin-log.service.js.map +1 -0
- package/dist/modules/auth/auth-core/auth-core.module.d.ts +3 -0
- package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/auth-core.module.js +40 -0
- package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +18 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +45 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -0
- package/dist/modules/auth/auth.manifest.d.ts +9 -0
- package/dist/modules/auth/auth.manifest.d.ts.map +1 -0
- package/dist/modules/auth/auth.manifest.js +29 -0
- package/dist/modules/auth/auth.manifest.js.map +1 -0
- package/dist/modules/auth/auth.module.d.ts +3 -0
- package/dist/modules/auth/auth.module.d.ts.map +1 -0
- package/dist/modules/auth/auth.module.js +67 -0
- package/dist/modules/auth/auth.module.js.map +1 -0
- package/dist/modules/auth/controllers/account.controller.d.ts +42 -0
- package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/account.controller.js +206 -0
- package/dist/modules/auth/controllers/account.controller.js.map +1 -0
- package/dist/modules/auth/controllers/auth.controller.d.ts +32 -0
- package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/auth.controller.js +206 -0
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -0
- package/dist/modules/auth/controllers/otp.controller.d.ts +10 -0
- package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/otp.controller.js +156 -0
- package/dist/modules/auth/controllers/otp.controller.js.map +1 -0
- package/dist/modules/auth/dto/index.d.ts +7 -0
- package/dist/modules/auth/dto/index.d.ts.map +1 -0
- package/dist/modules/auth/dto/index.js +23 -0
- package/dist/modules/auth/dto/index.js.map +1 -0
- package/dist/modules/auth/dto/invite.dto.d.ts +7 -0
- package/dist/modules/auth/dto/invite.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/invite.dto.js +39 -0
- package/dist/modules/auth/dto/invite.dto.js.map +1 -0
- package/dist/modules/auth/dto/login.dto.d.ts +7 -0
- package/dist/modules/auth/dto/login.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/login.dto.js +48 -0
- package/dist/modules/auth/dto/login.dto.js.map +1 -0
- package/dist/modules/auth/dto/otp.dto.d.ts +15 -0
- package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/otp.dto.js +83 -0
- package/dist/modules/auth/dto/otp.dto.js.map +1 -0
- package/dist/modules/auth/dto/password.dto.d.ts +25 -0
- package/dist/modules/auth/dto/password.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/password.dto.js +122 -0
- package/dist/modules/auth/dto/password.dto.js.map +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts +19 -0
- package/dist/modules/auth/dto/register.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/register.dto.js +132 -0
- package/dist/modules/auth/dto/register.dto.js.map +1 -0
- package/dist/modules/auth/dto/token.dto.d.ts +15 -0
- package/dist/modules/auth/dto/token.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/token.dto.js +24 -0
- package/dist/modules/auth/dto/token.dto.js.map +1 -0
- package/dist/modules/auth/entities/index.d.ts +2 -0
- package/dist/modules/auth/entities/index.d.ts.map +1 -0
- package/dist/modules/auth/entities/index.js +18 -0
- package/dist/modules/auth/entities/index.js.map +1 -0
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts +9 -0
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/password-reset-token.entity.js +40 -0
- package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -0
- package/dist/modules/auth/index.d.ts +5 -0
- package/dist/modules/auth/index.d.ts.map +1 -0
- package/dist/modules/auth/index.js +21 -0
- package/dist/modules/auth/index.js.map +1 -0
- package/dist/modules/auth/providers/index.d.ts +5 -0
- package/dist/modules/auth/providers/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/index.js +21 -0
- package/dist/modules/auth/providers/index.js.map +1 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.d.ts +37 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.d.ts.map +1 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.js +3 -0
- package/dist/modules/auth/providers/interfaces/auth-provider.interface.js.map +1 -0
- package/dist/modules/auth/providers/interfaces/index.d.ts +2 -0
- package/dist/modules/auth/providers/interfaces/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/interfaces/index.js +18 -0
- package/dist/modules/auth/providers/interfaces/index.js.map +1 -0
- package/dist/modules/auth/providers/keycloak/index.d.ts +3 -0
- package/dist/modules/auth/providers/keycloak/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/keycloak/index.js +19 -0
- package/dist/modules/auth/providers/keycloak/index.js.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.d.ts +3 -0
- package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.d.ts.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.js +80 -0
- package/dist/modules/auth/providers/keycloak/keycloak-auth-provider.module.js.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.d.ts +7 -0
- package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.d.ts.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.js +54 -0
- package/dist/modules/auth/providers/keycloak/keycloak-verify-email.strategy.js.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.d.ts +36 -0
- package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.d.ts.map +1 -0
- package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.js +188 -0
- package/dist/modules/auth/providers/keycloak/keycloak.auth-provider.js.map +1 -0
- package/dist/modules/auth/providers/native/index.d.ts +3 -0
- package/dist/modules/auth/providers/native/index.d.ts.map +1 -0
- package/dist/modules/auth/providers/native/index.js +19 -0
- package/dist/modules/auth/providers/native/index.js.map +1 -0
- package/dist/modules/auth/providers/native/native.auth-provider.d.ts +19 -0
- package/dist/modules/auth/providers/native/native.auth-provider.d.ts.map +1 -0
- package/dist/modules/auth/providers/native/native.auth-provider.js +159 -0
- package/dist/modules/auth/providers/native/native.auth-provider.js.map +1 -0
- package/dist/modules/auth/providers/native/native.auth-provider.module.d.ts +3 -0
- package/dist/modules/auth/providers/native/native.auth-provider.module.d.ts.map +1 -0
- package/dist/modules/auth/providers/native/native.auth-provider.module.js +24 -0
- package/dist/modules/auth/providers/native/native.auth-provider.module.js.map +1 -0
- package/dist/modules/auth/providers/provider.registry.d.ts +14 -0
- package/dist/modules/auth/providers/provider.registry.d.ts.map +1 -0
- package/dist/modules/auth/providers/provider.registry.js +49 -0
- package/dist/modules/auth/providers/provider.registry.js.map +1 -0
- package/dist/modules/auth/services/account.service.d.ts +40 -0
- package/dist/modules/auth/services/account.service.d.ts.map +1 -0
- package/dist/modules/auth/services/account.service.js +165 -0
- package/dist/modules/auth/services/account.service.js.map +1 -0
- package/dist/modules/auth/services/index.d.ts +6 -0
- package/dist/modules/auth/services/index.d.ts.map +1 -0
- package/dist/modules/auth/services/index.js +22 -0
- package/dist/modules/auth/services/index.js.map +1 -0
- package/dist/modules/auth/services/login.service.d.ts +28 -0
- package/dist/modules/auth/services/login.service.d.ts.map +1 -0
- package/dist/modules/auth/services/login.service.js +210 -0
- package/dist/modules/auth/services/login.service.js.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts +16 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.js +75 -0
- package/dist/modules/auth/services/otp-auth.service.js.map +1 -0
- package/dist/modules/auth/services/password.service.d.ts +39 -0
- package/dist/modules/auth/services/password.service.d.ts.map +1 -0
- package/dist/modules/auth/services/password.service.js +213 -0
- package/dist/modules/auth/services/password.service.js.map +1 -0
- package/dist/modules/auth/services/registration.service.d.ts +30 -0
- package/dist/modules/auth/services/registration.service.d.ts.map +1 -0
- package/dist/modules/auth/services/registration.service.js +217 -0
- package/dist/modules/auth/services/registration.service.js.map +1 -0
- package/dist/modules/notifications/controllers/index.d.ts +2 -0
- package/dist/modules/notifications/controllers/index.d.ts.map +1 -0
- package/dist/modules/notifications/controllers/index.js +18 -0
- package/dist/modules/notifications/controllers/index.js.map +1 -0
- package/dist/modules/notifications/controllers/notifications.controller.d.ts +38 -0
- package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -0
- package/dist/modules/notifications/controllers/notifications.controller.js +140 -0
- package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -0
- package/dist/modules/notifications/dto/device.dto.d.ts +10 -0
- package/dist/modules/notifications/dto/device.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/device.dto.js +38 -0
- package/dist/modules/notifications/dto/device.dto.js.map +1 -0
- package/dist/modules/notifications/dto/event-types.dto.d.ts +6 -0
- package/dist/modules/notifications/dto/event-types.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/event-types.dto.js +10 -0
- package/dist/modules/notifications/dto/event-types.dto.js.map +1 -0
- package/dist/modules/notifications/dto/fcm.dto.d.ts +14 -0
- package/dist/modules/notifications/dto/fcm.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/fcm.dto.js +3 -0
- package/dist/modules/notifications/dto/fcm.dto.js.map +1 -0
- package/dist/modules/notifications/dto/index.d.ts +6 -0
- package/dist/modules/notifications/dto/index.d.ts.map +1 -0
- package/dist/modules/notifications/dto/index.js +22 -0
- package/dist/modules/notifications/dto/index.js.map +1 -0
- package/dist/modules/notifications/dto/notification-query.dto.d.ts +8 -0
- package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/notification-query.dto.js +44 -0
- package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -0
- package/dist/modules/notifications/dto/user-device-token.dto.d.ts +9 -0
- package/dist/modules/notifications/dto/user-device-token.dto.d.ts.map +1 -0
- package/dist/modules/notifications/dto/user-device-token.dto.js +3 -0
- package/dist/modules/notifications/dto/user-device-token.dto.js.map +1 -0
- package/dist/modules/notifications/entities/device-token.entity.d.ts +17 -0
- package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -0
- package/dist/modules/notifications/entities/device-token.entity.js +62 -0
- package/dist/modules/notifications/entities/device-token.entity.js.map +1 -0
- package/dist/modules/notifications/entities/index.d.ts +3 -0
- package/dist/modules/notifications/entities/index.d.ts.map +1 -0
- package/dist/modules/notifications/entities/index.js +19 -0
- package/dist/modules/notifications/entities/index.js.map +1 -0
- package/dist/modules/notifications/entities/notification.entity.d.ts +21 -0
- package/dist/modules/notifications/entities/notification.entity.d.ts.map +1 -0
- package/dist/modules/notifications/entities/notification.entity.js +70 -0
- package/dist/modules/notifications/entities/notification.entity.js.map +1 -0
- package/dist/modules/notifications/firebase.module.d.ts +3 -0
- package/dist/modules/notifications/firebase.module.d.ts.map +1 -0
- package/dist/modules/notifications/firebase.module.js +25 -0
- package/dist/modules/notifications/firebase.module.js.map +1 -0
- package/dist/modules/notifications/notifications.manifest.d.ts +9 -0
- package/dist/modules/notifications/notifications.manifest.d.ts.map +1 -0
- package/dist/modules/notifications/notifications.manifest.js +37 -0
- package/dist/modules/notifications/notifications.manifest.js.map +1 -0
- package/dist/modules/notifications/notifications.module.d.ts +3 -0
- package/dist/modules/notifications/notifications.module.d.ts.map +1 -0
- package/dist/modules/notifications/notifications.module.js +32 -0
- package/dist/modules/notifications/notifications.module.js.map +1 -0
- package/dist/modules/notifications/services/fcm.service.d.ts +17 -0
- package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/fcm.service.js +150 -0
- package/dist/modules/notifications/services/fcm.service.js.map +1 -0
- package/dist/modules/notifications/services/firebase.service.d.ts +19 -0
- package/dist/modules/notifications/services/firebase.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/firebase.service.js +73 -0
- package/dist/modules/notifications/services/firebase.service.js.map +1 -0
- package/dist/modules/notifications/services/index.d.ts +4 -0
- package/dist/modules/notifications/services/index.d.ts.map +1 -0
- package/dist/modules/notifications/services/index.js +20 -0
- package/dist/modules/notifications/services/index.js.map +1 -0
- package/dist/modules/notifications/services/notifications.service.d.ts +19 -0
- package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -0
- package/dist/modules/notifications/services/notifications.service.js +97 -0
- package/dist/modules/notifications/services/notifications.service.js.map +1 -0
- package/dist/modules/otp/constants/otp.constants.d.ts +4 -0
- package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -0
- package/dist/modules/otp/constants/otp.constants.js +10 -0
- package/dist/modules/otp/constants/otp.constants.js.map +1 -0
- package/dist/modules/otp/email/email-provider.interface.d.ts +14 -0
- package/dist/modules/otp/email/email-provider.interface.d.ts.map +1 -0
- package/dist/modules/otp/email/email-provider.interface.js +15 -0
- package/dist/modules/otp/email/email-provider.interface.js.map +1 -0
- package/dist/modules/otp/email/email-proxy.service.d.ts +21 -0
- package/dist/modules/otp/email/email-proxy.service.d.ts.map +1 -0
- package/dist/modules/otp/email/email-proxy.service.js +67 -0
- package/dist/modules/otp/email/email-proxy.service.js.map +1 -0
- package/dist/modules/otp/email/email.module.d.ts +3 -0
- package/dist/modules/otp/email/email.module.d.ts.map +1 -0
- package/dist/modules/otp/email/email.module.js +33 -0
- package/dist/modules/otp/email/email.module.js.map +1 -0
- package/dist/modules/otp/email/index.d.ts +4 -0
- package/dist/modules/otp/email/index.d.ts.map +1 -0
- package/dist/modules/otp/email/index.js +20 -0
- package/dist/modules/otp/email/index.js.map +1 -0
- package/dist/modules/otp/email/providers/index.d.ts +5 -0
- package/dist/modules/otp/email/providers/index.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/index.js +21 -0
- package/dist/modules/otp/email/providers/index.js.map +1 -0
- package/dist/modules/otp/email/providers/mailgun.provider.d.ts +10 -0
- package/dist/modules/otp/email/providers/mailgun.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/mailgun.provider.js +59 -0
- package/dist/modules/otp/email/providers/mailgun.provider.js.map +1 -0
- package/dist/modules/otp/email/providers/resend.provider.d.ts +10 -0
- package/dist/modules/otp/email/providers/resend.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/resend.provider.js +57 -0
- package/dist/modules/otp/email/providers/resend.provider.js.map +1 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.d.ts +10 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.js +58 -0
- package/dist/modules/otp/email/providers/sendgrid.provider.js.map +1 -0
- package/dist/modules/otp/email/providers/smtp.provider.d.ts +15 -0
- package/dist/modules/otp/email/providers/smtp.provider.d.ts.map +1 -0
- package/dist/modules/otp/email/providers/smtp.provider.js +115 -0
- package/dist/modules/otp/email/providers/smtp.provider.js.map +1 -0
- package/dist/modules/otp/index.d.ts +5 -0
- package/dist/modules/otp/index.d.ts.map +1 -0
- package/dist/modules/otp/index.js +21 -0
- package/dist/modules/otp/index.js.map +1 -0
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts +26 -0
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -0
- package/dist/modules/otp/interfaces/otp.service.interface.js +7 -0
- package/dist/modules/otp/interfaces/otp.service.interface.js.map +1 -0
- package/dist/modules/otp/otp.module.d.ts +3 -0
- package/dist/modules/otp/otp.module.d.ts.map +1 -0
- package/dist/modules/otp/otp.module.js +36 -0
- package/dist/modules/otp/otp.module.js.map +1 -0
- package/dist/modules/otp/otp.service.d.ts +25 -0
- package/dist/modules/otp/otp.service.d.ts.map +1 -0
- package/dist/modules/otp/otp.service.js +146 -0
- package/dist/modules/otp/otp.service.js.map +1 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts +13 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -0
- package/dist/modules/otp/services/otp.rate-limiter.js +70 -0
- package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -0
- package/dist/modules/otp/services/otp.session.store.d.ts +28 -0
- package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -0
- package/dist/modules/otp/services/otp.session.store.js +226 -0
- package/dist/modules/otp/services/otp.session.store.js.map +1 -0
- package/dist/modules/otp/sms/index.d.ts +4 -0
- package/dist/modules/otp/sms/index.d.ts.map +1 -0
- package/dist/modules/otp/sms/index.js +20 -0
- package/dist/modules/otp/sms/index.js.map +1 -0
- package/dist/modules/otp/sms/providers/index.d.ts +5 -0
- package/dist/modules/otp/sms/providers/index.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/index.js +21 -0
- package/dist/modules/otp/sms/providers/index.js.map +1 -0
- package/dist/modules/otp/sms/providers/infobip.provider.d.ts +10 -0
- package/dist/modules/otp/sms/providers/infobip.provider.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/infobip.provider.js +61 -0
- package/dist/modules/otp/sms/providers/infobip.provider.js.map +1 -0
- package/dist/modules/otp/sms/providers/smart-sms.provider.d.ts +11 -0
- package/dist/modules/otp/sms/providers/smart-sms.provider.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/smart-sms.provider.js +56 -0
- package/dist/modules/otp/sms/providers/smart-sms.provider.js.map +1 -0
- package/dist/modules/otp/sms/providers/termii.provider.d.ts +11 -0
- package/dist/modules/otp/sms/providers/termii.provider.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/termii.provider.js +56 -0
- package/dist/modules/otp/sms/providers/termii.provider.js.map +1 -0
- package/dist/modules/otp/sms/providers/twilio.provider.d.ts +10 -0
- package/dist/modules/otp/sms/providers/twilio.provider.d.ts.map +1 -0
- package/dist/modules/otp/sms/providers/twilio.provider.js +59 -0
- package/dist/modules/otp/sms/providers/twilio.provider.js.map +1 -0
- package/dist/modules/otp/sms/sms-provider.interface.d.ts +12 -0
- package/dist/modules/otp/sms/sms-provider.interface.d.ts.map +1 -0
- package/dist/modules/otp/sms/sms-provider.interface.js +15 -0
- package/dist/modules/otp/sms/sms-provider.interface.js.map +1 -0
- package/dist/modules/otp/sms/sms-proxy.service.d.ts +21 -0
- package/dist/modules/otp/sms/sms-proxy.service.d.ts.map +1 -0
- package/dist/modules/otp/sms/sms-proxy.service.js +67 -0
- package/dist/modules/otp/sms/sms-proxy.service.js.map +1 -0
- package/dist/modules/otp/sms/sms.module.d.ts +3 -0
- package/dist/modules/otp/sms/sms.module.d.ts.map +1 -0
- package/dist/modules/otp/sms/sms.module.js +33 -0
- package/dist/modules/otp/sms/sms.module.js.map +1 -0
- package/dist/modules/otp/utils/otp.utils.d.ts +13 -0
- package/dist/modules/otp/utils/otp.utils.d.ts.map +1 -0
- package/dist/modules/otp/utils/otp.utils.js +57 -0
- package/dist/modules/otp/utils/otp.utils.js.map +1 -0
- package/dist/modules/profile/controllers/profile.controller.d.ts +14 -0
- package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -0
- package/dist/modules/profile/controllers/profile.controller.js +81 -0
- package/dist/modules/profile/controllers/profile.controller.js.map +1 -0
- package/dist/modules/profile/dto/profile.dto.d.ts +11 -0
- package/dist/modules/profile/dto/profile.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/profile.dto.js +50 -0
- package/dist/modules/profile/dto/profile.dto.js.map +1 -0
- package/dist/modules/profile/index.d.ts +3 -0
- package/dist/modules/profile/index.d.ts.map +1 -0
- package/dist/modules/profile/index.js +19 -0
- package/dist/modules/profile/index.js.map +1 -0
- package/dist/modules/profile/profile.module.d.ts +3 -0
- package/dist/modules/profile/profile.module.d.ts.map +1 -0
- package/dist/modules/profile/profile.module.js +26 -0
- package/dist/modules/profile/profile.module.js.map +1 -0
- package/dist/modules/profile/services/profile.service.d.ts +16 -0
- package/dist/modules/profile/services/profile.service.d.ts.map +1 -0
- package/dist/modules/profile/services/profile.service.js +64 -0
- package/dist/modules/profile/services/profile.service.js.map +1 -0
- package/dist/modules/roles/controllers/index.d.ts +5 -0
- package/dist/modules/roles/controllers/index.d.ts.map +1 -0
- package/dist/modules/roles/controllers/index.js +12 -0
- package/dist/modules/roles/controllers/index.js.map +1 -0
- package/dist/modules/roles/controllers/modules.controller.d.ts +14 -0
- package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -0
- package/dist/modules/roles/controllers/modules.controller.js +82 -0
- package/dist/modules/roles/controllers/modules.controller.js.map +1 -0
- package/dist/modules/roles/controllers/permissions.controller.d.ts +14 -0
- package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -0
- package/dist/modules/roles/controllers/permissions.controller.js +83 -0
- package/dist/modules/roles/controllers/permissions.controller.js.map +1 -0
- package/dist/modules/roles/controllers/roles.controller.d.ts +17 -0
- package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -0
- package/dist/modules/roles/controllers/roles.controller.js +93 -0
- package/dist/modules/roles/controllers/roles.controller.js.map +1 -0
- package/dist/modules/roles/controllers/user-roles.controller.d.ts +11 -0
- package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -0
- package/dist/modules/roles/controllers/user-roles.controller.js +94 -0
- package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -0
- package/dist/modules/roles/dto/index.d.ts +4 -0
- package/dist/modules/roles/dto/index.d.ts.map +1 -0
- package/dist/modules/roles/dto/index.js +20 -0
- package/dist/modules/roles/dto/index.js.map +1 -0
- package/dist/modules/roles/dto/module.dto.d.ts +10 -0
- package/dist/modules/roles/dto/module.dto.d.ts.map +1 -0
- package/dist/modules/roles/dto/module.dto.js +48 -0
- package/dist/modules/roles/dto/module.dto.js.map +1 -0
- package/dist/modules/roles/dto/permission.dto.d.ts +14 -0
- package/dist/modules/roles/dto/permission.dto.d.ts.map +1 -0
- package/dist/modules/roles/dto/permission.dto.js +60 -0
- package/dist/modules/roles/dto/permission.dto.js.map +1 -0
- package/dist/modules/roles/dto/role.dto.d.ts +15 -0
- package/dist/modules/roles/dto/role.dto.d.ts.map +1 -0
- package/dist/modules/roles/dto/role.dto.js +65 -0
- package/dist/modules/roles/dto/role.dto.js.map +1 -0
- package/dist/modules/roles/entities/index.d.ts +4 -0
- package/dist/modules/roles/entities/index.d.ts.map +1 -0
- package/dist/modules/roles/entities/index.js +10 -0
- package/dist/modules/roles/entities/index.js.map +1 -0
- package/dist/modules/roles/entities/module.entity.d.ts +9 -0
- package/dist/modules/roles/entities/module.entity.d.ts.map +1 -0
- package/dist/modules/roles/entities/module.entity.js +39 -0
- package/dist/modules/roles/entities/module.entity.js.map +1 -0
- package/dist/modules/roles/entities/permission.entity.d.ts +12 -0
- package/dist/modules/roles/entities/permission.entity.d.ts.map +1 -0
- package/dist/modules/roles/entities/permission.entity.js +49 -0
- package/dist/modules/roles/entities/permission.entity.js.map +1 -0
- package/dist/modules/roles/entities/role.entity.d.ts +11 -0
- package/dist/modules/roles/entities/role.entity.d.ts.map +1 -0
- package/dist/modules/roles/entities/role.entity.js +49 -0
- package/dist/modules/roles/entities/role.entity.js.map +1 -0
- package/dist/modules/roles/index.d.ts +7 -0
- package/dist/modules/roles/index.d.ts.map +1 -0
- package/dist/modules/roles/index.js +25 -0
- package/dist/modules/roles/index.js.map +1 -0
- package/dist/modules/roles/registry/discover-manifests.d.ts +3 -0
- package/dist/modules/roles/registry/discover-manifests.d.ts.map +1 -0
- package/dist/modules/roles/registry/discover-manifests.js +83 -0
- package/dist/modules/roles/registry/discover-manifests.js.map +1 -0
- package/dist/modules/roles/registry/index.d.ts +3 -0
- package/dist/modules/roles/registry/index.d.ts.map +1 -0
- package/dist/modules/roles/registry/index.js +8 -0
- package/dist/modules/roles/registry/index.js.map +1 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.d.ts +7 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.d.ts.map +1 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.js +52 -0
- package/dist/modules/roles/registry/sync-manifests-to-db.js.map +1 -0
- package/dist/modules/roles/roles.manifest.d.ts +12 -0
- package/dist/modules/roles/roles.manifest.d.ts.map +1 -0
- package/dist/modules/roles/roles.manifest.js +51 -0
- package/dist/modules/roles/roles.manifest.js.map +1 -0
- package/dist/modules/roles/roles.module.d.ts +8 -0
- package/dist/modules/roles/roles.module.d.ts.map +1 -0
- package/dist/modules/roles/roles.module.js +43 -0
- package/dist/modules/roles/roles.module.js.map +1 -0
- package/dist/modules/roles/services/index.d.ts +6 -0
- package/dist/modules/roles/services/index.d.ts.map +1 -0
- package/dist/modules/roles/services/index.js +14 -0
- package/dist/modules/roles/services/index.js.map +1 -0
- package/dist/modules/roles/services/manifest-sync.service.d.ts +11 -0
- package/dist/modules/roles/services/manifest-sync.service.d.ts.map +1 -0
- package/dist/modules/roles/services/manifest-sync.service.js +38 -0
- package/dist/modules/roles/services/manifest-sync.service.js.map +1 -0
- package/dist/modules/roles/services/modules.service.d.ts +14 -0
- package/dist/modules/roles/services/modules.service.d.ts.map +1 -0
- package/dist/modules/roles/services/modules.service.js +69 -0
- package/dist/modules/roles/services/modules.service.js.map +1 -0
- package/dist/modules/roles/services/permissions.service.d.ts +14 -0
- package/dist/modules/roles/services/permissions.service.d.ts.map +1 -0
- package/dist/modules/roles/services/permissions.service.js +72 -0
- package/dist/modules/roles/services/permissions.service.js.map +1 -0
- package/dist/modules/roles/services/roles.service.d.ts +17 -0
- package/dist/modules/roles/services/roles.service.d.ts.map +1 -0
- package/dist/modules/roles/services/roles.service.js +100 -0
- package/dist/modules/roles/services/roles.service.js.map +1 -0
- package/dist/modules/roles/services/user-roles.service.d.ts +15 -0
- package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -0
- package/dist/modules/roles/services/user-roles.service.js +88 -0
- package/dist/modules/roles/services/user-roles.service.js.map +1 -0
- package/dist/modules/roles/types/manifest.types.d.ts +12 -0
- package/dist/modules/roles/types/manifest.types.d.ts.map +1 -0
- package/dist/modules/roles/types/manifest.types.js +3 -0
- package/dist/modules/roles/types/manifest.types.js.map +1 -0
- package/dist/modules/sessions/controllers/session.controller.d.ts +17 -0
- package/dist/modules/sessions/controllers/session.controller.d.ts.map +1 -0
- package/dist/modules/sessions/controllers/session.controller.js +95 -0
- package/dist/modules/sessions/controllers/session.controller.js.map +1 -0
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts +21 -0
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -0
- package/dist/modules/sessions/entities/refresh-token.entity.js +77 -0
- package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -0
- package/dist/modules/sessions/index.d.ts +4 -0
- package/dist/modules/sessions/index.d.ts.map +1 -0
- package/dist/modules/sessions/index.js +20 -0
- package/dist/modules/sessions/index.js.map +1 -0
- package/dist/modules/sessions/services/token.service.d.ts +42 -0
- package/dist/modules/sessions/services/token.service.d.ts.map +1 -0
- package/dist/modules/sessions/services/token.service.js +253 -0
- package/dist/modules/sessions/services/token.service.js.map +1 -0
- package/dist/modules/sessions/sessions.module.d.ts +3 -0
- package/dist/modules/sessions/sessions.module.d.ts.map +1 -0
- package/dist/modules/sessions/sessions.module.js +28 -0
- package/dist/modules/sessions/sessions.module.js.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts +60 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.js +78 -0
- package/dist/modules/settings/constants/settings.defaults.js.map +1 -0
- package/dist/modules/settings/constants/settings.keys.d.ts +56 -0
- package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -0
- package/dist/modules/settings/constants/settings.keys.js +58 -0
- package/dist/modules/settings/constants/settings.keys.js.map +1 -0
- package/dist/modules/settings/controllers/settings.controller.d.ts +13 -0
- package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -0
- package/dist/modules/settings/controllers/settings.controller.js +91 -0
- package/dist/modules/settings/controllers/settings.controller.js.map +1 -0
- package/dist/modules/settings/dto/settings.dto.d.ts +4 -0
- package/dist/modules/settings/dto/settings.dto.d.ts.map +1 -0
- package/dist/modules/settings/dto/settings.dto.js +24 -0
- package/dist/modules/settings/dto/settings.dto.js.map +1 -0
- package/dist/modules/settings/entities/app-setting.entity.d.ts +13 -0
- package/dist/modules/settings/entities/app-setting.entity.d.ts.map +1 -0
- package/dist/modules/settings/entities/app-setting.entity.js +56 -0
- package/dist/modules/settings/entities/app-setting.entity.js.map +1 -0
- package/dist/modules/settings/index.d.ts +8 -0
- package/dist/modules/settings/index.d.ts.map +1 -0
- package/dist/modules/settings/index.js +24 -0
- package/dist/modules/settings/index.js.map +1 -0
- package/dist/modules/settings/services/settings.service.d.ts +23 -0
- package/dist/modules/settings/services/settings.service.d.ts.map +1 -0
- package/dist/modules/settings/services/settings.service.js +116 -0
- package/dist/modules/settings/services/settings.service.js.map +1 -0
- package/dist/modules/settings/settings.manifest.d.ts +7 -0
- package/dist/modules/settings/settings.manifest.d.ts.map +1 -0
- package/dist/modules/settings/settings.manifest.js +25 -0
- package/dist/modules/settings/settings.manifest.js.map +1 -0
- package/dist/modules/settings/settings.module.d.ts +3 -0
- package/dist/modules/settings/settings.module.d.ts.map +1 -0
- package/dist/modules/settings/settings.module.js +27 -0
- package/dist/modules/settings/settings.module.js.map +1 -0
- package/dist/modules/users/controllers/users.controller.d.ts +41 -0
- package/dist/modules/users/controllers/users.controller.d.ts.map +1 -0
- package/dist/modules/users/controllers/users.controller.js +273 -0
- package/dist/modules/users/controllers/users.controller.js.map +1 -0
- package/dist/modules/users/dto/user.dto.d.ts +52 -0
- package/dist/modules/users/dto/user.dto.d.ts.map +1 -0
- package/dist/modules/users/dto/user.dto.js +139 -0
- package/dist/modules/users/dto/user.dto.js.map +1 -0
- package/dist/modules/users/entities/user.entity.d.ts +33 -0
- package/dist/modules/users/entities/user.entity.d.ts.map +1 -0
- package/dist/modules/users/entities/user.entity.js +130 -0
- package/dist/modules/users/entities/user.entity.js.map +1 -0
- package/dist/modules/users/index.d.ts +7 -0
- package/dist/modules/users/index.d.ts.map +1 -0
- package/dist/modules/users/index.js +23 -0
- package/dist/modules/users/index.js.map +1 -0
- package/dist/modules/users/services/invite.service.d.ts +35 -0
- package/dist/modules/users/services/invite.service.d.ts.map +1 -0
- package/dist/modules/users/services/invite.service.js +236 -0
- package/dist/modules/users/services/invite.service.js.map +1 -0
- package/dist/modules/users/services/users.service.d.ts +40 -0
- package/dist/modules/users/services/users.service.d.ts.map +1 -0
- package/dist/modules/users/services/users.service.js +239 -0
- package/dist/modules/users/services/users.service.js.map +1 -0
- package/dist/modules/users/users.manifest.d.ts +12 -0
- package/dist/modules/users/users.manifest.d.ts.map +1 -0
- package/dist/modules/users/users.manifest.js +43 -0
- package/dist/modules/users/users.manifest.js.map +1 -0
- package/dist/modules/users/users.module.d.ts +3 -0
- package/dist/modules/users/users.module.d.ts.map +1 -0
- package/dist/modules/users/users.module.js +36 -0
- package/dist/modules/users/users.module.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +140 -0
|
@@ -0,0 +1,217 @@
|
|
|
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 RegistrationService_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.RegistrationService = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const libphonenumber_js_1 = require("libphonenumber-js");
|
|
16
|
+
const users_service_1 = require("../../users/services/users.service");
|
|
17
|
+
const token_service_1 = require("../../sessions/services/token.service");
|
|
18
|
+
const invite_service_1 = require("../../users/services/invite.service");
|
|
19
|
+
const providers_1 = require("../providers");
|
|
20
|
+
const roles_service_1 = require("../../roles/services/roles.service");
|
|
21
|
+
const user_roles_service_1 = require("../../roles/services/user-roles.service");
|
|
22
|
+
const settings_service_1 = require("../../settings/services/settings.service");
|
|
23
|
+
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
24
|
+
let RegistrationService = RegistrationService_1 = class RegistrationService {
|
|
25
|
+
constructor(usersService, tokenService, inviteService, providerRegistry, rolesService, userRolesService, settingsService) {
|
|
26
|
+
this.usersService = usersService;
|
|
27
|
+
this.tokenService = tokenService;
|
|
28
|
+
this.inviteService = inviteService;
|
|
29
|
+
this.providerRegistry = providerRegistry;
|
|
30
|
+
this.rolesService = rolesService;
|
|
31
|
+
this.userRolesService = userRolesService;
|
|
32
|
+
this.settingsService = settingsService;
|
|
33
|
+
this.logger = new common_1.Logger(RegistrationService_1.name);
|
|
34
|
+
}
|
|
35
|
+
async register(dto, deviceInfo, ipAddress) {
|
|
36
|
+
if (dto._authMethod === 'phone') {
|
|
37
|
+
return this.registerWithPhone(dto, deviceInfo, ipAddress);
|
|
38
|
+
}
|
|
39
|
+
return this.registerWithEmail(dto, deviceInfo, ipAddress);
|
|
40
|
+
}
|
|
41
|
+
async acceptInvite(dto, deviceInfo, ipAddress) {
|
|
42
|
+
let resolvedPhone;
|
|
43
|
+
if (dto._authMethod === 'phone') {
|
|
44
|
+
resolvedPhone = await this.tokenService.verifyPhoneVerifiedToken(dto.verificationToken);
|
|
45
|
+
}
|
|
46
|
+
let identity;
|
|
47
|
+
const matchedUser = await this.inviteService.findMatchingInvitedUser(dto);
|
|
48
|
+
if (dto._authMethod === 'email') {
|
|
49
|
+
const provider = this.providerRegistry.getActiveProvider();
|
|
50
|
+
identity = await provider.acceptInvite(matchedUser.email, dto.password, {
|
|
51
|
+
firstName: dto.firstName,
|
|
52
|
+
lastName: dto.lastName,
|
|
53
|
+
countryCode: matchedUser.countryCode,
|
|
54
|
+
phone: resolvedPhone,
|
|
55
|
+
photoUrl: matchedUser.photoUrl,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
identity = {
|
|
60
|
+
email: matchedUser.email,
|
|
61
|
+
firstName: dto.firstName,
|
|
62
|
+
lastName: dto.lastName,
|
|
63
|
+
countryCode: matchedUser.countryCode,
|
|
64
|
+
phone: resolvedPhone,
|
|
65
|
+
photoUrl: matchedUser.photoUrl,
|
|
66
|
+
isEmailVerified: matchedUser.isEmailVerified,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
const user = await this.inviteService
|
|
70
|
+
.acceptInvite({
|
|
71
|
+
...dto,
|
|
72
|
+
uid: identity.externalUid,
|
|
73
|
+
phone: identity.phone,
|
|
74
|
+
countryCode: identity.countryCode,
|
|
75
|
+
email: identity.email,
|
|
76
|
+
}, matchedUser, resolvedPhone)
|
|
77
|
+
.catch(async (err) => {
|
|
78
|
+
if (identity.externalUid) {
|
|
79
|
+
const provider = this.providerRegistry.getActiveProvider();
|
|
80
|
+
await provider.deleteUser(identity.externalUid).catch(() => {
|
|
81
|
+
this.logger.error(`Failed to rollback provider user ${identity.externalUid} after invite acceptance failed`);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
throw err;
|
|
85
|
+
});
|
|
86
|
+
this.logRegistration({
|
|
87
|
+
userId: user.id,
|
|
88
|
+
method: dto._authMethod ?? 'phone',
|
|
89
|
+
event: 'INVITE_ACCEPTED',
|
|
90
|
+
ipAddress,
|
|
91
|
+
deviceInfo,
|
|
92
|
+
});
|
|
93
|
+
return this.tokenService.generateTokens({ user, ipAddress, deviceInfo });
|
|
94
|
+
}
|
|
95
|
+
async registerWithPhone(dto, deviceInfo, ipAddress) {
|
|
96
|
+
const phoneNumber = await this.tokenService.verifyPhoneVerifiedToken(dto.verificationToken);
|
|
97
|
+
await this.assertPhoneUnique(phoneNumber);
|
|
98
|
+
if (dto.email)
|
|
99
|
+
await this.assertEmailUnique(dto.email);
|
|
100
|
+
const countryCode = this.extractCountryCode(phoneNumber) ?? '+000';
|
|
101
|
+
const user = await this.usersService.create({
|
|
102
|
+
firstName: dto.firstName,
|
|
103
|
+
lastName: dto.lastName,
|
|
104
|
+
phoneNumber,
|
|
105
|
+
countryCode,
|
|
106
|
+
email: dto.email,
|
|
107
|
+
isPhoneVerified: true,
|
|
108
|
+
isEmailVerified: false,
|
|
109
|
+
});
|
|
110
|
+
await this.assignDefaultRole(user.id);
|
|
111
|
+
await this.usersService.updateLastLogin(user.id);
|
|
112
|
+
this.logRegistration({
|
|
113
|
+
userId: user.id,
|
|
114
|
+
method: 'phone',
|
|
115
|
+
event: 'REGISTER_SUCCESS',
|
|
116
|
+
ipAddress,
|
|
117
|
+
deviceInfo,
|
|
118
|
+
});
|
|
119
|
+
return this.tokenService.generateTokens({ user, ipAddress, deviceInfo });
|
|
120
|
+
}
|
|
121
|
+
async registerWithEmail(dto, deviceInfo, ipAddress) {
|
|
122
|
+
await this.assertEmailUnique(dto.email);
|
|
123
|
+
if (dto.phone)
|
|
124
|
+
await this.assertPhoneUnique(dto.phone);
|
|
125
|
+
const provider = this.providerRegistry.getActiveProvider();
|
|
126
|
+
const identity = await provider.createUser(dto.email, dto.password, {
|
|
127
|
+
firstName: dto.firstName,
|
|
128
|
+
lastName: dto.lastName,
|
|
129
|
+
countryCode: dto.countryCode,
|
|
130
|
+
phone: dto.phone,
|
|
131
|
+
});
|
|
132
|
+
let createdUser;
|
|
133
|
+
try {
|
|
134
|
+
createdUser = await this.usersService.create({
|
|
135
|
+
uid: identity.externalUid,
|
|
136
|
+
email: identity.email,
|
|
137
|
+
firstName: identity.firstName,
|
|
138
|
+
lastName: identity.lastName,
|
|
139
|
+
passwordHash: identity.passwordHash,
|
|
140
|
+
countryCode: identity.countryCode ?? dto.countryCode,
|
|
141
|
+
phoneNumber: identity.phone ?? dto.phone,
|
|
142
|
+
isEmailVerified: identity.isEmailVerified ?? false,
|
|
143
|
+
isPhoneVerified: false,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
catch (err) {
|
|
147
|
+
await provider.deleteUser(identity.externalUid).catch(() => {
|
|
148
|
+
this.logger.error(`Failed to rollback provider user ${identity.externalUid} after DB insert failed`);
|
|
149
|
+
});
|
|
150
|
+
throw err;
|
|
151
|
+
}
|
|
152
|
+
await this.assignDefaultRole(createdUser.id);
|
|
153
|
+
await this.usersService.updateLastLogin(createdUser.id);
|
|
154
|
+
this.logRegistration({
|
|
155
|
+
userId: createdUser.id,
|
|
156
|
+
method: 'email',
|
|
157
|
+
event: 'REGISTER_SUCCESS',
|
|
158
|
+
provider: provider.name,
|
|
159
|
+
ipAddress,
|
|
160
|
+
deviceInfo,
|
|
161
|
+
});
|
|
162
|
+
return this.tokenService.generateTokens({ user: createdUser, ipAddress, deviceInfo });
|
|
163
|
+
}
|
|
164
|
+
async assertEmailUnique(email) {
|
|
165
|
+
const existing = await this.usersService.findBy({ email });
|
|
166
|
+
if (existing)
|
|
167
|
+
throw new common_1.ConflictException('An account with this email already exists.');
|
|
168
|
+
}
|
|
169
|
+
async assertPhoneUnique(phoneNumber) {
|
|
170
|
+
const existing = await this.usersService.findBy({ phoneNumber });
|
|
171
|
+
if (existing)
|
|
172
|
+
throw new common_1.ConflictException('An account with this phone number already exists. Please login.');
|
|
173
|
+
}
|
|
174
|
+
extractCountryCode(phoneNumber) {
|
|
175
|
+
try {
|
|
176
|
+
const parsed = (0, libphonenumber_js_1.parsePhoneNumberWithError)(phoneNumber);
|
|
177
|
+
return `+${parsed.countryCallingCode}`;
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
async assignDefaultRole(userId) {
|
|
184
|
+
const slug = this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_DEFAULT_ROLE_SLUG).trim();
|
|
185
|
+
if (!slug)
|
|
186
|
+
return;
|
|
187
|
+
const role = await this.rolesService.findBySlug(slug);
|
|
188
|
+
if (!role) {
|
|
189
|
+
this.logger.warn(`Default role slug "${slug}" not found in DB — skipping role assignment for user ${userId}`);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
await this.userRolesService.assignRoles(userId, { roleIds: [role.id] });
|
|
193
|
+
this.logger.log({ event: 'DEFAULT_ROLE_ASSIGNED', userId, roleSlug: slug });
|
|
194
|
+
}
|
|
195
|
+
logRegistration(args) {
|
|
196
|
+
this.logger.log({
|
|
197
|
+
event: args.event,
|
|
198
|
+
userId: args.userId,
|
|
199
|
+
method: args.method,
|
|
200
|
+
provider: args.provider ?? 'native',
|
|
201
|
+
ipAddress: args.ipAddress,
|
|
202
|
+
deviceInfo: args.deviceInfo,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
exports.RegistrationService = RegistrationService;
|
|
207
|
+
exports.RegistrationService = RegistrationService = RegistrationService_1 = __decorate([
|
|
208
|
+
(0, common_1.Injectable)(),
|
|
209
|
+
__metadata("design:paramtypes", [users_service_1.UsersService,
|
|
210
|
+
token_service_1.TokenService,
|
|
211
|
+
invite_service_1.InviteService,
|
|
212
|
+
providers_1.AuthProviderRegistry,
|
|
213
|
+
roles_service_1.RolesService,
|
|
214
|
+
user_roles_service_1.UserRolesService,
|
|
215
|
+
settings_service_1.SettingsService])
|
|
216
|
+
], RegistrationService);
|
|
217
|
+
//# sourceMappingURL=registration.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.service.js","sourceRoot":"","sources":["../../../../modules/auth/services/registration.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAuE;AACvE,yDAA8D;AAC9D,sEAAkE;AAClE,yEAAqE;AAGrE,wEAAoE;AACpE,4CAAkE;AAElE,sEAAkE;AAClE,gFAA2E;AAC3E,+EAA2E;AAC3E,0EAAsE;AAG/D,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAG/B,YACkB,YAA0B,EAC1B,YAA0B,EAC1B,aAA4B,EAC5B,gBAAsC,EACtC,YAA0B,EAC1B,gBAAkC,EAClC,eAAgC;QANhC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;QAC5B,qBAAgB,GAAhB,gBAAgB,CAAsB;QACtC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,oBAAe,GAAf,eAAe,CAAiB;QATjC,WAAM,GAAG,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IAU5D,CAAC;IAIJ,KAAK,CAAC,QAAQ,CACb,GAAgB,EAChB,UAAmB,EACnB,SAAkB;QAElB,IAAI,GAAG,CAAC,WAAW,KAAK,OAAO,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,CA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,CAAC,MAAM,CAAC,IAAI,CACf,sBAAsB,IAAI,yDAAyD,MAAM,EAAE,CAC3F,CAAC;YACF,OAAO;QACR,CAAC;QAED,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACxE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC;IAIO,eAAe,CAAC,IAOvB;QACA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,QAAQ;YACnC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC3B,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AArQY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAKoB,4BAAY;QACZ,4BAAY;QACX,8BAAa;QACV,gCAAoB;QACxB,4BAAY;QACR,qCAAgB;QACjB,kCAAe;GAVtC,mBAAmB,CAqQ/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/notifications/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./notifications.controller"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/notifications/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { User } from '../../users/entities/user.entity';
|
|
2
|
+
import { FcmService } from '../services/fcm.service';
|
|
3
|
+
import { NotificationsService } from '../services/notifications.service';
|
|
4
|
+
import { RegisterDeviceDto, RemoveDeviceDto, NotificationQueryDto } from '../dto';
|
|
5
|
+
export declare class NotificationsController {
|
|
6
|
+
private readonly fcmService;
|
|
7
|
+
private readonly notificationsService;
|
|
8
|
+
constructor(fcmService: FcmService, notificationsService: NotificationsService);
|
|
9
|
+
registerDevice(user: User, dto: RegisterDeviceDto): Promise<{
|
|
10
|
+
message: string;
|
|
11
|
+
deviceId: string;
|
|
12
|
+
}>;
|
|
13
|
+
removeDevice(dto: RemoveDeviceDto): Promise<{
|
|
14
|
+
message: string;
|
|
15
|
+
}>;
|
|
16
|
+
getDevices(user: User): Promise<{
|
|
17
|
+
id: string;
|
|
18
|
+
deviceType: import("../entities").DeviceType;
|
|
19
|
+
deviceName: string | undefined;
|
|
20
|
+
lastUsedAt: Date | undefined;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
}[]>;
|
|
23
|
+
getNotifications(user: User, query: NotificationQueryDto): Promise<import("../../..").PaginatedResult<import("../entities").Notification>>;
|
|
24
|
+
getUnreadCount(user: User): Promise<{
|
|
25
|
+
count: number;
|
|
26
|
+
}>;
|
|
27
|
+
markAsRead(user: User, id: string): Promise<{
|
|
28
|
+
message: string;
|
|
29
|
+
}>;
|
|
30
|
+
markAllAsRead(user: User): Promise<{
|
|
31
|
+
message: string;
|
|
32
|
+
count: number;
|
|
33
|
+
}>;
|
|
34
|
+
deleteNotification(user: User, id: string): Promise<{
|
|
35
|
+
message: string;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=notifications.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.controller.d.ts","sourceRoot":"","sources":["../../../../modules/notifications/controllers/notifications.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAElF,qBAEa,uBAAuB;IAElC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBADpB,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,oBAAoB;IAOtD,cAAc,CAAgB,IAAI,EAAE,IAAI,EAAU,GAAG,EAAE,iBAAiB;;;;IAmBxE,YAAY,CAAS,GAAG,EAAE,eAAe;;;IASzC,UAAU,CAAgB,IAAI,EAAE,IAAI;;;;;;;IAmBpC,gBAAgB,CAAgB,IAAI,EAAE,IAAI,EAAW,KAAK,EAAE,oBAAoB;IAQhF,cAAc,CAAgB,IAAI,EAAE,IAAI;;;IAUxC,UAAU,CAAgB,IAAI,EAAE,IAAI,EAAe,EAAE,EAAE,MAAM;;;IAU7D,aAAa,CAAgB,IAAI,EAAE,IAAI;;;;IAUvC,kBAAkB,CAAgB,IAAI,EAAE,IAAI,EAAe,EAAE,EAAE,MAAM;;;CAI3E"}
|
|
@@ -0,0 +1,140 @@
|
|
|
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.NotificationsController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const auth_guard_1 = require("../../../common/guards/auth.guard");
|
|
18
|
+
const decorators_1 = require("../../../common/decorators");
|
|
19
|
+
const user_entity_1 = require("../../users/entities/user.entity");
|
|
20
|
+
const fcm_service_1 = require("../services/fcm.service");
|
|
21
|
+
const notifications_service_1 = require("../services/notifications.service");
|
|
22
|
+
const dto_1 = require("../dto");
|
|
23
|
+
let NotificationsController = class NotificationsController {
|
|
24
|
+
constructor(fcmService, notificationsService) {
|
|
25
|
+
this.fcmService = fcmService;
|
|
26
|
+
this.notificationsService = notificationsService;
|
|
27
|
+
}
|
|
28
|
+
async registerDevice(user, dto) {
|
|
29
|
+
const device = await this.fcmService.registerDeviceToken(user.id, dto.fcmToken, dto.deviceType, dto.deviceName);
|
|
30
|
+
return {
|
|
31
|
+
message: 'Device registered successfully',
|
|
32
|
+
deviceId: device.id,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
async removeDevice(dto) {
|
|
36
|
+
await this.fcmService.removeDeviceToken(dto.fcmToken);
|
|
37
|
+
return { message: 'Device removed successfully' };
|
|
38
|
+
}
|
|
39
|
+
async getDevices(user) {
|
|
40
|
+
const devices = await this.fcmService.getUserDeviceTokens(user.id);
|
|
41
|
+
return devices.map((d) => ({
|
|
42
|
+
id: d.id,
|
|
43
|
+
deviceType: d.deviceType,
|
|
44
|
+
deviceName: d.deviceName,
|
|
45
|
+
lastUsedAt: d.lastUsedAt,
|
|
46
|
+
createdAt: d.createdAt,
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
async getNotifications(user, query) {
|
|
50
|
+
return this.notificationsService.findUserNotifications(user.id, query);
|
|
51
|
+
}
|
|
52
|
+
async getUnreadCount(user) {
|
|
53
|
+
const count = await this.notificationsService.getUnreadCount(user.id);
|
|
54
|
+
return { count };
|
|
55
|
+
}
|
|
56
|
+
async markAsRead(user, id) {
|
|
57
|
+
await this.notificationsService.markAsRead(user.id, id);
|
|
58
|
+
return { message: 'Notification marked as read' };
|
|
59
|
+
}
|
|
60
|
+
async markAllAsRead(user) {
|
|
61
|
+
const count = await this.notificationsService.markAllAsRead(user.id);
|
|
62
|
+
return { message: 'All notifications marked as read', count };
|
|
63
|
+
}
|
|
64
|
+
async deleteNotification(user, id) {
|
|
65
|
+
await this.notificationsService.deleteNotification(user.id, id);
|
|
66
|
+
return { message: 'Notification deleted' };
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.NotificationsController = NotificationsController;
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, common_1.Post)('devices'),
|
|
72
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
73
|
+
__param(1, (0, common_1.Body)()),
|
|
74
|
+
__metadata("design:type", Function),
|
|
75
|
+
__metadata("design:paramtypes", [user_entity_1.User, dto_1.RegisterDeviceDto]),
|
|
76
|
+
__metadata("design:returntype", Promise)
|
|
77
|
+
], NotificationsController.prototype, "registerDevice", null);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, common_1.Delete)('devices'),
|
|
80
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
81
|
+
__param(0, (0, common_1.Body)()),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [dto_1.RemoveDeviceDto]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], NotificationsController.prototype, "removeDevice", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, common_1.Get)('devices'),
|
|
88
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [user_entity_1.User]),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], NotificationsController.prototype, "getDevices", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, common_1.Get)(),
|
|
95
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
96
|
+
__param(1, (0, common_1.Query)()),
|
|
97
|
+
__metadata("design:type", Function),
|
|
98
|
+
__metadata("design:paramtypes", [user_entity_1.User, dto_1.NotificationQueryDto]),
|
|
99
|
+
__metadata("design:returntype", Promise)
|
|
100
|
+
], NotificationsController.prototype, "getNotifications", null);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, common_1.Get)('unread/count'),
|
|
103
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
104
|
+
__metadata("design:type", Function),
|
|
105
|
+
__metadata("design:paramtypes", [user_entity_1.User]),
|
|
106
|
+
__metadata("design:returntype", Promise)
|
|
107
|
+
], NotificationsController.prototype, "getUnreadCount", null);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, common_1.Patch)(':id/read'),
|
|
110
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
111
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
112
|
+
__param(1, (0, common_1.Param)('id')),
|
|
113
|
+
__metadata("design:type", Function),
|
|
114
|
+
__metadata("design:paramtypes", [user_entity_1.User, String]),
|
|
115
|
+
__metadata("design:returntype", Promise)
|
|
116
|
+
], NotificationsController.prototype, "markAsRead", null);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, common_1.Patch)('read-all'),
|
|
119
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
120
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
121
|
+
__metadata("design:type", Function),
|
|
122
|
+
__metadata("design:paramtypes", [user_entity_1.User]),
|
|
123
|
+
__metadata("design:returntype", Promise)
|
|
124
|
+
], NotificationsController.prototype, "markAllAsRead", null);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, common_1.Delete)(':id'),
|
|
127
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
128
|
+
__param(0, (0, decorators_1.CurrentUser)()),
|
|
129
|
+
__param(1, (0, common_1.Param)('id')),
|
|
130
|
+
__metadata("design:type", Function),
|
|
131
|
+
__metadata("design:paramtypes", [user_entity_1.User, String]),
|
|
132
|
+
__metadata("design:returntype", Promise)
|
|
133
|
+
], NotificationsController.prototype, "deleteNotification", null);
|
|
134
|
+
exports.NotificationsController = NotificationsController = __decorate([
|
|
135
|
+
(0, common_1.Controller)('notifications'),
|
|
136
|
+
(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard),
|
|
137
|
+
__metadata("design:paramtypes", [fcm_service_1.FcmService,
|
|
138
|
+
notifications_service_1.NotificationsService])
|
|
139
|
+
], NotificationsController);
|
|
140
|
+
//# sourceMappingURL=notifications.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.controller.js","sourceRoot":"","sources":["../../../../modules/notifications/controllers/notifications.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAYwB;AACxB,kEAAiE;AACjE,2DAAyD;AACzD,kEAAwD;AACxD,yDAAqD;AACrD,6EAAyE;AACzE,gCAAkF;AAI3E,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACnC,YACkB,UAAsB,EACtB,oBAA0C;QAD1C,eAAU,GAAV,UAAU,CAAY;QACtB,yBAAoB,GAApB,oBAAoB,CAAsB;IACzD,CAAC;IAME,AAAN,KAAK,CAAC,cAAc,CAAgB,IAAU,EAAU,GAAsB;QAC7E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CACvD,IAAI,CAAC,EAAE,EACP,GAAG,CAAC,QAAQ,EACZ,GAAG,CAAC,UAAU,EACd,GAAG,CAAC,UAAU,CACd,CAAC;QAEF,OAAO;YACN,OAAO,EAAE,gCAAgC;YACzC,QAAQ,EAAE,MAAM,CAAC,EAAE;SACnB,CAAC;IACH,CAAC;IAOK,AAAN,KAAK,CAAC,YAAY,CAAS,GAAoB;QAC9C,MAAM,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACtD,OAAO,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IACnD,CAAC;IAMK,AAAN,KAAK,CAAC,UAAU,CAAgB,IAAU;QACzC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC1B,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,UAAU,EAAE,CAAC,CAAC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AA,kBAAS,EAAC,yBAAY,CAAC;qCAGO,wBAAU;QACA,4CAAoB;GAHhD,uBAAuB,CAmGnC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DeviceType } from '../entities/device-token.entity';
|
|
2
|
+
export declare class RegisterDeviceDto {
|
|
3
|
+
fcmToken: string;
|
|
4
|
+
deviceType: DeviceType;
|
|
5
|
+
deviceName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class RemoveDeviceDto {
|
|
8
|
+
fcmToken: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=device.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.dto.d.ts","sourceRoot":"","sources":["../../../../modules/notifications/dto/device.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,qBAAa,iBAAiB;IAE7B,QAAQ,EAAG,MAAM,CAAC;IAGlB,UAAU,EAAG,UAAU,CAAC;IAIxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,eAAe;IAE3B,QAAQ,EAAG,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RemoveDeviceDto = exports.RegisterDeviceDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const device_token_entity_1 = require("../entities/device-token.entity");
|
|
15
|
+
class RegisterDeviceDto {
|
|
16
|
+
}
|
|
17
|
+
exports.RegisterDeviceDto = RegisterDeviceDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], RegisterDeviceDto.prototype, "fcmToken", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsEnum)(device_token_entity_1.DeviceType),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], RegisterDeviceDto.prototype, "deviceType", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], RegisterDeviceDto.prototype, "deviceName", void 0);
|
|
31
|
+
class RemoveDeviceDto {
|
|
32
|
+
}
|
|
33
|
+
exports.RemoveDeviceDto = RemoveDeviceDto;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], RemoveDeviceDto.prototype, "fcmToken", void 0);
|
|
38
|
+
//# sourceMappingURL=device.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.dto.js","sourceRoot":"","sources":["../../../../modules/notifications/dto/device.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,yEAA6D;AAE7D,MAAa,iBAAiB;CAU7B;AAVD,8CAUC;AARA;IADC,IAAA,0BAAQ,GAAE;;mDACO;AAGlB;IADC,IAAA,wBAAM,EAAC,gCAAU,CAAC;;qDACK;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACO;AAGrB,MAAa,eAAe;CAG3B;AAHD,0CAGC;AADA;IADC,IAAA,0BAAQ,GAAE;;iDACO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-types.dto.d.ts","sourceRoot":"","sources":["../../../../modules/notifications/dto/event-types.dto.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC9B,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,IAAI,SAAS;CACb"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationChannel = void 0;
|
|
4
|
+
var NotificationChannel;
|
|
5
|
+
(function (NotificationChannel) {
|
|
6
|
+
NotificationChannel["WEBSOCKET"] = "websocket";
|
|
7
|
+
NotificationChannel["FCM"] = "fcm";
|
|
8
|
+
NotificationChannel["BOTH"] = "both";
|
|
9
|
+
})(NotificationChannel || (exports.NotificationChannel = NotificationChannel = {}));
|
|
10
|
+
//# sourceMappingURL=event-types.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-types.dto.js","sourceRoot":"","sources":["../../../../modules/notifications/dto/event-types.dto.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC9B,8CAAuB,CAAA;IACvB,kCAAW,CAAA;IACX,oCAAa,CAAA;AACd,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NotificationChannel } from './event-types.dto';
|
|
2
|
+
export interface FcmNotificationData {
|
|
3
|
+
title: string;
|
|
4
|
+
body: string;
|
|
5
|
+
data?: Record<string, string>;
|
|
6
|
+
imageUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SendNotificationDto {
|
|
9
|
+
userId: string;
|
|
10
|
+
eventType: string;
|
|
11
|
+
payload: Record<string, unknown>;
|
|
12
|
+
channel?: NotificationChannel;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=fcm.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fcm.dto.d.ts","sourceRoot":"","sources":["../../../../modules/notifications/dto/fcm.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fcm.dto.js","sourceRoot":"","sources":["../../../../modules/notifications/dto/fcm.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/notifications/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./device.dto"), exports);
|
|
18
|
+
__exportStar(require("./event-types.dto"), exports);
|
|
19
|
+
__exportStar(require("./fcm.dto"), exports);
|
|
20
|
+
__exportStar(require("./user-device-token.dto"), exports);
|
|
21
|
+
__exportStar(require("./notification-query.dto"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/notifications/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,oDAAkC;AAClC,4CAA0B;AAC1B,0DAAwC;AACxC,2DAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-query.dto.d.ts","sourceRoot":"","sources":["../../../../modules/notifications/dto/notification-query.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,qBAAa,oBAAoB;IAKhC,IAAI,CAAC,EAAE,MAAM,CAAC;IAMd,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,MAAM,CAAC,EAAE,OAAO,CAAC;IAIjB,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACxB"}
|