@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.
Files changed (326) hide show
  1. package/dist/cjs/api/operations/manager.js +8 -5
  2. package/dist/cjs/api/operations/manager.js.map +1 -1
  3. package/dist/cjs/api/routes/manager/{auth/media → media}/createFolder.js +7 -7
  4. package/dist/cjs/api/routes/manager/media/createFolder.js.map +1 -0
  5. package/dist/cjs/api/routes/manager/{auth/media → media}/finalizeUpload.js +50 -8
  6. package/dist/cjs/api/routes/manager/media/finalizeUpload.js.map +1 -0
  7. package/dist/cjs/api/routes/manager/{auth/media → media}/getMediaUrl.js +3 -3
  8. package/dist/cjs/api/routes/manager/media/getMediaUrl.js.map +1 -0
  9. package/dist/cjs/api/routes/manager/{auth/media → media}/listFolders.js +4 -4
  10. package/dist/cjs/api/routes/manager/media/listFolders.js.map +1 -0
  11. package/dist/cjs/api/routes/manager/media/prepareUpload.js +59 -0
  12. package/dist/cjs/api/routes/manager/media/prepareUpload.js.map +1 -0
  13. package/dist/cjs/api/routes/manager/{auth/media → media}/uploadBinary.js +45 -5
  14. package/dist/cjs/api/routes/manager/media/uploadBinary.js.map +1 -0
  15. package/dist/cjs/api/utils/routes/revalidatePath.js +7 -7
  16. package/dist/cjs/api/utils/routes/revalidatePath.js.map +1 -1
  17. package/dist/cjs/api/utils/routes/updateRoutesMap.js +77 -0
  18. package/dist/cjs/api/utils/routes/updateRoutesMap.js.map +1 -1
  19. package/dist/cjs/bootstrapState.js.map +1 -1
  20. package/dist/cjs/index.js +2 -2
  21. package/dist/cjs/index.js.map +1 -1
  22. package/dist/esm/api/context.d.ts +1 -1
  23. package/dist/esm/api/context.js +2 -2
  24. package/dist/esm/api/operations/custom.d.ts +1 -1
  25. package/dist/esm/api/operations/custom.js +1 -1
  26. package/dist/esm/api/operations/index.d.ts +41 -41
  27. package/dist/esm/api/operations/index.js +7 -7
  28. package/dist/esm/api/operations/manager-contract.d.ts +30 -30
  29. package/dist/esm/api/operations/manager-contract.js +4 -4
  30. package/dist/esm/api/operations/manager.d.ts +31 -31
  31. package/dist/esm/api/operations/manager.d.ts.map +1 -1
  32. package/dist/esm/api/operations/manager.js +37 -34
  33. package/dist/esm/api/operations/manager.js.map +1 -1
  34. package/dist/esm/api/operations/types.d.ts +1 -1
  35. package/dist/esm/api/operations/web-contract.d.ts +3 -3
  36. package/dist/esm/api/operations/web-contract.js +3 -3
  37. package/dist/esm/api/operations/web.d.ts +4 -4
  38. package/dist/esm/api/operations/web.js +5 -5
  39. package/dist/esm/api/proxies/context.d.ts +2 -2
  40. package/dist/esm/api/proxies/index.d.ts +4 -4
  41. package/dist/esm/api/proxies/index.js +1 -1
  42. package/dist/esm/api/routes/manager/auth/accountInfo.d.ts +2 -2
  43. package/dist/esm/api/routes/manager/auth/accountInfo.js +3 -3
  44. package/dist/esm/api/routes/manager/auth/deleteSession.d.ts +2 -2
  45. package/dist/esm/api/routes/manager/auth/deleteSession.js +3 -3
  46. package/dist/esm/api/routes/manager/auth/login.d.ts +1 -1
  47. package/dist/esm/api/routes/manager/auth/login.js +4 -4
  48. package/dist/esm/api/routes/manager/auth/logout.d.ts +1 -1
  49. package/dist/esm/api/routes/manager/auth/logout.js +3 -3
  50. package/dist/esm/api/routes/manager/auth/totp/confirmTotp.d.ts +2 -2
  51. package/dist/esm/api/routes/manager/auth/totp/confirmTotp.js +2 -2
  52. package/dist/esm/api/routes/manager/auth/totp/enrollTotp.d.ts +1 -1
  53. package/dist/esm/api/routes/manager/auth/totp/enrollTotp.js +3 -3
  54. package/dist/esm/api/routes/manager/auth/totp/verifyTotp.d.ts +1 -1
  55. package/dist/esm/api/routes/manager/auth/totp/verifyTotp.js +3 -3
  56. package/dist/esm/api/routes/manager/auth/updatePassword.d.ts +2 -2
  57. package/dist/esm/api/routes/manager/auth/updatePassword.js +3 -3
  58. package/dist/esm/api/routes/manager/auth/webauthn/webauthnAuthOptions.js +4 -4
  59. package/dist/esm/api/routes/manager/auth/webauthn/webauthnAuthVerify.js +4 -4
  60. package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterOptions.d.ts +2 -2
  61. package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterOptions.js +3 -3
  62. package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterVerify.d.ts +1 -1
  63. package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterVerify.js +4 -4
  64. package/dist/esm/api/routes/manager/create.d.ts +2 -2
  65. package/dist/esm/api/routes/manager/create.js +8 -8
  66. package/dist/esm/api/routes/manager/delete.d.ts +2 -2
  67. package/dist/esm/api/routes/manager/delete.js +8 -8
  68. package/dist/esm/api/routes/manager/get.d.ts +2 -2
  69. package/dist/esm/api/routes/manager/get.js +6 -6
  70. package/dist/esm/api/routes/manager/list.d.ts +2 -2
  71. package/dist/esm/api/routes/manager/list.js +8 -8
  72. package/dist/esm/api/routes/manager/literals/list.d.ts +2 -2
  73. package/dist/esm/api/routes/manager/literals/list.js +5 -5
  74. package/dist/esm/api/routes/manager/literals/upsert.d.ts +2 -2
  75. package/dist/esm/api/routes/manager/literals/upsert.js +6 -6
  76. package/dist/esm/api/routes/manager/{auth/media → media}/createFolder.d.ts +2 -2
  77. package/dist/esm/api/routes/manager/media/createFolder.d.ts.map +1 -0
  78. package/dist/esm/api/routes/manager/{auth/media → media}/createFolder.js +7 -7
  79. package/dist/esm/api/routes/manager/media/createFolder.js.map +1 -0
  80. package/dist/esm/api/routes/manager/{auth/media → media}/finalizeUpload.d.ts +2 -2
  81. package/dist/esm/api/routes/manager/media/finalizeUpload.d.ts.map +1 -0
  82. package/dist/esm/api/routes/manager/{auth/media → media}/finalizeUpload.js +50 -8
  83. package/dist/esm/api/routes/manager/media/finalizeUpload.js.map +1 -0
  84. package/dist/esm/api/routes/manager/{auth/media → media}/getMediaUrl.d.ts +2 -2
  85. package/dist/esm/api/routes/manager/media/getMediaUrl.d.ts.map +1 -0
  86. package/dist/esm/api/routes/manager/{auth/media → media}/getMediaUrl.js +3 -3
  87. package/dist/esm/api/routes/manager/media/getMediaUrl.js.map +1 -0
  88. package/dist/esm/api/routes/manager/{auth/media → media}/listFolders.d.ts +2 -2
  89. package/dist/esm/api/routes/manager/media/listFolders.d.ts.map +1 -0
  90. package/dist/esm/api/routes/manager/{auth/media → media}/listFolders.js +4 -4
  91. package/dist/esm/api/routes/manager/media/listFolders.js.map +1 -0
  92. package/dist/esm/api/routes/manager/{auth/media → media}/prepareUpload.d.ts +2 -2
  93. package/dist/esm/api/routes/manager/media/prepareUpload.d.ts.map +1 -0
  94. package/dist/esm/api/routes/manager/media/prepareUpload.js +55 -0
  95. package/dist/esm/api/routes/manager/media/prepareUpload.js.map +1 -0
  96. package/dist/esm/api/routes/manager/{auth/media → media}/uploadBinary.d.ts +1 -1
  97. package/dist/esm/api/routes/manager/media/uploadBinary.d.ts.map +1 -0
  98. package/dist/esm/api/routes/manager/{auth/media → media}/uploadBinary.js +45 -5
  99. package/dist/esm/api/routes/manager/media/uploadBinary.js.map +1 -0
  100. package/dist/esm/api/routes/manager/setDefaultLanguage.d.ts +2 -2
  101. package/dist/esm/api/routes/manager/setDefaultLanguage.js +4 -4
  102. package/dist/esm/api/routes/manager/update.d.ts +2 -2
  103. package/dist/esm/api/routes/manager/update.js +8 -8
  104. package/dist/esm/api/routes/web/page.d.ts +1 -1
  105. package/dist/esm/api/routes/web/page.js +13 -13
  106. package/dist/esm/api/sessionCookie.d.ts +1 -1
  107. package/dist/esm/api/utils/checkFailureCase.d.ts +1 -1
  108. package/dist/esm/api/utils/checkFailureCase.js +1 -1
  109. package/dist/esm/api/utils/checkOwnership.d.ts +2 -2
  110. package/dist/esm/api/utils/checkOwnership.js +3 -3
  111. package/dist/esm/api/utils/checkPermissions.d.ts +2 -2
  112. package/dist/esm/api/utils/checkPermissions.js +2 -2
  113. package/dist/esm/api/utils/getLanguages.js +2 -2
  114. package/dist/esm/api/utils/getLink.d.ts +2 -2
  115. package/dist/esm/api/utils/getLink.js +4 -4
  116. package/dist/esm/api/utils/getUser.d.ts +1 -1
  117. package/dist/esm/api/utils/getUser.js +4 -4
  118. package/dist/esm/api/utils/parseId.d.ts +1 -1
  119. package/dist/esm/api/utils/parseId.js +1 -1
  120. package/dist/esm/api/utils/passwords.js +1 -1
  121. package/dist/esm/api/utils/populates/populateLinks.d.ts +2 -2
  122. package/dist/esm/api/utils/populates/populateLinks.js +4 -4
  123. package/dist/esm/api/utils/populates/populateRelations.d.ts +2 -2
  124. package/dist/esm/api/utils/populates/populateRelations.js +6 -6
  125. package/dist/esm/api/utils/redirects/resolveRedirect.js +2 -2
  126. package/dist/esm/api/utils/routes/revalidatePath.js +11 -11
  127. package/dist/esm/api/utils/routes/revalidatePath.js.map +1 -1
  128. package/dist/esm/api/utils/routes/routeDefinitions.d.ts +1 -1
  129. package/dist/esm/api/utils/routes/routeMapHelpers.d.ts +3 -3
  130. package/dist/esm/api/utils/routes/routeMapHelpers.js +6 -6
  131. package/dist/esm/api/utils/routes/syncConfiguredRoutes.d.ts +2 -2
  132. package/dist/esm/api/utils/routes/syncConfiguredRoutes.js +5 -5
  133. package/dist/esm/api/utils/routes/updateRoutesMap.d.ts +2 -2
  134. package/dist/esm/api/utils/routes/updateRoutesMap.d.ts.map +1 -1
  135. package/dist/esm/api/utils/routes/updateRoutesMap.js +80 -3
  136. package/dist/esm/api/utils/routes/updateRoutesMap.js.map +1 -1
  137. package/dist/esm/api/utils/transformObjectIdsToStrings.js +1 -1
  138. package/dist/esm/api/utils/transformStringToObjectIds.js +1 -1
  139. package/dist/esm/api/utils/translate.d.ts +1 -1
  140. package/dist/esm/api/utils/translate.js +3 -3
  141. package/dist/esm/api/utils/validateModule.d.ts +1 -1
  142. package/dist/esm/api/utils/validateModule.js +2 -2
  143. package/dist/esm/bootstrapState.d.ts +13 -8
  144. package/dist/esm/bootstrapState.d.ts.map +1 -1
  145. package/dist/esm/bootstrapState.js.map +1 -1
  146. package/dist/esm/client.d.ts +34 -34
  147. package/dist/esm/client.js +25 -25
  148. package/dist/esm/contracts.d.ts +26 -26
  149. package/dist/esm/contracts.js +26 -26
  150. package/dist/esm/index.d.ts +43 -43
  151. package/dist/esm/index.d.ts.map +1 -1
  152. package/dist/esm/index.js +40 -40
  153. package/dist/esm/index.js.map +1 -1
  154. package/dist/esm/internal-content-types/HelloWorld.d.ts +3 -3
  155. package/dist/esm/internal-content-types/HelloWorld.js +2 -2
  156. package/dist/esm/internal-content-types/Language.d.ts +6 -6
  157. package/dist/esm/internal-content-types/Language.js +2 -2
  158. package/dist/esm/internal-content-types/LiteralTranslation.d.ts +5 -5
  159. package/dist/esm/internal-content-types/LiteralTranslation.js +2 -2
  160. package/dist/esm/internal-content-types/ManagerRole.d.ts +4 -4
  161. package/dist/esm/internal-content-types/ManagerRole.js +3 -3
  162. package/dist/esm/internal-content-types/ManagerUser.d.ts +9 -9
  163. package/dist/esm/internal-content-types/ManagerUser.js +3 -3
  164. package/dist/esm/internal-content-types/Media.d.ts +29 -29
  165. package/dist/esm/internal-content-types/Media.js +3 -3
  166. package/dist/esm/internal-content-types/MediaFolder.d.ts +7 -7
  167. package/dist/esm/internal-content-types/MediaFolder.js +2 -2
  168. package/dist/esm/internal-content-types/MfaChallenge.d.ts +16 -16
  169. package/dist/esm/internal-content-types/MfaChallenge.js +3 -3
  170. package/dist/esm/internal-content-types/Page.d.ts +5 -5
  171. package/dist/esm/internal-content-types/Page.js +3 -3
  172. package/dist/esm/internal-content-types/Redirect.d.ts +14 -14
  173. package/dist/esm/internal-content-types/Redirect.js +2 -2
  174. package/dist/esm/internal-content-types/Route.d.ts +11 -11
  175. package/dist/esm/internal-content-types/Route.js +2 -2
  176. package/dist/esm/internal-content-types/RouteLayoutModule.d.ts +9 -9
  177. package/dist/esm/internal-content-types/RouteLayoutModule.js +2 -2
  178. package/dist/esm/internal-content-types/RouteLayoutModuleOverride.d.ts +8 -8
  179. package/dist/esm/internal-content-types/RouteLayoutModuleOverride.js +2 -2
  180. package/dist/esm/internal-content-types/RouteMap.d.ts +7 -7
  181. package/dist/esm/internal-content-types/RouteMap.js +2 -2
  182. package/dist/esm/internal-content-types/RouteSettings.d.ts +8 -8
  183. package/dist/esm/internal-content-types/RouteSettings.js +3 -3
  184. package/dist/esm/internal-content-types/Seo.d.ts +4 -4
  185. package/dist/esm/internal-content-types/Seo.js +2 -2
  186. package/dist/esm/internal-content-types/Session.d.ts +12 -12
  187. package/dist/esm/internal-content-types/Session.js +3 -3
  188. package/dist/esm/internal-content-types/UserMfa.d.ts +15 -15
  189. package/dist/esm/internal-content-types/UserMfa.js +3 -3
  190. package/dist/esm/internal-content-types/WebAuthnCredential.d.ts +15 -15
  191. package/dist/esm/internal-content-types/WebAuthnCredential.js +3 -3
  192. package/dist/esm/internal-content-types/WebAuthnRegChallenge.d.ts +14 -14
  193. package/dist/esm/internal-content-types/WebAuthnRegChallenge.js +3 -3
  194. package/dist/esm/internal-content-types/index.d.ts +20 -20
  195. package/dist/esm/internal-content-types/index.js +20 -20
  196. package/dist/esm/lib/ContentType.d.ts +3 -3
  197. package/dist/esm/lib/ContentType.js +4 -4
  198. package/dist/esm/lib/Permissions.d.ts +1 -1
  199. package/dist/esm/lib/Registry.d.ts +2 -2
  200. package/dist/esm/lib/Registry.js +4 -4
  201. package/dist/esm/lib/errors/AppError.d.ts +1 -1
  202. package/dist/esm/lib/errors/AppError.js +1 -1
  203. package/dist/esm/lib/errors/index.d.ts +4 -4
  204. package/dist/esm/lib/errors/index.js +3 -3
  205. package/dist/esm/lib/errors/throwAppError.d.ts +1 -1
  206. package/dist/esm/lib/errors/throwAppError.js +3 -3
  207. package/dist/esm/lib/fields/Boolean.d.ts +3 -3
  208. package/dist/esm/lib/fields/Boolean.js +1 -1
  209. package/dist/esm/lib/fields/ContentReference.d.ts +5 -5
  210. package/dist/esm/lib/fields/ContentReference.js +2 -2
  211. package/dist/esm/lib/fields/Date.d.ts +3 -3
  212. package/dist/esm/lib/fields/Date.js +1 -1
  213. package/dist/esm/lib/fields/Field.d.ts +19 -19
  214. package/dist/esm/lib/fields/Field.js +1 -1
  215. package/dist/esm/lib/fields/File.d.ts +3 -3
  216. package/dist/esm/lib/fields/File.js +3 -3
  217. package/dist/esm/lib/fields/Iterator.d.ts +4 -4
  218. package/dist/esm/lib/fields/Iterator.js +2 -2
  219. package/dist/esm/lib/fields/Link.d.ts +4 -4
  220. package/dist/esm/lib/fields/Link.js +3 -3
  221. package/dist/esm/lib/fields/List.d.ts +3 -3
  222. package/dist/esm/lib/fields/List.js +1 -1
  223. package/dist/esm/lib/fields/Number.d.ts +3 -3
  224. package/dist/esm/lib/fields/Number.js +1 -1
  225. package/dist/esm/lib/fields/Relation.d.ts +6 -6
  226. package/dist/esm/lib/fields/Relation.js +5 -5
  227. package/dist/esm/lib/fields/Select.d.ts +3 -3
  228. package/dist/esm/lib/fields/Select.js +1 -1
  229. package/dist/esm/lib/fields/SelfRelation.d.ts +4 -4
  230. package/dist/esm/lib/fields/SelfRelation.js +2 -2
  231. package/dist/esm/lib/fields/SimpleList.d.ts +4 -4
  232. package/dist/esm/lib/fields/SimpleList.js +2 -2
  233. package/dist/esm/lib/fields/String.d.ts +3 -3
  234. package/dist/esm/lib/fields/String.js +3 -3
  235. package/dist/esm/lib/fields/index.d.ts +19 -19
  236. package/dist/esm/lib/fields/index.js +13 -13
  237. package/dist/esm/lib/types/index.d.ts +2 -2
  238. package/dist/esm/lib/utils/getListField.d.ts +1 -1
  239. package/dist/esm/lib/utils/getSchemas.d.ts +1 -1
  240. package/dist/esm/lib/utils/getTranslation.d.ts +2 -2
  241. package/dist/esm/lib/utils/getTranslation.js +1 -1
  242. package/dist/esm/lib/utils/isTranslatableObject.d.ts +1 -1
  243. package/dist/esm/lib/utils/translateObject.d.ts +2 -2
  244. package/dist/esm/lib/utils/translateObject.js +3 -3
  245. package/dist/esm/literals/definitions.d.ts +1 -1
  246. package/dist/esm/literals/definitions.js +1 -1
  247. package/dist/esm/literals/index.d.ts +3 -3
  248. package/dist/esm/literals/index.js +3 -3
  249. package/dist/esm/literals/manager.d.ts +1 -1
  250. package/dist/esm/literals/manager.js +1 -1
  251. package/dist/esm/manager.d.ts +124 -124
  252. package/dist/esm/manager.js +2 -2
  253. package/dist/esm/media/imageOptimization.d.ts +1 -1
  254. package/dist/esm/media/imageOptimization.js +2 -2
  255. package/dist/esm/media/index.d.ts +4 -4
  256. package/dist/esm/media/index.js +3 -3
  257. package/dist/esm/media/mediaService.d.ts +1 -1
  258. package/dist/esm/orm/createIndexes.js +1 -1
  259. package/dist/esm/orm/database.js +3 -3
  260. package/dist/esm/orm/dbService.d.ts +3 -3
  261. package/dist/esm/orm/index.d.ts +2 -2
  262. package/dist/esm/orm/index.js +12 -12
  263. package/dist/esm/orm/mongodbPeer.js +1 -1
  264. package/dist/esm/orm/operations/clear.d.ts +1 -1
  265. package/dist/esm/orm/operations/clear.js +1 -1
  266. package/dist/esm/orm/operations/create.d.ts +2 -2
  267. package/dist/esm/orm/operations/create.js +4 -4
  268. package/dist/esm/orm/operations/delete.d.ts +2 -2
  269. package/dist/esm/orm/operations/delete.js +2 -2
  270. package/dist/esm/orm/operations/find.d.ts +2 -2
  271. package/dist/esm/orm/operations/find.js +3 -3
  272. package/dist/esm/orm/operations/findDependencies.d.ts +2 -2
  273. package/dist/esm/orm/operations/findDependencies.js +4 -4
  274. package/dist/esm/orm/operations/get.d.ts +3 -3
  275. package/dist/esm/orm/operations/get.js +3 -3
  276. package/dist/esm/orm/operations/getAll.d.ts +2 -2
  277. package/dist/esm/orm/operations/getAll.js +2 -2
  278. package/dist/esm/orm/operations/list.d.ts +2 -2
  279. package/dist/esm/orm/operations/list.js +3 -3
  280. package/dist/esm/orm/operations/update.d.ts +3 -3
  281. package/dist/esm/orm/operations/update.js +5 -5
  282. package/dist/esm/orm/operations/updateMany.d.ts +2 -2
  283. package/dist/esm/orm/operations/updateMany.js +3 -3
  284. package/dist/esm/orm/operations/upsert.d.ts +2 -2
  285. package/dist/esm/orm/operations/upsert.js +4 -4
  286. package/dist/esm/orm/utils/deepDeleteNulls.js +1 -1
  287. package/dist/esm/orm/utils/parseId.d.ts +1 -1
  288. package/dist/esm/orm/utils/parseId.js +1 -1
  289. package/dist/esm/orm/utils/transformObjectIdsToStrings.js +1 -1
  290. package/dist/esm/orm/utils/transformStringToObjectIds.js +1 -1
  291. package/dist/esm/schemas/manager/literals/upsert.js +1 -1
  292. package/dist/esm/schemas/manager/media/finalizeUpload.js +1 -1
  293. package/dist/esm/schemas/manager/media/getMediaUrl.js +1 -1
  294. package/dist/esm/schemas/manager/media/listFolders.js +1 -1
  295. package/dist/esm/schemas/web/page.js +1 -1
  296. package/dist/esm/web/index.d.ts +1 -1
  297. package/dist/esm/web/index.js +1 -1
  298. package/dist/esm/web/page.d.ts +1 -1
  299. package/dist/tsconfig.build.tsbuildinfo +1 -1
  300. package/package.json +1 -1
  301. package/dist/cjs/api/routes/manager/auth/media/createFolder.js.map +0 -1
  302. package/dist/cjs/api/routes/manager/auth/media/finalizeUpload.js.map +0 -1
  303. package/dist/cjs/api/routes/manager/auth/media/getMediaUrl.js.map +0 -1
  304. package/dist/cjs/api/routes/manager/auth/media/listFolders.js.map +0 -1
  305. package/dist/cjs/api/routes/manager/auth/media/prepareUpload.js +0 -34
  306. package/dist/cjs/api/routes/manager/auth/media/prepareUpload.js.map +0 -1
  307. package/dist/cjs/api/routes/manager/auth/media/uploadBinary.js.map +0 -1
  308. package/dist/cjs/lib/Env.js +0 -85
  309. package/dist/cjs/lib/Env.js.map +0 -1
  310. package/dist/esm/api/routes/manager/auth/media/createFolder.d.ts.map +0 -1
  311. package/dist/esm/api/routes/manager/auth/media/createFolder.js.map +0 -1
  312. package/dist/esm/api/routes/manager/auth/media/finalizeUpload.d.ts.map +0 -1
  313. package/dist/esm/api/routes/manager/auth/media/finalizeUpload.js.map +0 -1
  314. package/dist/esm/api/routes/manager/auth/media/getMediaUrl.d.ts.map +0 -1
  315. package/dist/esm/api/routes/manager/auth/media/getMediaUrl.js.map +0 -1
  316. package/dist/esm/api/routes/manager/auth/media/listFolders.d.ts.map +0 -1
  317. package/dist/esm/api/routes/manager/auth/media/listFolders.js.map +0 -1
  318. package/dist/esm/api/routes/manager/auth/media/prepareUpload.d.ts.map +0 -1
  319. package/dist/esm/api/routes/manager/auth/media/prepareUpload.js +0 -30
  320. package/dist/esm/api/routes/manager/auth/media/prepareUpload.js.map +0 -1
  321. package/dist/esm/api/routes/manager/auth/media/uploadBinary.d.ts.map +0 -1
  322. package/dist/esm/api/routes/manager/auth/media/uploadBinary.js.map +0 -1
  323. package/dist/esm/lib/Env.d.ts +0 -33
  324. package/dist/esm/lib/Env.d.ts.map +0 -1
  325. package/dist/esm/lib/Env.js +0 -78
  326. 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("../..").Field<any, any, any, any, any, any>>, string>>>;
