@hed-hog/core 0.0.387 → 0.0.390
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/README.md +12 -11
- package/dist/access-log/access-log.interceptor.d.ts.map +1 -1
- package/dist/access-log/access-log.interceptor.js +4 -2
- package/dist/access-log/access-log.interceptor.js.map +1 -1
- package/dist/ai/ai-attachment.fragments.d.ts +23 -0
- package/dist/ai/ai-attachment.fragments.d.ts.map +1 -0
- package/dist/ai/ai-attachment.fragments.js +34 -0
- package/dist/ai/ai-attachment.fragments.js.map +1 -0
- package/dist/ai/ai.controller.d.ts +7 -16
- package/dist/ai/ai.controller.d.ts.map +1 -1
- package/dist/ai/ai.prompts.d.ts +16 -0
- package/dist/ai/ai.prompts.d.ts.map +1 -0
- package/dist/ai/ai.prompts.js +37 -0
- package/dist/ai/ai.prompts.js.map +1 -0
- package/dist/ai/ai.service.d.ts +63 -12
- package/dist/ai/ai.service.d.ts.map +1 -1
- package/dist/ai/ai.service.js +215 -88
- package/dist/ai/ai.service.js.map +1 -1
- package/dist/ai/dto/chat.dto.d.ts +4 -1
- package/dist/ai/dto/chat.dto.d.ts.map +1 -1
- package/dist/ai/dto/chat.dto.js +23 -1
- package/dist/ai/dto/chat.dto.js.map +1 -1
- package/dist/ai/dto/create-agent.dto.d.ts +1 -1
- package/dist/ai/dto/create-agent.dto.d.ts.map +1 -1
- package/dist/ai/dto/create-agent.dto.js +1 -1
- package/dist/ai/dto/create-agent.dto.js.map +1 -1
- package/dist/ai/dto/update-agent.dto.d.ts +1 -1
- package/dist/ai/dto/update-agent.dto.d.ts.map +1 -1
- package/dist/ai/dto/update-agent.dto.js +1 -1
- package/dist/ai/dto/update-agent.dto.js.map +1 -1
- package/dist/ai-instruction/ai-instruction.controller.d.ts +61 -7
- package/dist/ai-instruction/ai-instruction.controller.d.ts.map +1 -1
- package/dist/ai-instruction/ai-instruction.controller.js +63 -20
- package/dist/ai-instruction/ai-instruction.controller.js.map +1 -1
- package/dist/ai-instruction/ai-instruction.module.d.ts.map +1 -1
- package/dist/ai-instruction/ai-instruction.module.js +13 -2
- package/dist/ai-instruction/ai-instruction.module.js.map +1 -1
- package/dist/ai-instruction/ai-instruction.service.d.ts +131 -6
- package/dist/ai-instruction/ai-instruction.service.d.ts.map +1 -1
- package/dist/ai-instruction/ai-instruction.service.js +533 -60
- package/dist/ai-instruction/ai-instruction.service.js.map +1 -1
- package/dist/ai-instruction/ai-prompt-builder.service.d.ts +8 -0
- package/dist/ai-instruction/ai-prompt-builder.service.d.ts.map +1 -1
- package/dist/ai-instruction/ai-prompt-builder.service.js +10 -1
- package/dist/ai-instruction/ai-prompt-builder.service.js.map +1 -1
- package/dist/ai-instruction/ai-prompt-registry.d.ts +45 -0
- package/dist/ai-instruction/ai-prompt-registry.d.ts.map +1 -0
- package/dist/ai-instruction/ai-prompt-registry.js +49 -0
- package/dist/ai-instruction/ai-prompt-registry.js.map +1 -0
- package/dist/ai-instruction/ai-prompt-resolver.service.d.ts +89 -0
- package/dist/ai-instruction/ai-prompt-resolver.service.d.ts.map +1 -0
- package/dist/ai-instruction/ai-prompt-resolver.service.js +222 -0
- package/dist/ai-instruction/ai-prompt-resolver.service.js.map +1 -0
- package/dist/ai-instruction/ai-prompt-template.util.d.ts +70 -0
- package/dist/ai-instruction/ai-prompt-template.util.d.ts.map +1 -0
- package/dist/ai-instruction/ai-prompt-template.util.js +154 -0
- package/dist/ai-instruction/ai-prompt-template.util.js.map +1 -0
- package/dist/ai-instruction/dto/create-ai-instruction.dto.d.ts +5 -0
- package/dist/ai-instruction/dto/create-ai-instruction.dto.d.ts.map +1 -1
- package/dist/ai-instruction/dto/create-ai-instruction.dto.js +27 -1
- package/dist/ai-instruction/dto/create-ai-instruction.dto.js.map +1 -1
- package/dist/ai-instruction/dto/preview-ai-instruction.dto.d.ts +14 -0
- package/dist/ai-instruction/dto/preview-ai-instruction.dto.d.ts.map +1 -0
- package/dist/ai-instruction/dto/preview-ai-instruction.dto.js +42 -0
- package/dist/ai-instruction/dto/preview-ai-instruction.dto.js.map +1 -0
- package/dist/ai-instruction/dto/update-ai-instruction.dto.d.ts +11 -0
- package/dist/ai-instruction/dto/update-ai-instruction.dto.d.ts.map +1 -1
- package/dist/ai-instruction/dto/update-ai-instruction.dto.js +34 -0
- package/dist/ai-instruction/dto/update-ai-instruction.dto.js.map +1 -1
- package/dist/ai-instruction/types/ai-instruction.types.d.ts +13 -1
- package/dist/ai-instruction/types/ai-instruction.types.d.ts.map +1 -1
- package/dist/ai-instruction/types/ai-instruction.types.js +10 -0
- package/dist/ai-instruction/types/ai-instruction.types.js.map +1 -1
- package/dist/auth/auth.controller.d.ts +24 -9
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.controller.js +49 -21
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/auth/auth.service.d.ts +33 -8
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +78 -29
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/captcha/captcha.module.d.ts +3 -0
- package/dist/captcha/captcha.module.d.ts.map +1 -0
- package/dist/captcha/captcha.module.js +23 -0
- package/dist/captcha/captcha.module.js.map +1 -0
- package/dist/captcha/captcha.service.d.ts +38 -0
- package/dist/captcha/captcha.service.d.ts.map +1 -0
- package/dist/captcha/captcha.service.js +144 -0
- package/dist/captcha/captcha.service.js.map +1 -0
- package/dist/challenge/challenge.service.d.ts +16 -7
- package/dist/challenge/challenge.service.d.ts.map +1 -1
- package/dist/challenge/challenge.service.js +64 -16
- package/dist/challenge/challenge.service.js.map +1 -1
- package/dist/core.module.d.ts +3 -1
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +29 -2
- package/dist/core.module.js.map +1 -1
- package/dist/dashboard/dashboard/dashboard.controller.d.ts +15 -15
- package/dist/dashboard/dashboard/dashboard.service.d.ts +15 -15
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +6 -6
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +6 -6
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts +20 -20
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts +20 -20
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +1 -1
- package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts +13 -13
- package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts +13 -13
- package/dist/file/file.service.d.ts +6 -0
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +44 -4
- package/dist/file/file.service.js.map +1 -1
- package/dist/incident/incident-notifier.service.d.ts +36 -0
- package/dist/incident/incident-notifier.service.d.ts.map +1 -0
- package/dist/incident/incident-notifier.service.js +208 -0
- package/dist/incident/incident-notifier.service.js.map +1 -0
- package/dist/incident/incident.controller.d.ts +23 -0
- package/dist/incident/incident.controller.d.ts.map +1 -0
- package/dist/incident/incident.controller.js +75 -0
- package/dist/incident/incident.controller.js.map +1 -0
- package/dist/incident/incident.module.d.ts +7 -0
- package/dist/incident/incident.module.d.ts.map +1 -0
- package/dist/incident/incident.module.js +32 -0
- package/dist/incident/incident.module.js.map +1 -0
- package/dist/incident/incident.service.d.ts +72 -0
- package/dist/incident/incident.service.d.ts.map +1 -0
- package/dist/incident/incident.service.js +184 -0
- package/dist/incident/incident.service.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -1
- package/dist/integration-profile/dto/test.dto.d.ts +13 -0
- package/dist/integration-profile/dto/test.dto.d.ts.map +1 -0
- package/dist/integration-profile/dto/test.dto.js +26 -0
- package/dist/integration-profile/dto/test.dto.js.map +1 -0
- package/dist/integration-profile/integration-profile.controller.d.ts +12 -1
- package/dist/integration-profile/integration-profile.controller.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.controller.js +9 -1
- package/dist/integration-profile/integration-profile.controller.js.map +1 -1
- package/dist/integration-profile/integration-profile.module.d.ts +6 -1
- package/dist/integration-profile/integration-profile.module.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.module.js +26 -3
- package/dist/integration-profile/integration-profile.module.js.map +1 -1
- package/dist/integration-profile/integration-profile.secrets.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.secrets.js +9 -1
- package/dist/integration-profile/integration-profile.secrets.js.map +1 -1
- package/dist/integration-profile/integration-profile.service.d.ts +26 -7
- package/dist/integration-profile/integration-profile.service.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.service.js +94 -91
- package/dist/integration-profile/integration-profile.service.js.map +1 -1
- package/dist/integration-profile/integration-profile.utils.d.ts +13 -1
- package/dist/integration-profile/integration-profile.utils.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.utils.js +20 -5
- package/dist/integration-profile/integration-profile.utils.js.map +1 -1
- package/dist/integration-profile/testers/ai.testers.d.ts +3 -0
- package/dist/integration-profile/testers/ai.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/ai.testers.js +125 -0
- package/dist/integration-profile/testers/ai.testers.js.map +1 -0
- package/dist/integration-profile/testers/captcha.testers.d.ts +3 -0
- package/dist/integration-profile/testers/captcha.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/captcha.testers.js +121 -0
- package/dist/integration-profile/testers/captcha.testers.js.map +1 -0
- package/dist/integration-profile/testers/email.testers.d.ts +3 -0
- package/dist/integration-profile/testers/email.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/email.testers.js +128 -0
- package/dist/integration-profile/testers/email.testers.js.map +1 -0
- package/dist/integration-profile/testers/http-probe.d.ts +57 -0
- package/dist/integration-profile/testers/http-probe.d.ts.map +1 -0
- package/dist/integration-profile/testers/http-probe.js +140 -0
- package/dist/integration-profile/testers/http-probe.js.map +1 -0
- package/dist/integration-profile/testers/index.d.ts +12 -0
- package/dist/integration-profile/testers/index.d.ts.map +1 -0
- package/dist/integration-profile/testers/index.js +45 -0
- package/dist/integration-profile/testers/index.js.map +1 -0
- package/dist/integration-profile/testers/infrastructure.testers.d.ts +3 -0
- package/dist/integration-profile/testers/infrastructure.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/infrastructure.testers.js +105 -0
- package/dist/integration-profile/testers/infrastructure.testers.js.map +1 -0
- package/dist/integration-profile/testers/integration-tester.registry.d.ts +17 -0
- package/dist/integration-profile/testers/integration-tester.registry.d.ts.map +1 -0
- package/dist/integration-profile/testers/integration-tester.registry.js +52 -0
- package/dist/integration-profile/testers/integration-tester.registry.js.map +1 -0
- package/dist/integration-profile/testers/integration-tester.types.d.ts +55 -0
- package/dist/integration-profile/testers/integration-tester.types.d.ts.map +1 -0
- package/dist/integration-profile/testers/integration-tester.types.js +16 -0
- package/dist/integration-profile/testers/integration-tester.types.js.map +1 -0
- package/dist/integration-profile/testers/messaging.testers.d.ts +3 -0
- package/dist/integration-profile/testers/messaging.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/messaging.testers.js +70 -0
- package/dist/integration-profile/testers/messaging.testers.js.map +1 -0
- package/dist/integration-profile/testers/oauth.testers.d.ts +3 -0
- package/dist/integration-profile/testers/oauth.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/oauth.testers.js +285 -0
- package/dist/integration-profile/testers/oauth.testers.js.map +1 -0
- package/dist/integration-profile/testers/payment.testers.d.ts +3 -0
- package/dist/integration-profile/testers/payment.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/payment.testers.js +169 -0
- package/dist/integration-profile/testers/payment.testers.js.map +1 -0
- package/dist/integration-profile/testers/storage.testers.d.ts +3 -0
- package/dist/integration-profile/testers/storage.testers.d.ts.map +1 -0
- package/dist/integration-profile/testers/storage.testers.js +208 -0
- package/dist/integration-profile/testers/storage.testers.js.map +1 -0
- package/dist/language/en.json +4 -2
- package/dist/language/pt.json +4 -2
- package/dist/leaked-password/leaked-password.controller.d.ts +24 -0
- package/dist/leaked-password/leaked-password.controller.d.ts.map +1 -0
- package/dist/leaked-password/leaked-password.controller.js +78 -0
- package/dist/leaked-password/leaked-password.controller.js.map +1 -0
- package/dist/leaked-password/leaked-password.module.d.ts +8 -0
- package/dist/leaked-password/leaked-password.module.d.ts.map +1 -0
- package/dist/leaked-password/leaked-password.module.js +31 -0
- package/dist/leaked-password/leaked-password.module.js.map +1 -0
- package/dist/leaked-password/leaked-password.service.d.ts +64 -0
- package/dist/leaked-password/leaked-password.service.d.ts.map +1 -0
- package/dist/leaked-password/leaked-password.service.js +218 -0
- package/dist/leaked-password/leaked-password.service.js.map +1 -0
- package/dist/locale/locale.controller.d.ts +1 -1
- package/dist/locale/locale.service.d.ts +1 -1
- package/dist/mail/dto/preview.dto.d.ts +18 -0
- package/dist/mail/dto/preview.dto.d.ts.map +1 -0
- package/dist/mail/dto/preview.dto.js +66 -0
- package/dist/mail/dto/preview.dto.js.map +1 -0
- package/dist/mail/dto/send.dto.d.ts +7 -0
- package/dist/mail/dto/send.dto.d.ts.map +1 -1
- package/dist/mail/dto/send.dto.js +10 -0
- package/dist/mail/dto/send.dto.js.map +1 -1
- package/dist/mail/mail.controller.d.ts +4 -0
- package/dist/mail/mail.controller.d.ts.map +1 -1
- package/dist/mail/mail.controller.js +16 -2
- package/dist/mail/mail.controller.js.map +1 -1
- package/dist/mail/mail.service.d.ts +23 -2
- package/dist/mail/mail.service.d.ts.map +1 -1
- package/dist/mail/mail.service.js +102 -13
- package/dist/mail/mail.service.js.map +1 -1
- package/dist/mail-layout/dto/update.dto.d.ts +17 -0
- package/dist/mail-layout/dto/update.dto.d.ts.map +1 -0
- package/dist/mail-layout/dto/update.dto.js +27 -0
- package/dist/mail-layout/dto/update.dto.js.map +1 -0
- package/dist/mail-layout/mail-layout.controller.d.ts +15 -0
- package/dist/mail-layout/mail-layout.controller.d.ts.map +1 -0
- package/dist/mail-layout/mail-layout.controller.js +71 -0
- package/dist/mail-layout/mail-layout.controller.js.map +1 -0
- package/dist/mail-layout/mail-layout.module.d.ts +3 -0
- package/dist/mail-layout/mail-layout.module.d.ts.map +1 -0
- package/dist/mail-layout/mail-layout.module.js +35 -0
- package/dist/mail-layout/mail-layout.module.js.map +1 -0
- package/dist/mail-layout/mail-layout.service.d.ts +27 -0
- package/dist/mail-layout/mail-layout.service.d.ts.map +1 -0
- package/dist/mail-layout/mail-layout.service.js +80 -0
- package/dist/mail-layout/mail-layout.service.js.map +1 -0
- package/dist/mcp-chat/mcp-chat.controller.d.ts +2 -2
- package/dist/mcp-chat/mcp-chat.service.d.ts +24 -2
- package/dist/mcp-chat/mcp-chat.service.d.ts.map +1 -1
- package/dist/mcp-chat/mcp-chat.service.js +80 -24
- package/dist/mcp-chat/mcp-chat.service.js.map +1 -1
- package/dist/menu/menu.controller.d.ts +3 -3
- package/dist/menu/menu.service.d.ts +3 -3
- package/dist/notification/notification.controller.d.ts +12 -12
- package/dist/notification/notification.service.d.ts +12 -12
- package/dist/oauth/oauth-token-broker.service.d.ts +72 -0
- package/dist/oauth/oauth-token-broker.service.d.ts.map +1 -0
- package/dist/oauth/oauth-token-broker.service.js +258 -0
- package/dist/oauth/oauth-token-broker.service.js.map +1 -0
- package/dist/oauth/oauth.module.d.ts.map +1 -1
- package/dist/oauth/oauth.module.js +3 -1
- package/dist/oauth/oauth.module.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +2 -0
- package/dist/oauth/oauth.service.d.ts.map +1 -1
- package/dist/oauth/oauth.service.js +6 -3
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/pdf/pdf.service.d.ts +8 -0
- package/dist/pdf/pdf.service.d.ts.map +1 -1
- package/dist/pdf/pdf.service.js +52 -0
- package/dist/pdf/pdf.service.js.map +1 -1
- package/dist/presence/presence.controller.d.ts +16 -0
- package/dist/presence/presence.controller.d.ts.map +1 -0
- package/dist/presence/presence.controller.js +60 -0
- package/dist/presence/presence.controller.js.map +1 -0
- package/dist/presence/presence.listener.d.ts +29 -0
- package/dist/presence/presence.listener.d.ts.map +1 -0
- package/dist/presence/presence.listener.js +82 -0
- package/dist/presence/presence.listener.js.map +1 -0
- package/dist/presence/presence.module.d.ts +3 -0
- package/dist/presence/presence.module.d.ts.map +1 -0
- package/dist/presence/presence.module.js +32 -0
- package/dist/presence/presence.module.js.map +1 -0
- package/dist/presence/presence.service.d.ts +42 -0
- package/dist/presence/presence.service.d.ts.map +1 -0
- package/dist/presence/presence.service.js +147 -0
- package/dist/presence/presence.service.js.map +1 -0
- package/dist/profile/dto/delete-account.dto.d.ts +8 -0
- package/dist/profile/dto/delete-account.dto.d.ts.map +1 -0
- package/dist/profile/dto/delete-account.dto.js +22 -0
- package/dist/profile/dto/delete-account.dto.js.map +1 -0
- package/dist/profile/events/profile-account-deleted.event.d.ts +12 -0
- package/dist/profile/events/profile-account-deleted.event.d.ts.map +1 -0
- package/dist/profile/events/profile-account-deleted.event.js +17 -0
- package/dist/profile/events/profile-account-deleted.event.js.map +1 -0
- package/dist/profile/profile.controller.d.ts +21 -15
- package/dist/profile/profile.controller.d.ts.map +1 -1
- package/dist/profile/profile.controller.js +75 -46
- package/dist/profile/profile.controller.js.map +1 -1
- package/dist/profile/profile.service.d.ts +30 -18
- package/dist/profile/profile.service.d.ts.map +1 -1
- package/dist/profile/profile.service.js +113 -37
- package/dist/profile/profile.service.js.map +1 -1
- package/dist/realtime/realtime.gateway.d.ts +48 -0
- package/dist/realtime/realtime.gateway.d.ts.map +1 -0
- package/dist/realtime/realtime.gateway.js +156 -0
- package/dist/realtime/realtime.gateway.js.map +1 -0
- package/dist/realtime/realtime.module.d.ts +8 -0
- package/dist/realtime/realtime.module.d.ts.map +1 -0
- package/dist/realtime/realtime.module.js +29 -0
- package/dist/realtime/realtime.module.js.map +1 -0
- package/dist/realtime/realtime.service.d.ts +51 -0
- package/dist/realtime/realtime.service.d.ts.map +1 -0
- package/dist/realtime/realtime.service.js +177 -0
- package/dist/realtime/realtime.service.js.map +1 -0
- package/dist/redis/redis-pubsub.d.ts +27 -0
- package/dist/redis/redis-pubsub.d.ts.map +1 -0
- package/dist/redis/redis-pubsub.js +140 -0
- package/dist/redis/redis-pubsub.js.map +1 -0
- package/dist/role/role.controller.d.ts +3 -3
- package/dist/role/role.service.d.ts +3 -3
- package/dist/setting/dto/create.dto.d.ts.map +1 -1
- package/dist/setting/dto/create.dto.js +9 -2
- package/dist/setting/dto/create.dto.js.map +1 -1
- package/dist/setting/setting.controller.d.ts +5 -5
- package/dist/setting/setting.service.d.ts +8 -5
- package/dist/setting/setting.service.d.ts.map +1 -1
- package/dist/setting/setting.service.js +25 -1
- package/dist/setting/setting.service.js.map +1 -1
- package/dist/user/dto/create-with-email-and-password.dto.d.ts +2 -0
- package/dist/user/dto/create-with-email-and-password.dto.d.ts.map +1 -1
- package/dist/user/dto/create-with-email-and-password.dto.js +5 -0
- package/dist/user/dto/create-with-email-and-password.dto.js.map +1 -1
- package/dist/user/dto/query-user-mail-list.dto.d.ts +5 -0
- package/dist/user/dto/query-user-mail-list.dto.d.ts.map +1 -0
- package/dist/user/dto/query-user-mail-list.dto.js +25 -0
- package/dist/user/dto/query-user-mail-list.dto.js.map +1 -0
- package/dist/user/user-credential.util.d.ts +19 -0
- package/dist/user/user-credential.util.d.ts.map +1 -0
- package/dist/user/user-credential.util.js +32 -0
- package/dist/user/user-credential.util.js.map +1 -0
- package/dist/user/user.controller.d.ts +17 -5
- package/dist/user/user.controller.d.ts.map +1 -1
- package/dist/user/user.controller.js +18 -3
- package/dist/user/user.controller.js.map +1 -1
- package/dist/user/user.service.d.ts +28 -6
- package/dist/user/user.service.d.ts.map +1 -1
- package/dist/user/user.service.js +204 -13
- package/dist/user/user.service.js.map +1 -1
- package/dist/validators/is-strong-password-with-settings.validator.d.ts.map +1 -1
- package/dist/validators/is-strong-password-with-settings.validator.js +11 -0
- package/dist/validators/is-strong-password-with-settings.validator.js.map +1 -1
- package/dist/validators/service-locator.d.ts +9 -0
- package/dist/validators/service-locator.d.ts.map +1 -1
- package/dist/validators/service-locator.js +12 -0
- package/dist/validators/service-locator.js.map +1 -1
- package/dist/whatsapp-sender/whatsapp-sender.module.d.ts +3 -0
- package/dist/whatsapp-sender/whatsapp-sender.module.d.ts.map +1 -0
- package/dist/whatsapp-sender/whatsapp-sender.module.js +23 -0
- package/dist/whatsapp-sender/whatsapp-sender.module.js.map +1 -0
- package/dist/whatsapp-sender/whatsapp-sender.service.d.ts +50 -0
- package/dist/whatsapp-sender/whatsapp-sender.service.d.ts.map +1 -0
- package/dist/whatsapp-sender/whatsapp-sender.service.js +224 -0
- package/dist/whatsapp-sender/whatsapp-sender.service.js.map +1 -0
- package/hedhog/data/integration_provider.yaml +16 -0
- package/hedhog/data/mail.yaml +88 -61
- package/hedhog/data/mail_layout.yaml +188 -0
- package/hedhog/data/menu.yaml +67 -3
- package/hedhog/data/route.yaml +135 -0
- package/hedhog/data/setting_group.yaml +139 -1
- package/hedhog/frontend/app/account/components/mfa-setup-dialog.tsx.ejs +36 -0
- package/hedhog/frontend/app/account/components/two-factor-auth.tsx.ejs +2 -0
- package/hedhog/frontend/app/account/hooks/use-mfa-setup.ts.ejs +10 -7
- package/hedhog/frontend/app/ai_agent/page.tsx.ejs +7 -4
- package/hedhog/frontend/app/ai_instruction/_components/ai-instruction-form.tsx.ejs +580 -0
- package/hedhog/frontend/app/ai_instruction/_components/ai-instruction-preview.tsx.ejs +150 -0
- package/hedhog/frontend/app/ai_instruction/_components/ai-instruction-versions.tsx.ejs +199 -0
- package/hedhog/frontend/app/ai_instruction/_components/prompt-diff.tsx.ejs +63 -0
- package/hedhog/frontend/app/ai_instruction/_lib/line-diff.spec.ts.ejs +59 -0
- package/hedhog/frontend/app/ai_instruction/_lib/line-diff.ts.ejs +72 -0
- package/hedhog/frontend/app/ai_instruction/_lib/prompt-template.spec.ts.ejs +170 -0
- package/hedhog/frontend/app/ai_instruction/_lib/prompt-template.ts.ejs +167 -0
- package/hedhog/frontend/app/ai_instruction/_lib/types.ts.ejs +99 -0
- package/hedhog/frontend/app/ai_instruction/page.tsx.ejs +422 -0
- package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +51 -4
- package/hedhog/frontend/app/incidents/page.tsx.ejs +400 -0
- package/hedhog/frontend/app/integration/profiles/page.tsx.ejs +153 -84
- package/hedhog/frontend/app/mail/layout/page.tsx.ejs +344 -0
- package/hedhog/frontend/app/mail/template/page.tsx.ejs +155 -121
- package/hedhog/frontend/app/mcp_chat/page.tsx.ejs +129 -17
- package/hedhog/frontend/app/pages/_components/page-delete-dialog.tsx.ejs +343 -0
- package/hedhog/frontend/app/pages/_components/page-detail-sheet.tsx.ejs +438 -0
- package/hedhog/frontend/app/pages/_components/page-wizard-sheet.tsx.ejs +1009 -0
- package/hedhog/frontend/app/pages/_components/system-page-types.ts.ejs +56 -0
- package/hedhog/frontend/app/pages/_components/use-system-pages.ts.ejs +171 -0
- package/hedhog/frontend/app/pages/page.tsx.ejs +514 -0
- package/hedhog/frontend/app/users/page.tsx.ejs +119 -13
- package/hedhog/frontend/app/users/user-activity-timeline.tsx.ejs +231 -0
- package/hedhog/frontend/app/users/user-mails.tsx.ejs +399 -0
- package/hedhog/frontend/app/users/user-sheet.tsx.ejs +60 -75
- package/hedhog/frontend/messages/en.json +499 -3
- package/hedhog/frontend/messages/pt.json +499 -3
- package/hedhog/table/ai_agent.yaml +1 -0
- package/hedhog/table/ai_instruction.yaml +15 -0
- package/hedhog/table/leaked_password.yaml +18 -0
- package/hedhog/table/mail_layout.yaml +35 -0
- package/hedhog/table/mail_var.yaml +4 -0
- package/hedhog/table/setting.yaml +1 -0
- package/hedhog/table/system_incident.yaml +59 -0
- package/hedhog/table/user_presence.yaml +36 -0
- package/package.json +8 -4
- package/src/access-log/access-log.interceptor.ts +4 -2
- package/src/ai/ai-attachment.fragments.spec.ts +319 -0
- package/src/ai/ai-attachment.fragments.ts +35 -0
- package/src/ai/ai.prompts.ts +38 -0
- package/src/ai/ai.service.spec.ts +280 -0
- package/src/ai/ai.service.ts +338 -82
- package/src/ai/dto/chat.dto.ts +33 -3
- package/src/ai/dto/create-agent.dto.ts +2 -2
- package/src/ai/dto/update-agent.dto.ts +2 -2
- package/src/ai-instruction/ai-instruction.controller.ts +40 -9
- package/src/ai-instruction/ai-instruction.module.ts +13 -2
- package/src/ai-instruction/ai-instruction.service.spec.ts +658 -0
- package/src/ai-instruction/ai-instruction.service.ts +661 -62
- package/src/ai-instruction/ai-prompt-builder.service.ts +10 -1
- package/src/ai-instruction/ai-prompt-registry.ts +87 -0
- package/src/ai-instruction/ai-prompt-resolver.service.spec.ts +375 -0
- package/src/ai-instruction/ai-prompt-resolver.service.ts +295 -0
- package/src/ai-instruction/ai-prompt-template.util.spec.ts +162 -0
- package/src/ai-instruction/ai-prompt-template.util.ts +199 -0
- package/src/ai-instruction/dto/create-ai-instruction.dto.ts +39 -3
- package/src/ai-instruction/dto/preview-ai-instruction.dto.ts +26 -0
- package/src/ai-instruction/dto/update-ai-instruction.dto.ts +42 -1
- package/src/ai-instruction/types/ai-instruction.types.ts +24 -1
- package/src/auth/auth.controller.ts +31 -5
- package/src/auth/auth.service.spec.ts +3 -1
- package/src/auth/auth.service.ts +101 -36
- package/src/captcha/captcha.module.ts +10 -0
- package/src/captcha/captcha.service.spec.ts +210 -0
- package/src/captcha/captcha.service.ts +191 -0
- package/src/challenge/challenge.service.spec.ts +39 -4
- package/src/challenge/challenge.service.ts +72 -17
- package/src/core.module.ts +27 -1
- package/src/file/file.service.spec.ts +105 -0
- package/src/file/file.service.ts +60 -3
- package/src/incident/incident-notifier.service.spec.ts +205 -0
- package/src/incident/incident-notifier.service.ts +241 -0
- package/src/incident/incident.controller.ts +38 -0
- package/src/incident/incident.module.ts +19 -0
- package/src/incident/incident.service.spec.ts +150 -0
- package/src/incident/incident.service.ts +209 -0
- package/src/index.ts +37 -0
- package/src/integration-profile/dto/test.dto.ts +19 -0
- package/src/integration-profile/integration-profile.controller.ts +10 -1
- package/src/integration-profile/integration-profile.module.spec.ts +51 -0
- package/src/integration-profile/integration-profile.module.ts +23 -4
- package/src/integration-profile/integration-profile.secrets.ts +9 -1
- package/src/integration-profile/integration-profile.service.spec.ts +279 -0
- package/src/integration-profile/integration-profile.service.ts +120 -124
- package/src/integration-profile/integration-profile.utils.spec.ts +22 -0
- package/src/integration-profile/integration-profile.utils.ts +40 -3
- package/src/integration-profile/testers/ai.testers.ts +165 -0
- package/src/integration-profile/testers/captcha.testers.spec.ts +92 -0
- package/src/integration-profile/testers/captcha.testers.ts +139 -0
- package/src/integration-profile/testers/email.testers.ts +161 -0
- package/src/integration-profile/testers/http-probe.spec.ts +153 -0
- package/src/integration-profile/testers/http-probe.ts +171 -0
- package/src/integration-profile/testers/index.ts +30 -0
- package/src/integration-profile/testers/infrastructure.testers.ts +122 -0
- package/src/integration-profile/testers/integration-tester.registry.spec.ts +75 -0
- package/src/integration-profile/testers/integration-tester.registry.ts +43 -0
- package/src/integration-profile/testers/integration-tester.types.ts +61 -0
- package/src/integration-profile/testers/messaging.testers.ts +102 -0
- package/src/integration-profile/testers/oauth.testers.spec.ts +220 -0
- package/src/integration-profile/testers/oauth.testers.ts +305 -0
- package/src/integration-profile/testers/payment.testers.ts +185 -0
- package/src/integration-profile/testers/remaining.testers.spec.ts +401 -0
- package/src/integration-profile/testers/storage.testers.spec.ts +185 -0
- package/src/integration-profile/testers/storage.testers.ts +226 -0
- package/src/integration-profile/testers/tester-coverage.spec.ts +58 -0
- package/src/language/en.json +4 -2
- package/src/language/pt.json +4 -2
- package/src/leaked-password/README.md +83 -0
- package/src/leaked-password/leaked-password.controller.ts +52 -0
- package/src/leaked-password/leaked-password.module.ts +18 -0
- package/src/leaked-password/leaked-password.service.ts +242 -0
- package/src/leaked-password/seed/build-seed-sql.mjs +180 -0
- package/src/leaked-password/seed/common-passwords.txt +335 -0
- package/src/mail/dto/preview.dto.ts +50 -0
- package/src/mail/dto/send.dto.ts +14 -1
- package/src/mail/mail-template.spec.ts +197 -0
- package/src/mail/mail.controller.ts +9 -2
- package/src/mail/mail.service.spec.ts +116 -1
- package/src/mail/mail.service.ts +118 -12
- package/src/mail-layout/dto/update.dto.ts +19 -0
- package/src/mail-layout/mail-layout.controller.ts +47 -0
- package/src/mail-layout/mail-layout.module.ts +22 -0
- package/src/mail-layout/mail-layout.service.ts +94 -0
- package/src/mcp-chat/mcp-chat.service.spec.ts +236 -0
- package/src/mcp-chat/mcp-chat.service.ts +122 -26
- package/src/oauth/oauth-token-broker.service.spec.ts +172 -0
- package/src/oauth/oauth-token-broker.service.ts +363 -0
- package/src/oauth/oauth.module.ts +3 -1
- package/src/oauth/oauth.service.ts +8 -2
- package/src/pdf/pdf.service.ts +75 -0
- package/src/presence/presence.controller.ts +29 -0
- package/src/presence/presence.listener.ts +53 -0
- package/src/presence/presence.module.ts +19 -0
- package/src/presence/presence.service.spec.ts +97 -0
- package/src/presence/presence.service.ts +160 -0
- package/src/profile/dto/delete-account.dto.ts +11 -0
- package/src/profile/events/profile-account-deleted.event.ts +13 -0
- package/src/profile/profile.controller.ts +46 -34
- package/src/profile/profile.service.ts +138 -38
- package/src/realtime/realtime.gateway.ts +138 -0
- package/src/realtime/realtime.module.ts +16 -0
- package/src/realtime/realtime.service.spec.ts +50 -0
- package/src/realtime/realtime.service.ts +187 -0
- package/src/redis/redis-pubsub.ts +179 -0
- package/src/setting/dto/create.dto.ts +13 -2
- package/src/setting/setting.service.spec.ts +56 -0
- package/src/setting/setting.service.ts +29 -1
- package/src/user/dto/create-with-email-and-password.dto.ts +6 -1
- package/src/user/dto/query-user-mail-list.dto.ts +10 -0
- package/src/user/user-credential.util.ts +35 -0
- package/src/user/user.controller.ts +17 -2
- package/src/user/user.service.spec.ts +153 -0
- package/src/user/user.service.ts +255 -12
- package/src/validators/is-strong-password-with-settings.validator.ts +12 -0
- package/src/validators/service-locator.ts +15 -0
- package/src/whatsapp-sender/whatsapp-sender.module.ts +10 -0
- package/src/whatsapp-sender/whatsapp-sender.service.ts +313 -0
|
@@ -61,20 +61,20 @@ let AuthController = AuthController_1 = class AuthController {
|
|
|
61
61
|
}
|
|
62
62
|
// Rate-limit contra brute-force de credenciais: 10 tentativas/min por IP
|
|
63
63
|
// (ajustável; valor acomoda a suíte E2E de auth que faz vários logins seguidos).
|
|
64
|
-
async login(locale, data, ipAddress, userAgent, browserId, res) {
|
|
65
|
-
return this.service.loginWithEmailAndPassword(res, locale, ipAddress, userAgent, data, browserId || null);
|
|
64
|
+
async login(locale, data, ipAddress, userAgent, browserId, origin, res) {
|
|
65
|
+
return this.service.loginWithEmailAndPassword(res, locale, ipAddress, userAgent, data, browserId || null, origin);
|
|
66
66
|
}
|
|
67
|
-
async emailVerificationLogin(locale, { token, code }, ipAddress, userAgent, browserId, res) {
|
|
68
|
-
return this.service.emailVerificationLogin(locale, token, code, ipAddress, userAgent, res, browserId || null);
|
|
67
|
+
async emailVerificationLogin(locale, { token, code }, ipAddress, userAgent, browserId, origin, res) {
|
|
68
|
+
return this.service.emailVerificationLogin(locale, token, code, ipAddress, userAgent, res, browserId || null, origin);
|
|
69
69
|
}
|
|
70
|
-
async emailVerificationLoginResend(locale, { token }) {
|
|
71
|
-
return this.service.emailVerificationLoginResend(locale, token);
|
|
70
|
+
async emailVerificationLoginResend(locale, { token }, origin) {
|
|
71
|
+
return this.service.emailVerificationLoginResend(locale, token, origin);
|
|
72
72
|
}
|
|
73
73
|
async registerWithEmailAndPassword(locale, data) {
|
|
74
74
|
return this.user.createWithEmailAndPassword(locale, data);
|
|
75
75
|
}
|
|
76
|
-
async loginCode(locale, { token, code, methodType }, ipAddress, userAgent, browserId, res) {
|
|
77
|
-
const { accessToken, refreshToken, session, requiresPasswordReset } = await this.service.verifyMfaCode(locale, token, code, ipAddress, userAgent, methodType, browserId || null);
|
|
76
|
+
async loginCode(locale, { token, code, methodType }, ipAddress, userAgent, browserId, origin, res) {
|
|
77
|
+
const { accessToken, refreshToken, session, requiresPasswordReset } = await this.service.verifyMfaCode(locale, token, code, ipAddress, userAgent, methodType, browserId || null, origin);
|
|
78
78
|
await this.token.setRefreshTokenCookie(locale, res, refreshToken, session.expires_at);
|
|
79
79
|
return { accessToken, refreshToken, requiresPasswordReset };
|
|
80
80
|
}
|
|
@@ -83,8 +83,8 @@ let AuthController = AuthController_1 = class AuthController {
|
|
|
83
83
|
await this.token.setRefreshTokenCookie(locale, res, refreshToken, session.expires_at);
|
|
84
84
|
return { accessToken, refreshToken, requiresPasswordReset };
|
|
85
85
|
}
|
|
86
|
-
async resendMfaCode(locale, { token }) {
|
|
87
|
-
return this.service.resendMfaCode(locale, token);
|
|
86
|
+
async resendMfaCode(locale, { token }, origin) {
|
|
87
|
+
return this.service.resendMfaCode(locale, token, origin);
|
|
88
88
|
}
|
|
89
89
|
async generateWebAuthnOptions(locale, { mfaToken }, origin) {
|
|
90
90
|
return this.service.generateWebAuthnAuthenticationOptions(locale, mfaToken, origin);
|
|
@@ -105,8 +105,8 @@ let AuthController = AuthController_1 = class AuthController {
|
|
|
105
105
|
await this.service.logout(res, req, refreshToken);
|
|
106
106
|
return { success: true };
|
|
107
107
|
}
|
|
108
|
-
async forgotReset(locale, { password, code }, ipAddress, userAgent) {
|
|
109
|
-
return this.service.forgotResetPassword(locale, password, code, ipAddress, userAgent);
|
|
108
|
+
async forgotReset(locale, { password, code }, ipAddress, userAgent, origin) {
|
|
109
|
+
return this.service.forgotResetPassword(locale, password, code, ipAddress, userAgent, origin);
|
|
110
110
|
}
|
|
111
111
|
async verifyAccountInvite(locale, { code }) {
|
|
112
112
|
return this.service.verifyAccountInvite(locale, code);
|
|
@@ -114,6 +114,9 @@ let AuthController = AuthController_1 = class AuthController {
|
|
|
114
114
|
async completeAccount(locale, { password, code, name }, ipAddress, userAgent) {
|
|
115
115
|
return this.service.completeAccount(locale, { password, code, name }, ipAddress, userAgent);
|
|
116
116
|
}
|
|
117
|
+
async authorizeAccountInvite(locale, { code }, ipAddress, userAgent) {
|
|
118
|
+
return this.service.authorizeAccountInvite(locale, code, ipAddress, userAgent);
|
|
119
|
+
}
|
|
117
120
|
};
|
|
118
121
|
exports.AuthController = AuthController;
|
|
119
122
|
__decorate([
|
|
@@ -169,9 +172,10 @@ __decorate([
|
|
|
169
172
|
__param(2, (0, common_1.Ip)()),
|
|
170
173
|
__param(3, (0, common_1.Headers)('user-agent')),
|
|
171
174
|
__param(4, (0, common_1.Headers)('x-browser-id')),
|
|
172
|
-
__param(5, (0, common_1.
|
|
175
|
+
__param(5, (0, common_1.Headers)('origin')),
|
|
176
|
+
__param(6, (0, common_1.Res)({ passthrough: true })),
|
|
173
177
|
__metadata("design:type", Function),
|
|
174
|
-
__metadata("design:paramtypes", [String, login_dto_1.LoginDTO, String, String, String, Object]),
|
|
178
|
+
__metadata("design:paramtypes", [String, login_dto_1.LoginDTO, String, String, String, String, Object]),
|
|
175
179
|
__metadata("design:returntype", Promise)
|
|
176
180
|
], AuthController.prototype, "login", null);
|
|
177
181
|
__decorate([
|
|
@@ -184,18 +188,22 @@ __decorate([
|
|
|
184
188
|
__param(2, (0, common_1.Ip)()),
|
|
185
189
|
__param(3, (0, common_1.Headers)('user-agent')),
|
|
186
190
|
__param(4, (0, common_1.Headers)('x-browser-id')),
|
|
187
|
-
__param(5, (0, common_1.
|
|
191
|
+
__param(5, (0, common_1.Headers)('origin')),
|
|
192
|
+
__param(6, (0, common_1.Res)({ passthrough: true })),
|
|
188
193
|
__metadata("design:type", Function),
|
|
189
|
-
__metadata("design:paramtypes", [String, login_email_verification_dto_1.LoginEmailVerificationDTO, String, String, String, Object]),
|
|
194
|
+
__metadata("design:paramtypes", [String, login_email_verification_dto_1.LoginEmailVerificationDTO, String, String, String, String, Object]),
|
|
190
195
|
__metadata("design:returntype", Promise)
|
|
191
196
|
], AuthController.prototype, "emailVerificationLogin", null);
|
|
192
197
|
__decorate([
|
|
193
198
|
(0, api_1.Public)(),
|
|
199
|
+
(0, common_1.UseGuards)(throttler_1.ThrottlerGuard),
|
|
200
|
+
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
194
201
|
(0, common_1.Post)('login-email-verification-resend'),
|
|
195
202
|
__param(0, (0, api_locale_1.Locale)()),
|
|
196
203
|
__param(1, (0, common_1.Body)()),
|
|
204
|
+
__param(2, (0, common_1.Headers)('origin')),
|
|
197
205
|
__metadata("design:type", Function),
|
|
198
|
-
__metadata("design:paramtypes", [String, login_email_verification_resend_dto_1.LoginEmailVerificationResendDTO]),
|
|
206
|
+
__metadata("design:paramtypes", [String, login_email_verification_resend_dto_1.LoginEmailVerificationResendDTO, String]),
|
|
199
207
|
__metadata("design:returntype", Promise)
|
|
200
208
|
], AuthController.prototype, "emailVerificationLoginResend", null);
|
|
201
209
|
__decorate([
|
|
@@ -217,9 +225,10 @@ __decorate([
|
|
|
217
225
|
__param(2, (0, common_1.Ip)()),
|
|
218
226
|
__param(3, (0, common_1.Headers)('user-agent')),
|
|
219
227
|
__param(4, (0, common_1.Headers)('x-browser-id')),
|
|
220
|
-
__param(5, (0, common_1.
|
|
228
|
+
__param(5, (0, common_1.Headers)('origin')),
|
|
229
|
+
__param(6, (0, common_1.Res)({ passthrough: true })),
|
|
221
230
|
__metadata("design:type", Function),
|
|
222
|
-
__metadata("design:paramtypes", [String, login_with_code_dto_1.LoginWithCodeDTO, String, String, String, Object]),
|
|
231
|
+
__metadata("design:paramtypes", [String, login_with_code_dto_1.LoginWithCodeDTO, String, String, String, String, Object]),
|
|
223
232
|
__metadata("design:returntype", Promise)
|
|
224
233
|
], AuthController.prototype, "loginCode", null);
|
|
225
234
|
__decorate([
|
|
@@ -239,15 +248,20 @@ __decorate([
|
|
|
239
248
|
], AuthController.prototype, "loginRecoveryCode", null);
|
|
240
249
|
__decorate([
|
|
241
250
|
(0, api_1.Public)(),
|
|
251
|
+
(0, common_1.UseGuards)(throttler_1.ThrottlerGuard),
|
|
252
|
+
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
242
253
|
(0, common_1.Post)('resend-mfa-code'),
|
|
243
254
|
__param(0, (0, api_locale_1.Locale)()),
|
|
244
255
|
__param(1, (0, common_1.Body)()),
|
|
256
|
+
__param(2, (0, common_1.Headers)('origin')),
|
|
245
257
|
__metadata("design:type", Function),
|
|
246
|
-
__metadata("design:paramtypes", [String, resend_mfa_code_dto_1.ResendMfaCodeDTO]),
|
|
258
|
+
__metadata("design:paramtypes", [String, resend_mfa_code_dto_1.ResendMfaCodeDTO, String]),
|
|
247
259
|
__metadata("design:returntype", Promise)
|
|
248
260
|
], AuthController.prototype, "resendMfaCode", null);
|
|
249
261
|
__decorate([
|
|
250
262
|
(0, api_1.Public)(),
|
|
263
|
+
(0, common_1.UseGuards)(throttler_1.ThrottlerGuard),
|
|
264
|
+
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
251
265
|
(0, common_1.Post)('webauthn/generate'),
|
|
252
266
|
__param(0, (0, api_locale_1.Locale)()),
|
|
253
267
|
__param(1, (0, common_1.Body)()),
|
|
@@ -258,6 +272,8 @@ __decorate([
|
|
|
258
272
|
], AuthController.prototype, "generateWebAuthnOptions", null);
|
|
259
273
|
__decorate([
|
|
260
274
|
(0, api_1.Public)(),
|
|
275
|
+
(0, common_1.UseGuards)(throttler_1.ThrottlerGuard),
|
|
276
|
+
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
261
277
|
(0, common_1.Post)('webauthn/verify'),
|
|
262
278
|
__param(0, (0, api_locale_1.Locale)()),
|
|
263
279
|
__param(1, (0, common_1.Body)()),
|
|
@@ -295,8 +311,9 @@ __decorate([
|
|
|
295
311
|
__param(1, (0, common_1.Body)()),
|
|
296
312
|
__param(2, (0, common_1.Ip)()),
|
|
297
313
|
__param(3, (0, common_1.Headers)('user-agent')),
|
|
314
|
+
__param(4, (0, common_1.Headers)('origin')),
|
|
298
315
|
__metadata("design:type", Function),
|
|
299
|
-
__metadata("design:paramtypes", [String, reset_dto_1.ResetDTO, String, String]),
|
|
316
|
+
__metadata("design:paramtypes", [String, reset_dto_1.ResetDTO, String, String, String]),
|
|
300
317
|
__metadata("design:returntype", Promise)
|
|
301
318
|
], AuthController.prototype, "forgotReset", null);
|
|
302
319
|
__decorate([
|
|
@@ -319,6 +336,17 @@ __decorate([
|
|
|
319
336
|
__metadata("design:paramtypes", [String, complete_account_dto_1.CompleteAccountDTO, String, String]),
|
|
320
337
|
__metadata("design:returntype", Promise)
|
|
321
338
|
], AuthController.prototype, "completeAccount", null);
|
|
339
|
+
__decorate([
|
|
340
|
+
(0, api_1.Public)(),
|
|
341
|
+
(0, common_1.Post)('complete-account/authorize'),
|
|
342
|
+
__param(0, (0, api_locale_1.Locale)()),
|
|
343
|
+
__param(1, (0, common_1.Body)()),
|
|
344
|
+
__param(2, (0, common_1.Ip)()),
|
|
345
|
+
__param(3, (0, common_1.Headers)('user-agent')),
|
|
346
|
+
__metadata("design:type", Function),
|
|
347
|
+
__metadata("design:paramtypes", [String, complete_account_dto_1.VerifyAccountInviteDTO, String, String]),
|
|
348
|
+
__metadata("design:returntype", Promise)
|
|
349
|
+
], AuthController.prototype, "authorizeAccountInvite", null);
|
|
322
350
|
exports.AuthController = AuthController = AuthController_1 = __decorate([
|
|
323
351
|
(0, common_1.Controller)('auth'),
|
|
324
352
|
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => auth_service_1.AuthService))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../src/auth/auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sCAAkE;AAClE,oDAA6C;AAC7C,2CAcwB;AACxB,iDAA6D;AAE7D,0DAAsD;AACtD,uGAA+F;AAC/F,uDAAmD;AACnD,iDAA6C;AAC7C,iDAA6C;AAC7C,mGAA4F;AAC5F,qFAA+E;AAC/E,mEAA6D;AAC7D,6EAA0E;AAC1E,+CAA2C;AAC3C,mEAA6D;AAC7D,+CAA2C;AAC3C,qEAAwF;AAGjF,IAAM,cAAc,sBAApB,MAAM,cAAc;IAGzB,YAEE,OAAqC,EAErC,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endingPasswordReset;
|
|
44
44
|
private getRequiresPasswordResetByUserId;
|
|
45
|
-
requiresMfaForLogin(locale: string, email: string, user: any): Promise<{
|
|
45
|
+
requiresMfaForLogin(locale: string, email: string, user: any, origin?: string): Promise<{
|
|
46
46
|
requiresMfa: boolean;
|
|
47
47
|
token: string;
|
|
48
48
|
}>;
|
|
49
|
-
requiresEmailVerificationForLogin(locale: string, email: string, user: any): Promise<{
|
|
49
|
+
requiresEmailVerificationForLogin(locale: string, email: string, user: any, origin?: string): Promise<{
|
|
50
50
|
requiresEmailVerification: boolean;
|
|
51
51
|
token: string;
|
|
52
52
|
}>;
|
|
53
|
-
emailVerificationLoginResend(locale: string, token: string): any;
|
|
54
|
-
emailVerificationLogin(locale: string, token: string, code: string, ipAddress: string, userAgent: string, res: any, browserId?: string | null): Promise<{
|
|
53
|
+
emailVerificationLoginResend(locale: string, token: string, origin?: string): any;
|
|
54
|
+
emailVerificationLogin(locale: string, token: string, code: string, ipAddress: string, userAgent: string, res: any, browserId?: string | null, origin?: string): Promise<{
|
|
55
55
|
accessToken: string;
|
|
56
56
|
refreshToken: string;
|
|
57
57
|
requiresPasswordReset: boolean;
|
|
@@ -61,7 +61,7 @@ export declare class AuthService {
|
|
|
61
61
|
refreshToken?: undefined;
|
|
62
62
|
}>;
|
|
63
63
|
private login;
|
|
64
|
-
loginWithEmailAndPassword(res: any, locale: string, ipAddress: string, userAgent: string, { email, password }: LoginDTO, browserId?: string | null): Promise<{
|
|
64
|
+
loginWithEmailAndPassword(res: any, locale: string, ipAddress: string, userAgent: string, { email, password }: LoginDTO, browserId?: string | null, origin?: string): Promise<{
|
|
65
65
|
requiresMfa: boolean;
|
|
66
66
|
token: string;
|
|
67
67
|
} | {
|
|
@@ -186,7 +186,7 @@ export declare class AuthService {
|
|
|
186
186
|
logout(res: any, req: any, refreshToken: string): Promise<{
|
|
187
187
|
success: boolean;
|
|
188
188
|
}>;
|
|
189
|
-
forgotResetPassword(locale: string, password: string, code: string, ipAddress: string, userAgent: string): Promise<{
|
|
189
|
+
forgotResetPassword(locale: string, password: string, code: string, ipAddress: string, userAgent: string, origin?: string): Promise<{
|
|
190
190
|
accessToken: string;
|
|
191
191
|
refreshToken: string;
|
|
192
192
|
session: {
|
|
@@ -221,11 +221,36 @@ export declare class AuthService {
|
|
|
221
221
|
/**
|
|
222
222
|
* Valida (sem consumir) um token de convite de criação de conta e retorna os
|
|
223
223
|
* dados básicos para pré-preencher o formulário no app de treinamentos.
|
|
224
|
+
* `hasAccount` diz se esse usuário já tem um jeito de entrar (senha ativa ou
|
|
225
|
+
* provedor externo vinculado) — usado pelo app para decidir entre mostrar o
|
|
226
|
+
* formulário de criação de conta ou uma tela de autorização de acesso.
|
|
224
227
|
*/
|
|
225
228
|
verifyAccountInvite(locale: string, code: string): Promise<{
|
|
226
229
|
valid: boolean;
|
|
227
230
|
name: string;
|
|
228
231
|
email: string;
|
|
232
|
+
hasAccount: boolean;
|
|
233
|
+
}>;
|
|
234
|
+
/**
|
|
235
|
+
* Conclui um convite de acesso para quem já tem conta (senha ou provedor
|
|
236
|
+
* externo): não define senha nenhuma, só prova controle do e-mail (mesmo
|
|
237
|
+
* nível de confiança do link de reset de senha) e autentica o usuário.
|
|
238
|
+
*/
|
|
239
|
+
authorizeAccountInvite(locale: string, code: string, ipAddress: string, userAgent: string): Promise<{
|
|
240
|
+
accessToken: string;
|
|
241
|
+
refreshToken: string;
|
|
242
|
+
session: {
|
|
243
|
+
id: number;
|
|
244
|
+
user_id: number;
|
|
245
|
+
user_agent: string;
|
|
246
|
+
created_at: Date;
|
|
247
|
+
updated_at: Date;
|
|
248
|
+
hash: string;
|
|
249
|
+
ip_address: string;
|
|
250
|
+
revoked_at: Date | null;
|
|
251
|
+
expires_at: Date;
|
|
252
|
+
browser_id: string | null;
|
|
253
|
+
};
|
|
229
254
|
}>;
|
|
230
255
|
/**
|
|
231
256
|
* Conclui a criação de conta a partir de um token de convite: cria/atualiza a
|
|
@@ -252,7 +277,7 @@ export declare class AuthService {
|
|
|
252
277
|
browser_id: string | null;
|
|
253
278
|
};
|
|
254
279
|
}>;
|
|
255
|
-
verifyMfaCode(locale: string, mfaToken: string, code: string, ipAddress: string, userAgent: string, methodType?: 'totp' | 'email' | 'recovery', browserId?: string | null): Promise<{
|
|
280
|
+
verifyMfaCode(locale: string, mfaToken: string, code: string, ipAddress: string, userAgent: string, methodType?: 'totp' | 'email' | 'recovery', browserId?: string | null, origin?: string): Promise<{
|
|
256
281
|
accessToken: string;
|
|
257
282
|
refreshToken: string;
|
|
258
283
|
session: {
|
|
@@ -286,7 +311,7 @@ export declare class AuthService {
|
|
|
286
311
|
};
|
|
287
312
|
requiresPasswordReset: boolean;
|
|
288
313
|
}>;
|
|
289
|
-
resendMfaCode(locale: string, mfaToken: string): Promise<{
|
|
314
|
+
resendMfaCode(locale: string, mfaToken: string, origin?: string): Promise<{
|
|
290
315
|
success: boolean;
|
|
291
316
|
hasEmailMfa: boolean;
|
|
292
317
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../src/auth/auth.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,wBAAwB,CAAC;AAUpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../src/auth/auth.service.ts"],"names":[],"mapp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AC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAC3E,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;IAsDb,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;IA8H1L,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;;IA2C7I,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;;;;IA+B/D,qCAAqC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,qCAAqC,CAAC;IA4C/I,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,aAAa,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;CAyFrL"}
|
|
@@ -56,6 +56,7 @@ const security_service_1 = require("../security/security.service");
|
|
|
56
56
|
const session_service_1 = require("../session/session.service");
|
|
57
57
|
const setting_service_1 = require("../setting/setting.service");
|
|
58
58
|
const token_service_1 = require("../token/token.service");
|
|
59
|
+
const user_credential_util_1 = require("../user/user-credential.util");
|
|
59
60
|
const user_service_1 = require("../user/user.service");
|
|
60
61
|
const webauthn_origin_1 = require("../utils/webauthn-origin");
|
|
61
62
|
let AuthService = AuthService_1 = class AuthService {
|
|
@@ -87,10 +88,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
87
88
|
return { accessToken, refreshToken };
|
|
88
89
|
}
|
|
89
90
|
hasPendingPasswordReset(user) {
|
|
90
|
-
|
|
91
|
-
return Boolean((_a = user === null || user === void 0 ? void 0 : user.user_credential) === null || _a === void 0 ? void 0 : _a.some((credential) => credential.type === 'password' &&
|
|
92
|
-
credential.requires_reset === true &&
|
|
93
|
-
!credential.revoked_at));
|
|
91
|
+
return (0, user_credential_util_1.hasPendingPasswordReset)(user);
|
|
94
92
|
}
|
|
95
93
|
async getRequiresPasswordResetByUserId(userId) {
|
|
96
94
|
const credential = await this.prisma.user_credential.findFirst({
|
|
@@ -104,7 +102,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
104
102
|
});
|
|
105
103
|
return Boolean(credential === null || credential === void 0 ? void 0 : credential.id);
|
|
106
104
|
}
|
|
107
|
-
async requiresMfaForLogin(locale, email, user) {
|
|
105
|
+
async requiresMfaForLogin(locale, email, user, origin) {
|
|
108
106
|
const settings = await this.setting.getSettingValues([
|
|
109
107
|
'require-mfa',
|
|
110
108
|
'require-email-verification',
|
|
@@ -164,7 +162,8 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
164
162
|
variables: {
|
|
165
163
|
code,
|
|
166
164
|
name: user.name,
|
|
167
|
-
}
|
|
165
|
+
},
|
|
166
|
+
app: await this.challenge.resolveAppKeyFromOrigin(origin),
|
|
168
167
|
});
|
|
169
168
|
return {
|
|
170
169
|
requiresMfa: true,
|
|
@@ -174,7 +173,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
174
173
|
})
|
|
175
174
|
};
|
|
176
175
|
}
|
|
177
|
-
async requiresEmailVerificationForLogin(locale, email, user) {
|
|
176
|
+
async requiresEmailVerificationForLogin(locale, email, user, origin) {
|
|
178
177
|
const settings = await this.setting.getSettingValues([
|
|
179
178
|
'require-mfa',
|
|
180
179
|
'require-email-verification',
|
|
@@ -210,7 +209,8 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
210
209
|
variables: {
|
|
211
210
|
code,
|
|
212
211
|
name: user.name,
|
|
213
|
-
}
|
|
212
|
+
},
|
|
213
|
+
app: await this.challenge.resolveAppKeyFromOrigin(origin),
|
|
214
214
|
});
|
|
215
215
|
return {
|
|
216
216
|
requiresEmailVerification: true,
|
|
@@ -220,7 +220,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
220
220
|
})
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
async emailVerificationLoginResend(locale, token) {
|
|
223
|
+
async emailVerificationLoginResend(locale, token, origin) {
|
|
224
224
|
var _a;
|
|
225
225
|
try {
|
|
226
226
|
const payload = await this.token.verify(locale, token);
|
|
@@ -238,7 +238,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
238
238
|
throw new common_1.NotFoundException((0, api_locale_1.getLocaleText)('challengeNotFound', locale, 'Challenge not found.'));
|
|
239
239
|
}
|
|
240
240
|
const user = await this.user.findUserById(locale, challenge.user_identifier.user_id);
|
|
241
|
-
return await this.requiresEmailVerificationForLogin(locale, payload.email, user);
|
|
241
|
+
return await this.requiresEmailVerificationForLogin(locale, payload.email, user, origin);
|
|
242
242
|
}
|
|
243
243
|
catch (error) {
|
|
244
244
|
if (((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('jwt expired')) || error.name === 'TokenExpiredError') {
|
|
@@ -247,12 +247,12 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
247
247
|
challengeIdentifierId: expiredPayload.challengeIdentifierId,
|
|
248
248
|
email: expiredPayload.email
|
|
249
249
|
});
|
|
250
|
-
return this.emailVerificationLoginResend(locale, newToken);
|
|
250
|
+
return this.emailVerificationLoginResend(locale, newToken, origin);
|
|
251
251
|
}
|
|
252
252
|
throw error;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
async emailVerificationLogin(locale, token, code, ipAddress, userAgent, res, browserId) {
|
|
255
|
+
async emailVerificationLogin(locale, token, code, ipAddress, userAgent, res, browserId, origin) {
|
|
256
256
|
try {
|
|
257
257
|
const payload = await this.token.verify(locale, token);
|
|
258
258
|
const challenge = await this.prisma.user_identifier_challenge.findUnique({
|
|
@@ -294,13 +294,22 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
294
294
|
});
|
|
295
295
|
});
|
|
296
296
|
const user = await this.user.findUserById(locale, challenge.user_identifier.user_id);
|
|
297
|
-
return this.login(locale, user, ipAddress, userAgent, res, browserId);
|
|
297
|
+
return this.login(locale, user, ipAddress, userAgent, res, browserId, origin);
|
|
298
298
|
}
|
|
299
299
|
catch (error) {
|
|
300
300
|
throw error;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
async login(locale, user, ipAddress, userAgent, res, browserId) {
|
|
303
|
+
async login(locale, user, ipAddress, userAgent, res, browserId, origin) {
|
|
304
|
+
// Conta excluída pelo próprio usuário: os identificadores já foram
|
|
305
|
+
// anonimizados, mas a checagem fecha qualquer caminho remanescente.
|
|
306
|
+
const account = await this.prisma.user.findUnique({
|
|
307
|
+
where: { id: user.id },
|
|
308
|
+
select: { deactivated_at: true },
|
|
309
|
+
});
|
|
310
|
+
if (account === null || account === void 0 ? void 0 : account.deactivated_at) {
|
|
311
|
+
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('accessDenied', locale, 'Access denied.'));
|
|
312
|
+
}
|
|
304
313
|
const emails = await this.prisma.user_identifier.findMany({
|
|
305
314
|
where: {
|
|
306
315
|
user_id: user.id,
|
|
@@ -312,6 +321,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
312
321
|
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('accessDenied', locale, 'Access denied.'));
|
|
313
322
|
}
|
|
314
323
|
const { accessToken, refreshToken, session } = await this.getAuthenticationPayload(locale, user.id, ipAddress, userAgent, browserId);
|
|
324
|
+
const app = await this.challenge.resolveAppKeyFromOrigin(origin);
|
|
315
325
|
for (const emailObj of emails) {
|
|
316
326
|
this.mail.sendTemplatedMail(locale, {
|
|
317
327
|
email: emailObj.value,
|
|
@@ -321,7 +331,8 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
321
331
|
ipAddress,
|
|
322
332
|
userAgent,
|
|
323
333
|
location: 'Unknown',
|
|
324
|
-
}
|
|
334
|
+
},
|
|
335
|
+
app,
|
|
325
336
|
});
|
|
326
337
|
}
|
|
327
338
|
await this.user.registerUserActivity(user.id, "login");
|
|
@@ -332,7 +343,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
332
343
|
}
|
|
333
344
|
return { accessToken, requiresPasswordReset };
|
|
334
345
|
}
|
|
335
|
-
async loginWithEmailAndPassword(res, locale, ipAddress, userAgent, { email, password }, browserId) {
|
|
346
|
+
async loginWithEmailAndPassword(res, locale, ipAddress, userAgent, { email, password }, browserId, origin) {
|
|
336
347
|
var _a, _b;
|
|
337
348
|
const user = await this.user.findUserByEmail(locale, email);
|
|
338
349
|
if (!user)
|
|
@@ -362,7 +373,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
362
373
|
const emailMfas = mfaMethods.filter(m => m.type === 'email' && m.user_mfa_email && m.user_mfa_email.length > 0);
|
|
363
374
|
if (emailMfas.length > 0) {
|
|
364
375
|
const emails = emailMfas.map(mfa => mfa.user_mfa_email[0].email);
|
|
365
|
-
await this.challenge.sendMfaCodeToMultipleEmails(locale, user.id, emails);
|
|
376
|
+
await this.challenge.sendMfaCodeToMultipleEmails(locale, user.id, emails, origin);
|
|
366
377
|
}
|
|
367
378
|
return {
|
|
368
379
|
requiresMfa: true,
|
|
@@ -377,12 +388,12 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
377
388
|
'mfa-challenge-expiration-minutes'
|
|
378
389
|
]);
|
|
379
390
|
if (settings['require-mfa'] === true && mfaMethods.length === 0) {
|
|
380
|
-
return this.requiresMfaForLogin(locale, email, user);
|
|
391
|
+
return this.requiresMfaForLogin(locale, email, user, origin);
|
|
381
392
|
}
|
|
382
393
|
else if (settings['require-email-verification'] === true && (identifier === null || identifier === void 0 ? void 0 : identifier.verified_at) === null) {
|
|
383
|
-
return this.requiresEmailVerificationForLogin(locale, email, user);
|
|
394
|
+
return this.requiresEmailVerificationForLogin(locale, email, user, origin);
|
|
384
395
|
}
|
|
385
|
-
return this.login(locale, user, ipAddress, userAgent, res, browserId);
|
|
396
|
+
return this.login(locale, user, ipAddress, userAgent, res, browserId, origin);
|
|
386
397
|
}
|
|
387
398
|
async verifyRoles(_locale, userId) {
|
|
388
399
|
return this.prisma.role.findMany({
|
|
@@ -434,7 +445,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
434
445
|
}
|
|
435
446
|
return { success: true };
|
|
436
447
|
}
|
|
437
|
-
async forgotResetPassword(locale, password, code, ipAddress, userAgent) {
|
|
448
|
+
async forgotResetPassword(locale, password, code, ipAddress, userAgent, origin) {
|
|
438
449
|
const challenge = await this.challenge.verifyCodePassword(locale, code);
|
|
439
450
|
const userIdentifier = challenge.user_identifier;
|
|
440
451
|
const passwordHash = await this.security.hashArgon2(password);
|
|
@@ -450,10 +461,11 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
450
461
|
slug: 'auth-forget-password-confirmation',
|
|
451
462
|
variables: {
|
|
452
463
|
name: userIdentifier.user.name,
|
|
453
|
-
}
|
|
464
|
+
},
|
|
465
|
+
app: await this.challenge.resolveAppKeyFromOrigin(origin),
|
|
454
466
|
});
|
|
455
467
|
const { accessToken, refreshToken, session } = await this.getAuthenticationPayload(locale, userIdentifier.user_id, ipAddress, userAgent);
|
|
456
|
-
await this.user.registerUserActivity(userIdentifier.
|
|
468
|
+
await this.user.registerUserActivity(userIdentifier.user_id, "resetPassword");
|
|
457
469
|
return { accessToken, refreshToken, session };
|
|
458
470
|
}
|
|
459
471
|
/**
|
|
@@ -508,16 +520,51 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
508
520
|
/**
|
|
509
521
|
* Valida (sem consumir) um token de convite de criação de conta e retorna os
|
|
510
522
|
* dados básicos para pré-preencher o formulário no app de treinamentos.
|
|
523
|
+
* `hasAccount` diz se esse usuário já tem um jeito de entrar (senha ativa ou
|
|
524
|
+
* provedor externo vinculado) — usado pelo app para decidir entre mostrar o
|
|
525
|
+
* formulário de criação de conta ou uma tela de autorização de acesso.
|
|
511
526
|
*/
|
|
512
527
|
async verifyAccountInvite(locale, code) {
|
|
513
528
|
var _a, _b;
|
|
514
529
|
const challenge = await this.challenge.verifyCodePassword(locale, code);
|
|
530
|
+
const userId = challenge.user_identifier.user_id;
|
|
531
|
+
const [passwordCount, oauthCount] = await Promise.all([
|
|
532
|
+
this.prisma.user_credential.count({
|
|
533
|
+
where: { user_id: userId, type: 'password', revoked_at: null },
|
|
534
|
+
}),
|
|
535
|
+
this.prisma.user_account.count({ where: { user_id: userId } }),
|
|
536
|
+
]);
|
|
515
537
|
return {
|
|
516
538
|
valid: true,
|
|
517
539
|
name: (_b = (_a = challenge.user_identifier.user) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : null,
|
|
518
540
|
email: challenge.user_identifier.value,
|
|
541
|
+
hasAccount: passwordCount > 0 || oauthCount > 0,
|
|
519
542
|
};
|
|
520
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* Conclui um convite de acesso para quem já tem conta (senha ou provedor
|
|
546
|
+
* externo): não define senha nenhuma, só prova controle do e-mail (mesmo
|
|
547
|
+
* nível de confiança do link de reset de senha) e autentica o usuário.
|
|
548
|
+
*/
|
|
549
|
+
async authorizeAccountInvite(locale, code, ipAddress, userAgent) {
|
|
550
|
+
var _a;
|
|
551
|
+
const challenge = await this.challenge.verifyCodePassword(locale, code);
|
|
552
|
+
const userIdentifier = challenge.user_identifier;
|
|
553
|
+
if (!userIdentifier.verified_at || !userIdentifier.enabled) {
|
|
554
|
+
await this.prisma.user_identifier.update({
|
|
555
|
+
where: { id: userIdentifier.id },
|
|
556
|
+
data: { verified_at: (_a = userIdentifier.verified_at) !== null && _a !== void 0 ? _a : new Date(), enabled: true },
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
// Consome o challenge para impedir reuso do link.
|
|
560
|
+
await this.prisma.user_identifier_challenge.updateMany({
|
|
561
|
+
where: { id: challenge.id },
|
|
562
|
+
data: { verified_at: new Date(), expires_at: new Date() },
|
|
563
|
+
});
|
|
564
|
+
const { accessToken, refreshToken, session } = await this.getAuthenticationPayload(locale, userIdentifier.user_id, ipAddress, userAgent);
|
|
565
|
+
await this.user.registerUserActivity(userIdentifier.user_id, 'authorizeAccountInvite');
|
|
566
|
+
return { accessToken, refreshToken, session };
|
|
567
|
+
}
|
|
521
568
|
/**
|
|
522
569
|
* Conclui a criação de conta a partir de um token de convite: cria/atualiza a
|
|
523
570
|
* credencial de senha, marca o identificador como verificado, atualiza o nome
|
|
@@ -561,10 +608,10 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
561
608
|
data: { verified_at: new Date(), expires_at: new Date() },
|
|
562
609
|
});
|
|
563
610
|
const { accessToken, refreshToken, session } = await this.getAuthenticationPayload(locale, userIdentifier.user_id, ipAddress, userAgent);
|
|
564
|
-
await this.user.registerUserActivity(userIdentifier.
|
|
611
|
+
await this.user.registerUserActivity(userIdentifier.user_id, 'completeAccount');
|
|
565
612
|
return { accessToken, refreshToken, session };
|
|
566
613
|
}
|
|
567
|
-
async verifyMfaCode(locale, mfaToken, code, ipAddress, userAgent, methodType, browserId) {
|
|
614
|
+
async verifyMfaCode(locale, mfaToken, code, ipAddress, userAgent, methodType, browserId, origin) {
|
|
568
615
|
var _a, _b, _c, _d;
|
|
569
616
|
const payload = await this.token.verifyMfaChallengeToken(mfaToken);
|
|
570
617
|
const user = await this.prisma.user.findUnique({
|
|
@@ -662,7 +709,8 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
662
709
|
ipAddress,
|
|
663
710
|
userAgent,
|
|
664
711
|
location: 'Unknown',
|
|
665
|
-
}
|
|
712
|
+
},
|
|
713
|
+
app: await this.challenge.resolveAppKeyFromOrigin(origin),
|
|
666
714
|
});
|
|
667
715
|
await this.user.registerUserActivity(user.id, "login");
|
|
668
716
|
const requiresPasswordReset = await this.getRequiresPasswordResetByUserId(user.id);
|
|
@@ -697,7 +745,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
697
745
|
const requiresPasswordReset = await this.getRequiresPasswordResetByUserId(user.id);
|
|
698
746
|
return { accessToken, refreshToken, session, requiresPasswordReset };
|
|
699
747
|
}
|
|
700
|
-
async resendMfaCode(locale, mfaToken) {
|
|
748
|
+
async resendMfaCode(locale, mfaToken, origin) {
|
|
701
749
|
const payload = await this.token.verifyMfaChallengeToken(mfaToken);
|
|
702
750
|
const mfaMethods = await this.prisma.user_mfa.findMany({
|
|
703
751
|
where: {
|
|
@@ -716,7 +764,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
716
764
|
if (!emailMfa.user_mfa_email || emailMfa.user_mfa_email.length === 0) {
|
|
717
765
|
throw new common_1.BadRequestException((0, api_locale_1.getLocaleText)('noEmailMfaFound', locale, 'No email MFA method found for this user.'));
|
|
718
766
|
}
|
|
719
|
-
await this.challenge.sendMfaCodeByEmail(locale, payload.userId, emailMfa.user_mfa_email[0].email);
|
|
767
|
+
await this.challenge.sendMfaCodeByEmail(locale, payload.userId, emailMfa.user_mfa_email[0].email, origin);
|
|
720
768
|
return {
|
|
721
769
|
success: true,
|
|
722
770
|
hasEmailMfa: true
|
|
@@ -819,7 +867,8 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
819
867
|
ipAddress,
|
|
820
868
|
userAgent,
|
|
821
869
|
location: 'Unknown',
|
|
822
|
-
}
|
|
870
|
+
},
|
|
871
|
+
app: await this.challenge.resolveAppKeyFromOrigin(requestOrigin),
|
|
823
872
|
});
|
|
824
873
|
await this.user.registerUserActivity(userId, 'login');
|
|
825
874
|
const requiresPasswordReset = await this.getRequiresPasswordResetByUserId(userId);
|