payload 3.0.0-alpha.63 → 3.0.0-alpha.65

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 (370) hide show
  1. package/dist/admin/RichText.d.ts +13 -10
  2. package/dist/admin/RichText.d.ts.map +1 -1
  3. package/dist/admin/RichText.js.map +1 -1
  4. package/dist/admin/views/types.d.ts +2 -2
  5. package/dist/admin/views/types.d.ts.map +1 -1
  6. package/dist/admin/views/types.js.map +1 -1
  7. package/dist/auth/baseFields/apiKey.d.ts.map +1 -1
  8. package/dist/auth/baseFields/apiKey.js +6 -4
  9. package/dist/auth/baseFields/apiKey.js.map +1 -1
  10. package/dist/auth/defaultAccess.d.ts +2 -2
  11. package/dist/auth/defaultAccess.d.ts.map +1 -1
  12. package/dist/auth/defaultAccess.js.map +1 -1
  13. package/dist/auth/executeAccess.d.ts +2 -2
  14. package/dist/auth/executeAccess.d.ts.map +1 -1
  15. package/dist/auth/executeAccess.js.map +1 -1
  16. package/dist/auth/getAccessResults.d.ts +2 -2
  17. package/dist/auth/getAccessResults.d.ts.map +1 -1
  18. package/dist/auth/getAccessResults.js.map +1 -1
  19. package/dist/auth/getFieldsToSign.d.ts +2 -2
  20. package/dist/auth/getFieldsToSign.d.ts.map +1 -1
  21. package/dist/auth/getFieldsToSign.js.map +1 -1
  22. package/dist/auth/operations/access.d.ts +2 -2
  23. package/dist/auth/operations/access.d.ts.map +1 -1
  24. package/dist/auth/operations/access.js.map +1 -1
  25. package/dist/auth/operations/auth.d.ts +2 -2
  26. package/dist/auth/operations/auth.d.ts.map +1 -1
  27. package/dist/auth/operations/auth.js.map +1 -1
  28. package/dist/auth/operations/forgotPassword.d.ts +2 -2
  29. package/dist/auth/operations/forgotPassword.d.ts.map +1 -1
  30. package/dist/auth/operations/forgotPassword.js.map +1 -1
  31. package/dist/auth/operations/init.d.ts +2 -2
  32. package/dist/auth/operations/init.d.ts.map +1 -1
  33. package/dist/auth/operations/init.js.map +1 -1
  34. package/dist/auth/operations/local/auth.js.map +1 -1
  35. package/dist/auth/operations/local/forgotPassword.d.ts +2 -2
  36. package/dist/auth/operations/local/forgotPassword.d.ts.map +1 -1
  37. package/dist/auth/operations/local/forgotPassword.js.map +1 -1
  38. package/dist/auth/operations/local/login.d.ts +2 -2
  39. package/dist/auth/operations/local/login.d.ts.map +1 -1
  40. package/dist/auth/operations/local/login.js.map +1 -1
  41. package/dist/auth/operations/local/resetPassword.d.ts +2 -2
  42. package/dist/auth/operations/local/resetPassword.d.ts.map +1 -1
  43. package/dist/auth/operations/local/resetPassword.js.map +1 -1
  44. package/dist/auth/operations/local/unlock.d.ts +2 -2
  45. package/dist/auth/operations/local/unlock.d.ts.map +1 -1
  46. package/dist/auth/operations/local/unlock.js.map +1 -1
  47. package/dist/auth/operations/local/verifyEmail.d.ts +2 -2
  48. package/dist/auth/operations/local/verifyEmail.d.ts.map +1 -1
  49. package/dist/auth/operations/local/verifyEmail.js.map +1 -1
  50. package/dist/auth/operations/login.d.ts +2 -2
  51. package/dist/auth/operations/login.d.ts.map +1 -1
  52. package/dist/auth/operations/login.js.map +1 -1
  53. package/dist/auth/operations/logout.d.ts +2 -2
  54. package/dist/auth/operations/logout.d.ts.map +1 -1
  55. package/dist/auth/operations/logout.js.map +1 -1
  56. package/dist/auth/operations/me.d.ts +2 -2
  57. package/dist/auth/operations/me.d.ts.map +1 -1
  58. package/dist/auth/operations/me.js.map +1 -1
  59. package/dist/auth/operations/refresh.d.ts +2 -2
  60. package/dist/auth/operations/refresh.d.ts.map +1 -1
  61. package/dist/auth/operations/refresh.js.map +1 -1
  62. package/dist/auth/operations/registerFirstUser.d.ts +2 -2
  63. package/dist/auth/operations/registerFirstUser.d.ts.map +1 -1
  64. package/dist/auth/operations/registerFirstUser.js.map +1 -1
  65. package/dist/auth/operations/resetPassword.d.ts +2 -2
  66. package/dist/auth/operations/resetPassword.d.ts.map +1 -1
  67. package/dist/auth/operations/resetPassword.js.map +1 -1
  68. package/dist/auth/operations/unlock.d.ts +2 -2
  69. package/dist/auth/operations/unlock.d.ts.map +1 -1
  70. package/dist/auth/operations/unlock.js.map +1 -1
  71. package/dist/auth/operations/verifyEmail.d.ts +2 -2
  72. package/dist/auth/operations/verifyEmail.d.ts.map +1 -1
  73. package/dist/auth/operations/verifyEmail.js.map +1 -1
  74. package/dist/auth/sendVerificationEmail.d.ts +2 -2
  75. package/dist/auth/sendVerificationEmail.d.ts.map +1 -1
  76. package/dist/auth/sendVerificationEmail.js.map +1 -1
  77. package/dist/auth/strategies/local/incrementLoginAttempts.d.ts +2 -2
  78. package/dist/auth/strategies/local/incrementLoginAttempts.d.ts.map +1 -1
  79. package/dist/auth/strategies/local/incrementLoginAttempts.js.map +1 -1
  80. package/dist/auth/strategies/local/register.d.ts +2 -2
  81. package/dist/auth/strategies/local/register.d.ts.map +1 -1
  82. package/dist/auth/strategies/local/register.js.map +1 -1
  83. package/dist/auth/strategies/local/resetLoginAttempts.d.ts +2 -2
  84. package/dist/auth/strategies/local/resetLoginAttempts.d.ts.map +1 -1
  85. package/dist/auth/strategies/local/resetLoginAttempts.js.map +1 -1
  86. package/dist/auth/types.d.ts +5 -5
  87. package/dist/auth/types.d.ts.map +1 -1
  88. package/dist/auth/types.js.map +1 -1
  89. package/dist/collections/config/client.d.ts +2 -1
  90. package/dist/collections/config/client.d.ts.map +1 -1
  91. package/dist/collections/config/defaults.d.ts +5 -5
  92. package/dist/collections/config/types.d.ts +21 -15
  93. package/dist/collections/config/types.d.ts.map +1 -1
  94. package/dist/collections/config/types.js.map +1 -1
  95. package/dist/collections/dataloader.d.ts.map +1 -1
  96. package/dist/collections/dataloader.js +1 -1
  97. package/dist/collections/dataloader.js.map +1 -1
  98. package/dist/collections/operations/count.d.ts +2 -2
  99. package/dist/collections/operations/count.d.ts.map +1 -1
  100. package/dist/collections/operations/count.js.map +1 -1
  101. package/dist/collections/operations/create.d.ts +2 -2
  102. package/dist/collections/operations/create.d.ts.map +1 -1
  103. package/dist/collections/operations/create.js.map +1 -1
  104. package/dist/collections/operations/delete.d.ts +2 -2
  105. package/dist/collections/operations/delete.d.ts.map +1 -1
  106. package/dist/collections/operations/delete.js.map +1 -1
  107. package/dist/collections/operations/deleteByID.d.ts +2 -2
  108. package/dist/collections/operations/deleteByID.d.ts.map +1 -1
  109. package/dist/collections/operations/deleteByID.js.map +1 -1
  110. package/dist/collections/operations/docAccess.d.ts +2 -2
  111. package/dist/collections/operations/docAccess.d.ts.map +1 -1
  112. package/dist/collections/operations/docAccess.js.map +1 -1
  113. package/dist/collections/operations/duplicate.d.ts +2 -2
  114. package/dist/collections/operations/duplicate.d.ts.map +1 -1
  115. package/dist/collections/operations/duplicate.js.map +1 -1
  116. package/dist/collections/operations/find.d.ts +2 -2
  117. package/dist/collections/operations/find.d.ts.map +1 -1
  118. package/dist/collections/operations/find.js.map +1 -1
  119. package/dist/collections/operations/findByID.d.ts +2 -2
  120. package/dist/collections/operations/findByID.d.ts.map +1 -1
  121. package/dist/collections/operations/findByID.js.map +1 -1
  122. package/dist/collections/operations/findVersionByID.d.ts +2 -2
  123. package/dist/collections/operations/findVersionByID.d.ts.map +1 -1
  124. package/dist/collections/operations/findVersionByID.js.map +1 -1
  125. package/dist/collections/operations/findVersions.d.ts +2 -2
  126. package/dist/collections/operations/findVersions.d.ts.map +1 -1
  127. package/dist/collections/operations/findVersions.js.map +1 -1
  128. package/dist/collections/operations/local/count.d.ts +2 -2
  129. package/dist/collections/operations/local/count.d.ts.map +1 -1
  130. package/dist/collections/operations/local/count.js.map +1 -1
  131. package/dist/collections/operations/local/create.d.ts +2 -2
  132. package/dist/collections/operations/local/create.d.ts.map +1 -1
  133. package/dist/collections/operations/local/create.js.map +1 -1
  134. package/dist/collections/operations/local/delete.d.ts +2 -2
  135. package/dist/collections/operations/local/delete.d.ts.map +1 -1
  136. package/dist/collections/operations/local/delete.js.map +1 -1
  137. package/dist/collections/operations/local/duplicate.d.ts +2 -2
  138. package/dist/collections/operations/local/duplicate.d.ts.map +1 -1
  139. package/dist/collections/operations/local/duplicate.js.map +1 -1
  140. package/dist/collections/operations/local/find.d.ts +2 -2
  141. package/dist/collections/operations/local/find.d.ts.map +1 -1
  142. package/dist/collections/operations/local/find.js.map +1 -1
  143. package/dist/collections/operations/local/findByID.d.ts +2 -2
  144. package/dist/collections/operations/local/findByID.d.ts.map +1 -1
  145. package/dist/collections/operations/local/findByID.js.map +1 -1
  146. package/dist/collections/operations/local/findVersionByID.d.ts +2 -2
  147. package/dist/collections/operations/local/findVersionByID.d.ts.map +1 -1
  148. package/dist/collections/operations/local/findVersionByID.js.map +1 -1
  149. package/dist/collections/operations/local/findVersions.d.ts +2 -2
  150. package/dist/collections/operations/local/findVersions.d.ts.map +1 -1
  151. package/dist/collections/operations/local/findVersions.js.map +1 -1
  152. package/dist/collections/operations/local/restoreVersion.d.ts +2 -2
  153. package/dist/collections/operations/local/restoreVersion.d.ts.map +1 -1
  154. package/dist/collections/operations/local/restoreVersion.js.map +1 -1
  155. package/dist/collections/operations/local/update.d.ts +2 -2
  156. package/dist/collections/operations/local/update.d.ts.map +1 -1
  157. package/dist/collections/operations/local/update.js.map +1 -1
  158. package/dist/collections/operations/restoreVersion.d.ts +2 -2
  159. package/dist/collections/operations/restoreVersion.d.ts.map +1 -1
  160. package/dist/collections/operations/restoreVersion.js.map +1 -1
  161. package/dist/collections/operations/update.d.ts +2 -2
  162. package/dist/collections/operations/update.d.ts.map +1 -1
  163. package/dist/collections/operations/update.js +1 -1
  164. package/dist/collections/operations/update.js.map +1 -1
  165. package/dist/collections/operations/updateByID.d.ts +2 -2
  166. package/dist/collections/operations/updateByID.d.ts.map +1 -1
  167. package/dist/collections/operations/updateByID.js +1 -1
  168. package/dist/collections/operations/updateByID.js.map +1 -1
  169. package/dist/collections/operations/utils.d.ts +2 -2
  170. package/dist/collections/operations/utils.d.ts.map +1 -1
  171. package/dist/collections/operations/utils.js.map +1 -1
  172. package/dist/config/types.d.ts +3 -3
  173. package/dist/config/types.d.ts.map +1 -1
  174. package/dist/config/types.js.map +1 -1
  175. package/dist/database/migrations/migrate.js.map +1 -1
  176. package/dist/database/migrations/migrateDown.js.map +1 -1
  177. package/dist/database/migrations/migrateRefresh.js.map +1 -1
  178. package/dist/database/migrations/migrateReset.js.map +1 -1
  179. package/dist/database/queryValidation/validateQueryPaths.d.ts +2 -2
  180. package/dist/database/queryValidation/validateQueryPaths.d.ts.map +1 -1
  181. package/dist/database/queryValidation/validateQueryPaths.js.map +1 -1
  182. package/dist/database/queryValidation/validateSearchParams.d.ts +2 -2
  183. package/dist/database/queryValidation/validateSearchParams.d.ts.map +1 -1
  184. package/dist/database/queryValidation/validateSearchParams.js.map +1 -1
  185. package/dist/database/types.d.ts +20 -20
  186. package/dist/database/types.d.ts.map +1 -1
  187. package/dist/database/types.js.map +1 -1
  188. package/dist/exports/utilities.d.ts +3 -0
  189. package/dist/exports/utilities.d.ts.map +1 -1
  190. package/dist/exports/utilities.js +3 -0
  191. package/dist/exports/utilities.js.map +1 -1
  192. package/dist/fields/config/sanitize.d.ts.map +1 -1
  193. package/dist/fields/config/sanitize.js +25 -8
  194. package/dist/fields/config/sanitize.js.map +1 -1
  195. package/dist/fields/config/types.d.ts +10 -7
  196. package/dist/fields/config/types.d.ts.map +1 -1
  197. package/dist/fields/config/types.js.map +1 -1
  198. package/dist/fields/getDefaultValue.d.ts +2 -2
  199. package/dist/fields/getDefaultValue.d.ts.map +1 -1
  200. package/dist/fields/getDefaultValue.js.map +1 -1
  201. package/dist/fields/hooks/afterChange/index.d.ts +2 -2
  202. package/dist/fields/hooks/afterChange/index.d.ts.map +1 -1
  203. package/dist/fields/hooks/afterChange/index.js.map +1 -1
  204. package/dist/fields/hooks/afterChange/promise.d.ts +2 -2
  205. package/dist/fields/hooks/afterChange/promise.d.ts.map +1 -1
  206. package/dist/fields/hooks/afterChange/promise.js.map +1 -1
  207. package/dist/fields/hooks/afterChange/traverseFields.d.ts +2 -2
  208. package/dist/fields/hooks/afterChange/traverseFields.d.ts.map +1 -1
  209. package/dist/fields/hooks/afterChange/traverseFields.js.map +1 -1
  210. package/dist/fields/hooks/afterRead/index.d.ts +2 -2
  211. package/dist/fields/hooks/afterRead/index.d.ts.map +1 -1
  212. package/dist/fields/hooks/afterRead/index.js.map +1 -1
  213. package/dist/fields/hooks/afterRead/promise.d.ts +5 -2
  214. package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
  215. package/dist/fields/hooks/afterRead/promise.js +4 -16
  216. package/dist/fields/hooks/afterRead/promise.js.map +1 -1
  217. package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts +2 -2
  218. package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts.map +1 -1
  219. package/dist/fields/hooks/afterRead/relationshipPopulationPromise.js.map +1 -1
  220. package/dist/fields/hooks/afterRead/traverseFields.d.ts +5 -2
  221. package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -1
  222. package/dist/fields/hooks/afterRead/traverseFields.js.map +1 -1
  223. package/dist/fields/hooks/beforeChange/index.d.ts +2 -2
  224. package/dist/fields/hooks/beforeChange/index.d.ts.map +1 -1
  225. package/dist/fields/hooks/beforeChange/index.js.map +1 -1
  226. package/dist/fields/hooks/beforeChange/promise.d.ts +2 -2
  227. package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
  228. package/dist/fields/hooks/beforeChange/promise.js +3 -1
  229. package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
  230. package/dist/fields/hooks/beforeChange/traverseFields.d.ts +14 -2
  231. package/dist/fields/hooks/beforeChange/traverseFields.d.ts.map +1 -1
  232. package/dist/fields/hooks/beforeChange/traverseFields.js.map +1 -1
  233. package/dist/fields/hooks/beforeValidate/index.d.ts +2 -2
  234. package/dist/fields/hooks/beforeValidate/index.d.ts.map +1 -1
  235. package/dist/fields/hooks/beforeValidate/index.js.map +1 -1
  236. package/dist/fields/hooks/beforeValidate/promise.d.ts +8 -2
  237. package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
  238. package/dist/fields/hooks/beforeValidate/promise.js +2 -0
  239. package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
  240. package/dist/fields/hooks/beforeValidate/traverseFields.d.ts +8 -2
  241. package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
  242. package/dist/fields/hooks/beforeValidate/traverseFields.js.map +1 -1
  243. package/dist/globals/config/types.d.ts +7 -7
  244. package/dist/globals/config/types.d.ts.map +1 -1
  245. package/dist/globals/config/types.js.map +1 -1
  246. package/dist/globals/operations/docAccess.d.ts +2 -2
  247. package/dist/globals/operations/docAccess.d.ts.map +1 -1
  248. package/dist/globals/operations/docAccess.js.map +1 -1
  249. package/dist/globals/operations/findOne.d.ts +2 -2
  250. package/dist/globals/operations/findOne.d.ts.map +1 -1
  251. package/dist/globals/operations/findOne.js.map +1 -1
  252. package/dist/globals/operations/findVersionByID.d.ts +2 -2
  253. package/dist/globals/operations/findVersionByID.d.ts.map +1 -1
  254. package/dist/globals/operations/findVersionByID.js.map +1 -1
  255. package/dist/globals/operations/findVersions.d.ts +2 -2
  256. package/dist/globals/operations/findVersions.d.ts.map +1 -1
  257. package/dist/globals/operations/findVersions.js.map +1 -1
  258. package/dist/globals/operations/local/findOne.d.ts +2 -2
  259. package/dist/globals/operations/local/findOne.d.ts.map +1 -1
  260. package/dist/globals/operations/local/findOne.js.map +1 -1
  261. package/dist/globals/operations/local/findVersionByID.d.ts +2 -2
  262. package/dist/globals/operations/local/findVersionByID.d.ts.map +1 -1
  263. package/dist/globals/operations/local/findVersionByID.js.map +1 -1
  264. package/dist/globals/operations/local/findVersions.d.ts +2 -2
  265. package/dist/globals/operations/local/findVersions.d.ts.map +1 -1
  266. package/dist/globals/operations/local/findVersions.js.map +1 -1
  267. package/dist/globals/operations/local/restoreVersion.d.ts +2 -2
  268. package/dist/globals/operations/local/restoreVersion.d.ts.map +1 -1
  269. package/dist/globals/operations/local/restoreVersion.js.map +1 -1
  270. package/dist/globals/operations/local/update.d.ts +2 -2
  271. package/dist/globals/operations/local/update.d.ts.map +1 -1
  272. package/dist/globals/operations/local/update.js.map +1 -1
  273. package/dist/globals/operations/restoreVersion.d.ts +2 -2
  274. package/dist/globals/operations/restoreVersion.d.ts.map +1 -1
  275. package/dist/globals/operations/restoreVersion.js.map +1 -1
  276. package/dist/globals/operations/update.d.ts +2 -2
  277. package/dist/globals/operations/update.d.ts.map +1 -1
  278. package/dist/globals/operations/update.js.map +1 -1
  279. package/dist/preferences/deleteUserPreferences.d.ts +2 -2
  280. package/dist/preferences/deleteUserPreferences.d.ts.map +1 -1
  281. package/dist/preferences/deleteUserPreferences.js.map +1 -1
  282. package/dist/preferences/requestHandlers/delete.d.ts.map +1 -1
  283. package/dist/preferences/requestHandlers/delete.js +18 -5
  284. package/dist/preferences/requestHandlers/delete.js.map +1 -1
  285. package/dist/preferences/requestHandlers/findOne.d.ts.map +1 -1
  286. package/dist/preferences/requestHandlers/findOne.js +18 -5
  287. package/dist/preferences/requestHandlers/findOne.js.map +1 -1
  288. package/dist/preferences/requestHandlers/update.d.ts.map +1 -1
  289. package/dist/preferences/requestHandlers/update.js +19 -7
  290. package/dist/preferences/requestHandlers/update.js.map +1 -1
  291. package/dist/preferences/types.d.ts +3 -3
  292. package/dist/preferences/types.d.ts.map +1 -1
  293. package/dist/preferences/types.js.map +1 -1
  294. package/dist/types/index.d.ts +18 -14
  295. package/dist/types/index.d.ts.map +1 -1
  296. package/dist/types/index.js.map +1 -1
  297. package/dist/uploads/deleteAssociatedFiles.d.ts +2 -2
  298. package/dist/uploads/deleteAssociatedFiles.d.ts.map +1 -1
  299. package/dist/uploads/deleteAssociatedFiles.js.map +1 -1
  300. package/dist/uploads/docWithFilenameExists.d.ts +2 -2
  301. package/dist/uploads/docWithFilenameExists.d.ts.map +1 -1
  302. package/dist/uploads/docWithFilenameExists.js.map +1 -1
  303. package/dist/uploads/generateFileData.d.ts +2 -2
  304. package/dist/uploads/generateFileData.d.ts.map +1 -1
  305. package/dist/uploads/generateFileData.js.map +1 -1
  306. package/dist/uploads/getExternalFile.d.ts +2 -2
  307. package/dist/uploads/getExternalFile.d.ts.map +1 -1
  308. package/dist/uploads/getExternalFile.js.map +1 -1
  309. package/dist/uploads/getFileByPath.d.ts +2 -2
  310. package/dist/uploads/getFileByPath.d.ts.map +1 -1
  311. package/dist/uploads/getFileByPath.js.map +1 -1
  312. package/dist/uploads/getImageSize.d.ts +2 -2
  313. package/dist/uploads/getImageSize.d.ts.map +1 -1
  314. package/dist/uploads/getImageSize.js.map +1 -1
  315. package/dist/uploads/getSafeFilename.d.ts +2 -2
  316. package/dist/uploads/getSafeFilename.d.ts.map +1 -1
  317. package/dist/uploads/getSafeFilename.js.map +1 -1
  318. package/dist/uploads/imageResizer.d.ts +3 -3
  319. package/dist/uploads/imageResizer.d.ts.map +1 -1
  320. package/dist/uploads/imageResizer.js.map +1 -1
  321. package/dist/uploads/types.d.ts +2 -2
  322. package/dist/uploads/types.d.ts.map +1 -1
  323. package/dist/uploads/types.js.map +1 -1
  324. package/dist/uploads/unlinkTempFiles.d.ts +2 -2
  325. package/dist/uploads/unlinkTempFiles.d.ts.map +1 -1
  326. package/dist/uploads/unlinkTempFiles.js.map +1 -1
  327. package/dist/uploads/uploadFiles.d.ts +2 -2
  328. package/dist/uploads/uploadFiles.d.ts.map +1 -1
  329. package/dist/uploads/uploadFiles.js.map +1 -1
  330. package/dist/utilities/commitTransaction.d.ts +2 -2
  331. package/dist/utilities/commitTransaction.d.ts.map +1 -1
  332. package/dist/utilities/commitTransaction.js.map +1 -1
  333. package/dist/utilities/createLocalReq.d.ts +3 -3
  334. package/dist/utilities/createLocalReq.d.ts.map +1 -1
  335. package/dist/utilities/createLocalReq.js.map +1 -1
  336. package/dist/utilities/getEntityPolicies.d.ts +2 -2
  337. package/dist/utilities/getEntityPolicies.d.ts.map +1 -1
  338. package/dist/utilities/getEntityPolicies.js.map +1 -1
  339. package/dist/utilities/initTransaction.d.ts +2 -2
  340. package/dist/utilities/initTransaction.d.ts.map +1 -1
  341. package/dist/utilities/initTransaction.js.map +1 -1
  342. package/dist/utilities/isEntityHidden.d.ts +2 -2
  343. package/dist/utilities/isEntityHidden.d.ts.map +1 -1
  344. package/dist/utilities/isEntityHidden.js.map +1 -1
  345. package/dist/utilities/killTransaction.d.ts +2 -2
  346. package/dist/utilities/killTransaction.d.ts.map +1 -1
  347. package/dist/utilities/killTransaction.js.map +1 -1
  348. package/dist/utilities/telemetry/events/adminInit.d.ts +2 -2
  349. package/dist/utilities/telemetry/events/adminInit.d.ts.map +1 -1
  350. package/dist/utilities/telemetry/events/adminInit.js.map +1 -1
  351. package/dist/versions/deleteCollectionVersions.d.ts +2 -2
  352. package/dist/versions/deleteCollectionVersions.d.ts.map +1 -1
  353. package/dist/versions/deleteCollectionVersions.js.map +1 -1
  354. package/dist/versions/drafts/replaceWithDraftIfAvailable.d.ts +2 -2
  355. package/dist/versions/drafts/replaceWithDraftIfAvailable.d.ts.map +1 -1
  356. package/dist/versions/drafts/replaceWithDraftIfAvailable.js.map +1 -1
  357. package/dist/versions/enforceMaxVersions.d.ts +2 -2
  358. package/dist/versions/enforceMaxVersions.d.ts.map +1 -1
  359. package/dist/versions/enforceMaxVersions.js.map +1 -1
  360. package/dist/versions/getLatestCollectionVersion.d.ts +2 -2
  361. package/dist/versions/getLatestCollectionVersion.d.ts.map +1 -1
  362. package/dist/versions/getLatestCollectionVersion.js.map +1 -1
  363. package/dist/versions/getLatestGlobalVersion.d.ts +2 -2
  364. package/dist/versions/getLatestGlobalVersion.d.ts.map +1 -1
  365. package/dist/versions/getLatestGlobalVersion.js.map +1 -1
  366. package/dist/versions/saveVersion.d.ts +2 -2
  367. package/dist/versions/saveVersion.d.ts.map +1 -1
  368. package/dist/versions/saveVersion.js.map +1 -1
  369. package/package.json +4 -4
  370. package/src/index.ts +0 -510
