@rakun-kit/core 1.5.9 → 1.5.12
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 +21 -1
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/fields/String.js +25 -1
- package/dist/cjs/lib/fields/String.js.map +1 -1
- package/dist/docs/index.md +16 -2
- 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 +198 -198
- 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 +25 -25
- package/dist/esm/api/operations/web-contract.js +3 -3
- package/dist/esm/api/operations/web.d.ts +26 -26
- package/dist/esm/api/operations/web.js +10 -10
- 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.js +20 -20
- 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 +3 -3
- package/dist/esm/api/routes/web/staticPaths.js +3 -3
- 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 +1 -1
- 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 -58
- package/dist/esm/contracts.js +58 -58
- 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 +350 -114
- package/dist/esm/internal-content-types/ApiOperation.d.ts.map +1 -1
- 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.js +2 -2
- package/dist/esm/internal-content-types/BackupDocument.d.ts +350 -114
- package/dist/esm/internal-content-types/BackupDocument.d.ts.map +1 -1
- package/dist/esm/internal-content-types/BackupDocument.js +2 -2
- package/dist/esm/internal-content-types/ContentComment.d.ts +1851 -789
- package/dist/esm/internal-content-types/ContentComment.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ContentComment.js +3 -3
- package/dist/esm/internal-content-types/ContentCommentReadState.d.ts +1343 -576
- package/dist/esm/internal-content-types/ContentCommentReadState.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ContentCommentReadState.js +3 -3
- package/dist/esm/internal-content-types/ContentReview.d.ts +3895 -1771
- 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 +1184 -535
- package/dist/esm/internal-content-types/ContentReviewDecision.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ContentReviewDecision.js +3 -3
- package/dist/esm/internal-content-types/ContentReviewPolicy.d.ts +446 -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 +197 -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 +316 -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 +89 -30
- package/dist/esm/internal-content-types/HelloWorld.d.ts.map +1 -1
- package/dist/esm/internal-content-types/HelloWorld.js +2 -2
- package/dist/esm/internal-content-types/Language.d.ts +98 -39
- package/dist/esm/internal-content-types/Language.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Language.js +2 -2
- package/dist/esm/internal-content-types/LiteralTranslation.d.ts +177 -59
- package/dist/esm/internal-content-types/LiteralTranslation.d.ts.map +1 -1
- package/dist/esm/internal-content-types/LiteralTranslation.js +2 -2
- package/dist/esm/internal-content-types/LoginIpBlock.d.ts +125 -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 +1256 -548
- package/dist/esm/internal-content-types/ManagerFavorite.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ManagerFavorite.js +3 -3
- package/dist/esm/internal-content-types/ManagerNotification.d.ts +2519 -1103
- package/dist/esm/internal-content-types/ManagerNotification.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ManagerNotification.js +3 -3
- package/dist/esm/internal-content-types/ManagerRole.d.ts +92 -33
- package/dist/esm/internal-content-types/ManagerRole.d.ts.map +1 -1
- 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 +507 -212
- package/dist/esm/internal-content-types/ManagerUser.d.ts.map +1 -1
- 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 +674 -261
- package/dist/esm/internal-content-types/Media.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Media.js +3 -3
- package/dist/esm/internal-content-types/MediaFolder.d.ts +265 -88
- package/dist/esm/internal-content-types/MediaFolder.d.ts.map +1 -1
- package/dist/esm/internal-content-types/MediaFolder.js +2 -2
- package/dist/esm/internal-content-types/MfaChallenge.d.ts +1220 -571
- 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 +251 -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 +262 -85
- package/dist/esm/internal-content-types/Page.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Page.js +3 -3
- package/dist/esm/internal-content-types/PasswordResetToken.d.ts +1184 -535
- package/dist/esm/internal-content-types/PasswordResetToken.d.ts.map +1 -1
- package/dist/esm/internal-content-types/PasswordResetToken.js +4 -4
- package/dist/esm/internal-content-types/PreviewSnapshot.d.ts +627 -214
- package/dist/esm/internal-content-types/PreviewSnapshot.d.ts.map +1 -1
- package/dist/esm/internal-content-types/PreviewSnapshot.js +2 -2
- package/dist/esm/internal-content-types/Redirect.d.ts +323 -146
- package/dist/esm/internal-content-types/Redirect.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Redirect.js +2 -2
- package/dist/esm/internal-content-types/RobotsRule.d.ts +221 -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 +300 -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 +459 -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 +438 -143
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.js +2 -2
- package/dist/esm/internal-content-types/RouteLocaleVariant.d.ts +524 -170
- package/dist/esm/internal-content-types/RouteLocaleVariant.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteLocaleVariant.js +2 -2
- package/dist/esm/internal-content-types/RouteMap.d.ts +439 -144
- package/dist/esm/internal-content-types/RouteMap.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteMap.js +2 -2
- package/dist/esm/internal-content-types/RouteSettings.d.ts +352 -116
- package/dist/esm/internal-content-types/RouteSettings.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteSettings.js +3 -3
- package/dist/esm/internal-content-types/SchemaState.d.ts +124 -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 +1163 -455
- package/dist/esm/internal-content-types/Seo.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Seo.js +2 -2
- package/dist/esm/internal-content-types/SeoSettings.d.ts +1491 -606
- package/dist/esm/internal-content-types/SeoSettings.d.ts.map +1 -1
- package/dist/esm/internal-content-types/SeoSettings.js +3 -3
- package/dist/esm/internal-content-types/Session.d.ts +1183 -534
- package/dist/esm/internal-content-types/Session.d.ts.map +1 -1
- 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 +1094 -504
- package/dist/esm/internal-content-types/UserMfa.d.ts.map +1 -1
- package/dist/esm/internal-content-types/UserMfa.js +4 -4
- package/dist/esm/internal-content-types/WebAuthnCredential.d.ts +1451 -625
- 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 +1271 -563
- package/dist/esm/internal-content-types/WebAuthnRegChallenge.d.ts.map +1 -1
- 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 +5 -1
- package/dist/esm/lib/fields/String.d.ts.map +1 -1
- package/dist/esm/lib/fields/String.js +27 -3
- package/dist/esm/lib/fields/String.js.map +1 -1
- 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 +40 -40
- package/dist/esm/schemas/web/page.js +1 -1
- package/dist/esm/schemas/web/previewPage.d.ts +28 -28
- package/dist/esm/schemas/web/previewPage.js +1 -1
- 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 +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { createField, defaultFieldState, withFieldModifiers, } from "./Field";
|
|
3
|
-
import { Id } from "../utils/id";
|
|
2
|
+
import { createField, defaultFieldState, withFieldModifiers, } from "./Field.js";
|
|
3
|
+
import { Id } from "../utils/id.js";
|
|
4
4
|
const internalLinkInputSchema = z.object({
|
|
5
5
|
routeId: Id,
|
|
6
6
|
contentTypeId: Id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { type AnyFieldLike, type DefaultFieldState, type EncodedField, type EncodedFieldUnknown, type FieldLike, type FieldState, type FieldWithModifiers, type InferDb, type InferOutput } from "./Field";
|
|
2
|
+
import { type AnyFieldLike, type DefaultFieldState, type EncodedField, type EncodedFieldUnknown, type FieldLike, type FieldState, type FieldWithModifiers, type InferDb, type InferOutput } from "./Field.js";
|
|
3
3
|
export type Entry<Name extends string = string, F extends AnyFieldLike = AnyFieldLike> = {
|
|
4
4
|
name: Name;
|
|
5
5
|
field: F;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { createField, defaultFieldState, withFieldModifiers, } from "./Field";
|
|
3
|
-
import { Id } from "../utils/id";
|
|
2
|
+
import { createField, defaultFieldState, withFieldModifiers, } from "./Field.js";
|
|
3
|
+
import { Id } from "../utils/id.js";
|
|
4
4
|
export const IteratorItemVisibilityConditionSchema = z.object({
|
|
5
5
|
field: z.string().trim().min(1),
|
|
6
6
|
operator: z.enum(["notEmpty", "empty"]),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EncodedField, type DefaultFieldState, type FieldLike, type FieldState, type FieldStateOf, type FieldWithModifiers } from "./Field";
|
|
1
|
+
import { type EncodedField, type DefaultFieldState, type FieldLike, type FieldState, type FieldStateOf, type FieldWithModifiers } from "./Field.js";
|
|
2
2
|
export type NumberMeta = {
|
|
3
3
|
type: "Number";
|
|
4
4
|
ui: "Number";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { createField, defaultFieldState, sameSchemas, withFieldModifiers, } from "./Field";
|
|
2
|
+
import { createField, defaultFieldState, sameSchemas, withFieldModifiers, } from "./Field.js";
|
|
3
3
|
export function numberField() {
|
|
4
4
|
return makeNumberField({}, defaultFieldState);
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { type EncodedField, type DefaultFieldState, type FieldLike, type FieldState, type FieldStateOf, type FieldWithModifiers, type PopulatableFieldLike, type SetRequired } from "./Field";
|
|
3
|
-
import type { EncodedContentType } from "../ContentType";
|
|
4
|
-
import { type SimpleListField } from "./SimpleList";
|
|
2
|
+
import { type EncodedField, type DefaultFieldState, type FieldLike, type FieldState, type FieldStateOf, type FieldWithModifiers, type PopulatableFieldLike, type SetRequired } from "./Field.js";
|
|
3
|
+
import type { EncodedContentType } from "../ContentType.js";
|
|
4
|
+
import { type SimpleListField } from "./SimpleList.js";
|
|
5
5
|
export type OnlyType = "existing" | "new" | undefined;
|
|
6
6
|
export type ContentTypeLike<Name extends string = string> = {
|
|
7
7
|
name: Name;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { createField, defaultFieldState, withFieldModifiers, } from "./Field";
|
|
3
|
-
import { simpleListField } from "./SimpleList";
|
|
4
|
-
import { Id } from "../utils/id";
|
|
2
|
+
import { createField, defaultFieldState, withFieldModifiers, } from "./Field.js";
|
|
3
|
+
import { simpleListField } from "./SimpleList.js";
|
|
4
|
+
import { Id } from "../utils/id.js";
|
|
5
5
|
export function relationField(contentType, only) {
|
|
6
6
|
return makeRelationField({ contentType, only }, defaultFieldState);
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EncodedField, type DefaultFieldState, type FieldLike, type FieldState, type FieldStateOf, type FieldWithModifiers } from "./Field";
|
|
1
|
+
import { type EncodedField, type DefaultFieldState, type FieldLike, type FieldState, type FieldStateOf, type FieldWithModifiers } from "./Field.js";
|
|
2
2
|
type SelectValue<Options extends readonly string[], Multiple extends boolean> = Multiple extends true ? Options[number][] : Options[number];
|
|
3
3
|
export type SelectMeta<Options extends readonly string[] = readonly string[], Multiple extends boolean = boolean> = {
|
|
4
4
|
type: "Select";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { createField, defaultFieldState, sameSchemas, withFieldModifiers, } from "./Field";
|
|
2
|
+
import { createField, defaultFieldState, sameSchemas, withFieldModifiers, } from "./Field.js";
|
|
3
3
|
export function selectField(options) {
|
|
4
4
|
return makeSelectField({ options, multiple: false }, defaultFieldState);
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EncodedField, type DefaultFieldState, type FieldLike, type FieldState, type FieldStateOf, type FieldWithModifiers } from "./Field";
|
|
1
|
+
import { type EncodedField, type DefaultFieldState, type FieldLike, type FieldState, type FieldStateOf, type FieldWithModifiers } from "./Field.js";
|
|
2
2
|
export type SelfRelationValue<Name extends string = string> = {
|
|
3
3
|
type: "self";
|
|
4
4
|
_id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { createField, defaultFieldState, sameSchemas, withFieldModifiers, } from "./Field";
|
|
3
|
-
import { Id } from "../utils/id";
|
|
2
|
+
import { createField, defaultFieldState, sameSchemas, withFieldModifiers, } from "./Field.js";
|
|
3
|
+
import { Id } from "../utils/id.js";
|
|
4
4
|
export function selfRelationField() {
|
|
5
5
|
return makeSelfRelationField({}, defaultFieldState);
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnyFieldLike, type DefaultFieldState, type EncodedField, type EncodedFieldUnknown, type FieldLike, type FieldState, type InferDb, type InferInput, type InferOutput, type InferPopulated, type PopulatableFieldLike, type FieldWithModifiers } from "./Field";
|
|
1
|
+
import { type AnyFieldLike, type DefaultFieldState, type EncodedField, type EncodedFieldUnknown, type FieldLike, type FieldState, type InferDb, type InferInput, type InferOutput, type InferPopulated, type PopulatableFieldLike, type FieldWithModifiers } from "./Field.js";
|
|
2
2
|
type SimpleListInput<F extends AnyFieldLike> = InferInput<F>[];
|
|
3
3
|
type SimpleListDb<F extends AnyFieldLike> = InferDb<F>[];
|
|
4
4
|
type SimpleListOutput<F extends AnyFieldLike> = InferOutput<F>[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { createField, defaultFieldState, withFieldModifiers, } from "./Field";
|
|
2
|
+
import { createField, defaultFieldState, withFieldModifiers, } from "./Field.js";
|
|
3
3
|
export function simpleListField(field) {
|
|
4
4
|
return makeSimpleListField(field, defaultFieldState);
|
|
5
5
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { type EncodedField, type DefaultFieldState, type FieldStateOf, type FieldLike, type FieldState, type FieldWithModifiers } from "./Field";
|
|
1
|
+
import { type EncodedField, type DefaultFieldState, type FieldStateOf, type FieldLike, type FieldState, type FieldWithModifiers } from "./Field.js";
|
|
2
2
|
export declare const stringUis: readonly ["Text", "Textarea", "RichText", "Email", "Slug", "Password", "Id", "Url"];
|
|
3
3
|
export type StringUI = (typeof stringUis)[number];
|
|
4
|
+
export declare const seoStringFields: readonly ["title", "description", "canonicalUrl", "imageAlt", "openGraphTitle", "openGraphDescription", "openGraphUrl", "openGraphSiteName", "openGraphImageAlt", "twitterTitle", "twitterDescription", "twitterImageAlt"];
|
|
5
|
+
export type SeoStringField = (typeof seoStringFields)[number];
|
|
4
6
|
type StringValue<Ui extends StringUI> = Ui extends "RichText" ? Record<string, unknown> : string;
|
|
5
7
|
export type StringMeta<Ui extends StringUI = StringUI> = {
|
|
6
8
|
type: "String";
|
|
7
9
|
ui: Ui;
|
|
8
10
|
minLength?: number;
|
|
9
11
|
maxLength?: number;
|
|
12
|
+
seo?: SeoStringField;
|
|
10
13
|
};
|
|
11
14
|
export type StringField<Ui extends StringUI = "Text", State extends FieldState = DefaultFieldState> = FieldWithModifiers<StringFieldCore<Ui, State>>;
|
|
12
15
|
type StringFieldCore<Ui extends StringUI, State extends FieldState> = StringFieldBase<Ui, State> & {
|
|
13
16
|
type: <TThis extends StringFieldBase<Ui, FieldState>, NextUi extends StringUI>(this: TThis, ui: NextUi) => StringField<NextUi, FieldStateOf<TThis>>;
|
|
14
17
|
min: <TThis extends StringFieldBase<Ui, FieldState>>(this: TThis, length: number) => StringField<Ui, FieldStateOf<TThis>>;
|
|
15
18
|
max: <TThis extends StringFieldBase<Ui, FieldState>>(this: TThis, length: number) => StringField<Ui, FieldStateOf<TThis>>;
|
|
19
|
+
seo: <TThis extends StringFieldBase<Ui, FieldState>>(this: Ui extends "RichText" ? never : TThis, field: SeoStringField) => StringField<Ui, FieldStateOf<TThis>>;
|
|
16
20
|
};
|
|
17
21
|
type StringFieldBase<Ui extends StringUI, State extends FieldState> = FieldLike<StringValue<Ui>, StringValue<Ui>, StringValue<Ui>, StringMeta<Ui>, State>;
|
|
18
22
|
export declare function stringField(): StringField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"String.d.ts","sourceRoot":"","sources":["../../../../src/lib/fields/String.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EAEjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,kBAAkB,EAGxB,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,SAAS,qFASZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD,KAAK,WAAW,CAAC,EAAE,SAAS,QAAQ,IAAI,EAAE,SAAS,UAAU,GACzD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,MAAM,CAAC;AAEX,MAAM,MAAM,UAAU,CAAC,EAAE,SAAS,QAAQ,GAAG,QAAQ,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,EAAE,CAAC;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"String.d.ts","sourceRoot":"","sources":["../../../../src/lib/fields/String.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EAEjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,kBAAkB,EAGxB,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,SAAS,qFASZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD,eAAO,MAAM,eAAe,4NAalB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,KAAK,WAAW,CAAC,EAAE,SAAS,QAAQ,IAAI,EAAE,SAAS,UAAU,GACzD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,MAAM,CAAC;AAEX,MAAM,MAAM,UAAU,CAAC,EAAE,SAAS,QAAQ,GAAG,QAAQ,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,EAAE,CAAC;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,cAAc,CAAC;CACtB,CAAC;AASF,MAAM,MAAM,WAAW,CACrB,EAAE,SAAS,QAAQ,GAAG,MAAM,EAC5B,KAAK,SAAS,UAAU,GAAG,iBAAiB,IAC1C,kBAAkB,CAAC,eAAe,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAEnD,KAAK,eAAe,CAClB,EAAE,SAAS,QAAQ,EACnB,KAAK,SAAS,UAAU,IACtB,eAAe,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG;IAC/B,IAAI,EAAE,CACJ,KAAK,SAAS,eAAe,CAAC,EAAE,EAAE,UAAU,CAAC,EAC7C,MAAM,SAAS,QAAQ,EAEvB,IAAI,EAAE,KAAK,EACX,EAAE,EAAE,MAAM,KACP,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,GAAG,EAAE,CAAC,KAAK,SAAS,eAAe,CAAC,EAAE,EAAE,UAAU,CAAC,EACjD,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,MAAM,KACX,WAAW,CAAC,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,GAAG,EAAE,CAAC,KAAK,SAAS,eAAe,CAAC,EAAE,EAAE,UAAU,CAAC,EACjD,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,MAAM,KACX,WAAW,CAAC,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,GAAG,EAAE,CAAC,KAAK,SAAS,eAAe,CAAC,EAAE,EAAE,UAAU,CAAC,EACjD,IAAI,EAAE,EAAE,SAAS,UAAU,GAAG,KAAK,GAAG,KAAK,EAC3C,KAAK,EAAE,cAAc,KAClB,WAAW,CAAC,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;CAC3C,CAAC;AAEF,KAAK,eAAe,CAClB,EAAE,SAAS,QAAQ,EACnB,KAAK,SAAS,UAAU,IACtB,SAAS,CACX,WAAW,CAAC,EAAE,CAAC,EACf,WAAW,CAAC,EAAE,CAAC,EACf,WAAW,CAAC,EAAE,CAAC,EACf,UAAU,CAAC,EAAE,CAAC,EACd,KAAK,CACN,CAAC;AAEF,wBAAgB,WAAW,IAAI,WAAW,CAEzC;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { createField, defaultFieldState, sameSchemas, withFieldModifiers, } from "./Field";
|
|
3
|
-
import { Id } from "../utils/id";
|
|
4
|
-
import { slugify } from "../utils/slugify";
|
|
2
|
+
import { createField, defaultFieldState, sameSchemas, withFieldModifiers, } from "./Field.js";
|
|
3
|
+
import { Id } from "../utils/id.js";
|
|
4
|
+
import { slugify } from "../utils/slugify.js";
|
|
5
5
|
export const stringUis = [
|
|
6
6
|
"Text",
|
|
7
7
|
"Textarea",
|
|
@@ -12,6 +12,20 @@ export const stringUis = [
|
|
|
12
12
|
"Id",
|
|
13
13
|
"Url",
|
|
14
14
|
];
|
|
15
|
+
export const seoStringFields = [
|
|
16
|
+
"title",
|
|
17
|
+
"description",
|
|
18
|
+
"canonicalUrl",
|
|
19
|
+
"imageAlt",
|
|
20
|
+
"openGraphTitle",
|
|
21
|
+
"openGraphDescription",
|
|
22
|
+
"openGraphUrl",
|
|
23
|
+
"openGraphSiteName",
|
|
24
|
+
"openGraphImageAlt",
|
|
25
|
+
"twitterTitle",
|
|
26
|
+
"twitterDescription",
|
|
27
|
+
"twitterImageAlt",
|
|
28
|
+
];
|
|
15
29
|
export function stringField() {
|
|
16
30
|
return makeStringField({ ui: "Text" }, defaultFieldState);
|
|
17
31
|
}
|
|
@@ -21,6 +35,7 @@ function makeStringField(options, state) {
|
|
|
21
35
|
ui: options.ui,
|
|
22
36
|
minLength: options.minLength,
|
|
23
37
|
maxLength: options.maxLength,
|
|
38
|
+
seo: options.seo,
|
|
24
39
|
};
|
|
25
40
|
const field = {
|
|
26
41
|
...createField({
|
|
@@ -29,6 +44,9 @@ function makeStringField(options, state) {
|
|
|
29
44
|
schemas: sameSchemas(() => buildStringSchema(options)),
|
|
30
45
|
}),
|
|
31
46
|
type: function (ui) {
|
|
47
|
+
if (ui === "RichText" && options.seo) {
|
|
48
|
+
throw new Error("RichText fields cannot initialize string SEO fields.");
|
|
49
|
+
}
|
|
32
50
|
return makeStringField({ ...options, ui }, this.state);
|
|
33
51
|
},
|
|
34
52
|
min: function (length) {
|
|
@@ -37,6 +55,12 @@ function makeStringField(options, state) {
|
|
|
37
55
|
max: function (length) {
|
|
38
56
|
return makeStringField({ ...options, maxLength: length }, this.state);
|
|
39
57
|
},
|
|
58
|
+
seo: function (seo) {
|
|
59
|
+
if (options.ui === "RichText") {
|
|
60
|
+
throw new Error("RichText fields cannot initialize string SEO fields.");
|
|
61
|
+
}
|
|
62
|
+
return makeStringField({ ...options, seo }, this.state);
|
|
63
|
+
},
|
|
40
64
|
};
|
|
41
65
|
return withFieldModifiers({
|
|
42
66
|
field,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"String.js","sourceRoot":"","sources":["../../../../src/lib/fields/String.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EACL,WAAW,EACX,iBAAiB,EAEjB,WAAW,EAOX,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;IACP,MAAM;IACN,UAAU;IACV,IAAI;IACJ,KAAK;CACG,CAAC;
|
|
1
|
+
{"version":3,"file":"String.js","sourceRoot":"","sources":["../../../../src/lib/fields/String.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EACL,WAAW,EACX,iBAAiB,EAEjB,WAAW,EAOX,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;IACP,MAAM;IACN,UAAU;IACV,IAAI;IACJ,KAAK;CACG,CAAC;AAIX,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,OAAO;IACP,aAAa;IACb,cAAc;IACd,UAAU;IACV,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,oBAAoB;IACpB,iBAAiB;CACT,CAAC;AAgEX,MAAM,UAAU,WAAW;IACzB,OAAO,eAAe,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC;AAC5D,CAAC;AAID,SAAS,eAAe,CACtB,OAA0B,EAC1B,KAAY;IAEZ,MAAM,IAAI,GAAG;QACX,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,GAAG,EAAE,OAAO,CAAC,GAAG;KACiB,CAAC;IAEpC,MAAM,KAAK,GAA+B;QACxC,GAAG,WAAW,CAAC;YACb,IAAI;YACJ,KAAK;YACL,OAAO,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;SACvD,CAAC;QACF,IAAI,EAAE,UAGS,EAAU;YACvB,IAAI,EAAE,KAAK,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;gBACrC,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;YAC1E,CAAC;YAED,OAAO,eAAe,CACpB,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,EAClB,IAAI,CAAC,KAA4B,CAClC,CAAC;QACJ,CAAC;QACD,GAAG,EAAE,UAEH,MAAc;YAEd,OAAO,eAAe,CACpB,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,EACjC,IAAI,CAAC,KAA4B,CAClC,CAAC;QACJ,CAAC;QACD,GAAG,EAAE,UAEH,MAAc;YAEd,OAAO,eAAe,CACpB,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,EACjC,IAAI,CAAC,KAA4B,CAClC,CAAC;QACJ,CAAC;QACD,GAAG,EAAE,UAEH,GAAmB;YAEnB,IAAI,OAAO,CAAC,EAAE,KAAK,UAAU,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;YAC1E,CAAC;YAED,OAAO,eAAe,CACpB,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,EACnB,IAAI,CAAC,KAA4B,CAClC,CAAC;QACJ,CAAC;KACF,CAAC;IAEF,OAAO,kBAAkB,CAAC;QACxB,KAAK;QACL,OAAO,EAAE,CAA+B,SAAoB,EAAE,EAAE,CAC9D,eAAe,CAAC,OAAO,EAAE,SAAS,CAGjC;KACJ,CAAC,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB,CACxB,OAA0B;IAE1B,IAAI,OAAO,CAAC,EAAE,KAAK,UAAU,EAAE,CAAC;QAC9B,OAAO,CAAC;aACL,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAEhC,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,GACR,OAAO,CAAC,EAAE,KAAK,OAAO;QACpB,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE;QACX,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,KAAK;YACpB,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE;YACT,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAEnB,IAAI,OAAO,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;QACxB,MAAM,GAAG,EAAE,CAAC;IACd,CAAC;IAED,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,OAAO,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC,SAAS,CAAC,OAAO,CAA0C,CAAC;IAC5E,CAAC;IAED,OAAO,MAA+C,CAAC;AACzD,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from "./Boolean";
|
|
2
|
-
export * from './Breadcrums';
|
|
3
|
-
export * from "./ContentReference";
|
|
4
|
-
export * from "./Date";
|
|
5
|
-
export * from "./Field";
|
|
6
|
-
export * from "./Fields";
|
|
7
|
-
export * from "./File";
|
|
8
|
-
export * from "./Iterator";
|
|
9
|
-
export * from "./Link";
|
|
10
|
-
export * from "./List";
|
|
11
|
-
export * from "./Number";
|
|
12
|
-
export * from "./Relation";
|
|
13
|
-
export * from "./Select";
|
|
14
|
-
export * from "./SelfRelation";
|
|
15
|
-
export * from "./SimpleList";
|
|
16
|
-
export * from "./String";
|
|
1
|
+
export * from "./Boolean.js";
|
|
2
|
+
export * from './Breadcrums.js';
|
|
3
|
+
export * from "./ContentReference.js";
|
|
4
|
+
export * from "./Date.js";
|
|
5
|
+
export * from "./Field.js";
|
|
6
|
+
export * from "./Fields.js";
|
|
7
|
+
export * from "./File.js";
|
|
8
|
+
export * from "./Iterator.js";
|
|
9
|
+
export * from "./Link.js";
|
|
10
|
+
export * from "./List.js";
|
|
11
|
+
export * from "./Number.js";
|
|
12
|
+
export * from "./Relation.js";
|
|
13
|
+
export * from "./Select.js";
|
|
14
|
+
export * from "./SelfRelation.js";
|
|
15
|
+
export * from "./SimpleList.js";
|
|
16
|
+
export * from "./String.js";
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from "./Boolean";
|
|
2
|
-
export * from './Breadcrums';
|
|
3
|
-
export * from "./ContentReference";
|
|
4
|
-
export * from "./Date";
|
|
5
|
-
export * from "./Field";
|
|
6
|
-
export * from "./Fields";
|
|
7
|
-
export * from "./File";
|
|
8
|
-
export * from "./Iterator";
|
|
9
|
-
export * from "./Link";
|
|
10
|
-
export * from "./List";
|
|
11
|
-
export * from "./Number";
|
|
12
|
-
export * from "./Relation";
|
|
13
|
-
export * from "./Select";
|
|
14
|
-
export * from "./SelfRelation";
|
|
15
|
-
export * from "./SimpleList";
|
|
16
|
-
export * from "./String";
|
|
1
|
+
export * from "./Boolean.js";
|
|
2
|
+
export * from './Breadcrums.js';
|
|
3
|
+
export * from "./ContentReference.js";
|
|
4
|
+
export * from "./Date.js";
|
|
5
|
+
export * from "./Field.js";
|
|
6
|
+
export * from "./Fields.js";
|
|
7
|
+
export * from "./File.js";
|
|
8
|
+
export * from "./Iterator.js";
|
|
9
|
+
export * from "./Link.js";
|
|
10
|
+
export * from "./List.js";
|
|
11
|
+
export * from "./Number.js";
|
|
12
|
+
export * from "./Relation.js";
|
|
13
|
+
export * from "./Select.js";
|
|
14
|
+
export * from "./SelfRelation.js";
|
|
15
|
+
export * from "./SimpleList.js";
|
|
16
|
+
export * from "./String.js";
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/lib/hooks.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type ContentType from "./ContentType";
|
|
2
|
-
import type { RakunRequestContext } from "../api/context";
|
|
3
|
-
import type { DBMutationOptions, DBService } from "../orm/dbService";
|
|
4
|
-
import type { BreadcrumsValue } from './fields/Breadcrums';
|
|
1
|
+
import type ContentType from "./ContentType.js";
|
|
2
|
+
import type { RakunRequestContext } from "../api/context.js";
|
|
3
|
+
import type { DBMutationOptions, DBService } from "../orm/dbService.js";
|
|
4
|
+
import type { BreadcrumsValue } from './fields/Breadcrums.js';
|
|
5
5
|
export type Awaitable<T> = T | Promise<T>;
|
|
6
6
|
export type ContentHookOperation = "insert" | "update" | "updateMany" | "delete" | "get";
|
|
7
7
|
export type ContentHookSurface = "db" | "web" | "preview";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRakunBootstrapOptions } from "../bootstrapState";
|
|
1
|
+
import { getRakunBootstrapOptions } from "../bootstrapState.js";
|
|
2
2
|
export const getRouteableFieldNames = (contentTypeName) => new Set((getRakunBootstrapOptions()?.routes ?? [])
|
|
3
3
|
.filter((route) => route.hasPage && route.contentType === contentTypeName)
|
|
4
4
|
.map((route) => route.field));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type z from "zod";
|
|
2
|
-
import type { Field } from "../fields/Field";
|
|
3
|
-
import ContentType from "../ContentType";
|
|
2
|
+
import type { Field } from "../fields/Field.js";
|
|
3
|
+
import ContentType from "../ContentType.js";
|
|
4
4
|
export type ExtractFieldType<F extends Field> = F;
|
|
5
5
|
export type getTranslatableType<S, TTranslatable extends boolean> = TTranslatable extends true ? z.ZodType<{
|
|
6
6
|
_tag: "Translatable";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import type { getTypeWithModifiers, Visibility, If, Extends, Or, getOutputTypeWithModifiers, getInputTypeWithModifiers } from "../types";
|
|
2
|
+
import type { getTypeWithModifiers, Visibility, If, Extends, Or, getOutputTypeWithModifiers, getInputTypeWithModifiers } from "../types/index.js";
|
|
3
3
|
export declare function getDefaultInputSchema<S extends z.ZodTypeAny, TRequired extends boolean, TTranslatable extends boolean>(baseSchema: S, isRequired: boolean, isTranslatable: boolean): getInputTypeWithModifiers<S, TRequired, TTranslatable>;
|
|
4
4
|
export declare function getDefaultSchema<S extends z.ZodTypeAny, TRequired extends boolean, TTranslatable extends boolean>(baseSchema: S, isRequired: boolean, isTranslatable: boolean): getTypeWithModifiers<S, TRequired, TTranslatable>;
|
|
5
5
|
export declare function getDefaultOutputSchema<S extends z.ZodTypeAny, TRequired extends boolean>(baseSchema: S, isRequired: boolean): getOutputTypeWithModifiers<S, TRequired>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LanguageSchema } from "../../internal-content-types";
|
|
2
|
-
import { MaybeTranslatableValue } from "../types";
|
|
1
|
+
import { LanguageSchema } from "../../internal-content-types/index.js";
|
|
2
|
+
import { MaybeTranslatableValue } from "../types/index.js";
|
|
3
3
|
export declare const getTranslation: <T>(object: MaybeTranslatableValue<T>, language: LanguageSchema, languageList: LanguageSchema[]) => T;
|
|
4
4
|
//# sourceMappingURL=getTranslation.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LanguageSchema } from "../../internal-content-types";
|
|
2
|
-
import { FlattenTranslate, MaybeTranslatableValue } from "../types";
|
|
1
|
+
import { LanguageSchema } from "../../internal-content-types/index.js";
|
|
2
|
+
import { FlattenTranslate, MaybeTranslatableValue } from "../types/index.js";
|
|
3
3
|
export declare const translateObject: <T extends Record<string, MaybeTranslatableValue<unknown>>>(obj: T, language: LanguageSchema, languages: LanguageSchema[]) => FlattenTranslate<T>;
|
|
4
4
|
//# sourceMappingURL=translateObject.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getTranslation } from "./getTranslation";
|
|
2
|
-
import { hasKeys } from "./hasKeys";
|
|
3
|
-
import { isTranslatableObject } from "./isTranslatableObject";
|
|
1
|
+
import { getTranslation } from "./getTranslation.js";
|
|
2
|
+
import { hasKeys } from "./hasKeys.js";
|
|
3
|
+
import { isTranslatableObject } from "./isTranslatableObject.js";
|
|
4
4
|
export const translateObject = (obj, language, languages) => {
|
|
5
5
|
return Object.fromEntries(Object.entries(obj).map(([key, value]) => {
|
|
6
6
|
if (isTranslatableObject(value)) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './icu';
|
|
2
|
-
export * from './definitions';
|
|
1
|
+
export * from './icu.js';
|
|
2
|
+
export * from './definitions.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './icu';
|
|
2
|
-
export * from './definitions';
|
|
1
|
+
export * from './icu.js';
|
|
2
|
+
export * from './definitions.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/mail/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { MailServiceConfig } from './mailService';
|
|
2
|
-
import { type MailService, type SendMailInput } from './mailService';
|
|
1
|
+
import type { MailServiceConfig } from './mailService.js';
|
|
2
|
+
import { type MailService, type SendMailInput } from './mailService.js';
|
|
3
3
|
export declare const createMailConnection: (config: MailServiceConfig) => void;
|
|
4
4
|
export declare const createMailService: (config: MailServiceConfig) => MailService;
|
|
5
5
|
export declare const getMailService: () => MailService;
|
|
6
6
|
export declare const hasMailService: () => boolean;
|
|
7
|
-
export declare const sendMail: (input: SendMailInput) => Promise<import("./adapters").MailSendResult>;
|
|
8
|
-
export * from './adapters';
|
|
9
|
-
export * from './mailService';
|
|
10
|
-
export * from './templates';
|
|
7
|
+
export declare const sendMail: (input: SendMailInput) => Promise<import("./adapters.js").MailSendResult>;
|
|
8
|
+
export * from './adapters.js';
|
|
9
|
+
export * from './mailService.js';
|
|
10
|
+
export * from './templates.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/mail/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createMailServiceFromAdapter } from './mailService';
|
|
2
|
-
import { getEventLogService, hasEventLogService } from '../eventLog';
|
|
1
|
+
import { createMailServiceFromAdapter } from './mailService.js';
|
|
2
|
+
import { getEventLogService, hasEventLogService } from '../eventLog/index.js';
|
|
3
3
|
let _mailService = null;
|
|
4
4
|
let _config = null;
|
|
5
5
|
export const createMailConnection = (config) => {
|
|
@@ -25,7 +25,7 @@ export const getMailService = () => {
|
|
|
25
25
|
};
|
|
26
26
|
export const hasMailService = () => Boolean(_mailService || _config);
|
|
27
27
|
export const sendMail = (input) => getMailService().send(input);
|
|
28
|
-
export * from './adapters';
|
|
29
|
-
export * from './mailService';
|
|
30
|
-
export * from './templates';
|
|
28
|
+
export * from './adapters.js';
|
|
29
|
+
export * from './mailService.js';
|
|
30
|
+
export * from './templates.js';
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MailAdapter, MailAddressInput, MailAddressListInput, MailAttachment, MailSendResult } from './adapters';
|
|
2
|
-
import type { EventLogService } from '../eventLog';
|
|
1
|
+
import type { MailAdapter, MailAddressInput, MailAddressListInput, MailAttachment, MailSendResult } from './adapters.js';
|
|
2
|
+
import type { EventLogService } from '../eventLog/index.js';
|
|
3
3
|
type MailErrorTag = 'MailError' | 'MailErrorInvalidData' | 'MailErrorSendFailed';
|
|
4
4
|
export declare class MailError extends Error {
|
|
5
5
|
readonly message: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getMailService } from './index';
|
|
2
|
-
import { MailErrorInvalidData } from './mailService';
|
|
1
|
+
import { getMailService } from './index.js';
|
|
2
|
+
import { MailErrorInvalidData } from './mailService.js';
|
|
3
3
|
export const defineMailTemplate = (template) => template;
|
|
4
4
|
export const createMailSender = ({ templates, service, }) => ({
|
|
5
5
|
async send(input) {
|
package/dist/esm/manager.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AnyRakunOperationContract, type RakunOperationHttpMethod, type RakunOperationKind } from "./api/operations/types";
|
|
2
|
-
import type { createManagerOperationContracts } from "./api/operations/manager-contract";
|
|
3
|
-
import { managerOperationManifest } from "./api/operations/manager-manifest";
|
|
1
|
+
import { type AnyRakunOperationContract, type RakunOperationHttpMethod, type RakunOperationKind } from "./api/operations/types.js";
|
|
2
|
+
import type { createManagerOperationContracts } from "./api/operations/manager-contract.js";
|
|
3
|
+
import { managerOperationManifest } from "./api/operations/manager-manifest.js";
|
|
4
4
|
export { managerOperationManifest };
|
|
5
5
|
export type ManagerOperationContracts = ReturnType<typeof createManagerOperationContracts>;
|
|
6
6
|
export type ManagerOperationDefinitions = ManagerOperationContracts;
|
package/dist/esm/manager.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { managerOperationManifest } from "./api/operations/manager-manifest";
|
|
1
|
+
import { managerOperationManifest } from "./api/operations/manager-manifest.js";
|
|
2
2
|
export { managerOperationManifest };
|
|
3
3
|
export const toManagerOperationPath = (name) => `/${name.split(".").join("/")}`;
|
|
4
4
|
export const getManagerOperationMeta = (name) => managerOperationManifest[name];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
-
import { FileOptimizeOptionsSchema, } from "../lib/fields/File";
|
|
3
|
-
import { requirePeerDependency } from "../lib/utils/peerDependencies";
|
|
2
|
+
import { FileOptimizeOptionsSchema, } from "../lib/fields/File.js";
|
|
3
|
+
import { requirePeerDependency } from "../lib/utils/peerDependencies.js";
|
|
4
4
|
const getSharp = () => {
|
|
5
5
|
const sharp = requirePeerDependency("sharp", "npm install sharp", "Rakun uses sharp to read image dimensions and optimize media uploads.");
|
|
6
6
|
return sharp.default ?? sharp;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MediaAccess, StorageAdapter } from "./adapters";
|
|
2
|
-
import { type MediaService } from "./mediaService";
|
|
1
|
+
import type { MediaAccess, StorageAdapter } from "./adapters/index.js";
|
|
2
|
+
import { type MediaService } from "./mediaService.js";
|
|
3
3
|
export type MediaServiceConfig = {
|
|
4
4
|
adapter: StorageAdapter;
|
|
5
5
|
defaultAccess?: MediaAccess;
|
|
@@ -9,6 +9,6 @@ export type MediaServiceConfig = {
|
|
|
9
9
|
export declare const createMediaConnection: (config: MediaServiceConfig) => void;
|
|
10
10
|
export declare function createMediaService(config: MediaServiceConfig): MediaService;
|
|
11
11
|
export declare function getMediaService(): MediaService;
|
|
12
|
-
export * from "./mediaService";
|
|
13
|
-
export * from "./adapters";
|
|
12
|
+
export * from "./mediaService.js";
|
|
13
|
+
export * from "./adapters/index.js";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/media/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createMediaServiceFromAdapter, } from "./mediaService";
|
|
1
|
+
import { createMediaServiceFromAdapter, } from "./mediaService.js";
|
|
2
2
|
let _mediaService;
|
|
3
3
|
let _config;
|
|
4
4
|
export const createMediaConnection = (config) => {
|
|
@@ -23,6 +23,6 @@ export function getMediaService() {
|
|
|
23
23
|
}
|
|
24
24
|
return _mediaService;
|
|
25
25
|
}
|
|
26
|
-
export * from "./mediaService";
|
|
27
|
-
export * from "./adapters";
|
|
26
|
+
export * from "./mediaService.js";
|
|
27
|
+
export * from "./adapters/index.js";
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MediaAccess, PresignedPut, StorageAdapter } from "./adapters";
|
|
1
|
+
import type { MediaAccess, PresignedPut, StorageAdapter } from "./adapters/index.js";
|
|
2
2
|
type MediaErrorTag = "MediaError" | "MediaErrorUnknown" | "MediaErrorInvalidData" | "MediaErrorNotFound";
|
|
3
3
|
export declare class MediaError extends Error {
|
|
4
4
|
readonly message: string;
|
package/dist/esm/orm/backups.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Backup, BackupDocument } from "../internal-content-types";
|
|
2
|
-
import { Logger } from "../lib/Logger";
|
|
3
|
-
import { getContentTypes } from "../lib/Registry";
|
|
4
|
-
import { parseId } from "./utils/parseId";
|
|
5
|
-
import { transformObjectIdsToStrings } from "./utils/transformObjectIdsToStrings";
|
|
1
|
+
import { Backup, BackupDocument } from "../internal-content-types/index.js";
|
|
2
|
+
import { Logger } from "../lib/Logger.js";
|
|
3
|
+
import { getContentTypes } from "../lib/Registry.js";
|
|
4
|
+
import { parseId } from "./utils/parseId.js";
|
|
5
|
+
import { transformObjectIdsToStrings } from "./utils/transformObjectIdsToStrings.js";
|
|
6
6
|
const BACKUPS = Backup.name;
|
|
7
7
|
const BACKUP_DOCUMENTS = BackupDocument.name;
|
|
8
8
|
const BACKUP_EXCLUDED_CONTENT_TYPES = new Set([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Backup, BackupDocument, ContentComment, ContentReview, ContentReviewDecision, ContentReviewPolicy, ContentVersion, ManagerNotification, Migration, PreviewSnapshot, SchemaState, } from "../internal-content-types";
|
|
2
|
-
import { getContentTypes } from "../lib/Registry";
|
|
3
|
-
import { getPersistedUniqueGroups } from "../lib/routeableContent";
|
|
4
|
-
import { EVENT_LOG_COLLECTION } from "../eventLog/mongo";
|
|
1
|
+
import { Backup, BackupDocument, ContentComment, ContentReview, ContentReviewDecision, ContentReviewPolicy, ContentVersion, ManagerNotification, Migration, PreviewSnapshot, SchemaState, } from "../internal-content-types/index.js";
|
|
2
|
+
import { getContentTypes } from "../lib/Registry.js";
|
|
3
|
+
import { getPersistedUniqueGroups } from "../lib/routeableContent.js";
|
|
4
|
+
import { EVENT_LOG_COLLECTION } from "../eventLog/mongo.js";
|
|
5
5
|
const LEGACY_INTERNAL_COLLECTIONS = [
|
|
6
6
|
["_rakun_backups", Backup.name],
|
|
7
7
|
["_rakun_backup_documents", BackupDocument.name],
|
package/dist/esm/orm/database.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { checkFailureCase, DbErrorUnknown } from './dbService';
|
|
2
|
-
import { createIndexes } from './createIndexes';
|
|
3
|
-
import { getMongoDB } from './mongodbPeer';
|
|
1
|
+
import { checkFailureCase, DbErrorUnknown } from './dbService.js';
|
|
2
|
+
import { createIndexes } from './createIndexes.js';
|
|
3
|
+
import { getMongoDB } from './mongodbPeer.js';
|
|
4
4
|
const connections = new Map();
|
|
5
5
|
let currentUri = null;
|
|
6
6
|
const getConnection = (uri) => {
|