@rakun-kit/core 1.4.0 → 1.4.2

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.
Files changed (432) hide show
  1. package/dist/cjs/api/routes/manager/backups/restore.js +2 -0
  2. package/dist/cjs/api/routes/manager/backups/restore.js.map +1 -1
  3. package/dist/cjs/client.js +4 -1
  4. package/dist/cjs/client.js.map +1 -1
  5. package/dist/cjs/index.js +4 -0
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/internal-content-types/ManagerRoleHooks.js +47 -0
  8. package/dist/cjs/internal-content-types/ManagerRoleHooks.js.map +1 -0
  9. package/dist/cjs/internal-content-types/Page.js +1 -1
  10. package/dist/cjs/internal-content-types/Page.js.map +1 -1
  11. package/dist/cjs/internal-content-types/syncAdminRole.js +16 -0
  12. package/dist/cjs/internal-content-types/syncAdminRole.js.map +1 -0
  13. package/dist/cjs/lib/ManagerRolePolicy.js +7 -0
  14. package/dist/cjs/lib/ManagerRolePolicy.js.map +1 -0
  15. package/dist/cjs/lib/Permissions.js +4 -0
  16. package/dist/cjs/lib/Permissions.js.map +1 -1
  17. package/dist/cjs/orm/index.js +1 -1
  18. package/dist/cjs/orm/index.js.map +1 -1
  19. package/dist/cjs/orm/operations/clear.js +3 -4
  20. package/dist/cjs/orm/operations/clear.js.map +1 -1
  21. package/dist/esm/api/context.d.ts +1 -1
  22. package/dist/esm/api/context.js +3 -3
  23. package/dist/esm/api/hooks/context.d.ts +1 -1
  24. package/dist/esm/api/hooks/runContentHooks.d.ts +4 -4
  25. package/dist/esm/api/hooks/runContentHooks.js +1 -1
  26. package/dist/esm/api/operations/catalog.d.ts +2 -2
  27. package/dist/esm/api/operations/catalog.js +1 -1
  28. package/dist/esm/api/operations/custom.d.ts +1 -1
  29. package/dist/esm/api/operations/custom.js +1 -1
  30. package/dist/esm/api/operations/index.d.ts +149 -149
  31. package/dist/esm/api/operations/index.js +8 -8
  32. package/dist/esm/api/operations/manager-contract.d.ts +117 -117
  33. package/dist/esm/api/operations/manager-contract.js +5 -5
  34. package/dist/esm/api/operations/manager.d.ts +118 -118
  35. package/dist/esm/api/operations/manager.js +56 -56
  36. package/dist/esm/api/operations/tracing.d.ts +1 -1
  37. package/dist/esm/api/operations/tracing.js +1 -1
  38. package/dist/esm/api/operations/types.d.ts +1 -1
  39. package/dist/esm/api/operations/web-contract.d.ts +24 -24
  40. package/dist/esm/api/operations/web-contract.js +3 -3
  41. package/dist/esm/api/operations/web.d.ts +25 -25
  42. package/dist/esm/api/operations/web.js +9 -9
  43. package/dist/esm/api/routes/manager/apiOperations.d.ts +3 -3
  44. package/dist/esm/api/routes/manager/apiOperations.js +5 -5
  45. package/dist/esm/api/routes/manager/auth/accountInfo.d.ts +2 -2
  46. package/dist/esm/api/routes/manager/auth/accountInfo.js +3 -3
  47. package/dist/esm/api/routes/manager/auth/deleteSession.d.ts +2 -2
  48. package/dist/esm/api/routes/manager/auth/deleteSession.js +3 -3
  49. package/dist/esm/api/routes/manager/auth/getSession.d.ts +7 -7
  50. package/dist/esm/api/routes/manager/auth/login.d.ts +2 -2
  51. package/dist/esm/api/routes/manager/auth/login.js +6 -6
  52. package/dist/esm/api/routes/manager/auth/logout.d.ts +1 -1
  53. package/dist/esm/api/routes/manager/auth/logout.js +3 -3
  54. package/dist/esm/api/routes/manager/auth/markTourSeen.d.ts +8 -8
  55. package/dist/esm/api/routes/manager/auth/markTourSeen.js +3 -3
  56. package/dist/esm/api/routes/manager/auth/totp/confirmTotp.d.ts +2 -2
  57. package/dist/esm/api/routes/manager/auth/totp/confirmTotp.js +2 -2
  58. package/dist/esm/api/routes/manager/auth/totp/enrollTotp.d.ts +1 -1
  59. package/dist/esm/api/routes/manager/auth/totp/enrollTotp.js +3 -3
  60. package/dist/esm/api/routes/manager/auth/totp/verifyTotp.d.ts +1 -1
  61. package/dist/esm/api/routes/manager/auth/totp/verifyTotp.js +5 -5
  62. package/dist/esm/api/routes/manager/auth/updateAccount.d.ts +8 -8
  63. package/dist/esm/api/routes/manager/auth/updateAccount.js +3 -3
  64. package/dist/esm/api/routes/manager/auth/updatePassword.d.ts +2 -2
  65. package/dist/esm/api/routes/manager/auth/updatePassword.js +5 -5
  66. package/dist/esm/api/routes/manager/auth/updateTutorialPreferences.d.ts +8 -8
  67. package/dist/esm/api/routes/manager/auth/updateTutorialPreferences.js +3 -3
  68. package/dist/esm/api/routes/manager/auth/webauthn/webauthnAuthOptions.js +4 -4
  69. package/dist/esm/api/routes/manager/auth/webauthn/webauthnAuthVerify.js +6 -6
  70. package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterOptions.d.ts +2 -2
  71. package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterOptions.js +3 -3
  72. package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterVerify.d.ts +1 -1
  73. package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterVerify.js +4 -4
  74. package/dist/esm/api/routes/manager/backups/create.d.ts +2 -2
  75. package/dist/esm/api/routes/manager/backups/create.js +2 -2
  76. package/dist/esm/api/routes/manager/backups/list.d.ts +2 -2
  77. package/dist/esm/api/routes/manager/backups/list.js +2 -2
  78. package/dist/esm/api/routes/manager/backups/restore.d.ts +2 -2
  79. package/dist/esm/api/routes/manager/backups/restore.d.ts.map +1 -1
  80. package/dist/esm/api/routes/manager/backups/restore.js +5 -3
  81. package/dist/esm/api/routes/manager/backups/restore.js.map +1 -1
  82. package/dist/esm/api/routes/manager/comments.d.ts +2 -2
  83. package/dist/esm/api/routes/manager/comments.js +6 -6
  84. package/dist/esm/api/routes/manager/contentType.d.ts +10 -10
  85. package/dist/esm/api/routes/manager/contentType.js +3 -3
  86. package/dist/esm/api/routes/manager/contentTypes.d.ts +8 -8
  87. package/dist/esm/api/routes/manager/contentTypes.js +1 -1
  88. package/dist/esm/api/routes/manager/create.d.ts +5 -5
  89. package/dist/esm/api/routes/manager/create.js +9 -9
  90. package/dist/esm/api/routes/manager/delete.d.ts +2 -2
  91. package/dist/esm/api/routes/manager/delete.js +9 -9
  92. package/dist/esm/api/routes/manager/duplicate.d.ts +5 -5
  93. package/dist/esm/api/routes/manager/duplicate.js +5 -5
  94. package/dist/esm/api/routes/manager/favorites.d.ts +2 -2
  95. package/dist/esm/api/routes/manager/favorites.js +5 -5
  96. package/dist/esm/api/routes/manager/get.d.ts +2 -2
  97. package/dist/esm/api/routes/manager/get.js +9 -9
  98. package/dist/esm/api/routes/manager/languages.d.ts +4 -4
  99. package/dist/esm/api/routes/manager/languages.js +1 -1
  100. package/dist/esm/api/routes/manager/list.d.ts +2 -2
  101. package/dist/esm/api/routes/manager/list.js +13 -13
  102. package/dist/esm/api/routes/manager/literals/list.d.ts +2 -2
  103. package/dist/esm/api/routes/manager/literals/list.js +5 -5
  104. package/dist/esm/api/routes/manager/literals/upsert.d.ts +2 -2
  105. package/dist/esm/api/routes/manager/literals/upsert.js +6 -6
  106. package/dist/esm/api/routes/manager/localeVariants.d.ts +18 -18
  107. package/dist/esm/api/routes/manager/localeVariants.js +15 -15
  108. package/dist/esm/api/routes/manager/media/createFolder.d.ts +2 -2
  109. package/dist/esm/api/routes/manager/media/createFolder.js +7 -7
  110. package/dist/esm/api/routes/manager/media/deleteFolder.d.ts +2 -2
  111. package/dist/esm/api/routes/manager/media/deleteFolder.js +7 -7
  112. package/dist/esm/api/routes/manager/media/deleteMediaStorage.js +2 -2
  113. package/dist/esm/api/routes/manager/media/finalizeUpload.d.ts +2 -2
  114. package/dist/esm/api/routes/manager/media/finalizeUpload.js +11 -11
  115. package/dist/esm/api/routes/manager/media/getMediaUrl.d.ts +2 -2
  116. package/dist/esm/api/routes/manager/media/getMediaUrl.js +6 -6
  117. package/dist/esm/api/routes/manager/media/listFolders.d.ts +2 -2
  118. package/dist/esm/api/routes/manager/media/listFolders.js +4 -4
  119. package/dist/esm/api/routes/manager/media/prepareUpload.d.ts +3 -3
  120. package/dist/esm/api/routes/manager/media/prepareUpload.js +5 -5
  121. package/dist/esm/api/routes/manager/media/resolveMediaRecordUrls.js +1 -1
  122. package/dist/esm/api/routes/manager/media/uploadBinary.d.ts +1 -1
  123. package/dist/esm/api/routes/manager/media/uploadBinary.js +7 -7
  124. package/dist/esm/api/routes/manager/migrations/list.d.ts +2 -2
  125. package/dist/esm/api/routes/manager/migrations/list.js +2 -2
  126. package/dist/esm/api/routes/manager/permissions.d.ts +1 -1
  127. package/dist/esm/api/routes/manager/permissions.js +2 -2
  128. package/dist/esm/api/routes/manager/preview/create.d.ts +2 -2
  129. package/dist/esm/api/routes/manager/preview/create.js +14 -14
  130. package/dist/esm/api/routes/manager/regenerateRoutes.d.ts +1 -1
  131. package/dist/esm/api/routes/manager/regenerateRoutes.js +2 -2
  132. package/dist/esm/api/routes/manager/setDefaultLanguage.d.ts +2 -2
  133. package/dist/esm/api/routes/manager/setDefaultLanguage.js +5 -5
  134. package/dist/esm/api/routes/manager/translateDocument.d.ts +2 -2
  135. package/dist/esm/api/routes/manager/translateDocument.js +9 -9
  136. package/dist/esm/api/routes/manager/trash.d.ts +2 -2
  137. package/dist/esm/api/routes/manager/trash.js +7 -7
  138. package/dist/esm/api/routes/manager/update.d.ts +5 -5
  139. package/dist/esm/api/routes/manager/update.js +8 -8
  140. package/dist/esm/api/routes/manager/users.d.ts +2 -2
  141. package/dist/esm/api/routes/manager/users.js +2 -2
  142. package/dist/esm/api/routes/manager/versions/get.d.ts +2 -2
  143. package/dist/esm/api/routes/manager/versions/get.js +2 -2
  144. package/dist/esm/api/routes/manager/versions/list.d.ts +2 -2
  145. package/dist/esm/api/routes/manager/versions/list.js +2 -2
  146. package/dist/esm/api/routes/manager/versions/restore.d.ts +2 -2
  147. package/dist/esm/api/routes/manager/versions/restore.js +4 -4
  148. package/dist/esm/api/routes/web/page.d.ts +4 -4
  149. package/dist/esm/api/routes/web/page.js +16 -16
  150. package/dist/esm/api/routes/web/previewPage.d.ts +8 -8
  151. package/dist/esm/api/routes/web/previewPage.js +8 -8
  152. package/dist/esm/api/routes/web/robots.d.ts +1 -1
  153. package/dist/esm/api/routes/web/robots.js +2 -2
  154. package/dist/esm/api/routes/web/seo.d.ts +1 -1
  155. package/dist/esm/api/routes/web/sitemap.d.ts +1 -1
  156. package/dist/esm/api/routes/web/sitemap.js +3 -3
  157. package/dist/esm/api/sessionCookie.d.ts +1 -1
  158. package/dist/esm/api/utils/authRateLimit.d.ts +1 -1
  159. package/dist/esm/api/utils/authRateLimit.js +1 -1
  160. package/dist/esm/api/utils/checkFailureCase.d.ts +1 -1
  161. package/dist/esm/api/utils/checkFailureCase.js +1 -1
  162. package/dist/esm/api/utils/checkOwnership.d.ts +2 -2
  163. package/dist/esm/api/utils/checkOwnership.js +5 -5
  164. package/dist/esm/api/utils/checkPermissions.d.ts +2 -2
  165. package/dist/esm/api/utils/checkPermissions.js +3 -3
  166. package/dist/esm/api/utils/dynamicData.d.ts +4 -4
  167. package/dist/esm/api/utils/dynamicData.js +9 -9
  168. package/dist/esm/api/utils/getLanguages.d.ts +2 -2
  169. package/dist/esm/api/utils/getLanguages.js +2 -2
  170. package/dist/esm/api/utils/getLink.d.ts +2 -2
  171. package/dist/esm/api/utils/getLink.js +5 -5
  172. package/dist/esm/api/utils/getUser.d.ts +7 -7
  173. package/dist/esm/api/utils/getUser.js +4 -4
  174. package/dist/esm/api/utils/index.d.ts +24 -24
  175. package/dist/esm/api/utils/index.js +24 -24
  176. package/dist/esm/api/utils/localeVariants.d.ts +1 -1
  177. package/dist/esm/api/utils/localeVariants.js +5 -5
  178. package/dist/esm/api/utils/mediaUploadToken.d.ts +1 -1
  179. package/dist/esm/api/utils/parseId.d.ts +1 -1
  180. package/dist/esm/api/utils/parseId.js +1 -1
  181. package/dist/esm/api/utils/passwords.js +1 -1
  182. package/dist/esm/api/utils/populates/populateLinks.d.ts +2 -2
  183. package/dist/esm/api/utils/populates/populateLinks.js +4 -4
  184. package/dist/esm/api/utils/populates/populateRelations.d.ts +2 -2
  185. package/dist/esm/api/utils/populates/populateRelations.js +6 -6
  186. package/dist/esm/api/utils/redirects/resolveRedirect.js +2 -2
  187. package/dist/esm/api/utils/requireContentType.d.ts +1 -1
  188. package/dist/esm/api/utils/requireContentType.js +2 -2
  189. package/dist/esm/api/utils/routes/revalidatePath.js +5 -5
  190. package/dist/esm/api/utils/routes/routeDefinitions.d.ts +1 -1
  191. package/dist/esm/api/utils/routes/routeMapHelpers.d.ts +6 -6
  192. package/dist/esm/api/utils/routes/routeMapHelpers.js +8 -8
  193. package/dist/esm/api/utils/routes/syncConfiguredRoutes.d.ts +2 -2
  194. package/dist/esm/api/utils/routes/syncConfiguredRoutes.js +5 -5
  195. package/dist/esm/api/utils/routes/updateRoutesMap.d.ts +2 -2
  196. package/dist/esm/api/utils/routes/updateRoutesMap.js +5 -5
  197. package/dist/esm/api/utils/safeManagerQuery.d.ts +2 -2
  198. package/dist/esm/api/utils/safeManagerQuery.js +1 -1
  199. package/dist/esm/api/utils/sanitizeManagerOutput.d.ts +1 -1
  200. package/dist/esm/api/utils/sanitizeManagerOutput.js +1 -1
  201. package/dist/esm/api/utils/transformObjectIdsToStrings.js +1 -1
  202. package/dist/esm/api/utils/transformStringToObjectIds.js +1 -1
  203. package/dist/esm/api/utils/translate.d.ts +1 -1
  204. package/dist/esm/api/utils/translate.js +3 -3
  205. package/dist/esm/api/utils/validateModule.d.ts +1 -1
  206. package/dist/esm/api/utils/validateModule.js +2 -2
  207. package/dist/esm/bootstrapState.d.ts +9 -9
  208. package/dist/esm/client.d.ts +50 -49
  209. package/dist/esm/client.d.ts.map +1 -1
  210. package/dist/esm/client.js +30 -29
  211. package/dist/esm/client.js.map +1 -1
  212. package/dist/esm/contracts.d.ts +43 -43
  213. package/dist/esm/contracts.js +43 -43
  214. package/dist/esm/index.d.ts +41 -41
  215. package/dist/esm/index.d.ts.map +1 -1
  216. package/dist/esm/index.js +44 -40
  217. package/dist/esm/index.js.map +1 -1
  218. package/dist/esm/internal-content-types/ApiOperation.d.ts +114 -114
  219. package/dist/esm/internal-content-types/ApiOperation.js +2 -2
  220. package/dist/esm/internal-content-types/Backup.d.ts +57 -57
  221. package/dist/esm/internal-content-types/Backup.js +2 -2
  222. package/dist/esm/internal-content-types/BackupDocument.d.ts +114 -114
  223. package/dist/esm/internal-content-types/BackupDocument.js +2 -2
  224. package/dist/esm/internal-content-types/ContentComment.d.ts +788 -788
  225. package/dist/esm/internal-content-types/ContentComment.js +3 -3
  226. package/dist/esm/internal-content-types/ContentVersion.d.ts +139 -139
  227. package/dist/esm/internal-content-types/ContentVersion.js +2 -2
  228. package/dist/esm/internal-content-types/HelloWorld.d.ts +30 -30
  229. package/dist/esm/internal-content-types/HelloWorld.js +2 -2
  230. package/dist/esm/internal-content-types/Language.d.ts +39 -39
  231. package/dist/esm/internal-content-types/Language.js +2 -2
  232. package/dist/esm/internal-content-types/LiteralTranslation.d.ts +59 -59
  233. package/dist/esm/internal-content-types/LiteralTranslation.js +2 -2
  234. package/dist/esm/internal-content-types/ManagerFavorite.d.ts +547 -547
  235. package/dist/esm/internal-content-types/ManagerFavorite.js +3 -3
  236. package/dist/esm/internal-content-types/ManagerRole.d.ts +33 -33
  237. package/dist/esm/internal-content-types/ManagerRole.js +2 -2
  238. package/dist/esm/internal-content-types/ManagerRoleHooks.d.ts +6 -0
  239. package/dist/esm/internal-content-types/ManagerRoleHooks.d.ts.map +1 -0
  240. package/dist/esm/internal-content-types/ManagerRoleHooks.js +43 -0
  241. package/dist/esm/internal-content-types/ManagerRoleHooks.js.map +1 -0
  242. package/dist/esm/internal-content-types/ManagerUser.d.ts +212 -212
  243. package/dist/esm/internal-content-types/ManagerUser.js +3 -3
  244. package/dist/esm/internal-content-types/ManagerUserHooks.d.ts +2 -2
  245. package/dist/esm/internal-content-types/ManagerUserHooks.js +3 -3
  246. package/dist/esm/internal-content-types/Media.d.ts +261 -261
  247. package/dist/esm/internal-content-types/Media.js +3 -3
  248. package/dist/esm/internal-content-types/MediaFolder.d.ts +88 -88
  249. package/dist/esm/internal-content-types/MediaFolder.js +2 -2
  250. package/dist/esm/internal-content-types/MfaChallenge.d.ts +570 -570
  251. package/dist/esm/internal-content-types/MfaChallenge.js +3 -3
  252. package/dist/esm/internal-content-types/Migration.d.ts +133 -133
  253. package/dist/esm/internal-content-types/Migration.js +2 -2
  254. package/dist/esm/internal-content-types/MigrationLock.d.ts +16 -16
  255. package/dist/esm/internal-content-types/MigrationLock.js +2 -2
  256. package/dist/esm/internal-content-types/Page.d.ts +85 -85
  257. package/dist/esm/internal-content-types/Page.js +4 -4
  258. package/dist/esm/internal-content-types/Page.js.map +1 -1
  259. package/dist/esm/internal-content-types/PreviewSnapshot.d.ts +213 -213
  260. package/dist/esm/internal-content-types/PreviewSnapshot.js +2 -2
  261. package/dist/esm/internal-content-types/Redirect.d.ts +146 -146
  262. package/dist/esm/internal-content-types/Redirect.js +2 -2
  263. package/dist/esm/internal-content-types/RobotsRule.d.ts +103 -103
  264. package/dist/esm/internal-content-types/RobotsRule.js +2 -2
  265. package/dist/esm/internal-content-types/Route.d.ts +123 -123
  266. package/dist/esm/internal-content-types/Route.js +2 -2
  267. package/dist/esm/internal-content-types/RouteLayoutModule.d.ts +164 -164
  268. package/dist/esm/internal-content-types/RouteLayoutModule.js +2 -2
  269. package/dist/esm/internal-content-types/RouteLayoutModuleOverride.d.ts +143 -143
  270. package/dist/esm/internal-content-types/RouteLayoutModuleOverride.js +2 -2
  271. package/dist/esm/internal-content-types/RouteLocaleVariant.d.ts +170 -170
  272. package/dist/esm/internal-content-types/RouteLocaleVariant.js +2 -2
  273. package/dist/esm/internal-content-types/RouteMap.d.ts +144 -144
  274. package/dist/esm/internal-content-types/RouteMap.js +2 -2
  275. package/dist/esm/internal-content-types/RouteSettings.d.ts +116 -116
  276. package/dist/esm/internal-content-types/RouteSettings.js +3 -3
  277. package/dist/esm/internal-content-types/SchemaState.d.ts +65 -65
  278. package/dist/esm/internal-content-types/SchemaState.js +2 -2
  279. package/dist/esm/internal-content-types/Seo.d.ts +430 -430
  280. package/dist/esm/internal-content-types/Seo.js +2 -2
  281. package/dist/esm/internal-content-types/SeoSettings.d.ts +518 -518
  282. package/dist/esm/internal-content-types/SeoSettings.js +3 -3
  283. package/dist/esm/internal-content-types/Session.d.ts +533 -533
  284. package/dist/esm/internal-content-types/Session.js +3 -3
  285. package/dist/esm/internal-content-types/UserMfa.d.ts +502 -502
  286. package/dist/esm/internal-content-types/UserMfa.js +3 -3
  287. package/dist/esm/internal-content-types/WebAuthnCredential.d.ts +624 -624
  288. package/dist/esm/internal-content-types/WebAuthnCredential.js +3 -3
  289. package/dist/esm/internal-content-types/WebAuthnRegChallenge.d.ts +562 -562
  290. package/dist/esm/internal-content-types/WebAuthnRegChallenge.js +3 -3
  291. package/dist/esm/internal-content-types/index.d.ts +33 -33
  292. package/dist/esm/internal-content-types/index.js +33 -33
  293. package/dist/esm/internal-content-types/syncAdminRole.d.ts +21 -0
  294. package/dist/esm/internal-content-types/syncAdminRole.d.ts.map +1 -0
  295. package/dist/esm/internal-content-types/syncAdminRole.js +12 -0
  296. package/dist/esm/internal-content-types/syncAdminRole.js.map +1 -0
  297. package/dist/esm/lib/ContentType.d.ts +7 -7
  298. package/dist/esm/lib/ContentType.js +5 -5
  299. package/dist/esm/lib/ManagerRolePolicy.d.ts +5 -0
  300. package/dist/esm/lib/ManagerRolePolicy.d.ts.map +1 -0
  301. package/dist/esm/lib/ManagerRolePolicy.js +3 -0
  302. package/dist/esm/lib/ManagerRolePolicy.js.map +1 -0
  303. package/dist/esm/lib/Permissions.d.ts +2 -2
  304. package/dist/esm/lib/Permissions.d.ts.map +1 -1
  305. package/dist/esm/lib/Permissions.js +6 -2
  306. package/dist/esm/lib/Permissions.js.map +1 -1
  307. package/dist/esm/lib/Registry.d.ts +6 -6
  308. package/dist/esm/lib/Registry.js +1 -1
  309. package/dist/esm/lib/errors/AppError.d.ts +1 -1
  310. package/dist/esm/lib/errors/AppError.js +1 -1
  311. package/dist/esm/lib/errors/index.d.ts +4 -4
  312. package/dist/esm/lib/errors/index.js +3 -3
  313. package/dist/esm/lib/errors/throwAppError.d.ts +1 -1
  314. package/dist/esm/lib/errors/throwAppError.js +3 -3
  315. package/dist/esm/lib/fields/Boolean.d.ts +1 -1
  316. package/dist/esm/lib/fields/Boolean.js +1 -1
  317. package/dist/esm/lib/fields/ContentReference.d.ts +2 -2
  318. package/dist/esm/lib/fields/ContentReference.js +2 -2
  319. package/dist/esm/lib/fields/Date.d.ts +1 -1
  320. package/dist/esm/lib/fields/Date.js +1 -1
  321. package/dist/esm/lib/fields/Field.d.ts +12 -12
  322. package/dist/esm/lib/fields/Fields.d.ts +13 -13
  323. package/dist/esm/lib/fields/Fields.js +13 -13
  324. package/dist/esm/lib/fields/File.d.ts +1 -1
  325. package/dist/esm/lib/fields/File.js +2 -2
  326. package/dist/esm/lib/fields/Iterator.d.ts +2 -2
  327. package/dist/esm/lib/fields/Iterator.js +3 -3
  328. package/dist/esm/lib/fields/Link.d.ts +1 -1
  329. package/dist/esm/lib/fields/Link.js +2 -2
  330. package/dist/esm/lib/fields/List.d.ts +1 -1
  331. package/dist/esm/lib/fields/List.js +2 -2
  332. package/dist/esm/lib/fields/Number.d.ts +1 -1
  333. package/dist/esm/lib/fields/Number.js +1 -1
  334. package/dist/esm/lib/fields/Relation.d.ts +3 -3
  335. package/dist/esm/lib/fields/Relation.js +3 -3
  336. package/dist/esm/lib/fields/Select.d.ts +1 -1
  337. package/dist/esm/lib/fields/Select.js +1 -1
  338. package/dist/esm/lib/fields/SelfRelation.d.ts +1 -1
  339. package/dist/esm/lib/fields/SelfRelation.js +2 -2
  340. package/dist/esm/lib/fields/SimpleList.d.ts +1 -1
  341. package/dist/esm/lib/fields/SimpleList.js +1 -1
  342. package/dist/esm/lib/fields/String.d.ts +1 -1
  343. package/dist/esm/lib/fields/String.js +3 -3
  344. package/dist/esm/lib/fields/index.d.ts +15 -15
  345. package/dist/esm/lib/fields/index.js +15 -15
  346. package/dist/esm/lib/hooks.d.ts +3 -3
  347. package/dist/esm/lib/routeableContent.js +1 -1
  348. package/dist/esm/lib/types/index.d.ts +2 -2
  349. package/dist/esm/lib/utils/getListField.d.ts +1 -1
  350. package/dist/esm/lib/utils/getSchemas.d.ts +1 -1
  351. package/dist/esm/lib/utils/getTranslation.d.ts +2 -2
  352. package/dist/esm/lib/utils/getTranslation.js +1 -1
  353. package/dist/esm/lib/utils/isTranslatableObject.d.ts +1 -1
  354. package/dist/esm/lib/utils/translateObject.d.ts +2 -2
  355. package/dist/esm/lib/utils/translateObject.js +3 -3
  356. package/dist/esm/literals/definitions.d.ts +1 -1
  357. package/dist/esm/literals/definitions.js +1 -1
  358. package/dist/esm/literals/index.d.ts +3 -3
  359. package/dist/esm/literals/index.js +3 -3
  360. package/dist/esm/literals/manager.d.ts +1 -1
  361. package/dist/esm/literals/manager.js +1 -1
  362. package/dist/esm/manager.d.ts +3 -3
  363. package/dist/esm/manager.js +1 -1
  364. package/dist/esm/media/imageOptimization.d.ts +1 -1
  365. package/dist/esm/media/imageOptimization.js +2 -2
  366. package/dist/esm/media/index.d.ts +4 -4
  367. package/dist/esm/media/index.js +3 -3
  368. package/dist/esm/media/mediaService.d.ts +1 -1
  369. package/dist/esm/orm/backups.js +5 -5
  370. package/dist/esm/orm/createIndexes.js +3 -3
  371. package/dist/esm/orm/database.js +3 -3
  372. package/dist/esm/orm/dbService.d.ts +6 -6
  373. package/dist/esm/orm/index.d.ts +2 -2
  374. package/dist/esm/orm/index.js +17 -17
  375. package/dist/esm/orm/index.js.map +1 -1
  376. package/dist/esm/orm/migrations.d.ts +1 -1
  377. package/dist/esm/orm/migrations.js +4 -4
  378. package/dist/esm/orm/mongodbPeer.js +1 -1
  379. package/dist/esm/orm/operations/clear.d.ts +3 -2
  380. package/dist/esm/orm/operations/clear.d.ts.map +1 -1
  381. package/dist/esm/orm/operations/clear.js +3 -4
  382. package/dist/esm/orm/operations/clear.js.map +1 -1
  383. package/dist/esm/orm/operations/create.d.ts +4 -4
  384. package/dist/esm/orm/operations/create.js +7 -7
  385. package/dist/esm/orm/operations/delete.d.ts +3 -3
  386. package/dist/esm/orm/operations/delete.js +5 -5
  387. package/dist/esm/orm/operations/find.d.ts +2 -2
  388. package/dist/esm/orm/operations/find.js +3 -3
  389. package/dist/esm/orm/operations/findDependencies.d.ts +2 -2
  390. package/dist/esm/orm/operations/findDependencies.js +4 -4
  391. package/dist/esm/orm/operations/get.d.ts +3 -3
  392. package/dist/esm/orm/operations/get.js +3 -3
  393. package/dist/esm/orm/operations/getAll.d.ts +2 -2
  394. package/dist/esm/orm/operations/getAll.js +2 -2
  395. package/dist/esm/orm/operations/list.d.ts +2 -2
  396. package/dist/esm/orm/operations/list.js +3 -3
  397. package/dist/esm/orm/operations/update.d.ts +5 -5
  398. package/dist/esm/orm/operations/update.js +8 -8
  399. package/dist/esm/orm/operations/updateMany.d.ts +4 -4
  400. package/dist/esm/orm/operations/updateMany.js +4 -4
  401. package/dist/esm/orm/operations/upsert.d.ts +3 -3
  402. package/dist/esm/orm/operations/upsert.js +4 -4
  403. package/dist/esm/orm/utils/deepDeleteNulls.js +1 -1
  404. package/dist/esm/orm/utils/parseId.d.ts +1 -1
  405. package/dist/esm/orm/utils/parseId.js +1 -1
  406. package/dist/esm/orm/utils/transformObjectIdsToStrings.js +1 -1
  407. package/dist/esm/orm/utils/transformStringToObjectIds.js +1 -1
  408. package/dist/esm/orm/versions.d.ts +1 -1
  409. package/dist/esm/orm/versions.js +7 -7
  410. package/dist/esm/plugins.d.ts +9 -9
  411. package/dist/esm/schemas/manager/comments.js +1 -1
  412. package/dist/esm/schemas/manager/literals/upsert.js +1 -1
  413. package/dist/esm/schemas/manager/localeVariants.d.ts +96 -96
  414. package/dist/esm/schemas/manager/localeVariants.js +1 -1
  415. package/dist/esm/schemas/manager/media/finalizeUpload.js +1 -1
  416. package/dist/esm/schemas/manager/media/getMediaUrl.js +1 -1
  417. package/dist/esm/schemas/manager/media/listFolders.js +1 -1
  418. package/dist/esm/schemas/web/page.d.ts +40 -40
  419. package/dist/esm/schemas/web/page.js +1 -1
  420. package/dist/esm/schemas/web/previewPage.d.ts +28 -28
  421. package/dist/esm/schemas/web/previewPage.js +1 -1
  422. package/dist/esm/translation/document.d.ts +3 -3
  423. package/dist/esm/translation/index.d.ts +4 -4
  424. package/dist/esm/translation/index.js +3 -3
  425. package/dist/esm/translation/translationService.d.ts +1 -1
  426. package/dist/esm/web/client.d.ts +1 -1
  427. package/dist/esm/web/client.js +1 -1
  428. package/dist/esm/web/index.d.ts +2 -2
  429. package/dist/esm/web/index.js +2 -2
  430. package/dist/esm/web/page.d.ts +1 -1
  431. package/dist/tsconfig.build.tsbuildinfo +1 -1
  432. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import type { MarkTourSeenInput } from "../../../../schemas/manager/auth/tutorials";
