@rakun-kit/core 1.0.8 → 1.1.1
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/dist/cjs/api/operations/manager.js +8 -5
- package/dist/cjs/api/operations/manager.js.map +1 -1
- package/dist/cjs/api/routes/manager/{auth/media → media}/createFolder.js +7 -7
- package/dist/cjs/api/routes/manager/media/createFolder.js.map +1 -0
- package/dist/cjs/api/routes/manager/{auth/media → media}/finalizeUpload.js +50 -8
- package/dist/cjs/api/routes/manager/media/finalizeUpload.js.map +1 -0
- package/dist/cjs/api/routes/manager/{auth/media → media}/getMediaUrl.js +3 -3
- package/dist/cjs/api/routes/manager/media/getMediaUrl.js.map +1 -0
- package/dist/cjs/api/routes/manager/{auth/media → media}/listFolders.js +4 -4
- package/dist/cjs/api/routes/manager/media/listFolders.js.map +1 -0
- package/dist/cjs/api/routes/manager/media/prepareUpload.js +59 -0
- package/dist/cjs/api/routes/manager/media/prepareUpload.js.map +1 -0
- package/dist/cjs/api/routes/manager/{auth/media → media}/uploadBinary.js +45 -5
- package/dist/cjs/api/routes/manager/media/uploadBinary.js.map +1 -0
- package/dist/cjs/api/utils/routes/revalidatePath.js +7 -7
- package/dist/cjs/api/utils/routes/revalidatePath.js.map +1 -1
- package/dist/cjs/api/utils/routes/updateRoutesMap.js +77 -0
- package/dist/cjs/api/utils/routes/updateRoutesMap.js.map +1 -1
- package/dist/cjs/bootstrapState.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.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 +41 -41
- package/dist/esm/api/operations/index.js +7 -7
- package/dist/esm/api/operations/manager-contract.d.ts +30 -30
- package/dist/esm/api/operations/manager-contract.js +4 -4
- package/dist/esm/api/operations/manager.d.ts +31 -31
- package/dist/esm/api/operations/manager.d.ts.map +1 -1
- package/dist/esm/api/operations/manager.js +37 -34
- package/dist/esm/api/operations/manager.js.map +1 -1
- package/dist/esm/api/operations/types.d.ts +1 -1
- package/dist/esm/api/operations/web-contract.d.ts +3 -3
- package/dist/esm/api/operations/web-contract.js +3 -3
- package/dist/esm/api/operations/web.d.ts +4 -4
- 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 +4 -4
- 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/{auth/media → media}/createFolder.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/createFolder.d.ts.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/createFolder.js +7 -7
- package/dist/esm/api/routes/manager/media/createFolder.js.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/finalizeUpload.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/finalizeUpload.d.ts.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/finalizeUpload.js +50 -8
- package/dist/esm/api/routes/manager/media/finalizeUpload.js.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/getMediaUrl.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/getMediaUrl.d.ts.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/getMediaUrl.js +3 -3
- package/dist/esm/api/routes/manager/media/getMediaUrl.js.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/listFolders.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/listFolders.d.ts.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/listFolders.js +4 -4
- package/dist/esm/api/routes/manager/media/listFolders.js.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/prepareUpload.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/prepareUpload.d.ts.map +1 -0
- package/dist/esm/api/routes/manager/media/prepareUpload.js +55 -0
- package/dist/esm/api/routes/manager/media/prepareUpload.js.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/uploadBinary.d.ts +1 -1
- package/dist/esm/api/routes/manager/media/uploadBinary.d.ts.map +1 -0
- package/dist/esm/api/routes/manager/{auth/media → media}/uploadBinary.js +45 -5
- package/dist/esm/api/routes/manager/media/uploadBinary.js.map +1 -0
- 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.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 +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 +11 -11
- package/dist/esm/api/utils/routes/revalidatePath.js.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/esm/api/utils/routes/updateRoutesMap.js +80 -3
- package/dist/esm/api/utils/routes/updateRoutesMap.js.map +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/bootstrapState.d.ts +13 -8
- 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.js +25 -25
- package/dist/esm/contracts.d.ts +26 -26
- package/dist/esm/contracts.js +26 -26
- package/dist/esm/index.d.ts +43 -43
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +40 -40
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal-content-types/HelloWorld.d.ts +3 -3
- package/dist/esm/internal-content-types/HelloWorld.js +2 -2
- package/dist/esm/internal-content-types/Language.d.ts +6 -6
- package/dist/esm/internal-content-types/Language.js +2 -2
- package/dist/esm/internal-content-types/LiteralTranslation.d.ts +5 -5
- package/dist/esm/internal-content-types/LiteralTranslation.js +2 -2
- package/dist/esm/internal-content-types/ManagerRole.d.ts +4 -4
- package/dist/esm/internal-content-types/ManagerRole.js +3 -3
- package/dist/esm/internal-content-types/ManagerUser.d.ts +9 -9
- package/dist/esm/internal-content-types/ManagerUser.js +3 -3
- package/dist/esm/internal-content-types/Media.d.ts +29 -29
- package/dist/esm/internal-content-types/Media.js +3 -3
- package/dist/esm/internal-content-types/MediaFolder.d.ts +7 -7
- package/dist/esm/internal-content-types/MediaFolder.js +2 -2
- package/dist/esm/internal-content-types/MfaChallenge.d.ts +16 -16
- package/dist/esm/internal-content-types/MfaChallenge.js +3 -3
- package/dist/esm/internal-content-types/Page.d.ts +5 -5
- package/dist/esm/internal-content-types/Page.js +3 -3
- package/dist/esm/internal-content-types/Redirect.d.ts +14 -14
- package/dist/esm/internal-content-types/Redirect.js +2 -2
- package/dist/esm/internal-content-types/Route.d.ts +11 -11
- package/dist/esm/internal-content-types/Route.js +2 -2
- package/dist/esm/internal-content-types/RouteLayoutModule.d.ts +9 -9
- package/dist/esm/internal-content-types/RouteLayoutModule.js +2 -2
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.d.ts +8 -8
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.js +2 -2
- package/dist/esm/internal-content-types/RouteMap.d.ts +7 -7
- package/dist/esm/internal-content-types/RouteMap.js +2 -2
- package/dist/esm/internal-content-types/RouteSettings.d.ts +8 -8
- package/dist/esm/internal-content-types/RouteSettings.js +3 -3
- package/dist/esm/internal-content-types/Seo.d.ts +4 -4
- package/dist/esm/internal-content-types/Seo.js +2 -2
- package/dist/esm/internal-content-types/Session.d.ts +12 -12
- package/dist/esm/internal-content-types/Session.js +3 -3
- package/dist/esm/internal-content-types/UserMfa.d.ts +15 -15
- package/dist/esm/internal-content-types/UserMfa.js +3 -3
- package/dist/esm/internal-content-types/WebAuthnCredential.d.ts +15 -15
- package/dist/esm/internal-content-types/WebAuthnCredential.js +3 -3
- package/dist/esm/internal-content-types/WebAuthnRegChallenge.d.ts +14 -14
- 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 +3 -3
- package/dist/esm/lib/ContentType.js +4 -4
- package/dist/esm/lib/Permissions.d.ts +1 -1
- package/dist/esm/lib/Registry.d.ts +2 -2
- 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 +3 -3
- package/dist/esm/lib/fields/Boolean.js +1 -1
- package/dist/esm/lib/fields/ContentReference.d.ts +5 -5
- package/dist/esm/lib/fields/ContentReference.js +2 -2
- package/dist/esm/lib/fields/Date.d.ts +3 -3
- package/dist/esm/lib/fields/Date.js +1 -1
- package/dist/esm/lib/fields/Field.d.ts +19 -19
- package/dist/esm/lib/fields/Field.js +1 -1
- package/dist/esm/lib/fields/File.d.ts +3 -3
- package/dist/esm/lib/fields/File.js +3 -3
- package/dist/esm/lib/fields/Iterator.d.ts +4 -4
- package/dist/esm/lib/fields/Iterator.js +2 -2
- package/dist/esm/lib/fields/Link.d.ts +4 -4
- package/dist/esm/lib/fields/Link.js +3 -3
- package/dist/esm/lib/fields/List.d.ts +3 -3
- package/dist/esm/lib/fields/List.js +1 -1
- package/dist/esm/lib/fields/Number.d.ts +3 -3
- package/dist/esm/lib/fields/Number.js +1 -1
- package/dist/esm/lib/fields/Relation.d.ts +6 -6
- package/dist/esm/lib/fields/Relation.js +5 -5
- package/dist/esm/lib/fields/Select.d.ts +3 -3
- package/dist/esm/lib/fields/Select.js +1 -1
- package/dist/esm/lib/fields/SelfRelation.d.ts +4 -4
- package/dist/esm/lib/fields/SelfRelation.js +2 -2
- package/dist/esm/lib/fields/SimpleList.d.ts +4 -4
- package/dist/esm/lib/fields/SimpleList.js +2 -2
- package/dist/esm/lib/fields/String.d.ts +3 -3
- package/dist/esm/lib/fields/String.js +3 -3
- package/dist/esm/lib/fields/index.d.ts +19 -19
- package/dist/esm/lib/fields/index.js +13 -13
- 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 +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 +124 -124
- 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.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 +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 +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.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 +1 -1
- package/dist/cjs/api/routes/manager/auth/media/createFolder.js.map +0 -1
- package/dist/cjs/api/routes/manager/auth/media/finalizeUpload.js.map +0 -1
- package/dist/cjs/api/routes/manager/auth/media/getMediaUrl.js.map +0 -1
- package/dist/cjs/api/routes/manager/auth/media/listFolders.js.map +0 -1
- package/dist/cjs/api/routes/manager/auth/media/prepareUpload.js +0 -34
- package/dist/cjs/api/routes/manager/auth/media/prepareUpload.js.map +0 -1
- package/dist/cjs/api/routes/manager/auth/media/uploadBinary.js.map +0 -1
- package/dist/cjs/lib/Env.js +0 -85
- package/dist/cjs/lib/Env.js.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/createFolder.d.ts.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/createFolder.js.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/finalizeUpload.d.ts.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/finalizeUpload.js.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/getMediaUrl.d.ts.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/getMediaUrl.js.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/listFolders.d.ts.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/listFolders.js.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/prepareUpload.d.ts.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/prepareUpload.js +0 -30
- package/dist/esm/api/routes/manager/auth/media/prepareUpload.js.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/uploadBinary.d.ts.map +0 -1
- package/dist/esm/api/routes/manager/auth/media/uploadBinary.js.map +0 -1
- package/dist/esm/lib/Env.d.ts +0 -33
- package/dist/esm/lib/Env.d.ts.map +0 -1
- package/dist/esm/lib/Env.js +0 -78
- package/dist/esm/lib/Env.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const createWebOperationDefinitions: () => {
|
|
2
|
-
"web.languages": import("./types").RakunOperationWithoutInput<{
|
|
2
|
+
"web.languages": import("./types.js").RakunOperationWithoutInput<{
|
|
3
3
|
code: string;
|
|
4
4
|
name: string;
|
|
5
5
|
default: boolean;
|
|
@@ -11,7 +11,7 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
11
11
|
contentType: string;
|
|
12
12
|
} | undefined;
|
|
13
13
|
}[], "query", "get", "public">;
|
|
14
|
-
"web.page": import("./types").RakunOperationWithInput<{
|
|
14
|
+
"web.page": import("./types.js").RakunOperationWithInput<{
|
|
15
15
|
path: string;
|
|
16
16
|
search?: string | undefined;
|
|
17
17
|
headers?: Record<string, string> | undefined;
|
|
@@ -63,8 +63,8 @@ export declare const createWebOperationDefinitions: () => {
|
|
|
63
63
|
status: number;
|
|
64
64
|
} | undefined;
|
|
65
65
|
}, "query", "get", "public">;
|
|
66
|
-
"web.test": import("./types").RakunOperationWithoutInput<{
|
|
66
|
+
"web.test": import("./types.js").RakunOperationWithoutInput<{
|
|
67
67
|
ok: boolean;
|
|
68
68
|
}, "query", "get", "public">;
|
|
69
|
-
} & import("./types").RakunOperationMap;
|
|
69
|
+
} & import("./types.js").RakunOperationMap;
|
|
70
70
|
//# sourceMappingURL=web.d.ts.map
|
|
@@ -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.js";
|
|
2
|
+
import { createWebOperationContracts } from "./web-contract.js";
|
|
3
|
+
import { getCustomApiOperationDefinitions, mergeOperationMaps, } from "./custom.js";
|
|
4
|
+
import { getLanguages } from "../utils/getLanguages.js";
|
|
5
|
+
import { getPage } from "../routes/web/page.js";
|
|
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/index.js";
|
|
3
|
+
import { RouteDefinition } from "../utils/routes/routeDefinitions.js";
|
|
4
4
|
type RouteWithInfo = RouteDefinition & {
|
|
5
5
|
infoSchema: z.ZodTypeAny;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ContentType from "../../lib/ContentType";
|
|
2
|
-
import { DataInput, DataPopulatedWithoutApiOnly, DataFront, DataPopulated } from "../../lib/types";
|
|
1
|
+
import ContentType from "../../lib/ContentType.js";
|
|
2
|
+
import { DataInput, DataPopulatedWithoutApiOnly, DataFront, DataPopulated } from "../../lib/types/index.js";
|
|
3
3
|
export type InputProxy<T extends ContentType> = (data: Partial<DataInput<T>>) => Partial<DataInput<T>> | Promise<Partial<DataInput<T>>>;
|
|
4
4
|
export type OutputProxy<T extends ContentType> = (data: DataPopulatedWithoutApiOnly<T>) => DataFront<T> | Promise<DataFront<T>>;
|
|
5
5
|
export type ApiProxies = {
|
|
@@ -9,8 +9,8 @@ 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<Record<string, import("
|
|
13
|
-
output: Record<string, OutputProxy<ContentType<Record<string, import("
|
|
12
|
+
input: Record<string, InputProxy<ContentType<Record<string, import("../../index.js").Field<any, any, any, any, any, any>>, string>>>;
|
|
13
|
+
output: Record<string, OutputProxy<ContentType<Record<string, import("../../index.js").Field<any, any, any, any, any, any>>, string>>>;
|
|
14
14
|
};
|
|
15
15
|
export declare const ProxyOutput: (item: DataPopulated<ContentType>) => {
|
|
16
16
|
[x: string]: unknown;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context";
|
|
2
|
-
import { AccountInfoOutput } from "../../../../schemas/manager/auth/accountInfo";
|
|
1
|
+
import { RakunRequestContext } from "../../../context.js";
|
|
2
|
+
import { AccountInfoOutput } from "../../../../schemas/manager/auth/accountInfo.js";
|
|
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/index.js";
|
|
2
|
+
import { getMongoService } from "../../../../orm/index.js";
|
|
3
|
+
import { getSessionCookie } from "../../../sessionCookie.js";
|
|
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.js";
|
|
2
|
+
import { DeleteSessionInput } from "../../../../schemas/manager/auth/deleteSession.js";
|
|
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/index.js";
|
|
2
|
+
import { throwAppError } from "../../../../lib/errors/index.js";
|
|
3
|
+
import { getMongoService } from "../../../../orm/index.js";
|
|
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/index.js";
|
|
3
|
+
import { throwAppError } from "../../../../lib/errors/index.js";
|
|
4
|
+
import { getMongoService } from "../../../../orm/index.js";
|
|
5
|
+
import { verifyPassword } from "../../../utils/passwords.js";
|
|
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/index.js";
|
|
2
|
+
import { getMongoService } from "../../../../orm/index.js";
|
|
3
|
+
import { getSessionCookie } from "../../../sessionCookie.js";
|
|
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.js";
|
|
2
|
+
import { ConfirmTotpInput } from "../../../../../schemas/manager/auth/totp/confirmTotp.js";
|
|
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/index.js";
|
|
2
|
+
import { getMongoService } from "../../../../../orm/index.js";
|
|
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/index.js";
|
|
5
|
+
import { throwAppError } from "../../../../../lib/errors/index.js";
|
|
6
|
+
import { getMongoService } from "../../../../../orm/index.js";
|
|
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.js";
|
|
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/index.js";
|
|
3
|
+
import { throwAppError } from "../../../../../lib/errors/index.js";
|
|
4
|
+
import { getMongoService } from "../../../../../orm/index.js";
|
|
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.js";
|
|
2
|
+
import { UpdatePasswordInput } from "../../../../schemas/manager/updatePassword.js";
|
|
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/index.js";
|
|
2
|
+
import { getMongoService } from "../../../../orm/index.js";
|
|
3
|
+
import { verifyPassword, hashPassword } from "../../../utils/passwords.js";
|
|
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/index.js";
|
|
3
|
+
import { throwAppError } from "../../../../../lib/errors/index.js";
|
|
4
|
+
import { getMongoService } from "../../../../../orm/index.js";
|
|
5
|
+
import { RP_ID, toBase64URL } from "./share.js";
|
|
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.js";
|
|
3
|
+
import { MfaChallenge, WebAuthnCredential, ManagerUser, Session, } from "../../../../../internal-content-types/index.js";
|
|
4
|
+
import { throwAppError } from "../../../../../lib/errors/index.js";
|
|
5
|
+
import { getMongoService } from "../../../../../orm/index.js";
|
|
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.js";
|
|
2
|
+
import { WebauthnRegisterOptionsInput } from "../../../../../schemas/manager/auth/webauthn/webauthnRegisterOptions.js";
|
|
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.js";
|
|
4
|
+
import { WebAuthnCredential, WebAuthnRegChallenge, ManagerUser, } from "../../../../../internal-content-types/index.js";
|
|
5
|
+
import { getMongoService } from "../../../../../orm/index.js";
|
|
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.js";
|
|
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.js";
|
|
3
|
+
import { WebAuthnRegChallenge, WebAuthnCredential, ManagerUser, UserMfa, } from "../../../../../internal-content-types/index.js";
|
|
4
|
+
import { throwAppError } from "../../../../../lib/errors/index.js";
|
|
5
|
+
import { getMongoService } from "../../../../../orm/index.js";
|
|
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.js";
|
|
2
|
+
import { CreateInput } from "../../../schemas/manager/create.js";
|
|
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/index.js";
|
|
3
|
+
import { Logger } from "../../../lib/Logger.js";
|
|
4
|
+
import { getContentTypeByName } from "../../../lib/Registry.js";
|
|
5
|
+
import { getMongoService } from "../../../orm/index.js";
|
|
6
|
+
import { DbErrorInvalidData, DbErrorConflict } from "../../../orm/dbService.js";
|
|
7
|
+
import { checkPermissions } from "../../utils/checkPermissions.js";
|
|
8
|
+
import { checkRevalidatePath } from "../../utils/routes/revalidatePath.js";
|
|
9
|
+
import { getInputProxy } from "../../proxies/index.js";
|
|
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.js";
|
|
2
|
+
import { DeleteInput } from "../../../schemas/manager/delete.js";
|
|
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/index.js";
|
|
2
|
+
import { throwAppError } from "../../../lib/errors/index.js";
|
|
3
|
+
import { Logger } from "../../../lib/Logger.js";
|
|
4
|
+
import { getContentTypeByName } from "../../../lib/Registry.js";
|
|
5
|
+
import { getMediaService } from "../../../media/index.js";
|
|
6
|
+
import { getMongoService } from "../../../orm/index.js";
|
|
7
|
+
import { checkOwnership } from "../../utils/checkOwnership.js";
|
|
8
|
+
import { checkRevalidatePath } from "../../utils/routes/revalidatePath.js";
|
|
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.js";
|
|
2
|
+
import { GetInput } from "../../../schemas/manager/get.js";
|
|
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/index.js";
|
|
2
|
+
import { Logger } from "../../../lib/Logger.js";
|
|
3
|
+
import { getContentTypeByName } from "../../../lib/Registry.js";
|
|
4
|
+
import { getMongoService } from "../../../orm/index.js";
|
|
5
|
+
import { checkOwnership } from "../../utils/checkOwnership.js";
|
|
6
|
+
import { syncConfiguredRoutes } from "../../utils/routes/syncConfiguredRoutes.js";
|
|
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.js";
|
|
2
|
+
import { ListInput } from "../../../schemas/manager/list.js";
|
|
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/index.js";
|
|
2
|
+
import { Logger } from "../../../lib/Logger.js";
|
|
3
|
+
import { hasPermissions } from "../../../lib/Permissions.js";
|
|
4
|
+
import { getContentTypeByName } from "../../../lib/Registry.js";
|
|
5
|
+
import { getMongoService } from "../../../orm/index.js";
|
|
6
|
+
import { checkAnyPermissions } from "../../utils/checkPermissions.js";
|
|
7
|
+
import { populateRelations } from "../../utils/populates/populateRelations.js";
|
|
8
|
+
import { syncConfiguredRoutes } from "../../utils/routes/syncConfiguredRoutes.js";
|
|
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.js";
|
|
2
|
+
import { ListLiteralsInput, ListLiteralsOutput } from "../../../../schemas/manager/literals/list.js";
|
|
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/index.js";
|
|
2
|
+
import { Logger } from "../../../../lib/Logger.js";
|
|
3
|
+
import { getLiteralDefinitions, validateIcuVariables, } from "../../../../literals/index.js";
|
|
4
|
+
import { getMongoService } from "../../../../orm/index.js";
|
|
5
|
+
import { checkAnyPermissions } from "../../../utils/checkPermissions.js";
|
|
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.js";
|
|
2
|
+
import { UpsertLiteralInput, UpsertLiteralOutput } from "../../../../schemas/manager/literals/upsert.js";
|
|
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/index.js";
|
|
2
|
+
import { throwAppError } from "../../../../lib/errors/index.js";
|
|
3
|
+
import { Logger } from "../../../../lib/Logger.js";
|
|
4
|
+
import { getLiteralDefinition, validateIcuVariables, } from "../../../../literals/index.js";
|
|
5
|
+
import { getMongoService } from "../../../../orm/index.js";
|
|
6
|
+
import { checkPermissions } from "../../../utils/checkPermissions.js";
|
|
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 "
|
|
2
|
-
import { CreateFolderInput, CreateFolderOutput } from "
|
|
1
|
+
import { RakunRequestContext } from "../../../context.js";
|
|
2
|
+
import { CreateFolderInput, CreateFolderOutput } from "../../../../schemas/manager/media/createFolder.js";
|
|
3
3
|
export declare const createFolderHandler: ({ input, ctx, }: {
|
|
4
4
|
input: CreateFolderInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFolder.d.ts","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/media/createFolder.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,gDAAgD,CAAC;AAUxD,eAAO,MAAM,mBAAmB,GAAU,iBAGvC;IACD,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,EAAE,mBAAmB,CAAC;CAC1B,KAAG,OAAO,CAAC,kBAAkB,CA+E7B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MediaFolder } from "
|
|
2
|
-
import { throwAppError } from "
|
|
3
|
-
import { hasPermissions } from "
|
|
4
|
-
import { slugify } from "
|
|
5
|
-
import { getMongoService } from "
|
|
6
|
-
import { DbErrorInvalidData, DbErrorConflict, } from "
|
|
7
|
-
import { checkPermissions } from "
|
|
1
|
+
import { MediaFolder } from "../../../../internal-content-types/index.js";
|
|
2
|
+
import { throwAppError } from "../../../../lib/errors/index.js";
|
|
3
|
+
import { hasPermissions } from "../../../../lib/Permissions.js";
|
|
4
|
+
import { slugify } from "../../../../lib/utils/slugify.js";
|
|
5
|
+
import { getMongoService } from "../../../../orm/index.js";
|
|
6
|
+
import { DbErrorInvalidData, DbErrorConflict, } from "../../../../orm/dbService.js";
|
|
7
|
+
import { checkPermissions } from "../../../utils/checkPermissions.js";
|
|
8
8
|
const normalizePath = (value) => value
|
|
9
9
|
.trim()
|
|
10
10
|
.replace(/\\/g, "/")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFolder.js","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/media/createFolder.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "
|
|
2
|
-
import { FinalizeUploadInput, FinalizeUploadOutput } from "
|
|
1
|
+
import { RakunRequestContext } from "../../../context.js";
|
|
2
|
+
import { FinalizeUploadInput, FinalizeUploadOutput } from "../../../../schemas/manager/media/finalizeUpload.js";
|
|
3
3
|
export declare const finalizeUploadHandler: ({ input, ctx, }: {
|
|
4
4
|
input: FinalizeUploadInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalizeUpload.d.ts","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/media/finalizeUpload.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kDAAkD,CAAC;AAwJ1D,eAAO,MAAM,qBAAqB,GAAU,iBAGzC;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,GAAG,EAAE,mBAAmB,CAAC;CAC1B,KAAG,OAAO,CAAC,oBAAoB,CAuK/B,CAAC"}
|