@rakun-kit/core 1.5.8 → 1.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +186 -185
- package/dist/cjs/api/operations/web-contract.js +37 -30
- package/dist/cjs/api/operations/web-contract.js.map +1 -1
- package/dist/cjs/api/operations/web.js +13 -11
- package/dist/cjs/api/operations/web.js.map +1 -1
- package/dist/cjs/api/routes/web/page.js +41 -57
- package/dist/cjs/api/routes/web/page.js.map +1 -1
- package/dist/cjs/api/routes/web/staticPaths.js +41 -0
- package/dist/cjs/api/routes/web/staticPaths.js.map +1 -0
- package/dist/cjs/auth/passwordResetMailTemplate.js +59 -59
- package/dist/cjs/contracts.js +1 -0
- package/dist/cjs/contracts.js.map +1 -1
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/schemas/web/page.js +6 -5
- package/dist/cjs/schemas/web/page.js.map +1 -1
- package/dist/cjs/schemas/web/staticPaths.js +15 -0
- package/dist/cjs/schemas/web/staticPaths.js.map +1 -0
- package/dist/docs/index.md +16 -0
- package/dist/esm/api/context.d.ts +1 -1
- package/dist/esm/api/context.js +3 -3
- package/dist/esm/api/hooks/context.d.ts +1 -1
- package/dist/esm/api/hooks/runContentHooks.d.ts +4 -4
- package/dist/esm/api/hooks/runContentHooks.js +1 -1
- package/dist/esm/api/operations/apiEventLog.d.ts +3 -3
- package/dist/esm/api/operations/apiEventLog.js +3 -3
- package/dist/esm/api/operations/catalog.d.ts +2 -2
- package/dist/esm/api/operations/catalog.js +1 -1
- package/dist/esm/api/operations/custom.d.ts +1 -1
- package/dist/esm/api/operations/custom.js +1 -1
- package/dist/esm/api/operations/index.d.ts +203 -197
- package/dist/esm/api/operations/index.d.ts.map +1 -1
- package/dist/esm/api/operations/index.js +9 -9
- package/dist/esm/api/operations/manager-contract.d.ts +164 -164
- package/dist/esm/api/operations/manager-contract.js +7 -7
- package/dist/esm/api/operations/manager.d.ts +165 -165
- package/dist/esm/api/operations/manager.js +72 -72
- package/dist/esm/api/operations/tracing.d.ts +1 -1
- package/dist/esm/api/operations/tracing.js +2 -2
- package/dist/esm/api/operations/types.d.ts +1 -1
- package/dist/esm/api/operations/web-contract.d.ts +31 -25
- package/dist/esm/api/operations/web-contract.d.ts.map +1 -1
- package/dist/esm/api/operations/web-contract.js +41 -34
- package/dist/esm/api/operations/web-contract.js.map +1 -1
- package/dist/esm/api/operations/web.d.ts +31 -25
- package/dist/esm/api/operations/web.d.ts.map +1 -1
- package/dist/esm/api/operations/web.js +22 -20
- package/dist/esm/api/operations/web.js.map +1 -1
- package/dist/esm/api/routes/manager/apiOperations.d.ts +3 -3
- package/dist/esm/api/routes/manager/apiOperations.js +5 -5
- package/dist/esm/api/routes/manager/auth/accountInfo.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/accountInfo.js +3 -3
- package/dist/esm/api/routes/manager/auth/deleteSession.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/deleteSession.js +3 -3
- package/dist/esm/api/routes/manager/auth/externalLogin.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/externalLogin.js +7 -7
- package/dist/esm/api/routes/manager/auth/getSession.d.ts +7 -7
- package/dist/esm/api/routes/manager/auth/login.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/login.js +9 -9
- package/dist/esm/api/routes/manager/auth/logout.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/logout.js +3 -3
- package/dist/esm/api/routes/manager/auth/markTourSeen.d.ts +8 -8
- package/dist/esm/api/routes/manager/auth/markTourSeen.js +3 -3
- package/dist/esm/api/routes/manager/auth/mfa/regenerateRecoveryCodes.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/mfa/regenerateRecoveryCodes.js +6 -6
- package/dist/esm/api/routes/manager/auth/mfa/verifyRecoveryCode.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/mfa/verifyRecoveryCode.js +7 -7
- package/dist/esm/api/routes/manager/auth/passwordIpBlocks.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/passwordIpBlocks.js +8 -8
- package/dist/esm/api/routes/manager/auth/passwordRecovery.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/passwordRecovery.js +10 -10
- package/dist/esm/api/routes/manager/auth/totp/confirmTotp.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/totp/confirmTotp.js +4 -4
- package/dist/esm/api/routes/manager/auth/totp/enrollTotp.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/totp/enrollTotp.js +3 -3
- package/dist/esm/api/routes/manager/auth/totp/verifyTotp.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/totp/verifyTotp.js +5 -5
- package/dist/esm/api/routes/manager/auth/updateAccount.d.ts +8 -8
- package/dist/esm/api/routes/manager/auth/updateAccount.js +3 -3
- package/dist/esm/api/routes/manager/auth/updatePassword.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/updatePassword.js +5 -5
- package/dist/esm/api/routes/manager/auth/updateTutorialPreferences.d.ts +8 -8
- package/dist/esm/api/routes/manager/auth/updateTutorialPreferences.js +3 -3
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnAuthOptions.js +4 -4
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnAuthVerify.js +6 -6
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterOptions.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterOptions.js +3 -3
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterVerify.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterVerify.js +6 -6
- package/dist/esm/api/routes/manager/backups/create.d.ts +2 -2
- package/dist/esm/api/routes/manager/backups/create.js +2 -2
- package/dist/esm/api/routes/manager/backups/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/backups/list.js +2 -2
- package/dist/esm/api/routes/manager/backups/restore.d.ts +2 -2
- package/dist/esm/api/routes/manager/backups/restore.js +4 -4
- package/dist/esm/api/routes/manager/comments.d.ts +2 -2
- package/dist/esm/api/routes/manager/comments.js +8 -8
- package/dist/esm/api/routes/manager/contentType.d.ts +16 -16
- package/dist/esm/api/routes/manager/contentType.js +3 -3
- package/dist/esm/api/routes/manager/contentTypes.d.ts +14 -14
- package/dist/esm/api/routes/manager/contentTypes.js +1 -1
- package/dist/esm/api/routes/manager/contentVersions.d.ts +2 -2
- package/dist/esm/api/routes/manager/contentVersions.js +13 -13
- package/dist/esm/api/routes/manager/create.d.ts +5 -5
- package/dist/esm/api/routes/manager/create.js +11 -11
- package/dist/esm/api/routes/manager/delete.d.ts +2 -2
- package/dist/esm/api/routes/manager/delete.js +12 -12
- package/dist/esm/api/routes/manager/duplicate.d.ts +5 -5
- package/dist/esm/api/routes/manager/duplicate.js +6 -6
- package/dist/esm/api/routes/manager/favorites.d.ts +2 -2
- package/dist/esm/api/routes/manager/favorites.js +5 -5
- package/dist/esm/api/routes/manager/get.d.ts +2 -2
- package/dist/esm/api/routes/manager/get.js +10 -10
- package/dist/esm/api/routes/manager/languages.d.ts +4 -4
- package/dist/esm/api/routes/manager/languages.js +1 -1
- package/dist/esm/api/routes/manager/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/list.js +15 -15
- package/dist/esm/api/routes/manager/literals/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/literals/list.js +5 -5
- package/dist/esm/api/routes/manager/literals/upsert.d.ts +2 -2
- package/dist/esm/api/routes/manager/literals/upsert.js +6 -6
- package/dist/esm/api/routes/manager/localeVariants.d.ts +49 -49
- package/dist/esm/api/routes/manager/localeVariants.js +19 -19
- package/dist/esm/api/routes/manager/logs/cleanup.d.ts +2 -2
- package/dist/esm/api/routes/manager/logs/cleanup.js +3 -3
- package/dist/esm/api/routes/manager/logs/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/logs/list.js +2 -2
- package/dist/esm/api/routes/manager/media/createFolder.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/createFolder.js +7 -7
- package/dist/esm/api/routes/manager/media/deleteFolder.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/deleteFolder.js +7 -7
- package/dist/esm/api/routes/manager/media/deleteMediaStorage.js +2 -2
- package/dist/esm/api/routes/manager/media/finalizeUpload.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/finalizeUpload.js +12 -12
- package/dist/esm/api/routes/manager/media/getMediaUrl.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/getMediaUrl.js +6 -6
- package/dist/esm/api/routes/manager/media/listFolders.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/listFolders.js +4 -4
- package/dist/esm/api/routes/manager/media/prepareUpload.d.ts +3 -3
- package/dist/esm/api/routes/manager/media/prepareUpload.js +5 -5
- package/dist/esm/api/routes/manager/media/reimportMedia.d.ts +5 -5
- package/dist/esm/api/routes/manager/media/reimportMedia.js +10 -10
- package/dist/esm/api/routes/manager/media/resolveMediaRecordUrls.js +1 -1
- package/dist/esm/api/routes/manager/media/uploadBinary.d.ts +1 -1
- package/dist/esm/api/routes/manager/media/uploadBinary.js +8 -8
- package/dist/esm/api/routes/manager/migrations/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/migrations/list.js +2 -2
- package/dist/esm/api/routes/manager/notifications.d.ts +2 -2
- package/dist/esm/api/routes/manager/notifications.js +6 -6
- package/dist/esm/api/routes/manager/permissions.d.ts +1 -1
- package/dist/esm/api/routes/manager/permissions.js +2 -2
- package/dist/esm/api/routes/manager/preview/create.d.ts +2 -2
- package/dist/esm/api/routes/manager/preview/create.js +15 -15
- package/dist/esm/api/routes/manager/previewSlugRedirects.d.ts +2 -2
- package/dist/esm/api/routes/manager/previewSlugRedirects.js +3 -3
- package/dist/esm/api/routes/manager/regenerateRoutes.d.ts +1 -1
- package/dist/esm/api/routes/manager/regenerateRoutes.js +2 -2
- package/dist/esm/api/routes/manager/reviewPolicies.d.ts +2 -2
- package/dist/esm/api/routes/manager/reviewPolicies.js +7 -7
- package/dist/esm/api/routes/manager/reviews.d.ts +2 -2
- package/dist/esm/api/routes/manager/reviews.js +8 -8
- package/dist/esm/api/routes/manager/routeLayout.d.ts +2 -2
- package/dist/esm/api/routes/manager/routeLayout.js +6 -6
- package/dist/esm/api/routes/manager/setDefaultLanguage.d.ts +2 -2
- package/dist/esm/api/routes/manager/setDefaultLanguage.js +5 -5
- package/dist/esm/api/routes/manager/template.d.ts +3 -3
- package/dist/esm/api/routes/manager/template.js +10 -10
- package/dist/esm/api/routes/manager/translateDocument.d.ts +2 -2
- package/dist/esm/api/routes/manager/translateDocument.js +11 -11
- package/dist/esm/api/routes/manager/trash.d.ts +3 -3
- package/dist/esm/api/routes/manager/trash.js +9 -9
- package/dist/esm/api/routes/manager/uiLocales.d.ts +1 -1
- package/dist/esm/api/routes/manager/uiLocales.js +1 -1
- package/dist/esm/api/routes/manager/update.d.ts +5 -5
- package/dist/esm/api/routes/manager/update.js +14 -14
- package/dist/esm/api/routes/manager/users.d.ts +2 -2
- package/dist/esm/api/routes/manager/users.js +2 -2
- package/dist/esm/api/routes/manager/versions/get.d.ts +2 -2
- package/dist/esm/api/routes/manager/versions/get.js +2 -2
- package/dist/esm/api/routes/manager/versions/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/versions/list.js +2 -2
- package/dist/esm/api/routes/manager/versions/restore.d.ts +2 -2
- package/dist/esm/api/routes/manager/versions/restore.js +8 -8
- package/dist/esm/api/routes/web/page.d.ts +5 -5
- package/dist/esm/api/routes/web/page.d.ts.map +1 -1
- package/dist/esm/api/routes/web/page.js +60 -76
- package/dist/esm/api/routes/web/page.js.map +1 -1
- package/dist/esm/api/routes/web/previewPage.d.ts +8 -8
- package/dist/esm/api/routes/web/previewPage.js +9 -9
- package/dist/esm/api/routes/web/robots.d.ts +1 -1
- package/dist/esm/api/routes/web/robots.js +2 -2
- package/dist/esm/api/routes/web/seo.d.ts +1 -1
- package/dist/esm/api/routes/web/sitemap.d.ts +1 -1
- package/dist/esm/api/routes/web/sitemap.js +3 -3
- package/dist/esm/api/routes/web/staticPaths.d.ts +6 -0
- package/dist/esm/api/routes/web/staticPaths.d.ts.map +1 -0
- package/dist/esm/api/routes/web/staticPaths.js +36 -0
- package/dist/esm/api/routes/web/staticPaths.js.map +1 -0
- package/dist/esm/api/sessionCookie.d.ts +1 -1
- package/dist/esm/api/utils/authEvents.d.ts +2 -2
- package/dist/esm/api/utils/authEvents.js +2 -2
- package/dist/esm/api/utils/authRateLimit.d.ts +1 -1
- package/dist/esm/api/utils/authRateLimit.js +1 -1
- package/dist/esm/api/utils/breadcrums.d.ts +5 -5
- package/dist/esm/api/utils/breadcrums.js +3 -3
- package/dist/esm/api/utils/checkFailureCase.d.ts +1 -1
- package/dist/esm/api/utils/checkFailureCase.js +1 -1
- package/dist/esm/api/utils/checkOwnership.d.ts +2 -2
- package/dist/esm/api/utils/checkOwnership.js +5 -5
- package/dist/esm/api/utils/checkPermissions.d.ts +2 -2
- package/dist/esm/api/utils/checkPermissions.js +3 -3
- package/dist/esm/api/utils/contentTemplate.d.ts +2 -2
- package/dist/esm/api/utils/contentTemplate.js +7 -7
- package/dist/esm/api/utils/dynamicData.d.ts +5 -5
- package/dist/esm/api/utils/dynamicData.js +11 -11
- package/dist/esm/api/utils/getLanguages.d.ts +2 -2
- package/dist/esm/api/utils/getLanguages.js +2 -2
- package/dist/esm/api/utils/getLink.d.ts +2 -2
- package/dist/esm/api/utils/getLink.js +5 -5
- package/dist/esm/api/utils/getUser.d.ts +7 -7
- package/dist/esm/api/utils/getUser.js +4 -4
- package/dist/esm/api/utils/index.d.ts +25 -25
- package/dist/esm/api/utils/index.js +25 -25
- package/dist/esm/api/utils/iteratorVisibility.d.ts +1 -1
- package/dist/esm/api/utils/localeVariants.d.ts +1 -1
- package/dist/esm/api/utils/localeVariants.js +8 -8
- package/dist/esm/api/utils/managerNotifications.d.ts +5 -5
- package/dist/esm/api/utils/managerNotifications.js +3 -3
- package/dist/esm/api/utils/mediaUploadToken.d.ts +1 -1
- package/dist/esm/api/utils/parseId.d.ts +1 -1
- package/dist/esm/api/utils/parseId.js +1 -1
- package/dist/esm/api/utils/passwords.js +1 -1
- package/dist/esm/api/utils/populates/populateLinks.d.ts +2 -2
- package/dist/esm/api/utils/populates/populateLinks.js +5 -5
- package/dist/esm/api/utils/populates/populateRelations.d.ts +2 -2
- package/dist/esm/api/utils/populates/populateRelations.js +7 -7
- package/dist/esm/api/utils/redirects/createSlugChangeRedirects.d.ts +2 -2
- package/dist/esm/api/utils/redirects/createSlugChangeRedirects.js +6 -6
- package/dist/esm/api/utils/redirects/resolveRedirect.js +2 -2
- package/dist/esm/api/utils/redirects/slugPathChanges.d.ts +1 -1
- package/dist/esm/api/utils/redirects/slugPathChanges.js +4 -4
- package/dist/esm/api/utils/requireContentType.d.ts +1 -1
- package/dist/esm/api/utils/requireContentType.js +2 -2
- package/dist/esm/api/utils/reviews.d.ts +12 -12
- package/dist/esm/api/utils/reviews.js +4 -4
- package/dist/esm/api/utils/routes/revalidatePath.js +5 -5
- package/dist/esm/api/utils/routes/routeDefinitions.d.ts +1 -1
- package/dist/esm/api/utils/routes/routeMapHelpers.d.ts +6 -6
- package/dist/esm/api/utils/routes/routeMapHelpers.js +8 -8
- package/dist/esm/api/utils/routes/syncConfiguredRoutes.d.ts +2 -2
- package/dist/esm/api/utils/routes/syncConfiguredRoutes.js +5 -5
- package/dist/esm/api/utils/routes/updateRoutesMap.d.ts +2 -2
- package/dist/esm/api/utils/routes/updateRoutesMap.js +5 -5
- package/dist/esm/api/utils/safeManagerQuery.d.ts +2 -2
- package/dist/esm/api/utils/safeManagerQuery.js +1 -1
- package/dist/esm/api/utils/sanitizeManagerOutput.d.ts +1 -1
- package/dist/esm/api/utils/sanitizeManagerOutput.js +1 -1
- package/dist/esm/api/utils/transformObjectIdsToStrings.js +1 -1
- package/dist/esm/api/utils/transformStringToObjectIds.js +1 -1
- package/dist/esm/api/utils/translate.d.ts +1 -1
- package/dist/esm/api/utils/translate.js +3 -3
- package/dist/esm/api/utils/validateModule.d.ts +1 -1
- package/dist/esm/api/utils/validateModule.js +2 -2
- package/dist/esm/auth/accountRecovery.d.ts +1 -1
- package/dist/esm/auth/completePrimaryAuthentication.d.ts +1 -1
- package/dist/esm/auth/completePrimaryAuthentication.js +3 -3
- package/dist/esm/auth/loginAdapters.d.ts +1 -1
- package/dist/esm/auth/passwordFail2ban.d.ts +2 -2
- package/dist/esm/auth/passwordFail2ban.js +4 -4
- package/dist/esm/auth/passwordResetMailTemplate.d.ts +2 -2
- package/dist/esm/auth/passwordResetMailTemplate.js +60 -60
- package/dist/esm/bootstrapState.d.ts +14 -14
- package/dist/esm/client.d.ts +60 -60
- package/dist/esm/client.js +32 -32
- package/dist/esm/contracts.d.ts +58 -57
- package/dist/esm/contracts.d.ts.map +1 -1
- package/dist/esm/contracts.js +58 -57
- package/dist/esm/contracts.js.map +1 -1
- package/dist/esm/eventLog/index.d.ts +6 -6
- package/dist/esm/eventLog/index.js +4 -4
- package/dist/esm/eventLog/mongo.d.ts +1 -1
- package/dist/esm/eventLog/mongo.js +2 -2
- package/dist/esm/eventLog/service.d.ts +1 -1
- package/dist/esm/index.d.ts +50 -47
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +51 -48
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal-content-types/ApiOperation.d.ts +114 -114
- package/dist/esm/internal-content-types/ApiOperation.js +2 -2
- package/dist/esm/internal-content-types/Backup.d.ts +57 -57
- package/dist/esm/internal-content-types/Backup.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Backup.js +2 -2
- package/dist/esm/internal-content-types/BackupDocument.d.ts +114 -114
- package/dist/esm/internal-content-types/BackupDocument.js +2 -2
- package/dist/esm/internal-content-types/ContentComment.d.ts +788 -788
- package/dist/esm/internal-content-types/ContentComment.js +3 -3
- package/dist/esm/internal-content-types/ContentCommentReadState.d.ts +575 -575
- package/dist/esm/internal-content-types/ContentCommentReadState.js +3 -3
- package/dist/esm/internal-content-types/ContentReview.d.ts +1688 -1688
- package/dist/esm/internal-content-types/ContentReview.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ContentReview.js +4 -4
- package/dist/esm/internal-content-types/ContentReviewDecision.d.ts +534 -534
- package/dist/esm/internal-content-types/ContentReviewDecision.js +3 -3
- package/dist/esm/internal-content-types/ContentReviewPolicy.d.ts +210 -210
- package/dist/esm/internal-content-types/ContentReviewPolicy.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ContentReviewPolicy.js +3 -3
- package/dist/esm/internal-content-types/ContentTemplate.d.ts +79 -79
- package/dist/esm/internal-content-types/ContentTemplate.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ContentTemplate.js +2 -2
- package/dist/esm/internal-content-types/ContentVersion.d.ts +139 -139
- package/dist/esm/internal-content-types/ContentVersion.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ContentVersion.js +2 -2
- package/dist/esm/internal-content-types/HelloWorld.d.ts +30 -30
- package/dist/esm/internal-content-types/HelloWorld.js +2 -2
- package/dist/esm/internal-content-types/Language.d.ts +39 -39
- package/dist/esm/internal-content-types/Language.js +2 -2
- package/dist/esm/internal-content-types/LiteralTranslation.d.ts +59 -59
- package/dist/esm/internal-content-types/LiteralTranslation.js +2 -2
- package/dist/esm/internal-content-types/LoginIpBlock.d.ts +66 -66
- package/dist/esm/internal-content-types/LoginIpBlock.d.ts.map +1 -1
- package/dist/esm/internal-content-types/LoginIpBlock.js +2 -2
- package/dist/esm/internal-content-types/ManagerFavorite.d.ts +547 -547
- package/dist/esm/internal-content-types/ManagerFavorite.js +3 -3
- package/dist/esm/internal-content-types/ManagerNotification.d.ts +1101 -1101
- package/dist/esm/internal-content-types/ManagerNotification.js +3 -3
- package/dist/esm/internal-content-types/ManagerRole.d.ts +33 -33
- package/dist/esm/internal-content-types/ManagerRole.js +2 -2
- package/dist/esm/internal-content-types/ManagerRoleHooks.d.ts +2 -2
- package/dist/esm/internal-content-types/ManagerRoleHooks.js +3 -3
- package/dist/esm/internal-content-types/ManagerUser.d.ts +212 -212
- package/dist/esm/internal-content-types/ManagerUser.js +3 -3
- package/dist/esm/internal-content-types/ManagerUserHooks.d.ts +2 -2
- package/dist/esm/internal-content-types/ManagerUserHooks.js +3 -3
- package/dist/esm/internal-content-types/Media.d.ts +261 -261
- package/dist/esm/internal-content-types/Media.js +3 -3
- package/dist/esm/internal-content-types/MediaFolder.d.ts +88 -88
- package/dist/esm/internal-content-types/MediaFolder.js +2 -2
- package/dist/esm/internal-content-types/MfaChallenge.d.ts +570 -570
- package/dist/esm/internal-content-types/MfaChallenge.d.ts.map +1 -1
- package/dist/esm/internal-content-types/MfaChallenge.js +3 -3
- package/dist/esm/internal-content-types/Migration.d.ts +133 -133
- package/dist/esm/internal-content-types/Migration.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Migration.js +2 -2
- package/dist/esm/internal-content-types/MigrationLock.d.ts +16 -16
- package/dist/esm/internal-content-types/MigrationLock.js +2 -2
- package/dist/esm/internal-content-types/Page.d.ts +85 -85
- package/dist/esm/internal-content-types/Page.js +3 -3
- package/dist/esm/internal-content-types/PasswordResetToken.d.ts +534 -534
- package/dist/esm/internal-content-types/PasswordResetToken.js +4 -4
- package/dist/esm/internal-content-types/PreviewSnapshot.d.ts +214 -214
- package/dist/esm/internal-content-types/PreviewSnapshot.js +2 -2
- package/dist/esm/internal-content-types/Redirect.d.ts +146 -146
- package/dist/esm/internal-content-types/Redirect.js +2 -2
- package/dist/esm/internal-content-types/RobotsRule.d.ts +103 -103
- package/dist/esm/internal-content-types/RobotsRule.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RobotsRule.js +2 -2
- package/dist/esm/internal-content-types/Route.d.ts +123 -123
- package/dist/esm/internal-content-types/Route.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Route.js +2 -2
- package/dist/esm/internal-content-types/RouteLayoutModule.d.ts +164 -164
- package/dist/esm/internal-content-types/RouteLayoutModule.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteLayoutModule.js +2 -2
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.d.ts +143 -143
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.js +2 -2
- package/dist/esm/internal-content-types/RouteLocaleVariant.d.ts +170 -170
- package/dist/esm/internal-content-types/RouteLocaleVariant.js +2 -2
- package/dist/esm/internal-content-types/RouteMap.d.ts +144 -144
- package/dist/esm/internal-content-types/RouteMap.js +2 -2
- package/dist/esm/internal-content-types/RouteSettings.d.ts +116 -116
- package/dist/esm/internal-content-types/RouteSettings.js +3 -3
- package/dist/esm/internal-content-types/SchemaState.d.ts +65 -65
- package/dist/esm/internal-content-types/SchemaState.d.ts.map +1 -1
- package/dist/esm/internal-content-types/SchemaState.js +2 -2
- package/dist/esm/internal-content-types/Seo.d.ts +430 -430
- package/dist/esm/internal-content-types/Seo.js +2 -2
- package/dist/esm/internal-content-types/SeoSettings.d.ts +518 -518
- package/dist/esm/internal-content-types/SeoSettings.js +3 -3
- package/dist/esm/internal-content-types/Session.d.ts +533 -533
- package/dist/esm/internal-content-types/Session.js +3 -3
- package/dist/esm/internal-content-types/TemplateContent.d.ts +1 -1
- package/dist/esm/internal-content-types/TemplateContent.js +1 -1
- package/dist/esm/internal-content-types/UserMfa.d.ts +504 -504
- package/dist/esm/internal-content-types/UserMfa.js +4 -4
- package/dist/esm/internal-content-types/WebAuthnCredential.d.ts +624 -624
- package/dist/esm/internal-content-types/WebAuthnCredential.d.ts.map +1 -1
- package/dist/esm/internal-content-types/WebAuthnCredential.js +3 -3
- package/dist/esm/internal-content-types/WebAuthnRegChallenge.d.ts +562 -562
- package/dist/esm/internal-content-types/WebAuthnRegChallenge.js +3 -3
- package/dist/esm/internal-content-types/index.d.ts +42 -42
- package/dist/esm/internal-content-types/index.js +42 -42
- package/dist/esm/internal-content-types/syncAdminRole.d.ts +4 -4
- package/dist/esm/internal-content-types/syncAdminRole.js +4 -4
- package/dist/esm/lib/ContentType.d.ts +7 -7
- package/dist/esm/lib/ContentType.js +5 -5
- package/dist/esm/lib/Permissions.d.ts +2 -2
- package/dist/esm/lib/Permissions.js +4 -4
- package/dist/esm/lib/Registry.d.ts +6 -6
- package/dist/esm/lib/Registry.js +4 -4
- package/dist/esm/lib/errors/AppError.d.ts +1 -1
- package/dist/esm/lib/errors/AppError.js +1 -1
- package/dist/esm/lib/errors/index.d.ts +4 -4
- package/dist/esm/lib/errors/index.js +3 -3
- package/dist/esm/lib/errors/throwAppError.d.ts +1 -1
- package/dist/esm/lib/errors/throwAppError.js +3 -3
- package/dist/esm/lib/fields/Boolean.d.ts +1 -1
- package/dist/esm/lib/fields/Boolean.js +1 -1
- package/dist/esm/lib/fields/Breadcrums.d.ts +1 -1
- package/dist/esm/lib/fields/Breadcrums.js +1 -1
- package/dist/esm/lib/fields/ContentReference.d.ts +2 -2
- package/dist/esm/lib/fields/ContentReference.js +2 -2
- package/dist/esm/lib/fields/Date.d.ts +1 -1
- package/dist/esm/lib/fields/Date.js +1 -1
- package/dist/esm/lib/fields/Field.d.ts +13 -13
- package/dist/esm/lib/fields/Fields.d.ts +14 -14
- package/dist/esm/lib/fields/Fields.js +14 -14
- package/dist/esm/lib/fields/File.d.ts +1 -1
- package/dist/esm/lib/fields/File.js +2 -2
- package/dist/esm/lib/fields/Iterator.d.ts +2 -2
- package/dist/esm/lib/fields/Iterator.js +3 -3
- package/dist/esm/lib/fields/Link.d.ts +1 -1
- package/dist/esm/lib/fields/Link.js +2 -2
- package/dist/esm/lib/fields/List.d.ts +1 -1
- package/dist/esm/lib/fields/List.js +2 -2
- package/dist/esm/lib/fields/Number.d.ts +1 -1
- package/dist/esm/lib/fields/Number.js +1 -1
- package/dist/esm/lib/fields/Relation.d.ts +3 -3
- package/dist/esm/lib/fields/Relation.js +3 -3
- package/dist/esm/lib/fields/Select.d.ts +1 -1
- package/dist/esm/lib/fields/Select.js +1 -1
- package/dist/esm/lib/fields/SelfRelation.d.ts +1 -1
- package/dist/esm/lib/fields/SelfRelation.js +2 -2
- package/dist/esm/lib/fields/SimpleList.d.ts +1 -1
- package/dist/esm/lib/fields/SimpleList.js +1 -1
- package/dist/esm/lib/fields/String.d.ts +1 -1
- package/dist/esm/lib/fields/String.js +3 -3
- package/dist/esm/lib/fields/index.d.ts +16 -16
- package/dist/esm/lib/fields/index.js +16 -16
- package/dist/esm/lib/hooks.d.ts +4 -4
- package/dist/esm/lib/routeableContent.js +1 -1
- package/dist/esm/lib/types/index.d.ts +2 -2
- package/dist/esm/lib/utils/getListField.d.ts +1 -1
- package/dist/esm/lib/utils/getSchemas.d.ts +1 -1
- package/dist/esm/lib/utils/getTranslation.d.ts +2 -2
- package/dist/esm/lib/utils/getTranslation.js +1 -1
- package/dist/esm/lib/utils/isTranslatableObject.d.ts +1 -1
- package/dist/esm/lib/utils/translateObject.d.ts +2 -2
- package/dist/esm/lib/utils/translateObject.js +3 -3
- package/dist/esm/literals/definitions.d.ts +1 -1
- package/dist/esm/literals/definitions.js +1 -1
- package/dist/esm/literals/index.d.ts +2 -2
- package/dist/esm/literals/index.js +2 -2
- package/dist/esm/mail/index.d.ts +6 -6
- package/dist/esm/mail/index.js +5 -5
- package/dist/esm/mail/mailService.d.ts +2 -2
- package/dist/esm/mail/mailService.js +1 -1
- package/dist/esm/mail/templates.d.ts +1 -1
- package/dist/esm/mail/templates.js +2 -2
- package/dist/esm/manager.d.ts +3 -3
- package/dist/esm/manager.js +1 -1
- package/dist/esm/media/imageOptimization.d.ts +1 -1
- package/dist/esm/media/imageOptimization.js +2 -2
- package/dist/esm/media/index.d.ts +4 -4
- package/dist/esm/media/index.js +3 -3
- package/dist/esm/media/mediaService.d.ts +1 -1
- package/dist/esm/orm/backups.js +5 -5
- package/dist/esm/orm/createIndexes.js +4 -4
- package/dist/esm/orm/database.js +3 -3
- package/dist/esm/orm/dbService.d.ts +6 -6
- package/dist/esm/orm/index.d.ts +2 -2
- package/dist/esm/orm/index.js +16 -16
- package/dist/esm/orm/migrations.d.ts +1 -1
- package/dist/esm/orm/migrations.js +4 -4
- package/dist/esm/orm/mongodbPeer.js +1 -1
- package/dist/esm/orm/operations/clear.d.ts +2 -2
- package/dist/esm/orm/operations/clear.js +1 -1
- package/dist/esm/orm/operations/create.d.ts +4 -4
- package/dist/esm/orm/operations/create.js +7 -7
- package/dist/esm/orm/operations/delete.d.ts +3 -3
- package/dist/esm/orm/operations/delete.js +5 -5
- package/dist/esm/orm/operations/find.d.ts +2 -2
- package/dist/esm/orm/operations/find.js +3 -3
- package/dist/esm/orm/operations/findDependencies.d.ts +2 -2
- package/dist/esm/orm/operations/findDependencies.js +4 -4
- package/dist/esm/orm/operations/get.d.ts +3 -3
- package/dist/esm/orm/operations/get.js +3 -3
- package/dist/esm/orm/operations/getAll.d.ts +2 -2
- package/dist/esm/orm/operations/getAll.js +2 -2
- package/dist/esm/orm/operations/list.d.ts +2 -2
- package/dist/esm/orm/operations/list.js +3 -3
- package/dist/esm/orm/operations/update.d.ts +5 -5
- package/dist/esm/orm/operations/update.js +8 -8
- package/dist/esm/orm/operations/updateMany.d.ts +4 -4
- package/dist/esm/orm/operations/updateMany.js +4 -4
- package/dist/esm/orm/operations/upsert.d.ts +3 -3
- package/dist/esm/orm/operations/upsert.js +4 -4
- package/dist/esm/orm/utils/deepDeleteNulls.js +1 -1
- package/dist/esm/orm/utils/parseId.d.ts +1 -1
- package/dist/esm/orm/utils/parseId.js +1 -1
- package/dist/esm/orm/utils/transformObjectIdsToStrings.js +1 -1
- package/dist/esm/orm/utils/transformStringToObjectIds.js +1 -1
- package/dist/esm/orm/versions.d.ts +1 -1
- package/dist/esm/orm/versions.js +7 -7
- package/dist/esm/plugins.d.ts +11 -11
- package/dist/esm/schemas/manager/auth/externalLogin.js +1 -1
- package/dist/esm/schemas/manager/comments.js +1 -1
- package/dist/esm/schemas/manager/contentVersions.d.ts +64 -64
- package/dist/esm/schemas/manager/contentVersions.js +3 -3
- package/dist/esm/schemas/manager/literals/upsert.js +1 -1
- package/dist/esm/schemas/manager/localeVariants.d.ts +96 -96
- package/dist/esm/schemas/manager/localeVariants.js +1 -1
- package/dist/esm/schemas/manager/media/finalizeUpload.js +1 -1
- package/dist/esm/schemas/manager/media/getMediaUrl.js +1 -1
- package/dist/esm/schemas/manager/media/listFolders.js +1 -1
- package/dist/esm/schemas/manager/media/reimportMedia.js +2 -2
- package/dist/esm/schemas/manager/notifications.js +1 -1
- package/dist/esm/schemas/manager/reviews.js +1 -1
- package/dist/esm/schemas/manager/uiLocales.js +1 -1
- package/dist/esm/schemas/web/page.d.ts +42 -41
- package/dist/esm/schemas/web/page.d.ts.map +1 -1
- package/dist/esm/schemas/web/page.js +7 -6
- package/dist/esm/schemas/web/page.js.map +1 -1
- package/dist/esm/schemas/web/previewPage.d.ts +28 -28
- package/dist/esm/schemas/web/previewPage.js +1 -1
- package/dist/esm/schemas/web/staticPaths.d.ts +14 -0
- package/dist/esm/schemas/web/staticPaths.d.ts.map +1 -0
- package/dist/esm/schemas/web/staticPaths.js +9 -0
- package/dist/esm/schemas/web/staticPaths.js.map +1 -0
- package/dist/esm/translation/document.d.ts +3 -3
- package/dist/esm/translation/index.d.ts +4 -4
- package/dist/esm/translation/index.js +3 -3
- package/dist/esm/translation/translationService.d.ts +1 -1
- package/dist/esm/web/client.d.ts +1 -1
- package/dist/esm/web/client.js +1 -1
- package/dist/esm/web/index.d.ts +2 -2
- package/dist/esm/web/index.js +2 -2
- package/dist/esm/web/page.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +138 -138
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { mergeOperationContracts } from
|
|
2
|
-
import { traceOperationMap } from
|
|
3
|
-
import { createWebOperationContracts } from
|
|
4
|
-
import { getCustomApiOperationDefinitions, mergeOperationMaps
|
|
5
|
-
import { getLanguages } from
|
|
6
|
-
import { getPage } from
|
|
7
|
-
import { getPreviewPage } from
|
|
8
|
-
import { getRobots } from
|
|
9
|
-
import { getSitemap } from
|
|
1
|
+
import { mergeOperationContracts } from './types';
|
|
2
|
+
import { traceOperationMap } from './tracing';
|
|
3
|
+
import { createWebOperationContracts } from './web-contract';
|
|
4
|
+
import { getCustomApiOperationDefinitions, mergeOperationMaps } from './custom';
|
|
5
|
+
import { getLanguages } from '../utils/getLanguages';
|
|
6
|
+
import { getPage } from '../routes/web/page';
|
|
7
|
+
import { getPreviewPage } from '../routes/web/previewPage';
|
|
8
|
+
import { getRobots } from '../routes/web/robots';
|
|
9
|
+
import { getSitemap } from '../routes/web/sitemap';
|
|
10
|
+
import { getStaticPaths } from '../routes/web/staticPaths';
|
|
10
11
|
const getStringHeaders = (headers) => {
|
|
11
12
|
const values = Object.entries(headers).flatMap(([key, value]) => {
|
|
12
|
-
if (typeof value ===
|
|
13
|
+
if (typeof value === 'string') {
|
|
13
14
|
return [[key, value]];
|
|
14
15
|
}
|
|
15
16
|
if (Array.isArray(value)) {
|
|
16
|
-
return value.length > 0 && typeof value[0] ===
|
|
17
|
-
? [[key, value[0]]]
|
|
18
|
-
: [];
|
|
17
|
+
return value.length > 0 && typeof value[0] === 'string' ? [[key, value[0]]] : [];
|
|
19
18
|
}
|
|
20
19
|
return [];
|
|
21
20
|
});
|
|
@@ -27,31 +26,34 @@ const getStringHeaders = (headers) => {
|
|
|
27
26
|
export const createWebOperationDefinitions = () => {
|
|
28
27
|
const contracts = createWebOperationContracts();
|
|
29
28
|
const implementations = {
|
|
30
|
-
|
|
29
|
+
'web.languages': {
|
|
31
30
|
resolve: async () => await getLanguages(),
|
|
32
31
|
},
|
|
33
|
-
|
|
32
|
+
'web.page': {
|
|
34
33
|
resolve: async ({ input, ctx }) => await getPage({
|
|
35
34
|
...input,
|
|
36
35
|
headers: input.headers ?? getStringHeaders(ctx.req?.headers ?? {}),
|
|
37
36
|
}),
|
|
38
37
|
},
|
|
39
|
-
|
|
38
|
+
'web.previewPage': {
|
|
40
39
|
resolve: async ({ input, ctx }) => await getPreviewPage({
|
|
41
40
|
...input,
|
|
42
41
|
headers: input.headers ?? getStringHeaders(ctx.req?.headers ?? {}),
|
|
43
42
|
}),
|
|
44
43
|
},
|
|
45
|
-
|
|
44
|
+
'web.sitemap': {
|
|
46
45
|
resolve: async ({ input }) => await getSitemap(input),
|
|
47
46
|
},
|
|
48
|
-
|
|
47
|
+
'web.staticPaths': {
|
|
48
|
+
resolve: async () => await getStaticPaths(),
|
|
49
|
+
},
|
|
50
|
+
'web.robots': {
|
|
49
51
|
resolve: async () => await getRobots(),
|
|
50
52
|
},
|
|
51
|
-
|
|
53
|
+
'web.test': {
|
|
52
54
|
resolve: async () => ({ ok: true }),
|
|
53
55
|
},
|
|
54
56
|
};
|
|
55
|
-
return traceOperationMap(mergeOperationMaps(mergeOperationContracts(contracts, implementations), getCustomApiOperationDefinitions(
|
|
57
|
+
return traceOperationMap(mergeOperationMaps(mergeOperationContracts(contracts, implementations), getCustomApiOperationDefinitions('web')));
|
|
56
58
|
};
|
|
57
59
|
//# sourceMappingURL=web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../../src/api/operations/web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../../src/api/operations/web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAAE,gCAAgC,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,MAAM,gBAAgB,GAAG,CACvB,OAAsD,EAClB,EAAE;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,CAAU,CAAC,CAAA;QAChC,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAC3F,CAAC;QAED,OAAO,EAAE,CAAA;IACX,CAAC,CAAC,CAAA;IAEF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAChD,MAAM,SAAS,GAAG,2BAA2B,EAAE,CAAA;IAC/C,MAAM,eAAe,GAAsD;QACzE,eAAe,EAAE;YACf,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,YAAY,EAAE;SAC1C;QACD,UAAU,EAAE;YACV,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,CAChC,MAAM,OAAO,CAAC;gBACZ,GAAG,KAAK;gBACR,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,IAAI,EAAE,CAAC;aACnE,CAAC;SACL;QACD,iBAAiB,EAAE;YACjB,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,CAChC,MAAM,cAAc,CAAC;gBACnB,GAAG,KAAK;gBACR,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,IAAI,EAAE,CAAC;aACnE,CAAC;SACL;QACD,aAAa,EAAE;YACb,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC;SACtD;QACD,iBAAiB,EAAE;YACjB,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,cAAc,EAAE;SAC5C;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,SAAS,EAAE;SACvC;QACD,UAAU,EAAE;YACV,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;SACpC;KACF,CAAA;IAED,OAAO,iBAAiB,CACtB,kBAAkB,CAChB,uBAAuB,CAAC,SAAS,EAAE,eAAe,CAAC,EACnD,gCAAgC,CAAC,KAAK,CAAC,CACxC,CACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ApiOperationsOutput } from "../../../schemas/manager/apiOperations
|
|
2
|
-
import type { RakunRequestContext } from "../../context
|
|
3
|
-
import type { RakunOperationContractMap, RakunOperationImplementationMap } from "../../operations/types
|
|
1
|
+
import type { ApiOperationsOutput } from "../../../schemas/manager/apiOperations";
|
|
2
|
+
import type { RakunRequestContext } from "../../context";
|
|
3
|
+
import type { RakunOperationContractMap, RakunOperationImplementationMap } from "../../operations/types";
|
|
4
4
|
export declare const apiOperationsHandler: <TContracts extends RakunOperationContractMap>({ contracts, implementations, ctx, }: {
|
|
5
5
|
contracts: TContracts;
|
|
6
6
|
implementations: RakunOperationImplementationMap<TContracts>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createApiOperationCatalog } from "../../operations/catalog
|
|
2
|
-
import { getCustomApiOperationDefinitions, mergeOperationMaps, } from "../../operations/custom
|
|
3
|
-
import { mergeOperationContracts } from "../../operations/types
|
|
4
|
-
import { createWebOperationDefinitions } from "../../operations/web
|
|
5
|
-
import { checkPermissions } from "../../utils/checkPermissions
|
|
1
|
+
import { createApiOperationCatalog } from "../../operations/catalog";
|
|
2
|
+
import { getCustomApiOperationDefinitions, mergeOperationMaps, } from "../../operations/custom";
|
|
3
|
+
import { mergeOperationContracts } from "../../operations/types";
|
|
4
|
+
import { createWebOperationDefinitions } from "../../operations/web";
|
|
5
|
+
import { checkPermissions } from "../../utils/checkPermissions";
|
|
6
6
|
export const apiOperationsHandler = async ({ contracts, implementations, ctx, }) => {
|
|
7
7
|
const user = ctx.getUser();
|
|
8
8
|
checkPermissions(user, ["content.ApiOperation.readAny"]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
2
|
-
import { AccountInfoOutput } from "../../../../schemas/manager/auth/accountInfo
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
|
+
import { AccountInfoOutput } from "../../../../schemas/manager/auth/accountInfo";
|
|
3
3
|
export declare const accountInfoHandler: ({ ctx, }: {
|
|
4
4
|
ctx: RakunRequestContext;
|
|
5
5
|
}) => Promise<AccountInfoOutput>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Session, UserMfa } from "../../../../internal-content-types
|
|
2
|
-
import { getMongoService } from "../../../../orm
|
|
3
|
-
import { getSessionCookie } from "../../../sessionCookie
|
|
1
|
+
import { Session, UserMfa } from "../../../../internal-content-types";
|
|
2
|
+
import { getMongoService } from "../../../../orm";
|
|
3
|
+
import { getSessionCookie } from "../../../sessionCookie";
|
|
4
4
|
export const accountInfoHandler = async ({ ctx, }) => {
|
|
5
5
|
const user = ctx.getUser();
|
|
6
6
|
const db = await getMongoService();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
2
|
-
import { DeleteSessionInput } from "../../../../schemas/manager/auth/deleteSession
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
|
+
import { DeleteSessionInput } from "../../../../schemas/manager/auth/deleteSession";
|
|
3
3
|
export declare const deleteSessionHandler: ({ input, ctx, }: {
|
|
4
4
|
input: DeleteSessionInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Session } from "../../../../internal-content-types
|
|
2
|
-
import { throwAppError } from "../../../../lib/errors
|
|
3
|
-
import { getMongoService } from "../../../../orm
|
|
1
|
+
import { Session } from "../../../../internal-content-types";
|
|
2
|
+
import { throwAppError } from "../../../../lib/errors";
|
|
3
|
+
import { getMongoService } from "../../../../orm";
|
|
4
4
|
export const deleteSessionHandler = async ({ input, ctx, }) => {
|
|
5
5
|
const user = ctx.getUser();
|
|
6
6
|
const db = await getMongoService();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExternalLoginCompleteInput, ExternalLoginCompleteOutput, ExternalLoginStartInput, ExternalLoginStartOutput } from '../../../../schemas/manager/auth/externalLogin
|
|
2
|
-
import type { RakunRequestContext } from '../../../context
|
|
1
|
+
import type { ExternalLoginCompleteInput, ExternalLoginCompleteOutput, ExternalLoginStartInput, ExternalLoginStartOutput } from '../../../../schemas/manager/auth/externalLogin';
|
|
2
|
+
import type { RakunRequestContext } from '../../../context';
|
|
3
3
|
export declare const externalLoginStartHandler: ({ input, ctx, }: {
|
|
4
4
|
input: ExternalLoginStartInput;
|
|
5
5
|
ctx?: RakunRequestContext;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createHash, randomBytes, timingSafeEqual } from 'crypto';
|
|
2
|
-
import { completePrimaryAuthentication } from '../../../../auth/completePrimaryAuthentication
|
|
3
|
-
import { getRakunBootstrapOptions } from '../../../../bootstrapState
|
|
4
|
-
import { ManagerUser } from '../../../../internal-content-types
|
|
5
|
-
import { throwAppError } from '../../../../lib/errors
|
|
6
|
-
import { getMongoService } from '../../../../orm
|
|
7
|
-
import { recordAuthEvent } from '../../../utils/authEvents
|
|
8
|
-
import { assertAuthRateLimit, getRequestRateLimitIdentifier, resetAuthRateLimit, } from '../../../utils/authRateLimit
|
|
2
|
+
import { completePrimaryAuthentication } from '../../../../auth/completePrimaryAuthentication';
|
|
3
|
+
import { getRakunBootstrapOptions } from '../../../../bootstrapState';
|
|
4
|
+
import { ManagerUser } from '../../../../internal-content-types';
|
|
5
|
+
import { throwAppError } from '../../../../lib/errors';
|
|
6
|
+
import { getMongoService } from '../../../../orm';
|
|
7
|
+
import { recordAuthEvent } from '../../../utils/authEvents';
|
|
8
|
+
import { assertAuthRateLimit, getRequestRateLimitIdentifier, resetAuthRateLimit, } from '../../../utils/authRateLimit';
|
|
9
9
|
const LOGIN_FLOW_COOKIE = 'rakun_login_flow';
|
|
10
10
|
const LOGIN_FLOW_MAX_AGE_MS = 10 * 60 * 1000;
|
|
11
11
|
const getAdapter = (provider) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
2
|
export declare const getSessionHandler: ({ ctx, }: {
|
|
3
3
|
ctx: RakunRequestContext;
|
|
4
4
|
}) => Promise<{
|
|
@@ -10,13 +10,13 @@ export declare const getSessionHandler: ({ ctx, }: {
|
|
|
10
10
|
_type: "ManagerRole";
|
|
11
11
|
_id: string;
|
|
12
12
|
_schemaVersion?: number | undefined;
|
|
13
|
-
_visibility?: import("
|
|
14
|
-
_visibilityBeforeTrash?: Exclude<import("
|
|
13
|
+
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
14
|
+
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
15
15
|
_trashed?: boolean | undefined;
|
|
16
16
|
_revision?: number | undefined;
|
|
17
17
|
_localeVariantGroupId?: string | undefined;
|
|
18
18
|
_localeVariantName?: string | undefined;
|
|
19
|
-
_localeVariantRole?: import("zod").infer<typeof import("
|
|
19
|
+
_localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
|
|
20
20
|
trashedAt?: Date | undefined;
|
|
21
21
|
createdAt?: Date | undefined;
|
|
22
22
|
updatedAt?: Date | undefined;
|
|
@@ -34,13 +34,13 @@ export declare const getSessionHandler: ({ ctx, }: {
|
|
|
34
34
|
tutorialsPromptedAt?: Date | undefined;
|
|
35
35
|
seenTours?: (string | undefined)[] | undefined;
|
|
36
36
|
_schemaVersion?: number | undefined;
|
|
37
|
-
_visibility?: import("
|
|
38
|
-
_visibilityBeforeTrash?: Exclude<import("
|
|
37
|
+
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
38
|
+
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
39
39
|
_trashed?: boolean | undefined;
|
|
40
40
|
_revision?: number | undefined;
|
|
41
41
|
_localeVariantGroupId?: string | undefined;
|
|
42
42
|
_localeVariantName?: string | undefined;
|
|
43
|
-
_localeVariantRole?: import("zod").infer<typeof import("
|
|
43
|
+
_localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
|
|
44
44
|
trashedAt?: Date | undefined;
|
|
45
45
|
createdAt?: Date | undefined;
|
|
46
46
|
updatedAt?: Date | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LoginInput, LoginOutput } from "../../../../schemas/manager/auth/login
|
|
2
|
-
import type { RakunRequestContext } from "../../../context
|
|
1
|
+
import { LoginInput, LoginOutput } from "../../../../schemas/manager/auth/login";
|
|
2
|
+
import type { RakunRequestContext } from "../../../context";
|
|
3
3
|
export declare const loginHandler: ({ input, ctx, }: {
|
|
4
4
|
input: LoginInput;
|
|
5
5
|
ctx?: RakunRequestContext;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { completePrimaryAuthentication } from "../../../../auth/completePrimaryAuthentication
|
|
2
|
-
import { clearPasswordFailures, getBlockedPasswordIp, recordPasswordFailure, resolvePasswordLoginIp, } from '../../../../auth/passwordFail2ban
|
|
3
|
-
import { getRakunBootstrapOptions } from "../../../../bootstrapState
|
|
4
|
-
import { LoginIpBlock, ManagerUser } from "../../../../internal-content-types
|
|
5
|
-
import { throwAppError } from "../../../../lib/errors
|
|
6
|
-
import { getMongoService } from "../../../../orm
|
|
7
|
-
import { recordAuthEvent } from '../../../utils/authEvents
|
|
8
|
-
import { setApiErrorEventData } from '../../../operations/apiEventLog
|
|
9
|
-
import { hashPassword, verifyStoredPassword } from "../../../utils/passwords
|
|
1
|
+
import { completePrimaryAuthentication } from "../../../../auth/completePrimaryAuthentication";
|
|
2
|
+
import { clearPasswordFailures, getBlockedPasswordIp, recordPasswordFailure, resolvePasswordLoginIp, } from '../../../../auth/passwordFail2ban';
|
|
3
|
+
import { getRakunBootstrapOptions } from "../../../../bootstrapState";
|
|
4
|
+
import { LoginIpBlock, ManagerUser } from "../../../../internal-content-types";
|
|
5
|
+
import { throwAppError } from "../../../../lib/errors";
|
|
6
|
+
import { getMongoService } from "../../../../orm";
|
|
7
|
+
import { recordAuthEvent } from '../../../utils/authEvents';
|
|
8
|
+
import { setApiErrorEventData } from '../../../operations/apiEventLog';
|
|
9
|
+
import { hashPassword, verifyStoredPassword } from "../../../utils/passwords";
|
|
10
10
|
export const loginHandler = async ({ input, ctx, }) => {
|
|
11
11
|
if (getRakunBootstrapOptions()?.login?.password === false) {
|
|
12
12
|
throwAppError("FORBIDDEN", { reason: "LOGIN_METHOD_DISABLED" });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Session } from "../../../../internal-content-types
|
|
2
|
-
import { getMongoService } from "../../../../orm
|
|
3
|
-
import { getSessionCookie } from "../../../sessionCookie
|
|
1
|
+
import { Session } from "../../../../internal-content-types";
|
|
2
|
+
import { getMongoService } from "../../../../orm";
|
|
3
|
+
import { getSessionCookie } from "../../../sessionCookie";
|
|
4
4
|
const emptyToken = { token: "" };
|
|
5
5
|
export const logoutHandler = async ({ ctx }) => {
|
|
6
6
|
if (!ctx?.req?.cookies)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MarkTourSeenInput } from "../../../../schemas/manager/auth/tutorials
|
|
2
|
-
import { RakunRequestContext } from "../../../context
|
|
1
|
+
import type { MarkTourSeenInput } from "../../../../schemas/manager/auth/tutorials";
|
|
2
|
+
import { RakunRequestContext } from "../../../context";
|
|
3
3
|
export declare const markTourSeenHandler: ({ input, ctx, }: {
|
|
4
4
|
input: MarkTourSeenInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -13,13 +13,13 @@ export declare const markTourSeenHandler: ({ input, ctx, }: {
|
|
|
13
13
|
_type: "ManagerRole";
|
|
14
14
|
_id: string;
|
|
15
15
|
_schemaVersion?: number | undefined;
|
|
16
|
-
_visibility?: import("
|
|
17
|
-
_visibilityBeforeTrash?: Exclude<import("
|
|
16
|
+
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
17
|
+
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
18
18
|
_trashed?: boolean | undefined;
|
|
19
19
|
_revision?: number | undefined;
|
|
20
20
|
_localeVariantGroupId?: string | undefined;
|
|
21
21
|
_localeVariantName?: string | undefined;
|
|
22
|
-
_localeVariantRole?: import("zod").infer<typeof import("
|
|
22
|
+
_localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
|
|
23
23
|
trashedAt?: Date | undefined;
|
|
24
24
|
trashedBy?: string | undefined;
|
|
25
25
|
createdAt?: Date | undefined;
|
|
@@ -40,13 +40,13 @@ export declare const markTourSeenHandler: ({ input, ctx, }: {
|
|
|
40
40
|
tutorialsPromptedAt?: Date | undefined;
|
|
41
41
|
seenTours?: (string | undefined)[] | undefined;
|
|
42
42
|
_schemaVersion?: number | undefined;
|
|
43
|
-
_visibility?: import("
|
|
44
|
-
_visibilityBeforeTrash?: Exclude<import("
|
|
43
|
+
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
44
|
+
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
45
45
|
_trashed?: boolean | undefined;
|
|
46
46
|
_revision?: number | undefined;
|
|
47
47
|
_localeVariantGroupId?: string | undefined;
|
|
48
48
|
_localeVariantName?: string | undefined;
|
|
49
|
-
_localeVariantRole?: import("zod").infer<typeof import("
|
|
49
|
+
_localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
|
|
50
50
|
trashedAt?: Date | undefined;
|
|
51
51
|
trashedBy?: string | undefined;
|
|
52
52
|
createdAt?: Date | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ManagerUser } from "../../../../internal-content-types
|
|
2
|
-
import { getMongoService } from "../../../../orm
|
|
3
|
-
import { populateRelations } from "../../../utils/populates/populateRelations
|
|
1
|
+
import { ManagerUser } from "../../../../internal-content-types";
|
|
2
|
+
import { getMongoService } from "../../../../orm";
|
|
3
|
+
import { populateRelations } from "../../../utils/populates/populateRelations";
|
|
4
4
|
export const markTourSeenHandler = async ({ input, ctx, }) => {
|
|
5
5
|
const user = ctx.getUser();
|
|
6
6
|
const db = await getMongoService();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RegenerateRecoveryCodesInput } from '../../../../../schemas/manager/auth/mfa/recoveryCode
|
|
2
|
-
import type { RakunRequestContext } from '../../../../context
|
|
1
|
+
import type { RegenerateRecoveryCodesInput } from '../../../../../schemas/manager/auth/mfa/recoveryCode';
|
|
2
|
+
import type { RakunRequestContext } from '../../../../context';
|
|
3
3
|
export declare const regenerateRecoveryCodesHandler: ({ input, ctx, }: {
|
|
4
4
|
input: RegenerateRecoveryCodesInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ManagerUser, UserMfa, } from '../../../../../internal-content-types
|
|
2
|
-
import { throwAppError } from '../../../../../lib/errors
|
|
3
|
-
import { getMongoService } from '../../../../../orm
|
|
4
|
-
import { verifyStoredPassword } from '../../../../utils/passwords
|
|
5
|
-
import { generateRecoveryCodes } from '../../../../utils/recoveryCodes
|
|
6
|
-
import { recordAuthEvent } from '../../../../utils/authEvents
|
|
1
|
+
import { ManagerUser, UserMfa, } from '../../../../../internal-content-types';
|
|
2
|
+
import { throwAppError } from '../../../../../lib/errors';
|
|
3
|
+
import { getMongoService } from '../../../../../orm';
|
|
4
|
+
import { verifyStoredPassword } from '../../../../utils/passwords';
|
|
5
|
+
import { generateRecoveryCodes } from '../../../../utils/recoveryCodes';
|
|
6
|
+
import { recordAuthEvent } from '../../../../utils/authEvents';
|
|
7
7
|
export const regenerateRecoveryCodesHandler = async ({ input, ctx, }) => {
|
|
8
8
|
const db = await getMongoService();
|
|
9
9
|
const user = ctx.getUser();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { VerifyRecoveryCodeInput } from '../../../../../schemas/manager/auth/mfa/recoveryCode
|
|
2
|
-
import type { RakunRequestContext } from '../../../../context
|
|
1
|
+
import type { VerifyRecoveryCodeInput } from '../../../../../schemas/manager/auth/mfa/recoveryCode';
|
|
2
|
+
import type { RakunRequestContext } from '../../../../context';
|
|
3
3
|
export declare const verifyRecoveryCodeHandler: ({ input, ctx, }: {
|
|
4
4
|
input: VerifyRecoveryCodeInput;
|
|
5
5
|
ctx?: RakunRequestContext;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ManagerUser, MfaChallenge, Session, UserMfa, } from '../../../../../internal-content-types
|
|
2
|
-
import { throwAppError } from '../../../../../lib/errors
|
|
3
|
-
import { getMongoService } from '../../../../../orm
|
|
4
|
-
import { SESSION_MAX_AGE_MS } from '../../../../sessionCookie
|
|
5
|
-
import { assertAuthRateLimit, resetAuthRateLimit, } from '../../../../utils/authRateLimit
|
|
6
|
-
import { findRecoveryCodeHash } from '../../../../utils/recoveryCodes
|
|
7
|
-
import { recordAuthEvent } from '../../../../utils/authEvents
|
|
1
|
+
import { ManagerUser, MfaChallenge, Session, UserMfa, } from '../../../../../internal-content-types';
|
|
2
|
+
import { throwAppError } from '../../../../../lib/errors';
|
|
3
|
+
import { getMongoService } from '../../../../../orm';
|
|
4
|
+
import { SESSION_MAX_AGE_MS } from '../../../../sessionCookie';
|
|
5
|
+
import { assertAuthRateLimit, resetAuthRateLimit, } from '../../../../utils/authRateLimit';
|
|
6
|
+
import { findRecoveryCodeHash } from '../../../../utils/recoveryCodes';
|
|
7
|
+
import { recordAuthEvent } from '../../../../utils/authEvents';
|
|
8
8
|
export const verifyRecoveryCodeHandler = async ({ input, ctx, }) => {
|
|
9
9
|
const db = await getMongoService();
|
|
10
10
|
const rateLimitKey = `mfa:recovery:${input.challenge}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ListPasswordIpBlocksOutput, UnblockPasswordIpInput, UnblockPasswordIpOutput } from '../../../../schemas/manager/auth/passwordIpBlocks
|
|
2
|
-
import type { RakunRequestContext } from '../../../context
|
|
1
|
+
import type { ListPasswordIpBlocksOutput, UnblockPasswordIpInput, UnblockPasswordIpOutput } from '../../../../schemas/manager/auth/passwordIpBlocks';
|
|
2
|
+
import type { RakunRequestContext } from '../../../context';
|
|
3
3
|
export declare const listPasswordIpBlocksHandler: ({ ctx, }: {
|
|
4
4
|
ctx: RakunRequestContext;
|
|
5
5
|
}) => Promise<ListPasswordIpBlocksOutput>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { getPasswordFail2banConfig } from '../../../../auth/passwordFail2ban
|
|
2
|
-
import { LoginIpBlock } from '../../../../internal-content-types
|
|
3
|
-
import { getEventLogService } from '../../../../eventLog
|
|
4
|
-
import { throwAppError } from '../../../../lib/errors
|
|
5
|
-
import { AUTH_IP_BLOCK_MANAGE_PERMISSION } from '../../../../lib/Permissions
|
|
6
|
-
import { getMongoService } from '../../../../orm
|
|
7
|
-
import { recordAuthEvent } from '../../../utils/authEvents
|
|
8
|
-
import { checkPermissions } from '../../../utils/checkPermissions
|
|
1
|
+
import { getPasswordFail2banConfig } from '../../../../auth/passwordFail2ban';
|
|
2
|
+
import { LoginIpBlock } from '../../../../internal-content-types';
|
|
3
|
+
import { getEventLogService } from '../../../../eventLog';
|
|
4
|
+
import { throwAppError } from '../../../../lib/errors';
|
|
5
|
+
import { AUTH_IP_BLOCK_MANAGE_PERMISSION } from '../../../../lib/Permissions';
|
|
6
|
+
import { getMongoService } from '../../../../orm';
|
|
7
|
+
import { recordAuthEvent } from '../../../utils/authEvents';
|
|
8
|
+
import { checkPermissions } from '../../../utils/checkPermissions';
|
|
9
9
|
const requireManagePermission = (ctx) => {
|
|
10
10
|
const user = ctx.getUser();
|
|
11
11
|
checkPermissions(user, [AUTH_IP_BLOCK_MANAGE_PERMISSION]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RequestPasswordResetInput, ResetPasswordInput } from '../../../../schemas/manager/auth/passwordRecovery
|
|
2
|
-
import type { RakunRequestContext } from '../../../context
|
|
1
|
+
import type { RequestPasswordResetInput, ResetPasswordInput } from '../../../../schemas/manager/auth/passwordRecovery';
|
|
2
|
+
import type { RakunRequestContext } from '../../../context';
|
|
3
3
|
export declare const requestPasswordResetHandler: ({ input, ctx, }: {
|
|
4
4
|
input: RequestPasswordResetInput;
|
|
5
5
|
ctx?: RakunRequestContext;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createHash, randomBytes } from 'crypto';
|
|
2
|
-
import { ManagerUser, PasswordResetToken, Session, } from '../../../../internal-content-types
|
|
3
|
-
import { getRakunBootstrapOptions } from '../../../../bootstrapState
|
|
4
|
-
import { Logger } from '../../../../lib/Logger
|
|
5
|
-
import { throwAppError } from '../../../../lib/errors
|
|
6
|
-
import { getMailService, hasMailService } from '../../../../mail
|
|
7
|
-
import { getMongoService } from '../../../../orm
|
|
8
|
-
import { assertAuthRateLimit, getRequestRateLimitIdentifier, } from '../../../utils/authRateLimit
|
|
9
|
-
import { PASSWORD_RESET_DEFAULT_EXPIRES_IN_MS } from '../../../../auth/accountRecovery
|
|
10
|
-
import { passwordResetMailTemplate } from '../../../../auth/passwordResetMailTemplate
|
|
11
|
-
import { recordAuthEvent } from '../../../utils/authEvents
|
|
2
|
+
import { ManagerUser, PasswordResetToken, Session, } from '../../../../internal-content-types';
|
|
3
|
+
import { getRakunBootstrapOptions } from '../../../../bootstrapState';
|
|
4
|
+
import { Logger } from '../../../../lib/Logger';
|
|
5
|
+
import { throwAppError } from '../../../../lib/errors';
|
|
6
|
+
import { getMailService, hasMailService } from '../../../../mail';
|
|
7
|
+
import { getMongoService } from '../../../../orm';
|
|
8
|
+
import { assertAuthRateLimit, getRequestRateLimitIdentifier, } from '../../../utils/authRateLimit';
|
|
9
|
+
import { PASSWORD_RESET_DEFAULT_EXPIRES_IN_MS } from '../../../../auth/accountRecovery';
|
|
10
|
+
import { passwordResetMailTemplate } from '../../../../auth/passwordResetMailTemplate';
|
|
11
|
+
import { recordAuthEvent } from '../../../utils/authEvents';
|
|
12
12
|
const hashToken = (token) => createHash('sha256').update(token).digest('hex');
|
|
13
13
|
const requirePasswordResetConfig = () => {
|
|
14
14
|
const config = getRakunBootstrapOptions()?.accountRecovery?.passwordReset;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../../context
|
|
2
|
-
import { ConfirmTotpInput } from "../../../../../schemas/manager/auth/totp/confirmTotp
|
|
1
|
+
import { RakunRequestContext } from "../../../../context";
|
|
2
|
+
import { ConfirmTotpInput } from "../../../../../schemas/manager/auth/totp/confirmTotp";
|
|
3
3
|
export declare const confirmTotpHandler: ({ input, ctx, }: {
|
|
4
4
|
input: ConfirmTotpInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UserMfa, ManagerUser } from "../../../../../internal-content-types
|
|
2
|
-
import { getMongoService } from "../../../../../orm
|
|
1
|
+
import { UserMfa, ManagerUser } from "../../../../../internal-content-types";
|
|
2
|
+
import { getMongoService } from "../../../../../orm";
|
|
3
3
|
import * as OTPAuth from "otpauth";
|
|
4
|
-
import { generateRecoveryCodes } from '../../../../utils/recoveryCodes
|
|
5
|
-
import { recordAuthEvent } from '../../../../utils/authEvents
|
|
4
|
+
import { generateRecoveryCodes } from '../../../../utils/recoveryCodes';
|
|
5
|
+
import { recordAuthEvent } from '../../../../utils/authEvents';
|
|
6
6
|
export const confirmTotpHandler = async ({ input, ctx, }) => {
|
|
7
7
|
const db = await getMongoService();
|
|
8
8
|
const user = ctx.getUser();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { randomBytes } from "crypto";
|
|
2
2
|
import * as OTPAuth from "otpauth";
|
|
3
3
|
import QRCode from "qrcode";
|
|
4
|
-
import { UserMfa, ManagerUser } from "../../../../../internal-content-types
|
|
5
|
-
import { throwAppError } from "../../../../../lib/errors
|
|
6
|
-
import { getMongoService } from "../../../../../orm
|
|
4
|
+
import { UserMfa, ManagerUser } from "../../../../../internal-content-types";
|
|
5
|
+
import { throwAppError } from "../../../../../lib/errors";
|
|
6
|
+
import { getMongoService } from "../../../../../orm";
|
|
7
7
|
export const enrollTotpHandler = async ({ ctx, }) => {
|
|
8
8
|
const db = await getMongoService();
|
|
9
9
|
const user = ctx.getUser();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VerifyTotpInput } from "../../../../../schemas/manager/auth/totp/verifyTotp
|
|
1
|
+
import { VerifyTotpInput } from "../../../../../schemas/manager/auth/totp/verifyTotp";
|
|
2
2
|
export declare const verifyTotpHandler: ({ input, }: {
|
|
3
3
|
input: VerifyTotpInput;
|
|
4
4
|
}) => Promise<{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as OTPAuth from "otpauth";
|
|
2
|
-
import { MfaChallenge, ManagerUser, UserMfa, Session, } from "../../../../../internal-content-types
|
|
3
|
-
import { throwAppError } from "../../../../../lib/errors
|
|
4
|
-
import { getMongoService } from "../../../../../orm
|
|
5
|
-
import { SESSION_MAX_AGE_MS } from "../../../../sessionCookie
|
|
6
|
-
import { assertAuthRateLimit, resetAuthRateLimit, } from "../../../../utils/authRateLimit
|
|
2
|
+
import { MfaChallenge, ManagerUser, UserMfa, Session, } from "../../../../../internal-content-types";
|
|
3
|
+
import { throwAppError } from "../../../../../lib/errors";
|
|
4
|
+
import { getMongoService } from "../../../../../orm";
|
|
5
|
+
import { SESSION_MAX_AGE_MS } from "../../../../sessionCookie";
|
|
6
|
+
import { assertAuthRateLimit, resetAuthRateLimit, } from "../../../../utils/authRateLimit";
|
|
7
7
|
export const verifyTotpHandler = async ({ input, }) => {
|
|
8
8
|
const db = await getMongoService();
|
|
9
9
|
const { challenge, code } = input;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UpdateAccountInput } from "../../../../schemas/manager/auth/accountInfo
|
|
2
|
-
import { RakunRequestContext } from "../../../context
|
|
1
|
+
import { UpdateAccountInput } from "../../../../schemas/manager/auth/accountInfo";
|
|
2
|
+
import { RakunRequestContext } from "../../../context";
|
|
3
3
|
export declare const updateAccountHandler: ({ input, ctx, }: {
|
|
4
4
|
input: UpdateAccountInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -13,13 +13,13 @@ export declare const updateAccountHandler: ({ input, ctx, }: {
|
|
|
13
13
|
_type: "ManagerRole";
|
|
14
14
|
_id: string;
|
|
15
15
|
_schemaVersion?: number | undefined;
|
|
16
|
-
_visibility?: import("
|
|
17
|
-
_visibilityBeforeTrash?: Exclude<import("
|
|
16
|
+
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
17
|
+
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
18
18
|
_trashed?: boolean | undefined;
|
|
19
19
|
_revision?: number | undefined;
|
|
20
20
|
_localeVariantGroupId?: string | undefined;
|
|
21
21
|
_localeVariantName?: string | undefined;
|
|
22
|
-
_localeVariantRole?: import("zod").infer<typeof import("
|
|
22
|
+
_localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
|
|
23
23
|
trashedAt?: Date | undefined;
|
|
24
24
|
trashedBy?: string | undefined;
|
|
25
25
|
createdAt?: Date | undefined;
|
|
@@ -40,13 +40,13 @@ export declare const updateAccountHandler: ({ input, ctx, }: {
|
|
|
40
40
|
tutorialsPromptedAt?: Date | undefined;
|
|
41
41
|
seenTours?: (string | undefined)[] | undefined;
|
|
42
42
|
_schemaVersion?: number | undefined;
|
|
43
|
-
_visibility?: import("
|
|
44
|
-
_visibilityBeforeTrash?: Exclude<import("
|
|
43
|
+
_visibility?: import("../../../..").DocumentVisibility | undefined;
|
|
44
|
+
_visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
|
|
45
45
|
_trashed?: boolean | undefined;
|
|
46
46
|
_revision?: number | undefined;
|
|
47
47
|
_localeVariantGroupId?: string | undefined;
|
|
48
48
|
_localeVariantName?: string | undefined;
|
|
49
|
-
_localeVariantRole?: import("zod").infer<typeof import("
|
|
49
|
+
_localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
|
|
50
50
|
trashedAt?: Date | undefined;
|
|
51
51
|
trashedBy?: string | undefined;
|
|
52
52
|
createdAt?: Date | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ManagerUser, Media } from "../../../../internal-content-types
|
|
2
|
-
import { getMongoService } from "../../../../orm
|
|
3
|
-
import { populateRelations } from "../../../utils/populates/populateRelations
|
|
1
|
+
import { ManagerUser, Media } from "../../../../internal-content-types";
|
|
2
|
+
import { getMongoService } from "../../../../orm";
|
|
3
|
+
import { populateRelations } from "../../../utils/populates/populateRelations";
|
|
4
4
|
export const updateAccountHandler = async ({ input, ctx, }) => {
|
|
5
5
|
const user = ctx.getUser();
|
|
6
6
|
const db = await getMongoService();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
2
|
-
import { UpdatePasswordInput } from "../../../../schemas/manager/updatePassword
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
|
+
import { UpdatePasswordInput } from "../../../../schemas/manager/updatePassword";
|
|
3
3
|
export declare const updatePasswordHandler: ({ input, ctx, }: {
|
|
4
4
|
input: UpdatePasswordInput;
|
|
5
5
|
ctx: RakunRequestContext;
|