@vitnode/core 1.2.0-canary.51 → 1.2.0-canary.53
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/config/next.config.ts +3 -3
- package/dist/scripts/get-config.d.ts +2 -2
- package/dist/scripts/get-config.d.ts.map +1 -1
- package/dist/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/prepare-database.d.ts.map +1 -1
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
- package/dist/scripts/scripts.js +4 -4
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/adapters/email/nodemailer.d.ts +1 -1
- package/dist/src/api/adapters/email/nodemailer.js +3 -3
- package/dist/src/api/adapters/email/resend.d.ts +1 -1
- package/dist/src/api/adapters/email/resend.js +2 -2
- package/dist/src/api/adapters/sso/discord.d.ts +1 -1
- package/dist/src/api/adapters/sso/discord.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/discord.js +21 -21
- package/dist/src/api/adapters/sso/facebook.d.ts +1 -1
- package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/facebook.js +23 -23
- package/dist/src/api/adapters/sso/google.d.ts +1 -1
- package/dist/src/api/adapters/sso/google.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/google.js +21 -21
- package/dist/src/api/config.d.ts +3 -3
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +11 -11
- package/dist/src/api/lib/check-plugin-id.js +8 -8
- package/dist/src/api/lib/logger-middleware.d.ts +1 -1
- package/dist/src/api/lib/logger-middleware.js +9 -9
- package/dist/src/api/lib/module.d.ts +2 -2
- package/dist/src/api/lib/plugin.d.ts +2 -2
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/lib/route.d.ts +2 -2
- package/dist/src/api/lib/route.d.ts.map +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/lib/with-pagination.d.ts +7 -7
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
- package/dist/src/api/lib/with-pagination.js +37 -24
- package/dist/src/api/middlewares/captcha.middleware.d.ts +1 -1
- package/dist/src/api/middlewares/captcha.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/captcha.middleware.js +14 -13
- package/dist/src/api/middlewares/global.middleware.d.ts +12 -20
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +29 -28
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +3 -3
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/rate-limiter.middleware.js +4 -4
- package/dist/src/api/models/device.d.ts +1 -1
- package/dist/src/api/models/device.d.ts.map +1 -1
- package/dist/src/api/models/device.js +13 -13
- package/dist/src/api/models/email.d.ts +27 -11
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +35 -22
- package/dist/src/api/models/password.d.ts +4 -0
- package/dist/src/api/models/password.d.ts.map +1 -1
- package/dist/src/api/models/password.js +15 -7
- package/dist/src/api/models/session-admin.d.ts +2 -1
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session-admin.js +19 -19
- package/dist/src/api/models/session.d.ts +2 -1
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/session.js +17 -17
- package/dist/src/api/models/sso.d.ts +1 -1
- package/dist/src/api/models/sso.d.ts.map +1 -1
- package/dist/src/api/models/sso.js +24 -24
- package/dist/src/api/models/user/get-user-by-id.d.ts +2 -1
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
- package/dist/src/api/models/user/get-user-by-id.js +3 -2
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.js +1 -1
- package/dist/src/api/models/user/sign-up.d.ts +1 -1
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.js +13 -14
- package/dist/src/api/models/user.d.ts +1 -0
- package/dist/src/api/models/user.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +3 -3
- package/dist/src/api/modules/admin/admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +2 -2
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +16 -16
- package/dist/src/api/modules/admin/routes/session.route.d.ts +2 -2
- package/dist/src/api/modules/admin/routes/session.route.js +7 -7
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/list.route.js +12 -12
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/users.route.js +15 -15
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
- package/dist/src/api/modules/middleware/middleware.module.d.ts +1 -1
- package/dist/src/api/modules/middleware/middleware.module.js +1 -1
- package/dist/src/api/modules/middleware/route.d.ts +2 -2
- package/dist/src/api/modules/middleware/route.js +12 -12
- package/dist/src/api/modules/users/routes/change-password.route.d.ts +52 -0
- package/dist/src/api/modules/users/routes/change-password.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/change-password.route.js +58 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts +42 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +91 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/session.route.js +6 -6
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/sign-in.route.js +10 -10
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/sign-out.route.js +7 -7
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +9 -3
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/sign-up.route.js +18 -12
- package/dist/src/api/modules/users/routes/test.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/test.route.js +9 -15
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +6 -3
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/sso/routes/callback.route.js +10 -7
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +2 -2
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +6 -6
- package/dist/src/api/modules/users/sso/sso.module.d.ts +6 -3
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -1
- package/dist/src/api/modules/users/sso/sso.module.js +1 -1
- package/dist/src/api/modules/users/users.module.d.ts +103 -11
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -1
- package/dist/src/api/modules/users/users.module.js +6 -2
- package/dist/src/app/login/page.d.ts +1 -1
- package/dist/src/app/login/page.js +2 -2
- package/dist/src/app/login/reset-password/page.d.ts +9 -0
- package/dist/src/app/login/reset-password/page.d.ts.map +1 -0
- package/dist/src/app/login/reset-password/page.js +18 -0
- package/dist/src/app/register/page.d.ts +1 -1
- package/dist/src/app/register/page.js +2 -2
- package/dist/src/app_admin/core/debug/page.d.ts +1 -1
- package/dist/src/app_admin/core/debug/page.js +8 -8
- package/dist/src/app_admin/core/users/page.d.ts +2 -2
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/users/page.js +7 -7
- package/dist/src/components/avatar.d.ts +1 -1
- package/dist/src/components/avatar.js +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +2 -2
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +5 -5
- package/dist/src/components/confirm-action/content.d.ts.map +1 -1
- package/dist/src/components/confirm-action/content.js +3 -4
- package/dist/src/components/date-format.js +8 -8
- package/dist/src/components/form/auto-form.d.ts +17 -16
- package/dist/src/components/form/auto-form.d.ts.map +1 -1
- package/dist/src/components/form/auto-form.js +15 -13
- package/dist/src/components/form/common/desc.js +1 -1
- package/dist/src/components/form/common/label.d.ts +4 -2
- package/dist/src/components/form/common/label.d.ts.map +1 -1
- package/dist/src/components/form/common/label.js +14 -4
- package/dist/src/components/form/fields/checkbox.d.ts +3 -3
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
- package/dist/src/components/form/fields/checkbox.js +2 -1
- package/dist/src/components/form/fields/combobox-async.d.ts +4 -4
- package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.js +31 -24
- package/dist/src/components/form/fields/combobox.d.ts +4 -4
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox.js +8 -8
- package/dist/src/components/form/fields/input.d.ts +3 -3
- package/dist/src/components/form/fields/input.d.ts.map +1 -1
- package/dist/src/components/form/fields/input.js +4 -3
- package/dist/src/components/form/fields/radio-group.d.ts +4 -4
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -1
- package/dist/src/components/form/fields/radio-group.js +2 -2
- package/dist/src/components/form/fields/select.d.ts +4 -4
- package/dist/src/components/form/fields/select.d.ts.map +1 -1
- package/dist/src/components/form/fields/select.js +4 -4
- package/dist/src/components/form/fields/switch.d.ts +3 -3
- package/dist/src/components/form/fields/switch.d.ts.map +1 -1
- package/dist/src/components/form/fields/switch.js +2 -1
- package/dist/src/components/form/fields/textarea.d.ts +4 -4
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -1
- package/dist/src/components/form/fields/textarea.js +3 -3
- package/dist/src/components/i18n-provider.d.ts +2 -2
- package/dist/src/components/i18n-provider.js +3 -3
- package/dist/src/components/logo-vitnode.d.ts.map +1 -1
- package/dist/src/components/logo-vitnode.js +8 -2
- package/dist/src/components/switchers/langs/language-swietcher.d.ts +1 -1
- package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +1 -1
- package/dist/src/components/switchers/langs/language-swietcher.js +3 -3
- package/dist/src/components/switchers/themes/theme-switcher.js +4 -4
- package/dist/src/components/table/content.d.ts +1 -1
- package/dist/src/components/table/content.d.ts.map +1 -1
- package/dist/src/components/table/content.js +5 -5
- package/dist/src/components/table/data-table.d.ts +7 -7
- package/dist/src/components/table/data-table.d.ts.map +1 -1
- package/dist/src/components/table/data-table.js +22 -15
- package/dist/src/components/table/order-table-head.d.ts +4 -4
- package/dist/src/components/table/order-table-head.d.ts.map +1 -1
- package/dist/src/components/table/order-table-head.js +20 -9
- package/dist/src/components/table/pagination.js +19 -19
- package/dist/src/components/ui/accordion.d.ts +2 -2
- package/dist/src/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/components/ui/accordion.js +4 -5
- package/dist/src/components/ui/alert-dialog.d.ts +7 -7
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/components/ui/alert-dialog.js +13 -14
- package/dist/src/components/ui/alert.d.ts +6 -6
- package/dist/src/components/ui/alert.d.ts.map +1 -1
- package/dist/src/components/ui/alert.js +6 -7
- package/dist/src/components/ui/badge.d.ts +4 -4
- package/dist/src/components/ui/badge.d.ts.map +1 -1
- package/dist/src/components/ui/badge.js +7 -8
- package/dist/src/components/ui/button-client.d.ts +1 -1
- package/dist/src/components/ui/button-client.js +9 -9
- package/dist/src/components/ui/button.d.ts +9 -9
- package/dist/src/components/ui/button.d.ts.map +1 -1
- package/dist/src/components/ui/button.js +14 -15
- package/dist/src/components/ui/card.d.ts +8 -8
- package/dist/src/components/ui/card.d.ts.map +1 -1
- package/dist/src/components/ui/card.js +7 -8
- package/dist/src/components/ui/checkbox.d.ts +2 -2
- package/dist/src/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/components/ui/checkbox.js +2 -3
- package/dist/src/components/ui/collapsible.d.ts +1 -1
- package/dist/src/components/ui/collapsible.js +1 -1
- package/dist/src/components/ui/command.d.ts +4 -4
- package/dist/src/components/ui/command.d.ts.map +1 -1
- package/dist/src/components/ui/command.js +9 -10
- package/dist/src/components/ui/context-menu.d.ts +4 -4
- package/dist/src/components/ui/context-menu.d.ts.map +1 -1
- package/dist/src/components/ui/context-menu.js +7 -8
- package/dist/src/components/ui/dialog.d.ts +6 -6
- package/dist/src/components/ui/dialog.d.ts.map +1 -1
- package/dist/src/components/ui/dialog.js +16 -16
- package/dist/src/components/ui/drawer.d.ts +4 -4
- package/dist/src/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/components/ui/drawer.js +7 -8
- package/dist/src/components/ui/dropdown-menu.d.ts +4 -4
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/components/ui/dropdown-menu.js +8 -9
- package/dist/src/components/ui/form.d.ts +10 -10
- package/dist/src/components/ui/form.d.ts.map +1 -1
- package/dist/src/components/ui/form.js +15 -15
- package/dist/src/components/ui/header-content.js +1 -1
- package/dist/src/components/ui/hover-card.d.ts +2 -2
- package/dist/src/components/ui/hover-card.d.ts.map +1 -1
- package/dist/src/components/ui/hover-card.js +3 -4
- package/dist/src/components/ui/input-otp.d.ts +5 -5
- package/dist/src/components/ui/input-otp.d.ts.map +1 -1
- package/dist/src/components/ui/input-otp.js +6 -7
- package/dist/src/components/ui/input.d.ts +2 -2
- package/dist/src/components/ui/input.d.ts.map +1 -1
- package/dist/src/components/ui/input.js +1 -2
- package/dist/src/components/ui/label.d.ts +2 -2
- package/dist/src/components/ui/label.d.ts.map +1 -1
- package/dist/src/components/ui/label.js +2 -3
- package/dist/src/components/ui/loader.js +3 -3
- package/dist/src/components/ui/menubar.d.ts +4 -4
- package/dist/src/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/components/ui/menubar.js +11 -12
- package/dist/src/components/ui/navigation-menu.d.ts +2 -2
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/src/components/ui/navigation-menu.js +10 -11
- package/dist/src/components/ui/popover.d.ts +3 -3
- package/dist/src/components/ui/popover.d.ts.map +1 -1
- package/dist/src/components/ui/popover.js +4 -4
- package/dist/src/components/ui/progress.d.ts +2 -2
- package/dist/src/components/ui/progress.d.ts.map +1 -1
- package/dist/src/components/ui/progress.js +2 -3
- package/dist/src/components/ui/radio-group.d.ts +2 -2
- package/dist/src/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/components/ui/radio-group.js +3 -4
- package/dist/src/components/ui/select.d.ts +3 -3
- package/dist/src/components/ui/select.d.ts.map +1 -1
- package/dist/src/components/ui/select.js +9 -10
- package/dist/src/components/ui/separator.d.ts +2 -2
- package/dist/src/components/ui/separator.d.ts.map +1 -1
- package/dist/src/components/ui/separator.js +3 -4
- package/dist/src/components/ui/sheet.d.ts +5 -5
- package/dist/src/components/ui/sheet.d.ts.map +1 -1
- package/dist/src/components/ui/sheet.js +8 -9
- package/dist/src/components/ui/sidebar.d.ts +31 -31
- package/dist/src/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.js +67 -69
- package/dist/src/components/ui/skeleton.d.ts +1 -1
- package/dist/src/components/ui/skeleton.js +1 -1
- package/dist/src/components/ui/slider.d.ts +2 -2
- package/dist/src/components/ui/slider.d.ts.map +1 -1
- package/dist/src/components/ui/slider.js +16 -8
- package/dist/src/components/ui/sonner.d.ts +1 -1
- package/dist/src/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/components/ui/sonner.js +6 -6
- package/dist/src/components/ui/switch.d.ts +2 -2
- package/dist/src/components/ui/switch.d.ts.map +1 -1
- package/dist/src/components/ui/switch.js +3 -4
- package/dist/src/components/ui/table.d.ts +9 -9
- package/dist/src/components/ui/table.d.ts.map +1 -1
- package/dist/src/components/ui/table.js +8 -9
- package/dist/src/components/ui/tabs.d.ts +2 -2
- package/dist/src/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/components/ui/tabs.js +4 -5
- package/dist/src/components/ui/textarea.d.ts +2 -2
- package/dist/src/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/components/ui/textarea.js +1 -2
- package/dist/src/components/ui/toggle-group.d.ts +4 -4
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/components/ui/toggle-group.js +6 -6
- package/dist/src/components/ui/toggle.d.ts +3 -3
- package/dist/src/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/components/ui/toggle.js +8 -9
- package/dist/src/components/ui/tooltip.d.ts +3 -3
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/components/ui/tooltip.js +8 -10
- package/dist/src/config.js +2 -2
- package/dist/src/database/admins.js +10 -10
- package/dist/src/database/languages.js +7 -7
- package/dist/src/database/logs.js +9 -9
- package/dist/src/database/moderators.js +5 -5
- package/dist/src/database/roles.js +1 -1
- package/dist/src/database/sessions.js +6 -6
- package/dist/src/database/users.d.ts +21 -2
- package/dist/src/database/users.d.ts.map +1 -1
- package/dist/src/database/users.js +18 -15
- package/dist/src/drizzle.config.d.ts +2 -2
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +19 -12
- package/dist/src/emails/default-template.d.ts +34 -22
- package/dist/src/emails/default-template.d.ts.map +1 -1
- package/dist/src/emails/default-template.js +61 -66
- package/dist/src/emails/reset-password.d.ts +56 -0
- package/dist/src/emails/reset-password.d.ts.map +1 -0
- package/dist/src/emails/reset-password.js +132 -0
- package/dist/src/emails/ui/button.d.ts +9 -0
- package/dist/src/emails/ui/button.d.ts.map +1 -0
- package/dist/src/emails/ui/button.js +36 -0
- package/dist/src/emails/ui/card.d.ts +8 -0
- package/dist/src/emails/ui/card.d.ts.map +1 -0
- package/dist/src/emails/ui/card.js +39 -0
- package/dist/src/hooks/use-before-unload.js +3 -3
- package/dist/src/hooks/use-captcha.d.ts +2 -2
- package/dist/src/hooks/use-captcha.d.ts.map +1 -1
- package/dist/src/hooks/use-captcha.js +64 -40
- package/dist/src/hooks/use-mobile.d.ts.map +1 -1
- package/dist/src/hooks/use-mobile.js +3 -4
- package/dist/src/lib/api/get-middleware-api.js +4 -4
- package/dist/src/lib/api/get-session-admin-api.js +5 -5
- package/dist/src/lib/api/get-session-api.js +4 -4
- package/dist/src/lib/colors.js +28 -19
- package/dist/src/lib/colors.test.js +60 -60
- package/dist/src/lib/config.js +3 -3
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +27 -27
- package/dist/src/lib/fetcher/core.d.ts +5 -5
- package/dist/src/lib/fetcher/core.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.js +16 -10
- package/dist/src/lib/fetcher/helpers-server.d.ts +1 -1
- package/dist/src/lib/fetcher/helpers-server.js +1 -1
- package/dist/src/lib/fetcher/helpers.test.js +17 -17
- package/dist/src/lib/fetcher/types.d.ts +26 -26
- package/dist/src/lib/fetcher/types.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.d.ts +4 -4
- package/dist/src/lib/fetcher-client.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.js +3 -3
- package/dist/src/lib/fetcher.d.ts +5 -5
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/fetcher.js +4 -4
- package/dist/src/lib/helpers/auto-form.d.ts +3 -3
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
- package/dist/src/lib/helpers/auto-form.js +16 -15
- package/dist/src/lib/helpers/auto-form.test.js +129 -129
- package/dist/src/lib/navigation.d.ts +2 -2
- package/dist/src/lib/navigation.d.ts.map +1 -1
- package/dist/src/lib/plugin.d.ts +3 -3
- package/dist/src/lib/special-characters.js +1 -1
- package/dist/src/lib/special-characters.test.js +36 -36
- package/dist/src/lib/utils.d.ts +1 -1
- package/dist/src/tests/setup.d.ts +1 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts +1 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +4 -8
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +11 -12
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +11 -11
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +1 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +1 -2
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +1 -1
- package/dist/src/views/admin/layouts/user-bar/client.js +5 -5
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +1 -1
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +3 -2
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +3 -3
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +10 -10
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +2 -2
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +15 -15
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +7 -7
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +7 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +3 -3
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +25 -25
- package/dist/src/views/admin/views/core/test.js +43 -43
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/users-admin-view.js +13 -14
- package/dist/src/views/auth/password-reset/change-password-form/form.d.ts +5 -0
- package/dist/src/views/auth/password-reset/change-password-form/form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/form.js +48 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts +6 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +22 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts +11 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.js +36 -0
- package/dist/src/views/auth/password-reset/form/form.d.ts +6 -0
- package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/form.js +104 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.d.ts +7 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.js +21 -0
- package/dist/src/views/auth/password-reset/form/use-form.d.ts +12 -0
- package/dist/src/views/auth/password-reset/form/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/use-form.js +33 -0
- package/dist/src/views/auth/password-reset/password-reset-view.d.ts +7 -0
- package/dist/src/views/auth/password-reset/password-reset-view.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/password-reset-view.js +37 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts +2 -1
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/form.js +15 -10
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts +2 -2
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/mutation-api.js +10 -10
- package/dist/src/views/auth/sign-in/form/use-form.d.ts +2 -2
- package/dist/src/views/auth/sign-in/form/use-form.js +11 -11
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/sign-in-view.js +13 -7
- package/dist/src/views/auth/{components → sign-up/components}/password-input.d.ts +3 -3
- package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -0
- package/dist/src/views/auth/{components → sign-up/components}/password-input.js +13 -14
- package/dist/src/views/auth/sign-up/email-confirmation-view.js +4 -4
- package/dist/src/views/auth/sign-up/form/form.d.ts +2 -2
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/form.js +20 -33
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts +3 -3
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/mutation-api.js +6 -6
- package/dist/src/views/auth/sign-up/form/use-form.d.ts +3 -8
- package/dist/src/views/auth/sign-up/form/use-form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/use-form.js +27 -24
- package/dist/src/views/auth/sign-up/sign-up-view.js +6 -6
- package/dist/src/views/auth/sign-up/wrapper.d.ts +1 -1
- package/dist/src/views/auth/sign-up/wrapper.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/wrapper.js +5 -8
- package/dist/src/views/auth/sso/buttons/client.js +4 -4
- package/dist/src/views/auth/sso/buttons/mutation-api.js +5 -5
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +2 -2
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +21 -7
- package/dist/src/views/auth/sso/callback/client/client.d.ts +3 -1
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/client/client.js +36 -7
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +11 -6
- package/dist/src/views/error/back-button.js +1 -1
- package/dist/src/views/error/error-view.d.ts +5 -3
- package/dist/src/views/error/error-view.d.ts.map +1 -1
- package/dist/src/views/error/error-view.js +25 -23
- package/dist/src/views/error/global-error-view.d.ts +3 -3
- package/dist/src/views/error/global-error-view.d.ts.map +1 -1
- package/dist/src/views/error/global-error-view.js +36 -44
- package/dist/src/views/layouts/provider.d.ts +4 -4
- package/dist/src/views/layouts/provider.d.ts.map +1 -1
- package/dist/src/views/layouts/provider.js +3 -3
- package/dist/src/views/layouts/root-layout.d.ts +3 -3
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
- package/dist/src/views/layouts/root-layout.js +1 -2
- package/dist/src/views/layouts/theme/header/header.d.ts +2 -2
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.js +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.js +4 -4
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +8 -8
- package/dist/src/views/layouts/theme/header/user/user.js +4 -4
- package/dist/src/views/layouts/theme/layout.d.ts +2 -2
- package/dist/src/views/layouts/theme/layout.js +1 -1
- package/dist/src/vitnode.config.d.ts +16 -13
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -46
- package/src/app/login/page.tsx +5 -5
- package/src/app/login/reset-password/page.tsx +27 -0
- package/src/app/login/sso/[providerId]/page.tsx +1 -1
- package/src/app/register/page.tsx +5 -5
- package/src/app_admin/core/debug/page.tsx +14 -14
- package/src/app_admin/core/page.tsx +1 -1
- package/src/app_admin/core/test/page.tsx +1 -1
- package/src/app_admin/core/users/page.tsx +12 -13
- package/src/locales/en.json +42 -2
- package/dist/src/views/auth/components/password-input.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
2
|
export declare const signOutRoute: {
|
|
3
3
|
handler: (c: import("hono").Context<import("../../../middlewares/global.middleware").EnvVitNode, "/sign_out", {
|
|
4
4
|
in: {
|
|
@@ -20,7 +20,7 @@ export declare const signOutRoute: {
|
|
|
20
20
|
request: {
|
|
21
21
|
body: {
|
|
22
22
|
content: {
|
|
23
|
-
|
|
23
|
+
"application/json": {
|
|
24
24
|
schema: z.ZodObject<{
|
|
25
25
|
isAdmin: z.ZodOptional<z.ZodBoolean>;
|
|
26
26
|
}, z.core.$strip>;
|
|
@@ -6,13 +6,13 @@ import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
|
6
6
|
export const signOutRoute = buildRoute({
|
|
7
7
|
...CONFIG_PLUGIN,
|
|
8
8
|
route: {
|
|
9
|
-
method:
|
|
10
|
-
description:
|
|
11
|
-
path:
|
|
9
|
+
method: "delete",
|
|
10
|
+
description: "Sign out the current admin",
|
|
11
|
+
path: "/sign_out",
|
|
12
12
|
request: {
|
|
13
13
|
body: {
|
|
14
14
|
content: {
|
|
15
|
-
|
|
15
|
+
"application/json": {
|
|
16
16
|
schema: z.object({
|
|
17
17
|
isAdmin: z.boolean().optional().openapi({
|
|
18
18
|
example: false
|
|
@@ -24,15 +24,15 @@ export const signOutRoute = buildRoute({
|
|
|
24
24
|
},
|
|
25
25
|
responses: {
|
|
26
26
|
200: {
|
|
27
|
-
description:
|
|
27
|
+
description: "User signed out"
|
|
28
28
|
},
|
|
29
29
|
403: {
|
|
30
|
-
description:
|
|
30
|
+
description: "Access Denied"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
handler: async (c)=>{
|
|
35
|
-
const { isAdmin } = c.req.valid(
|
|
35
|
+
const { isAdmin } = c.req.valid("json");
|
|
36
36
|
if (isAdmin) {
|
|
37
37
|
await new SessionAdminModel(c).deleteSession();
|
|
38
38
|
return c.json({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export declare const zodSignUpSchema: z.ZodObject<{
|
|
3
3
|
email: z.ZodEmail;
|
|
4
4
|
name: z.ZodString;
|
|
@@ -38,7 +38,7 @@ export declare const signUpRoute: {
|
|
|
38
38
|
body: {
|
|
39
39
|
required: true;
|
|
40
40
|
content: {
|
|
41
|
-
|
|
41
|
+
"application/json": {
|
|
42
42
|
schema: z.ZodObject<{
|
|
43
43
|
email: z.ZodEmail;
|
|
44
44
|
name: z.ZodString;
|
|
@@ -52,7 +52,7 @@ export declare const signUpRoute: {
|
|
|
52
52
|
responses: {
|
|
53
53
|
201: {
|
|
54
54
|
content: {
|
|
55
|
-
|
|
55
|
+
"application/json": {
|
|
56
56
|
schema: z.ZodObject<{
|
|
57
57
|
id: z.ZodNumber;
|
|
58
58
|
emailVerified: z.ZodBoolean;
|
|
@@ -62,6 +62,12 @@ export declare const signUpRoute: {
|
|
|
62
62
|
};
|
|
63
63
|
description: string;
|
|
64
64
|
};
|
|
65
|
+
400: {
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
409: {
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
65
71
|
};
|
|
66
72
|
} & {
|
|
67
73
|
getRoutingPath: () => "/sign_up";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign-up.route.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/users/routes/sign-up.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,eAAe;;;;;iBAe1B,CAAC;AAEH,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"sign-up.route.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/users/routes/sign-up.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,eAAe;;;;;iBAe1B,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DtB,CAAC"}
|
|
@@ -7,30 +7,30 @@ import { SessionModel } from "../../../models/session.js";
|
|
|
7
7
|
const nameRegex = /^(?!.* {2})[\p{L}\p{N}._@ -]*$/u;
|
|
8
8
|
export const zodSignUpSchema = z.object({
|
|
9
9
|
email: z.email().toLowerCase().openapi({
|
|
10
|
-
example:
|
|
10
|
+
example: "test@test.com"
|
|
11
11
|
}),
|
|
12
12
|
name: z.string().openapi({
|
|
13
|
-
example:
|
|
13
|
+
example: "test"
|
|
14
14
|
}).min(3).refine((val)=>nameRegex.test(val), {
|
|
15
|
-
message:
|
|
15
|
+
message: "Invalid name"
|
|
16
16
|
}),
|
|
17
17
|
password: z.string().min(8).openapi({
|
|
18
|
-
example:
|
|
18
|
+
example: "Test123!"
|
|
19
19
|
}),
|
|
20
20
|
newsletter: z.boolean().default(false).optional()
|
|
21
21
|
});
|
|
22
22
|
export const signUpRoute = buildRoute({
|
|
23
23
|
...CONFIG_PLUGIN,
|
|
24
24
|
route: {
|
|
25
|
-
method:
|
|
26
|
-
description:
|
|
27
|
-
path:
|
|
25
|
+
method: "post",
|
|
26
|
+
description: "Create a new user",
|
|
27
|
+
path: "/sign_up",
|
|
28
28
|
withCaptcha: true,
|
|
29
29
|
request: {
|
|
30
30
|
body: {
|
|
31
31
|
required: true,
|
|
32
32
|
content: {
|
|
33
|
-
|
|
33
|
+
"application/json": {
|
|
34
34
|
schema: zodSignUpSchema
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -39,7 +39,7 @@ export const signUpRoute = buildRoute({
|
|
|
39
39
|
responses: {
|
|
40
40
|
201: {
|
|
41
41
|
content: {
|
|
42
|
-
|
|
42
|
+
"application/json": {
|
|
43
43
|
schema: z.object({
|
|
44
44
|
id: z.number(),
|
|
45
45
|
emailVerified: z.boolean(),
|
|
@@ -47,14 +47,20 @@ export const signUpRoute = buildRoute({
|
|
|
47
47
|
})
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
description:
|
|
50
|
+
description: "User created"
|
|
51
|
+
},
|
|
52
|
+
400: {
|
|
53
|
+
description: "Bad Request"
|
|
54
|
+
},
|
|
55
|
+
409: {
|
|
56
|
+
description: "Email or name already exists"
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
},
|
|
54
60
|
handler: async (c)=>{
|
|
55
|
-
const hashedPassword = await new PasswordModel().encryptPassword(c.req.valid(
|
|
61
|
+
const hashedPassword = await new PasswordModel().encryptPassword(c.req.valid("json").password);
|
|
56
62
|
const data = await new UserModel().signUp({
|
|
57
|
-
...c.req.valid(
|
|
63
|
+
...c.req.valid("json"),
|
|
58
64
|
hashedPassword
|
|
59
65
|
}, c);
|
|
60
66
|
if (data.emailVerified) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export declare const testRoute: {
|
|
3
3
|
handler: (c: import("hono").Context<import("../../../middlewares/global.middleware").EnvVitNode, "/test", {}>) => Promise<Response & import("hono").TypedResponse<"test", 200 | 201, "text">>;
|
|
4
4
|
pluginId: "@vitnode/core";
|
|
@@ -9,7 +9,7 @@ export declare const testRoute: {
|
|
|
9
9
|
responses: {
|
|
10
10
|
200: {
|
|
11
11
|
content: {
|
|
12
|
-
|
|
12
|
+
"text/plain": {
|
|
13
13
|
schema: z.ZodString;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
@@ -17,7 +17,7 @@ export declare const testRoute: {
|
|
|
17
17
|
};
|
|
18
18
|
201: {
|
|
19
19
|
content: {
|
|
20
|
-
|
|
20
|
+
"text/plain": {
|
|
21
21
|
schema: z.ZodString;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.route.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/users/routes/test.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"test.route.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/users/routes/test.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BpB,CAAC"}
|
|
@@ -4,36 +4,30 @@ import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
|
4
4
|
export const testRoute = buildRoute({
|
|
5
5
|
...CONFIG_PLUGIN,
|
|
6
6
|
route: {
|
|
7
|
-
method:
|
|
8
|
-
description:
|
|
9
|
-
path:
|
|
7
|
+
method: "post",
|
|
8
|
+
description: "Test route",
|
|
9
|
+
path: "/test",
|
|
10
10
|
responses: {
|
|
11
11
|
200: {
|
|
12
12
|
content: {
|
|
13
|
-
|
|
13
|
+
"text/plain": {
|
|
14
14
|
schema: z.string()
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
description:
|
|
17
|
+
description: "User"
|
|
18
18
|
},
|
|
19
19
|
201: {
|
|
20
20
|
content: {
|
|
21
|
-
|
|
21
|
+
"text/plain": {
|
|
22
22
|
schema: z.string()
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
description:
|
|
25
|
+
description: "User"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
handler: async (c)=>{
|
|
30
|
-
await c.get(
|
|
31
|
-
|
|
32
|
-
subject: 'Test Email',
|
|
33
|
-
content: ({ locale })=>`This is a test email in ${locale} locale.`
|
|
34
|
-
});
|
|
35
|
-
// throw new Error('Test error');
|
|
36
|
-
await c.get('log').warn('This is a test warn log');
|
|
37
|
-
return c.text('test');
|
|
30
|
+
await c.get("log").warn("This is a test warn log");
|
|
31
|
+
return c.text("test");
|
|
38
32
|
}
|
|
39
33
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export declare const callbackRoute: {
|
|
3
3
|
handler: (c: import("hono").Context<import("../../../../middlewares/global.middleware").EnvVitNode, "/:providerId/callback", {
|
|
4
4
|
in: {
|
|
@@ -27,7 +27,7 @@ export declare const callbackRoute: {
|
|
|
27
27
|
}>) => Promise<Response & import("hono").TypedResponse<{
|
|
28
28
|
id: number;
|
|
29
29
|
token: string;
|
|
30
|
-
}, 200, "json">>;
|
|
30
|
+
}, 200 | 409, "json">>;
|
|
31
31
|
pluginId: "@vitnode/core";
|
|
32
32
|
route: {
|
|
33
33
|
method: "get";
|
|
@@ -45,7 +45,7 @@ export declare const callbackRoute: {
|
|
|
45
45
|
responses: {
|
|
46
46
|
200: {
|
|
47
47
|
content: {
|
|
48
|
-
|
|
48
|
+
"application/json": {
|
|
49
49
|
schema: z.ZodObject<{
|
|
50
50
|
id: z.ZodNumber;
|
|
51
51
|
token: z.ZodString;
|
|
@@ -54,6 +54,9 @@ export declare const callbackRoute: {
|
|
|
54
54
|
};
|
|
55
55
|
description: string;
|
|
56
56
|
};
|
|
57
|
+
409: {
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
57
60
|
};
|
|
58
61
|
} & {
|
|
59
62
|
getRoutingPath: () => "/:providerId/callback";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callback.route.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/modules/users/sso/routes/callback.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"callback.route.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/modules/users/sso/routes/callback.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CxB,CAAC"}
|
|
@@ -6,9 +6,9 @@ import { CONFIG_PLUGIN } from "../../../../../config.js";
|
|
|
6
6
|
export const callbackRoute = buildRoute({
|
|
7
7
|
...CONFIG_PLUGIN,
|
|
8
8
|
route: {
|
|
9
|
-
method:
|
|
10
|
-
description:
|
|
11
|
-
path:
|
|
9
|
+
method: "get",
|
|
10
|
+
description: "SSO Callback",
|
|
11
|
+
path: "/{providerId}/callback",
|
|
12
12
|
request: {
|
|
13
13
|
params: z.object({
|
|
14
14
|
providerId: z.string()
|
|
@@ -21,20 +21,23 @@ export const callbackRoute = buildRoute({
|
|
|
21
21
|
responses: {
|
|
22
22
|
200: {
|
|
23
23
|
content: {
|
|
24
|
-
|
|
24
|
+
"application/json": {
|
|
25
25
|
schema: z.object({
|
|
26
26
|
id: z.number(),
|
|
27
27
|
token: z.string()
|
|
28
28
|
})
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
-
description:
|
|
31
|
+
description: "URL"
|
|
32
|
+
},
|
|
33
|
+
409: {
|
|
34
|
+
description: "Email already exists"
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
handler: async (c)=>{
|
|
36
|
-
const { providerId } = c.req.valid(
|
|
37
|
-
const { code, state } = c.req.valid(
|
|
39
|
+
const { providerId } = c.req.valid("param");
|
|
40
|
+
const { code, state } = c.req.valid("query");
|
|
38
41
|
const sso = await new SSOModel(c).callback({
|
|
39
42
|
providerId,
|
|
40
43
|
code,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export declare const createUrlRoute: {
|
|
3
3
|
handler: (c: import("hono").Context<import("../../../../middlewares/global.middleware").EnvVitNode, "/:providerId", {
|
|
4
4
|
in: {
|
|
@@ -27,7 +27,7 @@ export declare const createUrlRoute: {
|
|
|
27
27
|
responses: {
|
|
28
28
|
200: {
|
|
29
29
|
content: {
|
|
30
|
-
|
|
30
|
+
"application/json": {
|
|
31
31
|
schema: z.ZodObject<{
|
|
32
32
|
url: z.ZodString;
|
|
33
33
|
}, z.core.$strip>;
|
|
@@ -5,9 +5,9 @@ import { CONFIG_PLUGIN } from "../../../../../config.js";
|
|
|
5
5
|
export const createUrlRoute = buildRoute({
|
|
6
6
|
...CONFIG_PLUGIN,
|
|
7
7
|
route: {
|
|
8
|
-
method:
|
|
9
|
-
description:
|
|
10
|
-
path:
|
|
8
|
+
method: "post",
|
|
9
|
+
description: "Generate SSO URL",
|
|
10
|
+
path: "/{providerId}",
|
|
11
11
|
request: {
|
|
12
12
|
params: z.object({
|
|
13
13
|
providerId: z.string()
|
|
@@ -16,18 +16,18 @@ export const createUrlRoute = buildRoute({
|
|
|
16
16
|
responses: {
|
|
17
17
|
200: {
|
|
18
18
|
content: {
|
|
19
|
-
|
|
19
|
+
"application/json": {
|
|
20
20
|
schema: z.object({
|
|
21
21
|
url: z.string()
|
|
22
22
|
})
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
description:
|
|
25
|
+
description: "URL"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
handler: async (c)=>{
|
|
30
|
-
const { providerId } = c.req.valid(
|
|
30
|
+
const { providerId } = c.req.valid("param");
|
|
31
31
|
const url = await new SSOModel(c).getUrl(providerId);
|
|
32
32
|
return c.json({
|
|
33
33
|
url
|
|
@@ -26,7 +26,7 @@ export declare const ssoUserModule: import("../../../../api/lib/module").BuildMo
|
|
|
26
26
|
}>) => Promise<Response & import("hono").TypedResponse<{
|
|
27
27
|
id: number;
|
|
28
28
|
token: string;
|
|
29
|
-
}, 200, "json">>;
|
|
29
|
+
}, 200 | 409, "json">>;
|
|
30
30
|
pluginId: "@vitnode/core";
|
|
31
31
|
route: {
|
|
32
32
|
method: "get";
|
|
@@ -44,7 +44,7 @@ export declare const ssoUserModule: import("../../../../api/lib/module").BuildMo
|
|
|
44
44
|
responses: {
|
|
45
45
|
200: {
|
|
46
46
|
content: {
|
|
47
|
-
|
|
47
|
+
"application/json": {
|
|
48
48
|
schema: import("zod").ZodObject<{
|
|
49
49
|
id: import("zod").ZodNumber;
|
|
50
50
|
token: import("zod").ZodString;
|
|
@@ -53,6 +53,9 @@ export declare const ssoUserModule: import("../../../../api/lib/module").BuildMo
|
|
|
53
53
|
};
|
|
54
54
|
description: string;
|
|
55
55
|
};
|
|
56
|
+
409: {
|
|
57
|
+
description: string;
|
|
58
|
+
};
|
|
56
59
|
};
|
|
57
60
|
} & {
|
|
58
61
|
getRoutingPath: () => "/:providerId/callback";
|
|
@@ -85,7 +88,7 @@ export declare const ssoUserModule: import("../../../../api/lib/module").BuildMo
|
|
|
85
88
|
responses: {
|
|
86
89
|
200: {
|
|
87
90
|
content: {
|
|
88
|
-
|
|
91
|
+
"application/json": {
|
|
89
92
|
schema: import("zod").ZodObject<{
|
|
90
93
|
url: import("zod").ZodString;
|
|
91
94
|
}, import("zod/v4/core").$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso.module.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/users/sso/sso.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"sso.module.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/users/sso/sso.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mQAIxB,CAAC"}
|
|
@@ -22,7 +22,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
22
22
|
responses: {
|
|
23
23
|
200: {
|
|
24
24
|
content: {
|
|
25
|
-
|
|
25
|
+
"application/json": {
|
|
26
26
|
schema: import("zod").ZodObject<{
|
|
27
27
|
user: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
28
28
|
id: import("zod").ZodNumber;
|
|
@@ -75,7 +75,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
75
75
|
body: {
|
|
76
76
|
required: true;
|
|
77
77
|
content: {
|
|
78
|
-
|
|
78
|
+
"application/json": {
|
|
79
79
|
schema: import("zod").ZodObject<{
|
|
80
80
|
email: import("zod").ZodEmail;
|
|
81
81
|
password: import("zod").ZodString;
|
|
@@ -91,7 +91,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
91
91
|
};
|
|
92
92
|
201: {
|
|
93
93
|
content: {
|
|
94
|
-
|
|
94
|
+
"application/json": {
|
|
95
95
|
schema: import("zod").ZodObject<{
|
|
96
96
|
id: import("zod").ZodNumber;
|
|
97
97
|
token: import("zod").ZodString;
|
|
@@ -125,7 +125,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
125
125
|
request: {
|
|
126
126
|
body: {
|
|
127
127
|
content: {
|
|
128
|
-
|
|
128
|
+
"application/json": {
|
|
129
129
|
schema: import("zod").ZodObject<{
|
|
130
130
|
isAdmin: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
131
131
|
}, import("zod/v4/core").$strip>;
|
|
@@ -177,7 +177,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
177
177
|
body: {
|
|
178
178
|
required: true;
|
|
179
179
|
content: {
|
|
180
|
-
|
|
180
|
+
"application/json": {
|
|
181
181
|
schema: import("zod").ZodObject<{
|
|
182
182
|
email: import("zod").ZodEmail;
|
|
183
183
|
name: import("zod").ZodString;
|
|
@@ -191,7 +191,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
191
191
|
responses: {
|
|
192
192
|
201: {
|
|
193
193
|
content: {
|
|
194
|
-
|
|
194
|
+
"application/json": {
|
|
195
195
|
schema: import("zod").ZodObject<{
|
|
196
196
|
id: import("zod").ZodNumber;
|
|
197
197
|
emailVerified: import("zod").ZodBoolean;
|
|
@@ -201,6 +201,12 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
201
201
|
};
|
|
202
202
|
description: string;
|
|
203
203
|
};
|
|
204
|
+
400: {
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
409: {
|
|
208
|
+
description: string;
|
|
209
|
+
};
|
|
204
210
|
};
|
|
205
211
|
} & {
|
|
206
212
|
getRoutingPath: () => "/sign_up";
|
|
@@ -215,7 +221,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
215
221
|
responses: {
|
|
216
222
|
200: {
|
|
217
223
|
content: {
|
|
218
|
-
|
|
224
|
+
"text/plain": {
|
|
219
225
|
schema: import("zod").ZodString;
|
|
220
226
|
};
|
|
221
227
|
};
|
|
@@ -223,7 +229,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
223
229
|
};
|
|
224
230
|
201: {
|
|
225
231
|
content: {
|
|
226
|
-
|
|
232
|
+
"text/plain": {
|
|
227
233
|
schema: import("zod").ZodString;
|
|
228
234
|
};
|
|
229
235
|
};
|
|
@@ -233,6 +239,89 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
233
239
|
} & {
|
|
234
240
|
getRoutingPath: () => "/test";
|
|
235
241
|
};
|
|
242
|
+
}, {
|
|
243
|
+
handler: (c: import("hono").Context<import("../../middlewares/global.middleware").EnvVitNode, "/reset-password", {
|
|
244
|
+
in: {
|
|
245
|
+
json: {
|
|
246
|
+
email: string;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
out: {
|
|
250
|
+
json: {
|
|
251
|
+
email: string;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
}>) => Promise<Response & import("hono").TypedResponse<"Email sent", 201, "text">>;
|
|
255
|
+
pluginId: "@vitnode/core";
|
|
256
|
+
route: {
|
|
257
|
+
method: "post";
|
|
258
|
+
description: string;
|
|
259
|
+
path: "/reset-password";
|
|
260
|
+
withCaptcha: true;
|
|
261
|
+
request: {
|
|
262
|
+
body: {
|
|
263
|
+
required: true;
|
|
264
|
+
content: {
|
|
265
|
+
"application/json": {
|
|
266
|
+
schema: import("zod").ZodObject<{
|
|
267
|
+
email: import("zod").ZodEmail;
|
|
268
|
+
}, import("zod/v4/core").$strip>;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
responses: {
|
|
274
|
+
201: {
|
|
275
|
+
description: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
} & {
|
|
279
|
+
getRoutingPath: () => "/reset-password";
|
|
280
|
+
};
|
|
281
|
+
}, {
|
|
282
|
+
handler: (c: import("hono").Context<import("../../middlewares/global.middleware").EnvVitNode, "/change-password", {
|
|
283
|
+
in: {
|
|
284
|
+
json: {
|
|
285
|
+
password: string;
|
|
286
|
+
userId: number;
|
|
287
|
+
token: string;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
out: {
|
|
291
|
+
json: {
|
|
292
|
+
password: string;
|
|
293
|
+
userId: number;
|
|
294
|
+
token: string;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
}>) => Promise<Response & import("hono").TypedResponse<"Password changed", 201, "text">>;
|
|
298
|
+
pluginId: "@vitnode/core";
|
|
299
|
+
route: {
|
|
300
|
+
method: "post";
|
|
301
|
+
description: string;
|
|
302
|
+
path: "/change-password";
|
|
303
|
+
request: {
|
|
304
|
+
body: {
|
|
305
|
+
required: true;
|
|
306
|
+
content: {
|
|
307
|
+
"application/json": {
|
|
308
|
+
schema: import("zod").ZodObject<{
|
|
309
|
+
password: import("zod").ZodString;
|
|
310
|
+
userId: import("zod").ZodNumber;
|
|
311
|
+
token: import("zod").ZodString;
|
|
312
|
+
}, import("zod/v4/core").$strip>;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
responses: {
|
|
318
|
+
201: {
|
|
319
|
+
description: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
} & {
|
|
323
|
+
getRoutingPath: () => "/change-password";
|
|
324
|
+
};
|
|
236
325
|
}], import("../../../api/lib/module").BuildModuleReturn<"@vitnode/core", "sso", [{
|
|
237
326
|
handler: (c: import("hono").Context<import("../../middlewares/global.middleware").EnvVitNode, "/:providerId/callback", {
|
|
238
327
|
in: {
|
|
@@ -261,7 +350,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
261
350
|
}>) => Promise<Response & import("hono").TypedResponse<{
|
|
262
351
|
id: number;
|
|
263
352
|
token: string;
|
|
264
|
-
}, 200, "json">>;
|
|
353
|
+
}, 200 | 409, "json">>;
|
|
265
354
|
pluginId: "@vitnode/core";
|
|
266
355
|
route: {
|
|
267
356
|
method: "get";
|
|
@@ -279,7 +368,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
279
368
|
responses: {
|
|
280
369
|
200: {
|
|
281
370
|
content: {
|
|
282
|
-
|
|
371
|
+
"application/json": {
|
|
283
372
|
schema: import("zod").ZodObject<{
|
|
284
373
|
id: import("zod").ZodNumber;
|
|
285
374
|
token: import("zod").ZodString;
|
|
@@ -288,6 +377,9 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
288
377
|
};
|
|
289
378
|
description: string;
|
|
290
379
|
};
|
|
380
|
+
409: {
|
|
381
|
+
description: string;
|
|
382
|
+
};
|
|
291
383
|
};
|
|
292
384
|
} & {
|
|
293
385
|
getRoutingPath: () => "/:providerId/callback";
|
|
@@ -320,7 +412,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
320
412
|
responses: {
|
|
321
413
|
200: {
|
|
322
414
|
content: {
|
|
323
|
-
|
|
415
|
+
"application/json": {
|
|
324
416
|
schema: import("zod").ZodObject<{
|
|
325
417
|
url: import("zod").ZodString;
|
|
326
418
|
}, import("zod/v4/core").$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/users/users.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"users.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/users/users.module.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mQAatB,CAAC"}
|