@dyrected/core 2.8.3 → 2.10.0

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 (500) hide show
  1. package/dist/{app-config-BccpBUqJ.d.cts → app-config-DQhcrGDE.d.cts} +472 -85
  2. package/dist/{app-config-BccpBUqJ.d.ts → app-config-DQhcrGDE.d.ts} +472 -85
  3. package/dist/chunk-JSBRDJBE.js +30 -0
  4. package/dist/{chunk-GFFGDHST.js → chunk-TYPDQTE2.js} +1879 -42
  5. package/dist/index.cjs +1954 -41
  6. package/dist/index.d.cts +20 -5
  7. package/dist/index.d.ts +20 -5
  8. package/dist/index.js +87 -9
  9. package/dist/{observability-KCMTV7GO.js → observability-HQF4EUSV.js} +1 -0
  10. package/dist/server.cjs +2109 -45
  11. package/dist/server.d.cts +38 -16
  12. package/dist/server.d.ts +38 -16
  13. package/dist/server.js +250 -17
  14. package/dist/{where-sanitizer-WJ2W2QCE.js → where-sanitizer-3MNFMYA2.js} +2 -0
  15. package/package.json +3 -3
  16. package/dist/__tests__/access-features.test.d.ts +0 -2
  17. package/dist/__tests__/access-features.test.d.ts.map +0 -1
  18. package/dist/__tests__/access-features.test.js +0 -159
  19. package/dist/__tests__/access-features.test.js.map +0 -1
  20. package/dist/__tests__/access-parity.test.d.ts +0 -2
  21. package/dist/__tests__/access-parity.test.d.ts.map +0 -1
  22. package/dist/__tests__/access-parity.test.js +0 -338
  23. package/dist/__tests__/access-parity.test.js.map +0 -1
  24. package/dist/__tests__/access.test.d.ts +0 -2
  25. package/dist/__tests__/access.test.d.ts.map +0 -1
  26. package/dist/__tests__/access.test.js +0 -137
  27. package/dist/__tests__/access.test.js.map +0 -1
  28. package/dist/__tests__/admin-auth.test.d.ts +0 -2
  29. package/dist/__tests__/admin-auth.test.d.ts.map +0 -1
  30. package/dist/__tests__/admin-auth.test.js +0 -440
  31. package/dist/__tests__/admin-auth.test.js.map +0 -1
  32. package/dist/__tests__/app.test.d.ts +0 -2
  33. package/dist/__tests__/app.test.d.ts.map +0 -1
  34. package/dist/__tests__/app.test.js +0 -112
  35. package/dist/__tests__/app.test.js.map +0 -1
  36. package/dist/__tests__/audit.test.d.ts +0 -2
  37. package/dist/__tests__/audit.test.d.ts.map +0 -1
  38. package/dist/__tests__/audit.test.js +0 -125
  39. package/dist/__tests__/audit.test.js.map +0 -1
  40. package/dist/__tests__/auth-hydration.test.d.ts +0 -2
  41. package/dist/__tests__/auth-hydration.test.d.ts.map +0 -1
  42. package/dist/__tests__/auth-hydration.test.js +0 -90
  43. package/dist/__tests__/auth-hydration.test.js.map +0 -1
  44. package/dist/__tests__/auth-invite.test.d.ts +0 -2
  45. package/dist/__tests__/auth-invite.test.d.ts.map +0 -1
  46. package/dist/__tests__/auth-invite.test.js +0 -152
  47. package/dist/__tests__/auth-invite.test.js.map +0 -1
  48. package/dist/__tests__/auth-lockout.test.d.ts +0 -2
  49. package/dist/__tests__/auth-lockout.test.d.ts.map +0 -1
  50. package/dist/__tests__/auth-lockout.test.js +0 -154
  51. package/dist/__tests__/auth-lockout.test.js.map +0 -1
  52. package/dist/__tests__/auth-sessions.test.d.ts +0 -2
  53. package/dist/__tests__/auth-sessions.test.d.ts.map +0 -1
  54. package/dist/__tests__/auth-sessions.test.js +0 -118
  55. package/dist/__tests__/auth-sessions.test.js.map +0 -1
  56. package/dist/__tests__/config.test.d.ts +0 -2
  57. package/dist/__tests__/config.test.d.ts.map +0 -1
  58. package/dist/__tests__/config.test.js +0 -402
  59. package/dist/__tests__/config.test.js.map +0 -1
  60. package/dist/__tests__/define-field.test.d.ts +0 -2
  61. package/dist/__tests__/define-field.test.d.ts.map +0 -1
  62. package/dist/__tests__/define-field.test.js +0 -121
  63. package/dist/__tests__/define-field.test.js.map +0 -1
  64. package/dist/__tests__/deleteMany.test.d.ts +0 -2
  65. package/dist/__tests__/deleteMany.test.d.ts.map +0 -1
  66. package/dist/__tests__/deleteMany.test.js +0 -75
  67. package/dist/__tests__/deleteMany.test.js.map +0 -1
  68. package/dist/__tests__/depth.test.d.ts +0 -2
  69. package/dist/__tests__/depth.test.d.ts.map +0 -1
  70. package/dist/__tests__/depth.test.js +0 -115
  71. package/dist/__tests__/depth.test.js.map +0 -1
  72. package/dist/__tests__/dynamic-options.test.d.ts +0 -2
  73. package/dist/__tests__/dynamic-options.test.d.ts.map +0 -1
  74. package/dist/__tests__/dynamic-options.test.js +0 -168
  75. package/dist/__tests__/dynamic-options.test.js.map +0 -1
  76. package/dist/__tests__/email.service.test.d.ts +0 -2
  77. package/dist/__tests__/email.service.test.d.ts.map +0 -1
  78. package/dist/__tests__/email.service.test.js +0 -52
  79. package/dist/__tests__/email.service.test.js.map +0 -1
  80. package/dist/__tests__/field-inference.test-types.d.ts +0 -161
  81. package/dist/__tests__/field-inference.test-types.d.ts.map +0 -1
  82. package/dist/__tests__/field-inference.test-types.js +0 -87
  83. package/dist/__tests__/field-inference.test-types.js.map +0 -1
  84. package/dist/__tests__/fixtures/editorial-workflow.d.ts +0 -14
  85. package/dist/__tests__/fixtures/editorial-workflow.d.ts.map +0 -1
  86. package/dist/__tests__/fixtures/editorial-workflow.js +0 -12
  87. package/dist/__tests__/fixtures/editorial-workflow.js.map +0 -1
  88. package/dist/__tests__/hooks.test.d.ts +0 -2
  89. package/dist/__tests__/hooks.test.d.ts.map +0 -1
  90. package/dist/__tests__/hooks.test.js +0 -320
  91. package/dist/__tests__/hooks.test.js.map +0 -1
  92. package/dist/__tests__/mocks.d.ts +0 -75
  93. package/dist/__tests__/mocks.d.ts.map +0 -1
  94. package/dist/__tests__/mocks.js +0 -170
  95. package/dist/__tests__/mocks.js.map +0 -1
  96. package/dist/__tests__/observability.test.d.ts +0 -2
  97. package/dist/__tests__/observability.test.d.ts.map +0 -1
  98. package/dist/__tests__/observability.test.js +0 -233
  99. package/dist/__tests__/observability.test.js.map +0 -1
  100. package/dist/__tests__/openapi.test.d.ts +0 -2
  101. package/dist/__tests__/openapi.test.d.ts.map +0 -1
  102. package/dist/__tests__/openapi.test.js +0 -105
  103. package/dist/__tests__/openapi.test.js.map +0 -1
  104. package/dist/__tests__/parse-sort.test.d.ts +0 -2
  105. package/dist/__tests__/parse-sort.test.d.ts.map +0 -1
  106. package/dist/__tests__/parse-sort.test.js +0 -24
  107. package/dist/__tests__/parse-sort.test.js.map +0 -1
  108. package/dist/__tests__/preferences.test.d.ts +0 -2
  109. package/dist/__tests__/preferences.test.d.ts.map +0 -1
  110. package/dist/__tests__/preferences.test.js +0 -168
  111. package/dist/__tests__/preferences.test.js.map +0 -1
  112. package/dist/__tests__/router.test.d.ts +0 -2
  113. package/dist/__tests__/router.test.d.ts.map +0 -1
  114. package/dist/__tests__/router.test.js +0 -70
  115. package/dist/__tests__/router.test.js.map +0 -1
  116. package/dist/__tests__/search.test.d.ts +0 -2
  117. package/dist/__tests__/search.test.d.ts.map +0 -1
  118. package/dist/__tests__/search.test.js +0 -174
  119. package/dist/__tests__/search.test.js.map +0 -1
  120. package/dist/__tests__/upload-validation.test.d.ts +0 -2
  121. package/dist/__tests__/upload-validation.test.d.ts.map +0 -1
  122. package/dist/__tests__/upload-validation.test.js +0 -41
  123. package/dist/__tests__/upload-validation.test.js.map +0 -1
  124. package/dist/__tests__/where.test.d.ts +0 -2
  125. package/dist/__tests__/where.test.d.ts.map +0 -1
  126. package/dist/__tests__/where.test.js +0 -105
  127. package/dist/__tests__/where.test.js.map +0 -1
  128. package/dist/__tests__/workflow.test.d.ts +0 -2
  129. package/dist/__tests__/workflow.test.d.ts.map +0 -1
  130. package/dist/__tests__/workflow.test.js +0 -684
  131. package/dist/__tests__/workflow.test.js.map +0 -1
  132. package/dist/app-config-7G-3tF_I.d.cts +0 -2259
  133. package/dist/app-config-7G-3tF_I.d.ts +0 -2259
  134. package/dist/app-config-9hs8DRED.d.cts +0 -1718
  135. package/dist/app-config-9hs8DRED.d.ts +0 -1718
  136. package/dist/app-config-B3ByBjCN.d.cts +0 -2222
  137. package/dist/app-config-B3ByBjCN.d.ts +0 -2222
  138. package/dist/app-config-B5tYsZaH.d.cts +0 -2404
  139. package/dist/app-config-B5tYsZaH.d.ts +0 -2404
  140. package/dist/app-config-BEuyPktb.d.cts +0 -2556
  141. package/dist/app-config-BEuyPktb.d.ts +0 -2556
  142. package/dist/app-config-BIkjQWzU.d.cts +0 -2218
  143. package/dist/app-config-BIkjQWzU.d.ts +0 -2218
  144. package/dist/app-config-BcuZIpvL.d.cts +0 -1951
  145. package/dist/app-config-BcuZIpvL.d.ts +0 -1951
  146. package/dist/app-config-BfpeE3bF.d.cts +0 -2100
  147. package/dist/app-config-BfpeE3bF.d.ts +0 -2100
  148. package/dist/app-config-Bm9-2Am6.d.cts +0 -1875
  149. package/dist/app-config-Bm9-2Am6.d.ts +0 -1875
  150. package/dist/app-config-BqhrBrSM.d.cts +0 -1522
  151. package/dist/app-config-BqhrBrSM.d.ts +0 -1522
  152. package/dist/app-config-Bxg_DVxv.d.cts +0 -1413
  153. package/dist/app-config-Bxg_DVxv.d.ts +0 -1413
  154. package/dist/app-config-C0twGIaF.d.cts +0 -1597
  155. package/dist/app-config-C0twGIaF.d.ts +0 -1597
  156. package/dist/app-config-C0uxEU7Q.d.cts +0 -1874
  157. package/dist/app-config-C0uxEU7Q.d.ts +0 -1874
  158. package/dist/app-config-C3X5BAyK.d.cts +0 -1539
  159. package/dist/app-config-C3X5BAyK.d.ts +0 -1539
  160. package/dist/app-config-C9VJ6rTv.d.cts +0 -2092
  161. package/dist/app-config-C9VJ6rTv.d.ts +0 -2092
  162. package/dist/app-config-CBOn8IyZ.d.cts +0 -1838
  163. package/dist/app-config-CBOn8IyZ.d.ts +0 -1838
  164. package/dist/app-config-CCe-yq9q.d.cts +0 -2222
  165. package/dist/app-config-CCe-yq9q.d.ts +0 -2222
  166. package/dist/app-config-CJAGGPrk.d.cts +0 -1900
  167. package/dist/app-config-CJAGGPrk.d.ts +0 -1900
  168. package/dist/app-config-CPOs7THF.d.cts +0 -2217
  169. package/dist/app-config-CPOs7THF.d.ts +0 -2217
  170. package/dist/app-config-CYV70eoF.d.cts +0 -2100
  171. package/dist/app-config-CYV70eoF.d.ts +0 -2100
  172. package/dist/app-config-ChsrBB7p.d.cts +0 -2100
  173. package/dist/app-config-ChsrBB7p.d.ts +0 -2100
  174. package/dist/app-config-CiEDJm0e.d.cts +0 -1912
  175. package/dist/app-config-CiEDJm0e.d.ts +0 -1912
  176. package/dist/app-config-CstocO9M.d.cts +0 -1580
  177. package/dist/app-config-CstocO9M.d.ts +0 -1580
  178. package/dist/app-config-Ctp454zB.d.cts +0 -2214
  179. package/dist/app-config-Ctp454zB.d.ts +0 -2214
  180. package/dist/app-config-CwaU1de2.d.cts +0 -1868
  181. package/dist/app-config-CwaU1de2.d.ts +0 -1868
  182. package/dist/app-config-DCDh8Gbx.d.cts +0 -1926
  183. package/dist/app-config-DCDh8Gbx.d.ts +0 -1926
  184. package/dist/app-config-DCWinlNK.d.cts +0 -2091
  185. package/dist/app-config-DCWinlNK.d.ts +0 -2091
  186. package/dist/app-config-DIwvzbpe.d.cts +0 -1555
  187. package/dist/app-config-DIwvzbpe.d.ts +0 -1555
  188. package/dist/app-config-DJmNYgYh.d.cts +0 -2305
  189. package/dist/app-config-DJmNYgYh.d.ts +0 -2305
  190. package/dist/app-config-DO3laV58.d.cts +0 -2397
  191. package/dist/app-config-DO3laV58.d.ts +0 -2397
  192. package/dist/app-config-DVdSospO.d.cts +0 -1842
  193. package/dist/app-config-DVdSospO.d.ts +0 -1842
  194. package/dist/app-config-DZf_mmi9.d.cts +0 -2211
  195. package/dist/app-config-DZf_mmi9.d.ts +0 -2211
  196. package/dist/app-config-DbK2Tv6i.d.cts +0 -2080
  197. package/dist/app-config-DbK2Tv6i.d.ts +0 -2080
  198. package/dist/app-config-Dkndq5ni.d.cts +0 -1580
  199. package/dist/app-config-Dkndq5ni.d.ts +0 -1580
  200. package/dist/app-config-Dms6kvE-.d.cts +0 -2072
  201. package/dist/app-config-Dms6kvE-.d.ts +0 -2072
  202. package/dist/app-config-DqCipvSI.d.cts +0 -1411
  203. package/dist/app-config-DqCipvSI.d.ts +0 -1411
  204. package/dist/app-config-Dv5XACR4.d.cts +0 -2065
  205. package/dist/app-config-Dv5XACR4.d.ts +0 -2065
  206. package/dist/app-config-P-SF5nnR.d.cts +0 -1568
  207. package/dist/app-config-P-SF5nnR.d.ts +0 -1568
  208. package/dist/app-config-SkUoN5JU.d.cts +0 -2192
  209. package/dist/app-config-SkUoN5JU.d.ts +0 -2192
  210. package/dist/app-config-WzqpuZMr.d.cts +0 -2566
  211. package/dist/app-config-WzqpuZMr.d.ts +0 -2566
  212. package/dist/app-config-_kkj71CB.d.cts +0 -2010
  213. package/dist/app-config-_kkj71CB.d.ts +0 -2010
  214. package/dist/app-config-fEjRm1o9.d.cts +0 -2402
  215. package/dist/app-config-fEjRm1o9.d.ts +0 -2402
  216. package/dist/app-config-oU1EGHND.d.cts +0 -1538
  217. package/dist/app-config-oU1EGHND.d.ts +0 -1538
  218. package/dist/app-config-ouBRb6Bf.d.cts +0 -1716
  219. package/dist/app-config-ouBRb6Bf.d.ts +0 -1716
  220. package/dist/app-config-oz8H_MOX.d.cts +0 -2224
  221. package/dist/app-config-oz8H_MOX.d.ts +0 -2224
  222. package/dist/app-config-tITj_0sn.d.cts +0 -1926
  223. package/dist/app-config-tITj_0sn.d.ts +0 -1926
  224. package/dist/app-config-wnLtFu6c.d.cts +0 -1538
  225. package/dist/app-config-wnLtFu6c.d.ts +0 -1538
  226. package/dist/app-config-x-CnipcA.d.cts +0 -2072
  227. package/dist/app-config-x-CnipcA.d.ts +0 -2072
  228. package/dist/app.d.ts +0 -35
  229. package/dist/app.d.ts.map +0 -1
  230. package/dist/app.js +0 -164
  231. package/dist/app.js.map +0 -1
  232. package/dist/auth/access.d.ts +0 -5
  233. package/dist/auth/access.d.ts.map +0 -1
  234. package/dist/auth/access.js +0 -59
  235. package/dist/auth/access.js.map +0 -1
  236. package/dist/auth/jexl.d.ts +0 -13
  237. package/dist/auth/jexl.d.ts.map +0 -1
  238. package/dist/auth/jexl.js +0 -30
  239. package/dist/auth/jexl.js.map +0 -1
  240. package/dist/auth/lockout.d.ts +0 -11
  241. package/dist/auth/lockout.d.ts.map +0 -1
  242. package/dist/auth/lockout.js +0 -37
  243. package/dist/auth/lockout.js.map +0 -1
  244. package/dist/auth/password.d.ts +0 -10
  245. package/dist/auth/password.d.ts.map +0 -1
  246. package/dist/auth/password.js +0 -28
  247. package/dist/auth/password.js.map +0 -1
  248. package/dist/auth/sessions.d.ts +0 -39
  249. package/dist/auth/sessions.d.ts.map +0 -1
  250. package/dist/auth/sessions.js +0 -126
  251. package/dist/auth/sessions.js.map +0 -1
  252. package/dist/auth/token.d.ts +0 -23
  253. package/dist/auth/token.d.ts.map +0 -1
  254. package/dist/auth/token.js +0 -40
  255. package/dist/auth/token.js.map +0 -1
  256. package/dist/chunk-23NM4LDU.js +0 -2883
  257. package/dist/chunk-2TKDCCIR.js +0 -2622
  258. package/dist/chunk-2UXLA4YN.js +0 -3139
  259. package/dist/chunk-2WODKOUB.js +0 -1627
  260. package/dist/chunk-35NM2WPO.js +0 -1658
  261. package/dist/chunk-3CMG2BH2.js +0 -1618
  262. package/dist/chunk-3SFITPX4.js +0 -2628
  263. package/dist/chunk-3TRRTN6U.js +0 -3441
  264. package/dist/chunk-57FNM42D.js +0 -2392
  265. package/dist/chunk-5U2WRCNH.js +0 -3140
  266. package/dist/chunk-5ZIA5COH.js +0 -3414
  267. package/dist/chunk-6TWQ6GTD.js +0 -3480
  268. package/dist/chunk-AKYYGMFS.js +0 -3365
  269. package/dist/chunk-AQO4HI2Y.js +0 -3204
  270. package/dist/chunk-BAMX7YUC.js +0 -1815
  271. package/dist/chunk-BQV3QW3Y.js +0 -2588
  272. package/dist/chunk-CQVTQ67D.js +0 -2632
  273. package/dist/chunk-CUOPCOU2.js +0 -1644
  274. package/dist/chunk-DCY7QHRB.js +0 -1637
  275. package/dist/chunk-DFBLNYUH.js +0 -3402
  276. package/dist/chunk-EH3MJGB5.js +0 -2571
  277. package/dist/chunk-EJG6AMYB.js +0 -3537
  278. package/dist/chunk-ELHRRPKX.js +0 -2863
  279. package/dist/chunk-EOW4YMAV.js +0 -1637
  280. package/dist/chunk-G43REXPX.js +0 -3147
  281. package/dist/chunk-GFKBPBJJ.js +0 -3637
  282. package/dist/chunk-HRLSFTLR.js +0 -3061
  283. package/dist/chunk-JFA22YFB.js +0 -1625
  284. package/dist/chunk-K3ASMUKV.js +0 -2601
  285. package/dist/chunk-KEKOEAX6.js +0 -3139
  286. package/dist/chunk-L65PQYDP.js +0 -1536
  287. package/dist/chunk-LFGSRQLX.js +0 -3568
  288. package/dist/chunk-M3HKRN7E.js +0 -1665
  289. package/dist/chunk-MQZH7RQC.js +0 -1667
  290. package/dist/chunk-NNZRYF3U.js +0 -3537
  291. package/dist/chunk-PRQ2RF5C.js +0 -3485
  292. package/dist/chunk-PYE2JSY4.js +0 -3568
  293. package/dist/chunk-PZMDK3MH.js +0 -3203
  294. package/dist/chunk-QCXLDKZO.js +0 -3272
  295. package/dist/chunk-QTIAQBNH.js +0 -3097
  296. package/dist/chunk-ROECUARS.js +0 -2615
  297. package/dist/chunk-SM32ND5M.js +0 -3472
  298. package/dist/chunk-T2DGC4MD.js +0 -3008
  299. package/dist/chunk-T626OZMH.js +0 -2602
  300. package/dist/chunk-TEGRS6J7.js +0 -2609
  301. package/dist/chunk-TLU77TLE.js +0 -3203
  302. package/dist/chunk-UKUEKTAO.js +0 -513
  303. package/dist/chunk-VCYYBN5J.js +0 -1873
  304. package/dist/chunk-VM43G3IG.js +0 -506
  305. package/dist/chunk-VWJKFZQU.js +0 -3139
  306. package/dist/chunk-WF5A6PDJ.js +0 -1618
  307. package/dist/chunk-WVD7PORQ.js +0 -1672
  308. package/dist/chunk-XX7N64NL.js +0 -3550
  309. package/dist/chunk-XZLIBQSO.js +0 -2397
  310. package/dist/chunk-YEBCT77K.js +0 -3269
  311. package/dist/chunk-YSSHLGQ6.js +0 -3139
  312. package/dist/chunk-YXEKNN5X.js +0 -3085
  313. package/dist/chunk-Z7CFUYVP.js +0 -3653
  314. package/dist/chunk-ZISFMAEL.js +0 -3550
  315. package/dist/controllers/admin-auth.controller.d.ts +0 -71
  316. package/dist/controllers/admin-auth.controller.d.ts.map +0 -1
  317. package/dist/controllers/admin-auth.controller.js +0 -450
  318. package/dist/controllers/admin-auth.controller.js.map +0 -1
  319. package/dist/controllers/audit.controller.d.ts +0 -42
  320. package/dist/controllers/audit.controller.d.ts.map +0 -1
  321. package/dist/controllers/audit.controller.js +0 -149
  322. package/dist/controllers/audit.controller.js.map +0 -1
  323. package/dist/controllers/auth.controller.d.ts +0 -143
  324. package/dist/controllers/auth.controller.d.ts.map +0 -1
  325. package/dist/controllers/auth.controller.js +0 -572
  326. package/dist/controllers/auth.controller.js.map +0 -1
  327. package/dist/controllers/collection.controller.d.ts +0 -170
  328. package/dist/controllers/collection.controller.d.ts.map +0 -1
  329. package/dist/controllers/collection.controller.js +0 -1033
  330. package/dist/controllers/collection.controller.js.map +0 -1
  331. package/dist/controllers/global.controller.d.ts +0 -20
  332. package/dist/controllers/global.controller.d.ts.map +0 -1
  333. package/dist/controllers/global.controller.js +0 -182
  334. package/dist/controllers/global.controller.js.map +0 -1
  335. package/dist/controllers/media.controller.d.ts +0 -39
  336. package/dist/controllers/media.controller.d.ts.map +0 -1
  337. package/dist/controllers/media.controller.js +0 -178
  338. package/dist/controllers/media.controller.js.map +0 -1
  339. package/dist/controllers/preview.controller.d.ts +0 -37
  340. package/dist/controllers/preview.controller.d.ts.map +0 -1
  341. package/dist/controllers/preview.controller.js +0 -48
  342. package/dist/controllers/preview.controller.js.map +0 -1
  343. package/dist/index.d.ts.map +0 -1
  344. package/dist/index.js.map +0 -1
  345. package/dist/middleware/auth.d.ts +0 -19
  346. package/dist/middleware/auth.d.ts.map +0 -1
  347. package/dist/middleware/auth.js +0 -157
  348. package/dist/middleware/auth.js.map +0 -1
  349. package/dist/middleware/rate-limit.d.ts +0 -9
  350. package/dist/middleware/rate-limit.d.ts.map +0 -1
  351. package/dist/middleware/rate-limit.js +0 -75
  352. package/dist/middleware/rate-limit.js.map +0 -1
  353. package/dist/network.d.ts +0 -6
  354. package/dist/network.d.ts.map +0 -1
  355. package/dist/network.js +0 -70
  356. package/dist/network.js.map +0 -1
  357. package/dist/observability-CNM4QFE4.js +0 -34
  358. package/dist/observability-L5BORBB2.js +0 -34
  359. package/dist/observability.d.ts +0 -113
  360. package/dist/observability.d.ts.map +0 -1
  361. package/dist/observability.js +0 -497
  362. package/dist/observability.js.map +0 -1
  363. package/dist/router.d.ts +0 -8
  364. package/dist/router.d.ts.map +0 -1
  365. package/dist/router.js +0 -704
  366. package/dist/router.js.map +0 -1
  367. package/dist/server.d.ts.map +0 -1
  368. package/dist/server.js.map +0 -1
  369. package/dist/services/audit.service.d.ts +0 -23
  370. package/dist/services/audit.service.d.ts.map +0 -1
  371. package/dist/services/audit.service.js +0 -39
  372. package/dist/services/audit.service.js.map +0 -1
  373. package/dist/services/defaults.service.d.ts +0 -8
  374. package/dist/services/defaults.service.d.ts.map +0 -1
  375. package/dist/services/defaults.service.js +0 -55
  376. package/dist/services/defaults.service.js.map +0 -1
  377. package/dist/services/email-template.d.ts +0 -46
  378. package/dist/services/email-template.d.ts.map +0 -1
  379. package/dist/services/email-template.js +0 -88
  380. package/dist/services/email-template.js.map +0 -1
  381. package/dist/services/email.service.d.ts +0 -34
  382. package/dist/services/email.service.d.ts.map +0 -1
  383. package/dist/services/email.service.js +0 -129
  384. package/dist/services/email.service.js.map +0 -1
  385. package/dist/services/media.service.d.ts +0 -20
  386. package/dist/services/media.service.d.ts.map +0 -1
  387. package/dist/services/media.service.js +0 -49
  388. package/dist/services/media.service.js.map +0 -1
  389. package/dist/services/population.service.d.ts +0 -20
  390. package/dist/services/population.service.d.ts.map +0 -1
  391. package/dist/services/population.service.js +0 -224
  392. package/dist/services/population.service.js.map +0 -1
  393. package/dist/types/access.d.ts +0 -48
  394. package/dist/types/access.d.ts.map +0 -1
  395. package/dist/types/access.js +0 -2
  396. package/dist/types/access.js.map +0 -1
  397. package/dist/types/adapters.d.ts +0 -152
  398. package/dist/types/adapters.d.ts.map +0 -1
  399. package/dist/types/adapters.js +0 -2
  400. package/dist/types/adapters.js.map +0 -1
  401. package/dist/types/admin-auth.d.ts +0 -132
  402. package/dist/types/admin-auth.d.ts.map +0 -1
  403. package/dist/types/admin-auth.js +0 -2
  404. package/dist/types/admin-auth.js.map +0 -1
  405. package/dist/types/admin.d.ts +0 -86
  406. package/dist/types/admin.d.ts.map +0 -1
  407. package/dist/types/admin.js +0 -2
  408. package/dist/types/admin.js.map +0 -1
  409. package/dist/types/app-config.d.ts +0 -279
  410. package/dist/types/app-config.d.ts.map +0 -1
  411. package/dist/types/app-config.js +0 -2
  412. package/dist/types/app-config.js.map +0 -1
  413. package/dist/types/documents.d.ts +0 -65
  414. package/dist/types/documents.d.ts.map +0 -1
  415. package/dist/types/documents.js +0 -2
  416. package/dist/types/documents.js.map +0 -1
  417. package/dist/types/hooks.d.ts +0 -122
  418. package/dist/types/hooks.d.ts.map +0 -1
  419. package/dist/types/hooks.js +0 -2
  420. package/dist/types/hooks.js.map +0 -1
  421. package/dist/types/index.d.ts +0 -13
  422. package/dist/types/index.d.ts.map +0 -1
  423. package/dist/types/index.js +0 -13
  424. package/dist/types/index.js.map +0 -1
  425. package/dist/types/request.d.ts +0 -42
  426. package/dist/types/request.d.ts.map +0 -1
  427. package/dist/types/request.js +0 -2
  428. package/dist/types/request.js.map +0 -1
  429. package/dist/types/schema-config.d.ts +0 -443
  430. package/dist/types/schema-config.d.ts.map +0 -1
  431. package/dist/types/schema-config.js +0 -2
  432. package/dist/types/schema-config.js.map +0 -1
  433. package/dist/types/schema-core.d.ts +0 -628
  434. package/dist/types/schema-core.d.ts.map +0 -1
  435. package/dist/types/schema-core.js +0 -2
  436. package/dist/types/schema-core.js.map +0 -1
  437. package/dist/types/schema-inference.d.ts +0 -73
  438. package/dist/types/schema-inference.d.ts.map +0 -1
  439. package/dist/types/schema-inference.js +0 -2
  440. package/dist/types/schema-inference.js.map +0 -1
  441. package/dist/types/workflows.d.ts +0 -121
  442. package/dist/types/workflows.d.ts.map +0 -1
  443. package/dist/types/workflows.js +0 -7
  444. package/dist/types/workflows.js.map +0 -1
  445. package/dist/utils/access-control.d.ts +0 -35
  446. package/dist/utils/access-control.d.ts.map +0 -1
  447. package/dist/utils/access-control.js +0 -161
  448. package/dist/utils/access-control.js.map +0 -1
  449. package/dist/utils/admin-auth.d.ts +0 -5
  450. package/dist/utils/admin-auth.d.ts.map +0 -1
  451. package/dist/utils/admin-auth.js +0 -39
  452. package/dist/utils/admin-auth.js.map +0 -1
  453. package/dist/utils/block-references.d.ts +0 -10
  454. package/dist/utils/block-references.d.ts.map +0 -1
  455. package/dist/utils/block-references.js +0 -100
  456. package/dist/utils/block-references.js.map +0 -1
  457. package/dist/utils/collection-search.d.ts +0 -11
  458. package/dist/utils/collection-search.d.ts.map +0 -1
  459. package/dist/utils/collection-search.js +0 -204
  460. package/dist/utils/collection-search.js.map +0 -1
  461. package/dist/utils/config.d.ts +0 -8
  462. package/dist/utils/config.d.ts.map +0 -1
  463. package/dist/utils/config.js +0 -336
  464. package/dist/utils/config.js.map +0 -1
  465. package/dist/utils/hooks.d.ts +0 -41
  466. package/dist/utils/hooks.d.ts.map +0 -1
  467. package/dist/utils/hooks.js +0 -177
  468. package/dist/utils/hooks.js.map +0 -1
  469. package/dist/utils/openapi.d.ts +0 -6
  470. package/dist/utils/openapi.d.ts.map +0 -1
  471. package/dist/utils/openapi.js +0 -981
  472. package/dist/utils/openapi.js.map +0 -1
  473. package/dist/utils/parse-sort.d.ts +0 -43
  474. package/dist/utils/parse-sort.d.ts.map +0 -1
  475. package/dist/utils/parse-sort.js +0 -70
  476. package/dist/utils/parse-sort.js.map +0 -1
  477. package/dist/utils/parse-where.d.ts +0 -69
  478. package/dist/utils/parse-where.d.ts.map +0 -1
  479. package/dist/utils/parse-where.js +0 -202
  480. package/dist/utils/parse-where.js.map +0 -1
  481. package/dist/utils/readonly-db.d.ts +0 -9
  482. package/dist/utils/readonly-db.d.ts.map +0 -1
  483. package/dist/utils/readonly-db.js +0 -21
  484. package/dist/utils/readonly-db.js.map +0 -1
  485. package/dist/utils/swagger.d.ts +0 -11
  486. package/dist/utils/swagger.d.ts.map +0 -1
  487. package/dist/utils/swagger.js +0 -62
  488. package/dist/utils/swagger.js.map +0 -1
  489. package/dist/utils/upload-validation.d.ts +0 -23
  490. package/dist/utils/upload-validation.d.ts.map +0 -1
  491. package/dist/utils/upload-validation.js +0 -46
  492. package/dist/utils/upload-validation.js.map +0 -1
  493. package/dist/utils/where-sanitizer.d.ts +0 -10
  494. package/dist/utils/where-sanitizer.d.ts.map +0 -1
  495. package/dist/utils/where-sanitizer.js +0 -67
  496. package/dist/utils/where-sanitizer.js.map +0 -1
  497. package/dist/workflows.d.ts +0 -86
  498. package/dist/workflows.d.ts.map +0 -1
  499. package/dist/workflows.js +0 -405
  500. package/dist/workflows.js.map +0 -1