2
- import { RakunRequestContext } from "../../../context";
1
+ import type { MarkTourSeenInput } from "../../../../schemas/manager/auth/tutorials.js";
2
+ import { RakunRequestContext } from "../../../context.js";
3
3
  export declare const markTourSeenHandler: ({ input, ctx, }: {
4
4
  input: MarkTourSeenInput;
5
5
  ctx: RakunRequestContext;
@@ -13,12 +13,12 @@ export declare const markTourSeenHandler: ({ input, ctx, }: {
13
13
  _type: "ManagerRole";
14
14
  _id: string;
15
15
  _schemaVersion?: number | undefined;
16
- _visibility?: import("../../../..").DocumentVisibility | undefined;
17
- _visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
16
+ _visibility?: import("../../../../index.js").DocumentVisibility | undefined;
17
+ _visibilityBeforeTrash?: Exclude<import("../../../../index.js").DocumentVisibility, "trash"> | undefined;
18
18
  _trashed?: boolean | undefined;
19
19
  _revision?: number | undefined;
20
20
  _localeVariantGroupId?: string | undefined;
21
- _localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
21
+ _localeVariantRole?: import("zod").infer<typeof import("../../../../index.js").LocaleVariantRole> | undefined;
22
22
  trashedAt?: Date | undefined;
23
23
  trashedBy?: string | undefined;
24
24
  createdAt?: Date | undefined;
@@ -39,12 +39,12 @@ export declare const markTourSeenHandler: ({ input, ctx, }: {
39
39
  tutorialsPromptedAt?: Date | undefined;
40
40
  seenTours?: (string | undefined)[] | undefined;
41
41
  _schemaVersion?: number | undefined;
42
- _visibility?: import("../../../..").DocumentVisibility | undefined;
43
- _visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
42
+ _visibility?: import("../../../../index.js").DocumentVisibility | undefined;
43
+ _visibilityBeforeTrash?: Exclude<import("../../../../index.js").DocumentVisibility, "trash"> | undefined;
44
44
  _trashed?: boolean | undefined;
45
45
  _revision?: number | undefined;
46
46
  _localeVariantGroupId?: string | undefined;
47
- _localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
47
+ _localeVariantRole?: import("zod").infer<typeof import("../../../../index.js").LocaleVariantRole> | undefined;
48
48
  trashedAt?: Date | undefined;
49
49
  trashedBy?: string | undefined;
50
50
  createdAt?: Date | undefined;
@@ -1,6 +1,6 @@
1
- import { ManagerUser } from "../../../../internal-content-types";
2
- import { getMongoService } from "../../../../orm";
3
- import { populateRelations } from "../../../utils/populates/populateRelations";
1
+ import { ManagerUser } from "../../../../internal-content-types/index.js";
2
+ import { getMongoService } from "../../../../orm/index.js";
3
+ import { populateRelations } from "../../../utils/populates/populateRelations.js";
4
4
  export const markTourSeenHandler = async ({ input, ctx, }) => {
5
5
  const user = ctx.getUser();
6
6
  const db = await getMongoService();
@@ -1,5 +1,5 @@
1
- import { 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,4 +1,4 @@
1
- import { RakunRequestContext } from "../../../../context";
1
+ import { RakunRequestContext } from "../../../../context.js";
2
2
  export declare const enrollTotpHandler: ({ ctx, }: {
3
3
  ctx: RakunRequestContext;
4
4
  }) => Promise<{
@@ -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,9 +1,9 @@
1
1
  import * as OTPAuth from "otpauth";
2
- import { MfaChallenge, ManagerUser, UserMfa, Session, } from "../../../../../internal-content-types";
3
- import { throwAppError } from "../../../../../lib/errors";
4
- import { getMongoService } from "../../../../../orm";
5
- import { SESSION_MAX_AGE_MS } from "../../../../sessionCookie";
6
- import { assertAuthRateLimit, resetAuthRateLimit, } from "../../../../utils/authRateLimit";
2
+ import { MfaChallenge, ManagerUser, UserMfa, Session, } from "../../../../../internal-content-types/index.js";
3
+ import { throwAppError } from "../../../../../lib/errors/index.js";
4
+ import { getMongoService } from "../../../../../orm/index.js";
5
+ import { SESSION_MAX_AGE_MS } from "../../../../sessionCookie.js";
6
+ import { assertAuthRateLimit, resetAuthRateLimit, } from "../../../../utils/authRateLimit.js";
7
7
  export const verifyTotpHandler = async ({ input, }) => {
8
8
  const db = await getMongoService();
9
9
  const { challenge, code } = input;
@@ -1,5 +1,5 @@
1
- import { UpdateAccountInput } from "../../../../schemas/manager/auth/accountInfo";
2
- import { RakunRequestContext } from "../../../context";
1
+ import { UpdateAccountInput } from "../../../../schemas/manager/auth/accountInfo.js";
2
+ import { RakunRequestContext } from "../../../context.js";
3
3
  export declare const updateAccountHandler: ({ input, ctx, }: {
4
4
  input: UpdateAccountInput;
5
5
  ctx: RakunRequestContext;
@@ -13,12 +13,12 @@ export declare const updateAccountHandler: ({ input, ctx, }: {
13
13
  _type: "ManagerRole";
14
14
  _id: string;
15
15
  _schemaVersion?: number | undefined;
16
- _visibility?: import("../../../..").DocumentVisibility | undefined;
17
- _visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
16
+ _visibility?: import("../../../../index.js").DocumentVisibility | undefined;
17
+ _visibilityBeforeTrash?: Exclude<import("../../../../index.js").DocumentVisibility, "trash"> | undefined;
18
18
  _trashed?: boolean | undefined;
19
19
  _revision?: number | undefined;
20
20
  _localeVariantGroupId?: string | undefined;
21
- _localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
21
+ _localeVariantRole?: import("zod").infer<typeof import("../../../../index.js").LocaleVariantRole> | undefined;
22
22
  trashedAt?: Date | undefined;
23
23
  trashedBy?: string | undefined;
24
24
  createdAt?: Date | undefined;
@@ -39,12 +39,12 @@ export declare const updateAccountHandler: ({ input, ctx, }: {
39
39
  tutorialsPromptedAt?: Date | undefined;
40
40
  seenTours?: (string | undefined)[] | undefined;
41
41
  _schemaVersion?: number | undefined;
42
- _visibility?: import("../../../..").DocumentVisibility | undefined;
43
- _visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
42
+ _visibility?: import("../../../../index.js").DocumentVisibility | undefined;
43
+ _visibilityBeforeTrash?: Exclude<import("../../../../index.js").DocumentVisibility, "trash"> | undefined;
44
44
  _trashed?: boolean | undefined;
45
45
  _revision?: number | undefined;
46
46
  _localeVariantGroupId?: string | undefined;
47
- _localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
47
+ _localeVariantRole?: import("zod").infer<typeof import("../../../../index.js").LocaleVariantRole> | undefined;
48
48
  trashedAt?: Date | undefined;
49
49
  trashedBy?: string | undefined;
50
50
  createdAt?: Date | undefined;
@@ -1,6 +1,6 @@
1
- import { ManagerUser, Media } from "../../../../internal-content-types";
2
- import { getMongoService } from "../../../../orm";
3
- import { populateRelations } from "../../../utils/populates/populateRelations";
1
+ import { ManagerUser, Media } from "../../../../internal-content-types/index.js";
2
+ import { getMongoService } from "../../../../orm/index.js";
3
+ import { populateRelations } from "../../../utils/populates/populateRelations.js";
4
4
  export const updateAccountHandler = async ({ input, ctx, }) => {
5
5
  const user = ctx.getUser();
6
6
  const db = await getMongoService();
@@ -1,5 +1,5 @@
1
- import { RakunRequestContext } from "../../../context";
2
- import { UpdatePasswordInput } from "../../../../schemas/manager/updatePassword";
1
+ import { RakunRequestContext } from "../../../context.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,8 +1,8 @@
1
- import { ManagerUser, Session } from "../../../../internal-content-types";
2
- import { throwAppError } from "../../../../lib/errors";
3
- import { getMongoService } from "../../../../orm";
4
- import { getSessionCookie } from "../../../sessionCookie";
5
- import { verifyStoredPassword } from "../../../utils/passwords";
1
+ import { ManagerUser, Session } from "../../../../internal-content-types/index.js";
2
+ import { throwAppError } from "../../../../lib/errors/index.js";
3
+ import { getMongoService } from "../../../../orm/index.js";
4
+ import { getSessionCookie } from "../../../sessionCookie.js";
5
+ import { verifyStoredPassword } from "../../../utils/passwords.js";
6
6
  export const updatePasswordHandler = async ({ input, ctx, }) => {
7
7
  const db = await getMongoService();
8
8
  const user = ctx.getUser();
@@ -1,5 +1,5 @@
1
- import type { UpdateTutorialPreferencesInput } from "../../../../schemas/manager/auth/tutorials";
2
- import { RakunRequestContext } from "../../../context";
1
+ import type { UpdateTutorialPreferencesInput } from "../../../../schemas/manager/auth/tutorials.js";
2
+ import { RakunRequestContext } from "../../../context.js";
3
3
  export declare const updateTutorialPreferencesHandler: ({ input, ctx, }: {
4
4
  input: UpdateTutorialPreferencesInput;
5
5
  ctx: RakunRequestContext;
@@ -13,12 +13,12 @@ export declare const updateTutorialPreferencesHandler: ({ input, ctx, }: {
13
13
  _type: "ManagerRole";
14
14
  _id: string;
15
15
  _schemaVersion?: number | undefined;
16
- _visibility?: import("../../../..").DocumentVisibility | undefined;
17
- _visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
16
+ _visibility?: import("../../../../index.js").DocumentVisibility | undefined;
17
+ _visibilityBeforeTrash?: Exclude<import("../../../../index.js").DocumentVisibility, "trash"> | undefined;
18
18
  _trashed?: boolean | undefined;
19
19
  _revision?: number | undefined;
20
20
  _localeVariantGroupId?: string | undefined;
21
- _localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
21
+ _localeVariantRole?: import("zod").infer<typeof import("../../../../index.js").LocaleVariantRole> | undefined;
22
22
  trashedAt?: Date | undefined;
23
23
  trashedBy?: string | undefined;
24
24
  createdAt?: Date | undefined;
@@ -39,12 +39,12 @@ export declare const updateTutorialPreferencesHandler: ({ input, ctx, }: {
39
39
  tutorialsPromptedAt?: Date | undefined;
40
40
  seenTours?: (string | undefined)[] | undefined;
41
41
  _schemaVersion?: number | undefined;
42
- _visibility?: import("../../../..").DocumentVisibility | undefined;
43
- _visibilityBeforeTrash?: Exclude<import("../../../..").DocumentVisibility, "trash"> | undefined;
42
+ _visibility?: import("../../../../index.js").DocumentVisibility | undefined;
43
+ _visibilityBeforeTrash?: Exclude<import("../../../../index.js").DocumentVisibility, "trash"> | undefined;
44
44
  _trashed?: boolean | undefined;
45
45
  _revision?: number | undefined;
46
46
  _localeVariantGroupId?: string | undefined;
47
- _localeVariantRole?: import("zod").infer<typeof import("../../../..").LocaleVariantRole> | undefined;
47
+ _localeVariantRole?: import("zod").infer<typeof import("../../../../index.js").LocaleVariantRole> | undefined;
48
48
  trashedAt?: Date | undefined;
49
49
  trashedBy?: string | undefined;
50
50
  createdAt?: Date | undefined;
@@ -1,6 +1,6 @@
1
- import { ManagerUser } from "../../../../internal-content-types";
2
- import { getMongoService } from "../../../../orm";
3
- import { populateRelations } from "../../../utils/populates/populateRelations";
1
+ import { ManagerUser } from "../../../../internal-content-types/index.js";
2
+ import { getMongoService } from "../../../../orm/index.js";
3
+ import { populateRelations } from "../../../utils/populates/populateRelations.js";
4
4
  export const updateTutorialPreferencesHandler = async ({ input, ctx, }) => {
5
5
  const user = ctx.getUser();
6
6
  const db = await getMongoService();
@@ -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,10 +1,10 @@
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";
6
- import { SESSION_MAX_AGE_MS } from "../../../../sessionCookie";
7
- import { assertAuthRateLimit, resetAuthRateLimit, } from "../../../../utils/authRateLimit";
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
+ import { SESSION_MAX_AGE_MS } from "../../../../sessionCookie.js";
7
+ import { assertAuthRateLimit, resetAuthRateLimit, } from "../../../../utils/authRateLimit.js";
8
8
  export const webauthnAuthVerifyHandler = async ({ input, }) => {
9
9
  const db = await getMongoService();
10
10
  const rateLimitKey = `mfa:webauthn:${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 { BackupRecord, CreateBackupInput } from "../../../../schemas/manager/backups";
1
+ import { RakunRequestContext } from "../../../context.js";
2
+ import { BackupRecord, CreateBackupInput } from "../../../../schemas/manager/backups.js";
3
3
  export declare const createBackupHandler: ({ input, ctx, }: {
4
4
  input: CreateBackupInput;
5
5
  ctx: RakunRequestContext;
@@ -1,5 +1,5 @@
1
- import { getMongoService } from "../../../../orm";
2
- import { checkPermissions } from "../../../utils/checkPermissions";
1
+ import { getMongoService } from "../../../../orm/index.js";
2
+ import { checkPermissions } from "../../../utils/checkPermissions.js";
3
3
  export const createBackupHandler = async ({ input, ctx, }) => {
4
4
  const user = ctx.getUser();
5
5
  checkPermissions(user, ["content.Backup.updateAny"]);
@@ -1,5 +1,5 @@
1
- import { RakunRequestContext } from "../../../context";
2
- import { ListBackupsOutput } from "../../../../schemas/manager/backups";
1
+ import { RakunRequestContext } from "../../../context.js";
2
+ import { ListBackupsOutput } from "../../../../schemas/manager/backups.js";
3
3
  export declare const listBackupsHandler: ({ ctx, }: {
4
4
  ctx: RakunRequestContext;
5
5
  }) => Promise<ListBackupsOutput>;
@@ -1,5 +1,5 @@
1
- import { getMongoService } from "../../../../orm";
2
- import { checkPermissions } from "../../../utils/checkPermissions";
1
+ import { getMongoService } from "../../../../orm/index.js";
2
+ import { checkPermissions } from "../../../utils/checkPermissions.js";
3
3
  export const listBackupsHandler = async ({ ctx, }) => {
4
4
  const user = ctx.getUser();
5
5
  checkPermissions(user, ["content.Backup.readAny"]);
@@ -1,5 +1,5 @@
1
- import { RakunRequestContext } from "../../../context";
2
- import { RestoreBackupInput, RestoreBackupOutput } from "../../../../schemas/manager/backups";
1
+ import { RakunRequestContext } from "../../../context.js";
2
+ import { RestoreBackupInput, RestoreBackupOutput } from "../../../../schemas/manager/backups.js";
3
3
  export declare const restoreBackupHandler: ({ input, ctx, }: {
4
4
  input: RestoreBackupInput;
5
5
  ctx: RakunRequestContext;
@@ -1 +1 @@
1
- {"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/backups/restore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qCAAqC,CAAC;AAG7C,eAAO,MAAM,oBAAoB,GAAU,iBAGxC;IACD,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,mBAAmB,CAAC;CAC1B,KAAG,OAAO,CAAC,mBAAmB,CAc9B,CAAC"}
1
+ {"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/backups/restore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qCAAqC,CAAC;AAG7C,eAAO,MAAM,oBAAoB,GAAU,iBAGxC;IACD,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,mBAAmB,CAAC;CAC1B,KAAG,OAAO,CAAC,mBAAmB,CAe9B,CAAC"}
@@ -1,6 +1,7 @@
1
- import { Logger } from "../../../../lib/Logger";
2
- import { getMongoService } from "../../../../orm";
3
- import { checkPermissions } from "../../../utils/checkPermissions";
1
+ import { Logger } from "../../../../lib/Logger.js";
2
+ import { syncAdminRole } from "../../../../internal-content-types/syncAdminRole.js";
3
+ import { getMongoService } from "../../../../orm/index.js";
4
+ import { checkPermissions } from "../../../utils/checkPermissions.js";
4
5
  export const restoreBackupHandler = async ({ input, ctx, }) => {
5
6
  const user = ctx.getUser();
6
7
  checkPermissions(user, ["content.Backup.updateAny"]);
@@ -9,6 +10,7 @@ export const restoreBackupHandler = async ({ input, ctx, }) => {
9
10
  ...input,
10
11
  actorId: user._id,
11
12
  });
13
+ await syncAdminRole(db);
12
14
  Logger.addTrace("manager.backups.restore: backup restored", {
13
15
  backupId: result.backup._id,
14
16
  safetyBackupId: result.safetyBackup._id,
@@ -1 +1 @@
1
- {"version":3,"file":"restore.js","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/backups/restore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EAAE,EACzC,KAAK,EACL,GAAG,GAIJ,EAAgC,EAAE;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IAC3B,gBAAgB,CAAC,IAAI,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC;IACrD,MAAM,EAAE,GAAG,MAAM,eAAe,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QACtC,GAAG,KAAK;QACR,OAAO,EAAE,IAAI,CAAC,GAAG;KAClB,CAAC,CAAC;IACH,MAAM,CAAC,QAAQ,CAAC,0CAA0C,EAAE;QAC1D,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG;QAC3B,cAAc,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG;QACvC,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"restore.js","sourceRoot":"","sources":["../../../../../../src/api/routes/manager/backups/restore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EAAE,EACzC,KAAK,EACL,GAAG,GAIJ,EAAgC,EAAE;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IAC3B,gBAAgB,CAAC,IAAI,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC;IACrD,MAAM,EAAE,GAAG,MAAM,eAAe,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QACtC,GAAG,KAAK;QACR,OAAO,EAAE,IAAI,CAAC,GAAG;KAClB,CAAC,CAAC;IACH,MAAM,aAAa,CAAC,EAAE,CAAC,CAAC;IACxB,MAAM,CAAC,QAAQ,CAAC,0CAA0C,EAAE;QAC1D,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG;QAC3B,cAAc,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG;QACvC,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { CreateCommentInput, CreateCommentOutput, ListCommentsInput, ListCommentsOutput, ToggleCommentReactionInput, ToggleCommentReactionOutput } from "../../../schemas/manager/comments";
2
- import type { RakunRequestContext } from "../../context";
1
+ import type { CreateCommentInput, CreateCommentOutput, ListCommentsInput, ListCommentsOutput, ToggleCommentReactionInput, ToggleCommentReactionOutput } from "../../../schemas/manager/comments.js";
2
+ import type { RakunRequestContext } from "../../context.js";
3
3
  export declare const listCommentsHandler: ({ input, ctx, }: {
4
4
  input: ListCommentsInput;
5
5
  ctx: RakunRequestContext;
@@ -1,9 +1,9 @@
1
- import { ContentComment, ManagerUser } from "../../../internal-content-types";
2
- import { throwAppError } from "../../../lib/errors";
3
- import { getMongoService } from "../../../orm";
4
- import { checkOwnership } from "../../utils/checkOwnership";
5
- import { requireContentType } from "../../utils/requireContentType";
6
- import { fallbackMentionUser, toMentionUser, } from "./users";
1
+ import { ContentComment, ManagerUser } from "../../../internal-content-types/index.js";
2
+ import { throwAppError } from "../../../lib/errors/index.js";
3
+ import { getMongoService } from "../../../orm/index.js";
4
+ import { checkOwnership } from "../../utils/checkOwnership.js";
5
+ import { requireContentType } from "../../utils/requireContentType.js";
6
+ import { fallbackMentionUser, toMentionUser, } from "./users.js";
7
7
  const DEFAULT_COMMENT_LIMIT = 100;
8
8
  const MAX_COMMENT_LIMIT = 200;
9
9
  const REACTION_KEY_SEPARATOR = ":";
@@ -1,5 +1,5 @@
1
- import type { ContentTypeInput } from "../../../schemas/manager/contentType";
2
- import type { RakunRequestContext } from "../../context";
1
+ import type { ContentTypeInput } from "../../../schemas/manager/contentType.js";
2
+ import type { RakunRequestContext } from "../../context.js";
3
3
  export declare const contentTypeHandler: ({ input, ctx, }: {
4
4
  input: ContentTypeInput;
5
5
  ctx: RakunRequestContext;
@@ -21,9 +21,9 @@ export declare const contentTypeHandler: ({ input, ctx, }: {
21
21
  listFields: string[] | undefined;
22
22
  isHiddenFromManager: boolean | undefined;
23
23
  schemaVersion: number | undefined;
24
- versioning: boolean | import("../../..").VersioningOptions | undefined;
24
+ versioning: boolean | import("../../../index.js").VersioningOptions | undefined;
25
25
  documentVisibility: boolean | undefined;
26
- permissions: import("../../../lib/ContentType").ContentTypePermissions | undefined;
26
+ permissions: import("../../../lib/ContentType.js").ContentTypePermissions | undefined;
27
27
  dynamicData: boolean | {
28
28
  fields?: string[] | undefined;
29
29
  lists?: string[] | undefined;
@@ -40,12 +40,12 @@ export declare const contentTypeHandler: ({ input, ctx, }: {
40
40
  fields: {
41
41
  [k: string]: {
42
42
  schema: undefined;
43
- config: ReturnType<import("../../..").AnyField["getConfig"]>;
44
- isRequired: ReturnType<import("../../..").AnyField["getIsRequired"]>;
45
- isTranslatable: ReturnType<import("../../..").AnyField["getIsTranslatable"]>;
46
- visibility: ReturnType<import("../../..").AnyField["getVisibility"]>;
47
- isDynamic: ReturnType<import("../../..").AnyField["getIsDynamic"]>;
48
- condition: ReturnType<import("../../..").AnyField["getCondition"]>;
43
+ config: ReturnType<import("../../../index.js").AnyField["getConfig"]>;
44
+ isRequired: ReturnType<import("../../../index.js").AnyField["getIsRequired"]>;
45
+ isTranslatable: ReturnType<import("../../../index.js").AnyField["getIsTranslatable"]>;
46
+ visibility: ReturnType<import("../../../index.js").AnyField["getVisibility"]>;
47
+ isDynamic: ReturnType<import("../../../index.js").AnyField["getIsDynamic"]>;
48
+ condition: ReturnType<import("../../../index.js").AnyField["getCondition"]>;
49
49
  } & Record<string, unknown>;
50
50
  };
51
51
  } | null;
@@ -1,6 +1,6 @@
1
- import { encodeContentTypeForManager, getContentTypeByName, } from "../../../lib/Registry";
2
- import { getContentPermission } from "../../../lib/Permissions";
3
- import { checkAnyPermissions } from "../../utils/checkPermissions";
1
+ import { encodeContentTypeForManager, getContentTypeByName, } from "../../../lib/Registry.js";
2
+ import { getContentPermission } from "../../../lib/Permissions.js";
3
+ import { checkAnyPermissions } from "../../utils/checkPermissions.js";
4
4
  export const contentTypeHandler = ({ input, ctx, }) => {
5
5
  const contentType = getContentTypeByName(input.contentType);
6
6
  if (!contentType) {
@@ -16,9 +16,9 @@ export declare const contentTypesHandler: () => Promise<{
16
16
  listFields: string[] | undefined;
17
17
  isHiddenFromManager: boolean | undefined;
18
18
  schemaVersion: number | undefined;
19
- versioning: boolean | import("../../..").VersioningOptions | undefined;
19
+ versioning: boolean | import("../../../index.js").VersioningOptions | undefined;
20
20
  documentVisibility: boolean | undefined;
21
- permissions: import("../../../lib/ContentType").ContentTypePermissions | undefined;
21
+ permissions: import("../../../lib/ContentType.js").ContentTypePermissions | undefined;
22
22
  dynamicData: boolean | {
23
23
  fields?: string[] | undefined;
24
24
  lists?: string[] | undefined;
@@ -35,12 +35,12 @@ export declare const contentTypesHandler: () => Promise<{
35
35
  fields: {
36
36
  [k: string]: {
37
37
  schema: undefined;
38
- config: ReturnType<import("../../..").AnyField["getConfig"]>;
39
- isRequired: ReturnType<import("../../..").AnyField["getIsRequired"]>;
40
- isTranslatable: ReturnType<import("../../..").AnyField["getIsTranslatable"]>;
41
- visibility: ReturnType<import("../../..").AnyField["getVisibility"]>;
42
- isDynamic: ReturnType<import("../../..").AnyField["getIsDynamic"]>;
43
- condition: ReturnType<import("../../..").AnyField["getCondition"]>;
38
+ config: ReturnType<import("../../../index.js").AnyField["getConfig"]>;
39
+ isRequired: ReturnType<import("../../../index.js").AnyField["getIsRequired"]>;
40
+ isTranslatable: ReturnType<import("../../../index.js").AnyField["getIsTranslatable"]>;
41
+ visibility: ReturnType<import("../../../index.js").AnyField["getVisibility"]>;
42
+ isDynamic: ReturnType<import("../../../index.js").AnyField["getIsDynamic"]>;
43
+ condition: ReturnType<import("../../../index.js").AnyField["getCondition"]>;
44
44
  } & Record<string, unknown>;
45
45
  };
46
46
  }[]>;
@@ -1,3 +1,3 @@
1
- import { getContentTypesForManager } from "../../../lib/Registry";
1
+ import { getContentTypesForManager } from "../../../lib/Registry.js";
2
2
  export const contentTypesHandler = async () => getContentTypesForManager();
3
3
  //# sourceMappingURL=contentTypes.js.map
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import { RakunRequestContext } from "../../context";
3
- import { CreateInput } from "../../../schemas/manager/create";
2
+ import { RakunRequestContext } from "../../context.js";
3
+ import { CreateInput } from "../../../schemas/manager/create.js";
4
4
  export declare const createHandler: ({ input, ctx, }: {
5
5
  input: CreateInput;
6
6
  ctx: RakunRequestContext;
@@ -9,12 +9,12 @@ export declare const createHandler: ({ input, ctx, }: {
9
9
  _type: string;
10
10
  _id: string;
11
11
  _schemaVersion?: number | undefined;
12
- _visibility?: import("../../..").DocumentVisibility | undefined;
13
- _visibilityBeforeTrash?: Exclude<import("../../..").DocumentVisibility, "trash"> | undefined;
12
+ _visibility?: import("../../../index.js").DocumentVisibility | undefined;
13
+ _visibilityBeforeTrash?: Exclude<import("../../../index.js").DocumentVisibility, "trash"> | undefined;
14
14
  _trashed?: boolean | undefined;
15
15
  _revision?: number | undefined;
16
16
  _localeVariantGroupId?: string | undefined;
17
- _localeVariantRole?: z.infer<typeof import("../../..").LocaleVariantRole> | undefined;
17
+ _localeVariantRole?: z.infer<typeof import("../../../index.js").LocaleVariantRole> | undefined;
18
18
  trashedAt?: Date | undefined;
19
19
  trashedBy?: string | undefined;
20
20
  createdAt?: Date | undefined;
@@ -1,13 +1,13 @@
1
1
  import { z } from "zod";
2
- import { throwAppError } from "../../../lib/errors";
3
- import { Logger } from "../../../lib/Logger";
4
- import { getMongoService } from "../../../orm";
5
- import { DbErrorInvalidData, DbErrorConflict } from "../../../orm/dbService";
6
- import { checkPermissions } from "../../utils/checkPermissions";
7
- import { requireContentType } from "../../utils/requireContentType";
8
- import { checkRevalidatePath } from "../../utils/routes/revalidatePath";
9
- import { getContentPermission } from "../../../lib/Permissions";
10
- import { sanitizeManagerOutput } from "../../utils/sanitizeManagerOutput";
2
+ import { throwAppError } from "../../../lib/errors/index.js";
3
+ import { Logger } from "../../../lib/Logger.js";
4
+ import { getMongoService } from "../../../orm/index.js";
5
+ import { DbErrorInvalidData, DbErrorConflict } from "../../../orm/dbService.js";
6
+ import { checkPermissions } from "../../utils/checkPermissions.js";
7
+ import { requireContentType } from "../../utils/requireContentType.js";
8
+ import { checkRevalidatePath } from "../../utils/routes/revalidatePath.js";
9
+ import { getContentPermission } from "../../../lib/Permissions.js";
10
+ import { sanitizeManagerOutput } from "../../utils/sanitizeManagerOutput.js";
11
11
  export const createHandler = async ({ input, ctx, }) => {
12
12
  const db = await getMongoService();
13
13
  const { contentType: contentTypeName } = input;
@@ -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;