payload 4.0.0-internal.2fddfc0 → 4.0.0-internal.314c594

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 (937) hide show
  1. package/LICENSE.md +1 -1
  2. package/bin.js +11 -0
  3. package/dist/__testing__/predefinedMigration.d.ts +4 -3
  4. package/dist/__testing__/predefinedMigration.d.ts.map +1 -1
  5. package/dist/admin/RichText.d.ts +2 -22
  6. package/dist/admin/RichText.d.ts.map +1 -1
  7. package/dist/admin/RichText.js.map +1 -1
  8. package/dist/admin/adapters/devReload.d.ts +13 -0
  9. package/dist/admin/adapters/devReload.d.ts.map +1 -1
  10. package/dist/admin/adapters/devReload.js +14 -1
  11. package/dist/admin/adapters/devReload.js.map +1 -1
  12. package/dist/admin/adapters/router.d.ts +8 -0
  13. package/dist/admin/adapters/router.d.ts.map +1 -1
  14. package/dist/admin/adapters/router.js.map +1 -1
  15. package/dist/admin/forms/Field.d.ts +2 -2
  16. package/dist/admin/forms/Field.d.ts.map +1 -1
  17. package/dist/admin/forms/Field.js.map +1 -1
  18. package/dist/admin/forms/Form.d.ts +0 -29
  19. package/dist/admin/forms/Form.d.ts.map +1 -1
  20. package/dist/admin/forms/Form.js.map +1 -1
  21. package/dist/admin/functions/index.d.ts +11 -9
  22. package/dist/admin/functions/index.d.ts.map +1 -1
  23. package/dist/admin/functions/index.js.map +1 -1
  24. package/dist/admin/types.d.ts +3 -2
  25. package/dist/admin/types.d.ts.map +1 -1
  26. package/dist/admin/types.js.map +1 -1
  27. package/dist/admin/views/index.d.ts +1 -1
  28. package/dist/admin/views/index.d.ts.map +1 -1
  29. package/dist/admin/views/index.js.map +1 -1
  30. package/dist/auth/baseFields/apiKey.d.ts.map +1 -1
  31. package/dist/auth/baseFields/apiKey.js +16 -1
  32. package/dist/auth/baseFields/apiKey.js.map +1 -1
  33. package/dist/auth/cookies.d.ts +2 -2
  34. package/dist/auth/cookies.d.ts.map +1 -1
  35. package/dist/auth/crypto.d.ts +73 -2
  36. package/dist/auth/crypto.d.ts.map +1 -1
  37. package/dist/auth/crypto.js +90 -13
  38. package/dist/auth/crypto.js.map +1 -1
  39. package/dist/auth/defaultAccess.d.ts.map +1 -1
  40. package/dist/auth/endpoints/login.d.ts.map +1 -1
  41. package/dist/auth/endpoints/login.js +2 -11
  42. package/dist/auth/endpoints/login.js.map +1 -1
  43. package/dist/auth/endpoints/refresh.d.ts.map +1 -1
  44. package/dist/auth/endpoints/refresh.js +4 -6
  45. package/dist/auth/endpoints/refresh.js.map +1 -1
  46. package/dist/auth/ensureUsernameOrEmail.d.ts.map +1 -1
  47. package/dist/auth/executeAccess.d.ts +2 -1
  48. package/dist/auth/executeAccess.d.ts.map +1 -1
  49. package/dist/auth/executeAccess.js +2 -1
  50. package/dist/auth/executeAccess.js.map +1 -1
  51. package/dist/auth/executeAuthStrategies.d.ts.map +1 -1
  52. package/dist/auth/extractAccessFromPermission.d.ts.map +1 -1
  53. package/dist/auth/extractJWT.d.ts +1 -1
  54. package/dist/auth/extractJWT.d.ts.map +1 -1
  55. package/dist/auth/getAccessResults.js +1 -0
  56. package/dist/auth/getAccessResults.js.map +1 -1
  57. package/dist/auth/getAuthFields.d.ts.map +1 -1
  58. package/dist/auth/getFieldsToSign.d.ts +1 -1
  59. package/dist/auth/getFieldsToSign.d.ts.map +1 -1
  60. package/dist/auth/getLoginOptions.d.ts +1 -1
  61. package/dist/auth/getLoginOptions.d.ts.map +1 -1
  62. package/dist/auth/getLoginOptions.js.map +1 -1
  63. package/dist/auth/isUserLocked.d.ts.map +1 -1
  64. package/dist/auth/jwt.d.ts.map +1 -1
  65. package/dist/auth/loginWithCookie.d.ts +33 -0
  66. package/dist/auth/loginWithCookie.d.ts.map +1 -0
  67. package/dist/auth/loginWithCookie.js +34 -0
  68. package/dist/auth/loginWithCookie.js.map +1 -0
  69. package/dist/auth/operations/access.d.ts.map +1 -1
  70. package/dist/auth/operations/access.js +3 -9
  71. package/dist/auth/operations/access.js.map +1 -1
  72. package/dist/auth/operations/auth.d.ts +2 -2
  73. package/dist/auth/operations/auth.d.ts.map +1 -1
  74. package/dist/auth/operations/auth.js +15 -21
  75. package/dist/auth/operations/auth.js.map +1 -1
  76. package/dist/auth/operations/forgotPassword.d.ts.map +1 -1
  77. package/dist/auth/operations/init.d.ts.map +1 -1
  78. package/dist/auth/operations/local/auth.d.ts.map +1 -1
  79. package/dist/auth/operations/login.d.ts +2 -1
  80. package/dist/auth/operations/login.d.ts.map +1 -1
  81. package/dist/auth/operations/login.js.map +1 -1
  82. package/dist/auth/operations/logout.d.ts.map +1 -1
  83. package/dist/auth/operations/me.d.ts +2 -9
  84. package/dist/auth/operations/me.d.ts.map +1 -1
  85. package/dist/auth/operations/me.js +0 -6
  86. package/dist/auth/operations/me.js.map +1 -1
  87. package/dist/auth/operations/refresh.d.ts +0 -7
  88. package/dist/auth/operations/refresh.d.ts.map +1 -1
  89. package/dist/auth/operations/refresh.js +9 -9
  90. package/dist/auth/operations/refresh.js.map +1 -1
  91. package/dist/auth/operations/registerFirstUser.d.ts.map +1 -1
  92. package/dist/auth/operations/resetPassword.d.ts.map +1 -1
  93. package/dist/auth/operations/resetPassword.js.map +1 -1
  94. package/dist/auth/operations/unlock.d.ts.map +1 -1
  95. package/dist/auth/operations/unlock.js +1 -0
  96. package/dist/auth/operations/unlock.js.map +1 -1
  97. package/dist/auth/operations/verifyEmail.d.ts.map +1 -1
  98. package/dist/auth/rotateSecret.d.ts +51 -0
  99. package/dist/auth/rotateSecret.d.ts.map +1 -0
  100. package/dist/auth/rotateSecret.js +131 -0
  101. package/dist/auth/rotateSecret.js.map +1 -0
  102. package/dist/auth/sendVerificationEmail.d.ts +2 -2
  103. package/dist/auth/sendVerificationEmail.d.ts.map +1 -1
  104. package/dist/auth/sendVerificationEmail.js +1 -1
  105. package/dist/auth/sendVerificationEmail.js.map +1 -1
  106. package/dist/auth/serverFunctions/cookies.d.ts +47 -0
  107. package/dist/auth/serverFunctions/cookies.d.ts.map +1 -0
  108. package/dist/auth/serverFunctions/cookies.js +52 -0
  109. package/dist/auth/serverFunctions/cookies.js.map +1 -0
  110. package/dist/auth/serverFunctions/login.d.ts +29 -0
  111. package/dist/auth/serverFunctions/login.d.ts.map +1 -0
  112. package/dist/auth/serverFunctions/login.js +63 -0
  113. package/dist/auth/serverFunctions/login.js.map +1 -0
  114. package/dist/auth/serverFunctions/logout.d.ts +17 -0
  115. package/dist/auth/serverFunctions/logout.d.ts.map +1 -0
  116. package/dist/auth/serverFunctions/logout.js +58 -0
  117. package/dist/auth/serverFunctions/logout.js.map +1 -0
  118. package/dist/auth/serverFunctions/refresh.d.ts +17 -0
  119. package/dist/auth/serverFunctions/refresh.d.ts.map +1 -0
  120. package/dist/auth/serverFunctions/refresh.js +61 -0
  121. package/dist/auth/serverFunctions/refresh.js.map +1 -0
  122. package/dist/auth/sessions.d.ts +4 -5
  123. package/dist/auth/sessions.d.ts.map +1 -1
  124. package/dist/auth/sessions.js +5 -3
  125. package/dist/auth/sessions.js.map +1 -1
  126. package/dist/auth/strategies/apiKey.d.ts.map +1 -1
  127. package/dist/auth/strategies/apiKey.js +5 -3
  128. package/dist/auth/strategies/apiKey.js.map +1 -1
  129. package/dist/auth/strategies/jwt.d.ts.map +1 -1
  130. package/dist/auth/strategies/jwt.js +23 -2
  131. package/dist/auth/strategies/jwt.js.map +1 -1
  132. package/dist/auth/strategies/local/authenticate.d.ts.map +1 -1
  133. package/dist/auth/strategies/local/generatePasswordSaltHash.d.ts.map +1 -1
  134. package/dist/auth/strategies/local/incrementLoginAttempts.d.ts +2 -2
  135. package/dist/auth/strategies/local/incrementLoginAttempts.d.ts.map +1 -1
  136. package/dist/auth/strategies/local/incrementLoginAttempts.js +1 -1
  137. package/dist/auth/strategies/local/incrementLoginAttempts.js.map +1 -1
  138. package/dist/auth/strategies/local/register.d.ts.map +1 -1
  139. package/dist/auth/strategies/local/resetLoginAttempts.d.ts.map +1 -1
  140. package/dist/auth/types.d.ts +34 -35
  141. package/dist/auth/types.d.ts.map +1 -1
  142. package/dist/auth/types.js.map +1 -1
  143. package/dist/auth/withBaseAccess.d.ts +22 -0
  144. package/dist/auth/withBaseAccess.d.ts.map +1 -0
  145. package/dist/auth/withBaseAccess.js +61 -0
  146. package/dist/auth/withBaseAccess.js.map +1 -0
  147. package/dist/bin/build.d.ts +34 -10
  148. package/dist/bin/build.d.ts.map +1 -1
  149. package/dist/bin/build.js +184 -31
  150. package/dist/bin/build.js.map +1 -1
  151. package/dist/bin/build.spec.js +474 -19
  152. package/dist/bin/build.spec.js.map +1 -1
  153. package/dist/bin/frameworkConventions.d.ts +8 -0
  154. package/dist/bin/frameworkConventions.d.ts.map +1 -0
  155. package/dist/bin/frameworkConventions.js +8 -0
  156. package/dist/bin/frameworkConventions.js.map +1 -0
  157. package/dist/bin/generateImportMap/iterateCollections.d.ts.map +1 -1
  158. package/dist/bin/generateImportMap/iterateCollections.js +10 -0
  159. package/dist/bin/generateImportMap/iterateCollections.js.map +1 -1
  160. package/dist/bin/generateImportMap/utilities/getFromImportMap.d.ts.map +1 -1
  161. package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.d.ts.map +1 -1
  162. package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.js +13 -4
  163. package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.js.map +1 -1
  164. package/dist/bin/migrate.d.ts.map +1 -1
  165. package/dist/collections/config/client.d.ts +10 -4
  166. package/dist/collections/config/client.d.ts.map +1 -1
  167. package/dist/collections/config/client.js +7 -1
  168. package/dist/collections/config/client.js.map +1 -1
  169. package/dist/collections/config/defaults.d.ts +4 -8
  170. package/dist/collections/config/defaults.d.ts.map +1 -1
  171. package/dist/collections/config/defaults.js +37 -47
  172. package/dist/collections/config/defaults.js.map +1 -1
  173. package/dist/collections/config/sanitize.d.ts +4 -8
  174. package/dist/collections/config/sanitize.d.ts.map +1 -1
  175. package/dist/collections/config/sanitize.js +31 -21
  176. package/dist/collections/config/sanitize.js.map +1 -1
  177. package/dist/collections/config/sanitize.spec.js +363 -1
  178. package/dist/collections/config/sanitize.spec.js.map +1 -1
  179. package/dist/collections/config/sanitizeCompoundIndexes.d.ts.map +1 -1
  180. package/dist/collections/config/types.d.ts +62 -51
  181. package/dist/collections/config/types.d.ts.map +1 -1
  182. package/dist/collections/config/types.js.map +1 -1
  183. package/dist/collections/config/useAsTitle.d.ts.map +1 -1
  184. package/dist/collections/config/useAsTitle.spec.js +27 -27
  185. package/dist/collections/config/useAsTitle.spec.js.map +1 -1
  186. package/dist/collections/dataloader.d.ts +1 -1
  187. package/dist/collections/dataloader.d.ts.map +1 -1
  188. package/dist/collections/operations/count.d.ts.map +1 -1
  189. package/dist/collections/operations/count.js +65 -70
  190. package/dist/collections/operations/count.js.map +1 -1
  191. package/dist/collections/operations/countVersions.d.ts.map +1 -1
  192. package/dist/collections/operations/countVersions.js +61 -66
  193. package/dist/collections/operations/countVersions.js.map +1 -1
  194. package/dist/collections/operations/create.d.ts.map +1 -1
  195. package/dist/collections/operations/create.js +11 -0
  196. package/dist/collections/operations/create.js.map +1 -1
  197. package/dist/collections/operations/delete.d.ts.map +1 -1
  198. package/dist/collections/operations/delete.js +1 -0
  199. package/dist/collections/operations/delete.js.map +1 -1
  200. package/dist/collections/operations/deleteByID.d.ts.map +1 -1
  201. package/dist/collections/operations/deleteByID.js +1 -0
  202. package/dist/collections/operations/deleteByID.js.map +1 -1
  203. package/dist/collections/operations/docAccess.d.ts.map +1 -1
  204. package/dist/collections/operations/docAccess.js +19 -25
  205. package/dist/collections/operations/docAccess.js.map +1 -1
  206. package/dist/collections/operations/duplicate.d.ts.map +1 -1
  207. package/dist/collections/operations/find.d.ts.map +1 -1
  208. package/dist/collections/operations/find.js +248 -246
  209. package/dist/collections/operations/find.js.map +1 -1
  210. package/dist/collections/operations/findByID.d.ts.map +1 -1
  211. package/dist/collections/operations/findByID.js +215 -220
  212. package/dist/collections/operations/findByID.js.map +1 -1
  213. package/dist/collections/operations/findDistinct.d.ts.map +1 -1
  214. package/dist/collections/operations/findDistinct.js +161 -158
  215. package/dist/collections/operations/findDistinct.js.map +1 -1
  216. package/dist/collections/operations/findVersionByID.d.ts.map +1 -1
  217. package/dist/collections/operations/findVersionByID.js +131 -136
  218. package/dist/collections/operations/findVersionByID.js.map +1 -1
  219. package/dist/collections/operations/findVersions.d.ts.map +1 -1
  220. package/dist/collections/operations/findVersions.js +152 -149
  221. package/dist/collections/operations/findVersions.js.map +1 -1
  222. package/dist/collections/operations/local/count.d.ts +3 -3
  223. package/dist/collections/operations/local/count.d.ts.map +1 -1
  224. package/dist/collections/operations/local/count.js.map +1 -1
  225. package/dist/collections/operations/local/countVersions.d.ts +3 -3
  226. package/dist/collections/operations/local/countVersions.d.ts.map +1 -1
  227. package/dist/collections/operations/local/countVersions.js.map +1 -1
  228. package/dist/collections/operations/local/create.d.ts +3 -3
  229. package/dist/collections/operations/local/create.d.ts.map +1 -1
  230. package/dist/collections/operations/local/create.js.map +1 -1
  231. package/dist/collections/operations/local/delete.d.ts +3 -3
  232. package/dist/collections/operations/local/delete.d.ts.map +1 -1
  233. package/dist/collections/operations/local/delete.js.map +1 -1
  234. package/dist/collections/operations/local/duplicate.d.ts +3 -3
  235. package/dist/collections/operations/local/duplicate.d.ts.map +1 -1
  236. package/dist/collections/operations/local/duplicate.js.map +1 -1
  237. package/dist/collections/operations/local/find.d.ts +3 -3
  238. package/dist/collections/operations/local/find.d.ts.map +1 -1
  239. package/dist/collections/operations/local/find.js.map +1 -1
  240. package/dist/collections/operations/local/findByID.d.ts +3 -3
  241. package/dist/collections/operations/local/findByID.d.ts.map +1 -1
  242. package/dist/collections/operations/local/findByID.js.map +1 -1
  243. package/dist/collections/operations/local/findDistinct.d.ts +2 -2
  244. package/dist/collections/operations/local/findDistinct.d.ts.map +1 -1
  245. package/dist/collections/operations/local/findDistinct.js.map +1 -1
  246. package/dist/collections/operations/local/findVersionByID.d.ts +3 -3
  247. package/dist/collections/operations/local/findVersionByID.d.ts.map +1 -1
  248. package/dist/collections/operations/local/findVersionByID.js.map +1 -1
  249. package/dist/collections/operations/local/findVersions.d.ts +3 -3
  250. package/dist/collections/operations/local/findVersions.d.ts.map +1 -1
  251. package/dist/collections/operations/local/findVersions.js.map +1 -1
  252. package/dist/collections/operations/local/restoreVersion.d.ts +3 -3
  253. package/dist/collections/operations/local/restoreVersion.d.ts.map +1 -1
  254. package/dist/collections/operations/local/restoreVersion.js.map +1 -1
  255. package/dist/collections/operations/local/update.d.ts +3 -3
  256. package/dist/collections/operations/local/update.d.ts.map +1 -1
  257. package/dist/collections/operations/local/update.js.map +1 -1
  258. package/dist/collections/operations/restoreVersion.d.ts.map +1 -1
  259. package/dist/collections/operations/restoreVersion.js +8 -4
  260. package/dist/collections/operations/restoreVersion.js.map +1 -1
  261. package/dist/collections/operations/update.d.ts.map +1 -1
  262. package/dist/collections/operations/update.js +10 -1
  263. package/dist/collections/operations/update.js.map +1 -1
  264. package/dist/collections/operations/updateByID.d.ts.map +1 -1
  265. package/dist/collections/operations/updateByID.js +3 -0
  266. package/dist/collections/operations/updateByID.js.map +1 -1
  267. package/dist/collections/operations/utilities/buildAfterOperation.d.ts +1 -1
  268. package/dist/collections/operations/utilities/buildAfterOperation.d.ts.map +1 -1
  269. package/dist/collections/operations/utilities/copyDataWithFreshRowIDs.d.ts.map +1 -1
  270. package/dist/collections/operations/utilities/sanitizeSortQuery.d.ts.map +1 -1
  271. package/dist/collections/operations/utilities/types.d.ts +20 -29
  272. package/dist/collections/operations/utilities/types.d.ts.map +1 -1
  273. package/dist/collections/operations/utilities/types.js.map +1 -1
  274. package/dist/collections/operations/utilities/update.d.ts.map +1 -1
  275. package/dist/config/build.js +1 -1
  276. package/dist/config/build.js.map +1 -1
  277. package/dist/config/client.d.ts +3 -3
  278. package/dist/config/client.d.ts.map +1 -1
  279. package/dist/config/client.js +1 -0
  280. package/dist/config/client.js.map +1 -1
  281. package/dist/config/client.spec.js +20 -0
  282. package/dist/config/client.spec.js.map +1 -0
  283. package/dist/config/defaults.d.ts +0 -4
  284. package/dist/config/defaults.d.ts.map +1 -1
  285. package/dist/config/defaults.js +48 -119
  286. package/dist/config/defaults.js.map +1 -1
  287. package/dist/config/definePlugin.d.ts +10 -10
  288. package/dist/config/definePlugin.d.ts.map +1 -1
  289. package/dist/config/definePlugin.js +7 -11
  290. package/dist/config/definePlugin.js.map +1 -1
  291. package/dist/config/orderable/fractional-indexing.d.ts +23 -23
  292. package/dist/config/orderable/fractional-indexing.d.ts.map +1 -1
  293. package/dist/config/orderable/index.d.ts +1 -1
  294. package/dist/config/orderable/index.d.ts.map +1 -1
  295. package/dist/config/orderable/index.js +3 -2
  296. package/dist/config/orderable/index.js.map +1 -1
  297. package/dist/config/sanitize.d.ts +1 -1
  298. package/dist/config/sanitize.d.ts.map +1 -1
  299. package/dist/config/sanitize.js +172 -38
  300. package/dist/config/sanitize.js.map +1 -1
  301. package/dist/config/sanitize.spec.js +105 -0
  302. package/dist/config/sanitize.spec.js.map +1 -0
  303. package/dist/config/types.d.ts +426 -390
  304. package/dist/config/types.d.ts.map +1 -1
  305. package/dist/config/types.js.map +1 -1
  306. package/dist/database/combineQueries.d.ts.map +1 -1
  307. package/dist/database/createDatabaseAdapter.d.ts +1 -1
  308. package/dist/database/createDatabaseAdapter.d.ts.map +1 -1
  309. package/dist/database/createDatabaseAdapter.js +0 -2
  310. package/dist/database/createDatabaseAdapter.js.map +1 -1
  311. package/dist/database/isNestedRelationshipQuery.d.ts +14 -0
  312. package/dist/database/isNestedRelationshipQuery.d.ts.map +1 -0
  313. package/dist/database/isNestedRelationshipQuery.js +19 -0
  314. package/dist/database/isNestedRelationshipQuery.js.map +1 -0
  315. package/dist/database/migrations/findMigrationDir.d.ts.map +1 -1
  316. package/dist/database/migrations/getPredefinedMigration.d.ts.map +1 -1
  317. package/dist/database/migrations/readMigrationFiles.d.ts.map +1 -1
  318. package/dist/database/migrations/writeMigrationIndex.d.ts.map +1 -1
  319. package/dist/database/queryValidation/validateQueryPaths.d.ts.map +1 -1
  320. package/dist/database/queryValidation/validateQueryPaths.js +8 -1
  321. package/dist/database/queryValidation/validateQueryPaths.js.map +1 -1
  322. package/dist/database/queryValidation/validateSearchParams.d.ts.map +1 -1
  323. package/dist/database/queryValidation/validateSearchParams.js +21 -4
  324. package/dist/database/queryValidation/validateSearchParams.js.map +1 -1
  325. package/dist/database/queryValidation/validateSortQuery.d.ts +23 -0
  326. package/dist/database/queryValidation/validateSortQuery.d.ts.map +1 -0
  327. package/dist/database/queryValidation/validateSortQuery.js +54 -0
  328. package/dist/database/queryValidation/validateSortQuery.js.map +1 -0
  329. package/dist/database/sanitizeJoinQuery.d.ts.map +1 -1
  330. package/dist/database/sanitizeJoinQuery.js +7 -0
  331. package/dist/database/sanitizeJoinQuery.js.map +1 -1
  332. package/dist/database/sanitizeWhereQuery.d.ts +1 -1
  333. package/dist/database/sanitizeWhereQuery.d.ts.map +1 -1
  334. package/dist/database/sanitizeWhereQuery.js +44 -1
  335. package/dist/database/sanitizeWhereQuery.js.map +1 -1
  336. package/dist/database/types.d.ts +7 -5
  337. package/dist/database/types.d.ts.map +1 -1
  338. package/dist/database/types.js.map +1 -1
  339. package/dist/duplicateDocument/index.d.ts.map +1 -1
  340. package/dist/duplicateDocument/index.js +1 -0
  341. package/dist/duplicateDocument/index.js.map +1 -1
  342. package/dist/email/getStringifiedToAddress.d.ts.map +1 -1
  343. package/dist/errors/APIError.d.ts.map +1 -1
  344. package/dist/errors/AuthenticationError.d.ts.map +1 -1
  345. package/dist/errors/DuplicateCollection.d.ts.map +1 -1
  346. package/dist/errors/DuplicateFieldName.d.ts.map +1 -1
  347. package/dist/errors/DuplicateGlobal.d.ts.map +1 -1
  348. package/dist/errors/ErrorDeletingFile.d.ts.map +1 -1
  349. package/dist/errors/FileRetrievalError.d.ts.map +1 -1
  350. package/dist/errors/FileUploadError.d.ts.map +1 -1
  351. package/dist/errors/Forbidden.d.ts.map +1 -1
  352. package/dist/errors/InvalidConfiguration.d.ts.map +1 -1
  353. package/dist/errors/InvalidFieldJoin.d.ts.map +1 -1
  354. package/dist/errors/InvalidFieldName.d.ts.map +1 -1
  355. package/dist/errors/InvalidFieldRelationship.d.ts.map +1 -1
  356. package/dist/errors/InvalidSchema.d.ts.map +1 -1
  357. package/dist/errors/Locked.d.ts.map +1 -1
  358. package/dist/errors/LockedAuth.d.ts.map +1 -1
  359. package/dist/errors/MissingCollectionLabel.d.ts.map +1 -1
  360. package/dist/errors/MissingEditorProp.d.ts.map +1 -1
  361. package/dist/errors/MissingFieldInputOptions.d.ts.map +1 -1
  362. package/dist/errors/MissingFieldType.d.ts.map +1 -1
  363. package/dist/errors/MissingFile.d.ts.map +1 -1
  364. package/dist/errors/NotFound.d.ts.map +1 -1
  365. package/dist/errors/QueryError.d.ts.map +1 -1
  366. package/dist/errors/ReservedFieldName.d.ts.map +1 -1
  367. package/dist/errors/TimestampsRequired.d.ts.map +1 -1
  368. package/dist/errors/UnauthorizedError.d.ts.map +1 -1
  369. package/dist/errors/UnverifiedEmail.d.ts.map +1 -1
  370. package/dist/errors/ValidationError.d.ts.map +1 -1
  371. package/dist/exports/auth.d.ts +5 -0
  372. package/dist/exports/auth.d.ts.map +1 -0
  373. package/dist/exports/auth.js +6 -0
  374. package/dist/exports/auth.js.map +1 -0
  375. package/dist/exports/internal.d.ts +4 -0
  376. package/dist/exports/internal.d.ts.map +1 -1
  377. package/dist/exports/internal.js +5 -1
  378. package/dist/exports/internal.js.map +1 -1
  379. package/dist/exports/shared.d.ts +6 -3
  380. package/dist/exports/shared.d.ts.map +1 -1
  381. package/dist/exports/shared.js +4 -2
  382. package/dist/exports/shared.js.map +1 -1
  383. package/dist/fields/baseFields/slug/duplicateContext.d.ts +11 -0
  384. package/dist/fields/baseFields/slug/duplicateContext.d.ts.map +1 -0
  385. package/dist/fields/baseFields/slug/duplicateContext.js +21 -0
  386. package/dist/fields/baseFields/slug/duplicateContext.js.map +1 -0
  387. package/dist/fields/baseFields/slug/fillEmptyLocalizedSlugs.d.ts +22 -0
  388. package/dist/fields/baseFields/slug/fillEmptyLocalizedSlugs.d.ts.map +1 -0
  389. package/dist/fields/baseFields/slug/fillEmptyLocalizedSlugs.js +63 -0
  390. package/dist/fields/baseFields/slug/fillEmptyLocalizedSlugs.js.map +1 -0
  391. package/dist/fields/baseFields/slug/generateSlug.d.ts +19 -7
  392. package/dist/fields/baseFields/slug/generateSlug.d.ts.map +1 -1
  393. package/dist/fields/baseFields/slug/generateSlug.js +107 -74
  394. package/dist/fields/baseFields/slug/generateSlug.js.map +1 -1
  395. package/dist/fields/baseFields/slug/generateSlugBeforeDuplicate.d.ts +18 -0
  396. package/dist/fields/baseFields/slug/generateSlugBeforeDuplicate.d.ts.map +1 -0
  397. package/dist/fields/baseFields/slug/generateSlugBeforeDuplicate.js +20 -0
  398. package/dist/fields/baseFields/slug/generateSlugBeforeDuplicate.js.map +1 -0
  399. package/dist/fields/baseFields/slug/getSlugFallbackValue.d.ts +22 -0
  400. package/dist/fields/baseFields/slug/getSlugFallbackValue.d.ts.map +1 -0
  401. package/dist/fields/baseFields/slug/getSlugFallbackValue.js +23 -0
  402. package/dist/fields/baseFields/slug/getSlugFallbackValue.js.map +1 -0
  403. package/dist/fields/baseFields/slug/hasValue.d.ts +3 -0
  404. package/dist/fields/baseFields/slug/hasValue.d.ts.map +1 -0
  405. package/dist/fields/baseFields/slug/hasValue.js +3 -0
  406. package/dist/fields/baseFields/slug/hasValue.js.map +1 -0
  407. package/dist/fields/baseFields/slug/types.d.ts +14 -0
  408. package/dist/fields/baseFields/slug/types.d.ts.map +1 -0
  409. package/dist/fields/baseFields/slug/types.js +6 -0
  410. package/dist/fields/baseFields/slug/types.js.map +1 -0
  411. package/dist/fields/config/client.d.ts +4 -4
  412. package/dist/fields/config/client.d.ts.map +1 -1
  413. package/dist/fields/config/client.js +2 -1
  414. package/dist/fields/config/client.js.map +1 -1
  415. package/dist/fields/config/reservedFieldNames.spec.js +18 -18
  416. package/dist/fields/config/reservedFieldNames.spec.js.map +1 -1
  417. package/dist/fields/config/sanitize.d.ts +6 -6
  418. package/dist/fields/config/sanitize.d.ts.map +1 -1
  419. package/dist/fields/config/sanitize.js +68 -19
  420. package/dist/fields/config/sanitize.js.map +1 -1
  421. package/dist/fields/config/sanitize.spec.js +105 -105
  422. package/dist/fields/config/sanitize.spec.js.map +1 -1
  423. package/dist/fields/config/sanitizeJoinField.d.ts.map +1 -1
  424. package/dist/fields/config/types.d.ts +50 -12
  425. package/dist/fields/config/types.d.ts.map +1 -1
  426. package/dist/fields/config/types.js +1 -1
  427. package/dist/fields/config/types.js.map +1 -1
  428. package/dist/fields/getDefaultValue.d.ts.map +1 -1
  429. package/dist/fields/hooks/afterChange/index.d.ts.map +1 -1
  430. package/dist/fields/hooks/afterChange/promise.d.ts.map +1 -1
  431. package/dist/fields/hooks/afterChange/traverseFields.d.ts.map +1 -1
  432. package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
  433. package/dist/fields/hooks/afterRead/promise.js +11 -1
  434. package/dist/fields/hooks/afterRead/promise.js.map +1 -1
  435. package/dist/fields/hooks/afterRead/relationshipPopulationPromise.d.ts.map +1 -1
  436. package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -1
  437. package/dist/fields/hooks/afterRead/virtualFieldPopulationPromise.d.ts.map +1 -1
  438. package/dist/fields/hooks/beforeChange/cloneDataFromOriginalDoc.d.ts.map +1 -1
  439. package/dist/fields/hooks/beforeChange/getExistingRowDoc.d.ts.map +1 -1
  440. package/dist/fields/hooks/beforeChange/index.d.ts.map +1 -1
  441. package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
  442. package/dist/fields/hooks/beforeChange/traverseFields.d.ts.map +1 -1
  443. package/dist/fields/hooks/beforeDuplicate/index.d.ts.map +1 -1
  444. package/dist/fields/hooks/beforeDuplicate/promise.d.ts.map +1 -1
  445. package/dist/fields/hooks/beforeDuplicate/traverseFields.d.ts.map +1 -1
  446. package/dist/fields/hooks/beforeValidate/index.d.ts.map +1 -1
  447. package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
  448. package/dist/fields/hooks/beforeValidate/promise.js +15 -4
  449. package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
  450. package/dist/fields/hooks/beforeValidate/stripNullRows.d.ts +10 -0
  451. package/dist/fields/hooks/beforeValidate/stripNullRows.d.ts.map +1 -0
  452. package/dist/fields/hooks/beforeValidate/stripNullRows.js +18 -0
  453. package/dist/fields/hooks/beforeValidate/stripNullRows.js.map +1 -0
  454. package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
  455. package/dist/fields/hooks/beforeValidate/traverseFields.js +2 -0
  456. package/dist/fields/hooks/beforeValidate/traverseFields.js.map +1 -1
  457. package/dist/fields/isFieldDisabled.d.ts.map +1 -1
  458. package/dist/fields/mergeBaseFields.d.ts.map +1 -1
  459. package/dist/fields/setDefaultBeforeDuplicate.d.ts.map +1 -1
  460. package/dist/fields/setDefaultBeforeDuplicate.js +1 -0
  461. package/dist/fields/setDefaultBeforeDuplicate.js.map +1 -1
  462. package/dist/fields/sortableFieldTypes.d.ts.map +1 -1
  463. package/dist/fields/sortableFieldTypes.js +1 -0
  464. package/dist/fields/sortableFieldTypes.js.map +1 -1
  465. package/dist/fields/validations.d.ts +4 -1
  466. package/dist/fields/validations.d.ts.map +1 -1
  467. package/dist/fields/validations.js +8 -2
  468. package/dist/fields/validations.js.map +1 -1
  469. package/dist/fields/validations.spec.js +61 -37
  470. package/dist/fields/validations.spec.js.map +1 -1
  471. package/dist/globals/config/client.d.ts +4 -4
  472. package/dist/globals/config/client.d.ts.map +1 -1
  473. package/dist/globals/config/sanitize.d.ts +3 -7
  474. package/dist/globals/config/sanitize.d.ts.map +1 -1
  475. package/dist/globals/config/sanitize.js +26 -6
  476. package/dist/globals/config/sanitize.js.map +1 -1
  477. package/dist/globals/config/sanitize.spec.js +227 -8
  478. package/dist/globals/config/sanitize.spec.js.map +1 -1
  479. package/dist/globals/config/types.d.ts +21 -16
  480. package/dist/globals/config/types.d.ts.map +1 -1
  481. package/dist/globals/config/types.js.map +1 -1
  482. package/dist/globals/operations/countGlobalVersions.d.ts.map +1 -1
  483. package/dist/globals/operations/countGlobalVersions.js +51 -55
  484. package/dist/globals/operations/countGlobalVersions.js.map +1 -1
  485. package/dist/globals/operations/docAccess.d.ts.map +1 -1
  486. package/dist/globals/operations/docAccess.js +19 -25
  487. package/dist/globals/operations/docAccess.js.map +1 -1
  488. package/dist/globals/operations/findOne.d.ts.map +1 -1
  489. package/dist/globals/operations/findOne.js +169 -174
  490. package/dist/globals/operations/findOne.js.map +1 -1
  491. package/dist/globals/operations/findVersionByID.d.ts.map +1 -1
  492. package/dist/globals/operations/findVersionByID.js +104 -109
  493. package/dist/globals/operations/findVersionByID.js.map +1 -1
  494. package/dist/globals/operations/findVersions.d.ts.map +1 -1
  495. package/dist/globals/operations/findVersions.js +112 -109
  496. package/dist/globals/operations/findVersions.js.map +1 -1
  497. package/dist/globals/operations/local/countVersions.d.ts +3 -3
  498. package/dist/globals/operations/local/countVersions.d.ts.map +1 -1
  499. package/dist/globals/operations/local/countVersions.js.map +1 -1
  500. package/dist/globals/operations/local/findOne.d.ts +3 -3
  501. package/dist/globals/operations/local/findOne.d.ts.map +1 -1
  502. package/dist/globals/operations/local/findOne.js.map +1 -1
  503. package/dist/globals/operations/local/findVersionByID.d.ts +3 -3
  504. package/dist/globals/operations/local/findVersionByID.d.ts.map +1 -1
  505. package/dist/globals/operations/local/findVersionByID.js.map +1 -1
  506. package/dist/globals/operations/local/findVersions.d.ts +3 -3
  507. package/dist/globals/operations/local/findVersions.d.ts.map +1 -1
  508. package/dist/globals/operations/local/findVersions.js.map +1 -1
  509. package/dist/globals/operations/local/restoreVersion.d.ts +3 -3
  510. package/dist/globals/operations/local/restoreVersion.d.ts.map +1 -1
  511. package/dist/globals/operations/local/restoreVersion.js.map +1 -1
  512. package/dist/globals/operations/local/update.d.ts +3 -3
  513. package/dist/globals/operations/local/update.d.ts.map +1 -1
  514. package/dist/globals/operations/local/update.js.map +1 -1
  515. package/dist/globals/operations/restoreVersion.d.ts.map +1 -1
  516. package/dist/globals/operations/restoreVersion.js +1 -0
  517. package/dist/globals/operations/restoreVersion.js.map +1 -1
  518. package/dist/globals/operations/update.d.ts.map +1 -1
  519. package/dist/globals/operations/update.js +1 -0
  520. package/dist/globals/operations/update.js.map +1 -1
  521. package/dist/hierarchy/addHierarchyToCollection.d.ts.map +1 -1
  522. package/dist/hierarchy/addHierarchyToCollection.js +2 -0
  523. package/dist/hierarchy/addHierarchyToCollection.js.map +1 -1
  524. package/dist/hierarchy/buildParentField.d.ts.map +1 -1
  525. package/dist/hierarchy/constants.d.ts.map +1 -1
  526. package/dist/hierarchy/getInitialTreeData.d.ts.map +1 -1
  527. package/dist/hierarchy/hooks/collectionAfterDelete.d.ts.map +1 -1
  528. package/dist/hierarchy/hooks/collectionAfterRead.d.ts.map +1 -1
  529. package/dist/hierarchy/hooks/collectionBeforeChange.d.ts.map +1 -1
  530. package/dist/hierarchy/hooks/collectionBeforeDelete.d.ts.map +1 -1
  531. package/dist/hierarchy/hooks/collectionBeforeOperation.d.ts.map +1 -1
  532. package/dist/hierarchy/hooks/ensureSafeCollectionsChange.d.ts.map +1 -1
  533. package/dist/hierarchy/injectHierarchyButton.d.ts.map +1 -1
  534. package/dist/hierarchy/resolveHierarchyCollections.d.ts.map +1 -1
  535. package/dist/hierarchy/sanitizeHierarchyCollection.d.ts.map +1 -1
  536. package/dist/index.bundled.d.ts +4668 -4324
  537. package/dist/index.d.ts +142 -48
  538. package/dist/index.d.ts.map +1 -1
  539. package/dist/index.js +73 -61
  540. package/dist/index.js.map +1 -1
  541. package/dist/kv/adapters/DatabaseKVAdapter.d.ts.map +1 -1
  542. package/dist/kv/adapters/InMemoryKVAdapter.d.ts.map +1 -1
  543. package/dist/locked-documents/config.d.ts.map +1 -1
  544. package/dist/preferences/config.d.ts.map +1 -1
  545. package/dist/preferences/deleteUserPreferences.d.ts.map +1 -1
  546. package/dist/preferences/keys.d.ts +8 -4
  547. package/dist/preferences/keys.d.ts.map +1 -1
  548. package/dist/preferences/keys.js +4 -1
  549. package/dist/preferences/keys.js.map +1 -1
  550. package/dist/preferences/types.d.ts +15 -0
  551. package/dist/preferences/types.d.ts.map +1 -1
  552. package/dist/preferences/types.js +3 -1
  553. package/dist/preferences/types.js.map +1 -1
  554. package/dist/query-presets/access.d.ts.map +1 -1
  555. package/dist/query-presets/config.d.ts.map +1 -1
  556. package/dist/query-presets/constraints.d.ts.map +1 -1
  557. package/dist/query-presets/constraints.js +1 -1
  558. package/dist/query-presets/constraints.js.map +1 -1
  559. package/dist/query-presets/types.d.ts +1 -1
  560. package/dist/query-presets/types.d.ts.map +1 -1
  561. package/dist/queues/config/collection.d.ts.map +1 -1
  562. package/dist/queues/config/collection.js +37 -43
  563. package/dist/queues/config/collection.js.map +1 -1
  564. package/dist/queues/config/global.d.ts +5 -6
  565. package/dist/queues/config/global.d.ts.map +1 -1
  566. package/dist/queues/config/global.js +1 -1
  567. package/dist/queues/config/global.js.map +1 -1
  568. package/dist/queues/config/types/index.d.ts +29 -24
  569. package/dist/queues/config/types/index.d.ts.map +1 -1
  570. package/dist/queues/config/types/index.js.map +1 -1
  571. package/dist/queues/config/types/taskTypes.d.ts +4 -7
  572. package/dist/queues/config/types/taskTypes.d.ts.map +1 -1
  573. package/dist/queues/config/types/taskTypes.js.map +1 -1
  574. package/dist/queues/config/types/workflowJSONTypes.d.ts +10 -9
  575. package/dist/queues/config/types/workflowJSONTypes.d.ts.map +1 -1
  576. package/dist/queues/config/types/workflowJSONTypes.js.map +1 -1
  577. package/dist/queues/config/types/workflowTypes.d.ts +11 -58
  578. package/dist/queues/config/types/workflowTypes.d.ts.map +1 -1
  579. package/dist/queues/config/types/workflowTypes.js.map +1 -1
  580. package/dist/queues/endpoints/handleSchedules.js +1 -1
  581. package/dist/queues/endpoints/handleSchedules.js.map +1 -1
  582. package/dist/queues/endpoints/run.d.ts.map +1 -1
  583. package/dist/queues/errors/handleTaskError.js +4 -4
  584. package/dist/queues/errors/handleTaskError.js.map +1 -1
  585. package/dist/queues/errors/handleWorkflowError.js +1 -1
  586. package/dist/queues/errors/handleWorkflowError.js.map +1 -1
  587. package/dist/queues/errors/index.d.ts +6 -0
  588. package/dist/queues/errors/index.d.ts.map +1 -1
  589. package/dist/queues/errors/index.js +5 -0
  590. package/dist/queues/errors/index.js.map +1 -1
  591. package/dist/queues/localAPI.d.ts +9 -9
  592. package/dist/queues/localAPI.d.ts.map +1 -1
  593. package/dist/queues/localAPI.js +63 -66
  594. package/dist/queues/localAPI.js.map +1 -1
  595. package/dist/queues/operations/handleSchedules/countRunnableOrActiveJobsForQueue.d.ts +4 -4
  596. package/dist/queues/operations/handleSchedules/countRunnableOrActiveJobsForQueue.d.ts.map +1 -1
  597. package/dist/queues/operations/handleSchedules/countRunnableOrActiveJobsForQueue.js.map +1 -1
  598. package/dist/queues/operations/handleSchedules/getQueuesWithSchedules.d.ts.map +1 -1
  599. package/dist/queues/operations/handleSchedules/index.d.ts +1 -1
  600. package/dist/queues/operations/handleSchedules/index.d.ts.map +1 -1
  601. package/dist/queues/operations/handleSchedules/index.js +1 -1
  602. package/dist/queues/operations/handleSchedules/index.js.map +1 -1
  603. package/dist/queues/operations/runJobs/heartbeat.d.ts +13 -0
  604. package/dist/queues/operations/runJobs/heartbeat.d.ts.map +1 -0
  605. package/dist/queues/operations/runJobs/heartbeat.js +66 -0
  606. package/dist/queues/operations/runJobs/heartbeat.js.map +1 -0
  607. package/dist/queues/operations/runJobs/index.d.ts.map +1 -1
  608. package/dist/queues/operations/runJobs/index.js +133 -84
  609. package/dist/queues/operations/runJobs/index.js.map +1 -1
  610. package/dist/queues/operations/runJobs/runJSONJob/index.d.ts.map +1 -1
  611. package/dist/queues/operations/runJobs/runJSONJob/index.js +6 -3
  612. package/dist/queues/operations/runJobs/runJSONJob/index.js.map +1 -1
  613. package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.d.ts.map +1 -1
  614. package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.js +5 -5
  615. package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.js.map +1 -1
  616. package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.d.ts +2 -1
  617. package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.d.ts.map +1 -1
  618. package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.js +39 -8
  619. package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.js.map +1 -1
  620. package/dist/queues/operations/runJobs/runJob/importHandlerPath.d.ts +1 -1
  621. package/dist/queues/operations/runJobs/runJob/importHandlerPath.d.ts.map +1 -1
  622. package/dist/queues/operations/runJobs/runJob/importHandlerPath.js.map +1 -1
  623. package/dist/queues/operations/runJobs/runJob/index.d.ts.map +1 -1
  624. package/dist/queues/operations/runJobs/runJob/index.js +4 -4
  625. package/dist/queues/operations/runJobs/runJob/index.js.map +1 -1
  626. package/dist/queues/utilities/getCurrentDate.d.ts.map +1 -1
  627. package/dist/queues/utilities/getJobTaskStatus.d.ts.map +1 -1
  628. package/dist/queues/utilities/updateJob.d.ts.map +1 -1
  629. package/dist/queues/utilities/updateJob.js +3 -0
  630. package/dist/queues/utilities/updateJob.js.map +1 -1
  631. package/dist/translations/getLocalI18n.d.ts.map +1 -1
  632. package/dist/types/constants.d.ts +23 -2
  633. package/dist/types/constants.d.ts.map +1 -1
  634. package/dist/types/constants.js +23 -0
  635. package/dist/types/constants.js.map +1 -1
  636. package/dist/types/index.d.ts +12 -10
  637. package/dist/types/index.d.ts.map +1 -1
  638. package/dist/types/index.js.map +1 -1
  639. package/dist/uploads/checkFileAccess.d.ts.map +1 -1
  640. package/dist/uploads/checkFileAccess.js +1 -0
  641. package/dist/uploads/checkFileAccess.js.map +1 -1
  642. package/dist/uploads/checkFileRestrictions.d.ts +1 -1
  643. package/dist/uploads/checkFileRestrictions.d.ts.map +1 -1
  644. package/dist/uploads/checkFileRestrictions.js +15 -1
  645. package/dist/uploads/checkFileRestrictions.js.map +1 -1
  646. package/dist/uploads/cropImage.d.ts +1 -1
  647. package/dist/uploads/cropImage.d.ts.map +1 -1
  648. package/dist/uploads/cropImage.js.map +1 -1
  649. package/dist/uploads/docWithFilenameExists.d.ts.map +1 -1
  650. package/dist/uploads/endpoints/getFileFromURL.js +2 -0
  651. package/dist/uploads/endpoints/getFileFromURL.js.map +1 -1
  652. package/dist/uploads/endpoints/uploadInstructions.d.ts +15 -0
  653. package/dist/uploads/endpoints/uploadInstructions.d.ts.map +1 -0
  654. package/dist/uploads/endpoints/uploadInstructions.js +84 -0
  655. package/dist/uploads/endpoints/uploadInstructions.js.map +1 -0
  656. package/dist/uploads/fetchAPI-multipart/isEligibleRequest.d.ts.map +1 -1
  657. package/dist/uploads/fetchAPI-multipart/isEligibleRequest.js +1 -2
  658. package/dist/uploads/fetchAPI-multipart/isEligibleRequest.js.map +1 -1
  659. package/dist/uploads/fetchAPI-multipart/isEligibleRequest.spec.js +28 -0
  660. package/dist/uploads/fetchAPI-multipart/isEligibleRequest.spec.js.map +1 -1
  661. package/dist/uploads/fetchAPI-multipart/processMultipart.d.ts.map +1 -1
  662. package/dist/uploads/fetchAPI-multipart/processMultipart.js +3 -12
  663. package/dist/uploads/fetchAPI-multipart/processMultipart.js.map +1 -1
  664. package/dist/uploads/fetchAPI-multipart/processNested.d.ts.map +1 -1
  665. package/dist/uploads/fetchAPI-multipart/utilities.d.ts.map +1 -1
  666. package/dist/uploads/fileExists.d.ts.map +1 -1
  667. package/dist/uploads/generateFileData.d.ts.map +1 -1
  668. package/dist/uploads/generateFileData.js +4 -1
  669. package/dist/uploads/generateFileData.js.map +1 -1
  670. package/dist/uploads/getBaseFields.d.ts.map +1 -1
  671. package/dist/uploads/getExternalFile.d.ts.map +1 -1
  672. package/dist/uploads/getFileByPath.d.ts +1 -1
  673. package/dist/uploads/getFileByPath.d.ts.map +1 -1
  674. package/dist/uploads/getFileFromUploadInstructions.d.ts +8 -0
  675. package/dist/uploads/getFileFromUploadInstructions.d.ts.map +1 -0
  676. package/dist/uploads/getFileFromUploadInstructions.js +62 -0
  677. package/dist/uploads/getFileFromUploadInstructions.js.map +1 -0
  678. package/dist/uploads/getFileTypeFallback.d.ts.map +1 -1
  679. package/dist/uploads/getImageSize.d.ts +12 -1
  680. package/dist/uploads/getImageSize.d.ts.map +1 -1
  681. package/dist/uploads/getImageSize.js +20 -18
  682. package/dist/uploads/getImageSize.js.map +1 -1
  683. package/dist/uploads/getImageSize.spec.js +298 -0
  684. package/dist/uploads/getImageSize.spec.js.map +1 -0
  685. package/dist/uploads/getSafeFilename.d.ts.map +1 -1
  686. package/dist/uploads/image-resizing/createImageSize.d.ts.map +1 -1
  687. package/dist/uploads/image-resizing/generateImageSizeFilename.d.ts.map +1 -1
  688. package/dist/uploads/image-resizing/getImageResizeAction.d.ts +1 -1
  689. package/dist/uploads/image-resizing/getImageResizeAction.d.ts.map +1 -1
  690. package/dist/uploads/image-resizing/parseFilename.d.ts.map +1 -1
  691. package/dist/uploads/image-resizing/sanitizeResizeConfig.d.ts.map +1 -1
  692. package/dist/uploads/matchMimeType.d.ts +8 -0
  693. package/dist/uploads/matchMimeType.d.ts.map +1 -0
  694. package/dist/uploads/matchMimeType.js +19 -0
  695. package/dist/uploads/matchMimeType.js.map +1 -0
  696. package/dist/uploads/matchMimeType.spec.js +66 -0
  697. package/dist/uploads/matchMimeType.spec.js.map +1 -0
  698. package/dist/uploads/mimeTypeValidator.d.ts.map +1 -1
  699. package/dist/uploads/probeImageSize.d.ts +39 -0
  700. package/dist/uploads/probeImageSize.d.ts.map +1 -0
  701. package/dist/uploads/probeImageSize.js +374 -0
  702. package/dist/uploads/probeImageSize.js.map +1 -0
  703. package/dist/uploads/probeImageSize.spec.js +366 -0
  704. package/dist/uploads/probeImageSize.spec.js.map +1 -0
  705. package/dist/uploads/safeFetch.d.ts.map +1 -1
  706. package/dist/uploads/saveBufferToFile.d.ts.map +1 -1
  707. package/dist/uploads/stagedUpload.d.ts +27 -0
  708. package/dist/uploads/stagedUpload.d.ts.map +1 -0
  709. package/dist/uploads/stagedUpload.js +197 -0
  710. package/dist/uploads/stagedUpload.js.map +1 -0
  711. package/dist/uploads/types.d.ts +102 -7
  712. package/dist/uploads/types.d.ts.map +1 -1
  713. package/dist/uploads/types.js.map +1 -1
  714. package/dist/uploads/uploadFiles.d.ts.map +1 -1
  715. package/dist/utilities/addDataAndFileToRequest.d.ts.map +1 -1
  716. package/dist/utilities/addDataAndFileToRequest.js +12 -39
  717. package/dist/utilities/addDataAndFileToRequest.js.map +1 -1
  718. package/dist/utilities/addLocalesToRequest.d.ts.map +1 -1
  719. package/dist/utilities/addSelectGenericsToGeneretedTypes.d.ts.map +1 -1
  720. package/dist/utilities/appendDateTimezoneSelectFields.d.ts.map +1 -1
  721. package/dist/utilities/appendNonTrashedFilter.d.ts +1 -1
  722. package/dist/utilities/appendNonTrashedFilter.d.ts.map +1 -1
  723. package/dist/utilities/appendNonTrashedFilter.js.map +1 -1
  724. package/dist/utilities/appendUploadSelectFields.d.ts.map +1 -1
  725. package/dist/utilities/canAccessAdmin.d.ts.map +1 -1
  726. package/dist/utilities/canAccessAdmin.js +1 -0
  727. package/dist/utilities/canAccessAdmin.js.map +1 -1
  728. package/dist/utilities/checkDocumentLockStatus.d.ts.map +1 -1
  729. package/dist/utilities/configToJSONSchema.d.ts +13 -4
  730. package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
  731. package/dist/utilities/configToJSONSchema.js +139 -61
  732. package/dist/utilities/configToJSONSchema.js.map +1 -1
  733. package/dist/utilities/configToJSONSchema.spec.js +378 -22
  734. package/dist/utilities/configToJSONSchema.spec.js.map +1 -1
  735. package/dist/utilities/createLocalReq.d.ts +2 -2
  736. package/dist/utilities/createLocalReq.d.ts.map +1 -1
  737. package/dist/utilities/createLocalReq.js.map +1 -1
  738. package/dist/utilities/createPayloadRequest.d.ts.map +1 -1
  739. package/dist/utilities/createPayloadRequest.js +1 -0
  740. package/dist/utilities/createPayloadRequest.js.map +1 -1
  741. package/dist/utilities/deepCopyObject.d.ts.map +1 -1
  742. package/dist/utilities/dependencies/resolveFrom.d.ts.map +1 -1
  743. package/dist/utilities/escapeRegExp.d.ts.map +1 -1
  744. package/dist/utilities/extractID.d.ts.map +1 -1
  745. package/dist/utilities/fieldValueExists.d.ts +29 -0
  746. package/dist/utilities/fieldValueExists.d.ts.map +1 -0
  747. package/dist/utilities/fieldValueExists.js +27 -0
  748. package/dist/utilities/fieldValueExists.js.map +1 -0
  749. package/dist/utilities/flattenAllFields.d.ts.map +1 -1
  750. package/dist/utilities/formatAdminURL.d.ts.map +1 -1
  751. package/dist/utilities/formatErrors.d.ts.map +1 -1
  752. package/dist/utilities/formatLabels.d.ts.map +1 -1
  753. package/dist/utilities/getBestFitFromSizes.d.ts.map +1 -1
  754. package/dist/utilities/getBlockSelect.d.ts.map +1 -1
  755. package/dist/utilities/getDataByPath.d.ts.map +1 -1
  756. package/dist/utilities/getEntityPermissions/getEntityPermissions.d.ts.map +1 -1
  757. package/dist/utilities/getEntityPermissions/getEntityPermissions.js +3 -0
  758. package/dist/utilities/getEntityPermissions/getEntityPermissions.js.map +1 -1
  759. package/dist/utilities/getEntityPermissions/populateFieldPermissions.d.ts +7 -1
  760. package/dist/utilities/getEntityPermissions/populateFieldPermissions.d.ts.map +1 -1
  761. package/dist/utilities/getEntityPermissions/populateFieldPermissions.js +19 -2
  762. package/dist/utilities/getEntityPermissions/populateFieldPermissions.js.map +1 -1
  763. package/dist/utilities/getFieldByPath.d.ts.map +1 -1
  764. package/dist/utilities/getFieldPermissions.d.ts.map +1 -1
  765. package/dist/utilities/getNextVersion.d.ts +7 -0
  766. package/dist/utilities/getNextVersion.d.ts.map +1 -0
  767. package/dist/utilities/getNextVersion.js +20 -0
  768. package/dist/utilities/getNextVersion.js.map +1 -0
  769. package/dist/utilities/getNextVersion.spec.js +16 -0
  770. package/dist/utilities/getNextVersion.spec.js.map +1 -0
  771. package/dist/utilities/getObjectDotNotation.d.ts.map +1 -1
  772. package/dist/utilities/getRequestEntity.d.ts.map +1 -1
  773. package/dist/utilities/getRequestLanguage.d.ts.map +1 -1
  774. package/dist/utilities/getRequestOrigin.d.ts +2 -2
  775. package/dist/utilities/getRequestOrigin.d.ts.map +1 -1
  776. package/dist/utilities/getRequestOrigin.js.map +1 -1
  777. package/dist/utilities/getSafeRedirect.d.ts.map +1 -1
  778. package/dist/utilities/getSafeRedirect.js +16 -9
  779. package/dist/utilities/getSafeRedirect.js.map +1 -1
  780. package/dist/utilities/getSafeRedirect.spec.js +96 -2
  781. package/dist/utilities/getSafeRedirect.spec.js.map +1 -1
  782. package/dist/utilities/getSelectMode.d.ts.map +1 -1
  783. package/dist/utilities/getSiblingData.d.ts.map +1 -1
  784. package/dist/utilities/getTranslatedLabel.d.ts.map +1 -1
  785. package/dist/utilities/getUniqueFieldValue.d.ts +27 -0
  786. package/dist/utilities/getUniqueFieldValue.d.ts.map +1 -0
  787. package/dist/utilities/getUniqueFieldValue.js +26 -0
  788. package/dist/utilities/getUniqueFieldValue.js.map +1 -0
  789. package/dist/utilities/getVersionsConfig.d.ts +1 -1
  790. package/dist/utilities/getVersionsConfig.d.ts.map +1 -1
  791. package/dist/utilities/handleEndpoints.d.ts.map +1 -1
  792. package/dist/utilities/headersWithCors.d.ts.map +1 -1
  793. package/dist/utilities/headersWithCors.js +1 -1
  794. package/dist/utilities/headersWithCors.js.map +1 -1
  795. package/dist/utilities/isEntityHidden.d.ts +2 -2
  796. package/dist/utilities/isEntityHidden.d.ts.map +1 -1
  797. package/dist/utilities/isURLAllowed.d.ts.map +1 -1
  798. package/dist/utilities/isURLAllowed.js +9 -3
  799. package/dist/utilities/isURLAllowed.js.map +1 -1
  800. package/dist/utilities/isURLAllowed.spec.js +78 -0
  801. package/dist/utilities/isURLAllowed.spec.js.map +1 -0
  802. package/dist/utilities/isValidID.d.ts +1 -1
  803. package/dist/utilities/isValidID.d.ts.map +1 -1
  804. package/dist/utilities/killTransaction.d.ts +7 -0
  805. package/dist/utilities/killTransaction.d.ts.map +1 -1
  806. package/dist/utilities/killTransaction.js +7 -0
  807. package/dist/utilities/killTransaction.js.map +1 -1
  808. package/dist/utilities/logError.d.ts.map +1 -1
  809. package/dist/utilities/logError.js +5 -2
  810. package/dist/utilities/logError.js.map +1 -1
  811. package/dist/utilities/logger.d.ts +1 -1
  812. package/dist/utilities/logger.d.ts.map +1 -1
  813. package/dist/utilities/mergeHeaders.d.ts.map +1 -1
  814. package/dist/utilities/mergeListSearchAndWhere.d.ts.map +1 -1
  815. package/dist/utilities/miniChalk.d.ts.map +1 -1
  816. package/dist/utilities/nextJsDevReloadStrategy.d.ts +7 -0
  817. package/dist/utilities/nextJsDevReloadStrategy.d.ts.map +1 -0
  818. package/dist/utilities/nextJsDevReloadStrategy.js +59 -0
  819. package/dist/utilities/nextJsDevReloadStrategy.js.map +1 -0
  820. package/dist/utilities/nextJsDevReloadStrategy.spec.js +123 -0
  821. package/dist/utilities/nextJsDevReloadStrategy.spec.js.map +1 -0
  822. package/dist/utilities/optionsAreEqual.d.ts.map +1 -1
  823. package/dist/utilities/parseBooleanString.d.ts.map +1 -1
  824. package/dist/utilities/parseCookies.d.ts +1 -1
  825. package/dist/utilities/parseCookies.d.ts.map +1 -1
  826. package/dist/utilities/parseParams/index.d.ts.map +1 -1
  827. package/dist/utilities/profiling.d.ts.map +1 -1
  828. package/dist/utilities/reduceFieldsToValues.d.ts.map +1 -1
  829. package/dist/utilities/resolveSelect.d.ts.map +1 -1
  830. package/dist/utilities/routeError.d.ts.map +1 -1
  831. package/dist/utilities/sanitizeFallbackLocale.d.ts.map +1 -1
  832. package/dist/utilities/sanitizeInternalFields.d.ts.map +1 -1
  833. package/dist/utilities/sanitizeJoinParams.d.ts.map +1 -1
  834. package/dist/utilities/sanitizePopulateParam.d.ts.map +1 -1
  835. package/dist/utilities/sanitizeSelect.d.ts.map +1 -1
  836. package/dist/utilities/sanitizeSelectParam.d.ts.map +1 -1
  837. package/dist/utilities/sanitizeSortParams.d.ts.map +1 -1
  838. package/dist/utilities/setsAreEqual.d.ts.map +1 -1
  839. package/dist/utilities/slugify.d.ts.map +1 -1
  840. package/dist/utilities/stripUnselectedFields.d.ts.map +1 -1
  841. package/dist/utilities/telemetry/conf/envPaths.d.ts.map +1 -1
  842. package/dist/utilities/telemetry/conf/envPaths.js +40 -31
  843. package/dist/utilities/telemetry/conf/envPaths.js.map +1 -1
  844. package/dist/utilities/telemetry/conf/index.d.ts.map +1 -1
  845. package/dist/utilities/telemetry/events/adminInit.d.ts.map +1 -1
  846. package/dist/utilities/telemetry/events/adminInit.js +2 -3
  847. package/dist/utilities/telemetry/events/adminInit.js.map +1 -1
  848. package/dist/utilities/telemetry/events/serverInit.d.ts.map +1 -1
  849. package/dist/utilities/telemetry/events/serverInit.js +2 -3
  850. package/dist/utilities/telemetry/events/serverInit.js.map +1 -1
  851. package/dist/utilities/telemetry/index.d.ts +15 -4
  852. package/dist/utilities/telemetry/index.d.ts.map +1 -1
  853. package/dist/utilities/telemetry/index.js +6 -1
  854. package/dist/utilities/telemetry/index.js.map +1 -1
  855. package/dist/utilities/telemetry/index.spec.js +43 -0
  856. package/dist/utilities/telemetry/index.spec.js.map +1 -0
  857. package/dist/utilities/telemetry/oneWayHash.d.ts.map +1 -1
  858. package/dist/utilities/timestamp.d.ts.map +1 -1
  859. package/dist/utilities/toKebabCase.d.ts.map +1 -1
  860. package/dist/utilities/transformColumnPreferences.d.ts.map +1 -1
  861. package/dist/utilities/transformWhereQuery.d.ts.map +1 -1
  862. package/dist/utilities/traverseFields.d.ts.map +1 -1
  863. package/dist/utilities/traverseFields.js +20 -22
  864. package/dist/utilities/traverseFields.js.map +1 -1
  865. package/dist/utilities/traverseFields.spec.js +112 -0
  866. package/dist/utilities/traverseFields.spec.js.map +1 -1
  867. package/dist/utilities/traverseForLocalizedFields.d.ts.map +1 -1
  868. package/dist/utilities/unflatten.d.ts.map +1 -1
  869. package/dist/utilities/unflattenData.d.ts +3 -0
  870. package/dist/utilities/unflattenData.d.ts.map +1 -0
  871. package/dist/utilities/unflattenData.js +14 -0
  872. package/dist/utilities/unflattenData.js.map +1 -0
  873. package/dist/utilities/validateMimeType.d.ts.map +1 -1
  874. package/dist/utilities/validateTimezones.d.ts.map +1 -1
  875. package/dist/utilities/validateWhereQuery.d.ts.map +1 -1
  876. package/dist/utilities/wordBoundariesRegex.d.ts.map +1 -1
  877. package/dist/utilities/wrapInternalEndpoints.d.ts.map +1 -1
  878. package/dist/versions/baseFields.d.ts.map +1 -1
  879. package/dist/versions/buildCollectionFields.d.ts.map +1 -1
  880. package/dist/versions/buildGlobalFields.d.ts.map +1 -1
  881. package/dist/versions/buildVersionCompoundIndexes.d.ts.map +1 -1
  882. package/dist/versions/defaults.d.ts.map +1 -1
  883. package/dist/versions/deleteCollectionVersions.d.ts.map +1 -1
  884. package/dist/versions/deleteScheduledPublishJobs.d.ts.map +1 -1
  885. package/dist/versions/deleteScheduledPublishJobs.js +2 -2
  886. package/dist/versions/deleteScheduledPublishJobs.js.map +1 -1
  887. package/dist/versions/drafts/appendVersionToQueryKey.d.ts.map +1 -1
  888. package/dist/versions/drafts/appendVersionToQueryKey.js +1 -3
  889. package/dist/versions/drafts/appendVersionToQueryKey.js.map +1 -1
  890. package/dist/versions/drafts/appendVersionToQueryKey.spec.js +28 -0
  891. package/dist/versions/drafts/appendVersionToQueryKey.spec.js.map +1 -0
  892. package/dist/versions/drafts/getQueryDraftsSelect.d.ts.map +1 -1
  893. package/dist/versions/drafts/getQueryDraftsSort.d.ts.map +1 -1
  894. package/dist/versions/drafts/replaceWithDraftIfAvailable.d.ts.map +1 -1
  895. package/dist/versions/enforceMaxVersions.d.ts.map +1 -1
  896. package/dist/versions/getLatestCollectionVersion.d.ts.map +1 -1
  897. package/dist/versions/getLatestGlobalVersion.d.ts.map +1 -1
  898. package/dist/versions/migrations/localizeStatus/shared.d.ts.map +1 -1
  899. package/dist/versions/payloadPackageList.d.ts.map +1 -1
  900. package/dist/versions/payloadPackageList.js +0 -1
  901. package/dist/versions/payloadPackageList.js.map +1 -1
  902. package/dist/versions/schedule/job.d.ts.map +1 -1
  903. package/dist/versions/schedule/job.js +4 -1
  904. package/dist/versions/schedule/job.js.map +1 -1
  905. package/package.json +12 -6
  906. package/skills/payload/SKILL.md +526 -0
  907. package/skills/payload/reference/ACCESS-CONTROL-ADVANCED.md +704 -0
  908. package/skills/payload/reference/ACCESS-CONTROL.md +696 -0
  909. package/skills/payload/reference/ADAPTERS.md +305 -0
  910. package/skills/payload/reference/ADVANCED.md +386 -0
  911. package/skills/payload/reference/COLLECTIONS.md +333 -0
  912. package/skills/payload/reference/ENDPOINTS.md +634 -0
  913. package/skills/payload/reference/FIELD-TYPE-GUARDS.md +553 -0
  914. package/skills/payload/reference/FIELDS.md +745 -0
  915. package/skills/payload/reference/HOOKS.md +186 -0
  916. package/skills/payload/reference/PLUGIN-DEVELOPMENT.md +1436 -0
  917. package/skills/payload/reference/QUERIES.md +274 -0
  918. package/dist/database/defaultUpdateJobs.d.ts +0 -3
  919. package/dist/database/defaultUpdateJobs.d.ts.map +0 -1
  920. package/dist/database/defaultUpdateJobs.js +0 -41
  921. package/dist/database/defaultUpdateJobs.js.map +0 -1
  922. package/dist/fields/baseFields/slug/countVersions.d.ts +0 -13
  923. package/dist/fields/baseFields/slug/countVersions.d.ts.map +0 -1
  924. package/dist/fields/baseFields/slug/countVersions.js +0 -29
  925. package/dist/fields/baseFields/slug/countVersions.js.map +0 -1
  926. package/dist/fields/baseFields/slug/index.d.ts +0 -89
  927. package/dist/fields/baseFields/slug/index.d.ts.map +0 -1
  928. package/dist/fields/baseFields/slug/index.js +0 -81
  929. package/dist/fields/baseFields/slug/index.js.map +0 -1
  930. package/dist/uploads/tempFile.d.ts +0 -7
  931. package/dist/uploads/tempFile.d.ts.map +0 -1
  932. package/dist/uploads/tempFile.js +0 -39
  933. package/dist/uploads/tempFile.js.map +0 -1
  934. package/dist/utilities/isRSCEnabled.d.ts +0 -12
  935. package/dist/utilities/isRSCEnabled.d.ts.map +0 -1
  936. package/dist/utilities/isRSCEnabled.js +0 -14
  937. package/dist/utilities/isRSCEnabled.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,WAAW,EACX,KAAK,EACL,UAAU,EACV,GAAG,EACJ,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EACV,kBAAkB,EAClB,IAAI,EACJ,UAAU,EACV,2BAA2B,EAC3B,mBAAmB,EACnB,SAAS,EACT,0BAA0B,EAC1B,GAAG,EACJ,MAAM,iBAAiB,CAAA;AAExB,YAAY;AACV;;;;GAIG;AACH,eAAe,IAAI,mBAAmB;AACtC;;;;GAIG;AACH,eAAe,IAAI,mBAAmB;AACtC;;;;GAIG;AACH,eAAe,IAAI,gBAAgB;AACnC;;;;GAIG;AACH,eAAe,IAAI,qBAAqB,GACzC,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAA;AACpG,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,YAAY,EAAE,cAAc,EAAE,WAAW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ACD,WAAW,GACX,WAAW,GACX,SAAS,CACZ,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,CAAC,EAAE,UAAU,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACzC,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type React from 'react'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { TypeWithID } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type {\n Block,\n ClientBlock,\n ClientField,\n Field,\n FieldTypes,\n Tab,\n} from '../fields/config/types.js'\nimport type { JsonObject } from '../types/index.js'\nimport type { ClientTab } from './fields/Tabs.js'\nimport type {\n BuildFormStateArgs,\n Data,\n FieldState,\n FieldStateWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n} from './forms/Form.js'\n\nexport type {\n /**\n * @deprecated\n * The `CustomPreviewButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPreviewButton,\n /**\n * @deprecated\n * The `CustomPublishButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPublishButton,\n /**\n * @deprecated\n * The `CustomSaveButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveButton,\n /**\n * @deprecated\n * The `CustomSaveDraftButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveDraftButton,\n} from '../config/types.js'\nexport type { DefaultCellComponentProps, DefaultServerCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type {\n EditMenuItemsClientProps,\n EditMenuItemsServerProps,\n EditMenuItemsServerPropsOnly,\n} from './elements/EditMenuItems.js'\nexport type {\n NavGroupPreferences,\n NavPreferences,\n SidebarTabClientProps,\n SidebarTabServerProps,\n SidebarTabServerPropsOnly,\n} from './elements/Nav.js'\nexport type {\n PreviewButtonClientProps,\n PreviewButtonServerProps,\n PreviewButtonServerPropsOnly,\n} from './elements/PreviewButton.js'\nexport type {\n PublishButtonClientProps,\n PublishButtonServerProps,\n PublishButtonServerPropsOnly,\n} from './elements/PublishButton.js'\nexport type {\n SaveButtonClientProps,\n SaveButtonServerProps,\n SaveButtonServerPropsOnly,\n} from './elements/SaveButton.js'\nexport type {\n SaveDraftButtonClientProps,\n SaveDraftButtonServerProps,\n SaveDraftButtonServerPropsOnly,\n} from './elements/SaveDraftButton.js'\nexport type { CustomStatus } from './elements/Status.js'\n\nexport type { Column } from './elements/Table.js'\n\nexport type {\n UnpublishButtonClientProps,\n UnpublishButtonServerProps,\n UnpublishButtonServerPropsOnly,\n} from './elements/UnpublishButton.js'\n\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldClientComponent,\n ArrayFieldClientProps,\n ArrayFieldDescriptionClientComponent,\n ArrayFieldDescriptionServerComponent,\n ArrayFieldDiffClientComponent,\n ArrayFieldDiffServerComponent,\n ArrayFieldErrorClientComponent,\n ArrayFieldErrorServerComponent,\n ArrayFieldLabelClientComponent,\n ArrayFieldLabelServerComponent,\n ArrayFieldServerComponent,\n ArrayFieldServerProps,\n} from './fields/Array.js'\n\nexport type {\n BlockRowLabelClientComponent,\n BlockRowLabelServerComponent,\n BlocksFieldClientComponent,\n BlocksFieldClientProps,\n BlocksFieldDescriptionClientComponent,\n BlocksFieldDescriptionServerComponent,\n BlocksFieldDiffClientComponent,\n BlocksFieldDiffServerComponent,\n BlocksFieldErrorClientComponent,\n BlocksFieldErrorServerComponent,\n BlocksFieldLabelClientComponent,\n BlocksFieldLabelServerComponent,\n BlocksFieldServerComponent,\n BlocksFieldServerProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldClientComponent,\n CheckboxFieldClientProps,\n CheckboxFieldDescriptionClientComponent,\n CheckboxFieldDescriptionServerComponent,\n CheckboxFieldDiffClientComponent,\n CheckboxFieldDiffServerComponent,\n CheckboxFieldErrorClientComponent,\n CheckboxFieldErrorServerComponent,\n CheckboxFieldLabelClientComponent,\n CheckboxFieldLabelServerComponent,\n CheckboxFieldServerComponent,\n CheckboxFieldServerProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldClientComponent,\n CodeFieldClientProps,\n CodeFieldDescriptionClientComponent,\n CodeFieldDescriptionServerComponent,\n CodeFieldDiffClientComponent,\n CodeFieldDiffServerComponent,\n CodeFieldErrorClientComponent,\n CodeFieldErrorServerComponent,\n CodeFieldLabelClientComponent,\n CodeFieldLabelServerComponent,\n CodeFieldServerComponent,\n CodeFieldServerProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldClientComponent,\n CollapsibleFieldClientProps,\n CollapsibleFieldDescriptionClientComponent,\n CollapsibleFieldDescriptionServerComponent,\n CollapsibleFieldDiffClientComponent,\n CollapsibleFieldDiffServerComponent,\n CollapsibleFieldErrorClientComponent,\n CollapsibleFieldErrorServerComponent,\n CollapsibleFieldLabelClientComponent,\n CollapsibleFieldLabelServerComponent,\n CollapsibleFieldServerComponent,\n CollapsibleFieldServerProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldClientComponent,\n DateFieldClientProps,\n DateFieldDescriptionClientComponent,\n DateFieldDescriptionServerComponent,\n DateFieldDiffClientComponent,\n DateFieldDiffServerComponent,\n DateFieldErrorClientComponent,\n DateFieldErrorServerComponent,\n DateFieldLabelClientComponent,\n DateFieldLabelServerComponent,\n DateFieldServerComponent,\n DateFieldServerProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldClientComponent,\n EmailFieldClientProps,\n EmailFieldDescriptionClientComponent,\n EmailFieldDescriptionServerComponent,\n EmailFieldDiffClientComponent,\n EmailFieldDiffServerComponent,\n EmailFieldErrorClientComponent,\n EmailFieldErrorServerComponent,\n EmailFieldLabelClientComponent,\n EmailFieldLabelServerComponent,\n EmailFieldServerComponent,\n EmailFieldServerProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldClientComponent,\n GroupFieldClientProps,\n GroupFieldDescriptionClientComponent,\n GroupFieldDescriptionServerComponent,\n GroupFieldDiffClientComponent,\n GroupFieldDiffServerComponent,\n GroupFieldErrorClientComponent,\n GroupFieldErrorServerComponent,\n GroupFieldLabelClientComponent,\n GroupFieldLabelServerComponent,\n GroupFieldServerComponent,\n GroupFieldServerProps,\n} from './fields/Group.js'\n\nexport type { HiddenFieldProps } from './fields/Hidden.js'\n\nexport type {\n JoinFieldClientComponent,\n JoinFieldClientProps,\n JoinFieldDescriptionClientComponent,\n JoinFieldDescriptionServerComponent,\n JoinFieldDiffClientComponent,\n JoinFieldDiffServerComponent,\n JoinFieldErrorClientComponent,\n JoinFieldErrorServerComponent,\n JoinFieldLabelClientComponent,\n JoinFieldLabelServerComponent,\n JoinFieldServerComponent,\n JoinFieldServerProps,\n} from './fields/Join.js'\n\nexport type {\n JSONFieldClientComponent,\n JSONFieldClientProps,\n JSONFieldDescriptionClientComponent,\n JSONFieldDescriptionServerComponent,\n JSONFieldDiffClientComponent,\n JSONFieldDiffServerComponent,\n JSONFieldErrorClientComponent,\n JSONFieldErrorServerComponent,\n JSONFieldLabelClientComponent,\n JSONFieldLabelServerComponent,\n JSONFieldServerComponent,\n JSONFieldServerProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldClientComponent,\n NumberFieldClientProps,\n NumberFieldDescriptionClientComponent,\n NumberFieldDescriptionServerComponent,\n NumberFieldDiffClientComponent,\n NumberFieldDiffServerComponent,\n NumberFieldErrorClientComponent,\n NumberFieldErrorServerComponent,\n NumberFieldLabelClientComponent,\n NumberFieldLabelServerComponent,\n NumberFieldServerComponent,\n NumberFieldServerProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldClientComponent,\n PointFieldClientProps,\n PointFieldDescriptionClientComponent,\n PointFieldDescriptionServerComponent,\n PointFieldDiffClientComponent,\n PointFieldDiffServerComponent,\n PointFieldErrorClientComponent,\n PointFieldErrorServerComponent,\n PointFieldLabelClientComponent,\n PointFieldLabelServerComponent,\n PointFieldServerComponent,\n PointFieldServerProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldClientComponent,\n RadioFieldClientProps,\n RadioFieldDescriptionClientComponent,\n RadioFieldDescriptionServerComponent,\n RadioFieldDiffClientComponent,\n RadioFieldDiffServerComponent,\n RadioFieldErrorClientComponent,\n RadioFieldErrorServerComponent,\n RadioFieldLabelClientComponent,\n RadioFieldLabelServerComponent,\n RadioFieldServerComponent,\n RadioFieldServerProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldClientComponent,\n RelationshipFieldClientProps,\n RelationshipFieldDescriptionClientComponent,\n RelationshipFieldDescriptionServerComponent,\n RelationshipFieldDiffClientComponent,\n RelationshipFieldDiffServerComponent,\n RelationshipFieldErrorClientComponent,\n RelationshipFieldErrorServerComponent,\n RelationshipFieldLabelClientComponent,\n RelationshipFieldLabelServerComponent,\n RelationshipFieldServerComponent,\n RelationshipFieldServerProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldClientComponent,\n RichTextFieldClientProps,\n RichTextFieldDescriptionClientComponent,\n RichTextFieldDescriptionServerComponent,\n RichTextFieldDiffClientComponent,\n RichTextFieldDiffServerComponent,\n RichTextFieldErrorClientComponent,\n RichTextFieldErrorServerComponent,\n RichTextFieldLabelClientComponent,\n RichTextFieldLabelServerComponent,\n RichTextFieldServerComponent,\n RichTextFieldServerProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldClientComponent,\n RowFieldClientProps,\n RowFieldDescriptionClientComponent,\n RowFieldDescriptionServerComponent,\n RowFieldDiffClientComponent,\n RowFieldDiffServerComponent,\n RowFieldErrorClientComponent,\n RowFieldErrorServerComponent,\n RowFieldLabelClientComponent,\n RowFieldLabelServerComponent,\n RowFieldServerComponent,\n RowFieldServerProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldClientComponent,\n SelectFieldClientProps,\n SelectFieldDescriptionClientComponent,\n SelectFieldDescriptionServerComponent,\n SelectFieldDiffClientComponent,\n SelectFieldDiffServerComponent,\n SelectFieldErrorClientComponent,\n SelectFieldErrorServerComponent,\n SelectFieldLabelClientComponent,\n SelectFieldLabelServerComponent,\n SelectFieldServerComponent,\n SelectFieldServerProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldClientComponent,\n TabsFieldClientProps,\n TabsFieldDescriptionClientComponent,\n TabsFieldDescriptionServerComponent,\n TabsFieldDiffClientComponent,\n TabsFieldDiffServerComponent,\n TabsFieldErrorClientComponent,\n TabsFieldErrorServerComponent,\n TabsFieldLabelClientComponent,\n TabsFieldLabelServerComponent,\n TabsFieldServerComponent,\n TabsFieldServerProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldClientComponent,\n TextFieldClientProps,\n TextFieldDescriptionClientComponent,\n TextFieldDescriptionServerComponent,\n TextFieldDiffClientComponent,\n TextFieldDiffServerComponent,\n TextFieldErrorClientComponent,\n TextFieldErrorServerComponent,\n TextFieldLabelClientComponent,\n TextFieldLabelServerComponent,\n TextFieldServerComponent,\n TextFieldServerProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldClientComponent,\n TextareaFieldClientProps,\n TextareaFieldDescriptionClientComponent,\n TextareaFieldDescriptionServerComponent,\n TextareaFieldDiffClientComponent,\n TextareaFieldDiffServerComponent,\n TextareaFieldErrorClientComponent,\n TextareaFieldErrorServerComponent,\n TextareaFieldLabelClientComponent,\n TextareaFieldLabelServerComponent,\n TextareaFieldServerComponent,\n TextareaFieldServerProps,\n} from './fields/Textarea.js'\n\nexport type {\n UIFieldClientComponent,\n UIFieldClientProps,\n UIFieldDiffClientComponent,\n UIFieldDiffServerComponent,\n UIFieldServerComponent,\n UIFieldServerProps,\n} from './fields/UI.js'\n\nexport type {\n UploadFieldClientComponent,\n UploadFieldClientProps,\n UploadFieldDescriptionClientComponent,\n UploadFieldDescriptionServerComponent,\n UploadFieldDiffClientComponent,\n UploadFieldDiffServerComponent,\n UploadFieldErrorClientComponent,\n UploadFieldErrorServerComponent,\n UploadFieldLabelClientComponent,\n UploadFieldLabelServerComponent,\n UploadFieldServerComponent,\n UploadFieldServerProps,\n} from './fields/Upload.js'\n\nexport type {\n Description,\n DescriptionFunction,\n FieldDescriptionClientComponent,\n FieldDescriptionClientProps,\n FieldDescriptionServerComponent,\n FieldDescriptionServerProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/Description.js'\n\nexport type {\n BaseVersionField,\n DiffMethod,\n FieldDiffClientComponent,\n FieldDiffClientProps,\n FieldDiffServerComponent,\n FieldDiffServerProps,\n VersionField,\n VersionTab,\n} from './forms/Diff.js'\n\nexport type {\n BuildFormStateArgs,\n Data,\n FieldState as FormField,\n FieldStateWithoutComponents as FormFieldWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n}\n\nexport type {\n FieldErrorClientComponent,\n FieldErrorClientProps,\n FieldErrorServerComponent,\n FieldErrorServerProps,\n GenericErrorProps,\n} from './forms/Error.js'\n\nexport type {\n ClientComponentProps,\n ClientFieldBase,\n ClientFieldWithOptionalType,\n FieldClientComponent,\n FieldPaths,\n FieldServerComponent,\n ServerComponentProps,\n ServerFieldBase,\n} from './forms/Field.js'\n\nexport type {\n FieldLabelClientComponent,\n FieldLabelClientProps,\n FieldLabelServerComponent,\n FieldLabelServerProps,\n GenericLabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<any>\n RenderedComponent: React.ReactNode\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n type: 'client'\n}\n\nexport type MappedEmptyComponent = {\n type: 'empty'\n}\n\nexport enum Action {\n RenderConfig = 'render-config',\n}\n\nexport type RenderEntityConfigArgs = {\n collectionSlug?: string\n data?: Data\n globalSlug?: string\n}\n\nexport type RenderRootConfigArgs = {}\n\nexport type RenderFieldConfigArgs = {\n collectionSlug?: string\n formState?: FormState\n globalSlug?: string\n schemaPath: string\n}\n\nexport type RenderConfigArgs = {\n action: Action.RenderConfig\n config: Promise<SanitizedConfig> | SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n languageCode: AcceptedLanguages\n serverProps?: any\n} & (RenderEntityConfigArgs | RenderFieldConfigArgs | RenderRootConfigArgs)\n\nexport type PayloadServerAction = (\n args:\n | {\n [key: string]: any\n action: Action\n i18n: I18nClient\n }\n | RenderConfigArgs,\n) => Promise<string>\n\nexport type RenderedField = {\n Field: React.ReactNode\n indexPath?: string\n initialSchemaPath?: string\n /**\n * @deprecated\n * This is a legacy property that will be removed in v4.\n * Please use `fieldIsSidebar(field)` from `payload` instead.\n * Or check `field.admin.position === 'sidebar'` directly.\n */\n isSidebar: boolean\n path: string\n schemaPath: string\n type: FieldTypes\n}\n\nexport type FieldRow = {\n RowLabel?: React.ReactNode\n}\n\nexport type DocumentSlots = {\n BeforeDocumentControls?: React.ReactNode\n BeforeDocumentMeta?: React.ReactNode\n Description?: React.ReactNode\n EditMenuItems?: React.ReactNode\n LivePreview?: React.ReactNode\n PreviewButton?: React.ReactNode\n PublishButton?: React.ReactNode\n SaveButton?: React.ReactNode\n SaveDraftButton?: React.ReactNode\n Status?: React.ReactNode\n UnpublishButton?: React.ReactNode\n Upload?: React.ReactNode\n UploadControls?: React.ReactNode\n}\n\nexport type {\n BuildTableStateArgs,\n DefaultServerFunctionArgs,\n InitReqResult,\n ListQuery,\n ServerFunction,\n ServerFunctionArgs,\n ServerFunctionClient,\n ServerFunctionClientArgs,\n ServerFunctionConfig,\n ServerFunctionHandler,\n ServerFunctionMode,\n SlugifyServerFunctionArgs,\n} from './functions/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\n\nexport type { RichTextAdapter, RichTextAdapterProvider, RichTextHooks } from './RichText.js'\n\nexport { type WidgetServerProps } from './views/dashboard.js'\n\nexport type {\n BeforeDocumentControlsClientProps,\n BeforeDocumentControlsServerProps,\n BeforeDocumentControlsServerPropsOnly,\n DocumentSubViewTypes,\n DocumentTabClientProps,\n /**\n * @deprecated\n * The `DocumentTabComponent` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps`or `DocumentTabClientProps` instead.\n */\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n /**\n * @deprecated\n * The `DocumentTabProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps` instead.\n */\n DocumentTabServerProps as DocumentTabProps,\n DocumentTabServerProps,\n DocumentTabServerPropsOnly,\n /**\n * @deprecated\n * The `ClientSideEditViewProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentViewClientProps` instead.\n */\n DocumentViewClientProps as ClientSideEditViewProps,\n DocumentViewClientProps,\n /**\n * @deprecated\n * The `ServerSideEditViewProps` is deprecated and will be removed in the next major version.\n * Use `DocumentViewServerProps` instead.\n */\n DocumentViewServerProps as ServerSideEditViewProps,\n DocumentViewServerProps,\n DocumentViewServerPropsOnly,\n EditViewProps,\n RenderDocumentVersionsProperties,\n} from './views/document.js'\n\nexport type { RelatedDocumentsGrouped } from './views/hierarchyList.js'\n\nexport type {\n AdminViewClientProps,\n /**\n * @deprecated\n * The `AdminViewComponent` type is deprecated and will be removed in the next major version.\n * Type your component props directly instead.\n */\n AdminViewComponent,\n AdminViewConfig,\n /**\n * @deprecated\n * The `AdminViewProps` type is deprecated and will be removed in the next major version.\n * Use `AdminViewServerProps` instead.\n */\n AdminViewServerProps as AdminViewProps,\n AdminViewServerProps,\n AdminViewServerPropsOnly,\n InitPageResult,\n ServerPropsFromView,\n ViewDescriptionClientProps,\n ViewDescriptionServerProps,\n ViewDescriptionServerPropsOnly,\n ViewTypes,\n VisibleEntities,\n} from './views/index.js'\n\nexport type {\n AfterListClientProps,\n AfterListServerProps,\n AfterListServerPropsOnly,\n AfterListTableClientProps,\n AfterListTableServerProps,\n AfterListTableServerPropsOnly,\n BeforeListClientProps,\n BeforeListServerProps,\n BeforeListServerPropsOnly,\n BeforeListTableClientProps,\n BeforeListTableServerProps,\n BeforeListTableServerPropsOnly,\n HierarchyViewData,\n ListViewClientProps,\n ListViewServerProps,\n ListViewServerPropsOnly,\n ListViewSlots,\n ListViewSlotSharedClientProps,\n NoResultsClientProps,\n NoResultsServerProps,\n NoResultsServerPropsOnly,\n} from './views/list.js'\n\ntype SchemaPath = {} & string\nexport type FieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: Field[]\n }\n | Block\n | Field\n | Tab\n>\n\nexport type ClientFieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: ClientField[]\n }\n | ClientBlock\n | ClientField\n | ClientTab\n>\n\nexport type DocumentEvent = {\n doc?: TypeWithID\n drawerSlug?: string\n entitySlug: string\n id?: number | string\n operation: 'create' | 'update'\n updatedAt: string\n}\n"],"names":["Action"],"mappings":"AAmgBA,OAAO,IAAA,AAAKA,gCAAAA;;WAAAA;MAEX"}