@@ -851,6 +851,431 @@ type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailFi
851
851
  */
852
852
  type DetailSchema<TDoc = any> = DetailItem<TDoc>[];
853
853
 
854
+ /**
855
+ * The set of type-cast operations supported during aggregation.
856
+ *
857
+ * Each adapter maps these to its own native conversion primitive
858
+ * (e.g. `$toDouble` in MongoDB, `CAST(x AS REAL)` in SQLite).
859
+ * The public API is always database-independent.
860
+ */
861
+ type AggregateCastType = "number" | "integer" | "float" | "string" | "boolean" | "date";
862
+ /**
863
+ * A `count` aggregate operation.
864
+ *
865
+ * - `count: "*"` — count every document matched by `where`.
866
+ * - `cast` is intentionally absent: counting is document-level,
867
+ * not field-value-level, so type conversion has no meaning here.
868
+ */
869
+ interface CountOperation {
870
+ count: "*";
871
+ where?: Record<string, unknown>;
872
+ }
873
+ /**
874
+ * A `countDistinct` aggregate operation that counts the number of unique
875
+ * non-null values for a specific field.
876
+ */
877
+ interface DistinctCountOperation {
878
+ countDistinct: string;
879
+ where?: Record<string, unknown>;
880
+ }
881
+ /**
882
+ * A `distinct` aggregate operation that retrieves the unique values
883
+ * (or unique values with item counts) for a specific field.
884
+ */
885
+ interface DistinctValuesOperation {
886
+ distinct: string;
887
+ where?: Record<string, unknown>;
888
+ }
889
+ /**
890
+ * A `sum`, `avg`, `min`, or `max` aggregate operation on a named field.
891
+ *
892
+ * - `cast` converts stored values before the aggregation runs.
893
+ * Invalid values (e.g. `"unknown"` cast to `number`) become `null`
894
+ * and are ignored by `sum`, `avg`, `min`, and `max`.
895
+ */
896
+ interface NumericOperation {
897
+ sum?: string;
898
+ avg?: string;
899
+ min?: string;
900
+ max?: string;
901
+ cast?: AggregateCastType;
902
+ where?: Record<string, unknown>;
903
+ }
904
+ /**
905
+ * A single named aggregate request — either a count, distinct count, distinct values, or numeric operation.
906
+ */
907
+ type AggregateOperation = CountOperation | DistinctCountOperation | DistinctValuesOperation | NumericOperation;
908
+ /**
909
+ * The map of named aggregate operations sent in a single aggregate request.
910
+ *
911
+ * @example
912
+ * ```ts
913
+ * {
914
+ * totalSubmitted: { count: "*" },
915
+ * uniqueGuests: { countDistinct: "email" },
916
+ * availableSizes: { distinct: "asoebiSize" },
917
+ * totalAsoebiYards: { sum: "asoebiYards", cast: "number", where: { wantsAsoebi: { equals: true } } },
918
+ * }
919
+ * ```
920
+ */
921
+ type AggregateInput = Record<string, AggregateOperation>;
922
+ /**
923
+ * The arguments passed to `DatabaseAdapter.aggregate`.
924
+ */
925
+ interface AggregateArgs {
926
+ /** Collection slug. */
927
+ collection: string;
928
+ /** Named aggregate operations to compute. */
929
+ aggregates: AggregateInput;
930
+ /** Optional field to group the aggregates by. */
931
+ groupBy?: string;
932
+ }
933
+ /**
934
+ * The result returned by `DatabaseAdapter.aggregate`.
935
+ *
936
+ * For scalar aggregates, every named key maps to a `number | null` or `any[]` (for distinct).
937
+ * When `groupBy` is used, returns a breakdown per group.
938
+ */
939
+ type AggregateResult = Record<string, any>;
940
+ /**
941
+ * Derives the typed result shape from an `AggregateInput`.
942
+ */
943
+ type InferAggregateResult<T extends AggregateInput> = {
944
+ [K in keyof T]: any;
945
+ };
946
+
947
+ /**
948
+ * Supported layout engines for operational views in the Dyrected Admin UI:
949
+ * - `'table'`: The workhorse — column sorting, search, faceted filters, and bulk actions.
950
+ * - `'spreadsheet'`: Inline-editable matrix with batch saving (`Save changes` / `Discard`).
951
+ * - `'kanban'`: Interactive card board grouped by status or category with drag-and-drop.
952
+ * - `'calendar'`: Event schedule grid plotting records across month/week/day views by date.
953
+ * - `'gantt'`: Timeline bars plotted across start and end dates.
954
+ * - `'cards'`: Visual image/thumbnail gallery grid.
955
+ */
956
+ type ViewLayout = 'table' | 'spreadsheet' | 'kanban' | 'calendar' | 'gantt' | 'cards';
957
+ /**
958
+ * Scope and placement for an operational view action:
959
+ * - `'row'`: Renders as an inline action button on each document/row.
960
+ * - `'bulk'`: Appears in the floating bulk action bar when one or more rows are selected.
961
+ * - `'header'`: Renders as a primary action button in the view header.
962
+ */
963
+ type ActionType = 'row' | 'bulk' | 'header';
964
+ /**
965
+ * Toggles for the built-in document operations an operational view surfaces.
966
+ * All default to enabled (`true`). Set any to `false` to hide that operation.
967
+ *
968
+ * @example
969
+ * ```ts
970
+ * features: {
971
+ * delete: false, // Prevent deleting records from this view
972
+ * exportSelected: true, // Enable CSV export for checked rows
973
+ * }
974
+ * ```
975
+ */
976
+ interface ViewActionFeatures {
977
+ /** Enables the "View" preview / read-only drawer button. Defaults to `true`. */
978
+ view?: boolean;
979
+ /** Enables the "Edit" document form link. Defaults to `true`. */
980
+ edit?: boolean;
981
+ /** Enables the "Duplicate" record action. Defaults to `true`. */
982
+ duplicate?: boolean;
983
+ /** Enables the "Delete" record action. Defaults to `true`. */
984
+ delete?: boolean;
985
+ /** Enables the "Export selected" CSV action in the bulk action bar. Defaults to `true`. */
986
+ exportSelected?: boolean;
987
+ }
988
+ /**
989
+ * Color palette options for metric cards:
990
+ * `'purple' | 'emerald' | 'amber' | 'rose' | 'blue' | 'indigo' | 'cyan' | 'orange'`
991
+ */
992
+ type MetricColor = 'purple' | 'emerald' | 'amber' | 'rose' | 'blue' | 'indigo' | 'cyan' | 'orange' | string;
993
+ /**
994
+ * A sub-metric breakdown item displayed in the compact footer of a metric card.
995
+ *
996
+ * @example
997
+ * ```ts
998
+ * {
999
+ * label: "Pending",
1000
+ * aggregates: {
1001
+ * checkedIn: { count: "*", where: { checkedIn: { equals: true } } },
1002
+ * attending: { count: "*", where: { attending: { equals: true } } },
1003
+ * },
1004
+ * expression: "aggregates.attending - aggregates.checkedIn",
1005
+ * }
1006
+ * ```
1007
+ */
1008
+ interface ViewSubMetric {
1009
+ /** Short label for the sub-metric (e.g. "Pending", "Collected"). */
1010
+ label: string;
1011
+ /** Single database aggregate operation. */
1012
+ aggregate?: AggregateOperation;
1013
+ /** Map of named aggregate operations referenced in `expression` as `aggregates.key`. */
1014
+ aggregates?: Record<string, AggregateOperation>;
1015
+ /** JEXL math formula evaluated over `value` for a single aggregate (e.g. `"value * 100"`). */
1016
+ transform?: string;
1017
+ /** JEXL math formula evaluated over `aggregates` (e.g. `"aggregates.a - aggregates.b"`). */
1018
+ expression?: string;
1019
+ /** Display formatter: `'currency' | 'number' | 'percent'`. */
1020
+ format?: 'currency' | 'number' | 'percent' | string;
1021
+ /** 3-letter currency code (e.g. `"USD"`, `"NGN"`, `"EUR"`) used when `format: "currency"`. */
1022
+ currency?: string;
1023
+ }
1024
+ /**
1025
+ * Configuration for a KPI summary card rendered at the top of an operational view.
1026
+ *
1027
+ * All aggregations run directly on the database engine for maximum performance.
1028
+ *
1029
+ * @example
1030
+ * ```ts
1031
+ * {
1032
+ * label: "Total Revenue",
1033
+ * color: "emerald",
1034
+ * aggregate: { sum: "amount", cast: "number", where: { status: "paid" } },
1035
+ * format: "currency",
1036
+ * currency: "USD",
1037
+ * }
1038
+ * ```
1039
+ */
1040
+ interface ViewMetric {
1041
+ /** Title displayed on the metric card header. */
1042
+ label: string;
1043
+ /** Accent color for the card's visual indicator. */
1044
+ color?: MetricColor;
1045
+ /** Unit badge shown alongside the numeric value (e.g. `"Guests"`, `"Orders"`, `"Tables"`). */
1046
+ unit?: string;
1047
+ /** Single database aggregate operation (`count`, `distinctCount`, `sum`, `avg`, `min`, `max`). */
1048
+ aggregate?: AggregateOperation;
1049
+ /** Map of named aggregate operations referenced in `expression` as `aggregates.key`. */
1050
+ aggregates?: Record<string, AggregateOperation>;
1051
+ /** JEXL math formula evaluated over `value` for a single aggregate (e.g. `"value * 25000"`). */
1052
+ transform?: string;
1053
+ /** JEXL math formula evaluated over `aggregates` (e.g. `"(aggregates.paid / aggregates.total) * 100"`). */
1054
+ expression?: string;
1055
+ /** Display formatter: `'currency' | 'number' | 'percent'`. */
1056
+ format?: 'currency' | 'number' | 'percent' | string;
1057
+ /** 3-letter currency code (e.g. `"USD"`, `"NGN"`, `"EUR"`) used when `format: "currency"`. */
1058
+ currency?: string;
1059
+ /** Optional secondary breakdown items shown in the card footer. */
1060
+ subMetrics?: ViewSubMetric[];
1061
+ }
1062
+ /**
1063
+ * Complete configuration for a tailored operational view.
1064
+ */
1065
+ interface ViewConfig {
1066
+ /** Stable URL slug for the view (`/collections/:slug/views/:viewSlug`). */
1067
+ slug: string;
1068
+ /** Human-readable title displayed in the sidebar navigation and view header. */
1069
+ label: string;
1070
+ /** Lucide icon name (e.g. `"UserCheck"`, `"Calendar"`, `"Shirt"`, `"TableProperties"`). */
1071
+ icon?: string;
1072
+ /** Layout engine to render: `'table' | 'spreadsheet' | 'kanban' | 'calendar' | 'gantt' | 'cards'`. Defaults to `'table'`. */
1073
+ layout?: ViewLayout;
1074
+ /** Base query filter applied before user toolbar filters (e.g. `{ attending: { equals: true } }` or JEXL string). */
1075
+ filter?: Record<string, any> | string;
1076
+ /** Field name used to organize records into kanban columns or collapsible grouped sections in table, cards, and spreadsheet. */
1077
+ groupBy?: string;
1078
+ /** Field name containing the ISO date string for calendar placement. Required when `layout: 'calendar'`. */
1079
+ dateField?: string;
1080
+ /** Field name for the start date in timeline/gantt views. Required when `layout: 'gantt'`. */
1081
+ startDateField?: string;
1082
+ /** Field name for the end date in timeline/gantt views. Required when `layout: 'gantt'`. */
1083
+ endDateField?: string;
1084
+ /** Field names to show in this view, in order. If omitted, Dyrected infers default display fields. */
1085
+ columns?: string[];
1086
+ /** Default sorting rule when entering the view. */
1087
+ sort?: {
1088
+ field: string;
1089
+ direction: 'asc' | 'desc';
1090
+ };
1091
+ /** Custom workflow actions available in this view. */
1092
+ actions?: ActionConfig[];
1093
+ /** Toggles built-in operations (view/edit/duplicate/delete/export). */
1094
+ features?: ViewActionFeatures;
1095
+ /**
1096
+ * Explicit display order for action buttons — mixing custom action names and built-in names
1097
+ * (`"view"`, `"edit"`, `"duplicate"`, `"delete"`). Unlisted actions append in default order.
1098
+ */
1099
+ actionOrder?: string[];
1100
+ /** KPI summary cards rendered in the hero row above the view. */
1101
+ metrics?: ViewMetric[];
1102
+ /** Role-based access rules controlling who can see or use this view. */
1103
+ access?: AccessConfig;
1104
+ }
1105
+ /**
1106
+ * An operational workflow action that can mutate data or trigger server logic.
1107
+ */
1108
+ interface ActionConfig<TDoc extends Record<string, unknown> = Record<string, unknown>> {
1109
+ /** Unique action identifier (e.g. `"checkIn"`, `"markPaid"`). */
1110
+ name: string;
1111
+ /** Button label displayed in the UI. */
1112
+ label: string;
1113
+ /** Lucide icon name for the button (e.g. `"UserCheck"`, `"CheckCircle"`). */
1114
+ icon?: string;
1115
+ /** Action placement: `'row'` (per-row), `'bulk'` (multi-row selection bar), or `'header'` (view header). Defaults to `'row'`. */
1116
+ type?: ActionType;
1117
+ /** Optional confirmation prompt shown before executing (e.g. `"Confirm guest check-in at the door?"`). */
1118
+ confirm?: string;
1119
+ /** Optional interactive modal form fields prompting the user for input before executing. */
1120
+ fields?: Field[];
1121
+ /** Declarative database mutation applied to targeted documents (e.g. `{ checkedIn: true, checkedInAt: "now()" }`). */
1122
+ mutation?: Partial<TDoc> | Record<string, unknown>;
1123
+ /** Self-hosted server handler function executed when the action is triggered. */
1124
+ handler?: (context: ActionContext<TDoc>) => Promise<unknown> | unknown;
1125
+ /** Role-based access rules controlling who can trigger this action. */
1126
+ access?: AccessConfig;
1127
+ }
1128
+ /**
1129
+ * Context passed to an action's server handler function.
1130
+ */
1131
+ interface ActionContext<TDoc extends Record<string, unknown> = Record<string, unknown>> {
1132
+ /** The target document (for row actions). */
1133
+ doc: TDoc;
1134
+ /** All targeted documents (for bulk actions). */
1135
+ docs: TDoc[];
1136
+ /** The authenticated acting user, if available. */
1137
+ user: Record<string, unknown> | null;
1138
+ /** User inputs submitted via the action's modal form fields. */
1139
+ input: Record<string, unknown>;
1140
+ /** The collection configuration object. */
1141
+ collection: Record<string, unknown>;
1142
+ }
1143
+ /**
1144
+ * Role-based access control rules for a view or action.
1145
+ */
1146
+ interface AccessConfig {
1147
+ read?: AccessRule<any>;
1148
+ create?: AccessRule<any>;
1149
+ update?: AccessRule<any>;
1150
+ delete?: AccessRule<any>;
1151
+ }
1152
+ /**
1153
+ * Options for defining an operational view with `defineView`.
1154
+ *
1155
+ * @example
1156
+ * ```ts
1157
+ * export const attendingGuests = defineView({
1158
+ * slug: "attending-guests",
1159
+ * label: "Attending Guests",
1160
+ * icon: "UserCheck",
1161
+ * layout: "table",
1162
+ * groupBy: "tableNumber",
1163
+ * filter: { attending: { equals: true } },
1164
+ * columns: ["name", "email", "guestCount", "checkedIn"],
1165
+ * sort: { field: "name", direction: "asc" },
1166
+ * });
1167
+ * ```
1168
+ */
1169
+ interface DefineViewOptions {
1170
+ /** Stable URL slug for the view (`/collections/:slug/views/:viewSlug`). */
1171
+ slug: string;
1172
+ /** Human-readable title displayed in the sidebar navigation and view header. */
1173
+ label: string;
1174
+ /** Lucide icon name (e.g. `"UserCheck"`, `"Calendar"`, `"Shirt"`, `"TableProperties"`). */
1175
+ icon?: string;
1176
+ /** Layout engine to render: `'table' | 'spreadsheet' | 'kanban' | 'calendar' | 'gantt' | 'cards'`. Defaults to `'table'`. */
1177
+ layout?: ViewLayout;
1178
+ /** Base query filter applied before user toolbar filters (e.g. `{ attending: { equals: true } }` or JEXL string). */
1179
+ filter?: Record<string, any> | string;
1180
+ /** Field name used to organize records into kanban columns or collapsible grouped sections in table, cards, and spreadsheet. */
1181
+ groupBy?: string;
1182
+ /** Field name containing the ISO date string for calendar placement. Required when `layout: 'calendar'`. */
1183
+ dateField?: string;
1184
+ /** Field name for the start date in timeline/gantt views. Required when `layout: 'gantt'`. */
1185
+ startDateField?: string;
1186
+ /** Field name for the end date in timeline/gantt views. Required when `layout: 'gantt'`. */
1187
+ endDateField?: string;
1188
+ /** Field names to show in this view, in order. If omitted, Dyrected infers default display fields. */
1189
+ columns?: string[];
1190
+ /** Default sorting rule when entering the view. */
1191
+ sort?: {
1192
+ field: string;
1193
+ direction: 'asc' | 'desc';
1194
+ };
1195
+ /** Custom workflow actions available in this view. */
1196
+ actions?: ActionConfig[];
1197
+ /** Toggles built-in operations (view/edit/duplicate/delete/export). */
1198
+ features?: ViewActionFeatures;
1199
+ /**
1200
+ * Explicit display order for action buttons — mixing custom action names and built-in names
1201
+ * (`"view"`, `"edit"`, `"duplicate"`, `"delete"`). Unlisted actions append in default order.
1202
+ */
1203
+ actionOrder?: string[];
1204
+ /** KPI summary cards rendered in the hero row above the view. */
1205
+ metrics?: ViewMetric[];
1206
+ /** Role-based access rules controlling who can see or use this view. */
1207
+ access?: AccessConfig;
1208
+ }
1209
+ /**
1210
+ * Options for defining a custom workflow action with `defineAction`.
1211
+ *
1212
+ * @example
1213
+ * ```ts
1214
+ * export const checkInAction = defineAction({
1215
+ * name: "checkIn",
1216
+ * label: "Check In",
1217
+ * icon: "UserCheck",
1218
+ * type: "row",
1219
+ * confirm: "Confirm guest check-in at the door?",
1220
+ * mutation: { checkedIn: true, checkedInAt: "now()" },
1221
+ * });
1222
+ * ```
1223
+ */
1224
+ interface DefineActionOptions<TDoc extends Record<string, unknown> = Record<string, unknown>> {
1225
+ /** Unique action identifier (e.g. `"checkIn"`, `"markPaid"`). */
1226
+ name: string;
1227
+ /** Button label displayed in the UI. */
1228
+ label: string;
1229
+ /** Lucide icon name for the button (e.g. `"UserCheck"`, `"CheckCircle"`). */
1230
+ icon?: string;
1231
+ /** Action placement: `'row'` (per-row), `'bulk'` (multi-row selection bar), or `'header'` (view header). Defaults to `'row'`. */
1232
+ type?: ActionType;
1233
+ /** Optional confirmation prompt shown before executing (e.g. `"Confirm guest check-in at the door?"`). */
1234
+ confirm?: string;
1235
+ /** Optional interactive modal form fields prompting the user for input before executing. */
1236
+ fields?: Field[];
1237
+ /** Declarative database mutation applied to targeted documents (e.g. `{ checkedIn: true, checkedInAt: "now()" }`). */
1238
+ mutation?: Partial<TDoc> | Record<string, unknown>;
1239
+ /** Self-hosted server handler function executed when the action is triggered. */
1240
+ handler?: (context: ActionContext<TDoc>) => Promise<unknown> | unknown;
1241
+ /** Role-based access rules controlling who can trigger this action. */
1242
+ access?: AccessConfig;
1243
+ }
1244
+ /**
1245
+ * Defines a typed operational view for a collection.
1246
+ *
1247
+ * @example
1248
+ * ```ts
1249
+ * export const attendingGuests = defineView({
1250
+ * slug: "attending-guests",
1251
+ * label: "Attending Guests",
1252
+ * icon: "UserCheck",
1253
+ * layout: "table",
1254
+ * groupBy: "tableNumber",
1255
+ * filter: { attending: { equals: true } },
1256
+ * columns: ["name", "email", "guestCount", "checkedIn"],
1257
+ * sort: { field: "name", direction: "asc" },
1258
+ * });
1259
+ * ```
1260
+ */
1261
+ declare function defineView<const T extends DefineViewOptions>(config: T): T;
1262
+ /**
1263
+ * Defines a custom workflow action for an operational view.
1264
+ *
1265
+ * @example
1266
+ * ```ts
1267
+ * export const markPaidAction = defineAction({
1268
+ * name: "markPaid",
1269
+ * label: "Mark Paid",
1270
+ * icon: "DollarSign",
1271
+ * type: "bulk",
1272
+ * confirm: "Mark selected orders as paid?",
1273
+ * mutation: { status: "paid" },
1274
+ * });
1275
+ * ```
1276
+ */
1277
+ declare function defineAction<const T extends DefineActionOptions>(config: T): T;
1278
+
854
1279
  /**
855
1280
  * Configures account lockout behavior for an auth-enabled collection.
856
1281
  *
@@ -1151,6 +1576,11 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
1151
1576
  * Collections with the same `group` are visually grouped together.
1152
1577
  */