@@ -1 +1 @@
1
- {"version":3,"file":"verifyEmail.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/verifyEmail.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAO1D,MAAM,MAAM,IAAI,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,cAAc,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,oBAAoB,SAAgB,IAAI,KAAG,QAAQ,OAAO,CAuCtE,CAAA;AAED,eAAe,oBAAoB,CAAA"}
1
+ {"version":3,"file":"verifyEmail.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/verifyEmail.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAOlE,MAAM,MAAM,IAAI,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,sBAAsB,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,oBAAoB,SAAgB,IAAI,KAAG,QAAQ,OAAO,CAuCtE,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/auth/operations/verifyEmail.ts"],"sourcesContent":["import httpStatus from 'http-status'\n\nimport type { Collection } from '../../collections/config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\n\nimport { APIError } from '../../errors/index.js'\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\n\nexport type Args = {\n collection: Collection\n req: PayloadRequest\n token: string\n}\n\nexport const verifyEmailOperation = async (args: Args): Promise<boolean> => {\n const { collection, req, token } = args\n if (!Object.prototype.hasOwnProperty.call(args, 'token')) {\n throw new APIError('Missing required data.', httpStatus.BAD_REQUEST)\n }\n\n try {\n const shouldCommit = await initTransaction(req)\n\n const user = await req.payload.db.findOne<any>({\n collection: collection.config.slug,\n req,\n where: {\n _verificationToken: { equals: token },\n },\n })\n\n if (!user) throw new APIError('Verification token is invalid.', httpStatus.FORBIDDEN)\n if (user && user._verified === true)\n throw new APIError('This account has already been activated.', httpStatus.ACCEPTED)\n\n await req.payload.db.updateOne({\n id: user.id,\n collection: collection.config.slug,\n data: {\n ...user,\n _verificationToken: null,\n _verified: true,\n },\n req,\n })\n\n if (shouldCommit) await commitTransaction(req)\n\n return true\n } catch (error: unknown) {\n await killTransaction(req)\n throw error\n }\n}\n\nexport default verifyEmailOperation\n"],"names":["httpStatus","APIError","commitTransaction","initTransaction","killTransaction","verifyEmailOperation","args","collection","req","token","Object","prototype","hasOwnProperty","call","BAD_REQUEST","shouldCommit","user","payload","db","findOne","config","slug","where","_verificationToken","equals","FORBIDDEN","_verified","ACCEPTED","updateOne","id","data","error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,gBAAgB,cAAa;AAKpC,SAASC,QAAQ,QAAQ,wBAAuB;AAChD,SAASC,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AAQpE,OAAO,MAAMC,uBAAuB,OAAOC;IACzC,MAAM,EAAEC,UAAU,EAAEC,GAAG,EAAEC,KAAK,EAAE,GAAGH;IACnC,IAAI,CAACI,OAAOC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,MAAM,UAAU;QACxD,MAAM,IAAIL,SAAS,0BAA0BD,WAAWc,WAAW;IACrE;IAEA,IAAI;QACF,MAAMC,eAAe,MAAMZ,gBAAgBK;QAE3C,MAAMQ,OAAO,MAAMR,IAAIS,OAAO,CAACC,EAAE,CAACC,OAAO,CAAM;YAC7CZ,YAAYA,WAAWa,MAAM,CAACC,IAAI;YAClCb;YACAc,OAAO;gBACLC,oBAAoB;oBAAEC,QAAQf;gBAAM;YACtC;QACF;QAEA,IAAI,CAACO,MAAM,MAAM,IAAIf,SAAS,kCAAkCD,WAAWyB,SAAS;QACpF,IAAIT,QAAQA,KAAKU,SAAS,KAAK,MAC7B,MAAM,IAAIzB,SAAS,4CAA4CD,WAAW2B,QAAQ;QAEpF,MAAMnB,IAAIS,OAAO,CAACC,EAAE,CAACU,SAAS,CAAC;YAC7BC,IAAIb,KAAKa,EAAE;YACXtB,YAAYA,WAAWa,MAAM,CAACC,IAAI;YAClCS,MAAM;gBACJ,GAAGd,IAAI;gBACPO,oBAAoB;gBACpBG,WAAW;YACb;YACAlB;QACF;QAEA,IAAIO,cAAc,MAAMb,kBAAkBM;QAE1C,OAAO;IACT,EAAE,OAAOuB,OAAgB;QACvB,MAAM3B,gBAAgBI;QACtB,MAAMuB;IACR;AACF,EAAC;AAED,eAAe1B,qBAAoB"}
1
+ {"version":3,"sources":["../../../src/auth/operations/verifyEmail.ts"],"sourcesContent":["import httpStatus from 'http-status'\n\nimport type { Collection } from '../../collections/config/types.js'\nimport type { PayloadRequestWithData } from '../../types/index.js'\n\nimport { APIError } from '../../errors/index.js'\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\n\nexport type Args = {\n collection: Collection\n req: PayloadRequestWithData\n token: string\n}\n\nexport const verifyEmailOperation = async (args: Args): Promise<boolean> => {\n const { collection, req, token } = args\n if (!Object.prototype.hasOwnProperty.call(args, 'token')) {\n throw new APIError('Missing required data.', httpStatus.BAD_REQUEST)\n }\n\n try {\n const shouldCommit = await initTransaction(req)\n\n const user = await req.payload.db.findOne<any>({\n collection: collection.config.slug,\n req,\n where: {\n _verificationToken: { equals: token },\n },\n })\n\n if (!user) throw new APIError('Verification token is invalid.', httpStatus.FORBIDDEN)\n if (user && user._verified === true)\n throw new APIError('This account has already been activated.', httpStatus.ACCEPTED)\n\n await req.payload.db.updateOne({\n id: user.id,\n collection: collection.config.slug,\n data: {\n ...user,\n _verificationToken: null,\n _verified: true,\n },\n req,\n })\n\n if (shouldCommit) await commitTransaction(req)\n\n return true\n } catch (error: unknown) {\n await killTransaction(req)\n throw error\n }\n}\n\nexport default verifyEmailOperation\n"],"names":["httpStatus","APIError","commitTransaction","initTransaction","killTransaction","verifyEmailOperation","args","collection","req","token","Object","prototype","hasOwnProperty","call","BAD_REQUEST","shouldCommit","user","payload","db","findOne","config","slug","where","_verificationToken","equals","FORBIDDEN","_verified","ACCEPTED","updateOne","id","data","error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,gBAAgB,cAAa;AAKpC,SAASC,QAAQ,QAAQ,wBAAuB;AAChD,SAASC,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AAQpE,OAAO,MAAMC,uBAAuB,OAAOC;IACzC,MAAM,EAAEC,UAAU,EAAEC,GAAG,EAAEC,KAAK,EAAE,GAAGH;IACnC,IAAI,CAACI,OAAOC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,MAAM,UAAU;QACxD,MAAM,IAAIL,SAAS,0BAA0BD,WAAWc,WAAW;IACrE;IAEA,IAAI;QACF,MAAMC,eAAe,MAAMZ,gBAAgBK;QAE3C,MAAMQ,OAAO,MAAMR,IAAIS,OAAO,CAACC,EAAE,CAACC,OAAO,CAAM;YAC7CZ,YAAYA,WAAWa,MAAM,CAACC,IAAI;YAClCb;YACAc,OAAO;gBACLC,oBAAoB;oBAAEC,QAAQf;gBAAM;YACtC;QACF;QAEA,IAAI,CAACO,MAAM,MAAM,IAAIf,SAAS,kCAAkCD,WAAWyB,SAAS;QACpF,IAAIT,QAAQA,KAAKU,SAAS,KAAK,MAC7B,MAAM,IAAIzB,SAAS,4CAA4CD,WAAW2B,QAAQ;QAEpF,MAAMnB,IAAIS,OAAO,CAACC,EAAE,CAACU,SAAS,CAAC;YAC7BC,IAAIb,KAAKa,EAAE;YACXtB,YAAYA,WAAWa,MAAM,CAACC,IAAI;YAClCS,MAAM;gBACJ,GAAGd,IAAI;gBACPO,oBAAoB;gBACpBG,WAAW;YACb;YACAlB;QACF;QAEA,IAAIO,cAAc,MAAMb,kBAAkBM;QAE1C,OAAO;IACT,EAAE,OAAOuB,OAAgB;QACvB,MAAM3B,gBAAgBI;QACtB,MAAMuB;IACR;AACF,EAAC;AAED,eAAe1B,qBAAoB"}
@@ -1,14 +1,14 @@
1
1
  import type { Collection } from '../collections/config/types.js';
2
2
  import type { SanitizedConfig } from '../config/types.js';
3
3
  import type { InitializedEmailAdapter } from '../email/types.js';
4
- import type { PayloadRequest } from '../types/index.js';
4
+ import type { PayloadRequestWithData } from '../types/index.js';
5
5
  import type { User } from './types.js';
6
6
  type Args = {
7
7
  collection: Collection;
8
8
  config: SanitizedConfig;
9
9
  disableEmail: boolean;
10
10
  email: InitializedEmailAdapter;
11
- req: PayloadRequest;
11
+ req: PayloadRequestWithData;
12
12
  token: string;
13
13
  user: User;
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sendVerificationEmail.d.ts","sourceRoot":"","sources":["../../src/auth/sendVerificationEmail.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,IAAI,EAAgB,MAAM,YAAY,CAAA;AAEpD,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,eAAe,CAAA;IACvB,YAAY,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,uBAAuB,CAAA;IAC9B,GAAG,EAAE,cAAc,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;CACX,CAAA;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAwDrE"}
1
+ {"version":3,"file":"sendVerificationEmail.d.ts","sourceRoot":"","sources":["../../src/auth/sendVerificationEmail.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAgB,MAAM,YAAY,CAAA;AAEpD,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,eAAe,CAAA;IACvB,YAAY,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,uBAAuB,CAAA;IAC9B,GAAG,EAAE,sBAAsB,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;CACX,CAAA;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAwDrE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/auth/sendVerificationEmail.ts"],"sourcesContent":["import { URL } from 'url'\n\nimport type { Collection } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type { InitializedEmailAdapter } from '../email/types.js'\nimport type { PayloadRequest } from '../types/index.js'\nimport type { User, VerifyConfig } from './types.js'\n\ntype Args = {\n collection: Collection\n config: SanitizedConfig\n disableEmail: boolean\n email: InitializedEmailAdapter\n req: PayloadRequest\n token: string\n user: User\n}\n\nexport async function sendVerificationEmail(args: Args): Promise<void> {\n // Verify token from e-mail\n const {\n collection: { config: collectionConfig },\n config,\n disableEmail,\n email,\n req,\n token,\n user,\n } = args\n\n if (!disableEmail) {\n const protocol = new URL(req.url).protocol\n const serverURL =\n config.serverURL !== null && config.serverURL !== ''\n ? config.serverURL\n : `${protocol}://${req.headers.get('host')}`\n\n const verificationURL = `${serverURL}${config.routes.admin}/${collectionConfig.slug}/verify/${token}`\n\n let html = `${req.t('authentication:newAccountCreated', {\n serverURL: config.serverURL,\n verificationURL,\n })}`\n\n const verify = collectionConfig.auth.verify as VerifyConfig\n\n // Allow config to override email content\n if (typeof verify.generateEmailHTML === 'function') {\n html = await verify.generateEmailHTML({\n req,\n token,\n user,\n })\n }\n\n let subject = req.t('authentication:verifyYourEmail')\n\n // Allow config to override email subject\n if (typeof verify.generateEmailSubject === 'function') {\n subject = await verify.generateEmailSubject({\n req,\n token,\n user,\n })\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n email.sendEmail({\n from: `\"${email.defaultFromName}\" <${email.defaultFromName}>`,\n html,\n subject,\n to: user.email,\n })\n }\n}\n"],"names":["URL","sendVerificationEmail","args","collection","config","collectionConfig","disableEmail","email","req","token","user","protocol","url","serverURL","headers","get","verificationURL","routes","admin","slug","html","t","verify","auth","generateEmailHTML","subject","generateEmailSubject","sendEmail","from","defaultFromName","to"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,MAAK;AAkBzB,OAAO,eAAeC,sBAAsBC,IAAU;IACpD,2BAA2B;IAC3B,MAAM,EACJC,YAAY,EAAEC,QAAQC,gBAAgB,EAAE,EACxCD,MAAM,EACNE,YAAY,EACZC,KAAK,EACLC,GAAG,EACHC,KAAK,EACLC,IAAI,EACL,GAAGR;IAEJ,IAAI,CAACI,cAAc;QACjB,MAAMK,WAAW,IAAIX,IAAIQ,IAAII,GAAG,EAAED,QAAQ;QAC1C,MAAME,YACJT,OAAOS,SAAS,KAAK,QAAQT,OAAOS,SAAS,KAAK,KAC9CT,OAAOS,SAAS,GAChB,CAAC,EAAEF,SAAS,GAAG,EAAEH,IAAIM,OAAO,CAACC,GAAG,CAAC,QAAQ,CAAC;QAEhD,MAAMC,kBAAkB,CAAC,EAAEH,UAAU,EAAET,OAAOa,MAAM,CAACC,KAAK,CAAC,CAAC,EAAEb,iBAAiBc,IAAI,CAAC,QAAQ,EAAEV,MAAM,CAAC;QAErG,IAAIW,OAAO,CAAC,EAAEZ,IAAIa,CAAC,CAAC,oCAAoC;YACtDR,WAAWT,OAAOS,SAAS;YAC3BG;QACF,GAAG,CAAC;QAEJ,MAAMM,SAASjB,iBAAiBkB,IAAI,CAACD,MAAM;QAE3C,yCAAyC;QACzC,IAAI,OAAOA,OAAOE,iBAAiB,KAAK,YAAY;YAClDJ,OAAO,MAAME,OAAOE,iBAAiB,CAAC;gBACpChB;gBACAC;gBACAC;YACF;QACF;QAEA,IAAIe,UAAUjB,IAAIa,CAAC,CAAC;QAEpB,yCAAyC;QACzC,IAAI,OAAOC,OAAOI,oBAAoB,KAAK,YAAY;YACrDD,UAAU,MAAMH,OAAOI,oBAAoB,CAAC;gBAC1ClB;gBACAC;gBACAC;YACF;QACF;QAEA,mEAAmE;QACnEH,MAAMoB,SAAS,CAAC;YACdC,MAAM,CAAC,CAAC,EAAErB,MAAMsB,eAAe,CAAC,GAAG,EAAEtB,MAAMsB,eAAe,CAAC,CAAC,CAAC;YAC7DT;YACAK;YACAK,IAAIpB,KAAKH,KAAK;QAChB;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/auth/sendVerificationEmail.ts"],"sourcesContent":["import { URL } from 'url'\n\nimport type { Collection } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type { InitializedEmailAdapter } from '../email/types.js'\nimport type { PayloadRequestWithData } from '../types/index.js'\nimport type { User, VerifyConfig } from './types.js'\n\ntype Args = {\n collection: Collection\n config: SanitizedConfig\n disableEmail: boolean\n email: InitializedEmailAdapter\n req: PayloadRequestWithData\n token: string\n user: User\n}\n\nexport async function sendVerificationEmail(args: Args): Promise<void> {\n // Verify token from e-mail\n const {\n collection: { config: collectionConfig },\n config,\n disableEmail,\n email,\n req,\n token,\n user,\n } = args\n\n if (!disableEmail) {\n const protocol = new URL(req.url).protocol\n const serverURL =\n config.serverURL !== null && config.serverURL !== ''\n ? config.serverURL\n : `${protocol}://${req.headers.get('host')}`\n\n const verificationURL = `${serverURL}${config.routes.admin}/${collectionConfig.slug}/verify/${token}`\n\n let html = `${req.t('authentication:newAccountCreated', {\n serverURL: config.serverURL,\n verificationURL,\n })}`\n\n const verify = collectionConfig.auth.verify as VerifyConfig\n\n // Allow config to override email content\n if (typeof verify.generateEmailHTML === 'function') {\n html = await verify.generateEmailHTML({\n req,\n token,\n user,\n })\n }\n\n let subject = req.t('authentication:verifyYourEmail')\n\n // Allow config to override email subject\n if (typeof verify.generateEmailSubject === 'function') {\n subject = await verify.generateEmailSubject({\n req,\n token,\n user,\n })\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n email.sendEmail({\n from: `\"${email.defaultFromName}\" <${email.defaultFromName}>`,\n html,\n subject,\n to: user.email,\n })\n }\n}\n"],"names":["URL","sendVerificationEmail","args","collection","config","collectionConfig","disableEmail","email","req","token","user","protocol","url","serverURL","headers","get","verificationURL","routes","admin","slug","html","t","verify","auth","generateEmailHTML","subject","generateEmailSubject","sendEmail","from","defaultFromName","to"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,GAAG,QAAQ,MAAK;AAkBzB,OAAO,eAAeC,sBAAsBC,IAAU;IACpD,2BAA2B;IAC3B,MAAM,EACJC,YAAY,EAAEC,QAAQC,gBAAgB,EAAE,EACxCD,MAAM,EACNE,YAAY,EACZC,KAAK,EACLC,GAAG,EACHC,KAAK,EACLC,IAAI,EACL,GAAGR;IAEJ,IAAI,CAACI,cAAc;QACjB,MAAMK,WAAW,IAAIX,IAAIQ,IAAII,GAAG,EAAED,QAAQ;QAC1C,MAAME,YACJT,OAAOS,SAAS,KAAK,QAAQT,OAAOS,SAAS,KAAK,KAC9CT,OAAOS,SAAS,GAChB,CAAC,EAAEF,SAAS,GAAG,EAAEH,IAAIM,OAAO,CAACC,GAAG,CAAC,QAAQ,CAAC;QAEhD,MAAMC,kBAAkB,CAAC,EAAEH,UAAU,EAAET,OAAOa,MAAM,CAACC,KAAK,CAAC,CAAC,EAAEb,iBAAiBc,IAAI,CAAC,QAAQ,EAAEV,MAAM,CAAC;QAErG,IAAIW,OAAO,CAAC,EAAEZ,IAAIa,CAAC,CAAC,oCAAoC;YACtDR,WAAWT,OAAOS,SAAS;YAC3BG;QACF,GAAG,CAAC;QAEJ,MAAMM,SAASjB,iBAAiBkB,IAAI,CAACD,MAAM;QAE3C,yCAAyC;QACzC,IAAI,OAAOA,OAAOE,iBAAiB,KAAK,YAAY;YAClDJ,OAAO,MAAME,OAAOE,iBAAiB,CAAC;gBACpChB;gBACAC;gBACAC;YACF;QACF;QAEA,IAAIe,UAAUjB,IAAIa,CAAC,CAAC;QAEpB,yCAAyC;QACzC,IAAI,OAAOC,OAAOI,oBAAoB,KAAK,YAAY;YACrDD,UAAU,MAAMH,OAAOI,oBAAoB,CAAC;gBAC1ClB;gBACAC;gBACAC;YACF;QACF;QAEA,mEAAmE;QACnEH,MAAMoB,SAAS,CAAC;YACdC,MAAM,CAAC,CAAC,EAAErB,MAAMsB,eAAe,CAAC,GAAG,EAAEtB,MAAMsB,eAAe,CAAC,CAAC,CAAC;YAC7DT;YACAK;YACAK,IAAIpB,KAAKH,KAAK;QAChB;IACF;AACF"}
@@ -1,11 +1,11 @@
1
1
  import type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js';
2
2
  import type { Payload } from '../../../index.js';
3
- import type { PayloadRequest } from '../../../types/index.js';
3
+ import type { PayloadRequestWithData } from '../../../types/index.js';
4
4
  type Args = {
5
5
  collection: SanitizedCollectionConfig;
6
6
  doc: TypeWithID & Record<string, unknown>;
7
7
  payload: Payload;
8
- req: PayloadRequest;
8
+ req: PayloadRequestWithData;
9
9
  };
10
10
  export declare const incrementLoginAttempts: ({ collection, doc, payload, req, }: Args) => Promise<void>;
11
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"incrementLoginAttempts.d.ts","sourceRoot":"","sources":["../../../../src/auth/strategies/local/incrementLoginAttempts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAA;AACjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,yBAAyB,CAAA;IACrC,GAAG,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,sBAAsB,uCAKhC,IAAI,KAAG,QAAQ,IAAI,CA0CrB,CAAA"}
1
+ {"version":3,"file":"incrementLoginAttempts.d.ts","sourceRoot":"","sources":["../../../../src/auth/strategies/local/incrementLoginAttempts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAA;AACjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAErE,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,yBAAyB,CAAA;IACrC,GAAG,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,sBAAsB,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,sBAAsB,uCAKhC,IAAI,KAAG,QAAQ,IAAI,CA0CrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/auth/strategies/local/incrementLoginAttempts.ts"],"sourcesContent":["import type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js'\nimport type { Payload } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\ntype Args = {\n collection: SanitizedCollectionConfig\n doc: TypeWithID & Record<string, unknown>\n payload: Payload\n req: PayloadRequest\n}\n\nexport const incrementLoginAttempts = async ({\n collection,\n doc,\n payload,\n req,\n}: Args): Promise<void> => {\n const {\n auth: { lockTime, maxLoginAttempts },\n } = collection\n\n if ('lockUntil' in doc && typeof doc.lockUntil === 'string') {\n const lockUntil = new Date(doc.lockUntil).getTime()\n\n // Expired lock, restart count at 1\n if (lockUntil < Date.now()) {\n await payload.update({\n id: doc.id,\n collection: collection.slug,\n data: {\n lockUntil: null,\n loginAttempts: 1,\n },\n depth: 0,\n req,\n })\n }\n\n return\n }\n\n const data: Record<string, unknown> = {\n loginAttempts: Number(doc.loginAttempts) + 1,\n }\n\n // Lock the account if at max attempts and not already locked\n if (typeof doc.loginAttempts === 'number' && doc.loginAttempts + 1 >= maxLoginAttempts) {\n const lockUntil = new Date(Date.now() + lockTime)\n data.lockUntil = lockUntil\n }\n\n await payload.update({\n id: doc.id,\n collection: collection.slug,\n data,\n depth: 0,\n req,\n })\n}\n"],"names":["incrementLoginAttempts","collection","doc","payload","req","auth","lockTime","maxLoginAttempts","lockUntil","Date","getTime","now","update","id","slug","data","loginAttempts","depth","Number"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAWA,OAAO,MAAMA,yBAAyB,OAAO,EAC3CC,UAAU,EACVC,GAAG,EACHC,OAAO,EACPC,GAAG,EACE;IACL,MAAM,EACJC,MAAM,EAAEC,QAAQ,EAAEC,gBAAgB,EAAE,EACrC,GAAGN;IAEJ,IAAI,eAAeC,OAAO,OAAOA,IAAIM,SAAS,KAAK,UAAU;QAC3D,MAAMA,YAAY,IAAIC,KAAKP,IAAIM,SAAS,EAAEE,OAAO;QAEjD,mCAAmC;QACnC,IAAIF,YAAYC,KAAKE,GAAG,IAAI;YAC1B,MAAMR,QAAQS,MAAM,CAAC;gBACnBC,IAAIX,IAAIW,EAAE;gBACVZ,YAAYA,WAAWa,IAAI;gBAC3BC,MAAM;oBACJP,WAAW;oBACXQ,eAAe;gBACjB;gBACAC,OAAO;gBACPb;YACF;QACF;QAEA;IACF;IAEA,MAAMW,OAAgC;QACpCC,eAAeE,OAAOhB,IAAIc,aAAa,IAAI;IAC7C;IAEA,6DAA6D;IAC7D,IAAI,OAAOd,IAAIc,aAAa,KAAK,YAAYd,IAAIc,aAAa,GAAG,KAAKT,kBAAkB;QACtF,MAAMC,YAAY,IAAIC,KAAKA,KAAKE,GAAG,KAAKL;QACxCS,KAAKP,SAAS,GAAGA;IACnB;IAEA,MAAML,QAAQS,MAAM,CAAC;QACnBC,IAAIX,IAAIW,EAAE;QACVZ,YAAYA,WAAWa,IAAI;QAC3BC;QACAE,OAAO;QACPb;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/auth/strategies/local/incrementLoginAttempts.ts"],"sourcesContent":["import type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js'\nimport type { Payload } from '../../../index.js'\nimport type { PayloadRequestWithData } from '../../../types/index.js'\n\ntype Args = {\n collection: SanitizedCollectionConfig\n doc: TypeWithID & Record<string, unknown>\n payload: Payload\n req: PayloadRequestWithData\n}\n\nexport const incrementLoginAttempts = async ({\n collection,\n doc,\n payload,\n req,\n}: Args): Promise<void> => {\n const {\n auth: { lockTime, maxLoginAttempts },\n } = collection\n\n if ('lockUntil' in doc && typeof doc.lockUntil === 'string') {\n const lockUntil = new Date(doc.lockUntil).getTime()\n\n // Expired lock, restart count at 1\n if (lockUntil < Date.now()) {\n await payload.update({\n id: doc.id,\n collection: collection.slug,\n data: {\n lockUntil: null,\n loginAttempts: 1,\n },\n depth: 0,\n req,\n })\n }\n\n return\n }\n\n const data: Record<string, unknown> = {\n loginAttempts: Number(doc.loginAttempts) + 1,\n }\n\n // Lock the account if at max attempts and not already locked\n if (typeof doc.loginAttempts === 'number' && doc.loginAttempts + 1 >= maxLoginAttempts) {\n const lockUntil = new Date(Date.now() + lockTime)\n data.lockUntil = lockUntil\n }\n\n await payload.update({\n id: doc.id,\n collection: collection.slug,\n data,\n depth: 0,\n req,\n })\n}\n"],"names":["incrementLoginAttempts","collection","doc","payload","req","auth","lockTime","maxLoginAttempts","lockUntil","Date","getTime","now","update","id","slug","data","loginAttempts","depth","Number"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAWA,OAAO,MAAMA,yBAAyB,OAAO,EAC3CC,UAAU,EACVC,GAAG,EACHC,OAAO,EACPC,GAAG,EACE;IACL,MAAM,EACJC,MAAM,EAAEC,QAAQ,EAAEC,gBAAgB,EAAE,EACrC,GAAGN;IAEJ,IAAI,eAAeC,OAAO,OAAOA,IAAIM,SAAS,KAAK,UAAU;QAC3D,MAAMA,YAAY,IAAIC,KAAKP,IAAIM,SAAS,EAAEE,OAAO;QAEjD,mCAAmC;QACnC,IAAIF,YAAYC,KAAKE,GAAG,IAAI;YAC1B,MAAMR,QAAQS,MAAM,CAAC;gBACnBC,IAAIX,IAAIW,EAAE;gBACVZ,YAAYA,WAAWa,IAAI;gBAC3BC,MAAM;oBACJP,WAAW;oBACXQ,eAAe;gBACjB;gBACAC,OAAO;gBACPb;YACF;QACF;QAEA;IACF;IAEA,MAAMW,OAAgC;QACpCC,eAAeE,OAAOhB,IAAIc,aAAa,IAAI;IAC7C;IAEA,6DAA6D;IAC7D,IAAI,OAAOd,IAAIc,aAAa,KAAK,YAAYd,IAAIc,aAAa,GAAG,KAAKT,kBAAkB;QACtF,MAAMC,YAAY,IAAIC,KAAKA,KAAKE,GAAG,KAAKL;QACxCS,KAAKP,SAAS,GAAGA;IACnB;IAEA,MAAML,QAAQS,MAAM,CAAC;QACnBC,IAAIX,IAAIW,EAAE;QACVZ,YAAYA,WAAWa,IAAI;QAC3BC;QACAE,OAAO;QACPb;IACF;AACF,EAAC"}
@@ -1,12 +1,12 @@
1
1
  import type { SanitizedCollectionConfig } from '../../../collections/config/types.js';
2
2
  import type { Payload } from '../../../index.js';
3
- import type { PayloadRequest } from '../../../types/index.js';
3
+ import type { PayloadRequestWithData } from '../../../types/index.js';
4
4
  type Args = {
5
5
  collection: SanitizedCollectionConfig;
6
6
  doc: Record<string, unknown>;
7
7
  password: string;
8
8
  payload: Payload;
9
- req: PayloadRequest;
9
+ req: PayloadRequestWithData;
10
10
  };
11
11
  export declare const registerLocalStrategy: ({ collection, doc, password, payload, req, }: Args) => Promise<Record<string, unknown>>;
12
12
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/auth/strategies/local/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAK7D,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,yBAAyB,CAAA;IACrC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,qBAAqB,iDAM/B,IAAI,KAAG,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,CAkCxC,CAAA"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/auth/strategies/local/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAKrE,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,yBAAyB,CAAA;IACrC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,sBAAsB,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,qBAAqB,iDAM/B,IAAI,KAAG,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,CAkCxC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/auth/strategies/local/register.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../../collections/config/types.js'\nimport type { Payload } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\nimport { ValidationError } from '../../../errors/index.js'\nimport { generatePasswordSaltHash } from './generatePasswordSaltHash.js'\n\ntype Args = {\n collection: SanitizedCollectionConfig\n doc: Record<string, unknown>\n password: string\n payload: Payload\n req: PayloadRequest\n}\n\nexport const registerLocalStrategy = async ({\n collection,\n doc,\n password,\n payload,\n req,\n}: Args): Promise<Record<string, unknown>> => {\n const existingUser = await payload.find({\n collection: collection.slug,\n depth: 0,\n limit: 1,\n pagination: false,\n req,\n where: {\n email: {\n equals: doc.email,\n },\n },\n })\n\n if (existingUser.docs.length > 0) {\n throw new ValidationError([\n { field: 'email', message: 'A user with the given email is already registered' },\n ])\n }\n\n const { hash, salt } = await generatePasswordSaltHash({ password })\n\n const sanitizedDoc = { ...doc }\n if (sanitizedDoc.password) delete sanitizedDoc.password\n\n return payload.db.create({\n collection: collection.slug,\n data: {\n ...sanitizedDoc,\n hash,\n salt,\n },\n req,\n })\n}\n"],"names":["ValidationError","generatePasswordSaltHash","registerLocalStrategy","collection","doc","password","payload","req","existingUser","find","slug","depth","limit","pagination","where","email","equals","docs","length","field","message","hash","salt","sanitizedDoc","db","create","data"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,eAAe,QAAQ,2BAA0B;AAC1D,SAASC,wBAAwB,QAAQ,gCAA+B;AAUxE,OAAO,MAAMC,wBAAwB,OAAO,EAC1CC,UAAU,EACVC,GAAG,EACHC,QAAQ,EACRC,OAAO,EACPC,GAAG,EACE;IACL,MAAMC,eAAe,MAAMF,QAAQG,IAAI,CAAC;QACtCN,YAAYA,WAAWO,IAAI;QAC3BC,OAAO;QACPC,OAAO;QACPC,YAAY;QACZN;QACAO,OAAO;YACLC,OAAO;gBACLC,QAAQZ,IAAIW,KAAK;YACnB;QACF;IACF;IAEA,IAAIP,aAAaS,IAAI,CAACC,MAAM,GAAG,GAAG;QAChC,MAAM,IAAIlB,gBAAgB;YACxB;gBAAEmB,OAAO;gBAASC,SAAS;YAAoD;SAChF;IACH;IAEA,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAG,MAAMrB,yBAAyB;QAAEI;IAAS;IAEjE,MAAMkB,eAAe;QAAE,GAAGnB,GAAG;IAAC;IAC9B,IAAImB,aAAalB,QAAQ,EAAE,OAAOkB,aAAalB,QAAQ;IAEvD,OAAOC,QAAQkB,EAAE,CAACC,MAAM,CAAC;QACvBtB,YAAYA,WAAWO,IAAI;QAC3BgB,MAAM;YACJ,GAAGH,YAAY;YACfF;YACAC;QACF;QACAf;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/auth/strategies/local/register.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../../collections/config/types.js'\nimport type { Payload } from '../../../index.js'\nimport type { PayloadRequestWithData } from '../../../types/index.js'\n\nimport { ValidationError } from '../../../errors/index.js'\nimport { generatePasswordSaltHash } from './generatePasswordSaltHash.js'\n\ntype Args = {\n collection: SanitizedCollectionConfig\n doc: Record<string, unknown>\n password: string\n payload: Payload\n req: PayloadRequestWithData\n}\n\nexport const registerLocalStrategy = async ({\n collection,\n doc,\n password,\n payload,\n req,\n}: Args): Promise<Record<string, unknown>> => {\n const existingUser = await payload.find({\n collection: collection.slug,\n depth: 0,\n limit: 1,\n pagination: false,\n req,\n where: {\n email: {\n equals: doc.email,\n },\n },\n })\n\n if (existingUser.docs.length > 0) {\n throw new ValidationError([\n { field: 'email', message: 'A user with the given email is already registered' },\n ])\n }\n\n const { hash, salt } = await generatePasswordSaltHash({ password })\n\n const sanitizedDoc = { ...doc }\n if (sanitizedDoc.password) delete sanitizedDoc.password\n\n return payload.db.create({\n collection: collection.slug,\n data: {\n ...sanitizedDoc,\n hash,\n salt,\n },\n req,\n })\n}\n"],"names":["ValidationError","generatePasswordSaltHash","registerLocalStrategy","collection","doc","password","payload","req","existingUser","find","slug","depth","limit","pagination","where","email","equals","docs","length","field","message","hash","salt","sanitizedDoc","db","create","data"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,eAAe,QAAQ,2BAA0B;AAC1D,SAASC,wBAAwB,QAAQ,gCAA+B;AAUxE,OAAO,MAAMC,wBAAwB,OAAO,EAC1CC,UAAU,EACVC,GAAG,EACHC,QAAQ,EACRC,OAAO,EACPC,GAAG,EACE;IACL,MAAMC,eAAe,MAAMF,QAAQG,IAAI,CAAC;QACtCN,YAAYA,WAAWO,IAAI;QAC3BC,OAAO;QACPC,OAAO;QACPC,YAAY;QACZN;QACAO,OAAO;YACLC,OAAO;gBACLC,QAAQZ,IAAIW,KAAK;YACnB;QACF;IACF;IAEA,IAAIP,aAAaS,IAAI,CAACC,MAAM,GAAG,GAAG;QAChC,MAAM,IAAIlB,gBAAgB;YACxB;gBAAEmB,OAAO;gBAASC,SAAS;YAAoD;SAChF;IACH;IAEA,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAG,MAAMrB,yBAAyB;QAAEI;IAAS;IAEjE,MAAMkB,eAAe;QAAE,GAAGnB,GAAG;IAAC;IAC9B,IAAImB,aAAalB,QAAQ,EAAE,OAAOkB,aAAalB,QAAQ;IAEvD,OAAOC,QAAQkB,EAAE,CAACC,MAAM,CAAC;QACvBtB,YAAYA,WAAWO,IAAI;QAC3BgB,MAAM;YACJ,GAAGH,YAAY;YACfF;YACAC;QACF;QACAf;IACF;AACF,EAAC"}
@@ -1,11 +1,11 @@
1
1
  import type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js';
2
2
  import type { Payload } from '../../../index.js';
3
- import type { PayloadRequest } from '../../../types/index.js';
3
+ import type { PayloadRequestWithData } from '../../../types/index.js';
4
4
  type Args = {
5
5
  collection: SanitizedCollectionConfig;
6
6
  doc: TypeWithID & Record<string, unknown>;
7
7
  payload: Payload;
8
- req: PayloadRequest;
8
+ req: PayloadRequestWithData;
9
9
  };
10
10
  export declare const resetLoginAttempts: ({ collection, doc, payload, req, }: Args) => Promise<void>;
11
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"resetLoginAttempts.d.ts","sourceRoot":"","sources":["../../../../src/auth/strategies/local/resetLoginAttempts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAA;AACjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,yBAAyB,CAAA;IACrC,GAAG,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,kBAAkB,uCAK5B,IAAI,KAAG,QAAQ,IAAI,CAarB,CAAA"}
1
+ {"version":3,"file":"resetLoginAttempts.d.ts","sourceRoot":"","sources":["../../../../src/auth/strategies/local/resetLoginAttempts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAA;AACjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAErE,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,yBAAyB,CAAA;IACrC,GAAG,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,sBAAsB,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,kBAAkB,uCAK5B,IAAI,KAAG,QAAQ,IAAI,CAarB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/auth/strategies/local/resetLoginAttempts.ts"],"sourcesContent":["import type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js'\nimport type { Payload } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\ntype Args = {\n collection: SanitizedCollectionConfig\n doc: TypeWithID & Record<string, unknown>\n payload: Payload\n req: PayloadRequest\n}\n\nexport const resetLoginAttempts = async ({\n collection,\n doc,\n payload,\n req,\n}: Args): Promise<void> => {\n if (!('lockUntil' in doc && typeof doc.lockUntil === 'string') || doc.loginAttempts === 0) return\n await payload.update({\n id: doc.id,\n collection: collection.slug,\n data: {\n lockUntil: null,\n loginAttempts: 0,\n },\n depth: 0,\n overrideAccess: true,\n req,\n })\n}\n"],"names":["resetLoginAttempts","collection","doc","payload","req","lockUntil","loginAttempts","update","id","slug","data","depth","overrideAccess"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAWA,OAAO,MAAMA,qBAAqB,OAAO,EACvCC,UAAU,EACVC,GAAG,EACHC,OAAO,EACPC,GAAG,EACE;IACL,IAAI,CAAE,CAAA,eAAeF,OAAO,OAAOA,IAAIG,SAAS,KAAK,QAAO,KAAMH,IAAII,aAAa,KAAK,GAAG;IAC3F,MAAMH,QAAQI,MAAM,CAAC;QACnBC,IAAIN,IAAIM,EAAE;QACVP,YAAYA,WAAWQ,IAAI;QAC3BC,MAAM;YACJL,WAAW;YACXC,eAAe;QACjB;QACAK,OAAO;QACPC,gBAAgB;QAChBR;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/auth/strategies/local/resetLoginAttempts.ts"],"sourcesContent":["import type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js'\nimport type { Payload } from '../../../index.js'\nimport type { PayloadRequestWithData } from '../../../types/index.js'\n\ntype Args = {\n collection: SanitizedCollectionConfig\n doc: TypeWithID & Record<string, unknown>\n payload: Payload\n req: PayloadRequestWithData\n}\n\nexport const resetLoginAttempts = async ({\n collection,\n doc,\n payload,\n req,\n}: Args): Promise<void> => {\n if (!('lockUntil' in doc && typeof doc.lockUntil === 'string') || doc.loginAttempts === 0) return\n await payload.update({\n id: doc.id,\n collection: collection.slug,\n data: {\n lockUntil: null,\n loginAttempts: 0,\n },\n depth: 0,\n overrideAccess: true,\n req,\n })\n}\n"],"names":["resetLoginAttempts","collection","doc","payload","req","lockUntil","loginAttempts","update","id","slug","data","depth","overrideAccess"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAWA,OAAO,MAAMA,qBAAqB,OAAO,EACvCC,UAAU,EACVC,GAAG,EACHC,OAAO,EACPC,GAAG,EACE;IACL,IAAI,CAAE,CAAA,eAAeF,OAAO,OAAOA,IAAIG,SAAS,KAAK,QAAO,KAAMH,IAAII,aAAa,KAAK,GAAG;IAC3F,MAAMH,QAAQI,MAAM,CAAC;QACnBC,IAAIN,IAAIM,EAAE;QACVP,YAAYA,WAAWQ,IAAI;QAC3BC,MAAM;YACJL,WAAW;YACXC,eAAe;QACjB;QACAK,OAAO;QACPC,gBAAgB;QAChBR;IACF;AACF,EAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { DeepRequired } from 'ts-essentials';
2
2
  import type { Payload } from '../index.js';
3
- import type { PayloadRequest, Where } from '../types/index.js';
3
+ import type { PayloadRequestWithData, Where } from '../types/index.js';
4
4
  export type Permission = {
5
5
  permission: boolean;
6
6
  where?: Record<string, unknown>;
@@ -66,22 +66,22 @@ export type User = {
66
66
  */
67
67
  export type ClientUser = Omit<User, 'collection'>;
68
68
  type GenerateVerifyEmailHTML = (args: {
69
- req: PayloadRequest;
69
+ req: PayloadRequestWithData;
70
70
  token: string;
71
71
  user: any;
72
72
  }) => Promise<string> | string;
73
73
  type GenerateVerifyEmailSubject = (args: {
74
- req: PayloadRequest;
74
+ req: PayloadRequestWithData;
75
75
  token: string;
76
76
  user: any;
77
77
  }) => Promise<string> | string;
78
78
  type GenerateForgotPasswordEmailHTML = (args?: {
79
- req?: PayloadRequest;
79
+ req?: PayloadRequestWithData;
80
80
  token?: string;
81
81
  user?: unknown;
82
82
  }) => Promise<string> | string;
83
83
  type GenerateForgotPasswordEmailSubject = (args?: {
84
- req?: PayloadRequest;
84
+ req?: PayloadRequestWithData;
85
85
  token?: string;
86
86
  user?: any;
87
87
  }) => Promise<string> | string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE9D,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,gBAAgB,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AQ,GAAG,OAAO,CAAA;QAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;KACjB,CAAA;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oBAAoB,CAAC,EAAE,IAAI,CAAA;IAC3B,cAAc,CAAC,EAAE;QACf,iBAAiB,CAAC,EAAE,+BAA+B,CAAA;QACnD,oBAAoB,CAAC,EAAE,kCAAkC,CAAA;KAC1D,CAAA;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,wBAAwB,CAAC,EAAE,IAAI,CAAA;IAC/B,UAAU,CAAC,EAAE,YAAY,EAAE,CAAA;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EACH;QACE,iBAAiB,CAAC,EAAE,uBAAuB,CAAA;QAC3C,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;KAClD,GACD,OAAO,CAAA;CACZ;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAA;IAC3C,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;CAClD,CAAA;AAED,MAAM,WAAW,IAAK,SAAQ,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,QAAQ,CAAC;IAC7F,cAAc,CAAC,EAAE;QACf,iBAAiB,CAAC,EAAE,+BAA+B,CAAA;QACnD,oBAAoB,CAAC,EAAE,kCAAkC,CAAA;KAC1D,CAAA;IACD,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAA;CAChC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,IAAI,KAAK,CAE7E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/auth/types.ts"],"sourcesContent":["import type { DeepRequired } from 'ts-essentials'\n\nimport type { Payload } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\n\nexport type Permission = {\n permission: boolean\n where?: Record<string, unknown>\n}\n\nexport type FieldPermissions = {\n blocks?: {\n [blockSlug: string]: {\n fields: {\n [fieldName: string]: FieldPermissions\n }\n }\n }\n create: {\n permission: boolean\n }\n fields?: {\n [fieldName: string]: FieldPermissions\n }\n read: {\n permission: boolean\n }\n update: {\n permission: boolean\n }\n}\n\nexport type CollectionPermission = {\n create: Permission\n delete: Permission\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type GlobalPermission = {\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type DocumentPermissions = CollectionPermission | GlobalPermission\nexport type Permissions = {\n canAccessAdmin: boolean\n collections: {\n [collectionSlug: string]: CollectionPermission\n }\n globals?: {\n [globalSlug: string]: GlobalPermission\n }\n}\n\nexport type User = {\n [key: string]: any // This NEEDS to be an any, otherwise it breaks the Omit for ClientUser below\n collection: string\n email: string\n id: string\n}\n\n/**\n * `collection` is not available one the client. It's only available on the server (req.user)\n * On the client, you can access the collection via config.admin.user. Config can be accessed using the useConfig() hook\n */\nexport type ClientUser = Omit<User, 'collection'>\n\ntype GenerateVerifyEmailHTML = (args: {\n req: PayloadRequest\n token: string\n user: any\n}) => Promise<string> | string\ntype GenerateVerifyEmailSubject = (args: {\n req: PayloadRequest\n token: string\n user: any\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailHTML = (args?: {\n req?: PayloadRequest\n token?: string\n user?: unknown\n}) => Promise<string> | string\ntype GenerateForgotPasswordEmailSubject = (args?: {\n req?: PayloadRequest\n token?: string\n user?: any\n}) => Promise<string> | string\n\nexport type AuthStrategyFunctionArgs = {\n cookies?: Map<string, string>\n headers: Request['headers']\n isGraphQL?: boolean\n payload: Payload\n}\nexport type AuthStrategyFunction = ({\n headers,\n isGraphQL,\n payload,\n}: AuthStrategyFunctionArgs) => Promise<User | null> | User | null\nexport type AuthStrategy = {\n authenticate: AuthStrategyFunction\n name: string\n}\n\nexport interface IncomingAuthType {\n cookies?: {\n domain?: string\n sameSite?: 'Lax' | 'None' | 'Strict' | boolean\n secure?: boolean\n }\n depth?: number\n disableLocalStrategy?: true\n forgotPassword?: {\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n lockTime?: number\n maxLoginAttempts?: number\n removeTokenFromResponses?: true\n strategies?: AuthStrategy[]\n tokenExpiration?: number\n useAPIKey?: boolean\n verify?:\n | {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n }\n | boolean\n}\n\nexport type VerifyConfig = {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n}\n\nexport interface Auth extends Omit<DeepRequired<IncomingAuthType>, 'forgotPassword' | 'verify'> {\n forgotPassword?: {\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n verify?: VerifyConfig | boolean\n}\n\nexport function hasWhereAccessResult(result: Where | boolean): result is Where {\n return result && typeof result === 'object'\n}\n"],"names":["hasWhereAccessResult","result"],"rangeMappings":";;","mappings":"AAyJA,OAAO,SAASA,qBAAqBC,MAAuB;IAC1D,OAAOA,UAAU,OAAOA,WAAW;AACrC"}
1
+ {"version":3,"sources":["../../src/auth/types.ts"],"sourcesContent":["import type { DeepRequired } from 'ts-essentials'\n\nimport type { Payload } from '../index.js'\nimport type { PayloadRequestWithData, Where } from '../types/index.js'\n\nexport type Permission = {\n permission: boolean\n where?: Record<string, unknown>\n}\n\nexport type FieldPermissions = {\n blocks?: {\n [blockSlug: string]: {\n fields: {\n [fieldName: string]: FieldPermissions\n }\n }\n }\n create: {\n permission: boolean\n }\n fields?: {\n [fieldName: string]: FieldPermissions\n }\n read: {\n permission: boolean\n }\n update: {\n permission: boolean\n }\n}\n\nexport type CollectionPermission = {\n create: Permission\n delete: Permission\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type GlobalPermission = {\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type DocumentPermissions = CollectionPermission | GlobalPermission\nexport type Permissions = {\n canAccessAdmin: boolean\n collections: {\n [collectionSlug: string]: CollectionPermission\n }\n globals?: {\n [globalSlug: string]: GlobalPermission\n }\n}\n\nexport type User = {\n [key: string]: any // This NEEDS to be an any, otherwise it breaks the Omit for ClientUser below\n collection: string\n email: string\n id: string\n}\n\n/**\n * `collection` is not available one the client. It's only available on the server (req.user)\n * On the client, you can access the collection via config.admin.user. Config can be accessed using the useConfig() hook\n */\nexport type ClientUser = Omit<User, 'collection'>\n\ntype GenerateVerifyEmailHTML = (args: {\n req: PayloadRequestWithData\n token: string\n user: any\n}) => Promise<string> | string\ntype GenerateVerifyEmailSubject = (args: {\n req: PayloadRequestWithData\n token: string\n user: any\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailHTML = (args?: {\n req?: PayloadRequestWithData\n token?: string\n user?: unknown\n}) => Promise<string> | string\ntype GenerateForgotPasswordEmailSubject = (args?: {\n req?: PayloadRequestWithData\n token?: string\n user?: any\n}) => Promise<string> | string\n\nexport type AuthStrategyFunctionArgs = {\n cookies?: Map<string, string>\n headers: Request['headers']\n isGraphQL?: boolean\n payload: Payload\n}\nexport type AuthStrategyFunction = ({\n headers,\n isGraphQL,\n payload,\n}: AuthStrategyFunctionArgs) => Promise<User | null> | User | null\nexport type AuthStrategy = {\n authenticate: AuthStrategyFunction\n name: string\n}\n\nexport interface IncomingAuthType {\n cookies?: {\n domain?: string\n sameSite?: 'Lax' | 'None' | 'Strict' | boolean\n secure?: boolean\n }\n depth?: number\n disableLocalStrategy?: true\n forgotPassword?: {\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n lockTime?: number\n maxLoginAttempts?: number\n removeTokenFromResponses?: true\n strategies?: AuthStrategy[]\n tokenExpiration?: number\n useAPIKey?: boolean\n verify?:\n | {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n }\n | boolean\n}\n\nexport type VerifyConfig = {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n}\n\nexport interface Auth extends Omit<DeepRequired<IncomingAuthType>, 'forgotPassword' | 'verify'> {\n forgotPassword?: {\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n verify?: VerifyConfig | boolean\n}\n\nexport function hasWhereAccessResult(result: Where | boolean): result is Where {\n return result && typeof result === 'object'\n}\n"],"names":["hasWhereAccessResult","result"],"rangeMappings":";;","mappings":"AAyJA,OAAO,SAASA,qBAAqBC,MAAuB;IAC1D,OAAOA,UAAU,OAAOA,WAAW;AACrC"}
@@ -296,7 +296,7 @@ export declare const createClientCollectionConfig: ({ collection, t, }: {
296
296
  };
297
297
  access: {
298
298
  admin: ({ req }: {
299
- req: import("../../types/index.js").PayloadRequest;
299
+ req: import("../../types/index.js").PayloadRequestWithData;
300
300
  }) => boolean | Promise<boolean>;
301
301
  create: import("../../config/types.js").Access;
302
302
  delete: import("../../config/types.js").Access;
@@ -305,6 +305,7 @@ export declare const createClientCollectionConfig: ({ collection, t, }: {
305
305
  unlock: import("../../config/types.js").Access;
306
306
  update: import("../../config/types.js").Access;
307
307
  };
308
+ dbName: import("../../database/types.js").DBIdentifierName;
308
309
  defaultSort: string;
309
310
  disableDuplicate: boolean;
310
311
  labels: {
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/collections/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEA,CAAA;AAED,eAAO,MAAM,6BAA6B,wBAGvC;IACD,WAAW,EAAE,yBAAyB,EAAE,CAAA;IACxC,CAAC,EAAE,SAAS,CAAA;CACb,KAAG,sBAAsB,EACwD,CAAA"}
@@ -1,19 +1,19 @@
1
1
  export declare const defaults: {
2
2
  access: {
3
3
  create: ({ req: { user } }: {
4
- req: import("../../types/index.js").PayloadRequest;
4
+ req: import("../../types/index.js").PayloadRequestWithData;
5
5
  }) => boolean;
6
6
  delete: ({ req: { user } }: {
7
- req: import("../../types/index.js").PayloadRequest;
7
+ req: import("../../types/index.js").PayloadRequestWithData;
8
8
  }) => boolean;
9
9
  read: ({ req: { user } }: {
10
- req: import("../../types/index.js").PayloadRequest;
10
+ req: import("../../types/index.js").PayloadRequestWithData;
11
11
  }) => boolean;
12
12
  unlock: ({ req: { user } }: {
13
- req: import("../../types/index.js").PayloadRequest;
13
+ req: import("../../types/index.js").PayloadRequestWithData;
14
14
  }) => boolean;
15
15
  update: ({ req: { user } }: {
16
- req: import("../../types/index.js").PayloadRequest;
16
+ req: import("../../types/index.js").PayloadRequestWithData;
17
17
  }) => boolean;
18
18
  };
19
19
  admin: {
@@ -3,9 +3,10 @@ import type { DeepRequired } from 'ts-essentials';
3
3
  import type { CustomPreviewButton, CustomPublishButton, CustomSaveButton, CustomSaveDraftButton } from '../../admin/types.js';
4
4
  import type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js';
5
5
  import type { Access, CustomComponent, EditConfig, Endpoint, EntityDescription, GeneratePreviewURL, LabelFunction, LivePreviewConfig } from '../../config/types.js';
6
+ import type { DBIdentifierName } from '../../database/types.js';
6
7
  import type { Field } from '../../fields/config/types.js';
7
8
  import type { GeneratedTypes } from '../../index.js';
8
- import type { PayloadRequest, RequestContext } from '../../types/index.js';
9
+ import type { PayloadRequestWithData, RequestContext } from '../../types/index.js';
9
10
  import type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js';
10
11
  import type { IncomingCollectionVersions, SanitizedCollectionVersions } from '../../versions/types.js';
11
12
  import type { AfterOperationArg, AfterOperationMap } from '../operations/utils.js';
@@ -20,7 +21,7 @@ export type BeforeOperationHook = (args: {
20
21
  * Hook operation being performed
21
22
  */
22
23
  operation: HookOperationType;
23
- req: PayloadRequest;
24
+ req: PayloadRequestWithData;
24
25
  }) => any;
25
26
  export type BeforeValidateHook<T extends TypeWithID = any> = (args: {
26
27
  /** The collection which this hook is being run on */
@@ -37,7 +38,7 @@ export type BeforeValidateHook<T extends TypeWithID = any> = (args: {
37
38
  * `undefined` on 'create' operation
38
39
  */
39
40
  originalDoc?: T;
40
- req: PayloadRequest;
41
+ req: PayloadRequestWithData;
41
42
  }) => any;
42
43
  export type BeforeChangeHook<T extends TypeWithID = any> = (args: {
43
44
  /** The collection which this hook is being run on */
@@ -54,7 +55,7 @@ export type BeforeChangeHook<T extends TypeWithID = any> = (args: {
54
55
  * `undefined` on 'create' operation
55
56
  */
56
57
  originalDoc?: T;
57
- req: PayloadRequest;
58
+ req: PayloadRequestWithData;
58
59
  }) => any;
59
60
  export type AfterChangeHook<T extends TypeWithID = any> = (args: {
60
61
  /** The collection which this hook is being run on */
@@ -66,7 +67,7 @@ export type AfterChangeHook<T extends TypeWithID = any> = (args: {
66
67
  */
67
68
  operation: CreateOrUpdateOperation;
68
69
  previousDoc: T;
69
- req: PayloadRequest;
70
+ req: PayloadRequestWithData;
70
71
  }) => any;
71
72
  export type BeforeReadHook<T extends TypeWithID = any> = (args: {
72
73
  /** The collection which this hook is being run on */
@@ -76,7 +77,7 @@ export type BeforeReadHook<T extends TypeWithID = any> = (args: {
76
77
  query: {
77
78
  [key: string]: any;
78
79
  };
79
- req: PayloadRequest;
80
+ req: PayloadRequestWithData;
80
81
  }) => any;
81
82
  export type AfterReadHook<T extends TypeWithID = any> = (args: {
82
83
  /** The collection which this hook is being run on */
@@ -87,14 +88,14 @@ export type AfterReadHook<T extends TypeWithID = any> = (args: {
87
88
  query?: {
88
89
  [key: string]: any;
89
90
  };
90
- req: PayloadRequest;
91
+ req: PayloadRequestWithData;
91
92
  }) => any;
92
93
  export type BeforeDeleteHook = (args: {
93
94
  /** The collection which this hook is being run on */
94
95
  collection: SanitizedCollectionConfig;
95
96
  context: RequestContext;
96
97
  id: number | string;
97
- req: PayloadRequest;
98
+ req: PayloadRequestWithData;
98
99
  }) => any;
99
100
  export type AfterDeleteHook<T extends TypeWithID = any> = (args: {
100
101
  /** The collection which this hook is being run on */
@@ -102,7 +103,7 @@ export type AfterDeleteHook<T extends TypeWithID = any> = (args: {
102
103
  context: RequestContext;
103
104
  doc: T;
104
105
  id: number | string;
105
- req: PayloadRequest;
106
+ req: PayloadRequestWithData;
106
107
  }) => any;
107
108
  export type AfterOperationHook<T extends TypeWithID = any> = (arg: AfterOperationArg<T>) => Promise<ReturnType<AfterOperationMap<T>[keyof AfterOperationMap<T>]>>;
108
109
  export type AfterErrorHook = (err: Error, res: unknown, context: RequestContext,
@@ -115,14 +116,14 @@ export type BeforeLoginHook<T extends TypeWithID = any> = (args: {
115
116
  /** The collection which this hook is being run on */
116
117
  collection: SanitizedCollectionConfig;
117
118
  context: RequestContext;
118
- req: PayloadRequest;
119
+ req: PayloadRequestWithData;
119
120
  user: T;
120
121
  }) => any;
121
122
  export type AfterLoginHook<T extends TypeWithID = any> = (args: {
122
123
  /** The collection which this hook is being run on */
123
124
  collection: SanitizedCollectionConfig;
124
125
  context: RequestContext;
125
- req: PayloadRequest;
126
+ req: PayloadRequestWithData;
126
127
  token: string;
127
128
  user: T;
128
129
  }) => any;
@@ -130,13 +131,13 @@ export type AfterLogoutHook<T extends TypeWithID = any> = (args: {
130
131
  /** The collection which this hook is being run on */
131
132
  collection: SanitizedCollectionConfig;
132
133
  context: RequestContext;
133
- req: PayloadRequest;
134
+ req: PayloadRequestWithData;
134
135
  }) => any;
135
136
  export type AfterMeHook<T extends TypeWithID = any> = (args: {
136
137
  /** The collection which this hook is being run on */
137
138
  collection: SanitizedCollectionConfig;
138
139
  context: RequestContext;
139
- req: PayloadRequest;
140
+ req: PayloadRequestWithData;
140
141
  response: unknown;
141
142
  }) => any;
142
143
  export type AfterRefreshHook<T extends TypeWithID = any> = (args: {
@@ -144,7 +145,7 @@ export type AfterRefreshHook<T extends TypeWithID = any> = (args: {
144
145
  collection: SanitizedCollectionConfig;
145
146
  context: RequestContext;
146
147
  exp: number;
147
- req: PayloadRequest;
148
+ req: PayloadRequestWithData;
148
149
  token: string;
149
150
  }) => any;
150
151
  export type AfterForgotPasswordHook = (args: {
@@ -253,7 +254,7 @@ export type CollectionConfig = {
253
254
  */
254
255
  access?: {
255
256
  admin?: ({ req }: {
256
- req: PayloadRequest;
257
+ req: PayloadRequestWithData;
257
258
  }) => Promise<boolean> | boolean;
258
259
  create?: Access;
259
260
  delete?: Access;
@@ -274,6 +275,11 @@ export type CollectionConfig = {
274
275
  auth?: IncomingAuthType | boolean;
275
276
  /** Extension point to add your custom data. Server only. */
276
277
  custom?: Record<string, any>;
278
+ /**
279
+ * Used to override the default naming of the database table or collection with your using a function or string
280
+ * @WARNING: If you change this property with existing data, you will need to handle the renaming of the table in your database or by using migrations
281
+ */
282
+ dbName?: DBIdentifierName;
277
283
  /**
278
284
  * Default field to sort by in collection list view
279
285
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/collections/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAA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AG,MAAM,CAAA;IAChC,OAAO,CAAC,EAAE;QACR,GAAG,EAAE,iBAAiB,CAAA;QACtB,SAAS,EAAE,iBAAiB,CAAA;QAC5B,iBAAiB,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;QACtC,aAAa,EAAE,iBAAiB,CAAA;QAChC,IAAI,EAAE,iBAAiB,CAAA;QACvB,uBAAuB,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;QAC5C,WAAW,EAAE,iBAAiB,CAAA;QAC9B,cAAc,EAAE,sBAAsB,CAAA;KACvC,CAAA;CACF,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,KAAK,SAAS,MAAM,cAAc,CAAC,aAAa,CAAC,IAAI;IACnF,IAAI,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,EAAE,CAAA;IAC5C,MAAM,EAAE;QACN,EAAE,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;QAC9C,OAAO,EAAE,MAAM,CAAA;KAChB,EAAE,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["import type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired } from 'ts-essentials'\n\nimport type {\n CustomPreviewButton,\n CustomPublishButton,\n CustomSaveButton,\n CustomSaveDraftButton,\n} from '../../admin/types.js'\nimport type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js'\nimport type {\n Access,\n CustomComponent,\n EditConfig,\n Endpoint,\n EntityDescription,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n} from '../../config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { GeneratedTypes } from '../../index.js'\nimport type { PayloadRequest, RequestContext } from '../../types/index.js'\nimport type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js'\nimport type {\n IncomingCollectionVersions,\n SanitizedCollectionVersions,\n} from '../../versions/types.js'\nimport type { AfterOperationArg, AfterOperationMap } from '../operations/utils.js'\n\nexport type HookOperationType =\n | 'autosave'\n | 'count'\n | 'create'\n | 'delete'\n | 'forgotPassword'\n | 'login'\n | 'read'\n | 'refresh'\n | 'update'\n\ntype CreateOrUpdateOperation = Extract<HookOperationType, 'create' | 'update'>\n\nexport type BeforeOperationHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n /**\n * Hook operation being performed\n */\n operation: HookOperationType\n req: PayloadRequest\n}) => any\n\nexport type BeforeValidateHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data?: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type AfterChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n previousDoc: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n query: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type AfterReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n findMany?: boolean\n query?: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type BeforeDeleteHook = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterDeleteHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterOperationHook<T extends TypeWithID = any> = (\n arg: AfterOperationArg<T>,\n) => Promise<ReturnType<AfterOperationMap<T>[keyof AfterOperationMap<T>]>>\n\nexport type AfterErrorHook = (\n err: Error,\n res: unknown,\n context: RequestContext,\n /** The collection which this hook is being run on. This is null if the AfterError hook was be added to the payload-wide config */\n collection: SanitizedCollectionConfig | null,\n) => { response: any; status: number } | void\n\nexport type BeforeLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n user: T\n}) => any\n\nexport type AfterLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n token: string\n user: T\n}) => any\n\nexport type AfterLogoutHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n}) => any\n\nexport type AfterMeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n response: unknown\n}) => any\n\nexport type AfterRefreshHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n exp: number\n req: PayloadRequest\n token: string\n}) => any\n\nexport type AfterForgotPasswordHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n}) => any\n\nexport type CollectionAdminOptions = {\n /**\n * Custom admin components\n */\n components?: {\n AfterList?: CustomComponent[]\n AfterListTable?: CustomComponent[]\n BeforeList?: CustomComponent[]\n BeforeListTable?: CustomComponent[]\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomPreviewButton\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: CustomPublishButton\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomSaveButton\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomSaveDraftButton\n }\n views?: {\n /**\n * Set to a React component to replace the entire \"Edit\" view, including all nested routes.\n * Set to an object to replace or modify individual nested routes, or to add new ones.\n */\n Edit?: EditConfig\n List?:\n | {\n Component?: React.ComponentType<any>\n actions?: CustomComponent[]\n }\n | React.ComponentType<any>\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /**\n * Default columns to show in list view\n */\n defaultColumns?: string[]\n /**\n * Custom description for collection\n */\n description?: EntityDescription\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Place collections into a navigational group\n * */\n group?: Record<string, string> | string\n /**\n * Exclude the collection from the admin nav and routes\n */\n hidden?: ((args: { user: ClientUser }) => boolean) | boolean\n /**\n * Hide the API URL within the Edit view\n */\n hideAPIURL?: boolean\n /**\n * Additional fields to be searched via the full text search\n */\n listSearchableFields?: string[]\n /**\n * Live preview options\n */\n livePreview?: LivePreviewConfig\n pagination?: {\n defaultLimit?: number\n limits?: number[]\n }\n /**\n * Function to generate custom preview URL\n */\n preview?: GeneratePreviewURL\n /**\n * Field to use as title in Edit view and first column in List view\n */\n useAsTitle?: string\n}\n\n/** Manage all aspects of a data collection */\nexport type CollectionConfig = {\n /**\n * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequest }) => Promise<boolean> | boolean\n create?: Access\n delete?: Access\n read?: Access\n readVersions?: Access\n unlock?: Access\n update?: Access\n }\n /**\n * Collection admin options\n */\n admin?: CollectionAdminOptions\n /**\n * Collection login options\n *\n * Use `true` to enable with default options\n */\n auth?: IncomingAuthType | boolean\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n /**\n * Default field to sort by in collection list view\n */\n defaultSort?: string\n /**\n * When true, do not show the \"Duplicate\" button while editing documents within this collection and prevent `duplicate` from all APIs\n */\n disableDuplicate?: boolean\n /**\n * Custom rest api endpoints, set false to disable all rest endpoints for this collection.\n */\n endpoints?: Omit<Endpoint, 'root'>[] | false\n fields: Field[]\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\n pluralName?: string\n singularName?: string\n }\n | false\n /**\n * Hooks to modify Payload functionality\n */\n hooks?: {\n afterChange?: AfterChangeHook[]\n afterDelete?: AfterDeleteHook[]\n afterError?: AfterErrorHook\n afterForgotPassword?: AfterForgotPasswordHook[]\n afterLogin?: AfterLoginHook[]\n afterLogout?: AfterLogoutHook[]\n afterMe?: AfterMeHook[]\n afterOperation?: AfterOperationHook[]\n afterRead?: AfterReadHook[]\n afterRefresh?: AfterRefreshHook[]\n beforeChange?: BeforeChangeHook[]\n beforeDelete?: BeforeDeleteHook[]\n beforeLogin?: BeforeLoginHook[]\n beforeOperation?: BeforeOperationHook[]\n beforeRead?: BeforeReadHook[]\n beforeValidate?: BeforeValidateHook[]\n }\n /**\n * Label configuration\n */\n labels?: {\n plural?: LabelFunction | Record<string, string> | string\n singular?: LabelFunction | Record<string, string> | string\n }\n slug: string\n /**\n * Add `createdAt` and `updatedAt` fields\n *\n * @default true\n */\n timestamps?: boolean\n /**\n * Options used in typescript generation\n */\n typescript?: {\n /**\n * Typescript generation name given to the interface type\n */\n interface?: string\n }\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable uploads\n */\n upload?: UploadConfig | boolean\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable versioning\n */\n versions?: IncomingCollectionVersions | boolean\n}\n\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n 'auth' | 'endpoints' | 'fields' | 'upload' | 'versions'\n > {\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n upload: SanitizedUploadConfig\n versions: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n JWT: GraphQLObjectType\n countType: GraphQLObjectType\n mutationInputType: GraphQLNonNull<any>\n paginatedType: GraphQLObjectType\n type: GraphQLObjectType\n updateMutationInputType: GraphQLNonNull<any>\n versionType: GraphQLObjectType\n whereInputType: GraphQLInputObjectType\n }\n}\n\nexport type BulkOperationResult<TSlug extends keyof GeneratedTypes['collections']> = {\n docs: GeneratedTypes['collections'][TSlug][]\n errors: {\n id: GeneratedTypes['collections'][TSlug]['id']\n message: string\n }[]\n}\n\nexport type AuthCollection = {\n config: SanitizedCollectionConfig\n}\n\nexport type TypeWithID = {\n id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n id: number | string\n updatedAt: string\n}\n"],"names":[],"rangeMappings":"","mappings":"AA2bA,WAKC"}
1
+ {"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["import type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired } from 'ts-essentials'\n\nimport type {\n CustomPreviewButton,\n CustomPublishButton,\n CustomSaveButton,\n CustomSaveDraftButton,\n} from '../../admin/types.js'\nimport type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js'\nimport type {\n Access,\n CustomComponent,\n EditConfig,\n Endpoint,\n EntityDescription,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { GeneratedTypes } from '../../index.js'\nimport type { PayloadRequestWithData, RequestContext } from '../../types/index.js'\nimport type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js'\nimport type {\n IncomingCollectionVersions,\n SanitizedCollectionVersions,\n} from '../../versions/types.js'\nimport type { AfterOperationArg, AfterOperationMap } from '../operations/utils.js'\n\nexport type HookOperationType =\n | 'autosave'\n | 'count'\n | 'create'\n | 'delete'\n | 'forgotPassword'\n | 'login'\n | 'read'\n | 'refresh'\n | 'update'\n\ntype CreateOrUpdateOperation = Extract<HookOperationType, 'create' | 'update'>\n\nexport type BeforeOperationHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n /**\n * Hook operation being performed\n */\n operation: HookOperationType\n req: PayloadRequestWithData\n}) => any\n\nexport type BeforeValidateHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data?: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequestWithData\n}) => any\n\nexport type BeforeChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequestWithData\n}) => any\n\nexport type AfterChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n previousDoc: T\n req: PayloadRequestWithData\n}) => any\n\nexport type BeforeReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n query: { [key: string]: any }\n req: PayloadRequestWithData\n}) => any\n\nexport type AfterReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n findMany?: boolean\n query?: { [key: string]: any }\n req: PayloadRequestWithData\n}) => any\n\nexport type BeforeDeleteHook = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n id: number | string\n req: PayloadRequestWithData\n}) => any\n\nexport type AfterDeleteHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n id: number | string\n req: PayloadRequestWithData\n}) => any\n\nexport type AfterOperationHook<T extends TypeWithID = any> = (\n arg: AfterOperationArg<T>,\n) => Promise<ReturnType<AfterOperationMap<T>[keyof AfterOperationMap<T>]>>\n\nexport type AfterErrorHook = (\n err: Error,\n res: unknown,\n context: RequestContext,\n /** The collection which this hook is being run on. This is null if the AfterError hook was be added to the payload-wide config */\n collection: SanitizedCollectionConfig | null,\n) => { response: any; status: number } | void\n\nexport type BeforeLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequestWithData\n user: T\n}) => any\n\nexport type AfterLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequestWithData\n token: string\n user: T\n}) => any\n\nexport type AfterLogoutHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequestWithData\n}) => any\n\nexport type AfterMeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequestWithData\n response: unknown\n}) => any\n\nexport type AfterRefreshHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n exp: number\n req: PayloadRequestWithData\n token: string\n}) => any\n\nexport type AfterForgotPasswordHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n}) => any\n\nexport type CollectionAdminOptions = {\n /**\n * Custom admin components\n */\n components?: {\n AfterList?: CustomComponent[]\n AfterListTable?: CustomComponent[]\n BeforeList?: CustomComponent[]\n BeforeListTable?: CustomComponent[]\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomPreviewButton\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: CustomPublishButton\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomSaveButton\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomSaveDraftButton\n }\n views?: {\n /**\n * Set to a React component to replace the entire \"Edit\" view, including all nested routes.\n * Set to an object to replace or modify individual nested routes, or to add new ones.\n */\n Edit?: EditConfig\n List?:\n | {\n Component?: React.ComponentType<any>\n actions?: CustomComponent[]\n }\n | React.ComponentType<any>\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /**\n * Default columns to show in list view\n */\n defaultColumns?: string[]\n /**\n * Custom description for collection\n */\n description?: EntityDescription\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Place collections into a navigational group\n * */\n group?: Record<string, string> | string\n /**\n * Exclude the collection from the admin nav and routes\n */\n hidden?: ((args: { user: ClientUser }) => boolean) | boolean\n /**\n * Hide the API URL within the Edit view\n */\n hideAPIURL?: boolean\n /**\n * Additional fields to be searched via the full text search\n */\n listSearchableFields?: string[]\n /**\n * Live preview options\n */\n livePreview?: LivePreviewConfig\n pagination?: {\n defaultLimit?: number\n limits?: number[]\n }\n /**\n * Function to generate custom preview URL\n */\n preview?: GeneratePreviewURL\n /**\n * Field to use as title in Edit view and first column in List view\n */\n useAsTitle?: string\n}\n\n/** Manage all aspects of a data collection */\nexport type CollectionConfig = {\n /**\n * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequestWithData }) => Promise<boolean> | boolean\n create?: Access\n delete?: Access\n read?: Access\n readVersions?: Access\n unlock?: Access\n update?: Access\n }\n /**\n * Collection admin options\n */\n admin?: CollectionAdminOptions\n /**\n * Collection login options\n *\n * Use `true` to enable with default options\n */\n auth?: IncomingAuthType | boolean\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n /**\n * Used to override the default naming of the database table or collection with your using a function or string\n * @WARNING: If you change this property with existing data, you will need to handle the renaming of the table in your database or by using migrations\n */\n dbName?: DBIdentifierName\n /**\n * Default field to sort by in collection list view\n */\n defaultSort?: string\n /**\n * When true, do not show the \"Duplicate\" button while editing documents within this collection and prevent `duplicate` from all APIs\n */\n disableDuplicate?: boolean\n /**\n * Custom rest api endpoints, set false to disable all rest endpoints for this collection.\n */\n endpoints?: Omit<Endpoint, 'root'>[] | false\n fields: Field[]\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\n pluralName?: string\n singularName?: string\n }\n | false\n /**\n * Hooks to modify Payload functionality\n */\n hooks?: {\n afterChange?: AfterChangeHook[]\n afterDelete?: AfterDeleteHook[]\n afterError?: AfterErrorHook\n afterForgotPassword?: AfterForgotPasswordHook[]\n afterLogin?: AfterLoginHook[]\n afterLogout?: AfterLogoutHook[]\n afterMe?: AfterMeHook[]\n afterOperation?: AfterOperationHook[]\n afterRead?: AfterReadHook[]\n afterRefresh?: AfterRefreshHook[]\n beforeChange?: BeforeChangeHook[]\n beforeDelete?: BeforeDeleteHook[]\n beforeLogin?: BeforeLoginHook[]\n beforeOperation?: BeforeOperationHook[]\n beforeRead?: BeforeReadHook[]\n beforeValidate?: BeforeValidateHook[]\n }\n /**\n * Label configuration\n */\n labels?: {\n plural?: LabelFunction | Record<string, string> | string\n singular?: LabelFunction | Record<string, string> | string\n }\n slug: string\n /**\n * Add `createdAt` and `updatedAt` fields\n *\n * @default true\n */\n timestamps?: boolean\n /**\n * Options used in typescript generation\n */\n typescript?: {\n /**\n * Typescript generation name given to the interface type\n */\n interface?: string\n }\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable uploads\n */\n upload?: UploadConfig | boolean\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable versioning\n */\n versions?: IncomingCollectionVersions | boolean\n}\n\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n 'auth' | 'endpoints' | 'fields' | 'upload' | 'versions'\n > {\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n upload: SanitizedUploadConfig\n versions: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n JWT: GraphQLObjectType\n countType: GraphQLObjectType\n mutationInputType: GraphQLNonNull<any>\n paginatedType: GraphQLObjectType\n type: GraphQLObjectType\n updateMutationInputType: GraphQLNonNull<any>\n versionType: GraphQLObjectType\n whereInputType: GraphQLInputObjectType\n }\n}\n\nexport type BulkOperationResult<TSlug extends keyof GeneratedTypes['collections']> = {\n docs: GeneratedTypes['collections'][TSlug][]\n errors: {\n id: GeneratedTypes['collections'][TSlug]['id']\n message: string\n }[]\n}\n\nexport type AuthCollection = {\n config: SanitizedCollectionConfig\n}\n\nexport type TypeWithID = {\n id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n id: number | string\n updatedAt: string\n}\n"],"names":[],"rangeMappings":"","mappings":"AAicA,WAKC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dataloader.d.ts","sourceRoot":"","sources":["../../src/collections/dataloader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAkJnD,eAAO,MAAM,aAAa,QAAS,cAAc,2CAA0C,CAAA"}
1
+ {"version":3,"file":"dataloader.d.ts","sourceRoot":"","sources":["../../src/collections/dataloader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,EAAE,cAAc,EAA0B,MAAM,mBAAmB,CAAA;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAkJnD,eAAO,MAAM,aAAa,QAAS,cAAc,2CAA0C,CAAA"}
@@ -68,7 +68,7 @@ const batchAndLoadDocs = (req)=>async (keys)=>{
68
68
  locale,
69
69
  overrideAccess: Boolean(overrideAccess),
70
70
  pagination: false,
71
- req,
71
+ req: req,
72
72
  showHiddenFields: Boolean(showHiddenFields),
73
73
  where: {
74
74
  id: {