1
+ {"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type React from 'react'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { TypeWithID } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type {\n Block,\n ClientBlock,\n ClientField,\n Field,\n FieldTypes,\n Tab,\n} from '../fields/config/types.js'\nimport type { JsonObject } from '../types/index.js'\nimport type { ClientTab } from './fields/Tabs.js'\nimport type {\n BuildFormStateArgs,\n Data,\n FieldState,\n FieldStateWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n} from './forms/Form.js'\n\nexport type {\n /**\n * @deprecated\n * The `CustomPreviewButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPreviewButton,\n /**\n * @deprecated\n * The `CustomPublishButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomPublishButton,\n /**\n * @deprecated\n * The `CustomSaveButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveButton,\n /**\n * @deprecated\n * The `CustomSaveDraftButton` type is deprecated and will be removed in the next major version.\n * This type is only used for the Payload Config. Use `PreviewButtonClientProps` instead.\n */\n CustomComponent as CustomSaveDraftButton,\n} from '../config/types.js'\nexport type { DefaultCellComponentProps, DefaultServerCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type {\n EditMenuItemsClientProps,\n EditMenuItemsServerProps,\n EditMenuItemsServerPropsOnly,\n} from './elements/EditMenuItems.js'\nexport type {\n NavGroupPreferences,\n NavPreferences,\n SidebarTabClientProps,\n SidebarTabServerProps,\n SidebarTabServerPropsOnly,\n} from './elements/Nav.js'\nexport type {\n PreviewButtonClientProps,\n PreviewButtonServerProps,\n PreviewButtonServerPropsOnly,\n} from './elements/PreviewButton.js'\nexport type {\n PublishButtonClientProps,\n PublishButtonServerProps,\n PublishButtonServerPropsOnly,\n} from './elements/PublishButton.js'\nexport type {\n SaveButtonClientProps,\n SaveButtonServerProps,\n SaveButtonServerPropsOnly,\n} from './elements/SaveButton.js'\nexport type {\n SaveDraftButtonClientProps,\n SaveDraftButtonServerProps,\n SaveDraftButtonServerPropsOnly,\n} from './elements/SaveDraftButton.js'\nexport type { CustomStatus } from './elements/Status.js'\n\nexport type { Column } from './elements/Table.js'\n\nexport type {\n UnpublishButtonClientProps,\n UnpublishButtonServerProps,\n UnpublishButtonServerPropsOnly,\n} from './elements/UnpublishButton.js'\n\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldClientComponent,\n ArrayFieldClientProps,\n ArrayFieldDescriptionClientComponent,\n ArrayFieldDescriptionServerComponent,\n ArrayFieldDiffClientComponent,\n ArrayFieldDiffServerComponent,\n ArrayFieldErrorClientComponent,\n ArrayFieldErrorServerComponent,\n ArrayFieldLabelClientComponent,\n ArrayFieldLabelServerComponent,\n ArrayFieldServerComponent,\n ArrayFieldServerProps,\n} from './fields/Array.js'\n\nexport type {\n BlockRowLabelClientComponent,\n BlockRowLabelServerComponent,\n BlocksFieldClientComponent,\n BlocksFieldClientProps,\n BlocksFieldDescriptionClientComponent,\n BlocksFieldDescriptionServerComponent,\n BlocksFieldDiffClientComponent,\n BlocksFieldDiffServerComponent,\n BlocksFieldErrorClientComponent,\n BlocksFieldErrorServerComponent,\n BlocksFieldLabelClientComponent,\n BlocksFieldLabelServerComponent,\n BlocksFieldServerComponent,\n BlocksFieldServerProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldClientComponent,\n CheckboxFieldClientProps,\n CheckboxFieldDescriptionClientComponent,\n CheckboxFieldDescriptionServerComponent,\n CheckboxFieldDiffClientComponent,\n CheckboxFieldDiffServerComponent,\n CheckboxFieldErrorClientComponent,\n CheckboxFieldErrorServerComponent,\n CheckboxFieldLabelClientComponent,\n CheckboxFieldLabelServerComponent,\n CheckboxFieldServerComponent,\n CheckboxFieldServerProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldClientComponent,\n CodeFieldClientProps,\n CodeFieldDescriptionClientComponent,\n CodeFieldDescriptionServerComponent,\n CodeFieldDiffClientComponent,\n CodeFieldDiffServerComponent,\n CodeFieldErrorClientComponent,\n CodeFieldErrorServerComponent,\n CodeFieldLabelClientComponent,\n CodeFieldLabelServerComponent,\n CodeFieldServerComponent,\n CodeFieldServerProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldClientComponent,\n CollapsibleFieldClientProps,\n CollapsibleFieldDescriptionClientComponent,\n CollapsibleFieldDescriptionServerComponent,\n CollapsibleFieldDiffClientComponent,\n CollapsibleFieldDiffServerComponent,\n CollapsibleFieldErrorClientComponent,\n CollapsibleFieldErrorServerComponent,\n CollapsibleFieldLabelClientComponent,\n CollapsibleFieldLabelServerComponent,\n CollapsibleFieldServerComponent,\n CollapsibleFieldServerProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldClientComponent,\n DateFieldClientProps,\n DateFieldDescriptionClientComponent,\n DateFieldDescriptionServerComponent,\n DateFieldDiffClientComponent,\n DateFieldDiffServerComponent,\n DateFieldErrorClientComponent,\n DateFieldErrorServerComponent,\n DateFieldLabelClientComponent,\n DateFieldLabelServerComponent,\n DateFieldServerComponent,\n DateFieldServerProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldClientComponent,\n EmailFieldClientProps,\n EmailFieldDescriptionClientComponent,\n EmailFieldDescriptionServerComponent,\n EmailFieldDiffClientComponent,\n EmailFieldDiffServerComponent,\n EmailFieldErrorClientComponent,\n EmailFieldErrorServerComponent,\n EmailFieldLabelClientComponent,\n EmailFieldLabelServerComponent,\n EmailFieldServerComponent,\n EmailFieldServerProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldClientComponent,\n GroupFieldClientProps,\n GroupFieldDescriptionClientComponent,\n GroupFieldDescriptionServerComponent,\n GroupFieldDiffClientComponent,\n GroupFieldDiffServerComponent,\n GroupFieldErrorClientComponent,\n GroupFieldErrorServerComponent,\n GroupFieldLabelClientComponent,\n GroupFieldLabelServerComponent,\n GroupFieldServerComponent,\n GroupFieldServerProps,\n} from './fields/Group.js'\n\nexport type { HiddenFieldProps } from './fields/Hidden.js'\n\nexport type {\n JoinFieldClientComponent,\n JoinFieldClientProps,\n JoinFieldDescriptionClientComponent,\n JoinFieldDescriptionServerComponent,\n JoinFieldDiffClientComponent,\n JoinFieldDiffServerComponent,\n JoinFieldErrorClientComponent,\n JoinFieldErrorServerComponent,\n JoinFieldLabelClientComponent,\n JoinFieldLabelServerComponent,\n JoinFieldServerComponent,\n JoinFieldServerProps,\n} from './fields/Join.js'\n\nexport type {\n JSONFieldClientComponent,\n JSONFieldClientProps,\n JSONFieldDescriptionClientComponent,\n JSONFieldDescriptionServerComponent,\n JSONFieldDiffClientComponent,\n JSONFieldDiffServerComponent,\n JSONFieldErrorClientComponent,\n JSONFieldErrorServerComponent,\n JSONFieldLabelClientComponent,\n JSONFieldLabelServerComponent,\n JSONFieldServerComponent,\n JSONFieldServerProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldClientComponent,\n NumberFieldClientProps,\n NumberFieldDescriptionClientComponent,\n NumberFieldDescriptionServerComponent,\n NumberFieldDiffClientComponent,\n NumberFieldDiffServerComponent,\n NumberFieldErrorClientComponent,\n NumberFieldErrorServerComponent,\n NumberFieldLabelClientComponent,\n NumberFieldLabelServerComponent,\n NumberFieldServerComponent,\n NumberFieldServerProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldClientComponent,\n PointFieldClientProps,\n PointFieldDescriptionClientComponent,\n PointFieldDescriptionServerComponent,\n PointFieldDiffClientComponent,\n PointFieldDiffServerComponent,\n PointFieldErrorClientComponent,\n PointFieldErrorServerComponent,\n PointFieldLabelClientComponent,\n PointFieldLabelServerComponent,\n PointFieldServerComponent,\n PointFieldServerProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldClientComponent,\n RadioFieldClientProps,\n RadioFieldDescriptionClientComponent,\n RadioFieldDescriptionServerComponent,\n RadioFieldDiffClientComponent,\n RadioFieldDiffServerComponent,\n RadioFieldErrorClientComponent,\n RadioFieldErrorServerComponent,\n RadioFieldLabelClientComponent,\n RadioFieldLabelServerComponent,\n RadioFieldServerComponent,\n RadioFieldServerProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldClientComponent,\n RelationshipFieldClientProps,\n RelationshipFieldDescriptionClientComponent,\n RelationshipFieldDescriptionServerComponent,\n RelationshipFieldDiffClientComponent,\n RelationshipFieldDiffServerComponent,\n RelationshipFieldErrorClientComponent,\n RelationshipFieldErrorServerComponent,\n RelationshipFieldLabelClientComponent,\n RelationshipFieldLabelServerComponent,\n RelationshipFieldServerComponent,\n RelationshipFieldServerProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldClientComponent,\n RichTextFieldClientProps,\n RichTextFieldDescriptionClientComponent,\n RichTextFieldDescriptionServerComponent,\n RichTextFieldDiffClientComponent,\n RichTextFieldDiffServerComponent,\n RichTextFieldErrorClientComponent,\n RichTextFieldErrorServerComponent,\n RichTextFieldLabelClientComponent,\n RichTextFieldLabelServerComponent,\n RichTextFieldServerComponent,\n RichTextFieldServerProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldClientComponent,\n RowFieldClientProps,\n RowFieldDescriptionClientComponent,\n RowFieldDescriptionServerComponent,\n RowFieldDiffClientComponent,\n RowFieldDiffServerComponent,\n RowFieldErrorClientComponent,\n RowFieldErrorServerComponent,\n RowFieldLabelClientComponent,\n RowFieldLabelServerComponent,\n RowFieldServerComponent,\n RowFieldServerProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldClientComponent,\n SelectFieldClientProps,\n SelectFieldDescriptionClientComponent,\n SelectFieldDescriptionServerComponent,\n SelectFieldDiffClientComponent,\n SelectFieldDiffServerComponent,\n SelectFieldErrorClientComponent,\n SelectFieldErrorServerComponent,\n SelectFieldLabelClientComponent,\n SelectFieldLabelServerComponent,\n SelectFieldServerComponent,\n SelectFieldServerProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldClientComponent,\n TabsFieldClientProps,\n TabsFieldDescriptionClientComponent,\n TabsFieldDescriptionServerComponent,\n TabsFieldDiffClientComponent,\n TabsFieldDiffServerComponent,\n TabsFieldErrorClientComponent,\n TabsFieldErrorServerComponent,\n TabsFieldLabelClientComponent,\n TabsFieldLabelServerComponent,\n TabsFieldServerComponent,\n TabsFieldServerProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldClientComponent,\n TextFieldClientProps,\n TextFieldDescriptionClientComponent,\n TextFieldDescriptionServerComponent,\n TextFieldDiffClientComponent,\n TextFieldDiffServerComponent,\n TextFieldErrorClientComponent,\n TextFieldErrorServerComponent,\n TextFieldLabelClientComponent,\n TextFieldLabelServerComponent,\n TextFieldServerComponent,\n TextFieldServerProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldClientComponent,\n TextareaFieldClientProps,\n TextareaFieldDescriptionClientComponent,\n TextareaFieldDescriptionServerComponent,\n TextareaFieldDiffClientComponent,\n TextareaFieldDiffServerComponent,\n TextareaFieldErrorClientComponent,\n TextareaFieldErrorServerComponent,\n TextareaFieldLabelClientComponent,\n TextareaFieldLabelServerComponent,\n TextareaFieldServerComponent,\n TextareaFieldServerProps,\n} from './fields/Textarea.js'\n\nexport type {\n UIFieldClientComponent,\n UIFieldClientProps,\n UIFieldDiffClientComponent,\n UIFieldDiffServerComponent,\n UIFieldServerComponent,\n UIFieldServerProps,\n} from './fields/UI.js'\n\nexport type {\n UploadFieldClientComponent,\n UploadFieldClientProps,\n UploadFieldDescriptionClientComponent,\n UploadFieldDescriptionServerComponent,\n UploadFieldDiffClientComponent,\n UploadFieldDiffServerComponent,\n UploadFieldErrorClientComponent,\n UploadFieldErrorServerComponent,\n UploadFieldLabelClientComponent,\n UploadFieldLabelServerComponent,\n UploadFieldServerComponent,\n UploadFieldServerProps,\n} from './fields/Upload.js'\n\nexport type {\n Description,\n DescriptionFunction,\n FieldDescriptionClientComponent,\n FieldDescriptionClientProps,\n FieldDescriptionServerComponent,\n FieldDescriptionServerProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/Description.js'\n\nexport type {\n BaseVersionField,\n DiffMethod,\n FieldDiffClientComponent,\n FieldDiffClientProps,\n FieldDiffServerComponent,\n FieldDiffServerProps,\n VersionField,\n VersionTab,\n} from './forms/Diff.js'\n\nexport type {\n BuildFormStateArgs,\n Data,\n FieldState as FormField,\n FieldStateWithoutComponents as FormFieldWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n}\n\nexport type {\n FieldErrorClientComponent,\n FieldErrorClientProps,\n FieldErrorServerComponent,\n FieldErrorServerProps,\n GenericErrorProps,\n} from './forms/Error.js'\n\nexport type {\n ClientComponentProps,\n ClientFieldBase,\n ClientFieldWithOptionalType,\n FieldClientComponent,\n FieldPaths,\n FieldServerComponent,\n ServerComponentProps,\n ServerFieldBase,\n} from './forms/Field.js'\n\nexport type {\n FieldLabelClientComponent,\n FieldLabelClientProps,\n FieldLabelServerComponent,\n FieldLabelServerProps,\n GenericLabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<any>\n RenderedComponent: React.ReactNode\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n type: 'client'\n}\n\nexport type MappedEmptyComponent = {\n type: 'empty'\n}\n\nexport enum Action {\n RenderConfig = 'render-config',\n}\n\nexport type RenderEntityConfigArgs = {\n collectionSlug?: string\n data?: Data\n globalSlug?: string\n}\n\nexport type RenderRootConfigArgs = {}\n\nexport type RenderFieldConfigArgs = {\n collectionSlug?: string\n formState?: FormState\n globalSlug?: string\n schemaPath: string\n}\n\nexport type RenderConfigArgs = {\n action: Action.RenderConfig\n config: Promise<SanitizedConfig> | SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n languageCode: AcceptedLanguages\n serverProps?: any\n} & (RenderEntityConfigArgs | RenderFieldConfigArgs | RenderRootConfigArgs)\n\nexport type PayloadServerAction = (\n args:\n | {\n [key: string]: any\n action: Action\n i18n: I18nClient\n }\n | RenderConfigArgs,\n) => Promise<string>\n\nexport type RenderedField = {\n Field: React.ReactNode\n indexPath?: string\n initialSchemaPath?: string\n /**\n * @deprecated\n * This is a legacy property that will be removed in v4.\n * Please use `fieldIsSidebar(field)` from `payload` instead.\n * Or check `field.admin.position === 'sidebar'` directly.\n */\n isSidebar: boolean\n path: string\n schemaPath: string\n type: FieldTypes\n}\n\nexport type FieldRow = {\n RowLabel?: React.ReactNode\n}\n\nexport type DocumentSlots = {\n BeforeDocumentControls?: React.ReactNode\n BeforeDocumentMeta?: React.ReactNode\n Description?: React.ReactNode\n EditMenuItems?: React.ReactNode\n LivePreview?: React.ReactNode\n PreviewButton?: React.ReactNode\n PublishButton?: React.ReactNode\n SaveButton?: React.ReactNode\n SaveDraftButton?: React.ReactNode\n Status?: React.ReactNode\n UnpublishButton?: React.ReactNode\n Upload?: React.ReactNode\n UploadControls?: React.ReactNode\n UploadFilePreview?: React.ReactNode\n}\n\nexport type {\n BuildTableStateArgs,\n DefaultServerFunctionArgs,\n InitReqResult,\n ListQuery,\n ServerFunction,\n ServerFunctionArgs,\n ServerFunctionClient,\n ServerFunctionClientArgs,\n ServerFunctionConfig,\n ServerFunctionHandler,\n SlugifyServerFunctionArgs,\n} from './functions/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\n\nexport type { RichTextAdapter, RichTextAdapterProvider, RichTextHooks } from './RichText.js'\n\nexport { type WidgetServerProps } from './views/dashboard.js'\n\nexport type {\n BeforeDocumentControlsClientProps,\n BeforeDocumentControlsServerProps,\n BeforeDocumentControlsServerPropsOnly,\n DocumentSubViewTypes,\n DocumentTabClientProps,\n /**\n * @deprecated\n * The `DocumentTabComponent` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps`or `DocumentTabClientProps` instead.\n */\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n /**\n * @deprecated\n * The `DocumentTabProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentTabServerProps` instead.\n */\n DocumentTabServerProps as DocumentTabProps,\n DocumentTabServerProps,\n DocumentTabServerPropsOnly,\n /**\n * @deprecated\n * The `ClientSideEditViewProps` type is deprecated and will be removed in the next major version.\n * Use `DocumentViewClientProps` instead.\n */\n DocumentViewClientProps as ClientSideEditViewProps,\n DocumentViewClientProps,\n /**\n * @deprecated\n * The `ServerSideEditViewProps` is deprecated and will be removed in the next major version.\n * Use `DocumentViewServerProps` instead.\n */\n DocumentViewServerProps as ServerSideEditViewProps,\n DocumentViewServerProps,\n DocumentViewServerPropsOnly,\n EditViewProps,\n RenderDocumentVersionsProperties,\n} from './views/document.js'\n\nexport type { RelatedDocumentsGrouped } from './views/hierarchyList.js'\n\nexport type {\n AdminViewClientProps,\n /**\n * @deprecated\n * The `AdminViewComponent` type is deprecated and will be removed in the next major version.\n * Type your component props directly instead.\n */\n AdminViewComponent,\n AdminViewConfig,\n /**\n * @deprecated\n * The `AdminViewProps` type is deprecated and will be removed in the next major version.\n * Use `AdminViewServerProps` instead.\n */\n AdminViewServerProps as AdminViewProps,\n AdminViewServerProps,\n AdminViewServerPropsOnly,\n InitPageResult,\n ServerPropsFromView,\n ViewDescriptionClientProps,\n ViewDescriptionServerProps,\n ViewDescriptionServerPropsOnly,\n ViewTypes,\n VisibleEntities,\n} from './views/index.js'\n\nexport type {\n AfterListClientProps,\n AfterListServerProps,\n AfterListServerPropsOnly,\n AfterListTableClientProps,\n AfterListTableServerProps,\n AfterListTableServerPropsOnly,\n BeforeListClientProps,\n BeforeListServerProps,\n BeforeListServerPropsOnly,\n BeforeListTableClientProps,\n BeforeListTableServerProps,\n BeforeListTableServerPropsOnly,\n HierarchyViewData,\n ListViewClientProps,\n ListViewServerProps,\n ListViewServerPropsOnly,\n ListViewSlots,\n ListViewSlotSharedClientProps,\n NoResultsClientProps,\n NoResultsServerProps,\n NoResultsServerPropsOnly,\n} from './views/list.js'\n\ntype SchemaPath = {} & string\nexport type FieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: Field[]\n }\n | Block\n | Field\n | Tab\n>\n\nexport type ClientFieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: ClientField[]\n }\n | ClientBlock\n | ClientField\n | ClientTab\n>\n\nexport type DocumentEvent = {\n doc?: TypeWithID\n drawerSlug?: string\n entitySlug: string\n id?: number | string\n operation: 'create' | 'delete' | 'update'\n updatedAt: string\n}\n"],"names":["Action"],"mappings":"AAmgBA,OAAO,IAAA,AAAKA,gCAAAA;;WAAAA;MAEX"}
@@ -10,7 +10,7 @@ import type { LanguageOptions } from '../LanguageOptions.js';
10
10
  import type { Data, StaticDescription } from '../types.js';