1153
1578
  group?: string;
1579
+ /**
1580
+ * Slug of the view to render by default when navigating to `/collections/:slug`.
1581
+ * If not specified, defaults to the view with `default: true` or the all-records table view.
1582
+ */
1583
+ defaultView?: string;
1154
1584
  /** If `true`, this collection is not shown in the Admin UI sidebar. */
1155
1585
  hidden?: boolean;
1156
1586
  /** If `false`, disables the filter UI entirely for this collection. Defaults to `true`. */
@@ -1208,6 +1638,47 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
1208
1638
  * Custom detail view layout configuration for the Admin UI.
1209
1639
  */
1210
1640
  detail?: DetailSchema<TDoc> | false;
1641
+ /**
1642
+ * Slug of the operational view to render by default when navigating to `/collections/:slug`.
1643
+ *
1644
+ * When set:
1645
+ * 1. Navigating to `/collections/:slug` automatically redirects to `/collections/:slug/views/:defaultView`.
1646
+ * 2. The main collection link in the sidebar directly opens this default view.
1647
+ * 3. The sidebar submenu cleanly lists only your defined views without showing a generic `All [Collection]` item.
1648
+ *
1649
+ * @example
1650
+ * ```ts
1651
+ * export const GuestResponses = defineCollection({
1652
+ * slug: "guest-responses",
1653
+ * defaultView: "attending-guests",
1654
+ * views: [attendingGuests, seatingMatrix],
1655
+ * fields: [...],
1656
+ * });
1657
+ * ```
1658
+ */
1659
+ defaultView?: string;
1660
+ /**
1661
+ * Tailored operational workspaces for this collection (`table`, `spreadsheet`, `kanban`, `calendar`, `cards`, `gantt`).
1662
+ * Each view provides curated columns, filters, metrics, and workflow buttons for a specific job.
1663
+ *
1664
+ * @example
1665
+ * ```ts
1666
+ * views: [
1667
+ * defineView({
1668
+ * slug: "attending-guests",
1669
+ * label: "Attending Guests",
1670
+ * icon: "UserCheck",
1671
+ * layout: "table",
1672
+ * groupBy: "tableNumber",
1673
+ * filter: { attending: { equals: true } },
1674
+ * columns: ["name", "email", "guestCount", "checkedIn"],
1675
+ * }),
1676
+ * ]
1677
+ * ```
1678
+ *
1679
+ * @see {@link https://dyrected.com/docs/model-content/operational-views/overview Operational views overview}
1680
+ */
1681
+ views?: ViewConfig[];
1211
1682
  }
