@dyrected/core 2.8.3 → 2.9.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.
- package/dist/{app-config-BccpBUqJ.d.cts → app-config-gEQJFvnN.d.cts} +212 -85
- package/dist/{app-config-BccpBUqJ.d.ts → app-config-gEQJFvnN.d.ts} +212 -85
- package/dist/chunk-JSBRDJBE.js +30 -0
- package/dist/{chunk-GFFGDHST.js → chunk-XRIONGRY.js} +1769 -12
- package/dist/index.cjs +1813 -6
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.js +56 -4
- package/dist/{observability-KCMTV7GO.js → observability-HQF4EUSV.js} +1 -0
- package/dist/server.cjs +1979 -13
- package/dist/server.d.cts +37 -15
- package/dist/server.d.ts +37 -15
- package/dist/server.js +230 -15
- package/dist/{where-sanitizer-WJ2W2QCE.js → where-sanitizer-3MNFMYA2.js} +2 -0
- package/package.json +3 -3
- package/dist/__tests__/access-features.test.d.ts +0 -2
- package/dist/__tests__/access-features.test.d.ts.map +0 -1
- package/dist/__tests__/access-features.test.js +0 -159
- package/dist/__tests__/access-features.test.js.map +0 -1
- package/dist/__tests__/access-parity.test.d.ts +0 -2
- package/dist/__tests__/access-parity.test.d.ts.map +0 -1
- package/dist/__tests__/access-parity.test.js +0 -338
- package/dist/__tests__/access-parity.test.js.map +0 -1
- package/dist/__tests__/access.test.d.ts +0 -2
- package/dist/__tests__/access.test.d.ts.map +0 -1
- package/dist/__tests__/access.test.js +0 -137
- package/dist/__tests__/access.test.js.map +0 -1
- package/dist/__tests__/admin-auth.test.d.ts +0 -2
- package/dist/__tests__/admin-auth.test.d.ts.map +0 -1
- package/dist/__tests__/admin-auth.test.js +0 -440
- package/dist/__tests__/admin-auth.test.js.map +0 -1
- package/dist/__tests__/app.test.d.ts +0 -2
- package/dist/__tests__/app.test.d.ts.map +0 -1
- package/dist/__tests__/app.test.js +0 -112
- package/dist/__tests__/app.test.js.map +0 -1
- package/dist/__tests__/audit.test.d.ts +0 -2
- package/dist/__tests__/audit.test.d.ts.map +0 -1
- package/dist/__tests__/audit.test.js +0 -125
- package/dist/__tests__/audit.test.js.map +0 -1
- package/dist/__tests__/auth-hydration.test.d.ts +0 -2
- package/dist/__tests__/auth-hydration.test.d.ts.map +0 -1
- package/dist/__tests__/auth-hydration.test.js +0 -90
- package/dist/__tests__/auth-hydration.test.js.map +0 -1
- package/dist/__tests__/auth-invite.test.d.ts +0 -2
- package/dist/__tests__/auth-invite.test.d.ts.map +0 -1
- package/dist/__tests__/auth-invite.test.js +0 -152
- package/dist/__tests__/auth-invite.test.js.map +0 -1
- package/dist/__tests__/auth-lockout.test.d.ts +0 -2
- package/dist/__tests__/auth-lockout.test.d.ts.map +0 -1
- package/dist/__tests__/auth-lockout.test.js +0 -154
- package/dist/__tests__/auth-lockout.test.js.map +0 -1
- package/dist/__tests__/auth-sessions.test.d.ts +0 -2
- package/dist/__tests__/auth-sessions.test.d.ts.map +0 -1
- package/dist/__tests__/auth-sessions.test.js +0 -118
- package/dist/__tests__/auth-sessions.test.js.map +0 -1
- package/dist/__tests__/config.test.d.ts +0 -2
- package/dist/__tests__/config.test.d.ts.map +0 -1
- package/dist/__tests__/config.test.js +0 -402
- package/dist/__tests__/config.test.js.map +0 -1
- package/dist/__tests__/define-field.test.d.ts +0 -2
- package/dist/__tests__/define-field.test.d.ts.map +0 -1
- package/dist/__tests__/define-field.test.js +0 -121
- package/dist/__tests__/define-field.test.js.map +0 -1
- package/dist/__tests__/deleteMany.test.d.ts +0 -2
- package/dist/__tests__/deleteMany.test.d.ts.map +0 -1
- package/dist/__tests__/deleteMany.test.js +0 -75
- package/dist/__tests__/deleteMany.test.js.map +0 -1
- package/dist/__tests__/depth.test.d.ts +0 -2
- package/dist/__tests__/depth.test.d.ts.map +0 -1
- package/dist/__tests__/depth.test.js +0 -115
- package/dist/__tests__/depth.test.js.map +0 -1
- package/dist/__tests__/dynamic-options.test.d.ts +0 -2
- package/dist/__tests__/dynamic-options.test.d.ts.map +0 -1
- package/dist/__tests__/dynamic-options.test.js +0 -168
- package/dist/__tests__/dynamic-options.test.js.map +0 -1
- package/dist/__tests__/email.service.test.d.ts +0 -2
- package/dist/__tests__/email.service.test.d.ts.map +0 -1
- package/dist/__tests__/email.service.test.js +0 -52
- package/dist/__tests__/email.service.test.js.map +0 -1
- package/dist/__tests__/field-inference.test-types.d.ts +0 -161
- package/dist/__tests__/field-inference.test-types.d.ts.map +0 -1
- package/dist/__tests__/field-inference.test-types.js +0 -87
- package/dist/__tests__/field-inference.test-types.js.map +0 -1
- package/dist/__tests__/fixtures/editorial-workflow.d.ts +0 -14
- package/dist/__tests__/fixtures/editorial-workflow.d.ts.map +0 -1
- package/dist/__tests__/fixtures/editorial-workflow.js +0 -12
- package/dist/__tests__/fixtures/editorial-workflow.js.map +0 -1
- package/dist/__tests__/hooks.test.d.ts +0 -2
- package/dist/__tests__/hooks.test.d.ts.map +0 -1
- package/dist/__tests__/hooks.test.js +0 -320
- package/dist/__tests__/hooks.test.js.map +0 -1
- package/dist/__tests__/mocks.d.ts +0 -75
- package/dist/__tests__/mocks.d.ts.map +0 -1
- package/dist/__tests__/mocks.js +0 -170
- package/dist/__tests__/mocks.js.map +0 -1
- package/dist/__tests__/observability.test.d.ts +0 -2
- package/dist/__tests__/observability.test.d.ts.map +0 -1
- package/dist/__tests__/observability.test.js +0 -233
- package/dist/__tests__/observability.test.js.map +0 -1
- package/dist/__tests__/openapi.test.d.ts +0 -2
- package/dist/__tests__/openapi.test.d.ts.map +0 -1
- package/dist/__tests__/openapi.test.js +0 -105
- package/dist/__tests__/openapi.test.js.map +0 -1
- package/dist/__tests__/parse-sort.test.d.ts +0 -2
- package/dist/__tests__/parse-sort.test.d.ts.map +0 -1
- package/dist/__tests__/parse-sort.test.js +0 -24
- package/dist/__tests__/parse-sort.test.js.map +0 -1
- package/dist/__tests__/preferences.test.d.ts +0 -2
- package/dist/__tests__/preferences.test.d.ts.map +0 -1
- package/dist/__tests__/preferences.test.js +0 -168
- package/dist/__tests__/preferences.test.js.map +0 -1
- package/dist/__tests__/router.test.d.ts +0 -2
- package/dist/__tests__/router.test.d.ts.map +0 -1
- package/dist/__tests__/router.test.js +0 -70
- package/dist/__tests__/router.test.js.map +0 -1
- package/dist/__tests__/search.test.d.ts +0 -2
- package/dist/__tests__/search.test.d.ts.map +0 -1
- package/dist/__tests__/search.test.js +0 -174
- package/dist/__tests__/search.test.js.map +0 -1
- package/dist/__tests__/upload-validation.test.d.ts +0 -2
- package/dist/__tests__/upload-validation.test.d.ts.map +0 -1
- package/dist/__tests__/upload-validation.test.js +0 -41
- package/dist/__tests__/upload-validation.test.js.map +0 -1
- package/dist/__tests__/where.test.d.ts +0 -2
- package/dist/__tests__/where.test.d.ts.map +0 -1
- package/dist/__tests__/where.test.js +0 -105
- package/dist/__tests__/where.test.js.map +0 -1
- package/dist/__tests__/workflow.test.d.ts +0 -2
- package/dist/__tests__/workflow.test.d.ts.map +0 -1
- package/dist/__tests__/workflow.test.js +0 -684
- package/dist/__tests__/workflow.test.js.map +0 -1
- package/dist/app-config-7G-3tF_I.d.cts +0 -2259
- package/dist/app-config-7G-3tF_I.d.ts +0 -2259
- package/dist/app-config-9hs8DRED.d.cts +0 -1718
- package/dist/app-config-9hs8DRED.d.ts +0 -1718
- package/dist/app-config-B3ByBjCN.d.cts +0 -2222
- package/dist/app-config-B3ByBjCN.d.ts +0 -2222
- package/dist/app-config-B5tYsZaH.d.cts +0 -2404
- package/dist/app-config-B5tYsZaH.d.ts +0 -2404
- package/dist/app-config-BEuyPktb.d.cts +0 -2556
- package/dist/app-config-BEuyPktb.d.ts +0 -2556
- package/dist/app-config-BIkjQWzU.d.cts +0 -2218
- package/dist/app-config-BIkjQWzU.d.ts +0 -2218
- package/dist/app-config-BcuZIpvL.d.cts +0 -1951
- package/dist/app-config-BcuZIpvL.d.ts +0 -1951
- package/dist/app-config-BfpeE3bF.d.cts +0 -2100
- package/dist/app-config-BfpeE3bF.d.ts +0 -2100
- package/dist/app-config-Bm9-2Am6.d.cts +0 -1875
- package/dist/app-config-Bm9-2Am6.d.ts +0 -1875
- package/dist/app-config-BqhrBrSM.d.cts +0 -1522
- package/dist/app-config-BqhrBrSM.d.ts +0 -1522
- package/dist/app-config-Bxg_DVxv.d.cts +0 -1413
- package/dist/app-config-Bxg_DVxv.d.ts +0 -1413
- package/dist/app-config-C0twGIaF.d.cts +0 -1597
- package/dist/app-config-C0twGIaF.d.ts +0 -1597
- package/dist/app-config-C0uxEU7Q.d.cts +0 -1874
- package/dist/app-config-C0uxEU7Q.d.ts +0 -1874
- package/dist/app-config-C3X5BAyK.d.cts +0 -1539
- package/dist/app-config-C3X5BAyK.d.ts +0 -1539
- package/dist/app-config-C9VJ6rTv.d.cts +0 -2092
- package/dist/app-config-C9VJ6rTv.d.ts +0 -2092
- package/dist/app-config-CBOn8IyZ.d.cts +0 -1838
- package/dist/app-config-CBOn8IyZ.d.ts +0 -1838
- package/dist/app-config-CCe-yq9q.d.cts +0 -2222
- package/dist/app-config-CCe-yq9q.d.ts +0 -2222
- package/dist/app-config-CJAGGPrk.d.cts +0 -1900
- package/dist/app-config-CJAGGPrk.d.ts +0 -1900
- package/dist/app-config-CPOs7THF.d.cts +0 -2217
- package/dist/app-config-CPOs7THF.d.ts +0 -2217
- package/dist/app-config-CYV70eoF.d.cts +0 -2100
- package/dist/app-config-CYV70eoF.d.ts +0 -2100
- package/dist/app-config-ChsrBB7p.d.cts +0 -2100
- package/dist/app-config-ChsrBB7p.d.ts +0 -2100
- package/dist/app-config-CiEDJm0e.d.cts +0 -1912
- package/dist/app-config-CiEDJm0e.d.ts +0 -1912
- package/dist/app-config-CstocO9M.d.cts +0 -1580
- package/dist/app-config-CstocO9M.d.ts +0 -1580
- package/dist/app-config-Ctp454zB.d.cts +0 -2214
- package/dist/app-config-Ctp454zB.d.ts +0 -2214
- package/dist/app-config-CwaU1de2.d.cts +0 -1868
- package/dist/app-config-CwaU1de2.d.ts +0 -1868
- package/dist/app-config-DCDh8Gbx.d.cts +0 -1926
- package/dist/app-config-DCDh8Gbx.d.ts +0 -1926
- package/dist/app-config-DCWinlNK.d.cts +0 -2091
- package/dist/app-config-DCWinlNK.d.ts +0 -2091
- package/dist/app-config-DIwvzbpe.d.cts +0 -1555
- package/dist/app-config-DIwvzbpe.d.ts +0 -1555
- package/dist/app-config-DJmNYgYh.d.cts +0 -2305
- package/dist/app-config-DJmNYgYh.d.ts +0 -2305
- package/dist/app-config-DO3laV58.d.cts +0 -2397
- package/dist/app-config-DO3laV58.d.ts +0 -2397
- package/dist/app-config-DVdSospO.d.cts +0 -1842
- package/dist/app-config-DVdSospO.d.ts +0 -1842
- package/dist/app-config-DZf_mmi9.d.cts +0 -2211
- package/dist/app-config-DZf_mmi9.d.ts +0 -2211
- package/dist/app-config-DbK2Tv6i.d.cts +0 -2080
- package/dist/app-config-DbK2Tv6i.d.ts +0 -2080
- package/dist/app-config-Dkndq5ni.d.cts +0 -1580
- package/dist/app-config-Dkndq5ni.d.ts +0 -1580
- package/dist/app-config-Dms6kvE-.d.cts +0 -2072
- package/dist/app-config-Dms6kvE-.d.ts +0 -2072
- package/dist/app-config-DqCipvSI.d.cts +0 -1411
- package/dist/app-config-DqCipvSI.d.ts +0 -1411
- package/dist/app-config-Dv5XACR4.d.cts +0 -2065
- package/dist/app-config-Dv5XACR4.d.ts +0 -2065
- package/dist/app-config-P-SF5nnR.d.cts +0 -1568
- package/dist/app-config-P-SF5nnR.d.ts +0 -1568
- package/dist/app-config-SkUoN5JU.d.cts +0 -2192
- package/dist/app-config-SkUoN5JU.d.ts +0 -2192
- package/dist/app-config-WzqpuZMr.d.cts +0 -2566
- package/dist/app-config-WzqpuZMr.d.ts +0 -2566
- package/dist/app-config-_kkj71CB.d.cts +0 -2010
- package/dist/app-config-_kkj71CB.d.ts +0 -2010
- package/dist/app-config-fEjRm1o9.d.cts +0 -2402
- package/dist/app-config-fEjRm1o9.d.ts +0 -2402
- package/dist/app-config-oU1EGHND.d.cts +0 -1538
- package/dist/app-config-oU1EGHND.d.ts +0 -1538
- package/dist/app-config-ouBRb6Bf.d.cts +0 -1716
- package/dist/app-config-ouBRb6Bf.d.ts +0 -1716
- package/dist/app-config-oz8H_MOX.d.cts +0 -2224
- package/dist/app-config-oz8H_MOX.d.ts +0 -2224
- package/dist/app-config-tITj_0sn.d.cts +0 -1926
- package/dist/app-config-tITj_0sn.d.ts +0 -1926
- package/dist/app-config-wnLtFu6c.d.cts +0 -1538
- package/dist/app-config-wnLtFu6c.d.ts +0 -1538
- package/dist/app-config-x-CnipcA.d.cts +0 -2072
- package/dist/app-config-x-CnipcA.d.ts +0 -2072
- package/dist/app.d.ts +0 -35
- package/dist/app.d.ts.map +0 -1
- package/dist/app.js +0 -164
- package/dist/app.js.map +0 -1
- package/dist/auth/access.d.ts +0 -5
- package/dist/auth/access.d.ts.map +0 -1
- package/dist/auth/access.js +0 -59
- package/dist/auth/access.js.map +0 -1
- package/dist/auth/jexl.d.ts +0 -13
- package/dist/auth/jexl.d.ts.map +0 -1
- package/dist/auth/jexl.js +0 -30
- package/dist/auth/jexl.js.map +0 -1
- package/dist/auth/lockout.d.ts +0 -11
- package/dist/auth/lockout.d.ts.map +0 -1
- package/dist/auth/lockout.js +0 -37
- package/dist/auth/lockout.js.map +0 -1
- package/dist/auth/password.d.ts +0 -10
- package/dist/auth/password.d.ts.map +0 -1
- package/dist/auth/password.js +0 -28
- package/dist/auth/password.js.map +0 -1
- package/dist/auth/sessions.d.ts +0 -39
- package/dist/auth/sessions.d.ts.map +0 -1
- package/dist/auth/sessions.js +0 -126
- package/dist/auth/sessions.js.map +0 -1
- package/dist/auth/token.d.ts +0 -23
- package/dist/auth/token.d.ts.map +0 -1
- package/dist/auth/token.js +0 -40
- package/dist/auth/token.js.map +0 -1
- package/dist/chunk-23NM4LDU.js +0 -2883
- package/dist/chunk-2TKDCCIR.js +0 -2622
- package/dist/chunk-2UXLA4YN.js +0 -3139
- package/dist/chunk-2WODKOUB.js +0 -1627
- package/dist/chunk-35NM2WPO.js +0 -1658
- package/dist/chunk-3CMG2BH2.js +0 -1618
- package/dist/chunk-3SFITPX4.js +0 -2628
- package/dist/chunk-3TRRTN6U.js +0 -3441
- package/dist/chunk-57FNM42D.js +0 -2392
- package/dist/chunk-5U2WRCNH.js +0 -3140
- package/dist/chunk-5ZIA5COH.js +0 -3414
- package/dist/chunk-6TWQ6GTD.js +0 -3480
- package/dist/chunk-AKYYGMFS.js +0 -3365
- package/dist/chunk-AQO4HI2Y.js +0 -3204
- package/dist/chunk-BAMX7YUC.js +0 -1815
- package/dist/chunk-BQV3QW3Y.js +0 -2588
- package/dist/chunk-CQVTQ67D.js +0 -2632
- package/dist/chunk-CUOPCOU2.js +0 -1644
- package/dist/chunk-DCY7QHRB.js +0 -1637
- package/dist/chunk-DFBLNYUH.js +0 -3402
- package/dist/chunk-EH3MJGB5.js +0 -2571
- package/dist/chunk-EJG6AMYB.js +0 -3537
- package/dist/chunk-ELHRRPKX.js +0 -2863
- package/dist/chunk-EOW4YMAV.js +0 -1637
- package/dist/chunk-G43REXPX.js +0 -3147
- package/dist/chunk-GFKBPBJJ.js +0 -3637
- package/dist/chunk-HRLSFTLR.js +0 -3061
- package/dist/chunk-JFA22YFB.js +0 -1625
- package/dist/chunk-K3ASMUKV.js +0 -2601
- package/dist/chunk-KEKOEAX6.js +0 -3139
- package/dist/chunk-L65PQYDP.js +0 -1536
- package/dist/chunk-LFGSRQLX.js +0 -3568
- package/dist/chunk-M3HKRN7E.js +0 -1665
- package/dist/chunk-MQZH7RQC.js +0 -1667
- package/dist/chunk-NNZRYF3U.js +0 -3537
- package/dist/chunk-PRQ2RF5C.js +0 -3485
- package/dist/chunk-PYE2JSY4.js +0 -3568
- package/dist/chunk-PZMDK3MH.js +0 -3203
- package/dist/chunk-QCXLDKZO.js +0 -3272
- package/dist/chunk-QTIAQBNH.js +0 -3097
- package/dist/chunk-ROECUARS.js +0 -2615
- package/dist/chunk-SM32ND5M.js +0 -3472
- package/dist/chunk-T2DGC4MD.js +0 -3008
- package/dist/chunk-T626OZMH.js +0 -2602
- package/dist/chunk-TEGRS6J7.js +0 -2609
- package/dist/chunk-TLU77TLE.js +0 -3203
- package/dist/chunk-UKUEKTAO.js +0 -513
- package/dist/chunk-VCYYBN5J.js +0 -1873
- package/dist/chunk-VM43G3IG.js +0 -506
- package/dist/chunk-VWJKFZQU.js +0 -3139
- package/dist/chunk-WF5A6PDJ.js +0 -1618
- package/dist/chunk-WVD7PORQ.js +0 -1672
- package/dist/chunk-XX7N64NL.js +0 -3550
- package/dist/chunk-XZLIBQSO.js +0 -2397
- package/dist/chunk-YEBCT77K.js +0 -3269
- package/dist/chunk-YSSHLGQ6.js +0 -3139
- package/dist/chunk-YXEKNN5X.js +0 -3085
- package/dist/chunk-Z7CFUYVP.js +0 -3653
- package/dist/chunk-ZISFMAEL.js +0 -3550
- package/dist/controllers/admin-auth.controller.d.ts +0 -71
- package/dist/controllers/admin-auth.controller.d.ts.map +0 -1
- package/dist/controllers/admin-auth.controller.js +0 -450
- package/dist/controllers/admin-auth.controller.js.map +0 -1
- package/dist/controllers/audit.controller.d.ts +0 -42
- package/dist/controllers/audit.controller.d.ts.map +0 -1
- package/dist/controllers/audit.controller.js +0 -149
- package/dist/controllers/audit.controller.js.map +0 -1
- package/dist/controllers/auth.controller.d.ts +0 -143
- package/dist/controllers/auth.controller.d.ts.map +0 -1
- package/dist/controllers/auth.controller.js +0 -572
- package/dist/controllers/auth.controller.js.map +0 -1
- package/dist/controllers/collection.controller.d.ts +0 -170
- package/dist/controllers/collection.controller.d.ts.map +0 -1
- package/dist/controllers/collection.controller.js +0 -1033
- package/dist/controllers/collection.controller.js.map +0 -1
- package/dist/controllers/global.controller.d.ts +0 -20
- package/dist/controllers/global.controller.d.ts.map +0 -1
- package/dist/controllers/global.controller.js +0 -182
- package/dist/controllers/global.controller.js.map +0 -1
- package/dist/controllers/media.controller.d.ts +0 -39
- package/dist/controllers/media.controller.d.ts.map +0 -1
- package/dist/controllers/media.controller.js +0 -178
- package/dist/controllers/media.controller.js.map +0 -1
- package/dist/controllers/preview.controller.d.ts +0 -37
- package/dist/controllers/preview.controller.d.ts.map +0 -1
- package/dist/controllers/preview.controller.js +0 -48
- package/dist/controllers/preview.controller.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/middleware/auth.d.ts +0 -19
- package/dist/middleware/auth.d.ts.map +0 -1
- package/dist/middleware/auth.js +0 -157
- package/dist/middleware/auth.js.map +0 -1
- package/dist/middleware/rate-limit.d.ts +0 -9
- package/dist/middleware/rate-limit.d.ts.map +0 -1
- package/dist/middleware/rate-limit.js +0 -75
- package/dist/middleware/rate-limit.js.map +0 -1
- package/dist/network.d.ts +0 -6
- package/dist/network.d.ts.map +0 -1
- package/dist/network.js +0 -70
- package/dist/network.js.map +0 -1
- package/dist/observability-CNM4QFE4.js +0 -34
- package/dist/observability-L5BORBB2.js +0 -34
- package/dist/observability.d.ts +0 -113
- package/dist/observability.d.ts.map +0 -1
- package/dist/observability.js +0 -497
- package/dist/observability.js.map +0 -1
- package/dist/router.d.ts +0 -8
- package/dist/router.d.ts.map +0 -1
- package/dist/router.js +0 -704
- package/dist/router.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/services/audit.service.d.ts +0 -23
- package/dist/services/audit.service.d.ts.map +0 -1
- package/dist/services/audit.service.js +0 -39
- package/dist/services/audit.service.js.map +0 -1
- package/dist/services/defaults.service.d.ts +0 -8
- package/dist/services/defaults.service.d.ts.map +0 -1
- package/dist/services/defaults.service.js +0 -55
- package/dist/services/defaults.service.js.map +0 -1
- package/dist/services/email-template.d.ts +0 -46
- package/dist/services/email-template.d.ts.map +0 -1
- package/dist/services/email-template.js +0 -88
- package/dist/services/email-template.js.map +0 -1
- package/dist/services/email.service.d.ts +0 -34
- package/dist/services/email.service.d.ts.map +0 -1
- package/dist/services/email.service.js +0 -129
- package/dist/services/email.service.js.map +0 -1
- package/dist/services/media.service.d.ts +0 -20
- package/dist/services/media.service.d.ts.map +0 -1
- package/dist/services/media.service.js +0 -49
- package/dist/services/media.service.js.map +0 -1
- package/dist/services/population.service.d.ts +0 -20
- package/dist/services/population.service.d.ts.map +0 -1
- package/dist/services/population.service.js +0 -224
- package/dist/services/population.service.js.map +0 -1
- package/dist/types/access.d.ts +0 -48
- package/dist/types/access.d.ts.map +0 -1
- package/dist/types/access.js +0 -2
- package/dist/types/access.js.map +0 -1
- package/dist/types/adapters.d.ts +0 -152
- package/dist/types/adapters.d.ts.map +0 -1
- package/dist/types/adapters.js +0 -2
- package/dist/types/adapters.js.map +0 -1
- package/dist/types/admin-auth.d.ts +0 -132
- package/dist/types/admin-auth.d.ts.map +0 -1
- package/dist/types/admin-auth.js +0 -2
- package/dist/types/admin-auth.js.map +0 -1
- package/dist/types/admin.d.ts +0 -86
- package/dist/types/admin.d.ts.map +0 -1
- package/dist/types/admin.js +0 -2
- package/dist/types/admin.js.map +0 -1
- package/dist/types/app-config.d.ts +0 -279
- package/dist/types/app-config.d.ts.map +0 -1
- package/dist/types/app-config.js +0 -2
- package/dist/types/app-config.js.map +0 -1
- package/dist/types/documents.d.ts +0 -65
- package/dist/types/documents.d.ts.map +0 -1
- package/dist/types/documents.js +0 -2
- package/dist/types/documents.js.map +0 -1
- package/dist/types/hooks.d.ts +0 -122
- package/dist/types/hooks.d.ts.map +0 -1
- package/dist/types/hooks.js +0 -2
- package/dist/types/hooks.js.map +0 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -13
- package/dist/types/index.js.map +0 -1
- package/dist/types/request.d.ts +0 -42
- package/dist/types/request.d.ts.map +0 -1
- package/dist/types/request.js +0 -2
- package/dist/types/request.js.map +0 -1
- package/dist/types/schema-config.d.ts +0 -443
- package/dist/types/schema-config.d.ts.map +0 -1
- package/dist/types/schema-config.js +0 -2
- package/dist/types/schema-config.js.map +0 -1
- package/dist/types/schema-core.d.ts +0 -628
- package/dist/types/schema-core.d.ts.map +0 -1
- package/dist/types/schema-core.js +0 -2
- package/dist/types/schema-core.js.map +0 -1
- package/dist/types/schema-inference.d.ts +0 -73
- package/dist/types/schema-inference.d.ts.map +0 -1
- package/dist/types/schema-inference.js +0 -2
- package/dist/types/schema-inference.js.map +0 -1
- package/dist/types/workflows.d.ts +0 -121
- package/dist/types/workflows.d.ts.map +0 -1
- package/dist/types/workflows.js +0 -7
- package/dist/types/workflows.js.map +0 -1
- package/dist/utils/access-control.d.ts +0 -35
- package/dist/utils/access-control.d.ts.map +0 -1
- package/dist/utils/access-control.js +0 -161
- package/dist/utils/access-control.js.map +0 -1
- package/dist/utils/admin-auth.d.ts +0 -5
- package/dist/utils/admin-auth.d.ts.map +0 -1
- package/dist/utils/admin-auth.js +0 -39
- package/dist/utils/admin-auth.js.map +0 -1
- package/dist/utils/block-references.d.ts +0 -10
- package/dist/utils/block-references.d.ts.map +0 -1
- package/dist/utils/block-references.js +0 -100
- package/dist/utils/block-references.js.map +0 -1
- package/dist/utils/collection-search.d.ts +0 -11
- package/dist/utils/collection-search.d.ts.map +0 -1
- package/dist/utils/collection-search.js +0 -204
- package/dist/utils/collection-search.js.map +0 -1
- package/dist/utils/config.d.ts +0 -8
- package/dist/utils/config.d.ts.map +0 -1
- package/dist/utils/config.js +0 -336
- package/dist/utils/config.js.map +0 -1
- package/dist/utils/hooks.d.ts +0 -41
- package/dist/utils/hooks.d.ts.map +0 -1
- package/dist/utils/hooks.js +0 -177
- package/dist/utils/hooks.js.map +0 -1
- package/dist/utils/openapi.d.ts +0 -6
- package/dist/utils/openapi.d.ts.map +0 -1
- package/dist/utils/openapi.js +0 -981
- package/dist/utils/openapi.js.map +0 -1
- package/dist/utils/parse-sort.d.ts +0 -43
- package/dist/utils/parse-sort.d.ts.map +0 -1
- package/dist/utils/parse-sort.js +0 -70
- package/dist/utils/parse-sort.js.map +0 -1
- package/dist/utils/parse-where.d.ts +0 -69
- package/dist/utils/parse-where.d.ts.map +0 -1
- package/dist/utils/parse-where.js +0 -202
- package/dist/utils/parse-where.js.map +0 -1
- package/dist/utils/readonly-db.d.ts +0 -9
- package/dist/utils/readonly-db.d.ts.map +0 -1
- package/dist/utils/readonly-db.js +0 -21
- package/dist/utils/readonly-db.js.map +0 -1
- package/dist/utils/swagger.d.ts +0 -11
- package/dist/utils/swagger.d.ts.map +0 -1
- package/dist/utils/swagger.js +0 -62
- package/dist/utils/swagger.js.map +0 -1
- package/dist/utils/upload-validation.d.ts +0 -23
- package/dist/utils/upload-validation.d.ts.map +0 -1
- package/dist/utils/upload-validation.js +0 -46
- package/dist/utils/upload-validation.js.map +0 -1
- package/dist/utils/where-sanitizer.d.ts +0 -10
- package/dist/utils/where-sanitizer.d.ts.map +0 -1
- package/dist/utils/where-sanitizer.js +0 -67
- package/dist/utils/where-sanitizer.js.map +0 -1
- package/dist/workflows.d.ts +0 -86
- package/dist/workflows.d.ts.map +0 -1
- package/dist/workflows.js +0 -405
- package/dist/workflows.js.map +0 -1
package/dist/types/request.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimum HTTP request context passed to every server-side hook and resolver.
|
|
3
|
-
*
|
|
4
|
-
* The full Web Standard `Request` is available as `raw` when you need it, but
|
|
5
|
-
* most hooks only need `query` (URL search parameters).
|
|
6
|
-
*/
|
|
7
|
-
export interface HookRequestContext {
|
|
8
|
-
/** Parsed URL query-string parameters, e.g. `{ page: '2', search: 'hello' }`. */
|
|
9
|
-
query: Record<string, string>;
|
|
10
|
-
/** Incoming HTTP headers, lowercased. */
|
|
11
|
-
headers: Record<string, string>;
|
|
12
|
-
/** The raw Web Standard `Request` object. Useful for streaming or advanced header inspection. */
|
|
13
|
-
raw?: Request;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Base shape of an authenticated user as decoded from the JWT.
|
|
17
|
-
*
|
|
18
|
-
* The actual shape will include every field on your auth collection — this
|
|
19
|
-
* interface only guarantees the properties that Dyrected always stamps on the
|
|
20
|
-
* token. Extend it in your own codebase for stronger typing:
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* declare module '@dyrected/core' {
|
|
24
|
-
* interface AuthenticatedUser {
|
|
25
|
-
* role: 'admin' | 'editor'
|
|
26
|
-
* organizationId: string
|
|
27
|
-
* }
|
|
28
|
-
* }
|
|
29
|
-
*/
|
|
30
|
-
export interface AuthenticatedUser {
|
|
31
|
-
/** The user's document ID in the database. */
|
|
32
|
-
sub: string;
|
|
33
|
-
/** The user's email address. */
|
|
34
|
-
email?: string;
|
|
35
|
-
/** Slug of the collection this user was authenticated against. */
|
|
36
|
-
collection: string;
|
|
37
|
-
/** Array of role strings, if your auth collection has a `roles` field. */
|
|
38
|
-
roles?: string[];
|
|
39
|
-
/** Any additional fields from the auth collection document. */
|
|
40
|
-
[key: string]: unknown;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/types/request.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,iGAAiG;IACjG,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,+DAA+D;IAC/D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
package/dist/types/request.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/types/request.ts"],"names":[],"mappings":""}
|
|
@@ -1,443 +0,0 @@
|
|
|
1
|
-
import type { AdminIconName, CollectionListComponentSlots } from "./admin.js";
|
|
2
|
-
import type { AccessRule } from "./access.js";
|
|
3
|
-
import type { CollectionAfterChangeHook, CollectionAfterDeleteHook, CollectionAfterReadHook, CollectionBeforeChangeHook, CollectionBeforeDeleteHook, CollectionBeforeReadHook, GlobalAfterChangeHook, GlobalAfterReadHook, GlobalBeforeChangeHook, GlobalBeforeReadHook } from "./hooks.js";
|
|
4
|
-
import type { Field, UploadConfig } from "./schema-core.js";
|
|
5
|
-
import type { WorkflowConfig } from "./workflows.js";
|
|
6
|
-
/**
|
|
7
|
-
* Configures account lockout behavior for an auth-enabled collection.
|
|
8
|
-
*
|
|
9
|
-
* This protects collection login endpoints from repeated password guessing by
|
|
10
|
-
* temporarily locking an account after too many failed attempts.
|
|
11
|
-
*/
|
|
12
|
-
export interface AuthConfig {
|
|
13
|
-
/**
|
|
14
|
-
* How many failed login attempts are allowed before the account is locked.
|
|
15
|
-
*
|
|
16
|
-
* Defaults to `5`. Set to `0` to disable Dyrected's built-in account lockout
|
|
17
|
-
* for this collection.
|
|
18
|
-
*/
|
|
19
|
-
maxLoginAttempts?: number;
|
|
20
|
-
/**
|
|
21
|
-
* How long, in milliseconds, an account stays locked after reaching the
|
|
22
|
-
* failed-attempt limit.
|
|
23
|
-
*
|
|
24
|
-
* Defaults to `10 * 60 * 1000` (10 minutes).
|
|
25
|
-
*/
|
|
26
|
-
lockTime?: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Use this contract when you want the exact shape of a collection config.
|
|
30
|
-
*
|
|
31
|
-
* Most collection work comes down to a small set of top-level options: giving
|
|
32
|
-
* the collection a stable slug, defining its fields, deciding how it should
|
|
33
|
-
* appear in the Admin UI, and choosing whether it also handles access, hooks,
|
|
34
|
-
* auth, uploads, workflows, or other optional behavior.
|
|
35
|
-
*
|
|
36
|
-
* Pass your document's TypeScript type as the generic parameter `TDoc` to get
|
|
37
|
-
* fully typed hooks and access functions.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* interface Post {
|
|
42
|
-
* id: string
|
|
43
|
-
* title: string
|
|
44
|
-
* slug: string
|
|
45
|
-
* status: 'draft' | 'published'
|
|
46
|
-
* publishedAt?: string
|
|
47
|
-
* }
|
|
48
|
-
*
|
|
49
|
-
* export const Posts = defineCollection<Post>({
|
|
50
|
-
* slug: 'posts',
|
|
51
|
-
* hooks: {
|
|
52
|
-
* beforeChange: [({ data, operation }) => {
|
|
53
|
-
* // `data` is typed as Partial<Post>
|
|
54
|
-
* if (operation === 'create') return { ...data, status: 'draft' }
|
|
55
|
-
* return data
|
|
56
|
-
* }],
|
|
57
|
-
* afterChange: [({ doc, previousDoc }) => {
|
|
58
|
-
* // `doc` and `previousDoc` are typed as Post
|
|
59
|
-
* if (doc.status !== previousDoc?.status) notifySubscribers(doc)
|
|
60
|
-
* }],
|
|
61
|
-
* },
|
|
62
|
-
* fields: [...],
|
|
63
|
-
* })
|
|
64
|
-
* ```
|
|
65
|
-
*
|
|
66
|
-
* @see {@link https://dyrected.com/docs/basics/configuration/collections Collections documentation}
|
|
67
|
-
* @template TDoc The TypeScript shape of a document in this collection.
|
|
68
|
-
* Defaults to `Record<string, unknown>` for untyped usage.
|
|
69
|
-
*/
|
|
70
|
-
export interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
|
|
71
|
-
/**
|
|
72
|
-
* Unique identifier for this collection.
|
|
73
|
-
*
|
|
74
|
-
* Dyrected uses the slug for API routes, SDK calls, Admin URLs, and as the
|
|
75
|
-
* underlying database table or collection name. Treat it as part of the
|
|
76
|
-
* long-term data contract rather than a cosmetic label.
|
|
77
|
-
*
|
|
78
|
-
* Use kebab-case, for example `'blog-posts'`, `'team-members'`, or
|
|
79
|
-
* `'contact-submissions'`.
|
|
80
|
-
*/
|
|
81
|
-
slug: string;
|
|
82
|
-
/**
|
|
83
|
-
* Restricts this collection to one specific site in a multi-tenant setup.
|
|
84
|
-
*
|
|
85
|
-
* Use this when the collection should belong to a single site rather than
|
|
86
|
-
* the whole installation. When set, only requests bearing a matching
|
|
87
|
-
* `X-Site-Id` header can access it.
|
|
88
|
-
*/
|
|
89
|
-
siteId?: string;
|
|
90
|
-
/**
|
|
91
|
-
* If `true`, this collection is shared across all sites in a multi-tenant
|
|
92
|
-
* setup and accessible regardless of the `X-Site-Id` header.
|
|
93
|
-
*
|
|
94
|
-
* Use this for content that should stay common across sites, such as shared
|
|
95
|
-
* taxonomies, reusable assets, or centrally managed reference data.
|
|
96
|
-
*/
|
|
97
|
-
shared?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Human-readable names for documents in this collection, shown in the Admin UI.
|
|
100
|
-
*
|
|
101
|
-
* Use this when the slug is technical or when you want the dashboard to read
|
|
102
|
-
* more naturally. For example, `slug: 'people'` might use
|
|
103
|
-
* `labels: { singular: 'Person', plural: 'People' }`.
|
|
104
|
-
*
|
|
105
|
-
* @see {@link https://dyrected.com/docs/basics/configuration/collections#labels Collections labels}
|
|
106
|
-
*/
|
|
107
|
-
labels?: {
|
|
108
|
-
singular: string;
|
|
109
|
-
plural: string;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* If `true` or an auth config object, this collection is an auth collection. It gains
|
|
113
|
-
* `POST /api/collections/:slug/login` and `POST /api/collections/:slug/logout`
|
|
114
|
-
* endpoints, and documents are expected to have a `password` field.
|
|
115
|
-
*
|
|
116
|
-
* Turn this on when each document should behave like an account that can log
|
|
117
|
-
* in, hold credentials, and participate in user flows. Typical examples are
|
|
118
|
-
* `users`, `admins`, `members`, or `customers`.
|
|
119
|
-
*
|
|
120
|
-
* Pass an object when you want to tune built-in account lockout behavior for
|
|
121
|
-
* repeated failed logins.
|
|
122
|
-
*
|
|
123
|
-
* @see {@link https://dyrected.com/docs/features/authentication/overview Authentication overview}
|
|
124
|
-
*/
|
|
125
|
-
auth?: boolean | AuthConfig;
|
|
126
|
-
/**
|
|
127
|
-
* If `true` or a config object, this collection supports file uploads.
|
|
128
|
-
* Documents gain file-related fields (`url`, `filename`, `mimeType`, etc.)
|
|
129
|
-
* and the create endpoint accepts `multipart/form-data`.
|
|
130
|
-
*
|
|
131
|
-
* Turn this on when each document in the collection should represent a
|
|
132
|
-
* stored file, such as an image, PDF, video, or downloadable asset.
|
|
133
|
-
*
|
|
134
|
-
* @see {@link https://dyrected.com/docs/features/upload/overview Upload overview}
|
|
135
|
-
*/
|
|
136
|
-
upload?: boolean | UploadConfig;
|
|
137
|
-
/**
|
|
138
|
-
* Field definitions that make up the document schema for this collection.
|
|
139
|
-
*
|
|
140
|
-
* This is the main schema contract for every document in the collection. It
|
|
141
|
-
* decides what editors can fill in, how data is validated, how records are
|
|
142
|
-
* stored, and what the API and SDK return.
|
|
143
|
-
*
|
|
144
|
-
* In practice, fields are where you model the actual content structure of the
|
|
145
|
-
* collection: simple values such as text and dates, relationships to other
|
|
146
|
-
* collections, nested objects and arrays, and flexible `blocks` fields for
|
|
147
|
-
* reusable page sections or long-form layouts.
|
|
148
|
-
*
|
|
149
|
-
* @see {@link https://dyrected.com/docs/basics/fields/overview Fields overview}
|
|
150
|
-
* @see {@link https://dyrected.com/docs/basics/fields/blocks Blocks and page sections}
|
|
151
|
-
*/
|
|
152
|
-
fields: Field[];
|
|
153
|
-
/**
|
|
154
|
-
* If `true`, Dyrected automatically adds the built-in system fields
|
|
155
|
-
* `createdAt`, `updatedAt`, `createdBy`, and `updatedBy` to every document.
|
|
156
|
-
* Defaults to `true`.
|
|
157
|
-
*/
|
|
158
|
-
timestamps?: boolean;
|
|
159
|
-
/**
|
|
160
|
-
* Initial documents to seed into this collection the first time it is
|
|
161
|
-
* fetched and found to be empty.
|
|
162
|
-
*
|
|
163
|
-
* Use this for starter records, demo content, or sensible defaults that
|
|
164
|
-
* should appear automatically before editors create anything themselves.
|
|
165
|
-
*/
|
|
166
|
-
initialData?: Partial<TDoc>[];
|
|
167
|
-
/**
|
|
168
|
-
* If `true`, every create, update, and delete operation on this collection
|
|
169
|
-
* is logged to the `__audit` collection with before/after snapshots and the
|
|
170
|
-
* acting user's identity.
|
|
171
|
-
*
|
|
172
|
-
* Turn this on when you need accountability around changes, such as knowing
|
|
173
|
-
* who changed what, inspecting before-and-after state, or supporting
|
|
174
|
-
* compliance and operational review.
|
|
175
|
-
*/
|
|
176
|
-
audit?: boolean;
|
|
177
|
-
/**
|
|
178
|
-
* Optional state-machine workflow for this collection. Workflow-enabled
|
|
179
|
-
* entries keep an editable working revision and an independent public
|
|
180
|
-
* snapshot, so editing published content never changes the live response.
|
|
181
|
-
*
|
|
182
|
-
* Use this when content moves through stages such as draft, review, and
|
|
183
|
-
* published, or when teams need an approval process before changes go live.
|
|
184
|
-
*/
|
|
185
|
-
workflow?: WorkflowConfig<TDoc>;
|
|
186
|
-
/**
|
|
187
|
-
* If `true`, enables zero-config draft and publish functionality.
|
|
188
|
-
* Documents start as drafts, editors can save working drafts without affecting
|
|
189
|
-
* live content, and any authorized editor can publish or unpublish entries.
|
|
190
|
-
*/
|
|
191
|
-
drafts?: boolean;
|
|
192
|
-
/**
|
|
193
|
-
* Collection-level access control.
|
|
194
|
-
*
|
|
195
|
-
* Each key is an operation; the value can be a function, a Jexl string, a
|
|
196
|
-
* boolean, or a named policy reference. Returning `true` allows access and
|
|
197
|
-
* `false` denies it. Returning a `where`-style object grants access only to
|
|
198
|
-
* matching documents.
|
|
199
|
-
*
|
|
200
|
-
* @example
|
|
201
|
-
* access: {
|
|
202
|
-
* read: () => true,
|
|
203
|
-
* create: ({ user }) => !!user,
|
|
204
|
-
* update: ({ user }) => user?.roles?.includes('editor') ?? false,
|
|
205
|
-
* delete: ({ user }) => user?.roles?.includes('admin') ?? false,
|
|
206
|
-
* }
|
|
207
|
-
*
|
|
208
|
-
* @see {@link https://dyrected.com/docs/basics/access-control/overview Access control overview}
|
|
209
|
-
*/
|
|
210
|
-
access?: {
|
|
211
|
-
read?: AccessRule<TDoc>;
|
|
212
|
-
create?: AccessRule<TDoc>;
|
|
213
|
-
update?: AccessRule<TDoc>;
|
|
214
|
-
delete?: AccessRule<TDoc>;
|
|
215
|
-
/**
|
|
216
|
-
* Controls who can read this collection's audit log (`GET /:slug/__audit`),
|
|
217
|
-
* for collections with `audit` enabled. Falls back to the `read` rule when
|
|
218
|
-
* omitted, so the audit trail is visible to whoever can read the documents.
|
|
219
|
-
* Set it explicitly to gate the audit log separately — for example, admins
|
|
220
|
-
* only, even on a collection anyone can read.
|
|
221
|
-
*/
|
|
222
|
-
readAudit?: AccessRule<TDoc>;
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* Collection-level lifecycle hooks.
|
|
226
|
-
*
|
|
227
|
-
* Hooks run in the order they appear in the array. The return value of each
|
|
228
|
-
* hook is passed as the input to the next. Throwing inside any hook aborts
|
|
229
|
-
* the operation and returns a `500` error.
|
|
230
|
-
*
|
|
231
|
-
* See the Hooks reference for the full lifecycle diagram.
|
|
232
|
-
*
|
|
233
|
-
* @see {@link https://dyrected.com/docs/basics/hooks/overview Hooks overview}
|
|
234
|
-
* @see {@link https://dyrected.com/docs/basics/hooks/collections Collection hooks}
|
|
235
|
-
*/
|
|
236
|
-
hooks?: {
|
|
237
|
-
/**
|
|
238
|
-
* Runs before the database is queried. Return a modified `where` object
|
|
239
|
-
* to override the query filter.
|
|
240
|
-
*/
|
|
241
|
-
beforeRead?: CollectionBeforeReadHook[];
|
|
242
|
-
/**
|
|
243
|
-
* Runs after documents are fetched. Return a modified doc to change what
|
|
244
|
-
* the client receives. Runs on every document in a list response.
|
|
245
|
-
*/
|
|
246
|
-
afterRead?: CollectionAfterReadHook<TDoc>[];
|
|
247
|
-
/**
|
|
248
|
-
* Runs before create or update. Return modified data to change what is
|
|
249
|
-
* written to the database. Throw to abort the write entirely.
|
|
250
|
-
*/
|
|
251
|
-
beforeChange?: CollectionBeforeChangeHook<TDoc>[];
|
|
252
|
-
/**
|
|
253
|
-
* Runs after create or update is committed. For side-effects only:
|
|
254
|
-
* webhooks, cache busting, and notifications. Return value is ignored.
|
|
255
|
-
*
|
|
256
|
-
* Errors are isolated: caught, logged, and discarded so a failing
|
|
257
|
-
* side-effect never turns a successful write into an HTTP 500.
|
|
258
|
-
* See `CollectionAfterChangeHook` for await-vs-fire-and-forget guidance.
|
|
259
|
-
*/
|
|
260
|
-
afterChange?: CollectionAfterChangeHook<TDoc>[];
|
|
261
|
-
/** Runs before a document is deleted. Throw to cancel the deletion. */
|
|
262
|
-
beforeDelete?: CollectionBeforeDeleteHook<TDoc>[];
|
|
263
|
-
/**
|
|
264
|
-
* Runs after a document has been deleted. For cleanup side-effects only.
|
|
265
|
-
*
|
|
266
|
-
* Errors are isolated: caught, logged, and discarded. The deletion is
|
|
267
|
-
* already committed and will not be undone.
|
|
268
|
-
*/
|
|
269
|
-
afterDelete?: CollectionAfterDeleteHook<TDoc>[];
|
|
270
|
-
};
|
|
271
|
-
/**
|
|
272
|
-
* Admin UI configuration for this collection.
|
|
273
|
-
*
|
|
274
|
-
* @see {@link https://dyrected.com/docs/basics/configuration/collections#admin-options Admin options}
|
|
275
|
-
*/
|
|
276
|
-
admin?: {
|
|
277
|
-
/**
|
|
278
|
-
* Lucide icon displayed beside this collection in the Admin sidebar.
|
|
279
|
-
* Uses Lucide component names, e.g. `'Newspaper'` or `'ShoppingBag'`.
|
|
280
|
-
*/
|
|
281
|
-
icon?: AdminIconName;
|
|
282
|
-
/** Custom component slots for this collection's list view. */
|
|
283
|
-
components?: CollectionListComponentSlots;
|
|
284
|
-
/**
|
|
285
|
-
* The field name used as the document's display title in the Admin list
|
|
286
|
-
* view and breadcrumbs. Defaults to `'title'` if the field exists.
|
|
287
|
-
*/
|
|
288
|
-
useAsTitle?: string;
|
|
289
|
-
/**
|
|
290
|
-
* Field names to show as columns in the Admin list view.
|
|
291
|
-
* Defaults to a sensible set of the first few non-structural fields.
|
|
292
|
-
*/
|
|
293
|
-
defaultColumns?: string[];
|
|
294
|
-
/** Short helper copy rendered under the collection title in the Admin list view. */
|
|
295
|
-
description?: string;
|
|
296
|
-
/**
|
|
297
|
-
* Field names included in backend free-text search for this collection.
|
|
298
|
-
* When omitted, Dyrected infers a conservative default from common text-like fields.
|
|
299
|
-
*/
|
|
300
|
-
searchableFields?: string[];
|
|
301
|
-
/**
|
|
302
|
-
* Groups this collection under a named section in the Admin sidebar.
|
|
303
|
-
* Collections with the same `group` are visually grouped together.
|
|
304
|
-
*/
|
|
305
|
-
group?: string;
|
|
306
|
-
/** If `true`, this collection is not shown in the Admin UI sidebar. */
|
|
307
|
-
hidden?: boolean;
|
|
308
|
-
/** If `false`, disables the filter UI entirely for this collection. Defaults to `true`. */
|
|
309
|
-
filterable?: boolean;
|
|
310
|
-
/**
|
|
311
|
-
* Enables draft autosave in the Admin editor for workflow-enabled
|
|
312
|
-
* collections. Defaults to `true` when the collection uses `workflow` or
|
|
313
|
-
* `drafts: true`.
|
|
314
|
-
*/
|
|
315
|
-
autosave?: boolean;
|
|
316
|
-
/**
|
|
317
|
-
* Debounce duration in milliseconds for Admin draft autosave.
|
|
318
|
-
* Defaults to `1500`.
|
|
319
|
-
*/
|
|
320
|
-
autosaveDelayMs?: number;
|
|
321
|
-
/**
|
|
322
|
-
* URL to open in the Live Preview pane when editing a document.
|
|
323
|
-
*
|
|
324
|
-
* Pass a Jexl string to keep the config serializable, for example
|
|
325
|
-
* `'slug == "home" ? "/" : "/blog/" + slug'`. This is usually the best
|
|
326
|
-
* default, especially when the schema needs to stay portable across
|
|
327
|
-
* environments such as Dyrected Cloud.
|
|
328
|
-
*
|
|
329
|
-
* Pass a function when you need custom runtime logic in a self-hosted
|
|
330
|
-
* project.
|
|
331
|
-
*
|
|
332
|
-
* @example
|
|
333
|
-
* previewUrl: 'slug == "home" ? "/" : "/blog/" + slug'
|
|
334
|
-
*
|
|
335
|
-
* @example
|
|
336
|
-
* previewUrl: (doc) => `https://mysite.com/blog/${doc.slug}`
|
|
337
|
-
*/
|
|
338
|
-
previewUrl?: string | ((doc: TDoc, opts: {
|
|
339
|
-
locale?: string;
|
|
340
|
-
}) => string | null);
|
|
341
|
-
/**
|
|
342
|
-
* How the Live Preview pane communicates with the frontend.
|
|
343
|
-
* - `postMessage` sends a `postMessage` with the current doc data.
|
|
344
|
-
* - `token` passes a short-lived preview token as a query parameter.
|
|
345
|
-
*/
|
|
346
|
-
previewMode?: "postMessage" | "token";
|
|
347
|
-
/**
|
|
348
|
-
* Frontend URL pattern for this collection, used by `url` fields to
|
|
349
|
-
* resolve internal links. Use `{fieldName}` placeholders.
|
|
350
|
-
*
|
|
351
|
-
* This is a plain route pattern string, not a Jexl expression.
|
|
352
|
-
*
|
|
353
|
-
* @example
|
|
354
|
-
* urlPattern: '/blog/{slug}' // /blog/my-post
|
|
355
|
-
* urlPattern: '/{slug}' // /about
|
|
356
|
-
*/
|
|
357
|
-
urlPattern?: string;
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Defines a Dyrected global — a singleton document without pagination or IDs.
|
|
362
|
-
*
|
|
363
|
-
* Globals are ideal for site-wide settings, feature flags, or any data where
|
|
364
|
-
* there is always exactly one record, such as `site-settings`, `navigation`,
|
|
365
|
-
* or `theme`.
|
|
366
|
-
*
|
|
367
|
-
* Pass your document's TypeScript type as the generic parameter `TDoc` to get
|
|
368
|
-
* fully typed hooks.
|
|
369
|
-
*
|
|
370
|
-
* @example
|
|
371
|
-
* ```ts
|
|
372
|
-
* interface SiteSettings {
|
|
373
|
-
* siteName: string
|
|
374
|
-
* tagline: string
|
|
375
|
-
* maintenanceMode: boolean
|
|
376
|
-
* }
|
|
377
|
-
*
|
|
378
|
-
* export const Settings = defineGlobal<SiteSettings>({
|
|
379
|
-
* slug: 'site-settings',
|
|
380
|
-
* hooks: {
|
|
381
|
-
* afterChange: [({ doc }) => {
|
|
382
|
-
* // `doc` is typed as SiteSettings
|
|
383
|
-
* if (doc.maintenanceMode) alertOnCall()
|
|
384
|
-
* }],
|
|
385
|
-
* },
|
|
386
|
-
* fields: [...],
|
|
387
|
-
* })
|
|
388
|
-
* ```
|
|
389
|
-
*
|
|
390
|
-
* @template TDoc The TypeScript shape of this global's document.
|
|
391
|
-
*/
|
|
392
|
-
export interface GlobalConfig<TDoc extends object = Record<string, unknown>> {
|
|
393
|
-
/**
|
|
394
|
-
* Unique identifier for this global.
|
|
395
|
-
* Used as the URL segment (`/api/globals/:slug`) and the storage key.
|
|
396
|
-
*/
|
|
397
|
-
slug: string;
|
|
398
|
-
/** Restricts this global to a specific site in a multi-tenant deployment. */
|
|
399
|
-
siteId?: string;
|
|
400
|
-
/**
|
|
401
|
-
* If `true`, this global is shared across all sites in a multi-tenant
|
|
402
|
-
* deployment.
|
|
403
|
-
*/
|
|
404
|
-
shared?: boolean;
|
|
405
|
-
/** Human-readable label shown in the Admin UI sidebar. */
|
|
406
|
-
label?: string;
|
|
407
|
-
/** Field definitions for this global's document schema. */
|
|
408
|
-
fields: Field[];
|
|
409
|
-
/** Access control for reading and updating this global. */
|
|
410
|
-
access?: {
|
|
411
|
-
read?: AccessRule<TDoc>;
|
|
412
|
-
update?: AccessRule<TDoc>;
|
|
413
|
-
};
|
|
414
|
-
/**
|
|
415
|
-
* Global-level lifecycle hooks.
|
|
416
|
-
* Globals support `beforeRead`, `afterRead`, `beforeChange`, and `afterChange`.
|
|
417
|
-
* There are no delete hooks since globals cannot be deleted.
|
|
418
|
-
*/
|
|
419
|
-
hooks?: {
|
|
420
|
-
beforeRead?: GlobalBeforeReadHook[];
|
|
421
|
-
afterRead?: GlobalAfterReadHook<TDoc>[];
|
|
422
|
-
beforeChange?: GlobalBeforeChangeHook<TDoc>[];
|
|
423
|
-
afterChange?: GlobalAfterChangeHook<TDoc>[];
|
|
424
|
-
};
|
|
425
|
-
/** Admin UI configuration for this global. */
|
|
426
|
-
admin?: {
|
|
427
|
-
/**
|
|
428
|
-
* Lucide icon displayed beside this global in the Admin sidebar.
|
|
429
|
-
* Uses Lucide component names, e.g. `'Settings2'` or `'Palette'`.
|
|
430
|
-
*/
|
|
431
|
-
icon?: AdminIconName;
|
|
432
|
-
/** Groups this global under a named section in the Admin sidebar. */
|
|
433
|
-
group?: string;
|
|
434
|
-
/** If `true`, this global is not shown in the Admin UI sidebar. */
|
|
435
|
-
hidden?: boolean;
|
|
436
|
-
};
|
|
437
|
-
/**
|
|
438
|
-
* Initial data to seed this global with the first time it is fetched and
|
|
439
|
-
* found to be empty.
|
|
440
|
-
*/
|
|
441
|
-
initialData?: Partial<TDoc>;
|
|
442
|
-
}
|
|
443
|
-
//# sourceMappingURL=schema-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema-config.d.ts","sourceRoot":"","sources":["../../src/types/schema-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EACV,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;OAKG;IACH,QAAQ,CAA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