13
- output: Record<string, OutputProxy<ContentType<Record<string, import("../..").Field<any, any, any, any, any, any>>, string>>>;
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,4 +1,4 @@
1
- import { getRakunBootstrapOptions } from "../../bootstrapState";
1
+ import { getRakunBootstrapOptions } from "../../bootstrapState.js";
2
2
  export const getInputProxy = (contentTypeName) => {
3
3
  return getRakunBootstrapOptions()?.proxies?.input?.[contentTypeName];
4
4
  };
@@ -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,4 +1,4 @@
1
- import { LoginInput, LoginOutput } from "../../../../schemas/manager/auth/login";
1
+ import { LoginInput, LoginOutput } from "../../../../schemas/manager/auth/login.js";
2
2
  export declare const loginHandler: ({ input, }: {
3
3
  input: LoginInput;
4
4
  }) => Promise<LoginOutput>;
@@ -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,4 +1,4 @@
1
- import { RakunRequestContext } from "../../../context";
1
+ import { RakunRequestContext } from "../../../context.js";
2
2
  export declare const logoutHandler: ({ ctx }: {
3
3
  ctx: RakunRequestContext;
4
4
  }) => Promise<{
@@ -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,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,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 "../../../../context";
2
- import { CreateFolderInput, CreateFolderOutput } from "../../../../../schemas/manager/media/createFolder";
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 "../../../../../internal-content-types";
2
- import { throwAppError } from "../../../../../lib/errors";
3
- import { hasPermissions } from "../../../../../lib/Permissions";
4
- import { slugify } from "../../../../../lib/utils/slugify";
5
- import { getMongoService } from "../../../../../orm";
6
- import { DbErrorInvalidData, DbErrorConflict, } from "../../../../../orm/dbService";
7
- import { checkPermissions } from "../../../../utils/checkPermissions";
1
+ import { MediaFolder } from "../../../../internal-content-types/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 "../../../../context";
2
- import { FinalizeUploadInput, FinalizeUploadOutput } from "../../../../../schemas/manager/media/finalizeUpload";
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"}