@rakun-kit/core 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/bootstrapState.js.map +1 -1
- package/dist/cjs/client.js +3 -2
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/index.js +0 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/ContentType.js +106 -74
- package/dist/cjs/lib/ContentType.js.map +1 -1
- package/dist/cjs/lib/Logger.js +56 -0
- package/dist/cjs/lib/Logger.js.map +1 -1
- package/dist/cjs/lib/Registry.js +35 -22
- package/dist/cjs/lib/Registry.js.map +1 -1
- package/dist/cjs/lib/fields/Boolean.js +14 -9
- package/dist/cjs/lib/fields/Boolean.js.map +1 -1
- package/dist/cjs/lib/fields/ContentReference.js +29 -17
- package/dist/cjs/lib/fields/ContentReference.js.map +1 -1
- package/dist/cjs/lib/fields/Date.js +26 -22
- package/dist/cjs/lib/fields/Date.js.map +1 -1
- package/dist/cjs/lib/fields/Field.js +79 -59
- package/dist/cjs/lib/fields/Field.js.map +1 -1
- package/dist/cjs/lib/fields/Fields.js +32 -0
- package/dist/cjs/lib/fields/Fields.js.map +1 -0
- package/dist/cjs/lib/fields/File.js +60 -85
- package/dist/cjs/lib/fields/File.js.map +1 -1
- package/dist/cjs/lib/fields/Iterator.js +8 -10
- package/dist/cjs/lib/fields/Iterator.js.map +1 -1
- package/dist/cjs/lib/fields/Link.js +20 -15
- package/dist/cjs/lib/fields/Link.js.map +1 -1
- package/dist/cjs/lib/fields/List.js +47 -16
- package/dist/cjs/lib/fields/List.js.map +1 -1
- package/dist/cjs/lib/fields/Number.js +35 -17
- package/dist/cjs/lib/fields/Number.js.map +1 -1
- package/dist/cjs/lib/fields/Relation.js +73 -66
- package/dist/cjs/lib/fields/Relation.js.map +1 -1
- package/dist/cjs/lib/fields/Select.js +28 -17
- package/dist/cjs/lib/fields/Select.js.map +1 -1
- package/dist/cjs/lib/fields/SelfRelation.js +30 -21
- package/dist/cjs/lib/fields/SelfRelation.js.map +1 -1
- package/dist/cjs/lib/fields/SimpleList.js +38 -21
- package/dist/cjs/lib/fields/SimpleList.js.map +1 -1
- package/dist/cjs/lib/fields/String.js +54 -40
- package/dist/cjs/lib/fields/String.js.map +1 -1
- package/dist/cjs/lib/fields/index.js +29 -37
- package/dist/cjs/lib/fields/index.js.map +1 -1
- package/dist/cjs/orm/operations/findDependencies.js +4 -2
- package/dist/cjs/orm/operations/findDependencies.js.map +1 -1
- package/dist/esm/api/context.d.ts +1 -1
- package/dist/esm/api/context.js +2 -2
- 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 +56 -57
- package/dist/esm/api/operations/index.d.ts.map +1 -1
- package/dist/esm/api/operations/index.js +7 -7
- package/dist/esm/api/operations/manager-contract.d.ts +37 -36
- package/dist/esm/api/operations/manager-contract.d.ts.map +1 -1
- package/dist/esm/api/operations/manager-contract.js +4 -4
- package/dist/esm/api/operations/manager.d.ts +38 -37
- package/dist/esm/api/operations/manager.d.ts.map +1 -1
- package/dist/esm/api/operations/manager.js +35 -35
- package/dist/esm/api/operations/types.d.ts +1 -1
- package/dist/esm/api/operations/web-contract.d.ts +11 -13
- package/dist/esm/api/operations/web-contract.d.ts.map +1 -1
- package/dist/esm/api/operations/web-contract.js +3 -3
- package/dist/esm/api/operations/web.d.ts +12 -14
- package/dist/esm/api/operations/web.d.ts.map +1 -1
- package/dist/esm/api/operations/web.js +5 -5
- package/dist/esm/api/proxies/context.d.ts +2 -2
- package/dist/esm/api/proxies/index.d.ts +9 -5
- package/dist/esm/api/proxies/index.d.ts.map +1 -1
- package/dist/esm/api/proxies/index.js +1 -1
- 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/login.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/login.js +4 -4
- 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/totp/confirmTotp.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/totp/confirmTotp.js +2 -2
- 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 +3 -3
- package/dist/esm/api/routes/manager/auth/updatePassword.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/updatePassword.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 +4 -4
- 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 +4 -4
- package/dist/esm/api/routes/manager/create.d.ts +2 -2
- package/dist/esm/api/routes/manager/create.js +8 -8
- package/dist/esm/api/routes/manager/delete.d.ts +2 -2
- package/dist/esm/api/routes/manager/delete.js +8 -8
- package/dist/esm/api/routes/manager/get.d.ts +2 -2
- package/dist/esm/api/routes/manager/get.js +6 -6
- package/dist/esm/api/routes/manager/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/list.js +8 -8
- 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/media/createFolder.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/createFolder.js +7 -7
- package/dist/esm/api/routes/manager/media/finalizeUpload.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/finalizeUpload.js +9 -9
- package/dist/esm/api/routes/manager/media/getMediaUrl.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/getMediaUrl.js +3 -3
- 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 +2 -2
- package/dist/esm/api/routes/manager/media/prepareUpload.js +4 -4
- package/dist/esm/api/routes/manager/media/uploadBinary.d.ts +1 -1
- package/dist/esm/api/routes/manager/media/uploadBinary.js +6 -6
- package/dist/esm/api/routes/manager/setDefaultLanguage.d.ts +2 -2
- package/dist/esm/api/routes/manager/setDefaultLanguage.js +4 -4
- package/dist/esm/api/routes/manager/update.d.ts +2 -2
- package/dist/esm/api/routes/manager/update.js +8 -8
- package/dist/esm/api/routes/web/page.d.ts +1 -1
- package/dist/esm/api/routes/web/page.js +13 -13
- package/dist/esm/api/sessionCookie.d.ts +1 -1
- 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 +3 -3
- package/dist/esm/api/utils/checkPermissions.d.ts +2 -2
- package/dist/esm/api/utils/checkPermissions.js +2 -2
- package/dist/esm/api/utils/getLanguages.d.ts +2 -6
- package/dist/esm/api/utils/getLanguages.d.ts.map +1 -1
- 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 +4 -4
- package/dist/esm/api/utils/getUser.d.ts +7 -3
- package/dist/esm/api/utils/getUser.d.ts.map +1 -1
- package/dist/esm/api/utils/getUser.js +4 -4
- 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 +4 -4
- package/dist/esm/api/utils/populates/populateRelations.d.ts +2 -2
- package/dist/esm/api/utils/populates/populateRelations.js +6 -6
- package/dist/esm/api/utils/redirects/resolveRedirect.js +2 -2
- 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 +3 -3
- package/dist/esm/api/utils/routes/routeMapHelpers.js +6 -6
- 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 +4 -4
- 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/bootstrapState.d.ts +11 -10
- package/dist/esm/bootstrapState.d.ts.map +1 -1
- package/dist/esm/bootstrapState.js.map +1 -1
- package/dist/esm/client.d.ts +34 -34
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +25 -25
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/contracts.d.ts +26 -26
- package/dist/esm/contracts.js +26 -26
- package/dist/esm/index.d.ts +29 -43
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +25 -39
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal-content-types/HelloWorld.d.ts +55 -3
- 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 +70 -6
- 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 +109 -5
- 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/ManagerRole.d.ts +56 -4
- package/dist/esm/internal-content-types/ManagerRole.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ManagerRole.js +3 -3
- package/dist/esm/internal-content-types/ManagerUser.d.ts +350 -21
- 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/Media.d.ts +472 -55
- 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 +163 -7
- 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 +963 -55
- 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/Page.d.ts +243 -27
- 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/Redirect.d.ts +272 -14
- 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/Route.d.ts +282 -11
- 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 +308 -9
- 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 +268 -8
- 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/RouteMap.d.ts +267 -7
- 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 +299 -79
- 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/Seo.d.ts +56 -4
- 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/Session.d.ts +894 -51
- 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/UserMfa.d.ts +831 -54
- package/dist/esm/internal-content-types/UserMfa.d.ts.map +1 -1
- package/dist/esm/internal-content-types/UserMfa.js +3 -3
- package/dist/esm/internal-content-types/WebAuthnCredential.d.ts +1066 -54
- 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 +948 -53
- 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 +20 -20
- package/dist/esm/internal-content-types/index.js +20 -20
- package/dist/esm/lib/ContentType.d.ts +87 -49
- package/dist/esm/lib/ContentType.d.ts.map +1 -1
- package/dist/esm/lib/ContentType.js +94 -65
- package/dist/esm/lib/ContentType.js.map +1 -1
- package/dist/esm/lib/Logger.d.ts.map +1 -1
- package/dist/esm/lib/Logger.js +56 -0
- package/dist/esm/lib/Logger.js.map +1 -1
- package/dist/esm/lib/Permissions.d.ts +1 -1
- package/dist/esm/lib/Registry.d.ts +29 -7
- package/dist/esm/lib/Registry.d.ts.map +1 -1
- package/dist/esm/lib/Registry.js +35 -22
- package/dist/esm/lib/Registry.js.map +1 -1
- 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 +8 -10
- package/dist/esm/lib/fields/Boolean.d.ts.map +1 -1
- package/dist/esm/lib/fields/Boolean.js +14 -8
- package/dist/esm/lib/fields/Boolean.js.map +1 -1
- package/dist/esm/lib/fields/ContentReference.d.ts +15 -15
- package/dist/esm/lib/fields/ContentReference.d.ts.map +1 -1
- package/dist/esm/lib/fields/ContentReference.js +30 -17
- package/dist/esm/lib/fields/ContentReference.js.map +1 -1
- package/dist/esm/lib/fields/Date.d.ts +14 -17
- package/dist/esm/lib/fields/Date.d.ts.map +1 -1
- package/dist/esm/lib/fields/Date.js +25 -21
- package/dist/esm/lib/fields/Date.js.map +1 -1
- package/dist/esm/lib/fields/Field.d.ts +122 -59
- package/dist/esm/lib/fields/Field.d.ts.map +1 -1
- package/dist/esm/lib/fields/Field.js +70 -55
- package/dist/esm/lib/fields/Field.js.map +1 -1
- package/dist/esm/lib/fields/Fields.d.ts +29 -0
- package/dist/esm/lib/fields/Fields.d.ts.map +1 -0
- package/dist/esm/lib/fields/Fields.js +29 -0
- package/dist/esm/lib/fields/Fields.js.map +1 -0
- package/dist/esm/lib/fields/File.d.ts +26 -51
- package/dist/esm/lib/fields/File.d.ts.map +1 -1
- package/dist/esm/lib/fields/File.js +60 -85
- package/dist/esm/lib/fields/File.js.map +1 -1
- package/dist/esm/lib/fields/Iterator.d.ts +13 -25
- package/dist/esm/lib/fields/Iterator.d.ts.map +1 -1
- package/dist/esm/lib/fields/Iterator.js +9 -10
- package/dist/esm/lib/fields/Iterator.js.map +1 -1
- package/dist/esm/lib/fields/Link.d.ts +13 -15
- package/dist/esm/lib/fields/Link.d.ts.map +1 -1
- package/dist/esm/lib/fields/Link.js +21 -15
- package/dist/esm/lib/fields/Link.js.map +1 -1
- package/dist/esm/lib/fields/List.d.ts +34 -34
- package/dist/esm/lib/fields/List.d.ts.map +1 -1
- package/dist/esm/lib/fields/List.js +46 -15
- package/dist/esm/lib/fields/List.js.map +1 -1
- package/dist/esm/lib/fields/Number.d.ts +12 -12
- package/dist/esm/lib/fields/Number.d.ts.map +1 -1
- package/dist/esm/lib/fields/Number.js +35 -16
- package/dist/esm/lib/fields/Number.js.map +1 -1
- package/dist/esm/lib/fields/Relation.d.ts +45 -39
- package/dist/esm/lib/fields/Relation.d.ts.map +1 -1
- package/dist/esm/lib/fields/Relation.js +75 -67
- package/dist/esm/lib/fields/Relation.js.map +1 -1
- package/dist/esm/lib/fields/Select.d.ts +14 -13
- package/dist/esm/lib/fields/Select.d.ts.map +1 -1
- package/dist/esm/lib/fields/Select.js +28 -16
- package/dist/esm/lib/fields/Select.js.map +1 -1
- package/dist/esm/lib/fields/SelfRelation.d.ts +19 -18
- package/dist/esm/lib/fields/SelfRelation.d.ts.map +1 -1
- package/dist/esm/lib/fields/SelfRelation.js +31 -21
- package/dist/esm/lib/fields/SelfRelation.js.map +1 -1
- package/dist/esm/lib/fields/SimpleList.d.ts +16 -20
- package/dist/esm/lib/fields/SimpleList.d.ts.map +1 -1
- package/dist/esm/lib/fields/SimpleList.js +38 -20
- package/dist/esm/lib/fields/SimpleList.js.map +1 -1
- package/dist/esm/lib/fields/String.d.ts +18 -25
- package/dist/esm/lib/fields/String.d.ts.map +1 -1
- package/dist/esm/lib/fields/String.js +55 -41
- package/dist/esm/lib/fields/String.js.map +1 -1
- package/dist/esm/lib/fields/index.d.ts +15 -83
- package/dist/esm/lib/fields/index.d.ts.map +1 -1
- package/dist/esm/lib/fields/index.js +15 -36
- package/dist/esm/lib/fields/index.js.map +1 -1
- package/dist/esm/lib/types/index.d.ts +8 -4
- package/dist/esm/lib/types/index.d.ts.map +1 -1
- 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 +3 -3
- package/dist/esm/literals/index.js +3 -3
- package/dist/esm/literals/manager.d.ts +1 -1
- package/dist/esm/literals/manager.js +1 -1
- package/dist/esm/manager.d.ts +152 -148
- package/dist/esm/manager.d.ts.map +1 -1
- package/dist/esm/manager.js +2 -2
- 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/createIndexes.js +1 -1
- package/dist/esm/orm/database.js +3 -3
- package/dist/esm/orm/dbService.d.ts +3 -3
- package/dist/esm/orm/index.d.ts +2 -2
- package/dist/esm/orm/index.js +12 -12
- package/dist/esm/orm/mongodbPeer.js +1 -1
- package/dist/esm/orm/operations/clear.d.ts +1 -1
- package/dist/esm/orm/operations/clear.js +1 -1
- package/dist/esm/orm/operations/create.d.ts +2 -2
- package/dist/esm/orm/operations/create.js +4 -4
- package/dist/esm/orm/operations/delete.d.ts +2 -2
- package/dist/esm/orm/operations/delete.js +2 -2
- 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.d.ts.map +1 -1
- package/dist/esm/orm/operations/findDependencies.js +8 -6
- package/dist/esm/orm/operations/findDependencies.js.map +1 -1
- 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 +3 -3
- package/dist/esm/orm/operations/update.js +5 -5
- package/dist/esm/orm/operations/updateMany.d.ts +2 -2
- package/dist/esm/orm/operations/updateMany.js +3 -3
- package/dist/esm/orm/operations/upsert.d.ts +2 -2
- 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 +2 -2
- package/dist/esm/orm/utils/parseId.d.ts.map +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/schemas/manager/literals/upsert.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/web/page.d.ts +66 -18
- package/dist/esm/schemas/web/page.d.ts.map +1 -1
- package/dist/esm/schemas/web/page.js +1 -1
- package/dist/esm/web/index.d.ts +1 -1
- package/dist/esm/web/index.js +1 -1
- package/dist/esm/web/page.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-contract.d.ts","sourceRoot":"","sources":["../../../../src/api/operations/web-contract.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"web-contract.d.ts","sourceRoot":"","sources":["../../../../src/api/operations/web-contract.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBA,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { defineOperationContract } from "./types
|
|
3
|
-
import { Language } from "../../internal-content-types
|
|
4
|
-
import { pageInput, pageOutput } from "../../contracts
|
|
2
|
+
import { defineOperationContract } from "./types";
|
|
3
|
+
import { Language } from "../../internal-content-types";
|
|
4
|
+
import { pageInput, pageOutput } from "../../contracts";
|
|
5
5
|
export const createWebOperationContracts = () => ({
|
|
6
6
|
"web.languages": defineOperationContract({
|
|
7
7
|
access: "public",
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
export declare const createWebOperationDefinitions: () => {
|
|
2
|
-
"web.languages": import("./types
|
|
2
|
+
"web.languages": import("./types").RakunOperationWithoutInput<{
|
|
3
3
|
code: string;
|
|
4
4
|
name: string;
|
|
5
5
|
default: boolean;
|
|
6
6
|
_type: "Language";
|
|
7
7
|
_id: string;
|
|
8
|
-
parent?:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
contentType: string;
|
|
12
|
-
} | undefined;
|
|
8
|
+
parent?: import("../..").SelfRelationValue<string> | undefined;
|
|
9
|
+
createdAt?: Date | undefined;
|
|
10
|
+
updatedAt?: Date | undefined;
|
|
13
11
|
}[], "query", "get", "public">;
|
|
14
|
-
"web.page": import("./types
|
|
12
|
+
"web.page": import("./types").RakunOperationWithInput<{
|
|
15
13
|
path: string;
|
|
16
14
|
search?: string | undefined;
|
|
17
15
|
headers?: Record<string, string> | undefined;
|
|
@@ -44,6 +42,8 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
44
42
|
_id: string;
|
|
45
43
|
title?: string | undefined;
|
|
46
44
|
description?: string | undefined;
|
|
45
|
+
createdAt?: Date | undefined;
|
|
46
|
+
updatedAt?: Date | undefined;
|
|
47
47
|
} | undefined;
|
|
48
48
|
language?: {
|
|
49
49
|
code: string;
|
|
@@ -51,11 +51,9 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
51
51
|
default: boolean;
|
|
52
52
|
_type: "Language";
|
|
53
53
|
_id: string;
|
|
54
|
-
parent?:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
contentType: string;
|
|
58
|
-
} | undefined;
|
|
54
|
+
parent?: import("../..").SelfRelationValue<string> | undefined;
|
|
55
|
+
createdAt?: Date | undefined;
|
|
56
|
+
updatedAt?: Date | undefined;
|
|
59
57
|
} | undefined;
|
|
60
58
|
info?: Record<string, unknown> | undefined;
|
|
61
59
|
redirect?: {
|
|
@@ -63,8 +61,8 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
63
61
|
status: number;
|
|
64
62
|
} | undefined;
|
|
65
63
|
}, "query", "get", "public">;
|
|
66
|
-
"web.test": import("./types
|
|
64
|
+
"web.test": import("./types").RakunOperationWithoutInput<{
|
|
67
65
|
ok: boolean;
|
|
68
66
|
}, "query", "get", "public">;
|
|
69
|
-
} & import("./types
|
|
67
|
+
} & import("./types").RakunOperationMap;
|
|
70
68
|
//# sourceMappingURL=web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../../src/api/operations/web.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../../src/api/operations/web.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAsBzC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { mergeOperationContracts } from "./types
|
|
2
|
-
import { createWebOperationContracts } from "./web-contract
|
|
3
|
-
import { getCustomApiOperationDefinitions, mergeOperationMaps, } from "./custom
|
|
4
|
-
import { getLanguages } from "../utils/getLanguages
|
|
5
|
-
import { getPage } from "../routes/web/page
|
|
1
|
+
import { mergeOperationContracts } from "./types";
|
|
2
|
+
import { createWebOperationContracts } from "./web-contract";
|
|
3
|
+
import { getCustomApiOperationDefinitions, mergeOperationMaps, } from "./custom";
|
|
4
|
+
import { getLanguages } from "../utils/getLanguages";
|
|
5
|
+
import { getPage } from "../routes/web/page";
|
|
6
6
|
const getStringHeaders = (headers) => {
|
|
7
7
|
const values = Object.entries(headers).flatMap(([key, value]) => {
|
|
8
8
|
if (typeof value === "string") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { FlattenTranslate } from "../../lib/types
|
|
3
|
-
import { RouteDefinition } from "../utils/routes/routeDefinitions
|
|
2
|
+
import { FlattenTranslate } from "../../lib/types";
|
|
3
|
+
import { RouteDefinition } from "../utils/routes/routeDefinitions";
|
|
4
4
|
type RouteWithInfo = RouteDefinition & {
|
|
5
5
|
infoSchema: z.ZodTypeAny;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ContentType from "../../lib/ContentType
|
|
2
|
-
import { DataInput, DataPopulatedWithoutApiOnly, DataFront, DataPopulated } from "../../lib/types
|
|
3
|
-
export type InputProxy<T extends ContentType> =
|
|
1
|
+
import ContentType from "../../lib/ContentType";
|
|
2
|
+
import { DataInput, DataPopulatedWithoutApiOnly, DataFront, DataPopulated } from "../../lib/types";
|
|
3
|
+
export type InputProxy<T extends ContentType> = <D extends Partial<DataInput<T>>>(data: D) => D | Promise<D>;
|
|
4
4
|
export type OutputProxy<T extends ContentType> = (data: DataPopulatedWithoutApiOnly<T>) => DataFront<T> | Promise<DataFront<T>>;
|
|
5
5
|
export type ApiProxies = {
|
|
6
6
|
input?: Record<string, InputProxy<ContentType>>;
|
|
@@ -9,8 +9,12 @@ export type ApiProxies = {
|
|
|
9
9
|
export declare const getInputProxy: (contentTypeName: string) => InputProxy<ContentType> | undefined;
|
|
10
10
|
export declare const getOutputProxy: (contentTypeName: string) => OutputProxy<ContentType> | undefined;
|
|
11
11
|
export declare const getProxies: () => {
|
|
12
|
-
input: Record<string, InputProxy<ContentType<
|
|
13
|
-
|
|
12
|
+
input: Record<string, InputProxy<ContentType<{
|
|
13
|
+
[x: string]: import("../..").AnyField;
|
|
14
|
+
}, string>>>;
|
|
15
|
+
output: Record<string, OutputProxy<ContentType<{
|
|
16
|
+
[x: string]: import("../..").AnyField;
|
|
17
|
+
}, string>>>;
|
|
14
18
|
};
|
|
15
19
|
export declare const ProxyOutput: (item: DataPopulated<ContentType>) => {
|
|
16
20
|
[x: string]: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/proxies/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,SAAS,EACT,2BAA2B,EAC3B,SAAS,EACT,aAAa,EACd,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,WAAW,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/proxies/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,SAAS,EACT,2BAA2B,EAC3B,SAAS,EACT,aAAa,EACd,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,CAAC,SAAS,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC9E,IAAI,EAAE,CAAC,KACJ,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpB,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,WAAW,IAAI,CAC/C,IAAI,EAAE,2BAA2B,CAAC,CAAC,CAAC,KACjC,SAAS,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,iBAAiB,MAAM,KAE/C,UAAU,CAAC,WAAW,CAAC,GACvB,SACL,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,iBAAiB,MAAM,KAEhD,WAAW,CAAC,WAAW,CAAC,GACxB,SACL,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;CAGrB,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,MAAM,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;EAM3D,CAAC"}
|
|
@@ -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,8 +1,8 @@
|
|
|
1
1
|
import { randomBytes } from "crypto";
|
|
2
|
-
import { ManagerUser, UserMfa, MfaChallenge, Session, } from "../../../../internal-content-types
|
|
3
|
-
import { throwAppError } from "../../../../lib/errors
|
|
4
|
-
import { getMongoService } from "../../../../orm
|
|
5
|
-
import { verifyPassword } from "../../../utils/passwords
|
|
2
|
+
import { ManagerUser, UserMfa, MfaChallenge, Session, } from "../../../../internal-content-types";
|
|
3
|
+
import { throwAppError } from "../../../../lib/errors";
|
|
4
|
+
import { getMongoService } from "../../../../orm";
|
|
5
|
+
import { verifyPassword } from "../../../utils/passwords";
|
|
6
6
|
export const loginHandler = async ({ input, }) => {
|
|
7
7
|
const { username, password } = input;
|
|
8
8
|
const db = await getMongoService();
|
|
@@ -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 { 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,5 +1,5 @@
|
|
|
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
4
|
export const confirmTotpHandler = async ({ input, ctx, }) => {
|
|
5
5
|
const db = await getMongoService();
|
|
@@ -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,7 +1,7 @@
|
|
|
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
|
|
2
|
+
import { MfaChallenge, ManagerUser, UserMfa, Session, } from "../../../../../internal-content-types";
|
|
3
|
+
import { throwAppError } from "../../../../../lib/errors";
|
|
4
|
+
import { getMongoService } from "../../../../../orm";
|
|
5
5
|
export const verifyTotpHandler = async ({ input, }) => {
|
|
6
6
|
const db = await getMongoService();
|
|
7
7
|
const { challenge, code } = input;
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ManagerUser } from "../../../../internal-content-types
|
|
2
|
-
import { getMongoService } from "../../../../orm
|
|
3
|
-
import { verifyPassword, hashPassword } from "../../../utils/passwords
|
|
1
|
+
import { ManagerUser } from "../../../../internal-content-types";
|
|
2
|
+
import { getMongoService } from "../../../../orm";
|
|
3
|
+
import { verifyPassword, hashPassword } from "../../../utils/passwords";
|
|
4
4
|
export const updatePasswordHandler = async ({ input, ctx, }) => {
|
|
5
5
|
const db = await getMongoService();
|
|
6
6
|
const user = ctx.getUser();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { generateAuthenticationOptions } from "@simplewebauthn/server";
|
|
2
|
-
import { MfaChallenge, WebAuthnCredential, } from "../../../../../internal-content-types
|
|
3
|
-
import { throwAppError } from "../../../../../lib/errors
|
|
4
|
-
import { getMongoService } from "../../../../../orm
|
|
5
|
-
import { RP_ID, toBase64URL } from "./share
|
|
2
|
+
import { MfaChallenge, WebAuthnCredential, } from "../../../../../internal-content-types";
|
|
3
|
+
import { throwAppError } from "../../../../../lib/errors";
|
|
4
|
+
import { getMongoService } from "../../../../../orm";
|
|
5
|
+
import { RP_ID, toBase64URL } from "./share";
|
|
6
6
|
export const webauthnAuthOptionsHandler = async ({ input, }) => {
|
|
7
7
|
const db = await getMongoService();
|
|
8
8
|
const ch = await db.find(MfaChallenge, { token: input.challengeToken });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { verifyAuthenticationResponse, } from "@simplewebauthn/server";
|
|
2
|
-
import { ORIGIN, RP_ID, toBase64URL } from "./share
|
|
3
|
-
import { MfaChallenge, WebAuthnCredential, ManagerUser, Session, } from "../../../../../internal-content-types
|
|
4
|
-
import { throwAppError } from "../../../../../lib/errors
|
|
5
|
-
import { getMongoService } from "../../../../../orm
|
|
2
|
+
import { ORIGIN, RP_ID, toBase64URL } from "./share";
|
|
3
|
+
import { MfaChallenge, WebAuthnCredential, ManagerUser, Session, } from "../../../../../internal-content-types";
|
|
4
|
+
import { throwAppError } from "../../../../../lib/errors";
|
|
5
|
+
import { getMongoService } from "../../../../../orm";
|
|
6
6
|
export const webauthnAuthVerifyHandler = async ({ input, }) => {
|
|
7
7
|
const db = await getMongoService();
|
|
8
8
|
const ch = await db.find(MfaChallenge, { token: input.challengeToken });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../../context
|
|
2
|
-
import { WebauthnRegisterOptionsInput } from "../../../../../schemas/manager/auth/webauthn/webauthnRegisterOptions
|
|
1
|
+
import { RakunRequestContext } from "../../../../context";
|
|
2
|
+
import { WebauthnRegisterOptionsInput } from "../../../../../schemas/manager/auth/webauthn/webauthnRegisterOptions";
|
|
3
3
|
export declare const webauthnRegisterOptionsHandler: ({ ctx, input, }: {
|
|
4
4
|
ctx: RakunRequestContext;
|
|
5
5
|
input: WebauthnRegisterOptionsInput;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { randomBytes } from "crypto";
|
|
2
2
|
import { generateRegistrationOptions } from "@simplewebauthn/server";
|
|
3
|
-
import { RP_ID, toBase64URL } from "./share
|
|
4
|
-
import { WebAuthnCredential, WebAuthnRegChallenge, ManagerUser, } from "../../../../../internal-content-types
|
|
5
|
-
import { getMongoService } from "../../../../../orm
|
|
3
|
+
import { RP_ID, toBase64URL } from "./share";
|
|
4
|
+
import { WebAuthnCredential, WebAuthnRegChallenge, ManagerUser, } from "../../../../../internal-content-types";
|
|
5
|
+
import { getMongoService } from "../../../../../orm";
|
|
6
6
|
const RP_NAME = "CMS";
|
|
7
7
|
export const webauthnRegisterOptionsHandler = async ({ ctx, input, }) => {
|
|
8
8
|
const db = await getMongoService();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RegistrationResponseJSON } from "@simplewebauthn/server";
|
|
2
|
-
import { RakunRequestContext } from "../../../../context
|
|
2
|
+
import { RakunRequestContext } from "../../../../context";
|
|
3
3
|
export declare const webauthnRegisterVerifyHandler: ({ ctx, input, }: {
|
|
4
4
|
ctx: RakunRequestContext;
|
|
5
5
|
input: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { verifyRegistrationResponse, } from "@simplewebauthn/server";
|
|
2
|
-
import { ORIGIN, RP_ID, toB64 } from "./share
|
|
3
|
-
import { WebAuthnRegChallenge, WebAuthnCredential, ManagerUser, UserMfa, } from "../../../../../internal-content-types
|
|
4
|
-
import { throwAppError } from "../../../../../lib/errors
|
|
5
|
-
import { getMongoService } from "../../../../../orm
|
|
2
|
+
import { ORIGIN, RP_ID, toB64 } from "./share";
|
|
3
|
+
import { WebAuthnRegChallenge, WebAuthnCredential, ManagerUser, UserMfa, } from "../../../../../internal-content-types";
|
|
4
|
+
import { throwAppError } from "../../../../../lib/errors";
|
|
5
|
+
import { getMongoService } from "../../../../../orm";
|
|
6
6
|
const toBase64URL = (buf) => buf.toString("base64url");
|
|
7
7
|
export const webauthnRegisterVerifyHandler = async ({ ctx, input, }) => {
|
|
8
8
|
const db = await getMongoService();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../context
|
|
2
|
-
import { CreateInput } from "../../../schemas/manager/create
|
|
1
|
+
import { RakunRequestContext } from "../../context";
|
|
2
|
+
import { CreateInput } from "../../../schemas/manager/create";
|
|
3
3
|
export declare const createHandler: ({ input, ctx, }: {
|
|
4
4
|
input: CreateInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { throwAppError } from "../../../lib/errors
|
|
3
|
-
import { Logger } from "../../../lib/Logger
|
|
4
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
5
|
-
import { getMongoService } from "../../../orm
|
|
6
|
-
import { DbErrorInvalidData, DbErrorConflict } from "../../../orm/dbService
|
|
7
|
-
import { checkPermissions } from "../../utils/checkPermissions
|
|
8
|
-
import { checkRevalidatePath } from "../../utils/routes/revalidatePath
|
|
9
|
-
import { getInputProxy } from "../../proxies
|
|
2
|
+
import { throwAppError } from "../../../lib/errors";
|
|
3
|
+
import { Logger } from "../../../lib/Logger";
|
|
4
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
5
|
+
import { getMongoService } from "../../../orm";
|
|
6
|
+
import { DbErrorInvalidData, DbErrorConflict } from "../../../orm/dbService";
|
|
7
|
+
import { checkPermissions } from "../../utils/checkPermissions";
|
|
8
|
+
import { checkRevalidatePath } from "../../utils/routes/revalidatePath";
|
|
9
|
+
import { getInputProxy } from "../../proxies";
|
|
10
10
|
export const createHandler = async ({ input, ctx, }) => {
|
|
11
11
|
Logger.addTrace("manager.create: handler start", {
|
|
12
12
|
contentType: input.contentType,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../context
|
|
2
|
-
import { DeleteInput } from "../../../schemas/manager/delete
|
|
1
|
+
import { RakunRequestContext } from "../../context";
|
|
2
|
+
import { DeleteInput } from "../../../schemas/manager/delete";
|
|
3
3
|
export declare const deleteHandler: ({ input, ctx, }: {
|
|
4
4
|
input: DeleteInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Media } from "../../../internal-content-types
|
|
2
|
-
import { throwAppError } from "../../../lib/errors
|
|
3
|
-
import { Logger } from "../../../lib/Logger
|
|
4
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
5
|
-
import { getMediaService } from "../../../media
|
|
6
|
-
import { getMongoService } from "../../../orm
|
|
7
|
-
import { checkOwnership } from "../../utils/checkOwnership
|
|
8
|
-
import { checkRevalidatePath } from "../../utils/routes/revalidatePath
|
|
1
|
+
import { Media } from "../../../internal-content-types";
|
|
2
|
+
import { throwAppError } from "../../../lib/errors";
|
|
3
|
+
import { Logger } from "../../../lib/Logger";
|
|
4
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
5
|
+
import { getMediaService } from "../../../media";
|
|
6
|
+
import { getMongoService } from "../../../orm";
|
|
7
|
+
import { checkOwnership } from "../../utils/checkOwnership";
|
|
8
|
+
import { checkRevalidatePath } from "../../utils/routes/revalidatePath";
|
|
9
9
|
export const deleteHandler = async ({ input, ctx, }) => {
|
|
10
10
|
Logger.addTrace("manager.delete: handler start", {
|
|
11
11
|
contentType: input.contentType,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../context
|
|
2
|
-
import { GetInput } from "../../../schemas/manager/get
|
|
1
|
+
import { RakunRequestContext } from "../../context";
|
|
2
|
+
import { GetInput } from "../../../schemas/manager/get";
|
|
3
3
|
export declare const getHandler: ({ input, ctx, }: {
|
|
4
4
|
input: GetInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { throwAppError } from "../../../lib/errors
|
|
2
|
-
import { Logger } from "../../../lib/Logger
|
|
3
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
4
|
-
import { getMongoService } from "../../../orm
|
|
5
|
-
import { checkOwnership } from "../../utils/checkOwnership
|
|
6
|
-
import { syncConfiguredRoutes } from "../../utils/routes/syncConfiguredRoutes
|
|
1
|
+
import { throwAppError } from "../../../lib/errors";
|
|
2
|
+
import { Logger } from "../../../lib/Logger";
|
|
3
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
4
|
+
import { getMongoService } from "../../../orm";
|
|
5
|
+
import { checkOwnership } from "../../utils/checkOwnership";
|
|
6
|
+
import { syncConfiguredRoutes } from "../../utils/routes/syncConfiguredRoutes";
|
|
7
7
|
export const getHandler = async ({ input, ctx, }) => {
|
|
8
8
|
Logger.addTrace("manager.get: handler start", {
|
|
9
9
|
contentType: input.contentType,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../context
|
|
2
|
-
import { ListInput } from "../../../schemas/manager/list
|
|
1
|
+
import { RakunRequestContext } from "../../context";
|
|
2
|
+
import { ListInput } from "../../../schemas/manager/list";
|
|
3
3
|
export declare const listHandler: ({ input, ctx, }: {
|
|
4
4
|
input: ListInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { throwAppError } from "../../../lib/errors
|
|
2
|
-
import { Logger } from "../../../lib/Logger
|
|
3
|
-
import { hasPermissions } from "../../../lib/Permissions
|
|
4
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
5
|
-
import { getMongoService } from "../../../orm
|
|
6
|
-
import { checkAnyPermissions } from "../../utils/checkPermissions
|
|
7
|
-
import { populateRelations } from "../../utils/populates/populateRelations
|
|
8
|
-
import { syncConfiguredRoutes } from "../../utils/routes/syncConfiguredRoutes
|
|
1
|
+
import { throwAppError } from "../../../lib/errors";
|
|
2
|
+
import { Logger } from "../../../lib/Logger";
|
|
3
|
+
import { hasPermissions } from "../../../lib/Permissions";
|
|
4
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
5
|
+
import { getMongoService } from "../../../orm";
|
|
6
|
+
import { checkAnyPermissions } from "../../utils/checkPermissions";
|
|
7
|
+
import { populateRelations } from "../../utils/populates/populateRelations";
|
|
8
|
+
import { syncConfiguredRoutes } from "../../utils/routes/syncConfiguredRoutes";
|
|
9
9
|
export const listHandler = async ({ input, ctx, }) => {
|
|
10
10
|
Logger.addTrace("manager.list: handler start", {
|
|
11
11
|
contentType: input.contentType,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
2
|
-
import { ListLiteralsInput, ListLiteralsOutput } from "../../../../schemas/manager/literals/list
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
|
+
import { ListLiteralsInput, ListLiteralsOutput } from "../../../../schemas/manager/literals/list";
|
|
3
3
|
export declare const listLiteralsHandler: ({ input, ctx, }: {
|
|
4
4
|
input: ListLiteralsInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Language, LiteralTranslation, } from "../../../../internal-content-types
|
|
2
|
-
import { Logger } from "../../../../lib/Logger
|
|
3
|
-
import { getLiteralDefinitions, validateIcuVariables, } from "../../../../literals
|
|
4
|
-
import { getMongoService } from "../../../../orm
|
|
5
|
-
import { checkAnyPermissions } from "../../../utils/checkPermissions
|
|
1
|
+
import { Language, LiteralTranslation, } from "../../../../internal-content-types";
|
|
2
|
+
import { Logger } from "../../../../lib/Logger";
|
|
3
|
+
import { getLiteralDefinitions, validateIcuVariables, } from "../../../../literals";
|
|
4
|
+
import { getMongoService } from "../../../../orm";
|
|
5
|
+
import { checkAnyPermissions } from "../../../utils/checkPermissions";
|
|
6
6
|
const emptyValidation = {
|
|
7
7
|
isValid: true,
|
|
8
8
|
missing: [],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
2
|
-
import { UpsertLiteralInput, UpsertLiteralOutput } from "../../../../schemas/manager/literals/upsert
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
|
+
import { UpsertLiteralInput, UpsertLiteralOutput } from "../../../../schemas/manager/literals/upsert";
|
|
3
3
|
export declare const upsertLiteralHandler: ({ input, ctx, }: {
|
|
4
4
|
input: UpsertLiteralInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LiteralTranslation } from "../../../../internal-content-types
|
|
2
|
-
import { throwAppError } from "../../../../lib/errors
|
|
3
|
-
import { Logger } from "../../../../lib/Logger
|
|
4
|
-
import { getLiteralDefinition, validateIcuVariables, } from "../../../../literals
|
|
5
|
-
import { getMongoService } from "../../../../orm
|
|
6
|
-
import { checkPermissions } from "../../../utils/checkPermissions
|
|
1
|
+
import { LiteralTranslation } from "../../../../internal-content-types";
|
|
2
|
+
import { throwAppError } from "../../../../lib/errors";
|
|
3
|
+
import { Logger } from "../../../../lib/Logger";
|
|
4
|
+
import { getLiteralDefinition, validateIcuVariables, } from "../../../../literals";
|
|
5
|
+
import { getMongoService } from "../../../../orm";
|
|
6
|
+
import { checkPermissions } from "../../../utils/checkPermissions";
|
|
7
7
|
export const upsertLiteralHandler = async ({ input, ctx, }) => {
|
|
8
8
|
Logger.addTrace("manager.literals.upsert: handler start", {
|
|
9
9
|
key: input.key,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
2
|
-
import { CreateFolderInput, CreateFolderOutput } from "../../../../schemas/manager/media/createFolder
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
|
+
import { CreateFolderInput, CreateFolderOutput } from "../../../../schemas/manager/media/createFolder";
|
|
3
3
|
export declare const createFolderHandler: ({ input, ctx, }: {
|
|
4
4
|
input: CreateFolderInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MediaFolder } from "../../../../internal-content-types
|
|
2
|
-
import { throwAppError } from "../../../../lib/errors
|
|
3
|
-
import { hasPermissions } from "../../../../lib/Permissions
|
|
4
|
-
import { slugify } from "../../../../lib/utils/slugify
|
|
5
|
-
import { getMongoService } from "../../../../orm
|
|
6
|
-
import { DbErrorInvalidData, DbErrorConflict, } from "../../../../orm/dbService
|
|
7
|
-
import { checkPermissions } from "../../../utils/checkPermissions
|
|
1
|
+
import { MediaFolder } from "../../../../internal-content-types";
|
|
2
|
+
import { throwAppError } from "../../../../lib/errors";
|
|
3
|
+
import { hasPermissions } from "../../../../lib/Permissions";
|
|
4
|
+
import { slugify } from "../../../../lib/utils/slugify";
|
|
5
|
+
import { getMongoService } from "../../../../orm";
|
|
6
|
+
import { DbErrorInvalidData, DbErrorConflict, } from "../../../../orm/dbService";
|
|
7
|
+
import { checkPermissions } from "../../../utils/checkPermissions";
|
|
8
8
|
const normalizePath = (value) => value
|
|
9
9
|
.trim()
|
|
10
10
|
.replace(/\\/g, "/")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
2
|
-
import { FinalizeUploadInput, FinalizeUploadOutput } from "../../../../schemas/manager/media/finalizeUpload
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
|
+
import { FinalizeUploadInput, FinalizeUploadOutput } from "../../../../schemas/manager/media/finalizeUpload";
|
|
3
3
|
export declare const finalizeUploadHandler: ({ input, ctx, }: {
|
|
4
4
|
input: FinalizeUploadInput;
|
|
5
5
|
ctx: RakunRequestContext;
|