1212
1683
  /**
1213
1684
  * Defines a Dyrected global — a singleton document without pagination or IDs.
@@ -1297,90 +1768,6 @@ interface GlobalConfig<TDoc extends object = Record<string, unknown>> {
1297
1768
  detail?: DetailSchema<TDoc> | false;
1298
1769
  }
1299
1770
 
1300
- /**
1301
- * The set of type-cast operations supported during aggregation.
1302
- *
1303
- * Each adapter maps these to its own native conversion primitive
1304
- * (e.g. `$toDouble` in MongoDB, `CAST(x AS REAL)` in SQLite).
1305
- * The public API is always database-independent.
1306
- */
1307
- type AggregateCastType = "number" | "integer" | "float" | "string" | "boolean" | "date";
1308
- /**
1309
- * A `count` aggregate operation.
1310
- *
1311
- * - `count: "*"` — count every document matched by `where`.
1312
- * - `cast` is intentionally absent: counting is document-level,
1313
- * not field-value-level, so type conversion has no meaning here.
1314
- */
1315
- interface CountOperation {
1316
- count: "*";
1317
- where?: Record<string, unknown>;
1318
- }
1319
- /**
1320
- * A `sum`, `avg`, `min`, or `max` aggregate operation on a named field.
1321
- *
1322
- * - `cast` converts stored values before the aggregation runs.
1323
- * Invalid values (e.g. `"unknown"` cast to `number`) become `null`
1324
- * and are ignored by `sum`, `avg`, `min`, and `max`.
1325
- */
1326
- interface NumericOperation {
1327
- sum?: string;
1328
- avg?: string;
1329
- min?: string;
1330
- max?: string;
1331
- cast?: AggregateCastType;
1332
- where?: Record<string, unknown>;
1333
- }
1334
- /**
1335
- * A single named aggregate request — either a count or a numeric operation.
1336
- */
1337
- type AggregateOperation = CountOperation | NumericOperation;
1338
- /**
1339
- * The map of named aggregate operations sent in a single aggregate request.
1340
- *
1341
- * @example
1342
- * ```ts
1343
- * {
1344
- * totalSubmitted: { count: "*" },
1345
- * totalAsoebiYards: { sum: "asoebiYards", cast: "number", where: { wantsAsoebi: { equals: true } } },
1346
- * }
1347
- * ```
1348
- */
1349
- type AggregateInput = Record<string, AggregateOperation>;
1350
- /**
1351
- * The arguments passed to `DatabaseAdapter.aggregate`.
1352
- */
1353
- interface AggregateArgs {
1354
- /** Collection slug. */
1355
- collection: string;
1356
- /** Named aggregate operations to compute. */
1357
- aggregates: AggregateInput;
1358
- }
1359
- /**
1360
- * The result returned by `DatabaseAdapter.aggregate`.
1361
- *
1362
- * Every named key maps to a `number | null`.
1363
- * `null` is returned when no documents matched the aggregate's `where`
1364
- * (applicable to `sum`, `avg`, `min`, `max`).
1365
- * `count` also returns `null` only if the database errors — it normally
1366
- * returns `0` for an empty match set.
1367
- */
1368
- type AggregateResult = Record<string, number | null>;
1369
- /**
1370
- * Derives the typed result shape from an `AggregateInput`.
1371
- * Every named key maps to `number | null`.
1372
- *
1373
- * @example
1374
- * ```ts
1375
- * type Input = { totalSubmitted: CountOperation; totalYards: NumericOperation };
1376
- * type Result = InferAggregateResult<Input>;
1377
- * // => { totalSubmitted: number | null; totalYards: number | null }
1378
- * ```
1379
- */
1380
- type InferAggregateResult<T extends AggregateInput> = {
1381
- [K in keyof T]: number | null;
1382
- };
1383
-
1384
1771
  /**
1385
1772
  * The interface every database adapter must implement.
1386
1773
  *
@@ -2568,4 +2955,4 @@ interface DyrectedConfig<TUser extends AuthenticatedUser = AuthenticatedUser> {
2568
2955
  }>;
2569
2956
  }
2570
2957
 
2571
- export { type RadioField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type ArrayField as J, type BlocksField as K, type LifecycleEventName as L, type BooleanField as M, type AuthConfig as N, type AccessPolicyResolver as O, type PublicAdminAuthConfig as P, type DateField as Q, type DateTimeField as R, type EmailField as S, type IconField as T, type ImageField as U, type JoinField as V, type WorkflowConfig as W, type JsonField as X, type MultiSelectField as Y, type NumberField as Z, type ObjectField as _, type DeclarativeHookExpression as a, type FieldAdminOnChangeHook as a$, type RelationshipField as a0, type RichTextField as a1, type RowField as a2, type SelectField as a3, type TextField as a4, type TextareaField as a5, type TimeField as a6, type UrlField as a7, type AccessFunction as a8, type AccessFunctionArgs as a9, type CollectionAfterDeleteHook as aA, type CollectionAfterReadHook as aB, type CollectionAfterReadHookEntry as aC, type CollectionAfterTransitionHook as aD, type CollectionBeforeChangeHook as aE, type CollectionBeforeChangeHookEntry as aF, type CollectionBeforeDeleteHook as aG, type CollectionBeforeReadHook as aH, type CollectionBeforeReadHookEntry as aI, type CollectionBeforeTransitionHook as aJ, type CollectionListComponentSlots as aK, type CountOperation as aL, type CustomAdminAuthProvider as aM, type DatabaseAdapter as aN, type DateFieldAdmin as aO, type DateFormat as aP, type DetailSpan as aQ, type DisplayTone as aR, type DisplayVariant as aS, type DynamicOptionItem as aT, type DynamicOptionsConfig as aU, type DynamicOptionsResolver as aV, type DynamicOptionsResolverArgs as aW, type DyrectedLoggerConfig as aX, type DyrectedObservabilityConfig as aY, type EmailFieldAdmin as aZ, type FieldAdminHooks as a_, type AccessResult as aa, type AccessRule as ab, type AdminAuthAccessResolution as ac, type AdminAuthClaimMapping as ad, type AdminAuthMember as ae, type AdminAuthProvider as af, type AdminAuthProviderMembersConfig as ag, type AdminAuthProvisioningMode as ah, type AdminAuthResolveAccessArgs as ai, type AdminAuthResolvedIdentity as aj, type AdminConfig as ak, type AdminDashboardComponentSlots as al, type AdminIconName as am, type AggregateArgs as an, type AggregateCastType as ao, type AggregateInput as ap, type AggregateOperation as aq, type AggregateResult as ar, type BaseAdminAuthProvider as as, type BaseFieldAdmin as at, type BlockVariant as au, type BooleanFieldAdmin as av, type BooleanFormat as aw, type CharacterLimitFieldAdmin as ax, type CharacterLimitFieldConfig as ay, type CollectionAfterChangeHook as az, type AuthenticatedUser as b, type FieldAdminOnChangeHookArgs as b0, type FieldAdminOptionsHook as b1, type FieldAdminOptionsHookArgs as b2, type FieldAdminOptionsHookResult as b3, type FieldAfterReadHook as b4, type FieldAfterReadHookArgs as b5, type FieldBase as b6, type FieldBeforeChangeHook as b7, type FieldBeforeChangeHookArgs as b8, type FieldHook as b9, type NumberLimitFieldConfig as bA, type NumericOperation as bB, type OIDCAdminAuthProvider as bC, type OptionFormat as bD, type PaginatedResult as bE, type PublicAdminAuthProvider as bF, type RadioFieldAdmin as bG, type RateLimitConfig as bH, type ReadonlyDatabaseAdapter as bI, type RichTextFeature as bJ, type RichTextFieldConfig as bK, type SelectFieldAdmin as bL, type StorageAdapter as bM, type TextFieldAdmin as bN, type TextFormat as bO, type TextareaFieldAdmin as bP, type TrustProxyConfig as bQ, type TypedField as bR, type UploadConfig as bS, type UrlFieldAdmin as bT, type UrlLinkValue as bU, type WordLimitFieldAdmin as bV, type WordLimitFieldConfig as bW, type WorkflowMetadata as bX, type WorkflowRole as bY, type WorkflowState as bZ, type WorkflowTransitionContext as b_, type FieldHooks as ba, type FieldType as bb, type FileData as bc, type GlobalAfterChangeHook as bd, type GlobalAfterReadHook as be, type GlobalAfterReadHookEntry as bf, type GlobalBeforeChangeHook as bg, type GlobalBeforeChangeHookEntry as bh, type GlobalBeforeReadHook as bi, type GlobalBeforeReadHookEntry as bj, type HeadingLevel as bk, type HookFunction as bl, type IconFieldAdmin as bm, type ImageService as bn, type InferAggregateResult as bo, type JoinFieldAdmin as bp, type JsonFieldAdmin as bq, type JsonFormat as br, LIFECYCLE_EVENT_NAMES as bs, type LifecycleEventHandler as bt, type LinkFormat as bu, type MultiSelectFieldAdmin as bv, type NamedAccessPolicy as bw, type NumberFieldAdmin as bx, type NumberFormat as by, type NumberLimitFieldAdmin as bz, type WorkflowTransition as c, type LifecycleEvent as d, type BaseDocument as e, type DetailComputedOptions as f, type ComputedHandler as g, type DetailComputed as h, type DetailCustomOptions as i, type DetailCustom as j, type DetailDividerOptions as k, type DetailDivider as l, type DisplayFieldOptions as m, type DetailField as n, type DetailItem as o, type DetailGridOptions as p, type DetailGrid as q, type DetailRepeatOptions as r, type DetailRepeat as s, type DetailSectionOptions as t, type DetailSection as u, type DetailTabOptions as v, type DetailTab as w, type DetailTabsOptions as x, type DetailTabs as y, type DetailTextOptions as z };
2958
+ export { type RadioField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type ArrayField as J, type BlocksField as K, type LifecycleEventName as L, type BooleanField as M, type AuthConfig as N, type AccessPolicyResolver as O, type PublicAdminAuthConfig as P, type DateField as Q, type DateTimeField as R, type EmailField as S, type IconField as T, type ImageField as U, type JoinField as V, type WorkflowConfig as W, type JsonField as X, type MultiSelectField as Y, type NumberField as Z, type ObjectField as _, type DeclarativeHookExpression as a, type DynamicOptionItem as a$, type RelationshipField as a0, type RichTextField as a1, type RowField as a2, type SelectField as a3, type TextField as a4, type TextareaField as a5, type TimeField as a6, type UrlField as a7, type AccessConfig as a8, type AccessFunction as a9, type BooleanFormat as aA, type CharacterLimitFieldAdmin as aB, type CharacterLimitFieldConfig as aC, type CollectionAfterChangeHook as aD, type CollectionAfterDeleteHook as aE, type CollectionAfterReadHook as aF, type CollectionAfterReadHookEntry as aG, type CollectionAfterTransitionHook as aH, type CollectionBeforeChangeHook as aI, type CollectionBeforeChangeHookEntry as aJ, type CollectionBeforeDeleteHook as aK, type CollectionBeforeReadHook as aL, type CollectionBeforeReadHookEntry as aM, type CollectionBeforeTransitionHook as aN, type CollectionListComponentSlots as aO, type CountOperation as aP, type CustomAdminAuthProvider as aQ, type DatabaseAdapter as aR, type DateFieldAdmin as aS, type DateFormat as aT, type DefineActionOptions as aU, type DefineViewOptions as aV, type DetailSpan as aW, type DisplayTone as aX, type DisplayVariant as aY, type DistinctCountOperation as aZ, type DistinctValuesOperation as a_, type AccessFunctionArgs as aa, type AccessResult as ab, type AccessRule as ac, type ActionConfig as ad, type ActionContext as ae, type ActionType as af, type AdminAuthAccessResolution as ag, type AdminAuthClaimMapping as ah, type AdminAuthMember as ai, type AdminAuthProvider as aj, type AdminAuthProviderMembersConfig as ak, type AdminAuthProvisioningMode as al, type AdminAuthResolveAccessArgs as am, type AdminAuthResolvedIdentity as an, type AdminConfig as ao, type AdminDashboardComponentSlots as ap, type AdminIconName as aq, type AggregateArgs as ar, type AggregateCastType as as, type AggregateInput as at, type AggregateOperation as au, type AggregateResult as av, type BaseAdminAuthProvider as aw, type BaseFieldAdmin as ax, type BlockVariant as ay, type BooleanFieldAdmin as az, type AuthenticatedUser as b, type UploadConfig as b$, type DynamicOptionsConfig as b0, type DynamicOptionsResolver as b1, type DynamicOptionsResolverArgs as b2, type DyrectedLoggerConfig as b3, type DyrectedObservabilityConfig as b4, type EmailFieldAdmin as b5, type FieldAdminHooks as b6, type FieldAdminOnChangeHook as b7, type FieldAdminOnChangeHookArgs as b8, type FieldAdminOptionsHook as b9, LIFECYCLE_EVENT_NAMES as bA, type LifecycleEventHandler as bB, type LinkFormat as bC, type MetricColor as bD, type MultiSelectFieldAdmin as bE, type NamedAccessPolicy as bF, type NumberFieldAdmin as bG, type NumberFormat as bH, type NumberLimitFieldAdmin as bI, type NumberLimitFieldConfig as bJ, type NumericOperation as bK, type OIDCAdminAuthProvider as bL, type OptionFormat as bM, type PaginatedResult as bN, type PublicAdminAuthProvider as bO, type RadioFieldAdmin as bP, type RateLimitConfig as bQ, type ReadonlyDatabaseAdapter as bR, type RichTextFeature as bS, type RichTextFieldConfig as bT, type SelectFieldAdmin as bU, type StorageAdapter as bV, type TextFieldAdmin as bW, type TextFormat as bX, type TextareaFieldAdmin as bY, type TrustProxyConfig as bZ, type TypedField as b_, type FieldAdminOptionsHookArgs as ba, type FieldAdminOptionsHookResult as bb, type FieldAfterReadHook as bc, type FieldAfterReadHookArgs as bd, type FieldBase as be, type FieldBeforeChangeHook as bf, type FieldBeforeChangeHookArgs as bg, type FieldHook as bh, type FieldHooks as bi, type FieldType as bj, type FileData as bk, type GlobalAfterChangeHook as bl, type GlobalAfterReadHook as bm, type GlobalAfterReadHookEntry as bn, type GlobalBeforeChangeHook as bo, type GlobalBeforeChangeHookEntry as bp, type GlobalBeforeReadHook as bq, type GlobalBeforeReadHookEntry as br, type HeadingLevel as bs, type HookFunction as bt, type IconFieldAdmin as bu, type ImageService as bv, type InferAggregateResult as bw, type JoinFieldAdmin as bx, type JsonFieldAdmin as by, type JsonFormat as bz, type WorkflowTransition as c, type UrlFieldAdmin as c0, type UrlLinkValue as c1, type ViewActionFeatures as c2, type ViewConfig as c3, type ViewLayout as c4, type ViewMetric as c5, type ViewSubMetric as c6, type WordLimitFieldAdmin as c7, type WordLimitFieldConfig as c8, type WorkflowMetadata as c9, type WorkflowRole as ca, type WorkflowState as cb, type WorkflowTransitionContext as cc, defineAction as cd, defineView as ce, type LifecycleEvent as d, type BaseDocument as e, type DetailComputedOptions as f, type ComputedHandler as g, type DetailComputed as h, type DetailCustomOptions as i, type DetailCustom as j, type DetailDividerOptions as k, type DetailDivider as l, type DisplayFieldOptions as m, type DetailField as n, type DetailItem as o, type DetailGridOptions as p, type DetailGrid as q, type DetailRepeatOptions as r, type DetailRepeat as s, type DetailSectionOptions as t, type DetailSection as u, type DetailTabOptions as v, type DetailTab as w, type DetailTabsOptions as x, type DetailTabs as y, type DetailTextOptions as z };