@vitnode/core 1.2.0-canary.10
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/LICENSE.md +21 -0
- package/dist/emails/my-email.d.ts +2 -0
- package/dist/emails/my-email.d.ts.map +1 -0
- package/dist/scripts/get-config.d.ts +3 -0
- package/dist/scripts/get-config.d.ts.map +1 -0
- package/dist/scripts/plugin.d.ts +4 -0
- package/dist/scripts/plugin.d.ts.map +1 -0
- package/dist/scripts/prepare-database.d.ts +7 -0
- package/dist/scripts/prepare-database.d.ts.map +1 -0
- package/dist/scripts/prepare-plugins-files.d.ts +2 -0
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -0
- package/dist/scripts/run-interactive-shell-command.d.ts +2 -0
- package/dist/scripts/run-interactive-shell-command.d.ts.map +1 -0
- package/dist/scripts/scripts.d.ts +3 -0
- package/dist/scripts/scripts.d.ts.map +1 -0
- package/dist/scripts/scripts.js +21 -0
- package/dist/scripts/shared/file-utils.d.ts +14 -0
- package/dist/scripts/shared/file-utils.d.ts.map +1 -0
- package/dist/src/api/config.d.ts +24 -0
- package/dist/src/api/config.d.ts.map +1 -0
- package/dist/src/api/config.js +50 -0
- package/dist/src/api/lib/check-plugin-id.d.ts +15 -0
- package/dist/src/api/lib/check-plugin-id.d.ts.map +1 -0
- package/dist/src/api/lib/check-plugin-id.js +15 -0
- package/dist/src/api/lib/get-user-ip.d.ts +3 -0
- package/dist/src/api/lib/get-user-ip.d.ts.map +1 -0
- package/dist/src/api/lib/get-user-ip.js +8 -0
- package/dist/src/api/lib/module.d.ts +23 -0
- package/dist/src/api/lib/module.d.ts.map +1 -0
- package/dist/src/api/lib/module.js +21 -0
- package/dist/src/api/lib/plugin.d.ts +11 -0
- package/dist/src/api/lib/plugin.d.ts.map +1 -0
- package/dist/src/api/lib/plugin.js +14 -0
- package/dist/src/api/lib/route.d.ts +26 -0
- package/dist/src/api/lib/route.d.ts.map +1 -0
- package/dist/src/api/lib/route.js +23 -0
- package/dist/src/api/lib/with-pagination.d.ts +72 -0
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -0
- package/dist/src/api/lib/with-pagination.js +70 -0
- package/dist/src/api/middlewares/global/global.d.ts +66 -0
- package/dist/src/api/middlewares/global/global.d.ts.map +1 -0
- package/dist/src/api/middlewares/global/global.js +47 -0
- package/dist/src/api/models/device.d.ts +10 -0
- package/dist/src/api/models/device.d.ts.map +1 -0
- package/dist/src/api/models/device.js +54 -0
- package/dist/src/api/models/email.d.ts +22 -0
- package/dist/src/api/models/email.d.ts.map +1 -0
- package/dist/src/api/models/email.js +30 -0
- package/dist/src/api/models/password.d.ts +5 -0
- package/dist/src/api/models/password.d.ts.map +1 -0
- package/dist/src/api/models/password.js +21 -0
- package/dist/src/api/models/session-admin.d.ts +24 -0
- package/dist/src/api/models/session-admin.d.ts.map +1 -0
- package/dist/src/api/models/session-admin.js +73 -0
- package/dist/src/api/models/session.d.ts +23 -0
- package/dist/src/api/models/session.d.ts.map +1 -0
- package/dist/src/api/models/session.js +60 -0
- package/dist/src/api/models/sso.d.ts +38 -0
- package/dist/src/api/models/sso.d.ts.map +1 -0
- package/dist/src/api/models/sso.js +120 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts +17 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -0
- package/dist/src/api/models/user/get-user-by-id.js +18 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +10 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-in-with-passwords.js +22 -0
- package/dist/src/api/models/user/sign-up.d.ts +21 -0
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-up.js +75 -0
- package/dist/src/api/models/user.d.ts +45 -0
- package/dist/src/api/models/user.d.ts.map +1 -0
- package/dist/src/api/models/user.js +8 -0
- package/dist/src/api/modules/admin/admin.module.d.ts +294 -0
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/admin.module.js +14 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts +108 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/routes/session.route.js +51 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +190 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/list.route.js +79 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +193 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/users.route.js +84 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +189 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/users.admin.module.js +10 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts +52 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/middleware.module.js +10 -0
- package/dist/src/api/modules/middleware/route.d.ts +53 -0
- package/dist/src/api/modules/middleware/route.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/route.js +39 -0
- package/dist/src/api/modules/users/avatar-color.d.ts +2 -0
- package/dist/src/api/modules/users/avatar-color.d.ts.map +1 -0
- package/dist/src/api/modules/users/avatar-color.js +43 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts +103 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/session.route.js +46 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +88 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-in.route.js +71 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +47 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-out.route.js +43 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +89 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-up.route.js +60 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts +31 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/test.route.js +32 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +78 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.js +49 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +51 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +36 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts +125 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/sso.module.js +12 -0
- package/dist/src/api/modules/users/users.module.d.ts +439 -0
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/users.module.js +22 -0
- package/dist/src/api/plugin.d.ts +2 -0
- package/dist/src/api/plugin.d.ts.map +1 -0
- package/dist/src/api/plugin.js +13 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts +10 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts.map +1 -0
- package/dist/src/api/plugins/email/nodemailer.js +30 -0
- package/dist/src/api/plugins/email/resend.d.ts +6 -0
- package/dist/src/api/plugins/email/resend.d.ts.map +1 -0
- package/dist/src/api/plugins/email/resend.js +21 -0
- package/dist/src/api/plugins/sso/discord.d.ts +6 -0
- package/dist/src/api/plugins/sso/discord.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/discord.js +77 -0
- package/dist/src/api/plugins/sso/facebook.d.ts +6 -0
- package/dist/src/api/plugins/sso/facebook.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/facebook.js +76 -0
- package/dist/src/api/plugins/sso/google.d.ts +6 -0
- package/dist/src/api/plugins/sso/google.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/google.js +87 -0
- package/dist/src/app/login/page.d.ts +6 -0
- package/dist/src/app/login/page.d.ts.map +1 -0
- package/dist/src/app/login/page.js +15 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts +7 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts.map +1 -0
- package/dist/src/app/login/sso/[providerId]/page.js +10 -0
- package/dist/src/app/register/page.d.ts +6 -0
- package/dist/src/app/register/page.d.ts.map +1 -0
- package/dist/src/app/register/page.js +15 -0
- package/dist/src/app_admin/core/page.d.ts +2 -0
- package/dist/src/app_admin/core/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/page.js +5 -0
- package/dist/src/app_admin/core/test/page.d.ts +2 -0
- package/dist/src/app_admin/core/test/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/test/page.js +5 -0
- package/dist/src/app_admin/core/users/page.d.ts +6 -0
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/users/page.js +35 -0
- package/dist/src/components/avatar.d.ts +10 -0
- package/dist/src/components/avatar.d.ts.map +1 -0
- package/dist/src/components/avatar.js +14 -0
- package/dist/src/components/date-format.d.ts +5 -0
- package/dist/src/components/date-format.d.ts.map +1 -0
- package/dist/src/components/date-format.js +38 -0
- package/dist/src/components/form/auto-form.d.ts +12 -0
- package/dist/src/components/form/auto-form.d.ts.map +1 -0
- package/dist/src/components/form/auto-form.js +57 -0
- package/dist/src/components/form/common/desc.d.ts +2 -0
- package/dist/src/components/form/common/desc.d.ts.map +1 -0
- package/dist/src/components/form/common/desc.js +9 -0
- package/dist/src/components/form/common/label.d.ts +3 -0
- package/dist/src/components/form/common/label.d.ts.map +1 -0
- package/dist/src/components/form/common/label.js +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -0
- package/dist/src/components/form/fields/checkbox.js +35 -0
- package/dist/src/components/form/fields/combobox.d.ts +14 -0
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -0
- package/dist/src/components/form/fields/combobox.js +88 -0
- package/dist/src/components/form/fields/input.d.ts +9 -0
- package/dist/src/components/form/fields/input.d.ts.map +1 -0
- package/dist/src/components/form/fields/input.js +34 -0
- package/dist/src/components/form/fields/item.d.ts +14 -0
- package/dist/src/components/form/fields/item.d.ts.map +1 -0
- package/dist/src/components/form/fields/item.js +22 -0
- package/dist/src/components/form/fields/radio-group.d.ts +13 -0
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -0
- package/dist/src/components/form/fields/radio-group.js +51 -0
- package/dist/src/components/form/fields/select.d.ts +14 -0
- package/dist/src/components/form/fields/select.d.ts.map +1 -0
- package/dist/src/components/form/fields/select.js +59 -0
- package/dist/src/components/form/fields/switch.d.ts +8 -0
- package/dist/src/components/form/fields/switch.d.ts.map +1 -0
- package/dist/src/components/form/fields/switch.js +35 -0
- package/dist/src/components/form/fields/textarea.d.ts +9 -0
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -0
- package/dist/src/components/form/fields/textarea.js +34 -0
- package/dist/src/components/i18n-provider.d.ts +7 -0
- package/dist/src/components/i18n-provider.d.ts.map +1 -0
- package/dist/src/components/i18n-provider.js +43 -0
- package/dist/src/components/logo-vitnode.d.ts +4 -0
- package/dist/src/components/logo-vitnode.d.ts.map +1 -0
- package/dist/src/components/logo-vitnode.js +113 -0
- package/dist/src/components/switchers/theme-switcher.d.ts +2 -0
- package/dist/src/components/switchers/theme-switcher.d.ts.map +1 -0
- package/dist/src/components/switchers/theme-switcher.js +25 -0
- package/dist/src/components/table/content.d.ts +3 -0
- package/dist/src/components/table/content.d.ts.map +1 -0
- package/dist/src/components/table/content.js +84 -0
- package/dist/src/components/table/data-table.d.ts +37 -0
- package/dist/src/components/table/data-table.d.ts.map +1 -0
- package/dist/src/components/table/data-table.js +69 -0
- package/dist/src/components/table/order-table-head.d.ts +7 -0
- package/dist/src/components/table/order-table-head.d.ts.map +1 -0
- package/dist/src/components/table/order-table-head.js +39 -0
- package/dist/src/components/table/pagination.d.ts +11 -0
- package/dist/src/components/table/pagination.d.ts.map +1 -0
- package/dist/src/components/table/pagination.js +122 -0
- package/dist/src/components/ui/accordion.d.ts +8 -0
- package/dist/src/components/ui/accordion.d.ts.map +1 -0
- package/dist/src/components/ui/accordion.js +47 -0
- package/dist/src/components/ui/alert-dialog.d.ts +15 -0
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/src/components/ui/alert-dialog.js +86 -0
- package/dist/src/components/ui/alert.d.ts +10 -0
- package/dist/src/components/ui/alert.d.ts.map +1 -0
- package/dist/src/components/ui/alert.js +40 -0
- package/dist/src/components/ui/badge.d.ts +10 -0
- package/dist/src/components/ui/badge.d.ts.map +1 -0
- package/dist/src/components/ui/badge.js +29 -0
- package/dist/src/components/ui/button.d.ts +13 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +66 -0
- package/dist/src/components/ui/card.d.ts +10 -0
- package/dist/src/components/ui/card.d.ts.map +1 -0
- package/dist/src/components/ui/card.js +53 -0
- package/dist/src/components/ui/checkbox.d.ts +5 -0
- package/dist/src/components/ui/checkbox.d.ts.map +1 -0
- package/dist/src/components/ui/checkbox.js +21 -0
- package/dist/src/components/ui/collapsible.d.ts +6 -0
- package/dist/src/components/ui/collapsible.d.ts.map +1 -0
- package/dist/src/components/ui/collapsible.js +22 -0
- package/dist/src/components/ui/command.d.ts +19 -0
- package/dist/src/components/ui/command.d.ts.map +1 -0
- package/dist/src/components/ui/command.js +99 -0
- package/dist/src/components/ui/context-menu.d.ts +26 -0
- package/dist/src/components/ui/context-menu.d.ts.map +1 -0
- package/dist/src/components/ui/context-menu.js +141 -0
- package/dist/src/components/ui/dialog.d.ts +23 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.js +181 -0
- package/dist/src/components/ui/drawer.d.ts +14 -0
- package/dist/src/components/ui/drawer.d.ts.map +1 -0
- package/dist/src/components/ui/drawer.js +84 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/src/components/ui/dropdown-menu.js +142 -0
- package/dist/src/components/ui/form.d.ts +33 -0
- package/dist/src/components/ui/form.d.ts.map +1 -0
- package/dist/src/components/ui/form.js +142 -0
- package/dist/src/components/ui/header-content.d.ts +17 -0
- package/dist/src/components/ui/header-content.d.ts.map +1 -0
- package/dist/src/components/ui/header-content.js +30 -0
- package/dist/src/components/ui/hover-card.d.ts +7 -0
- package/dist/src/components/ui/hover-card.d.ts.map +1 -0
- package/dist/src/components/ui/hover-card.js +30 -0
- package/dist/src/components/ui/input-otp.d.ts +12 -0
- package/dist/src/components/ui/input-otp.d.ts.map +1 -0
- package/dist/src/components/ui/input-otp.js +49 -0
- package/dist/src/components/ui/input.d.ts +4 -0
- package/dist/src/components/ui/input.d.ts.map +1 -0
- package/dist/src/components/ui/input.js +12 -0
- package/dist/src/components/ui/label.d.ts +5 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +13 -0
- package/dist/src/components/ui/loader.d.ts +5 -0
- package/dist/src/components/ui/loader.d.ts.map +1 -0
- package/dist/src/components/ui/loader.js +16 -0
- package/dist/src/components/ui/menubar.d.ts +27 -0
- package/dist/src/components/ui/menubar.d.ts.map +1 -0
- package/dist/src/components/ui/menubar.js +152 -0
- package/dist/src/components/ui/navigation-menu.d.ts +15 -0
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/src/components/ui/navigation-menu.js +83 -0
- package/dist/src/components/ui/popover.d.ts +8 -0
- package/dist/src/components/ui/popover.d.ts.map +1 -0
- package/dist/src/components/ui/popover.js +35 -0
- package/dist/src/components/ui/progress.d.ts +5 -0
- package/dist/src/components/ui/progress.d.ts.map +1 -0
- package/dist/src/components/ui/progress.js +20 -0
- package/dist/src/components/ui/radio-group.d.ts +6 -0
- package/dist/src/components/ui/radio-group.d.ts.map +1 -0
- package/dist/src/components/ui/radio-group.js +28 -0
- package/dist/src/components/ui/select.d.ts +16 -0
- package/dist/src/components/ui/select.d.ts.map +1 -0
- package/dist/src/components/ui/select.js +114 -0
- package/dist/src/components/ui/separator.d.ts +5 -0
- package/dist/src/components/ui/separator.d.ts.map +1 -0
- package/dist/src/components/ui/separator.js +15 -0
- package/dist/src/components/ui/sheet.d.ts +14 -0
- package/dist/src/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/components/ui/sheet.js +93 -0
- package/dist/src/components/ui/sidebar.d.ts +70 -0
- package/dist/src/components/ui/sidebar.d.ts.map +1 -0
- package/dist/src/components/ui/sidebar.js +437 -0
- package/dist/src/components/ui/skeleton.d.ts +3 -0
- package/dist/src/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/components/ui/skeleton.js +10 -0
- package/dist/src/components/ui/slider.d.ts +5 -0
- package/dist/src/components/ui/slider.d.ts.map +1 -0
- package/dist/src/components/ui/slider.js +42 -0
- package/dist/src/components/ui/sonner.d.ts +4 -0
- package/dist/src/components/ui/sonner.d.ts.map +1 -0
- package/dist/src/components/ui/sonner.js +26 -0
- package/dist/src/components/ui/switch.d.ts +5 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +17 -0
- package/dist/src/components/ui/table.d.ts +11 -0
- package/dist/src/components/ui/table.d.ts.map +1 -0
- package/dist/src/components/ui/table.js +64 -0
- package/dist/src/components/ui/tabs.d.ts +8 -0
- package/dist/src/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/components/ui/tabs.js +34 -0
- package/dist/src/components/ui/textarea.d.ts +4 -0
- package/dist/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/components/ui/textarea.js +11 -0
- package/dist/src/components/ui/toggle-group.d.ts +8 -0
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/src/components/ui/toggle-group.js +41 -0
- package/dist/src/components/ui/toggle.d.ts +10 -0
- package/dist/src/components/ui/toggle.d.ts.map +1 -0
- package/dist/src/components/ui/toggle.js +35 -0
- package/dist/src/components/ui/tooltip.d.ts +8 -0
- package/dist/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/components/ui/tooltip.js +43 -0
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts +1 -0
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts.map +1 -0
- package/dist/src/config.d.ts +5 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +4 -0
- package/dist/src/database/admins.d.ts +246 -0
- package/dist/src/database/admins.d.ts.map +1 -0
- package/dist/src/database/admins.js +74 -0
- package/dist/src/database/languages.d.ts +321 -0
- package/dist/src/database/languages.d.ts.map +1 -0
- package/dist/src/database/languages.js +52 -0
- package/dist/src/database/moderators.d.ts +114 -0
- package/dist/src/database/moderators.d.ts.map +1 -0
- package/dist/src/database/moderators.js +37 -0
- package/dist/src/database/roles.d.ts +146 -0
- package/dist/src/database/roles.d.ts.map +1 -0
- package/dist/src/database/roles.js +13 -0
- package/dist/src/database/sessions.d.ts +196 -0
- package/dist/src/database/sessions.d.ts.map +1 -0
- package/dist/src/database/sessions.js +57 -0
- package/dist/src/database/users.d.ts +562 -0
- package/dist/src/database/users.d.ts.map +1 -0
- package/dist/src/database/users.js +142 -0
- package/dist/src/drizzle.config.d.ts +6 -0
- package/dist/src/drizzle.config.d.ts.map +1 -0
- package/dist/src/drizzle.config.js +37 -0
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts +1 -0
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.d.ts +2 -0
- package/dist/src/hooks/use-before-unload.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.js +30 -0
- package/dist/src/hooks/use-mobile.d.ts +2 -0
- package/dist/src/hooks/use-mobile.d.ts.map +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/hooks/use-unsaved-changes.d.ts +1 -0
- package/dist/src/hooks/use-unsaved-changes.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.d.ts +8 -0
- package/dist/src/lib/api/get-middleware-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.js +13 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts +16 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-admin-api.js +19 -0
- package/dist/src/lib/api/get-session-api.d.ts +17 -0
- package/dist/src/lib/api/get-session-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-api.js +14 -0
- package/dist/src/lib/colors.d.ts +23 -0
- package/dist/src/lib/colors.d.ts.map +1 -0
- package/dist/src/lib/colors.js +131 -0
- package/dist/src/lib/colors.test.d.ts +2 -0
- package/dist/src/lib/colors.test.d.ts.map +1 -0
- package/dist/src/lib/colors.test.js +173 -0
- package/dist/src/lib/config.d.ts +6 -0
- package/dist/src/lib/config.d.ts.map +1 -0
- package/dist/src/lib/config.js +15 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts +10 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +12 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts +2 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +78 -0
- package/dist/src/lib/fetcher/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.d.ts +3 -0
- package/dist/src/lib/fetcher/helpers.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.js +33 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts +2 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.test.js +37 -0
- package/dist/src/lib/fetcher/index.d.ts +34 -0
- package/dist/src/lib/fetcher/index.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.d.ts +120 -0
- package/dist/src/lib/fetcher/types.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.js +1 -0
- package/dist/src/lib/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher.js +47 -0
- package/dist/src/lib/helpers/auto-form.d.ts +10 -0
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.js +82 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts +2 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.test.js +126 -0
- package/dist/src/lib/navigation.d.ts +339 -0
- package/dist/src/lib/navigation.d.ts.map +1 -0
- package/dist/src/lib/navigation.js +11 -0
- package/dist/src/lib/plugin.d.ts +15 -0
- package/dist/src/lib/plugin.d.ts.map +1 -0
- package/dist/src/lib/plugin.js +3 -0
- package/dist/src/lib/special-characters.d.ts +3 -0
- package/dist/src/lib/special-characters.d.ts.map +1 -0
- package/dist/src/lib/special-characters.js +4 -0
- package/dist/src/lib/special-characters.test.d.ts +2 -0
- package/dist/src/lib/special-characters.test.d.ts.map +1 -0
- package/dist/src/lib/special-characters.test.js +56 -0
- package/dist/src/lib/utils.d.ts +3 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/tests/setup.d.ts +2 -0
- package/dist/src/tests/setup.d.ts.map +1 -0
- package/dist/src/tests/setup.js +6 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts +8 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/admin-layout.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts +11 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +10 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +49 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +3 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +30 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts +4 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +14 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts +7 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/client.js +61 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +3 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +31 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts +2 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +26 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts +2 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +44 -0
- package/dist/src/views/admin/views/core/test.d.ts +2 -0
- package/dist/src/views/admin/views/core/test.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/test.js +146 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts +4 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.js +90 -0
- package/dist/src/views/auth/components/password-input.d.ts +4 -0
- package/dist/src/views/auth/components/password-input.d.ts.map +1 -0
- package/dist/src/views/auth/components/password-input.js +89 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/form.js +59 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts +10 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +33 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts +27 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +38 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts +2 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/sign-in-view.js +55 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/form.js +88 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts +6 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +18 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts +61 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +57 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts +2 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/sign-up-view.js +61 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts +5 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/client.js +22 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts +4 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.js +24 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +3 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +51 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts +5 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +18 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts +6 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/client.js +39 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts +8 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +27 -0
- package/dist/src/views/error/back-button.d.ts +5 -0
- package/dist/src/views/error/back-button.d.ts.map +1 -0
- package/dist/src/views/error/back-button.js +14 -0
- package/dist/src/views/error/error-view.d.ts +5 -0
- package/dist/src/views/error/error-view.d.ts.map +1 -0
- package/dist/src/views/error/error-view.js +56 -0
- package/dist/src/views/error/global-error-view.d.ts +6 -0
- package/dist/src/views/error/global-error-view.d.ts.map +1 -0
- package/dist/src/views/error/global-error-view.js +57 -0
- package/dist/src/views/layouts/provider.d.ts +11 -0
- package/dist/src/views/layouts/provider.d.ts.map +1 -0
- package/dist/src/views/layouts/provider.js +43 -0
- package/dist/src/views/layouts/root-layout.d.ts +16 -0
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -0
- package/dist/src/views/layouts/root-layout.js +38 -0
- package/dist/src/views/layouts/theme/header/header.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/header.js +32 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +33 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +5 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.js +47 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +27 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/user.js +34 -0
- package/dist/src/views/layouts/theme/layout.d.ts +5 -0
- package/dist/src/views/layouts/theme/layout.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/layout.js +15 -0
- package/dist/src/vitnode.config.d.ts +50 -0
- package/dist/src/vitnode.config.d.ts.map +1 -0
- package/dist/src/vitnode.config.js +39 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsup.config.d.ts +3 -0
- package/dist/tsup.config.d.ts.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +94 -0
- package/src/app/login/page.tsx +21 -0
- package/src/app/login/sso/[providerId]/page.tsx +19 -0
- package/src/app/register/page.tsx +21 -0
- package/src/app_admin/core/page.tsx +5 -0
- package/src/app_admin/core/test/page.tsx +5 -0
- package/src/app_admin/core/users/page.tsx +35 -0
- package/src/database/admins.ts +87 -0
- package/src/database/languages.ts +54 -0
- package/src/database/moderators.ts +42 -0
- package/src/database/roles.ts +15 -0
- package/src/database/sessions.ts +59 -0
- package/src/database/users.ts +142 -0
- package/src/locales/en.json +156 -0
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
export declare const core_users: Omit<import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
2
|
+
name: "core_users";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
6
|
+
name: "id";
|
|
7
|
+
tableName: "core_users";
|
|
8
|
+
dataType: "number";
|
|
9
|
+
columnType: "PgSerial";
|
|
10
|
+
data: number;
|
|
11
|
+
driverParam: number;
|
|
12
|
+
notNull: true;
|
|
13
|
+
hasDefault: true;
|
|
14
|
+
isPrimaryKey: true;
|
|
15
|
+
isAutoincrement: false;
|
|
16
|
+
hasRuntimeDefault: false;
|
|
17
|
+
enumValues: undefined;
|
|
18
|
+
baseColumn: never;
|
|
19
|
+
identity: undefined;
|
|
20
|
+
generated: undefined;
|
|
21
|
+
}, {}, {}>;
|
|
22
|
+
nameCode: import("drizzle-orm/pg-core").PgColumn<{
|
|
23
|
+
name: "nameCode";
|
|
24
|
+
tableName: "core_users";
|
|
25
|
+
dataType: "string";
|
|
26
|
+
columnType: "PgVarchar";
|
|
27
|
+
data: string;
|
|
28
|
+
driverParam: string;
|
|
29
|
+
notNull: true;
|
|
30
|
+
hasDefault: false;
|
|
31
|
+
isPrimaryKey: false;
|
|
32
|
+
isAutoincrement: false;
|
|
33
|
+
hasRuntimeDefault: false;
|
|
34
|
+
enumValues: [string, ...string[]];
|
|
35
|
+
baseColumn: never;
|
|
36
|
+
identity: undefined;
|
|
37
|
+
generated: undefined;
|
|
38
|
+
}, {}, {
|
|
39
|
+
length: 255;
|
|
40
|
+
}>;
|
|
41
|
+
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
42
|
+
name: "name";
|
|
43
|
+
tableName: "core_users";
|
|
44
|
+
dataType: "string";
|
|
45
|
+
columnType: "PgVarchar";
|
|
46
|
+
data: string;
|
|
47
|
+
driverParam: string;
|
|
48
|
+
notNull: true;
|
|
49
|
+
hasDefault: false;
|
|
50
|
+
isPrimaryKey: false;
|
|
51
|
+
isAutoincrement: false;
|
|
52
|
+
hasRuntimeDefault: false;
|
|
53
|
+
enumValues: [string, ...string[]];
|
|
54
|
+
baseColumn: never;
|
|
55
|
+
identity: undefined;
|
|
56
|
+
generated: undefined;
|
|
57
|
+
}, {}, {
|
|
58
|
+
length: 255;
|
|
59
|
+
}>;
|
|
60
|
+
email: import("drizzle-orm/pg-core").PgColumn<{
|
|
61
|
+
name: "email";
|
|
62
|
+
tableName: "core_users";
|
|
63
|
+
dataType: "string";
|
|
64
|
+
columnType: "PgVarchar";
|
|
65
|
+
data: string;
|
|
66
|
+
driverParam: string;
|
|
67
|
+
notNull: true;
|
|
68
|
+
hasDefault: false;
|
|
69
|
+
isPrimaryKey: false;
|
|
70
|
+
isAutoincrement: false;
|
|
71
|
+
hasRuntimeDefault: false;
|
|
72
|
+
enumValues: [string, ...string[]];
|
|
73
|
+
baseColumn: never;
|
|
74
|
+
identity: undefined;
|
|
75
|
+
generated: undefined;
|
|
76
|
+
}, {}, {
|
|
77
|
+
length: 255;
|
|
78
|
+
}>;
|
|
79
|
+
password: import("drizzle-orm/pg-core").PgColumn<{
|
|
80
|
+
name: "password";
|
|
81
|
+
tableName: "core_users";
|
|
82
|
+
dataType: "string";
|
|
83
|
+
columnType: "PgVarchar";
|
|
84
|
+
data: string;
|
|
85
|
+
driverParam: string;
|
|
86
|
+
notNull: false;
|
|
87
|
+
hasDefault: false;
|
|
88
|
+
isPrimaryKey: false;
|
|
89
|
+
isAutoincrement: false;
|
|
90
|
+
hasRuntimeDefault: false;
|
|
91
|
+
enumValues: [string, ...string[]];
|
|
92
|
+
baseColumn: never;
|
|
93
|
+
identity: undefined;
|
|
94
|
+
generated: undefined;
|
|
95
|
+
}, {}, {
|
|
96
|
+
length: undefined;
|
|
97
|
+
}>;
|
|
98
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
99
|
+
name: "createdAt";
|
|
100
|
+
tableName: "core_users";
|
|
101
|
+
dataType: "date";
|
|
102
|
+
columnType: "PgTimestamp";
|
|
103
|
+
data: Date;
|
|
104
|
+
driverParam: string;
|
|
105
|
+
notNull: true;
|
|
106
|
+
hasDefault: true;
|
|
107
|
+
isPrimaryKey: false;
|
|
108
|
+
isAutoincrement: false;
|
|
109
|
+
hasRuntimeDefault: false;
|
|
110
|
+
enumValues: undefined;
|
|
111
|
+
baseColumn: never;
|
|
112
|
+
identity: undefined;
|
|
113
|
+
generated: undefined;
|
|
114
|
+
}, {}, {}>;
|
|
115
|
+
newsletter: import("drizzle-orm/pg-core").PgColumn<{
|
|
116
|
+
name: "newsletter";
|
|
117
|
+
tableName: "core_users";
|
|
118
|
+
dataType: "boolean";
|
|
119
|
+
columnType: "PgBoolean";
|
|
120
|
+
data: boolean;
|
|
121
|
+
driverParam: boolean;
|
|
122
|
+
notNull: true;
|
|
123
|
+
hasDefault: true;
|
|
124
|
+
isPrimaryKey: false;
|
|
125
|
+
isAutoincrement: false;
|
|
126
|
+
hasRuntimeDefault: false;
|
|
127
|
+
enumValues: undefined;
|
|
128
|
+
baseColumn: never;
|
|
129
|
+
identity: undefined;
|
|
130
|
+
generated: undefined;
|
|
131
|
+
}, {}, {}>;
|
|
132
|
+
avatarColor: import("drizzle-orm/pg-core").PgColumn<{
|
|
133
|
+
name: "avatarColor";
|
|
134
|
+
tableName: "core_users";
|
|
135
|
+
dataType: "string";
|
|
136
|
+
columnType: "PgVarchar";
|
|
137
|
+
data: string;
|
|
138
|
+
driverParam: string;
|
|
139
|
+
notNull: true;
|
|
140
|
+
hasDefault: false;
|
|
141
|
+
isPrimaryKey: false;
|
|
142
|
+
isAutoincrement: false;
|
|
143
|
+
hasRuntimeDefault: false;
|
|
144
|
+
enumValues: [string, ...string[]];
|
|
145
|
+
baseColumn: never;
|
|
146
|
+
identity: undefined;
|
|
147
|
+
generated: undefined;
|
|
148
|
+
}, {}, {
|
|
149
|
+
length: 6;
|
|
150
|
+
}>;
|
|
151
|
+
emailVerified: import("drizzle-orm/pg-core").PgColumn<{
|
|
152
|
+
name: "emailVerified";
|
|
153
|
+
tableName: "core_users";
|
|
154
|
+
dataType: "boolean";
|
|
155
|
+
columnType: "PgBoolean";
|
|
156
|
+
data: boolean;
|
|
157
|
+
driverParam: boolean;
|
|
158
|
+
notNull: true;
|
|
159
|
+
hasDefault: true;
|
|
160
|
+
isPrimaryKey: false;
|
|
161
|
+
isAutoincrement: false;
|
|
162
|
+
hasRuntimeDefault: false;
|
|
163
|
+
enumValues: undefined;
|
|
164
|
+
baseColumn: never;
|
|
165
|
+
identity: undefined;
|
|
166
|
+
generated: undefined;
|
|
167
|
+
}, {}, {}>;
|
|
168
|
+
roleId: import("drizzle-orm/pg-core").PgColumn<{
|
|
169
|
+
name: "roleId";
|
|
170
|
+
tableName: "core_users";
|
|
171
|
+
dataType: "number";
|
|
172
|
+
columnType: "PgInteger";
|
|
173
|
+
data: number;
|
|
174
|
+
driverParam: string | number;
|
|
175
|
+
notNull: true;
|
|
176
|
+
hasDefault: false;
|
|
177
|
+
isPrimaryKey: false;
|
|
178
|
+
isAutoincrement: false;
|
|
179
|
+
hasRuntimeDefault: false;
|
|
180
|
+
enumValues: undefined;
|
|
181
|
+
baseColumn: never;
|
|
182
|
+
identity: undefined;
|
|
183
|
+
generated: undefined;
|
|
184
|
+
}, {}, {}>;
|
|
185
|
+
birthday: import("drizzle-orm/pg-core").PgColumn<{
|
|
186
|
+
name: "birthday";
|
|
187
|
+
tableName: "core_users";
|
|
188
|
+
dataType: "date";
|
|
189
|
+
columnType: "PgTimestamp";
|
|
190
|
+
data: Date;
|
|
191
|
+
driverParam: string;
|
|
192
|
+
notNull: false;
|
|
193
|
+
hasDefault: false;
|
|
194
|
+
isPrimaryKey: false;
|
|
195
|
+
isAutoincrement: false;
|
|
196
|
+
hasRuntimeDefault: false;
|
|
197
|
+
enumValues: undefined;
|
|
198
|
+
baseColumn: never;
|
|
199
|
+
identity: undefined;
|
|
200
|
+
generated: undefined;
|
|
201
|
+
}, {}, {}>;
|
|
202
|
+
ipAddress: import("drizzle-orm/pg-core").PgColumn<{
|
|
203
|
+
name: "ipAddress";
|
|
204
|
+
tableName: "core_users";
|
|
205
|
+
dataType: "string";
|
|
206
|
+
columnType: "PgVarchar";
|
|
207
|
+
data: string;
|
|
208
|
+
driverParam: string;
|
|
209
|
+
notNull: true;
|
|
210
|
+
hasDefault: false;
|
|
211
|
+
isPrimaryKey: false;
|
|
212
|
+
isAutoincrement: false;
|
|
213
|
+
hasRuntimeDefault: false;
|
|
214
|
+
enumValues: [string, ...string[]];
|
|
215
|
+
baseColumn: never;
|
|
216
|
+
identity: undefined;
|
|
217
|
+
generated: undefined;
|
|
218
|
+
}, {}, {
|
|
219
|
+
length: 40;
|
|
220
|
+
}>;
|
|
221
|
+
language: import("drizzle-orm/pg-core").PgColumn<{
|
|
222
|
+
name: "language";
|
|
223
|
+
tableName: "core_users";
|
|
224
|
+
dataType: "string";
|
|
225
|
+
columnType: "PgVarchar";
|
|
226
|
+
data: string;
|
|
227
|
+
driverParam: string;
|
|
228
|
+
notNull: true;
|
|
229
|
+
hasDefault: true;
|
|
230
|
+
isPrimaryKey: false;
|
|
231
|
+
isAutoincrement: false;
|
|
232
|
+
hasRuntimeDefault: false;
|
|
233
|
+
enumValues: [string, ...string[]];
|
|
234
|
+
baseColumn: never;
|
|
235
|
+
identity: undefined;
|
|
236
|
+
generated: undefined;
|
|
237
|
+
}, {}, {
|
|
238
|
+
length: 32;
|
|
239
|
+
}>;
|
|
240
|
+
};
|
|
241
|
+
dialect: "pg";
|
|
242
|
+
}>, "enableRLS">;
|
|
243
|
+
export declare const core_users_relations: import("drizzle-orm").Relations<"core_users", {
|
|
244
|
+
group: import("drizzle-orm").One<"core_roles", true>;
|
|
245
|
+
language: import("drizzle-orm").One<"core_languages", true>;
|
|
246
|
+
confirm_email: import("drizzle-orm").One<"core_users_confirm_emails", true>;
|
|
247
|
+
sso: import("drizzle-orm").Many<"core_users_sso">;
|
|
248
|
+
forgot_password: import("drizzle-orm").One<"core_users_forgot_password", true>;
|
|
249
|
+
}>;
|
|
250
|
+
export declare const core_users_sso: Omit<import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
251
|
+
name: "core_users_sso";
|
|
252
|
+
schema: undefined;
|
|
253
|
+
columns: {
|
|
254
|
+
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
255
|
+
name: "userId";
|
|
256
|
+
tableName: "core_users_sso";
|
|
257
|
+
dataType: "number";
|
|
258
|
+
columnType: "PgInteger";
|
|
259
|
+
data: number;
|
|
260
|
+
driverParam: string | number;
|
|
261
|
+
notNull: true;
|
|
262
|
+
hasDefault: false;
|
|
263
|
+
isPrimaryKey: false;
|
|
264
|
+
isAutoincrement: false;
|
|
265
|
+
hasRuntimeDefault: false;
|
|
266
|
+
enumValues: undefined;
|
|
267
|
+
baseColumn: never;
|
|
268
|
+
identity: undefined;
|
|
269
|
+
generated: undefined;
|
|
270
|
+
}, {}, {}>;
|
|
271
|
+
providerId: import("drizzle-orm/pg-core").PgColumn<{
|
|
272
|
+
name: "providerId";
|
|
273
|
+
tableName: "core_users_sso";
|
|
274
|
+
dataType: "string";
|
|
275
|
+
columnType: "PgVarchar";
|
|
276
|
+
data: string;
|
|
277
|
+
driverParam: string;
|
|
278
|
+
notNull: true;
|
|
279
|
+
hasDefault: false;
|
|
280
|
+
isPrimaryKey: false;
|
|
281
|
+
isAutoincrement: false;
|
|
282
|
+
hasRuntimeDefault: false;
|
|
283
|
+
enumValues: [string, ...string[]];
|
|
284
|
+
baseColumn: never;
|
|
285
|
+
identity: undefined;
|
|
286
|
+
generated: undefined;
|
|
287
|
+
}, {}, {
|
|
288
|
+
length: 255;
|
|
289
|
+
}>;
|
|
290
|
+
providerAccountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
291
|
+
name: "providerAccountId";
|
|
292
|
+
tableName: "core_users_sso";
|
|
293
|
+
dataType: "string";
|
|
294
|
+
columnType: "PgVarchar";
|
|
295
|
+
data: string;
|
|
296
|
+
driverParam: string;
|
|
297
|
+
notNull: true;
|
|
298
|
+
hasDefault: false;
|
|
299
|
+
isPrimaryKey: false;
|
|
300
|
+
isAutoincrement: false;
|
|
301
|
+
hasRuntimeDefault: false;
|
|
302
|
+
enumValues: [string, ...string[]];
|
|
303
|
+
baseColumn: never;
|
|
304
|
+
identity: undefined;
|
|
305
|
+
generated: undefined;
|
|
306
|
+
}, {}, {
|
|
307
|
+
length: 255;
|
|
308
|
+
}>;
|
|
309
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
310
|
+
name: "createdAt";
|
|
311
|
+
tableName: "core_users_sso";
|
|
312
|
+
dataType: "date";
|
|
313
|
+
columnType: "PgTimestamp";
|
|
314
|
+
data: Date;
|
|
315
|
+
driverParam: string;
|
|
316
|
+
notNull: true;
|
|
317
|
+
hasDefault: true;
|
|
318
|
+
isPrimaryKey: false;
|
|
319
|
+
isAutoincrement: false;
|
|
320
|
+
hasRuntimeDefault: false;
|
|
321
|
+
enumValues: undefined;
|
|
322
|
+
baseColumn: never;
|
|
323
|
+
identity: undefined;
|
|
324
|
+
generated: undefined;
|
|
325
|
+
}, {}, {}>;
|
|
326
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
327
|
+
name: "updatedAt";
|
|
328
|
+
tableName: "core_users_sso";
|
|
329
|
+
dataType: "date";
|
|
330
|
+
columnType: "PgTimestamp";
|
|
331
|
+
data: Date;
|
|
332
|
+
driverParam: string;
|
|
333
|
+
notNull: true;
|
|
334
|
+
hasDefault: true;
|
|
335
|
+
isPrimaryKey: false;
|
|
336
|
+
isAutoincrement: false;
|
|
337
|
+
hasRuntimeDefault: false;
|
|
338
|
+
enumValues: undefined;
|
|
339
|
+
baseColumn: never;
|
|
340
|
+
identity: undefined;
|
|
341
|
+
generated: undefined;
|
|
342
|
+
}, {}, {}>;
|
|
343
|
+
};
|
|
344
|
+
dialect: "pg";
|
|
345
|
+
}>, "enableRLS">;
|
|
346
|
+
export declare const core_users_sso_relations: import("drizzle-orm").Relations<"core_users_sso", {
|
|
347
|
+
user: import("drizzle-orm").One<"core_users", true>;
|
|
348
|
+
}>;
|
|
349
|
+
export declare const core_users_confirm_emails: Omit<import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
350
|
+
name: "core_users_confirm_emails";
|
|
351
|
+
schema: undefined;
|
|
352
|
+
columns: {
|
|
353
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
354
|
+
name: "id";
|
|
355
|
+
tableName: "core_users_confirm_emails";
|
|
356
|
+
dataType: "number";
|
|
357
|
+
columnType: "PgSerial";
|
|
358
|
+
data: number;
|
|
359
|
+
driverParam: number;
|
|
360
|
+
notNull: true;
|
|
361
|
+
hasDefault: true;
|
|
362
|
+
isPrimaryKey: true;
|
|
363
|
+
isAutoincrement: false;
|
|
364
|
+
hasRuntimeDefault: false;
|
|
365
|
+
enumValues: undefined;
|
|
366
|
+
baseColumn: never;
|
|
367
|
+
identity: undefined;
|
|
368
|
+
generated: undefined;
|
|
369
|
+
}, {}, {}>;
|
|
370
|
+
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
371
|
+
name: "userId";
|
|
372
|
+
tableName: "core_users_confirm_emails";
|
|
373
|
+
dataType: "number";
|
|
374
|
+
columnType: "PgInteger";
|
|
375
|
+
data: number;
|
|
376
|
+
driverParam: string | number;
|
|
377
|
+
notNull: true;
|
|
378
|
+
hasDefault: false;
|
|
379
|
+
isPrimaryKey: false;
|
|
380
|
+
isAutoincrement: false;
|
|
381
|
+
hasRuntimeDefault: false;
|
|
382
|
+
enumValues: undefined;
|
|
383
|
+
baseColumn: never;
|
|
384
|
+
identity: undefined;
|
|
385
|
+
generated: undefined;
|
|
386
|
+
}, {}, {}>;
|
|
387
|
+
token: import("drizzle-orm/pg-core").PgColumn<{
|
|
388
|
+
name: "token";
|
|
389
|
+
tableName: "core_users_confirm_emails";
|
|
390
|
+
dataType: "string";
|
|
391
|
+
columnType: "PgVarchar";
|
|
392
|
+
data: string;
|
|
393
|
+
driverParam: string;
|
|
394
|
+
notNull: true;
|
|
395
|
+
hasDefault: false;
|
|
396
|
+
isPrimaryKey: false;
|
|
397
|
+
isAutoincrement: false;
|
|
398
|
+
hasRuntimeDefault: false;
|
|
399
|
+
enumValues: [string, ...string[]];
|
|
400
|
+
baseColumn: never;
|
|
401
|
+
identity: undefined;
|
|
402
|
+
generated: undefined;
|
|
403
|
+
}, {}, {
|
|
404
|
+
length: 100;
|
|
405
|
+
}>;
|
|
406
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
407
|
+
name: "createdAt";
|
|
408
|
+
tableName: "core_users_confirm_emails";
|
|
409
|
+
dataType: "date";
|
|
410
|
+
columnType: "PgTimestamp";
|
|
411
|
+
data: Date;
|
|
412
|
+
driverParam: string;
|
|
413
|
+
notNull: true;
|
|
414
|
+
hasDefault: true;
|
|
415
|
+
isPrimaryKey: false;
|
|
416
|
+
isAutoincrement: false;
|
|
417
|
+
hasRuntimeDefault: false;
|
|
418
|
+
enumValues: undefined;
|
|
419
|
+
baseColumn: never;
|
|
420
|
+
identity: undefined;
|
|
421
|
+
generated: undefined;
|
|
422
|
+
}, {}, {}>;
|
|
423
|
+
expires: import("drizzle-orm/pg-core").PgColumn<{
|
|
424
|
+
name: "expires";
|
|
425
|
+
tableName: "core_users_confirm_emails";
|
|
426
|
+
dataType: "date";
|
|
427
|
+
columnType: "PgTimestamp";
|
|
428
|
+
data: Date;
|
|
429
|
+
driverParam: string;
|
|
430
|
+
notNull: true;
|
|
431
|
+
hasDefault: false;
|
|
432
|
+
isPrimaryKey: false;
|
|
433
|
+
isAutoincrement: false;
|
|
434
|
+
hasRuntimeDefault: false;
|
|
435
|
+
enumValues: undefined;
|
|
436
|
+
baseColumn: never;
|
|
437
|
+
identity: undefined;
|
|
438
|
+
generated: undefined;
|
|
439
|
+
}, {}, {}>;
|
|
440
|
+
};
|
|
441
|
+
dialect: "pg";
|
|
442
|
+
}>, "enableRLS">;
|
|
443
|
+
export declare const core_users_confirm_emails_relations: import("drizzle-orm").Relations<"core_users_confirm_emails", {
|
|
444
|
+
user: import("drizzle-orm").One<"core_users", true>;
|
|
445
|
+
}>;
|
|
446
|
+
export declare const core_users_forgot_password: Omit<import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
447
|
+
name: "core_users_forgot_password";
|
|
448
|
+
schema: undefined;
|
|
449
|
+
columns: {
|
|
450
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
451
|
+
name: "id";
|
|
452
|
+
tableName: "core_users_forgot_password";
|
|
453
|
+
dataType: "number";
|
|
454
|
+
columnType: "PgSerial";
|
|
455
|
+
data: number;
|
|
456
|
+
driverParam: number;
|
|
457
|
+
notNull: true;
|
|
458
|
+
hasDefault: true;
|
|
459
|
+
isPrimaryKey: true;
|
|
460
|
+
isAutoincrement: false;
|
|
461
|
+
hasRuntimeDefault: false;
|
|
462
|
+
enumValues: undefined;
|
|
463
|
+
baseColumn: never;
|
|
464
|
+
identity: undefined;
|
|
465
|
+
generated: undefined;
|
|
466
|
+
}, {}, {}>;
|
|
467
|
+
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
468
|
+
name: "userId";
|
|
469
|
+
tableName: "core_users_forgot_password";
|
|
470
|
+
dataType: "number";
|
|
471
|
+
columnType: "PgInteger";
|
|
472
|
+
data: number;
|
|
473
|
+
driverParam: string | number;
|
|
474
|
+
notNull: true;
|
|
475
|
+
hasDefault: false;
|
|
476
|
+
isPrimaryKey: false;
|
|
477
|
+
isAutoincrement: false;
|
|
478
|
+
hasRuntimeDefault: false;
|
|
479
|
+
enumValues: undefined;
|
|
480
|
+
baseColumn: never;
|
|
481
|
+
identity: undefined;
|
|
482
|
+
generated: undefined;
|
|
483
|
+
}, {}, {}>;
|
|
484
|
+
token: import("drizzle-orm/pg-core").PgColumn<{
|
|
485
|
+
name: "token";
|
|
486
|
+
tableName: "core_users_forgot_password";
|
|
487
|
+
dataType: "string";
|
|
488
|
+
columnType: "PgVarchar";
|
|
489
|
+
data: string;
|
|
490
|
+
driverParam: string;
|
|
491
|
+
notNull: true;
|
|
492
|
+
hasDefault: false;
|
|
493
|
+
isPrimaryKey: false;
|
|
494
|
+
isAutoincrement: false;
|
|
495
|
+
hasRuntimeDefault: false;
|
|
496
|
+
enumValues: [string, ...string[]];
|
|
497
|
+
baseColumn: never;
|
|
498
|
+
identity: undefined;
|
|
499
|
+
generated: undefined;
|
|
500
|
+
}, {}, {
|
|
501
|
+
length: 100;
|
|
502
|
+
}>;
|
|
503
|
+
ip_address: import("drizzle-orm/pg-core").PgColumn<{
|
|
504
|
+
name: "ip_address";
|
|
505
|
+
tableName: "core_users_forgot_password";
|
|
506
|
+
dataType: "string";
|
|
507
|
+
columnType: "PgVarchar";
|
|
508
|
+
data: string;
|
|
509
|
+
driverParam: string;
|
|
510
|
+
notNull: true;
|
|
511
|
+
hasDefault: false;
|
|
512
|
+
isPrimaryKey: false;
|
|
513
|
+
isAutoincrement: false;
|
|
514
|
+
hasRuntimeDefault: false;
|
|
515
|
+
enumValues: [string, ...string[]];
|
|
516
|
+
baseColumn: never;
|
|
517
|
+
identity: undefined;
|
|
518
|
+
generated: undefined;
|
|
519
|
+
}, {}, {
|
|
520
|
+
length: 40;
|
|
521
|
+
}>;
|
|
522
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
523
|
+
name: "createdAt";
|
|
524
|
+
tableName: "core_users_forgot_password";
|
|
525
|
+
dataType: "date";
|
|
526
|
+
columnType: "PgTimestamp";
|
|
527
|
+
data: Date;
|
|
528
|
+
driverParam: string;
|
|
529
|
+
notNull: true;
|
|
530
|
+
hasDefault: true;
|
|
531
|
+
isPrimaryKey: false;
|
|
532
|
+
isAutoincrement: false;
|
|
533
|
+
hasRuntimeDefault: false;
|
|
534
|
+
enumValues: undefined;
|
|
535
|
+
baseColumn: never;
|
|
536
|
+
identity: undefined;
|
|
537
|
+
generated: undefined;
|
|
538
|
+
}, {}, {}>;
|
|
539
|
+
expiresAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
540
|
+
name: "expiresAt";
|
|
541
|
+
tableName: "core_users_forgot_password";
|
|
542
|
+
dataType: "date";
|
|
543
|
+
columnType: "PgTimestamp";
|
|
544
|
+
data: Date;
|
|
545
|
+
driverParam: string;
|
|
546
|
+
notNull: true;
|
|
547
|
+
hasDefault: false;
|
|
548
|
+
isPrimaryKey: false;
|
|
549
|
+
isAutoincrement: false;
|
|
550
|
+
hasRuntimeDefault: false;
|
|
551
|
+
enumValues: undefined;
|
|
552
|
+
baseColumn: never;
|
|
553
|
+
identity: undefined;
|
|
554
|
+
generated: undefined;
|
|
555
|
+
}, {}, {}>;
|
|
556
|
+
};
|
|
557
|
+
dialect: "pg";
|
|
558
|
+
}>, "enableRLS">;
|
|
559
|
+
export declare const core_users_forgot_password_relations: import("drizzle-orm").Relations<"core_users_forgot_password", {
|
|
560
|
+
user: import("drizzle-orm").One<"core_users", true>;
|
|
561
|
+
}>;
|
|
562
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/database/users.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA+BV,CAAC;AAEd,eAAO,MAAM,oBAAoB;;;;;;EAkB9B,CAAC;AAEJ,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkBd,CAAC;AAEd,eAAO,MAAM,wBAAwB;;EAQpC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAczB,CAAC;AAEd,eAAO,MAAM,mCAAmC;;EAQ/C,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAgB1B,CAAC;AAEd,eAAO,MAAM,oCAAoC;;EAQhD,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { relations } from "drizzle-orm";
|
|
2
|
+
import { index, pgTable } from "drizzle-orm/pg-core";
|
|
3
|
+
import { core_languages } from "./languages";
|
|
4
|
+
import { core_roles } from "./roles";
|
|
5
|
+
export const core_users = pgTable('core_users', (t)=>({
|
|
6
|
+
id: t.serial().primaryKey(),
|
|
7
|
+
nameCode: t.varchar({
|
|
8
|
+
length: 255
|
|
9
|
+
}).notNull().unique(),
|
|
10
|
+
name: t.varchar({
|
|
11
|
+
length: 255
|
|
12
|
+
}).notNull().unique(),
|
|
13
|
+
email: t.varchar({
|
|
14
|
+
length: 255
|
|
15
|
+
}).notNull().unique(),
|
|
16
|
+
password: t.varchar(),
|
|
17
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
18
|
+
newsletter: t.boolean().notNull().default(false),
|
|
19
|
+
avatarColor: t.varchar({
|
|
20
|
+
length: 6
|
|
21
|
+
}).notNull(),
|
|
22
|
+
emailVerified: t.boolean().notNull().default(false),
|
|
23
|
+
roleId: t.integer().references(()=>core_roles.id).notNull(),
|
|
24
|
+
birthday: t.timestamp(),
|
|
25
|
+
ipAddress: t.varchar({
|
|
26
|
+
length: 40
|
|
27
|
+
}).notNull(),
|
|
28
|
+
language: t.varchar({
|
|
29
|
+
length: 32
|
|
30
|
+
}).notNull().default('en').references(()=>core_languages.code, {
|
|
31
|
+
onDelete: 'set default'
|
|
32
|
+
})
|
|
33
|
+
}), (t)=>[
|
|
34
|
+
index('core_users_name_code_idx').on(t.nameCode),
|
|
35
|
+
index('core_users_name_idx').on(t.name),
|
|
36
|
+
index('core_users_email_idx').on(t.email)
|
|
37
|
+
]).enableRLS();
|
|
38
|
+
export const core_users_relations = relations(core_users, ({ one, many })=>({
|
|
39
|
+
group: one(core_roles, {
|
|
40
|
+
fields: [
|
|
41
|
+
core_users.roleId
|
|
42
|
+
],
|
|
43
|
+
references: [
|
|
44
|
+
core_roles.id
|
|
45
|
+
]
|
|
46
|
+
}),
|
|
47
|
+
language: one(core_languages, {
|
|
48
|
+
fields: [
|
|
49
|
+
core_users.language
|
|
50
|
+
],
|
|
51
|
+
references: [
|
|
52
|
+
core_languages.code
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
confirm_email: one(core_users_confirm_emails, {
|
|
56
|
+
fields: [
|
|
57
|
+
core_users.id
|
|
58
|
+
],
|
|
59
|
+
references: [
|
|
60
|
+
core_users_confirm_emails.userId
|
|
61
|
+
]
|
|
62
|
+
}),
|
|
63
|
+
sso: many(core_users_sso),
|
|
64
|
+
forgot_password: one(core_users_forgot_password, {
|
|
65
|
+
fields: [
|
|
66
|
+
core_users.id
|
|
67
|
+
],
|
|
68
|
+
references: [
|
|
69
|
+
core_users_forgot_password.userId
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
}));
|
|
73
|
+
export const core_users_sso = pgTable('core_users_sso', (t)=>({
|
|
74
|
+
userId: t.integer().references(()=>core_users.id, {
|
|
75
|
+
onDelete: 'cascade'
|
|
76
|
+
}).notNull(),
|
|
77
|
+
providerId: t.varchar({
|
|
78
|
+
length: 255
|
|
79
|
+
}).notNull(),
|
|
80
|
+
providerAccountId: t.varchar({
|
|
81
|
+
length: 255
|
|
82
|
+
}).notNull(),
|
|
83
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
84
|
+
updatedAt: t.timestamp().notNull().$onUpdate(()=>new Date())
|
|
85
|
+
}), (t)=>[
|
|
86
|
+
index('core_users_sso_user_id_idx').on(t.userId)
|
|
87
|
+
]).enableRLS();
|
|
88
|
+
export const core_users_sso_relations = relations(core_users_sso, ({ one })=>({
|
|
89
|
+
user: one(core_users, {
|
|
90
|
+
fields: [
|
|
91
|
+
core_users_sso.userId
|
|
92
|
+
],
|
|
93
|
+
references: [
|
|
94
|
+
core_users.id
|
|
95
|
+
]
|
|
96
|
+
})
|
|
97
|
+
}));
|
|
98
|
+
export const core_users_confirm_emails = pgTable('core_users_confirm_emails', (t)=>({
|
|
99
|
+
id: t.serial().primaryKey(),
|
|
100
|
+
userId: t.integer().references(()=>core_users.id, {
|
|
101
|
+
onDelete: 'cascade'
|
|
102
|
+
}).notNull(),
|
|
103
|
+
token: t.varchar({
|
|
104
|
+
length: 100
|
|
105
|
+
}).notNull().unique(),
|
|
106
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
107
|
+
expires: t.timestamp().notNull()
|
|
108
|
+
})).enableRLS();
|
|
109
|
+
export const core_users_confirm_emails_relations = relations(core_users_confirm_emails, ({ one })=>({
|
|
110
|
+
user: one(core_users, {
|
|
111
|
+
fields: [
|
|
112
|
+
core_users_confirm_emails.userId
|
|
113
|
+
],
|
|
114
|
+
references: [
|
|
115
|
+
core_users.id
|
|
116
|
+
]
|
|
117
|
+
})
|
|
118
|
+
}));
|
|
119
|
+
export const core_users_forgot_password = pgTable('core_users_forgot_password', (t)=>({
|
|
120
|
+
id: t.serial().primaryKey(),
|
|
121
|
+
userId: t.integer().references(()=>core_users.id, {
|
|
122
|
+
onDelete: 'cascade'
|
|
123
|
+
}).notNull().unique(),
|
|
124
|
+
token: t.varchar({
|
|
125
|
+
length: 100
|
|
126
|
+
}).notNull().unique(),
|
|
127
|
+
ip_address: t.varchar({
|
|
128
|
+
length: 40
|
|
129
|
+
}).notNull(),
|
|
130
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
131
|
+
expiresAt: t.timestamp().notNull()
|
|
132
|
+
})).enableRLS();
|
|
133
|
+
export const core_users_forgot_password_relations = relations(core_users_forgot_password, ({ one })=>({
|
|
134
|
+
user: one(core_users, {
|
|
135
|
+
fields: [
|
|
136
|
+
core_users_forgot_password.userId
|
|
137
|
+
],
|
|
138
|
+
references: [
|
|
139
|
+
core_users.id
|
|
140
|
+
]
|
|
141
|
+
})
|
|
142
|
+
}));
|