11
11
  import type { DocumentSubViewTypes } from './document.js';
12
12
  export type AdminViewConfig = {
13
- Component: PayloadComponent;
13
+ Component: PayloadComponent<AdminViewServerProps>;
14
14
  /** Whether the path should be matched exactly or as a prefix */
15
15
  exact?: boolean;
16
16
  meta?: MetaConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/admin/views/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,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B,CAAA;IAC5C,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,eAAe,EAAE,eAAe,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,oBAAoB,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,cAAc,CAAA;IACnB,YAAY,EAAE,wBAAwB,CAAA;IACtC,eAAe,EAAE,eAAe,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,WAAW,GACX,MAAM,GACN,OAAO,GACP,OAAO,GACP,QAAQ,GACR,SAAS,GACT,CAAC,EAAE,GAAG,MAAM,CAAC,CAAA;AAEjB,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;IACzD,YAAY,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;IACjD,WAAW,EAAE,eAAe,EAAE,CAAA;CAC/B,CAAA;AAGD,MAAM,MAAM,0BAA0B,GAAG;IACvC,cAAc,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IAClD,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,EAAE,GAAG,WAAW,CAAA;AAE7D,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,GAAG,8BAA8B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/views/index.ts"],"sourcesContent":["import type { ClientTranslationsObject } from '@payloadcms/translations'\n\nimport type { SanitizedPermissions } from '../../auth/index.js'\nimport type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { ClientConfig } from '../../config/client.js'\nimport type {\n CustomComponent,\n Locale,\n MetaConfig,\n PayloadComponent,\n SanitizedConfig,\n ServerProps,\n} from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\nimport type { LanguageOptions } from '../LanguageOptions.js'\nimport type { Data, StaticDescription } from '../types.js'\nimport type { DocumentSubViewTypes } from './document.js'\n\nexport type AdminViewConfig = {\n Component: PayloadComponent\n /** Whether the path should be matched exactly or as a prefix */\n exact?: boolean\n meta?: MetaConfig\n /**\n * Any valid URL path or array of paths that [`path-to-regexp`](https://www.npmjs.com/package/path-to-regex) understands. Must begin with a forward slash (`/`).\n */\n path?: `/${string}`\n sensitive?: boolean\n strict?: boolean\n}\n\nexport type AdminViewClientProps = {\n clientConfig: ClientConfig\n collectionSlug?: SanitizedCollectionConfig['slug']\n docID?: number | string\n documentSubViewType?: DocumentSubViewTypes\n folderID?: number | string\n globalSlug?: SanitizedGlobalConfig['slug']\n viewType: ViewTypes\n}\n\nexport type AdminViewServerPropsOnly = {\n readonly clientConfig: ClientConfig\n readonly collectionConfig?: SanitizedCollectionConfig\n readonly disableActions?: boolean\n /**\n * @todo remove `docID` here as it is already contained in `initPageResult`\n */\n readonly docID?: number | string\n readonly globalConfig?: SanitizedGlobalConfig\n readonly importMap: ImportMap\n readonly initialData?: Data\n readonly initPageResult: InitPageResult\n readonly params?: { [key: string]: string | string[] | undefined }\n readonly redirectAfterCreate?: boolean\n readonly redirectAfterDelete?: boolean\n readonly redirectAfterDuplicate?: boolean\n readonly redirectAfterRestore?: boolean\n readonly viewActions?: CustomComponent[]\n} & ServerProps\n\nexport type AdminViewServerProps = AdminViewClientProps & AdminViewServerPropsOnly\n\n/**\n * @deprecated This should be removed in favor of direct props\n */\nexport type AdminViewComponent = PayloadComponent<AdminViewServerProps>\n\nexport type VisibleEntities = {\n collections: SanitizedCollectionConfig['slug'][]\n globals: SanitizedGlobalConfig['slug'][]\n}\n\nexport type InitPageResult = {\n collectionConfig?: SanitizedCollectionConfig\n cookies: Map<string, string>\n docID?: number | string\n globalConfig?: SanitizedGlobalConfig\n languageOptions: LanguageOptions\n locale?: Locale\n permissions: SanitizedPermissions\n redirectTo?: string\n req: PayloadRequest\n translations: ClientTranslationsObject\n visibleEntities: VisibleEntities\n}\n\n/**\n * @todo This should be renamed to `ViewType` (singular)\n */\nexport type ViewTypes =\n | 'account'\n | 'createFirstUser'\n | 'dashboard'\n | 'document'\n | 'hierarchy'\n | 'list'\n | 'reset'\n | 'trash'\n | 'verify'\n | 'version'\n | ({} & string)\n\nexport type ServerPropsFromView = {\n collectionConfig?: SanitizedConfig['collections'][number]\n globalConfig?: SanitizedConfig['globals'][number]\n viewActions: CustomComponent[]\n}\n\n// Description\nexport type ViewDescriptionClientProps = {\n collectionSlug?: SanitizedCollectionConfig['slug']\n description: StaticDescription\n}\n\nexport type ViewDescriptionServerPropsOnly = {} & ServerProps\n\nexport type ViewDescriptionServerProps = ViewDescriptionClientProps & ViewDescriptionServerPropsOnly\n"],"names":[],"mappings":"AAuHA,WAAoG"}
1
+ {"version":3,"sources":["../../../src/admin/views/index.ts"],"sourcesContent":["import type { ClientTranslationsObject } from '@payloadcms/translations'\n\nimport type { SanitizedPermissions } from '../../auth/index.js'\nimport type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { ClientConfig } from '../../config/client.js'\nimport type {\n CustomComponent,\n Locale,\n MetaConfig,\n PayloadComponent,\n SanitizedConfig,\n ServerProps,\n} from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\nimport type { LanguageOptions } from '../LanguageOptions.js'\nimport type { Data, StaticDescription } from '../types.js'\nimport type { DocumentSubViewTypes } from './document.js'\n\nexport type AdminViewConfig = {\n Component: PayloadComponent<AdminViewServerProps>\n /** Whether the path should be matched exactly or as a prefix */\n exact?: boolean\n meta?: MetaConfig\n /**\n * Any valid URL path or array of paths that [`path-to-regexp`](https://www.npmjs.com/package/path-to-regex) understands. Must begin with a forward slash (`/`).\n */\n path?: `/${string}`\n sensitive?: boolean\n strict?: boolean\n}\n\nexport type AdminViewClientProps = {\n clientConfig: ClientConfig\n collectionSlug?: SanitizedCollectionConfig['slug']\n docID?: number | string\n documentSubViewType?: DocumentSubViewTypes\n folderID?: number | string\n globalSlug?: SanitizedGlobalConfig['slug']\n viewType: ViewTypes\n}\n\nexport type AdminViewServerPropsOnly = {\n readonly clientConfig: ClientConfig\n readonly collectionConfig?: SanitizedCollectionConfig\n readonly disableActions?: boolean\n /**\n * @todo remove `docID` here as it is already contained in `initPageResult`\n */\n readonly docID?: number | string\n readonly globalConfig?: SanitizedGlobalConfig\n readonly importMap: ImportMap\n readonly initialData?: Data\n readonly initPageResult: InitPageResult\n readonly params?: { [key: string]: string | string[] | undefined }\n readonly redirectAfterCreate?: boolean\n readonly redirectAfterDelete?: boolean\n readonly redirectAfterDuplicate?: boolean\n readonly redirectAfterRestore?: boolean\n readonly viewActions?: CustomComponent[]\n} & ServerProps\n\nexport type AdminViewServerProps = AdminViewClientProps & AdminViewServerPropsOnly\n\n/**\n * @deprecated This should be removed in favor of direct props\n */\nexport type AdminViewComponent = PayloadComponent<AdminViewServerProps>\n\nexport type VisibleEntities = {\n collections: SanitizedCollectionConfig['slug'][]\n globals: SanitizedGlobalConfig['slug'][]\n}\n\nexport type InitPageResult = {\n collectionConfig?: SanitizedCollectionConfig\n cookies: Map<string, string>\n docID?: number | string\n globalConfig?: SanitizedGlobalConfig\n languageOptions: LanguageOptions\n locale?: Locale\n permissions: SanitizedPermissions\n redirectTo?: string\n req: PayloadRequest\n translations: ClientTranslationsObject\n visibleEntities: VisibleEntities\n}\n\n/**\n * @todo This should be renamed to `ViewType` (singular)\n */\nexport type ViewTypes =\n | 'account'\n | 'createFirstUser'\n | 'dashboard'\n | 'document'\n | 'hierarchy'\n | 'list'\n | 'reset'\n | 'trash'\n | 'verify'\n | 'version'\n | ({} & string)\n\nexport type ServerPropsFromView = {\n collectionConfig?: SanitizedConfig['collections'][number]\n globalConfig?: SanitizedConfig['globals'][number]\n viewActions: CustomComponent[]\n}\n\n// Description\nexport type ViewDescriptionClientProps = {\n collectionSlug?: SanitizedCollectionConfig['slug']\n description: StaticDescription\n}\n\nexport type ViewDescriptionServerPropsOnly = {} & ServerProps\n\nexport type ViewDescriptionServerProps = ViewDescriptionClientProps & ViewDescriptionServerPropsOnly\n"],"names":[],"mappings":"AAuHA,WAAoG"}
@@ -1 +1 @@
1
- {"version":3,"file":"apiKey.d.ts","sourceRoot":"","sources":["../../../src/auth/baseFields/apiKey.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAa,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAO9F,KAAK,2BAA2B,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;AAChF,KAAK,uBAAuB,GAAG,IAAI,CACjC,OAAO,CAAC,SAAS,CAAC,EAClB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CACjE,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,6EAKhC;IACD,WAAW,CAAC,EAAE,uBAAuB,CAAA;IACrC,gBAAgB,CAAC,EAAE,uBAAuB,CAAA;IAC1C,iBAAiB,CAAC,EAAE,2BAA2B,CAAA;IAC/C,mBAAmB,CAAC,EAAE,OAAO,CAAA;CACzB,KAAG,KAAK,EAwEb,CAAA"}
1
+ {"version":3,"file":"apiKey.d.ts","sourceRoot":"","sources":["../../../src/auth/baseFields/apiKey.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAa,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAqB9F,KAAK,2BAA2B,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;AAChF,KAAK,uBAAuB,GAAG,IAAI,CACjC,OAAO,CAAC,SAAS,CAAC,EAClB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CACjE,CAAA;AAED,eAAO,MAAM,kBAAkB,gFAK5B;IACD,WAAW,CAAC,EAAE,uBAAuB,CAAA;IACrC,gBAAgB,CAAC,EAAE,uBAAuB,CAAA;IAC1C,iBAAiB,CAAC,EAAE,2BAA2B,CAAA;IAC/C,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,KAAQ,KAAK,EAwEb,CAAA"}
@@ -1,6 +1,21 @@
1
1
  import crypto from 'crypto';
2
2
  const encryptKey = ({ req, value })=>value ? req.payload.encrypt(value) : null;
3
- const decryptKey = ({ req, value })=>value ? req.payload.decrypt(value) : undefined;
3
+ const decryptKey = ({ req, value })=>{
4
+ if (!value) {
5
+ return undefined;
6
+ }
7
+ try {
8
+ return req.payload.decrypt(value);
9
+ } catch {
10
+ // The value was encrypted under a secret no longer in the keyring (e.g. a
11
+ // previousSecret was removed before rotateSecret re-keyed this row). Mask the
12
+ // field (return null, since an undefined afterRead result is treated as "no
13
+ // change" and would leak the ciphertext) rather than failing the whole
14
+ // document read; API key auth is unaffected (it matches the apiKeyIndex), and
15
+ // running rotateSecret restores the displayed value.
16
+ return null;
17
+ }
18
+ };
4
19
  export const createAPIKeyFields = ({ apiKeyField, apiKeyIndexField, enableAPIKeyField, includeEnableAPIKey = true } = {})=>{
5
20
  const fields = [];
6
21
  if (includeEnableAPIKey) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/auth/baseFields/apiKey.ts"],"sourcesContent":["import crypto from 'crypto'\n\nimport type { CheckboxField, Field, FieldHook, TextField } from '../../fields/config/types.js'\n\nconst encryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.encrypt(value as string) : null\nconst decryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.decrypt(value as string) : undefined\n\ntype APIKeyCheckboxFieldOverride = Omit<Partial<CheckboxField>, 'name' | 'type'>\ntype APIKeyTextFieldOverride = Omit<\n Partial<TextField>,\n 'hasMany' | 'maxRows' | 'minRows' | 'name' | 'type' | 'validate'\n>\n\nexport const createAPIKeyFields = ({\n apiKeyField,\n apiKeyIndexField,\n enableAPIKeyField,\n includeEnableAPIKey = true,\n}: {\n apiKeyField?: APIKeyTextFieldOverride\n apiKeyIndexField?: APIKeyTextFieldOverride\n enableAPIKeyField?: APIKeyCheckboxFieldOverride\n includeEnableAPIKey?: boolean\n} = {}): Field[] => {\n const fields: Field[] = []\n\n if (includeEnableAPIKey) {\n fields.push({\n name: 'enableAPIKey',\n type: 'checkbox',\n ...enableAPIKeyField,\n admin: {\n components: {\n Field: false,\n },\n ...enableAPIKeyField?.admin,\n },\n label: enableAPIKeyField?.label ?? (({ t }) => t('authentication:enableAPIKey')),\n })\n }\n\n fields.push(\n {\n name: 'apiKey',\n type: 'text',\n ...apiKeyField,\n admin: {\n components: {\n Field: false,\n },\n ...apiKeyField?.admin,\n },\n hooks: {\n afterRead: [decryptKey],\n beforeChange: [encryptKey],\n ...apiKeyField?.hooks,\n },\n label: apiKeyField?.label ?? (({ t }) => t('authentication:apiKey')),\n },\n {\n name: 'apiKeyIndex',\n type: 'text',\n ...apiKeyIndexField,\n admin: {\n disabled: true,\n ...apiKeyIndexField?.admin,\n },\n hidden: apiKeyIndexField?.hidden ?? true,\n hooks: {\n beforeValidate: [\n ({ data, req, value }) => {\n if (data?.apiKey === false || data?.apiKey === null || data?.apiKey === '') {\n return null\n }\n if (\n includeEnableAPIKey &&\n (data?.enableAPIKey === false || data?.enableAPIKey === null)\n ) {\n return null\n }\n if (data?.apiKey) {\n return crypto\n .createHmac('sha256', req.payload.secret)\n .update(data.apiKey as string)\n .digest('hex')\n }\n return value\n },\n ],\n ...apiKeyIndexField?.hooks,\n },\n },\n )\n\n return fields\n}\n"],"names":["crypto","encryptKey","req","value","payload","encrypt","decryptKey","decrypt","undefined","createAPIKeyFields","apiKeyField","apiKeyIndexField","enableAPIKeyField","includeEnableAPIKey","fields","push","name","type","admin","components","Field","label","t","hooks","afterRead","beforeChange","disabled","hidden","beforeValidate","data","apiKey","enableAPIKey","createHmac","secret","update","digest"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAI3B,MAAMC,aAAwB,CAAC,EAAEC,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACC,OAAO,CAACF,SAAmB;AACjD,MAAMG,aAAwB,CAAC,EAAEJ,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACG,OAAO,CAACJ,SAAmBK;AAQjD,OAAO,MAAMC,qBAAqB,CAAC,EACjCC,WAAW,EACXC,gBAAgB,EAChBC,iBAAiB,EACjBC,sBAAsB,IAAI,EAM3B,GAAG,CAAC,CAAC;IACJ,MAAMC,SAAkB,EAAE;IAE1B,IAAID,qBAAqB;QACvBC,OAAOC,IAAI,CAAC;YACVC,MAAM;YACNC,MAAM;YACN,GAAGL,iBAAiB;YACpBM,OAAO;gBACLC,YAAY;oBACVC,OAAO;gBACT;gBACA,GAAGR,mBAAmBM,KAAK;YAC7B;YACAG,OAAOT,mBAAmBS,SAAU,CAAA,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE,8BAA6B;QAChF;IACF;IAEAR,OAAOC,IAAI,CACT;QACEC,MAAM;QACNC,MAAM;QACN,GAAGP,WAAW;QACdQ,OAAO;YACLC,YAAY;gBACVC,OAAO;YACT;YACA,GAAGV,aAAaQ,KAAK;QACvB;QACAK,OAAO;YACLC,WAAW;gBAAClB;aAAW;YACvBmB,cAAc;gBAACxB;aAAW;YAC1B,GAAGS,aAAaa,KAAK;QACvB;QACAF,OAAOX,aAAaW,SAAU,CAAA,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE,wBAAuB;IACpE,GACA;QACEN,MAAM;QACNC,MAAM;QACN,GAAGN,gBAAgB;QACnBO,OAAO;YACLQ,UAAU;YACV,GAAGf,kBAAkBO,KAAK;QAC5B;QACAS,QAAQhB,kBAAkBgB,UAAU;QACpCJ,OAAO;YACLK,gBAAgB;gBACd,CAAC,EAAEC,IAAI,EAAE3B,GAAG,EAAEC,KAAK,EAAE;oBACnB,IAAI0B,MAAMC,WAAW,SAASD,MAAMC,WAAW,QAAQD,MAAMC,WAAW,IAAI;wBAC1E,OAAO;oBACT;oBACA,IACEjB,uBACCgB,CAAAA,MAAME,iBAAiB,SAASF,MAAME,iBAAiB,IAAG,GAC3D;wBACA,OAAO;oBACT;oBACA,IAAIF,MAAMC,QAAQ;wBAChB,OAAO9B,OACJgC,UAAU,CAAC,UAAU9B,IAAIE,OAAO,CAAC6B,MAAM,EACvCC,MAAM,CAACL,KAAKC,MAAM,EAClBK,MAAM,CAAC;oBACZ;oBACA,OAAOhC;gBACT;aACD;YACD,GAAGQ,kBAAkBY,KAAK;QAC5B;IACF;IAGF,OAAOT;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/auth/baseFields/apiKey.ts"],"sourcesContent":["import crypto from 'crypto'\n\nimport type { CheckboxField, Field, FieldHook, TextField } from '../../fields/config/types.js'\n\nconst encryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.encrypt(value as string) : null\nconst decryptKey: FieldHook = ({ req, value }) => {\n if (!value) {\n return undefined\n }\n try {\n return req.payload.decrypt(value as string)\n } catch {\n // The value was encrypted under a secret no longer in the keyring (e.g. a\n // previousSecret was removed before rotateSecret re-keyed this row). Mask the\n // field (return null, since an undefined afterRead result is treated as \"no\n // change\" and would leak the ciphertext) rather than failing the whole\n // document read; API key auth is unaffected (it matches the apiKeyIndex), and\n // running rotateSecret restores the displayed value.\n return null\n }\n}\n\ntype APIKeyCheckboxFieldOverride = Omit<Partial<CheckboxField>, 'name' | 'type'>\ntype APIKeyTextFieldOverride = Omit<\n Partial<TextField>,\n 'hasMany' | 'maxRows' | 'minRows' | 'name' | 'type' | 'validate'\n>\n\nexport const createAPIKeyFields = ({\n apiKeyField,\n apiKeyIndexField,\n enableAPIKeyField,\n includeEnableAPIKey = true,\n}: {\n apiKeyField?: APIKeyTextFieldOverride\n apiKeyIndexField?: APIKeyTextFieldOverride\n enableAPIKeyField?: APIKeyCheckboxFieldOverride\n includeEnableAPIKey?: boolean\n} = {}): Field[] => {\n const fields: Field[] = []\n\n if (includeEnableAPIKey) {\n fields.push({\n name: 'enableAPIKey',\n type: 'checkbox',\n ...enableAPIKeyField,\n admin: {\n components: {\n Field: false,\n },\n ...enableAPIKeyField?.admin,\n },\n label: enableAPIKeyField?.label ?? (({ t }) => t('authentication:enableAPIKey')),\n })\n }\n\n fields.push(\n {\n name: 'apiKey',\n type: 'text',\n ...apiKeyField,\n admin: {\n components: {\n Field: false,\n },\n ...apiKeyField?.admin,\n },\n hooks: {\n afterRead: [decryptKey],\n beforeChange: [encryptKey],\n ...apiKeyField?.hooks,\n },\n label: apiKeyField?.label ?? (({ t }) => t('authentication:apiKey')),\n },\n {\n name: 'apiKeyIndex',\n type: 'text',\n ...apiKeyIndexField,\n admin: {\n disabled: true,\n ...apiKeyIndexField?.admin,\n },\n hidden: apiKeyIndexField?.hidden ?? true,\n hooks: {\n beforeValidate: [\n ({ data, req, value }) => {\n if (data?.apiKey === false || data?.apiKey === null || data?.apiKey === '') {\n return null\n }\n if (\n includeEnableAPIKey &&\n (data?.enableAPIKey === false || data?.enableAPIKey === null)\n ) {\n return null\n }\n if (data?.apiKey) {\n return crypto\n .createHmac('sha256', req.payload.secret)\n .update(data.apiKey as string)\n .digest('hex')\n }\n return value\n },\n ],\n ...apiKeyIndexField?.hooks,\n },\n },\n )\n\n return fields\n}\n"],"names":["crypto","encryptKey","req","value","payload","encrypt","decryptKey","undefined","decrypt","createAPIKeyFields","apiKeyField","apiKeyIndexField","enableAPIKeyField","includeEnableAPIKey","fields","push","name","type","admin","components","Field","label","t","hooks","afterRead","beforeChange","disabled","hidden","beforeValidate","data","apiKey","enableAPIKey","createHmac","secret","update","digest"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAI3B,MAAMC,aAAwB,CAAC,EAAEC,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACC,OAAO,CAACF,SAAmB;AACjD,MAAMG,aAAwB,CAAC,EAAEJ,GAAG,EAAEC,KAAK,EAAE;IAC3C,IAAI,CAACA,OAAO;QACV,OAAOI;IACT;IACA,IAAI;QACF,OAAOL,IAAIE,OAAO,CAACI,OAAO,CAACL;IAC7B,EAAE,OAAM;QACN,0EAA0E;QAC1E,8EAA8E;QAC9E,4EAA4E;QAC5E,uEAAuE;QACvE,8EAA8E;QAC9E,qDAAqD;QACrD,OAAO;IACT;AACF;AAQA,OAAO,MAAMM,qBAAqB,CAAC,EACjCC,WAAW,EACXC,gBAAgB,EAChBC,iBAAiB,EACjBC,sBAAsB,IAAI,EAM3B,GAAG,CAAC,CAAC;IACJ,MAAMC,SAAkB,EAAE;IAE1B,IAAID,qBAAqB;QACvBC,OAAOC,IAAI,CAAC;YACVC,MAAM;YACNC,MAAM;YACN,GAAGL,iBAAiB;YACpBM,OAAO;gBACLC,YAAY;oBACVC,OAAO;gBACT;gBACA,GAAGR,mBAAmBM,KAAK;YAC7B;YACAG,OAAOT,mBAAmBS,SAAU,CAAA,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE,8BAA6B;QAChF;IACF;IAEAR,OAAOC,IAAI,CACT;QACEC,MAAM;QACNC,MAAM;QACN,GAAGP,WAAW;QACdQ,OAAO;YACLC,YAAY;gBACVC,OAAO;YACT;YACA,GAAGV,aAAaQ,KAAK;QACvB;QACAK,OAAO;YACLC,WAAW;gBAAClB;aAAW;YACvBmB,cAAc;gBAACxB;aAAW;YAC1B,GAAGS,aAAaa,KAAK;QACvB;QACAF,OAAOX,aAAaW,SAAU,CAAA,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE,wBAAuB;IACpE,GACA;QACEN,MAAM;QACNC,MAAM;QACN,GAAGN,gBAAgB;QACnBO,OAAO;YACLQ,UAAU;YACV,GAAGf,kBAAkBO,KAAK;QAC5B;QACAS,QAAQhB,kBAAkBgB,UAAU;QACpCJ,OAAO;YACLK,gBAAgB;gBACd,CAAC,EAAEC,IAAI,EAAE3B,GAAG,EAAEC,KAAK,EAAE;oBACnB,IAAI0B,MAAMC,WAAW,SAASD,MAAMC,WAAW,QAAQD,MAAMC,WAAW,IAAI;wBAC1E,OAAO;oBACT;oBACA,IACEjB,uBACCgB,CAAAA,MAAME,iBAAiB,SAASF,MAAME,iBAAiB,IAAG,GAC3D;wBACA,OAAO;oBACT;oBACA,IAAIF,MAAMC,QAAQ;wBAChB,OAAO9B,OACJgC,UAAU,CAAC,UAAU9B,IAAIE,OAAO,CAAC6B,MAAM,EACvCC,MAAM,CAACL,KAAKC,MAAM,EAClBK,MAAM,CAAC;oBACZ;oBACA,OAAOhC;gBACT;aACD;YACD,GAAGQ,kBAAkBY,KAAK;QAC5B;IACF;IAGF,OAAOT;AACT,EAAC"}
@@ -33,8 +33,8 @@ type GeneratePayloadCookieArgs = {
33
33
  returnCookieAsObject?: boolean;
34
34
  token: string;
35
35
  };
36
- export declare const generatePayloadCookie: <T extends GeneratePayloadCookieArgs>({ collectionAuthConfig, cookiePrefix, returnCookieAsObject, token, }: T) => T["returnCookieAsObject"] extends true ? CookieObject : string;
37
- export declare const generateExpiredPayloadCookie: <T extends Omit<GeneratePayloadCookieArgs, "token">>({ collectionAuthConfig, cookiePrefix, returnCookieAsObject, }: T) => T["returnCookieAsObject"] extends true ? CookieObject : string;
36
+ export declare const generatePayloadCookie: <T extends GeneratePayloadCookieArgs>({ collectionAuthConfig, cookiePrefix, returnCookieAsObject, token, }: T) => T['returnCookieAsObject'] extends true ? CookieObject : string;
37
+ export declare const generateExpiredPayloadCookie: <T extends Omit<GeneratePayloadCookieArgs, 'token'>>({ collectionAuthConfig, cookiePrefix, returnCookieAsObject, }: T) => T['returnCookieAsObject'] extends true ? CookieObject : string;
38
38
  export declare function parseCookies(headers: Request['headers']): Map<string, string>;
39
39
  export {};
40
40
  //# sourceMappingURL=cookies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../../src/auth/cookies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAEjF,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oBAAoB,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;IACpC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;IACpC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,oBAAoB,GAAG,OAAO,EAC3D,MAAM,aAAa,KAClB,oBAAoB,SAAS,IAAI,GAAG,YAAY,GAAG,MAiFrD,CAAA;A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C,uBA8CvD"}
@@ -1,3 +1,74 @@
1
- export declare function encrypt(text: string): string;
2
- export declare function decrypt(hash: string): string;
1
+ /**
2
+ * A single secret in the keyring, with its derived keys precomputed.
3
+ */
4
+ export type EncryptionKey = {
5
+ /** One-way fingerprint of `v1Key` (16 hex chars), stored in the v1 envelope. */
6
+ keyId: string;
7
+ /** Legacy 32-char key for aes-256-ctr and the apiKey HMAC index. */
8
+ legacyKey: string;
9
+ /** The raw `PAYLOAD_SECRET` string. */
10
+ secret: string;
11
+ /** True 32-byte key (HKDF) for the aes-256-gcm v1 envelope. */
12
+ v1Key: Buffer;
13
+ };
14
+ /**
15
+ * The set of secrets Payload accepts. `active` is used for all writes; every
16
+ * entry (active + `previousSecrets`) is accepted for reads.
17
+ */
18
+ export type EncryptionKeyring = {
19
+ /** Entry used for all new writes (the current `PAYLOAD_SECRET`). */
20
+ active: EncryptionKey;
21
+ all: EncryptionKey[];
22
+ /** keyId -> entry, for O(1) v1 key selection. */
23
+ byId: Record<string, EncryptionKey>;
24
+ };
25
+ type CryptoContext = {
26
+ encryptionKeyring: EncryptionKeyring;
27
+ secret: string;
28
+ };
29
+ /**
30
+ * Legacy key derivation (pre-v1 aes-256-ctr values and the apiKey HMAC index).
31
+ * Kept in sync with `BasePayload.secret`.
32
+ */
33
+ export declare const deriveSecretKey: (secret: string) => string;
34
+ /**
35
+ * v1 key derivation: a true 32-byte key via HKDF, correcting the reduced
36
+ * effective entropy of the legacy derivation.
37
+ */
38
+ export declare const deriveKeyV1: (secret: string) => Buffer;
39
+ /** Non-secret fingerprint of a v1 key, used to select the key on decrypt. */
40
+ export declare const keyIdFor: (v1Key: Buffer) => string;
41
+ export declare const buildEncryptionKey: (secret: string) => EncryptionKey;
42
+ /**
43
+ * Builds the keyring from the active secret followed by any previous secrets.
44
+ * The first entry is the active (writing) key.
45
+ */
46
+ export declare const buildEncryptionKeyring: (secrets: string[]) => EncryptionKeyring;
47
+ /**
48
+ * Encrypts `text` under the active secret using the versioned aes-256-gcm
49
+ * envelope `v1:<keyId>:<iv>:<authTag>:<ciphertext>`. Pass `options.secret` (the
50
+ * raw `PAYLOAD_SECRET`) to encrypt under a specific secret instead.
51
+ */
52
+ export declare function encrypt(this: CryptoContext, text: string, options?: {
53
+ secret?: string;
54
+ }): string;
55
+ /**
56
+ * Decrypts a value produced by {@link encrypt}. Dispatches on format: v1
57
+ * envelopes are authenticated (aes-256-gcm) and select their key by keyId from
58
+ * the keyring; pre-v1 values fall back to aes-256-ctr. Pass `options.secret` to
59
+ * decrypt under a specific secret (e.g. to read data encrypted under a previous
60
+ * secret during a rotation).
61
+ */
62
+ export declare function decrypt(this: CryptoContext, hash: string, options?: {
63
+ secret?: string;
64
+ }): string;
65
+ /**
66
+ * Re-encrypts a value that was encrypted under a previous secret: decrypts it
67
+ * with `options.oldSecret`, then re-encrypts it with the active secret. Also
68
+ * upgrades a legacy aes-256-ctr value to the v1 envelope.
69
+ */
70
+ export declare function reencrypt(this: CryptoContext, hash: string, options: {
71
+ oldSecret: string;
72
+ }): string;
73
+ export {};
3
74
  //# sourceMappingURL=crypto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/auth/crypto.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU5C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAS5C"}
1
+ {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/auth/crypto.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAA;IACd,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;GAGG;AACH,MA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(16);
5
- // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve
6
- const secret = this.secret;
7
- const cipher = crypto.createCipheriv(algorithm, secret, iv);
8
- const encrypted = cipher.update(text, 'utf8', 'hex') + cipher.final('hex');
9
- const ivString = iv.toString('hex');
10
- return `${ivString}${encrypted}`;
2
+ const legacyAlgorithm = 'aes-256-ctr';
3
+ const v1Algorithm = 'aes-256-gcm';
4
+ const v1Prefix = 'v1';
5
+ /**
6
+ * Legacy key derivation (pre-v1 aes-256-ctr values and the apiKey HMAC index).
7
+ * Kept in sync with `BasePayload.secret`.
8
+ */ export const deriveSecretKey = (secret)=>crypto.createHash('sha256').update(secret).digest('hex').slice(0, 32);
9
+ /**
10
+ * v1 key derivation: a true 32-byte key via HKDF, correcting the reduced
11
+ * effective entropy of the legacy derivation.
12
+ */ export const deriveKeyV1 = (secret)=>Buffer.from(crypto.hkdfSync('sha256', secret, '', 'payload-secret-v1', 32));
13
+ /** Non-secret fingerprint of a v1 key, used to select the key on decrypt. */ export const keyIdFor = (v1Key)=>crypto.createHash('sha256').update(v1Key).digest('hex').slice(0, 16);
14
+ export const buildEncryptionKey = (secret)=>{
15
+ const v1Key = deriveKeyV1(secret);
16
+ return {
17
+ keyId: keyIdFor(v1Key),
18
+ legacyKey: deriveSecretKey(secret),
19
+ secret,
20
+ v1Key
21
+ };
22
+ };
23
+ /**
24
+ * Builds the keyring from the active secret followed by any previous secrets.
25
+ * The first entry is the active (writing) key.
26
+ */ export const buildEncryptionKeyring = (secrets)=>{
27
+ const all = secrets.map(buildEncryptionKey);
28
+ const byId = {};
29
+ for (const key of all){
30
+ // First writer wins if two secrets somehow share a keyId.
31
+ if (!byId[key.keyId]) {
32
+ byId[key.keyId] = key;
33
+ }
34
+ }
35
+ return {
36
+ active: all[0],
37
+ all,
38
+ byId
39
+ };
40
+ };
41
+ /**
42
+ * Encrypts `text` under the active secret using the versioned aes-256-gcm
43
+ * envelope `v1:<keyId>:<iv>:<authTag>:<ciphertext>`. Pass `options.secret` (the
44
+ * raw `PAYLOAD_SECRET`) to encrypt under a specific secret instead.
45
+ */ export function encrypt(text, options) {
46
+ const key = options?.secret ? buildEncryptionKey(options.secret) : this.encryptionKeyring.active;
47
+ const iv = crypto.randomBytes(12);
48
+ const cipher = crypto.createCipheriv(v1Algorithm, key.v1Key, iv);
49
+ const ciphertext = cipher.update(text, 'utf8', 'hex') + cipher.final('hex');
50
+ const authTag = cipher.getAuthTag().toString('hex');
51
+ return `${v1Prefix}:${key.keyId}:${iv.toString('hex')}:${authTag}:${ciphertext}`;
11
52
  }
12
- export function decrypt(hash) {
53
+ /**
54
+ * Decrypts a value produced by {@link encrypt}. Dispatches on format: v1
55
+ * envelopes are authenticated (aes-256-gcm) and select their key by keyId from
56
+ * the keyring; pre-v1 values fall back to aes-256-ctr. Pass `options.secret` to
57
+ * decrypt under a specific secret (e.g. to read data encrypted under a previous
58
+ * secret during a rotation).
59
+ */ export function decrypt(hash, options) {
60
+ if (hash.startsWith(`${v1Prefix}:`)) {
61
+ const parts = hash.split(':');
62
+ if (parts.length !== 5) {
63
+ throw new Error('decrypt: malformed v1 envelope, expected "v1:keyId:iv:authTag:ciphertext".');
64
+ }
65
+ const [, keyId, ivHex, authTagHex, ciphertext] = parts;
66
+ const key = options?.secret ? buildEncryptionKey(options.secret) : this.encryptionKeyring.byId[keyId];
67
+ if (!key) {
68
+ throw new Error(`decrypt: no secret in the keyring matches key id "${keyId}". Add the secret that encrypted this value to config.previousSecrets.`);
69
+ }
70
+ const decipher = crypto.createDecipheriv(v1Algorithm, key.v1Key, Buffer.from(ivHex, 'hex'));
71
+ decipher.setAuthTag(Buffer.from(authTagHex, 'hex'));
72
+ // final() throws on a wrong key or tampered ciphertext.
73
+ return decipher.update(ciphertext, 'hex', 'utf8') + decipher.final('utf8');
74
+ }
75
+ // Legacy aes-256-ctr is unauthenticated, so it cannot verify a key and a wrong
76
+ // key returns garbage instead of throwing. We therefore intentionally use only
77
+ // the explicit or active key here (never trial the keyring): a legacy value
78
+ // written under a previous secret decrypts to garbage until rotateSecret
79
+ // upgrades it to the authenticated v1 envelope. API key auth is unaffected
80
+ // (it matches the HMAC apiKeyIndex, which is keyring-aware).
81
+ const legacyKey = options?.secret ? deriveSecretKey(options.secret) : this.secret;
13
82
  const iv = hash.slice(0, 32);
14
83
  const content = hash.slice(32);
15
- // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve
16
- const secret = this.secret;
17
- const decipher = crypto.createDecipheriv(algorithm, secret, Buffer.from(iv, 'hex'));
84
+ const decipher = crypto.createDecipheriv(legacyAlgorithm, legacyKey, Buffer.from(iv, 'hex'));
18
85
  return decipher.update(content, 'hex', 'utf8') + decipher.final('utf8');
19
86
  }
87
+ /**
88
+ * Re-encrypts a value that was encrypted under a previous secret: decrypts it
89
+ * with `options.oldSecret`, then re-encrypts it with the active secret. Also
90
+ * upgrades a legacy aes-256-ctr value to the v1 envelope.
91
+ */ export function reencrypt(hash, options) {
92
+ const plaintext = decrypt.call(this, hash, {
93
+ secret: options.oldSecret
94
+ });
95
+ return encrypt.call(this, plaintext);
96
+ }
20
97
 
21
98
  //# sourceMappingURL=crypto.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/auth/crypto.ts"],"sourcesContent":["import crypto from 'crypto'\n\nconst algorithm = 'aes-256-ctr'\n\nexport function encrypt(text: string): string {\n const iv = crypto.randomBytes(16)\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n const secret = this.secret\n const cipher = crypto.createCipheriv(algorithm, secret, iv)\n\n const encrypted = cipher.update(text, 'utf8', 'hex') + cipher.final('hex')\n const ivString = iv.toString('hex')\n\n return `${ivString}${encrypted}`\n}\n\nexport function decrypt(hash: string): string {\n const iv = hash.slice(0, 32)\n const content = hash.slice(32)\n\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n const secret = this.secret\n const decipher = crypto.createDecipheriv(algorithm, secret, Buffer.from(iv, 'hex'))\n\n return decipher.update(content, 'hex', 'utf8') + decipher.final('utf8')\n}\n"],"names":["crypto","algorithm","encrypt","text","iv","randomBytes","secret","cipher","createCipheriv","encrypted","update","final","ivString","toString","decrypt","hash","slice","content","decipher","createDecipheriv","Buffer","from"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAE3B,MAAMC,YAAY;AAElB,OAAO,SAASC,QAAQC,IAAY;IAClC,MAAMC,KAAKJ,OAAOK,WAAW,CAAC;IAC9B,oFAAoF;IACpF,MAAMC,SAAS,IAAI,CAACA,MAAM;IAC1B,MAAMC,SAASP,OAAOQ,cAAc,CAACP,WAAWK,QAAQF;IAExD,MAAMK,YAAYF,OAAOG,MAAM,CAACP,MAAM,QAAQ,SAASI,OAAOI,KAAK,CAAC;IACpE,MAAMC,WAAWR,GAAGS,QAAQ,CAAC;IAE7B,OAAO,GAAGD,WAAWH,WAAW;AAClC;AAEA,OAAO,SAASK,QAAQC,IAAY;IAClC,MAAMX,KAAKW,KAAKC,KAAK,CAAC,GAAG;IACzB,MAAMC,UAAUF,KAAKC,KAAK,CAAC;IAE3B,oFAAoF;IACpF,MAAMV,SAAS,IAAI,CAACA,MAAM;IAC1B,MAAMY,WAAWlB,OAAOmB,gBAAgB,CAAClB,WAAWK,QAAQc,OAAOC,IAAI,CAACjB,IAAI;IAE5E,OAAOc,SAASR,MAAM,CAACO,SAAS,OAAO,UAAUC,SAASP,KAAK,CAAC;AAClE"}
1
+ {"version":3,"sources":["../../src/auth/crypto.ts"],"sourcesContent":["import crypto from 'crypto'\n\n/**\n * A single secret in the keyring, with its derived keys precomputed.\n */\nexport type EncryptionKey = {\n /** One-way fingerprint of `v1Key` (16 hex chars), stored in the v1 envelope. */\n keyId: string\n /** Legacy 32-char key for aes-256-ctr and the apiKey HMAC index. */\n legacyKey: string\n /** The raw `PAYLOAD_SECRET` string. */\n secret: string\n /** True 32-byte key (HKDF) for the aes-256-gcm v1 envelope. */\n v1Key: Buffer\n}\n\n/**\n * The set of secrets Payload accepts. `active` is used for all writes; every\n * entry (active + `previousSecrets`) is accepted for reads.\n */\nexport type EncryptionKeyring = {\n /** Entry used for all new writes (the current `PAYLOAD_SECRET`). */\n active: EncryptionKey\n all: EncryptionKey[]\n /** keyId -> entry, for O(1) v1 key selection. */\n byId: Record<string, EncryptionKey>\n}\n\ntype CryptoContext = {\n encryptionKeyring: EncryptionKeyring\n secret: string\n}\n\nconst legacyAlgorithm = 'aes-256-ctr'\nconst v1Algorithm = 'aes-256-gcm'\nconst v1Prefix = 'v1'\n\n/**\n * Legacy key derivation (pre-v1 aes-256-ctr values and the apiKey HMAC index).\n * Kept in sync with `BasePayload.secret`.\n */\nexport const deriveSecretKey = (secret: string): string =>\n crypto.createHash('sha256').update(secret).digest('hex').slice(0, 32)\n\n/**\n * v1 key derivation: a true 32-byte key via HKDF, correcting the reduced\n * effective entropy of the legacy derivation.\n */\nexport const deriveKeyV1 = (secret: string): Buffer =>\n Buffer.from(crypto.hkdfSync('sha256', secret, '', 'payload-secret-v1', 32))\n\n/** Non-secret fingerprint of a v1 key, used to select the key on decrypt. */\nexport const keyIdFor = (v1Key: Buffer): string =>\n crypto.createHash('sha256').update(v1Key).digest('hex').slice(0, 16)\n\nexport const buildEncryptionKey = (secret: string): EncryptionKey => {\n const v1Key = deriveKeyV1(secret)\n return {\n keyId: keyIdFor(v1Key),\n legacyKey: deriveSecretKey(secret),\n secret,\n v1Key,\n }\n}\n\n/**\n * Builds the keyring from the active secret followed by any previous secrets.\n * The first entry is the active (writing) key.\n */\nexport const buildEncryptionKeyring = (secrets: string[]): EncryptionKeyring => {\n const all = secrets.map(buildEncryptionKey)\n const byId: Record<string, EncryptionKey> = {}\n for (const key of all) {\n // First writer wins if two secrets somehow share a keyId.\n if (!byId[key.keyId]) {\n byId[key.keyId] = key\n }\n }\n return { active: all[0]!, all, byId }\n}\n\n/**\n * Encrypts `text` under the active secret using the versioned aes-256-gcm\n * envelope `v1:<keyId>:<iv>:<authTag>:<ciphertext>`. Pass `options.secret` (the\n * raw `PAYLOAD_SECRET`) to encrypt under a specific secret instead.\n */\nexport function encrypt(this: CryptoContext, text: string, options?: { secret?: string }): string {\n const key = options?.secret ? buildEncryptionKey(options.secret) : this.encryptionKeyring.active\n\n const iv = crypto.randomBytes(12)\n const cipher = crypto.createCipheriv(v1Algorithm, key.v1Key, iv)\n\n const ciphertext = cipher.update(text, 'utf8', 'hex') + cipher.final('hex')\n const authTag = cipher.getAuthTag().toString('hex')\n\n return `${v1Prefix}:${key.keyId}:${iv.toString('hex')}:${authTag}:${ciphertext}`\n}\n\n/**\n * Decrypts a value produced by {@link encrypt}. Dispatches on format: v1\n * envelopes are authenticated (aes-256-gcm) and select their key by keyId from\n * the keyring; pre-v1 values fall back to aes-256-ctr. Pass `options.secret` to\n * decrypt under a specific secret (e.g. to read data encrypted under a previous\n * secret during a rotation).\n */\nexport function decrypt(this: CryptoContext, hash: string, options?: { secret?: string }): string {\n if (hash.startsWith(`${v1Prefix}:`)) {\n const parts = hash.split(':')\n\n if (parts.length !== 5) {\n throw new Error('decrypt: malformed v1 envelope, expected \"v1:keyId:iv:authTag:ciphertext\".')\n }\n\n const [, keyId, ivHex, authTagHex, ciphertext] = parts\n\n const key = options?.secret\n ? buildEncryptionKey(options.secret)\n : this.encryptionKeyring.byId[keyId!]\n\n if (!key) {\n throw new Error(\n `decrypt: no secret in the keyring matches key id \"${keyId}\". Add the secret that encrypted this value to config.previousSecrets.`,\n )\n }\n\n const decipher = crypto.createDecipheriv(v1Algorithm, key.v1Key, Buffer.from(ivHex!, 'hex'))\n decipher.setAuthTag(Buffer.from(authTagHex!, 'hex'))\n\n // final() throws on a wrong key or tampered ciphertext.\n return decipher.update(ciphertext!, 'hex', 'utf8') + decipher.final('utf8')\n }\n\n // Legacy aes-256-ctr is unauthenticated, so it cannot verify a key and a wrong\n // key returns garbage instead of throwing. We therefore intentionally use only\n // the explicit or active key here (never trial the keyring): a legacy value\n // written under a previous secret decrypts to garbage until rotateSecret\n // upgrades it to the authenticated v1 envelope. API key auth is unaffected\n // (it matches the HMAC apiKeyIndex, which is keyring-aware).\n const legacyKey = options?.secret ? deriveSecretKey(options.secret) : this.secret\n const iv = hash.slice(0, 32)\n const content = hash.slice(32)\n const decipher = crypto.createDecipheriv(legacyAlgorithm, legacyKey, Buffer.from(iv, 'hex'))\n\n return decipher.update(content, 'hex', 'utf8') + decipher.final('utf8')\n}\n\n/**\n * Re-encrypts a value that was encrypted under a previous secret: decrypts it\n * with `options.oldSecret`, then re-encrypts it with the active secret. Also\n * upgrades a legacy aes-256-ctr value to the v1 envelope.\n */\nexport function reencrypt(\n this: CryptoContext,\n hash: string,\n options: { oldSecret: string },\n): string {\n const plaintext = decrypt.call(this, hash, { secret: options.oldSecret })\n return encrypt.call(this, plaintext)\n}\n"],"names":["crypto","legacyAlgorithm","v1Algorithm","v1Prefix","deriveSecretKey","secret","createHash","update","digest","slice","deriveKeyV1","Buffer","from","hkdfSync","keyIdFor","v1Key","buildEncryptionKey","keyId","legacyKey","buildEncryptionKeyring","secrets","all","map","byId","key","active","encrypt","text","options","encryptionKeyring","iv","randomBytes","cipher","createCipheriv","ciphertext","final","authTag","getAuthTag","toString","decrypt","hash","startsWith","parts","split","length","Error","ivHex","authTagHex","decipher","createDecipheriv","setAuthTag","content","reencrypt","plaintext","call","oldSecret"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAiC3B,MAAMC,kBAAkB;AACxB,MAAMC,cAAc;AACpB,MAAMC,WAAW;AAEjB;;;CAGC,GACD,OAAO,MAAMC,kBAAkB,CAACC,SAC9BL,OAAOM,UAAU,CAAC,UAAUC,MAAM,CAACF,QAAQG,MAAM,CAAC,OAAOC,KAAK,CAAC,GAAG,IAAG;AAEvE;;;CAGC,GACD,OAAO,MAAMC,cAAc,CAACL,SAC1BM,OAAOC,IAAI,CAACZ,OAAOa,QAAQ,CAAC,UAAUR,QAAQ,IAAI,qBAAqB,KAAI;AAE7E,2EAA2E,GAC3E,OAAO,MAAMS,WAAW,CAACC,QACvBf,OAAOM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AAM;QAAEnC,QAAQuB,QAAQ2B,SAAS;IAAC;IACvE,OAAO7B,QAAQ4B,IAAI,CAAC,IAAI,EAAED;AAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultAccess.d.ts","sourceRoot":"","sources":["../../src/auth/defaultAccess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,eAAO,MAAM,aAAa,GAAI,4BAA4B;IAAE,GAAG,EAAE,cAAc,CAAA;CAAE,KAAG,OACnB,CAAA"}
1
+ {"version":3,"file":"defaultAccess.d.ts","sourceRoot":"","sources":["../../src/auth/defaultAccess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,eAAO,MAAM,aAAa,+BAAgC;IAAE,GAAG,EAAE,cAAc,CAAA;CAAE,KAAG,OACnB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/auth/endpoints/login.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAQ3D,eAAO,MAAM,YAAY,EAAE,cAgD1B,CAAA"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/auth/endpoints/login.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,YAAY,EAAE,cAsC1B,CAAA"}
@@ -2,8 +2,7 @@ import { status as httpStatus } from 'http-status';
2
2
  import { getRequestCollection } from '../../utilities/getRequestEntity.js';
3
3
  import { headersWithCors } from '../../utilities/headersWithCors.js';
4
4
  import { isNumber } from '../../utilities/isNumber.js';
5
- import { generatePayloadCookie } from '../cookies.js';
6
- import { loginOperation } from '../operations/login.js';
5
+ import { loginWithCookie } from '../loginWithCookie.js';
7
6
  export const loginHandler = async (req)=>{
8
7
  const collection = getRequestCollection(req);
9
8
  const { searchParams, t } = req;
@@ -16,20 +15,12 @@ export const loginHandler = async (req)=>{
16
15
  email: typeof req.data?.email === 'string' ? req.data.email : '',
17
16
  password: typeof req.data?.password === 'string' ? req.data.password : ''
18
17
  };
19
- const result = await loginOperation({
18
+ const { cookie, result } = await loginWithCookie({
20
19
  collection,
21
20
  data: authData,
22
21
  depth: isNumber(depth) ? Number(depth) : undefined,
23
22
  req
24
23
  });
25
- const cookie = generatePayloadCookie({
26
- collectionAuthConfig: collection.config.auth,
27
- cookiePrefix: req.payload.config.cookiePrefix,
28
- token: result.token
29
- });
30
- if (collection.config.auth.removeTokenFromResponses) {
31
- delete result.token;
32
- }
33
24
  return Response.json({
34
25
  message: t('authentication:passed'),
35
26
  ...result
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/auth/endpoints/login.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\n\nimport { getRequestCollection } from '../../utilities/getRequestEntity.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { isNumber } from '../../utilities/isNumber.js'\nimport { generatePayloadCookie } from '../cookies.js'\nimport { loginOperation } from '../operations/login.js'\n\nexport const loginHandler: PayloadHandler = async (req) => {\n const collection = getRequestCollection(req)\n const { searchParams, t } = req\n const depth = searchParams.get('depth')\n const authData =\n collection.config.auth?.loginWithUsername !== false\n ? {\n email: typeof req.data?.email === 'string' ? req.data.email : '',\n password: typeof req.data?.password === 'string' ? req.data.password : '',\n username: typeof req.data?.username === 'string' ? req.data.username : '',\n }\n : {\n email: typeof req.data?.email === 'string' ? req.data.email : '',\n password: typeof req.data?.password === 'string' ? req.data.password : '',\n }\n\n const result = await loginOperation({\n collection,\n data: authData,\n depth: isNumber(depth) ? Number(depth) : undefined,\n req,\n })\n\n const cookie = generatePayloadCookie({\n collectionAuthConfig: collection.config.auth,\n cookiePrefix: req.payload.config.cookiePrefix,\n token: result.token!,\n })\n\n if (collection.config.auth.removeTokenFromResponses) {\n delete result.token\n }\n\n return Response.json(\n {\n message: t('authentication:passed'),\n ...result,\n },\n {\n headers: headersWithCors({\n headers: new Headers({\n 'Set-Cookie': cookie,\n }),\n req,\n }),\n status: httpStatus.OK,\n },\n )\n}\n"],"names":["status","httpStatus","getRequestCollection","headersWithCors","isNumber","generatePayloadCookie","loginOperation","loginHandler","req","collection","searchParams","t","depth","get","authData","config","auth","loginWithUsername","email","data","password","username","result","Number","undefined","cookie","collectionAuthConfig","cookiePrefix","payload","token","removeTokenFromResponses","Response","json","message","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,oBAAoB,QAAQ,sCAAqC;AAC1E,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,QAAQ,QAAQ,8BAA6B;AACtD,SAASC,qBAAqB,QAAQ,gBAAe;AACrD,SAASC,cAAc,QAAQ,yBAAwB;AAEvD,OAAO,MAAMC,eAA+B,OAAOC;IACjD,MAAMC,aAAaP,qBAAqBM;IACxC,MAAM,EAAEE,YAAY,EAAEC,CAAC,EAAE,GAAGH;IAC5B,MAAMI,QAAQF,aAAaG,GAAG,CAAC;IAC/B,MAAMC,WACJL,WAAWM,MAAM,CAACC,IAAI,EAAEC,sBAAsB,QAC1C;QACEC,OAAO,OAAOV,IAAIW,IAAI,EAAED,UAAU,WAAWV,IAAIW,IAAI,CAACD,KAAK,GAAG;QAC9DE,UAAU,OAAOZ,IAAIW,IAAI,EAAEC,aAAa,WAAWZ,IAAIW,IAAI,CAACC,QAAQ,GAAG;QACvEC,UAAU,OAAOb,IAAIW,IAAI,EAAEE,aAAa,WAAWb,IAAIW,IAAI,CAACE,QAAQ,GAAG;IACzE,IACA;QACEH,OAAO,OAAOV,IAAIW,IAAI,EAAED,UAAU,WAAWV,IAAIW,IAAI,CAACD,KAAK,GAAG;QAC9DE,UAAU,OAAOZ,IAAIW,IAAI,EAAEC,aAAa,WAAWZ,IAAIW,IAAI,CAACC,QAAQ,GAAG;IACzE;IAEN,MAAME,SAAS,MAAMhB,eAAe;QAClCG;QACAU,MAAML;QACNF,OAAOR,SAASQ,SAASW,OAAOX,SAASY;QACzChB;IACF;IAEA,MAAMiB,SAASpB,sBAAsB;QACnCqB,sBAAsBjB,WAAWM,MAAM,CAACC,IAAI;QAC5CW,cAAcnB,IAAIoB,OAAO,CAACb,MAAM,CAACY,YAAY;QAC7CE,OAAOP,OAAOO,KAAK;IACrB;IAEA,IAAIpB,WAAWM,MAAM,CAACC,IAAI,CAACc,wBAAwB,EAAE;QACnD,OAAOR,OAAOO,KAAK;IACrB;IAEA,OAAOE,SAASC,IAAI,CAClB;QACEC,SAAStB,EAAE;QACX,GAAGW,MAAM;IACX,GACA;QACEY,SAAS/B,gBAAgB;YACvB+B,SAAS,IAAIC,QAAQ;gBACnB,cAAcV;YAChB;YACAjB;QACF;QACAR,QAAQC,WAAWmC,EAAE;IACvB;AAEJ,EAAC"}
1
+ {"version":3,"sources":["../../../src/auth/endpoints/login.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\n\nimport { getRequestCollection } from '../../utilities/getRequestEntity.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { isNumber } from '../../utilities/isNumber.js'\nimport { loginWithCookie } from '../loginWithCookie.js'\n\nexport const loginHandler: PayloadHandler = async (req) => {\n const collection = getRequestCollection(req)\n const { searchParams, t } = req\n const depth = searchParams.get('depth')\n const authData =\n collection.config.auth?.loginWithUsername !== false\n ? {\n email: typeof req.data?.email === 'string' ? req.data.email : '',\n password: typeof req.data?.password === 'string' ? req.data.password : '',\n username: typeof req.data?.username === 'string' ? req.data.username : '',\n }\n : {\n email: typeof req.data?.email === 'string' ? req.data.email : '',\n password: typeof req.data?.password === 'string' ? req.data.password : '',\n }\n\n const { cookie, result } = await loginWithCookie({\n collection,\n data: authData,\n depth: isNumber(depth) ? Number(depth) : undefined,\n req,\n })\n\n return Response.json(\n {\n message: t('authentication:passed'),\n ...result,\n },\n {\n headers: headersWithCors({\n headers: new Headers({\n 'Set-Cookie': cookie,\n }),\n req,\n }),\n status: httpStatus.OK,\n },\n )\n}\n"],"names":["status","httpStatus","getRequestCollection","headersWithCors","isNumber","loginWithCookie","loginHandler","req","collection","searchParams","t","depth","get","authData","config","auth","loginWithUsername","email","data","password","username","cookie","result","Number","undefined","Response","json","message","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,oBAAoB,QAAQ,sCAAqC;AAC1E,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,QAAQ,QAAQ,8BAA6B;AACtD,SAASC,eAAe,QAAQ,wBAAuB;AAEvD,OAAO,MAAMC,eAA+B,OAAOC;IACjD,MAAMC,aAAaN,qBAAqBK;IACxC,MAAM,EAAEE,YAAY,EAAEC,CAAC,EAAE,GAAGH;IAC5B,MAAMI,QAAQF,aAAaG,GAAG,CAAC;IAC/B,MAAMC,WACJL,WAAWM,MAAM,CAACC,IAAI,EAAEC,sBAAsB,QAC1C;QACEC,OAAO,OAAOV,IAAIW,IAAI,EAAED,UAAU,WAAWV,IAAIW,IAAI,CAACD,KAAK,GAAG;QAC9DE,UAAU,OAAOZ,IAAIW,IAAI,EAAEC,aAAa,WAAWZ,IAAIW,IAAI,CAACC,QAAQ,GAAG;QACvEC,UAAU,OAAOb,IAAIW,IAAI,EAAEE,aAAa,WAAWb,IAAIW,IAAI,CAACE,QAAQ,GAAG;IACzE,IACA;QACEH,OAAO,OAAOV,IAAIW,IAAI,EAAED,UAAU,WAAWV,IAAIW,IAAI,CAACD,KAAK,GAAG;QAC9DE,UAAU,OAAOZ,IAAIW,IAAI,EAAEC,aAAa,WAAWZ,IAAIW,IAAI,CAACC,QAAQ,GAAG;IACzE;IAEN,MAAM,EAAEE,MAAM,EAAEC,MAAM,EAAE,GAAG,MAAMjB,gBAAgB;QAC/CG;QACAU,MAAML;QACNF,OAAOP,SAASO,SAASY,OAAOZ,SAASa;QACzCjB;IACF;IAEA,OAAOkB,SAASC,IAAI,CAClB;QACEC,SAASjB,EAAE;QACX,GAAGY,MAAM;IACX,GACA;QACEM,SAASzB,gBAAgB;YACvByB,SAAS,IAAIC,QAAQ;gBACnB,cAAcR;YAChB;YACAd;QACF;QACAP,QAAQC,WAAW6B,EAAE;IACvB;AAEJ,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../../../src/auth/endpoints/refresh.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,cAAc,EAAE,cAuC5B,CAAA"}
1
+ {"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../../../src/auth/endpoints/refresh.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,cAAc,EAAE,cAwC5B,CAAA"}