nucleus-core-ts 0.8.0
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 +48 -0
- package/README.md +177 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +1 -0
- package/dist/dist/index-0yyw12k6.d.ts +8 -0
- package/dist/dist/index-tv67j5qd.d.ts +488 -0
- package/dist/dist/index.d.ts +40 -0
- package/dist/fe/components/AbstractAnimatedBackground/index.d.ts +7 -0
- package/dist/fe/components/AuthorizationPage/components/AuthorizationPage.d.ts +3 -0
- package/dist/fe/components/AuthorizationPage/components/ClaimList.d.ts +3 -0
- package/dist/fe/components/AuthorizationPage/components/RoleClaimEditor.d.ts +3 -0
- package/dist/fe/components/AuthorizationPage/components/RoleList.d.ts +3 -0
- package/dist/fe/components/AuthorizationPage/index.d.ts +9 -0
- package/dist/fe/components/AuthorizationPage/store/index.d.ts +47 -0
- package/dist/fe/components/AuthorizationPage/theme/index.d.ts +82 -0
- package/dist/fe/components/AuthorizationPage/types/index.d.ts +64 -0
- package/dist/fe/components/Button/components/Button.d.ts +3 -0
- package/dist/fe/components/Button/components/ButtonSpinner.d.ts +3 -0
- package/dist/fe/components/Button/index.d.ts +6 -0
- package/dist/fe/components/Button/theme/index.d.ts +183 -0
- package/dist/fe/components/Button/types/index.d.ts +24 -0
- package/dist/fe/components/Button/utils/cn.d.ts +3 -0
- package/dist/fe/components/Captcha/components/Captcha.d.ts +4 -0
- package/dist/fe/components/Captcha/index.d.ts +4 -0
- package/dist/fe/components/Captcha/theme.d.ts +53 -0
- package/dist/fe/components/Captcha/types.d.ts +60 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordForm.d.ts +4 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordHeader.d.ts +4 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordPage.d.ts +4 -0
- package/dist/fe/components/ChangePasswordPage/index.d.ts +7 -0
- package/dist/fe/components/ChangePasswordPage/store/index.d.ts +16 -0
- package/dist/fe/components/ChangePasswordPage/theme/index.d.ts +48 -0
- package/dist/fe/components/ChangePasswordPage/types/index.d.ts +56 -0
- package/dist/fe/components/Checkbox/components/Checkbox.d.ts +3 -0
- package/dist/fe/components/Checkbox/components/CheckboxIcon.d.ts +3 -0
- package/dist/fe/components/Checkbox/components/SwitchTrack.d.ts +3 -0
- package/dist/fe/components/Checkbox/index.d.ts +7 -0
- package/dist/fe/components/Checkbox/theme/index.d.ts +218 -0
- package/dist/fe/components/Checkbox/types/index.d.ts +39 -0
- package/dist/fe/components/Checkbox/utils/cn.d.ts +3 -0
- package/dist/fe/components/DataTable/DataTable.d.ts +3 -0
- package/dist/fe/components/DataTable/components/ActionCell.d.ts +10 -0
- package/dist/fe/components/DataTable/components/DataCell.d.ts +18 -0
- package/dist/fe/components/DataTable/components/EditableCell.d.ts +14 -0
- package/dist/fe/components/DataTable/components/EmptyState.d.ts +8 -0
- package/dist/fe/components/DataTable/components/HeaderCell.d.ts +16 -0
- package/dist/fe/components/DataTable/components/InfiniteScrollTrigger.d.ts +11 -0
- package/dist/fe/components/DataTable/components/LoadingSpinner.d.ts +7 -0
- package/dist/fe/components/DataTable/components/ResizeHandle.d.ts +9 -0
- package/dist/fe/components/DataTable/components/SelectionCell.d.ts +9 -0
- package/dist/fe/components/DataTable/components/SkeletonRow.d.ts +9 -0
- package/dist/fe/components/DataTable/components/SkeletonTable.d.ts +10 -0
- package/dist/fe/components/DataTable/components/SortIcon.d.ts +9 -0
- package/dist/fe/components/DataTable/components/TableHeader.d.ts +20 -0
- package/dist/fe/components/DataTable/components/TableRow.d.ts +20 -0
- package/dist/fe/components/DataTable/components/index.d.ts +15 -0
- package/dist/fe/components/DataTable/hooks/index.d.ts +3 -0
- package/dist/fe/components/DataTable/hooks/useAutoFitColumn.d.ts +8 -0
- package/dist/fe/components/DataTable/hooks/useResizeColumn.d.ts +12 -0
- package/dist/fe/components/DataTable/index.d.ts +6 -0
- package/dist/fe/components/DataTable/store/index.d.ts +52 -0
- package/dist/fe/components/DataTable/theme/index.d.ts +131 -0
- package/dist/fe/components/DataTable/types/index.d.ts +151 -0
- package/dist/fe/components/DataTable/utils/cn.d.ts +3 -0
- package/dist/fe/components/DatePicker/components/CalendarGrid.d.ts +3 -0
- package/dist/fe/components/DatePicker/components/CalendarHeader.d.ts +3 -0
- package/dist/fe/components/DatePicker/components/DatePicker.d.ts +3 -0
- package/dist/fe/components/DatePicker/components/MonthYearSelector.d.ts +10 -0
- package/dist/fe/components/DatePicker/index.d.ts +10 -0
- package/dist/fe/components/DatePicker/locales/index.d.ts +5 -0
- package/dist/fe/components/DatePicker/theme/index.d.ts +312 -0
- package/dist/fe/components/DatePicker/types/index.d.ts +88 -0
- package/dist/fe/components/DatePicker/utils/cn.d.ts +3 -0
- package/dist/fe/components/DatePicker/utils/date.d.ts +21 -0
- package/dist/fe/components/DevicesPage/components/DeviceCard.d.ts +4 -0
- package/dist/fe/components/DevicesPage/components/DevicesHeader.d.ts +4 -0
- package/dist/fe/components/DevicesPage/components/DevicesPage.d.ts +4 -0
- package/dist/fe/components/DevicesPage/index.d.ts +8 -0
- package/dist/fe/components/DevicesPage/store/index.d.ts +20 -0
- package/dist/fe/components/DevicesPage/theme/index.d.ts +92 -0
- package/dist/fe/components/DevicesPage/types/index.d.ts +147 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordForm.d.ts +4 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordHeader.d.ts +4 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordPage.d.ts +4 -0
- package/dist/fe/components/ForgotPasswordPage/index.d.ts +7 -0
- package/dist/fe/components/ForgotPasswordPage/store/index.d.ts +14 -0
- package/dist/fe/components/ForgotPasswordPage/theme/index.d.ts +48 -0
- package/dist/fe/components/ForgotPasswordPage/types/index.d.ts +48 -0
- package/dist/fe/components/FormBuilder/components/FormBuilder.d.ts +3 -0
- package/dist/fe/components/FormBuilder/components/FormField.d.ts +3 -0
- package/dist/fe/components/FormBuilder/hooks/useFormBuilder.d.ts +3 -0
- package/dist/fe/components/FormBuilder/index.d.ts +6 -0
- package/dist/fe/components/FormBuilder/theme/index.d.ts +136 -0
- package/dist/fe/components/FormBuilder/types/index.d.ts +150 -0
- package/dist/fe/components/FormBuilder/utils/cn.d.ts +3 -0
- package/dist/fe/components/FormBuilder/utils/fieldMapping.d.ts +12 -0
- package/dist/fe/components/FormBuilder/utils/validation.d.ts +11 -0
- package/dist/fe/components/LoginPage/components/LoginForm.d.ts +4 -0
- package/dist/fe/components/LoginPage/components/LoginHeader.d.ts +4 -0
- package/dist/fe/components/LoginPage/components/LoginPage.d.ts +4 -0
- package/dist/fe/components/LoginPage/index.d.ts +8 -0
- package/dist/fe/components/LoginPage/store/index.d.ts +22 -0
- package/dist/fe/components/LoginPage/theme/index.d.ts +55 -0
- package/dist/fe/components/LoginPage/types/index.d.ts +129 -0
- package/dist/fe/components/MagicLinkVerifyPage/components/MagicLinkVerifyPage.d.ts +4 -0
- package/dist/fe/components/MagicLinkVerifyPage/index.d.ts +5 -0
- package/dist/fe/components/MagicLinkVerifyPage/store.d.ts +15 -0
- package/dist/fe/components/MagicLinkVerifyPage/theme.d.ts +37 -0
- package/dist/fe/components/MagicLinkVerifyPage/types.d.ts +35 -0
- package/dist/fe/components/NucleusEntityShowcase.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/components/FloatingLabel.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/components/InputIcons.d.ts +15 -0
- package/dist/fe/components/NucleusTextInput/components/NucleusTextInput.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/components/PasswordStrengthIndicator.d.ts +15 -0
- package/dist/fe/components/NucleusTextInput/components/TypewriterText.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/index.d.ts +11 -0
- package/dist/fe/components/NucleusTextInput/theme/index.d.ts +108 -0
- package/dist/fe/components/NucleusTextInput/types/index.d.ts +65 -0
- package/dist/fe/components/NucleusTextInput/utils/cn.d.ts +3 -0
- package/dist/fe/components/NucleusTextInput/utils/format.d.ts +8 -0
- package/dist/fe/components/NucleusTextInput/utils/validation.d.ts +23 -0
- package/dist/fe/components/ProfilePage/components/AddressCard.d.ts +4 -0
- package/dist/fe/components/ProfilePage/components/PhoneCard.d.ts +4 -0
- package/dist/fe/components/ProfilePage/components/ProfileHeader.d.ts +4 -0
- package/dist/fe/components/ProfilePage/components/ProfilePage.d.ts +4 -0
- package/dist/fe/components/ProfilePage/index.d.ts +10 -0
- package/dist/fe/components/ProfilePage/store/index.d.ts +37 -0
- package/dist/fe/components/ProfilePage/theme/index.d.ts +101 -0
- package/dist/fe/components/ProfilePage/types/index.d.ts +150 -0
- package/dist/fe/components/RangePicker/components/RangePicker.d.ts +3 -0
- package/dist/fe/components/RangePicker/components/RangeThumb.d.ts +3 -0
- package/dist/fe/components/RangePicker/components/RangeTooltip.d.ts +3 -0
- package/dist/fe/components/RangePicker/components/RangeTrack.d.ts +3 -0
- package/dist/fe/components/RangePicker/index.d.ts +8 -0
- package/dist/fe/components/RangePicker/theme/index.d.ts +90 -0
- package/dist/fe/components/RangePicker/types/index.d.ts +66 -0
- package/dist/fe/components/RangePicker/utils/cn.d.ts +3 -0
- package/dist/fe/components/RegisterPage/components/PasswordStrengthIndicator.d.ts +14 -0
- package/dist/fe/components/RegisterPage/components/RegisterForm.d.ts +4 -0
- package/dist/fe/components/RegisterPage/components/RegisterHeader.d.ts +4 -0
- package/dist/fe/components/RegisterPage/components/RegisterPage.d.ts +4 -0
- package/dist/fe/components/RegisterPage/index.d.ts +9 -0
- package/dist/fe/components/RegisterPage/store/index.d.ts +19 -0
- package/dist/fe/components/RegisterPage/theme/index.d.ts +81 -0
- package/dist/fe/components/RegisterPage/types/index.d.ts +141 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordForm.d.ts +4 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordHeader.d.ts +4 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordPage.d.ts +4 -0
- package/dist/fe/components/ResetPasswordPage/index.d.ts +7 -0
- package/dist/fe/components/ResetPasswordPage/store/index.d.ts +15 -0
- package/dist/fe/components/ResetPasswordPage/theme/index.d.ts +56 -0
- package/dist/fe/components/ResetPasswordPage/types/index.d.ts +50 -0
- package/dist/fe/components/SearchBox/components/SearchBox.d.ts +3 -0
- package/dist/fe/components/SearchBox/components/SearchBoxDropdown.d.ts +3 -0
- package/dist/fe/components/SearchBox/index.d.ts +8 -0
- package/dist/fe/components/SearchBox/theme/index.d.ts +141 -0
- package/dist/fe/components/SearchBox/types/index.d.ts +47 -0
- package/dist/fe/components/SearchBox/utils/cn.d.ts +3 -0
- package/dist/fe/components/SearchBox/utils/debounce.d.ts +5 -0
- package/dist/fe/components/SearchBox/utils/sanitize.d.ts +9 -0
- package/dist/fe/components/SelectBox/components/SelectBox.d.ts +3 -0
- package/dist/fe/components/SelectBox/components/SelectDropdown.d.ts +6 -0
- package/dist/fe/components/SelectBox/components/SelectOptionItem.d.ts +3 -0
- package/dist/fe/components/SelectBox/components/SelectTrigger.d.ts +5 -0
- package/dist/fe/components/SelectBox/index.d.ts +8 -0
- package/dist/fe/components/SelectBox/theme/index.d.ts +100 -0
- package/dist/fe/components/SelectBox/types/index.d.ts +66 -0
- package/dist/fe/components/SelectBox/utils/cn.d.ts +3 -0
- package/dist/fe/components/SetPasswordPage/components/PasswordStrengthIndicator.d.ts +14 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordForm.d.ts +4 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordHeader.d.ts +4 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordPage.d.ts +4 -0
- package/dist/fe/components/SetPasswordPage/index.d.ts +9 -0
- package/dist/fe/components/SetPasswordPage/store/index.d.ts +16 -0
- package/dist/fe/components/SetPasswordPage/theme/index.d.ts +95 -0
- package/dist/fe/components/SetPasswordPage/types/index.d.ts +137 -0
- package/dist/fe/components/UsersPage/components/InviteUserModal.d.ts +10 -0
- package/dist/fe/components/UsersPage/components/Pagination.d.ts +13 -0
- package/dist/fe/components/UsersPage/components/RoleAssignmentModal.d.ts +12 -0
- package/dist/fe/components/UsersPage/components/StatsCards.d.ts +10 -0
- package/dist/fe/components/UsersPage/components/UserDetailDrawer.d.ts +24 -0
- package/dist/fe/components/UsersPage/components/UserFilters.d.ts +18 -0
- package/dist/fe/components/UsersPage/components/UserListItem.d.ts +11 -0
- package/dist/fe/components/UsersPage/components/UserListSkeleton.d.ts +7 -0
- package/dist/fe/components/UsersPage/components/UsersPage.d.ts +8 -0
- package/dist/fe/components/UsersPage/index.d.ts +13 -0
- package/dist/fe/components/UsersPage/store/index.d.ts +51 -0
- package/dist/fe/components/UsersPage/theme/index.d.ts +180 -0
- package/dist/fe/components/UsersPage/types/index.d.ts +73 -0
- package/dist/fe/components/VerifyEmailPage/components/VerifyEmailPage.d.ts +4 -0
- package/dist/fe/components/VerifyEmailPage/index.d.ts +5 -0
- package/dist/fe/components/VerifyEmailPage/store/index.d.ts +18 -0
- package/dist/fe/components/VerifyEmailPage/theme/index.d.ts +49 -0
- package/dist/fe/components/VerifyEmailPage/types/index.d.ts +84 -0
- package/dist/fe/hooks/useNucleusEntity.d.ts +3 -0
- package/dist/fe/index.d.ts +42 -0
- package/dist/fe/index.js +1 -0
- package/dist/fe/types/index.d.ts +233 -0
- package/dist/fe/utils/cn.d.ts +3 -0
- package/dist/fe/utils/columnUtils.d.ts +63 -0
- package/dist/fe/utils/endpointKeys.d.ts +9 -0
- package/dist/index-0yyw12k6.js +1 -0
- package/dist/index-tv67j5qd.js +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/dist/nucleus.config.d.ts +95 -0
- package/dist/public/components/CTA.d.ts +2 -0
- package/dist/public/components/Capabilities.d.ts +9 -0
- package/dist/public/components/Features.d.ts +9 -0
- package/dist/public/components/Footer.d.ts +2 -0
- package/dist/public/components/Hero.d.ts +2 -0
- package/dist/public/components/Managers.d.ts +7 -0
- package/dist/public/components/Nav.d.ts +2 -0
- package/dist/public/components/Stack.d.ts +7 -0
- package/dist/public/components/docs/Docs.d.ts +2 -0
- package/dist/public/components/docs/DocsContent.d.ts +19 -0
- package/dist/public/components/docs/DocsRightSidebar.d.ts +9 -0
- package/dist/public/components/docs/DocsSidebar.d.ts +8 -0
- package/dist/public/components/docs/content/authentication.d.ts +3 -0
- package/dist/public/components/docs/content/gettingStarted.d.ts +3 -0
- package/dist/public/components/docs/docsData.d.ts +18 -0
- package/dist/public/components/docs/index.d.ts +7 -0
- package/dist/public/components/index.d.ts +10 -0
- package/dist/public/index.d.ts +3 -0
- package/dist/public/store.d.ts +20 -0
- package/dist/scripts/build.d.ts +7 -0
- package/dist/scripts/generate-schema.d.ts +3 -0
- package/dist/scripts/generate-system-tables-types.d.ts +2 -0
- package/dist/scripts/generate-types-schema.d.ts +7 -0
- package/dist/scripts/publish.d.ts +7 -0
- package/dist/scripts/version.d.ts +7 -0
- package/dist/src/Client/ApiCaller/client.d.ts +5 -0
- package/dist/src/Client/ApiCaller/examples/usage.example.d.ts +8 -0
- package/dist/src/Client/ApiCaller/generator.d.ts +10 -0
- package/dist/src/Client/ApiCaller/index.d.ts +7 -0
- package/dist/src/Client/ApiCaller/server.d.ts +4 -0
- package/dist/src/Client/ApiCaller/system-tables.d.ts +1215 -0
- package/dist/src/Client/ApiCaller/types.d.ts +907 -0
- package/dist/src/Client/Proxy/httpProxy.d.ts +5 -0
- package/dist/src/Client/Proxy/index.d.ts +6 -0
- package/dist/src/Client/Proxy/index.js +1 -0
- package/dist/src/Client/Proxy/server.d.ts +5 -0
- package/dist/src/Client/Proxy/types.d.ts +69 -0
- package/dist/src/Client/Proxy/utils.d.ts +12 -0
- package/dist/src/Client/Proxy/wsProxy.d.ts +20 -0
- package/dist/src/Client/ServerFetch/index.d.ts +19 -0
- package/dist/src/Client/ServerFetch/types.d.ts +34 -0
- package/dist/src/Client/index.d.ts +4 -0
- package/dist/src/ElysiaPlugin/index.d.ts +12 -0
- package/dist/src/ElysiaPlugin/publicRoutes.d.ts +9 -0
- package/dist/src/ElysiaPlugin/routes/auth/captcha/index.d.ts +46 -0
- package/dist/src/ElysiaPlugin/routes/auth/emailVerification/index.d.ts +38 -0
- package/dist/src/ElysiaPlugin/routes/auth/index.d.ts +68 -0
- package/dist/src/ElysiaPlugin/routes/auth/invite/index.d.ts +43 -0
- package/dist/src/ElysiaPlugin/routes/auth/login/index.d.ts +68 -0
- package/dist/src/ElysiaPlugin/routes/auth/login/types.d.ts +22 -0
- package/dist/src/ElysiaPlugin/routes/auth/login/utils.d.ts +19 -0
- package/dist/src/ElysiaPlugin/routes/auth/logout/index.d.ts +33 -0
- package/dist/src/ElysiaPlugin/routes/auth/logout/types.d.ts +6 -0
- package/dist/src/ElysiaPlugin/routes/auth/logout/utils.d.ts +2 -0
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/index.d.ts +41 -0
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/types.d.ts +23 -0
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/utils.d.ts +4 -0
- package/dist/src/ElysiaPlugin/routes/auth/me/index.d.ts +40 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordChange/index.d.ts +33 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordChange/types.d.ts +12 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordChange/utils.d.ts +2 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordReset/index.d.ts +36 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordReset/types.d.ts +16 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordReset/utils.d.ts +3 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordSet/index.d.ts +33 -0
- package/dist/src/ElysiaPlugin/routes/auth/passwordSet/types.d.ts +9 -0
- package/dist/src/ElysiaPlugin/routes/auth/refresh/index.d.ts +39 -0
- package/dist/src/ElysiaPlugin/routes/auth/refresh/types.d.ts +9 -0
- package/dist/src/ElysiaPlugin/routes/auth/refresh/utils.d.ts +2 -0
- package/dist/src/ElysiaPlugin/routes/auth/register/index.d.ts +47 -0
- package/dist/src/ElysiaPlugin/routes/auth/register/types.d.ts +18 -0
- package/dist/src/ElysiaPlugin/routes/auth/register/utils.d.ts +8 -0
- package/dist/src/ElysiaPlugin/routes/auth/sessions/index.d.ts +33 -0
- package/dist/src/ElysiaPlugin/routes/auth/sessions/types.d.ts +67 -0
- package/dist/src/ElysiaPlugin/routes/auth/sessions/utils.d.ts +36 -0
- package/dist/src/ElysiaPlugin/routes/auth/types.d.ts +153 -0
- package/dist/src/ElysiaPlugin/routes/entity/index.d.ts +5 -0
- package/dist/src/ElysiaPlugin/routes/entity/types.d.ts +50 -0
- package/dist/src/ElysiaPlugin/routes/entity/utils.d.ts +11 -0
- package/dist/src/ElysiaPlugin/routes/index.d.ts +5 -0
- package/dist/src/ElysiaPlugin/routes/monitoring/index.d.ts +58 -0
- package/dist/src/ElysiaPlugin/routes/storage/cdn.d.ts +51 -0
- package/dist/src/ElysiaPlugin/routes/storage/helpers.d.ts +53 -0
- package/dist/src/ElysiaPlugin/routes/storage/index.d.ts +3 -0
- package/dist/src/ElysiaPlugin/routes/verification/index.d.ts +39 -0
- package/dist/src/ElysiaPlugin/swagger.d.ts +28 -0
- package/dist/src/ElysiaPlugin/utils.d.ts +70 -0
- package/dist/src/Managers/Dapr/clients/binding-client.d.ts +15 -0
- package/dist/src/Managers/Dapr/clients/config-client.d.ts +27 -0
- package/dist/src/Managers/Dapr/clients/crypto-client.d.ts +27 -0
- package/dist/src/Managers/Dapr/clients/invoke-client.d.ts +32 -0
- package/dist/src/Managers/Dapr/clients/lock-client.d.ts +23 -0
- package/dist/src/Managers/Dapr/clients/pubsub-client.d.ts +23 -0
- package/dist/src/Managers/Dapr/clients/secret-client.d.ts +19 -0
- package/dist/src/Managers/Dapr/clients/state-client.d.ts +55 -0
- package/dist/src/Managers/Dapr/clients/workflow-client.d.ts +39 -0
- package/dist/src/Managers/Dapr/connection-manager.d.ts +51 -0
- package/dist/src/Managers/Dapr/constants.d.ts +49 -0
- package/dist/src/Managers/Dapr/dapr-manager.d.ts +160 -0
- package/dist/src/Managers/Dapr/error-handling.d.ts +29 -0
- package/dist/src/Managers/Dapr/index.d.ts +102 -0
- package/dist/src/Managers/Dapr/types.d.ts +121 -0
- package/dist/src/Managers/Dapr/utils.d.ts +44 -0
- package/dist/src/Managers/File/atomic.d.ts +64 -0
- package/dist/src/Managers/File/core.d.ts +188 -0
- package/dist/src/Managers/File/index.d.ts +18 -0
- package/dist/src/Managers/File/permissions.d.ts +72 -0
- package/dist/src/Managers/File/streaming.d.ts +30 -0
- package/dist/src/Managers/File/types.d.ts +146 -0
- package/dist/src/Managers/File/utils.d.ts +112 -0
- package/dist/src/Managers/Postgre/index.d.ts +25 -0
- package/dist/src/Managers/Redis/index.d.ts +33 -0
- package/dist/src/Managers/index.d.ts +5 -0
- package/dist/src/Services/Auth/Fingerprint/Generate/index.d.ts +3 -0
- package/dist/src/Services/Auth/Fingerprint/Validate/index.d.ts +3 -0
- package/dist/src/Services/Auth/Fingerprint/index.d.ts +5 -0
- package/dist/src/Services/Auth/Fingerprint/types.d.ts +20 -0
- package/dist/src/Services/Auth/Fingerprint/utils.d.ts +3 -0
- package/dist/src/Services/Auth/JWT/Decode/index.d.ts +3 -0
- package/dist/src/Services/Auth/JWT/Sign/index.d.ts +3 -0
- package/dist/src/Services/Auth/JWT/Verify/index.d.ts +3 -0
- package/dist/src/Services/Auth/JWT/index.d.ts +5 -0
- package/dist/src/Services/Auth/JWT/types.d.ts +38 -0
- package/dist/src/Services/Auth/JWT/utils.d.ts +10 -0
- package/dist/src/Services/Auth/Password/Generate/index.d.ts +3 -0
- package/dist/src/Services/Auth/Password/Validate/index.d.ts +3 -0
- package/dist/src/Services/Auth/Password/index.d.ts +2 -0
- package/dist/src/Services/Auth/Password/types.d.ts +16 -0
- package/dist/src/Services/Auth/RefreshToken/Delete/index.d.ts +3 -0
- package/dist/src/Services/Auth/RefreshToken/Generate/index.d.ts +11 -0
- package/dist/src/Services/Auth/RefreshToken/Read/index.d.ts +11 -0
- package/dist/src/Services/Auth/RefreshToken/Validate/index.d.ts +11 -0
- package/dist/src/Services/Auth/RefreshToken/index.d.ts +5 -0
- package/dist/src/Services/Auth/RefreshToken/types.d.ts +27 -0
- package/dist/src/Services/Auth/RefreshToken/utils.d.ts +6 -0
- package/dist/src/Services/Auth/Session/Issue/index.d.ts +9 -0
- package/dist/src/Services/Auth/Session/index.d.ts +2 -0
- package/dist/src/Services/Auth/Session/types.d.ts +13 -0
- package/dist/src/Services/Auth/SessionStore/Delete/index.d.ts +3 -0
- package/dist/src/Services/Auth/SessionStore/Generate/index.d.ts +11 -0
- package/dist/src/Services/Auth/SessionStore/Read/index.d.ts +3 -0
- package/dist/src/Services/Auth/SessionStore/Update/index.d.ts +24 -0
- package/dist/src/Services/Auth/SessionStore/Validate/index.d.ts +3 -0
- package/dist/src/Services/Auth/SessionStore/index.d.ts +7 -0
- package/dist/src/Services/Auth/SessionStore/types.d.ts +59 -0
- package/dist/src/Services/Auth/SessionStore/utils.d.ts +6 -0
- package/dist/src/Services/Auth/index.d.ts +7 -0
- package/dist/src/Services/Authorization/ClaimSeeder/index.d.ts +6 -0
- package/dist/src/Services/Authorization/GodminSetup/index.d.ts +10 -0
- package/dist/src/Services/Authorization/Middleware/index.d.ts +21 -0
- package/dist/src/Services/Authorization/index.d.ts +5 -0
- package/dist/src/Services/Authorization/types.d.ts +68 -0
- package/dist/src/Services/Captcha/index.d.ts +15 -0
- package/dist/src/Services/Captcha/types.d.ts +69 -0
- package/dist/src/Services/Gmail/index.d.ts +62 -0
- package/dist/src/Services/Logger/Logger.d.ts +77 -0
- package/dist/src/Services/Logger/index.d.ts +5 -0
- package/dist/src/Services/Logger/transports.d.ts +54 -0
- package/dist/src/Services/Logger/types.d.ts +88 -0
- package/dist/src/Services/Logger/utils.d.ts +8 -0
- package/dist/src/Services/Monitoring/AlertService.d.ts +29 -0
- package/dist/src/Services/Monitoring/collectors/ApplicationCollector.d.ts +30 -0
- package/dist/src/Services/Monitoring/collectors/SystemCollector.d.ts +13 -0
- package/dist/src/Services/Monitoring/collectors/index.d.ts +3 -0
- package/dist/src/Services/Monitoring/index.d.ts +109 -0
- package/dist/src/Services/Monitoring/types.d.ts +163 -0
- package/dist/src/Services/Notification/index.d.ts +31 -0
- package/dist/src/Services/Notification/types.d.ts +59 -0
- package/dist/src/Services/RateLimiter/index.d.ts +99 -0
- package/dist/src/Services/Verification/index.d.ts +23 -0
- package/dist/src/Services/Verification/types.d.ts +135 -0
- package/dist/src/Services/index.d.ts +10 -0
- package/dist/src/types.d.ts +588 -0
- package/package.json +99 -0
- package/public/components/CTA.tsx +25 -0
- package/public/components/Capabilities.tsx +69 -0
- package/public/components/Features.tsx +107 -0
- package/public/components/Footer.tsx +60 -0
- package/public/components/Hero.tsx +53 -0
- package/public/components/Managers.tsx +60 -0
- package/public/components/Nav.tsx +107 -0
- package/public/components/Stack.tsx +36 -0
- package/public/components/docs/Docs.tsx +62 -0
- package/public/components/docs/DocsContent.tsx +203 -0
- package/public/components/docs/DocsRightSidebar.tsx +53 -0
- package/public/components/docs/DocsSidebar.tsx +62 -0
- package/public/components/docs/content/authentication.ts +1670 -0
- package/public/components/docs/content/gettingStarted.ts +627 -0
- package/public/components/docs/docsData.ts +36 -0
- package/public/components/docs/index.ts +6 -0
- package/public/components/index.ts +9 -0
- package/public/docs.css +633 -0
- package/public/index.html +81 -0
- package/public/index.tsx +52 -0
- package/public/store.ts +79 -0
- package/public/styles.css +877 -0
- package/schemas/bckp/config.nucleus.json +1488 -0
- package/schemas/bckp/nucleus.tables.schema.json +24 -0
- package/schemas/bckp/table.schema.json +472 -0
- package/schemas/config.nucleus.json +1010 -0
- package/schemas/nucleus.tables.schema.json +19 -0
- package/schemas/table.schema.json +498 -0
- package/scripts/build.ts +197 -0
- package/scripts/generate-schema.ts +556 -0
- package/scripts/generate-system-tables-types.ts +18 -0
- package/scripts/generate-types-schema.ts +962 -0
- package/scripts/publish.ts +210 -0
- package/scripts/version.ts +125 -0
- package/src/system.tables.json +1590 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type QueryResultRow } from "pg";
|
|
2
|
+
type PgResult<T = QueryResultRow> = {
|
|
3
|
+
success: true;
|
|
4
|
+
data: T;
|
|
5
|
+
} | {
|
|
6
|
+
success: false;
|
|
7
|
+
error: string;
|
|
8
|
+
};
|
|
9
|
+
export type PgManagerConfig = {
|
|
10
|
+
database: string;
|
|
11
|
+
user: string;
|
|
12
|
+
password: string;
|
|
13
|
+
host: string;
|
|
14
|
+
port: number;
|
|
15
|
+
connectionTimeoutMillis?: number;
|
|
16
|
+
};
|
|
17
|
+
export declare class PostgreSQLManager {
|
|
18
|
+
private static instances;
|
|
19
|
+
private pool;
|
|
20
|
+
constructor(config?: PgManagerConfig);
|
|
21
|
+
execute<T extends QueryResultRow = QueryResultRow>(sql: string, params?: unknown[]): Promise<PgResult<T[]>>;
|
|
22
|
+
end(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type RedisResult<T> = {
|
|
2
|
+
success: true;
|
|
3
|
+
data: T;
|
|
4
|
+
} | {
|
|
5
|
+
success: false;
|
|
6
|
+
error: string;
|
|
7
|
+
};
|
|
8
|
+
export type RedisConfig = {
|
|
9
|
+
url?: string;
|
|
10
|
+
host?: string;
|
|
11
|
+
port?: number;
|
|
12
|
+
withDapr?: boolean;
|
|
13
|
+
stateStoreName?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare class RedisManager {
|
|
16
|
+
private static instance;
|
|
17
|
+
private store;
|
|
18
|
+
private directClient;
|
|
19
|
+
private useDapr;
|
|
20
|
+
constructor(config?: RedisConfig);
|
|
21
|
+
create<T>(key: string, value: T, ttlSeconds?: number): Promise<RedisResult<"OK">>;
|
|
22
|
+
read<T>(key: string): Promise<RedisResult<T | null>>;
|
|
23
|
+
update<T>(key: string, value: T, preserveTtl?: boolean): Promise<RedisResult<"OK">>;
|
|
24
|
+
remove(key: string): Promise<RedisResult<number>>;
|
|
25
|
+
exists(key: string): Promise<RedisResult<boolean>>;
|
|
26
|
+
keys(pattern: string): Promise<string[]>;
|
|
27
|
+
acquireLock(lockKey: string, ttlSeconds?: number): Promise<RedisResult<boolean>>;
|
|
28
|
+
releaseLock(lockKey: string): Promise<RedisResult<number>>;
|
|
29
|
+
waitForLock(lockKey: string, timeoutMs?: number, pollIntervalMs?: number): Promise<RedisResult<boolean>>;
|
|
30
|
+
getOrWait<T>(key: string, timeoutMs?: number, pollIntervalMs?: number): Promise<RedisResult<T | null>>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type DeviceFingerprintInput = {
|
|
2
|
+
userAgent?: string;
|
|
3
|
+
ipAddress?: string;
|
|
4
|
+
extra?: Record<string, string | undefined>;
|
|
5
|
+
};
|
|
6
|
+
export type DeviceFingerprint = {
|
|
7
|
+
hash: string;
|
|
8
|
+
components: DeviceFingerprintInput;
|
|
9
|
+
};
|
|
10
|
+
export type ValidateFingerprintParams = {
|
|
11
|
+
savedFingerprint: DeviceFingerprint;
|
|
12
|
+
headers: Record<string, string>;
|
|
13
|
+
requestIp: string;
|
|
14
|
+
};
|
|
15
|
+
export type ValidateFingerprintResult = {
|
|
16
|
+
isValid: boolean;
|
|
17
|
+
reason?: string;
|
|
18
|
+
currentFingerprint: DeviceFingerprint;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type Algorithm = "HS256" | "HS384" | "HS512";
|
|
2
|
+
export type JWTHeader = {
|
|
3
|
+
alg: Algorithm;
|
|
4
|
+
typ: "JWT";
|
|
5
|
+
};
|
|
6
|
+
export type JWTPayload = {
|
|
7
|
+
sub: string;
|
|
8
|
+
iat: number;
|
|
9
|
+
exp: number;
|
|
10
|
+
iss?: string;
|
|
11
|
+
aud?: string;
|
|
12
|
+
jti?: string;
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
export type SignOptions = {
|
|
17
|
+
subject: string;
|
|
18
|
+
expiresInSeconds: number;
|
|
19
|
+
algorithm?: Algorithm;
|
|
20
|
+
issuer?: string;
|
|
21
|
+
audience?: string;
|
|
22
|
+
sessionId?: string;
|
|
23
|
+
jwtId?: string;
|
|
24
|
+
customClaims?: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
export type VerifyResult = {
|
|
27
|
+
valid: true;
|
|
28
|
+
payload: JWTPayload;
|
|
29
|
+
} | {
|
|
30
|
+
valid: false;
|
|
31
|
+
error: string;
|
|
32
|
+
};
|
|
33
|
+
export type DecodeResult = {
|
|
34
|
+
header: JWTHeader;
|
|
35
|
+
payload: JWTPayload;
|
|
36
|
+
signature: string;
|
|
37
|
+
} | null;
|
|
38
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JWTHeader, JWTPayload } from "./types";
|
|
2
|
+
export declare const base64UrlEncode: (data: string | Buffer) => string;
|
|
3
|
+
export declare const base64UrlDecode: (data: string) => string;
|
|
4
|
+
export declare const createSignature: (data: string, secret: string, algorithm: JWTHeader["alg"]) => string;
|
|
5
|
+
export declare const verifySignature: (data: string, signature: string, secret: string, algorithm: JWTHeader["alg"]) => boolean;
|
|
6
|
+
export declare const encodeHeader: (header: JWTHeader) => string;
|
|
7
|
+
export declare const encodePayload: (payload: JWTPayload) => string;
|
|
8
|
+
export declare const decodeHeader: (encoded: string) => JWTHeader | null;
|
|
9
|
+
export declare const decodePayload: (encoded: string) => JWTPayload | null;
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type GeneratePasswordHashOptions = {
|
|
2
|
+
password: string;
|
|
3
|
+
keyLength?: number;
|
|
4
|
+
};
|
|
5
|
+
export type GeneratePasswordHashResult = {
|
|
6
|
+
hash: string;
|
|
7
|
+
};
|
|
8
|
+
export type ValidatePasswordOptions = {
|
|
9
|
+
password: string;
|
|
10
|
+
hash: string;
|
|
11
|
+
keyLength?: number;
|
|
12
|
+
};
|
|
13
|
+
export type ValidatePasswordResult = {
|
|
14
|
+
isValid: boolean;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GenerateRefreshTokenOptions, RefreshTokenRecord } from "../types";
|
|
2
|
+
export declare const generateRefreshToken: (options: GenerateRefreshTokenOptions) => Promise<{
|
|
3
|
+
success: false;
|
|
4
|
+
error: string;
|
|
5
|
+
record?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
success: true;
|
|
8
|
+
record: RefreshTokenRecord;
|
|
9
|
+
error?: undefined;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReadRefreshTokenOptions } from "../types";
|
|
2
|
+
export declare const readRefreshToken: (options: ReadRefreshTokenOptions) => Promise<{
|
|
3
|
+
success: false;
|
|
4
|
+
error: string;
|
|
5
|
+
record?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
success: true;
|
|
8
|
+
record: import("../types").RefreshTokenRecord;
|
|
9
|
+
error?: undefined;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ValidateRefreshTokenOptions } from "../types";
|
|
2
|
+
export declare const validateRefreshToken: (options: ValidateRefreshTokenOptions) => Promise<{
|
|
3
|
+
success: false;
|
|
4
|
+
error: string;
|
|
5
|
+
record?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
success: true;
|
|
8
|
+
record: import("../types").RefreshTokenRecord;
|
|
9
|
+
error?: undefined;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type RefreshTokenRecord = {
|
|
2
|
+
token: string;
|
|
3
|
+
userId: string;
|
|
4
|
+
sessionId?: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
expiresAt: string;
|
|
7
|
+
metadata?: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
export type GenerateRefreshTokenOptions = {
|
|
10
|
+
userId: string;
|
|
11
|
+
sessionId?: string;
|
|
12
|
+
expiresInSeconds?: number;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
jwtSecret: string;
|
|
15
|
+
};
|
|
16
|
+
export type ReadRefreshTokenOptions = {
|
|
17
|
+
token: string;
|
|
18
|
+
jwtSecret: string;
|
|
19
|
+
};
|
|
20
|
+
export type ValidateRefreshTokenOptions = {
|
|
21
|
+
token: string;
|
|
22
|
+
jwtSecret: string;
|
|
23
|
+
};
|
|
24
|
+
export type DeleteRefreshTokenOptions = {
|
|
25
|
+
token: string;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RefreshTokenRecord } from "./types";
|
|
2
|
+
export declare const DEFAULT_REFRESH_TTL_SECONDS: number;
|
|
3
|
+
export declare const buildRefreshTokenKey: (token: string) => string;
|
|
4
|
+
export declare const serializeRefreshToken: (record: RefreshTokenRecord) => string;
|
|
5
|
+
export declare const deserializeRefreshToken: (data: string | null) => RefreshTokenRecord | null;
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IssueSessionOptions, IssueSessionResult } from "../types";
|
|
2
|
+
export declare const issueSession: (options: IssueSessionOptions) => Promise<{
|
|
3
|
+
success: true;
|
|
4
|
+
data: IssueSessionResult;
|
|
5
|
+
} | {
|
|
6
|
+
success: false;
|
|
7
|
+
error: string;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type IssueSessionOptions = {
|
|
2
|
+
userId: string;
|
|
3
|
+
accessTokenTtlSeconds?: number;
|
|
4
|
+
jwtSecret: string;
|
|
5
|
+
};
|
|
6
|
+
export type IssueSessionResult = {
|
|
7
|
+
accessToken: string;
|
|
8
|
+
accessTokenExpiresAt: string;
|
|
9
|
+
refreshToken: string;
|
|
10
|
+
refreshExpiresAt: string;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GenerateSessionOptions, SessionRecord } from "../types";
|
|
2
|
+
export declare const generateSession: (options: GenerateSessionOptions) => Promise<{
|
|
3
|
+
success: false;
|
|
4
|
+
error: string;
|
|
5
|
+
session?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
success: true;
|
|
8
|
+
session: SessionRecord;
|
|
9
|
+
error?: undefined;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SessionRecord } from "../types";
|
|
2
|
+
export type UpdateSessionOptions = {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
updates: Partial<Omit<SessionRecord, "id" | "userId" | "createdAt">>;
|
|
5
|
+
};
|
|
6
|
+
export declare const updateSession: (options: UpdateSessionOptions) => Promise<{
|
|
7
|
+
success: false;
|
|
8
|
+
error: string;
|
|
9
|
+
session?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
success: true;
|
|
12
|
+
session: SessionRecord;
|
|
13
|
+
error?: undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const updateLastActiveAt: (sessionId: string) => Promise<{
|
|
16
|
+
success: false;
|
|
17
|
+
error: string;
|
|
18
|
+
session?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
success: true;
|
|
21
|
+
session: SessionRecord;
|
|
22
|
+
error?: undefined;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { DeviceFingerprint } from "../Fingerprint/types";
|
|
2
|
+
export type DeviceInfo = {
|
|
3
|
+
deviceName?: string;
|
|
4
|
+
deviceType?: "desktop" | "mobile" | "tablet" | "unknown";
|
|
5
|
+
browserName?: string;
|
|
6
|
+
browserVersion?: string;
|
|
7
|
+
osName?: string;
|
|
8
|
+
osVersion?: string;
|
|
9
|
+
ipAddress: string;
|
|
10
|
+
userAgent?: string;
|
|
11
|
+
};
|
|
12
|
+
export type SessionRecord = {
|
|
13
|
+
id: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
expiresAt: string;
|
|
17
|
+
lastActiveAt: string;
|
|
18
|
+
clientMeta?: Record<string, unknown>;
|
|
19
|
+
fingerprintHash?: string;
|
|
20
|
+
deviceInfo?: DeviceInfo;
|
|
21
|
+
refreshTokenHash?: string;
|
|
22
|
+
loginMethod?: string;
|
|
23
|
+
rememberMe?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type GenerateSessionOptions = {
|
|
26
|
+
userId: string;
|
|
27
|
+
expiresInSeconds?: number;
|
|
28
|
+
clientMeta?: Record<string, unknown>;
|
|
29
|
+
fingerprintHash?: string;
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
deviceInfo?: DeviceInfo;
|
|
32
|
+
refreshTokenHash?: string;
|
|
33
|
+
loginMethod?: string;
|
|
34
|
+
rememberMe?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type ValidateSessionOptions = {
|
|
37
|
+
sessionId: string;
|
|
38
|
+
jwtToken: string;
|
|
39
|
+
jwtSecret: string;
|
|
40
|
+
savedFingerprint?: DeviceFingerprint;
|
|
41
|
+
headers?: Record<string, string | undefined>;
|
|
42
|
+
requestIp?: string;
|
|
43
|
+
};
|
|
44
|
+
export type ValidateSessionResult = {
|
|
45
|
+
isValid: boolean;
|
|
46
|
+
reason?: string;
|
|
47
|
+
context?: {
|
|
48
|
+
userId: string;
|
|
49
|
+
sessionId: string;
|
|
50
|
+
fingerprintValid?: boolean;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export type ReadSessionOptions = {
|
|
54
|
+
sessionId: string;
|
|
55
|
+
};
|
|
56
|
+
export type DeleteSessionOptions = {
|
|
57
|
+
sessionId: string;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SessionRecord } from "./types";
|
|
2
|
+
export declare const DEFAULT_EXPIRY_SECONDS: number;
|
|
3
|
+
export declare const buildSessionKey: (sessionId: string) => string;
|
|
4
|
+
export declare const serializeSession: (record: SessionRecord) => string;
|
|
5
|
+
export declare const deserializeSession: (data: string | null) => SessionRecord | null;
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NucleusTable } from "@types";
|
|
2
|
+
import type { NodePgDatabase } from "drizzle-orm/node-postgres";
|
|
3
|
+
import type { Logger } from "../../Logger";
|
|
4
|
+
import type { AuthorizationConfig, ClaimGenerationResult } from "../types";
|
|
5
|
+
export declare function seedClaims(db: NodePgDatabase, schemaTables: Record<string, unknown>, schemaRelations: Record<string, unknown>, entities: NucleusTable[], config: AuthorizationConfig, logger: Logger): Promise<ClaimGenerationResult>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NodePgDatabase } from "drizzle-orm/node-postgres";
|
|
2
|
+
import type { Logger } from "../../Logger";
|
|
3
|
+
import type { AuthorizationConfig } from "../types";
|
|
4
|
+
export declare function setupGodmin(db: NodePgDatabase, schemaTables: Record<string, unknown>, config: AuthorizationConfig, logger: Logger): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
userId?: string;
|
|
7
|
+
roleId?: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function isGodminRole(roleName: string): boolean;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NodePgDatabase } from "drizzle-orm/node-postgres";
|
|
2
|
+
import type { Logger } from "../../Logger";
|
|
3
|
+
import type { AuthorizationCheckResult, HttpMethod, ParsedScope, ResolvedScope } from "../types";
|
|
4
|
+
interface CheckAuthorizationParams {
|
|
5
|
+
userId: string;
|
|
6
|
+
method: HttpMethod;
|
|
7
|
+
entity: string;
|
|
8
|
+
requestedFields?: string[];
|
|
9
|
+
requestedRelations?: string[];
|
|
10
|
+
db: NodePgDatabase;
|
|
11
|
+
schemaTables: Record<string, unknown>;
|
|
12
|
+
logger: Logger;
|
|
13
|
+
userData?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export declare function parseScope(scope: string | null): ParsedScope;
|
|
16
|
+
export declare function checkAuthorization(params: CheckAuthorizationParams): Promise<AuthorizationCheckResult>;
|
|
17
|
+
export declare function filterResponseFields<T extends Record<string, unknown>>(data: T | T[], allowedFields?: string[]): Partial<T> | Partial<T>[];
|
|
18
|
+
export declare function filterResponseRelations<T extends Record<string, unknown>>(data: T | T[], allowedRelations?: string[]): T | T[];
|
|
19
|
+
export declare function applyScopeFilters(scopeFilters: ResolvedScope | undefined): Record<string, unknown> | undefined;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export interface AuthorizationConfig {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
autoSeedClaims: boolean;
|
|
4
|
+
skipTables: string[];
|
|
5
|
+
skipColumns: string[];
|
|
6
|
+
excludedPaths: string[];
|
|
7
|
+
publicPaths: string[];
|
|
8
|
+
godminEmail?: string;
|
|
9
|
+
godminPassword?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Claim {
|
|
12
|
+
id: string;
|
|
13
|
+
action: string;
|
|
14
|
+
description: string;
|
|
15
|
+
path: string;
|
|
16
|
+
method: string;
|
|
17
|
+
}
|
|
18
|
+
export interface RoleClaim {
|
|
19
|
+
id: string;
|
|
20
|
+
role_id: string;
|
|
21
|
+
claim_id: string;
|
|
22
|
+
scope: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface UserRole {
|
|
25
|
+
id: string;
|
|
26
|
+
user_id: string;
|
|
27
|
+
role_id: string;
|
|
28
|
+
}
|
|
29
|
+
export interface Role {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
}
|
|
34
|
+
export interface ClaimGenerationResult {
|
|
35
|
+
total: number;
|
|
36
|
+
created: number;
|
|
37
|
+
existing: number;
|
|
38
|
+
claims: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface AuthorizationCheckResult {
|
|
41
|
+
authorized: boolean;
|
|
42
|
+
allowedFields?: string[];
|
|
43
|
+
allowedRelations?: string[];
|
|
44
|
+
scopeFilters?: Record<string, unknown>;
|
|
45
|
+
reason?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ParsedScope {
|
|
48
|
+
[key: string]: string;
|
|
49
|
+
}
|
|
50
|
+
export interface SelfReference {
|
|
51
|
+
field: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ParsedScopeWithSelf {
|
|
54
|
+
[key: string]: string | SelfReference;
|
|
55
|
+
}
|
|
56
|
+
export interface ResolvedScope {
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
}
|
|
59
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
60
|
+
export interface ClaimContext {
|
|
61
|
+
method: HttpMethod;
|
|
62
|
+
entity: string;
|
|
63
|
+
field?: string;
|
|
64
|
+
relation?: string;
|
|
65
|
+
relationField?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare const DEFAULT_AUTHORIZATION_CONFIG: AuthorizationConfig;
|
|
68
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CaptchaDifficulty, CaptchaGenerateResult, CaptchaServiceDeps, CaptchaType, CaptchaValidateResult } from "./types";
|
|
2
|
+
export declare class CaptchaService {
|
|
3
|
+
private redis;
|
|
4
|
+
private logger;
|
|
5
|
+
private config;
|
|
6
|
+
constructor(deps: CaptchaServiceDeps);
|
|
7
|
+
generate(type?: CaptchaType, difficulty?: CaptchaDifficulty, ipAddress?: string): Promise<CaptchaGenerateResult>;
|
|
8
|
+
validate(challengeId: string, userAnswer: string): Promise<CaptchaValidateResult>;
|
|
9
|
+
invalidate(challengeId: string): Promise<void>;
|
|
10
|
+
isEnabled(): boolean;
|
|
11
|
+
private checkRateLimit;
|
|
12
|
+
private incrementRateLimit;
|
|
13
|
+
}
|
|
14
|
+
export * from "./types";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|