dineway 0.1.11 → 0.1.13
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/{allowed-origins-DG86sH8U.mjs → allowed-origins-C1AKK9AT.mjs} +1 -1
- package/dist/api/route-utils.d.mts +10 -9
- package/dist/api/route-utils.mjs +7 -7
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +2 -2
- package/dist/{api-Cmy8Rjk5.mjs → api-Lyjc8wqZ.mjs} +4 -4
- package/dist/{api-tokens-Bu3ez1MO.mjs → api-tokens-D7UjLbdt.mjs} +1 -1
- package/dist/{apply-Co5imxxT.mjs → apply-Bm5QgdrE.mjs} +5 -5
- package/dist/astro/index.d.mts +11 -10
- package/dist/astro/index.mjs +3 -3
- package/dist/astro/middleware/auth.d.mts +10 -9
- package/dist/astro/middleware/auth.mjs +5 -5
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +42 -40
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +4 -4
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
- package/dist/astro/routes/api/admin/briefing.mjs +7 -7
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +6 -6
- package/dist/astro/routes/api/admin/bylines/index.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/bulk.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/counts.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/index.mjs +6 -6
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +11 -10
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +11 -10
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +15 -14
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +15 -14
- package/dist/astro/routes/api/admin/context/diff.mjs +14 -13
- package/dist/astro/routes/api/admin/context/index.mjs +15 -14
- package/dist/astro/routes/api/admin/context/stale.mjs +14 -13
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +11 -10
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +14 -13
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +14 -13
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +12 -11
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +24 -23
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +24 -23
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +18 -17
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +23 -22
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +23 -22
- package/dist/astro/routes/api/admin/plugins/index.mjs +18 -17
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +18 -17
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +23 -22
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +18 -17
- package/dist/astro/routes/api/admin/plugins/updates.mjs +18 -17
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +2 -2
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +13 -12
- package/dist/astro/routes/api/admin/review-requests/index.mjs +5 -5
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +18 -17
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +18 -17
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +4 -4
- package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +8 -8
- package/dist/astro/routes/api/auth/invite/index.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/register-options.mjs +7 -7
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +7 -7
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +4 -4
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +4 -4
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +8 -8
- package/dist/astro/routes/api/auth/passkey/verify.mjs +8 -8
- package/dist/astro/routes/api/auth/signup/complete.mjs +8 -8
- package/dist/astro/routes/api/auth/signup/request.mjs +7 -7
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +13 -12
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/index.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/trash.mjs +5 -5
- package/dist/astro/routes/api/dashboard.mjs +2 -2
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/health.mjs +1 -1
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.mjs +12 -11
- package/dist/astro/routes/api/import/wordpress/media.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +15 -14
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +14 -13
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +16 -15
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +22 -21
- package/dist/astro/routes/api/media/_id_/confirm.mjs +5 -5
- package/dist/astro/routes/api/media/_id_.mjs +5 -5
- package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
- package/dist/astro/routes/api/media/providers/index.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +5 -5
- package/dist/astro/routes/api/media.mjs +5 -5
- package/dist/astro/routes/api/menus/_name_/items.mjs +15 -14
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +15 -14
- package/dist/astro/routes/api/menus/_name_.mjs +15 -14
- package/dist/astro/routes/api/menus/index.mjs +15 -14
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +3 -3
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
- package/dist/astro/routes/api/redirects/404s/index.mjs +6 -6
- package/dist/astro/routes/api/redirects/404s/summary.mjs +6 -6
- package/dist/astro/routes/api/redirects/_id_.mjs +15 -14
- package/dist/astro/routes/api/redirects/index.mjs +15 -14
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +19 -18
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +19 -18
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +19 -18
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +19 -18
- package/dist/astro/routes/api/schema/collections/index.mjs +19 -18
- package/dist/astro/routes/api/schema/index.mjs +2 -2
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +18 -17
- package/dist/astro/routes/api/schema/orphans/index.mjs +18 -17
- package/dist/astro/routes/api/search/enable.mjs +6 -6
- package/dist/astro/routes/api/search/index.mjs +5 -5
- package/dist/astro/routes/api/search/rebuild.mjs +6 -6
- package/dist/astro/routes/api/search/stats.mjs +3 -3
- package/dist/astro/routes/api/search/suggest.mjs +5 -5
- package/dist/astro/routes/api/sections/_slug_.mjs +15 -14
- package/dist/astro/routes/api/sections/index.mjs +15 -14
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings.mjs +15 -14
- package/dist/astro/routes/api/setup/admin-verify.mjs +10 -10
- package/dist/astro/routes/api/setup/admin.mjs +8 -8
- package/dist/astro/routes/api/setup/dev-bypass.mjs +11 -11
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +11 -11
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +5 -5
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/index.mjs +16 -15
- package/dist/astro/routes/api/themes/preview.mjs +4 -4
- package/dist/astro/routes/api/typegen.mjs +1 -1
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +14 -13
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +15 -14
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +15 -14
- package/dist/astro/routes/api/widget-areas/_name_.mjs +13 -12
- package/dist/astro/routes/api/widget-areas/index.mjs +15 -14
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +2 -2
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +2 -2
- package/dist/astro/routes/sitemap.xml.mjs +3 -3
- package/dist/astro/types.d.mts +13 -12
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-DKUe_1oa.mjs → auth-control-guard-DOZ3UCsP.mjs} +1 -1
- package/dist/{authorize-BBj8C6Y8.mjs → authorize-BAdbMCwC.mjs} +1 -1
- package/dist/{briefing-BrXCuMEE.mjs → briefing-MVYe_Uyf.mjs} +1 -1
- package/dist/{briefing-ClWw4mc9.mjs → briefing-rty4O-wa.mjs} +1 -1
- package/dist/{bylines-BcOPh6Ej.mjs → bylines-C4LIBOOO.mjs} +1 -1
- package/dist/{bylines-HfUKum_j.d.mts → bylines-DCvz5gtm.d.mts} +13 -13
- package/dist/cli/index.mjs +7 -7
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/{context-nxMyOe3p.mjs → context-CNIkMzot.mjs} +2 -2
- package/dist/{context-bE5Kyvcj.mjs → context-DNfcm853.mjs} +2 -2
- package/dist/{context-route-helpers-D-6uCQ0S.mjs → context-route-helpers-MurhoxWF.mjs} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{device-flow-7AhWNwCK.mjs → device-flow-BGEH5jfn.mjs} +4 -4
- package/dist/{hitl-requests-Bx3Bkk9l.mjs → hitl-requests-ChT32Ilo.mjs} +2 -2
- package/dist/{hitl-route-helpers-DMmJRS7B.mjs → hitl-route-helpers-CSit54Ru.mjs} +4 -4
- package/dist/{import-DVZcYlDp.mjs → import-BHRLhXAn.mjs} +2 -2
- package/dist/{import-DD3f2jkc.mjs → import-CNcKWTbp.mjs} +1 -1
- package/dist/{index-CkljPf5F.d.mts → index-CYfhYgXd.d.mts} +2 -2
- package/dist/index-EUAWaIxW.d.mts +835 -0
- package/dist/index.d.mts +16 -14
- package/dist/index.mjs +35 -32
- package/dist/jsonld-D2gUY4kA.d.mts +141 -0
- package/dist/media/index.d.mts +2 -1
- package/dist/media/local-runtime.d.mts +12 -11
- package/dist/menus-DYW_UHjv.mjs +256 -0
- package/dist/{oauth-authorization-C1qiw4hd.mjs → oauth-authorization-DxGjiWKL.mjs} +4 -4
- package/dist/{oauth-clients-CvWatf5p.mjs → oauth-clients-DxO_NO7k.mjs} +2 -2
- package/dist/page/index.d.mts +2 -139
- package/dist/page/index.mjs +1 -427
- package/dist/{parse-BeQXIt1U.mjs → parse-C9106ehs.mjs} +1 -1
- package/dist/placeholder-Bh1dfUOd.d.mts +40 -0
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{menus-CrzHokKj.mjs → plugins-D7-ILNib.mjs} +4 -257
- package/dist/{preview-C_4DyVox.mjs → preview-DvYRU-Oy.mjs} +2 -2
- package/dist/provider-loader-BiQ6lNmf.d.mts +20 -0
- package/dist/provider-loader-C21b9OpH.mjs +36 -0
- package/dist/{query-RiobVwB5.mjs → query-B9BO5goQ.mjs} +3 -3
- package/dist/{schema-BNpI53of.mjs → query-CsbOywSY.mjs} +1 -6
- package/dist/{rate-limit-CbJoj_fT.mjs → rate-limit-DmVTHI5v.mjs} +2 -2
- package/dist/{redirects-CqaxraTO.mjs → redirects-lrlmYXVE.mjs} +2 -49
- package/dist/{request-meta-Bd0mQfiS.mjs → request-meta-DixlNKKa.mjs} +1 -1
- package/dist/{runner-9eIQXuc2.d.mts → runner-BU6Lo1ZS.d.mts} +1 -1
- package/dist/{runtime-C4-7y7xK.d.mts → runtime-QuuFSlc6.d.mts} +104 -932
- package/dist/runtime.d.mts +11 -28
- package/dist/runtime.mjs +1 -35
- package/dist/schema-BECjUhP8.mjs +8 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +6 -6
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo-contributions-B1fWCnqY.mjs +429 -0
- package/dist/{service-CSfcQguB.mjs → service-CyOsm0R6.mjs} +1 -1
- package/dist/{settings-4XnpVMOS.mjs → settings-DGtLLSaz.mjs} +15 -1
- package/dist/{settings-Bw93cLfe.mjs → settings-Dzgswvg4.mjs} +1 -1
- package/dist/{site-context-Bpu_Paur.mjs → site-context-WBxoD99D.mjs} +6 -6
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{taxonomies-BvBgfzn3.mjs → taxonomies-D2aZGuns.mjs} +2 -2
- package/dist/{taxonomies-CpqGcIJD.mjs → taxonomies-z6Lz91BC.mjs} +1 -1
- package/dist/{placeholder-CHkLckzK.d.mts → types-OPs5Q_sX.d.mts} +1 -38
- package/dist/{types-DgfUZqcd.d.mts → types-Q616b2Hn.d.mts} +1 -1
- package/dist/ui/client-runtime.d.mts +12 -0
- package/dist/ui/client-runtime.mjs +32 -0
- package/dist/ui/server-runtime.d.mts +33 -0
- package/dist/ui/server-runtime.mjs +80 -0
- package/dist/url-DNjT2abR.mjs +49 -0
- package/dist/{validate-JCZihRIa.d.mts → validate-BwmQEbu8.d.mts} +3 -3
- package/dist/version-C5JkNvmb.mjs +6 -0
- package/dist/{widgets-B7Q_7bxN.mjs → widgets-B7DRpZvy.mjs} +1 -1
- package/package.json +19 -5
- package/src/components/Button.astro +1 -1
- package/src/components/CommentForm.astro +1 -1
- package/src/components/Comments.astro +1 -3
- package/src/components/DinewayBodyEnd.astro +5 -3
- package/src/components/DinewayBodyStart.astro +5 -3
- package/src/components/DinewayHead.astro +9 -7
- package/src/components/DinewayImage.astro +6 -4
- package/src/components/DinewayMedia.astro +7 -4
- package/src/components/Embed.astro +1 -2
- package/src/components/File.astro +1 -1
- package/src/components/Gallery.astro +1 -1
- package/src/components/HtmlBlock.astro +1 -1
- package/src/components/Image.astro +5 -3
- package/src/components/InlinePortableTextEditor.tsx +1 -2
- package/src/components/PortableText.astro +1 -1
- package/src/components/WidgetArea.astro +1 -1
- package/src/components/WidgetRenderer.astro +1 -3
- package/src/components/marks/Link.astro +1 -1
- package/src/components/widgets/Archives.astro +1 -1
- package/src/components/widgets/Categories.astro +1 -1
- package/src/components/widgets/RecentPosts.astro +1 -1
- package/src/components/widgets/Tags.astro +1 -1
- package/dist/version-DH53KCQd.mjs +0 -6
- /package/dist/{activity-events-BsMaXdJa.mjs → activity-events-B4wp7CrU.mjs} +0 -0
- /package/dist/{adapters-BLDldpJg.d.mts → adapters-DuLQZhRY.d.mts} +0 -0
- /package/dist/{api-tokens-DzloJxuh.mjs → api-tokens-CPjC3zf8.mjs} +0 -0
- /package/dist/{challenge-store-DHMgBGOq.mjs → challenge-store-DDTbisbf.mjs} +0 -0
- /package/dist/{comments-Gy3zLBaP.mjs → comments--BsZ9pqA.mjs} +0 -0
- /package/dist/{components-DND2rd3D.mjs → components-BPknylYg.mjs} +0 -0
- /package/dist/{cron-DGzVTtJp.mjs → cron-CKxvBrRT.mjs} +0 -0
- /package/dist/{db-errors-DKUg_NgF.mjs → db-errors-DyZkswzF.mjs} +0 -0
- /package/dist/{default-C3PZN-bz.mjs → default-D4ngTpW8.mjs} +0 -0
- /package/dist/{email-console-CgLVZbcn.mjs → email-console-CuefUXfX.mjs} +0 -0
- /package/dist/{error-DEGjx2Xw.mjs → error-BMUPwxgx.mjs} +0 -0
- /package/dist/{escape-mNZr4t2A.mjs → escape-BRVaw1Ai.mjs} +0 -0
- /package/dist/{experimental-workflows-DldxJlqV.mjs → experimental-workflows-C9X7yblQ.mjs} +0 -0
- /package/dist/{load-D-9NhLmF.mjs → load-B2XtDw__.mjs} +0 -0
- /package/dist/{manifest-schema-DYoCQ5np.mjs → manifest-schema-CgFJAp0H.mjs} +0 -0
- /package/dist/{menus-BacxVCCo.mjs → menus-DS3_5nWY.mjs} +0 -0
- /package/dist/{mode-C80mAZQv.mjs → mode-DUhxwUhv.mjs} +0 -0
- /package/dist/{oauth-state-store-hSdzxsEe.mjs → oauth-state-store-C5UFhzwD.mjs} +0 -0
- /package/dist/{oauth-user-lookup-B4OcmsLV.mjs → oauth-user-lookup-Bi0ek9eM.mjs} +0 -0
- /package/dist/{passkey-config-Daqs5fjq.mjs → passkey-config-BRSZx4pW.mjs} +0 -0
- /package/dist/{public-url-BB_umF5G.mjs → public-url-Cun8N3NU.mjs} +0 -0
- /package/dist/{redirect-ClSmMOtC.mjs → redirect-COZy-3iY.mjs} +0 -0
- /package/dist/{redirects-B69T59hK.mjs → redirects-Cgi_cZfN.mjs} +0 -0
- /package/dist/{search-DM6CVti3.mjs → search-DqTHQqtV.mjs} +0 -0
- /package/dist/{secrets-dI8zzTV7.mjs → secrets-CkoJ9zN0.mjs} +0 -0
- /package/dist/{sections-DZFyAQXd.mjs → sections-B61OxnfB.mjs} +0 -0
- /package/dist/{seo-BBgTCOYU.mjs → seo-C007Luwn.mjs} +0 -0
- /package/dist/{setup-complete-DidsDQ1e.mjs → setup-complete-ChilE-da.mjs} +0 -0
- /package/dist/{setup-nonce-pml1PMKo.mjs → setup-nonce-BpmLXAuu.mjs} +0 -0
- /package/dist/{sidecar-client-vzwV98K4.mjs → sidecar-client-B1C6Cf80.mjs} +0 -0
- /package/dist/{site-url-CYIcO0Tj.mjs → site-url-BP7k7OCe.mjs} +0 -0
- /package/dist/{ssrf-CmM76lLV.mjs → ssrf-DDwRxF6B.mjs} +0 -0
- /package/dist/{tokens-DLTo4dO2.mjs → tokens-BOJw-D9F.mjs} +0 -0
- /package/dist/{transport-6RefuBdV.d.mts → transport-BXe1AM79.d.mts} +0 -0
- /package/dist/{transport-C9e_h-BF.mjs → transport-D3i4yWRE.mjs} +0 -0
- /package/dist/{trusted-proxy-Bi0Cuk5n.mjs → trusted-proxy-BbaZfkT9.mjs} +0 -0
- /package/dist/{types-C982qI5I.d.mts → types-0Vr68fc2.d.mts} +0 -0
- /package/dist/{types-B9qVtiHb.d.mts → types-B7kpsMJ3.d.mts} +0 -0
- /package/dist/{types-D4XVOt01.d.mts → types-BFmjniC2.d.mts} +0 -0
- /package/dist/{types-IPACEM14.d.mts → types-C0mmVRJN.d.mts} +0 -0
- /package/dist/{types-Djdp0cZO.d.mts → types-DJlpx5Ay.d.mts} +0 -0
- /package/dist/{types-Du8jreyC.d.mts → types-DZPw8Rru.d.mts} +0 -0
- /package/dist/{types-B9gKVOHk.mjs → types-fAInWQDO.mjs} +0 -0
- /package/dist/{utils-D2in-zwy.mjs → utils-C0ONdBul.mjs} +0 -0
- /package/dist/{validate-BJgA6TW_.mjs → validate-C7TzfamJ.mjs} +0 -0
- /package/dist/{wordpress-slugs-BevajWrC.mjs → wordpress-slugs-CnporCYH.mjs} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as ContentSeoInput, c as FindManyOptions, l as FindManyResult, o as CreateContentInput, r as ContentItem, t as BylineSummary, u as UpdateContentInput } from "./types-
|
|
2
|
-
import { t as Database } from "./types-
|
|
3
|
-
import { A as PageMetadataContribution, B as PluginDefinition, D as PageFragmentContribution, H as PluginManifest, J as RequestMeta, O as PageFragmentEvent, W as PluginStorageConfig, X as ResolvedPlugin, a as CommentAfterModerateEvent, g as EmailMessage, h as CronEvent, j as PageMetadataEvent, r as CommentAfterCreateEvent, s as CommentBeforeCreateEvent, tt as StandardPluginDefinition, w as MediaItem$1 } from "./types-
|
|
4
|
-
import { a as Collection, b as UpdateFieldInput, c as CollectionWithFields, d as CreateFieldInput,
|
|
5
|
-
import { r as AuthProviderDescriptor, t as AuthDescriptor } from "./types-
|
|
6
|
-
import { t as DatabaseDescriptor } from "./adapters-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { a as ContentSeoInput, c as FindManyOptions, l as FindManyResult, o as CreateContentInput, r as ContentItem, t as BylineSummary, u as UpdateContentInput } from "./types-DJlpx5Ay.mjs";
|
|
2
|
+
import { t as Database } from "./types-DZPw8Rru.mjs";
|
|
3
|
+
import { A as PageMetadataContribution, B as PluginDefinition, D as PageFragmentContribution, H as PluginManifest, J as RequestMeta, O as PageFragmentEvent, W as PluginStorageConfig, X as ResolvedPlugin, a as CommentAfterModerateEvent, g as EmailMessage, h as CronEvent, j as PageMetadataEvent, r as CommentAfterCreateEvent, s as CommentBeforeCreateEvent, tt as StandardPluginDefinition, w as MediaItem$1 } from "./types-Q616b2Hn.mjs";
|
|
4
|
+
import { a as Collection, b as UpdateFieldInput, c as CollectionWithFields, d as CreateFieldInput, p as Field, u as CreateCollectionInput, y as UpdateCollectionInput } from "./types-C0mmVRJN.mjs";
|
|
5
|
+
import { r as AuthProviderDescriptor, t as AuthDescriptor } from "./types-BFmjniC2.mjs";
|
|
6
|
+
import { t as DatabaseDescriptor } from "./adapters-DuLQZhRY.mjs";
|
|
7
|
+
import { d as MediaProviderDescriptor } from "./types-OPs5Q_sX.mjs";
|
|
8
|
+
import { xt as PortableTextBlock$1 } from "./index-EUAWaIxW.mjs";
|
|
9
|
+
import { S as ContentBylineInput } from "./index-CYfhYgXd.mjs";
|
|
10
|
+
import { d as Storage } from "./types-B7kpsMJ3.mjs";
|
|
10
11
|
import { Kysely } from "kysely";
|
|
11
|
-
import { z } from "
|
|
12
|
-
import { z as z$1 } from "zod";
|
|
12
|
+
import { z } from "zod";
|
|
13
13
|
import { MiddlewareHandler } from "astro";
|
|
14
14
|
import { LiveLoader } from "astro/loaders";
|
|
15
15
|
|
|
@@ -131,7 +131,7 @@ type ParseResult<T> = T | Response;
|
|
|
131
131
|
* Returns the validated data on success, or a 400 Response on failure.
|
|
132
132
|
* Replaces all `(await request.json()) as T` casts.
|
|
133
133
|
*/
|
|
134
|
-
declare function parseBody<T extends z
|
|
134
|
+
declare function parseBody<T extends z.ZodType>(request: Request, schema: T): Promise<ParseResult<z.infer<T>>>;
|
|
135
135
|
/**
|
|
136
136
|
* Parse and validate URL search params against a Zod schema.
|
|
137
137
|
*
|
|
@@ -139,7 +139,7 @@ declare function parseBody<T extends z$1.ZodType>(request: Request, schema: T):
|
|
|
139
139
|
* Zod coercion handles string -> number/boolean conversion.
|
|
140
140
|
* Replaces manual `url.searchParams.get()` + `parseInt()` patterns.
|
|
141
141
|
*/
|
|
142
|
-
declare function parseQuery<T extends z
|
|
142
|
+
declare function parseQuery<T extends z.ZodType>(url: URL, schema: T): ParseResult<z.infer<T>>;
|
|
143
143
|
/**
|
|
144
144
|
* Type guard to check if a ParseResult is an error Response.
|
|
145
145
|
* Usage: `if (isParseError(result)) return result;`
|
|
@@ -531,102 +531,6 @@ interface Revision {
|
|
|
531
531
|
createdAt: string;
|
|
532
532
|
}
|
|
533
533
|
//#endregion
|
|
534
|
-
//#region src/database/repositories/comment.d.ts
|
|
535
|
-
/** Public-facing comment shape — no private fields */
|
|
536
|
-
interface PublicComment {
|
|
537
|
-
id: string;
|
|
538
|
-
parentId: string | null;
|
|
539
|
-
authorName: string;
|
|
540
|
-
isRegisteredUser: boolean;
|
|
541
|
-
body: string;
|
|
542
|
-
createdAt: string;
|
|
543
|
-
replies?: PublicComment[];
|
|
544
|
-
}
|
|
545
|
-
//#endregion
|
|
546
|
-
//#region src/fields/types.d.ts
|
|
547
|
-
/**
|
|
548
|
-
* SQLite column types that map from field types
|
|
549
|
-
*/
|
|
550
|
-
type ColumnType = "TEXT" | "REAL" | "INTEGER" | "JSON";
|
|
551
|
-
/**
|
|
552
|
-
* Base field definition
|
|
553
|
-
*
|
|
554
|
-
* Note: schema uses z.ZodTypeAny to accommodate optional/default wrappers
|
|
555
|
-
*/
|
|
556
|
-
interface FieldDefinition<_T = unknown> {
|
|
557
|
-
type: string;
|
|
558
|
-
/**
|
|
559
|
-
* The SQLite column type to use when storing this field
|
|
560
|
-
*/
|
|
561
|
-
columnType: ColumnType;
|
|
562
|
-
schema: z.ZodTypeAny;
|
|
563
|
-
options?: unknown;
|
|
564
|
-
ui?: FieldUIHints;
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* UI hints for admin rendering
|
|
568
|
-
*/
|
|
569
|
-
interface FieldUIHints {
|
|
570
|
-
widget?: string;
|
|
571
|
-
placeholder?: string;
|
|
572
|
-
helpText?: string;
|
|
573
|
-
rows?: number;
|
|
574
|
-
min?: number | string;
|
|
575
|
-
max?: number | string;
|
|
576
|
-
[key: string]: unknown;
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* Portable Text block structure
|
|
580
|
-
*/
|
|
581
|
-
interface PortableTextBlock$1 {
|
|
582
|
-
_type: string;
|
|
583
|
-
_key: string;
|
|
584
|
-
[key: string]: unknown;
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* @deprecated Use MediaValue instead. ImageValue is an alias for backwards compatibility.
|
|
588
|
-
*/
|
|
589
|
-
type ImageValue = MediaValue;
|
|
590
|
-
/**
|
|
591
|
-
* File field value
|
|
592
|
-
*/
|
|
593
|
-
interface FileValue {
|
|
594
|
-
id: string;
|
|
595
|
-
url: string;
|
|
596
|
-
filename: string;
|
|
597
|
-
mimeType: string;
|
|
598
|
-
size: number;
|
|
599
|
-
}
|
|
600
|
-
//#endregion
|
|
601
|
-
//#region src/fields/image.d.ts
|
|
602
|
-
/**
|
|
603
|
-
* Image field
|
|
604
|
-
* References media items from the media library
|
|
605
|
-
*/
|
|
606
|
-
declare function image(options?: {
|
|
607
|
-
required?: boolean;
|
|
608
|
-
maxSize?: number;
|
|
609
|
-
allowedTypes?: string[];
|
|
610
|
-
}): FieldDefinition<ImageValue | undefined>;
|
|
611
|
-
//#endregion
|
|
612
|
-
//#region src/fields/reference.d.ts
|
|
613
|
-
/**
|
|
614
|
-
* Reference field
|
|
615
|
-
* References another content item by ID
|
|
616
|
-
*/
|
|
617
|
-
declare function reference(collection: string, options?: {
|
|
618
|
-
required?: boolean;
|
|
619
|
-
}): FieldDefinition<string | undefined>;
|
|
620
|
-
//#endregion
|
|
621
|
-
//#region src/fields/portable-text.d.ts
|
|
622
|
-
/**
|
|
623
|
-
* Portable Text field
|
|
624
|
-
* Stores structured content in Portable Text format
|
|
625
|
-
*/
|
|
626
|
-
declare function portableText(options?: {
|
|
627
|
-
required?: boolean;
|
|
628
|
-
}): FieldDefinition<PortableTextBlock$1[] | undefined>;
|
|
629
|
-
//#endregion
|
|
630
534
|
//#region src/api/handlers/content.d.ts
|
|
631
535
|
/**
|
|
632
536
|
* Trashed content item with deletion timestamp
|
|
@@ -1067,22 +971,6 @@ declare class SchemaRegistry {
|
|
|
1067
971
|
private slugToLabel;
|
|
1068
972
|
}
|
|
1069
973
|
//#endregion
|
|
1070
|
-
//#region src/schema/query.d.ts
|
|
1071
|
-
/**
|
|
1072
|
-
* Get collection metadata by slug.
|
|
1073
|
-
*
|
|
1074
|
-
* @example
|
|
1075
|
-
* ```ts
|
|
1076
|
-
* import { getCollectionInfo } from "dineway";
|
|
1077
|
-
*
|
|
1078
|
-
* const info = await getCollectionInfo("posts");
|
|
1079
|
-
* if (info?.commentsEnabled) {
|
|
1080
|
-
* // render comment UI
|
|
1081
|
-
* }
|
|
1082
|
-
* ```
|
|
1083
|
-
*/
|
|
1084
|
-
declare function getCollectionInfo(slug: string): Promise<Collection | null>;
|
|
1085
|
-
//#endregion
|
|
1086
974
|
//#region src/sections/types.d.ts
|
|
1087
975
|
/**
|
|
1088
976
|
* Section source types
|
|
@@ -1456,338 +1344,6 @@ declare function hashString(content: string): Promise<string>;
|
|
|
1456
1344
|
*/
|
|
1457
1345
|
declare function computeContentHash(content: Uint8Array | ArrayBuffer): Promise<string>;
|
|
1458
1346
|
//#endregion
|
|
1459
|
-
//#region src/utils/url.d.ts
|
|
1460
|
-
/**
|
|
1461
|
-
* URL scheme validation utilities
|
|
1462
|
-
*
|
|
1463
|
-
* Prevents XSS via dangerous URL schemes (javascript:, data:, vbscript:, etc.)
|
|
1464
|
-
* by allowlisting known-safe schemes before rendering into href attributes.
|
|
1465
|
-
*/
|
|
1466
|
-
/**
|
|
1467
|
-
* Returns the URL unchanged if it uses a safe scheme, otherwise returns "#".
|
|
1468
|
-
*
|
|
1469
|
-
* Use this at the render layer as the primary defense against XSS via
|
|
1470
|
-
* dangerous URL schemes like `javascript:`, `data:`, or `vbscript:`.
|
|
1471
|
-
*
|
|
1472
|
-
* @example
|
|
1473
|
-
* ```ts
|
|
1474
|
-
* sanitizeHref("https://example.com") // "https://example.com"
|
|
1475
|
-
* sanitizeHref("/about") // "/about"
|
|
1476
|
-
* sanitizeHref("#section") // "#section"
|
|
1477
|
-
* sanitizeHref("mailto:a@b.com") // "mailto:a@b.com"
|
|
1478
|
-
* sanitizeHref("javascript:alert(1)") // "#"
|
|
1479
|
-
* sanitizeHref("data:text/html,<script>") // "#"
|
|
1480
|
-
* sanitizeHref("") // "#"
|
|
1481
|
-
* ```
|
|
1482
|
-
*/
|
|
1483
|
-
declare function sanitizeHref(url: string | undefined | null): string;
|
|
1484
|
-
/**
|
|
1485
|
-
* Returns true if the URL uses a safe scheme for rendering in href attributes.
|
|
1486
|
-
*/
|
|
1487
|
-
declare function isSafeHref(url: string): boolean;
|
|
1488
|
-
//#endregion
|
|
1489
|
-
//#region src/visual-editing/editable.d.ts
|
|
1490
|
-
/**
|
|
1491
|
-
* Visual editing annotation system
|
|
1492
|
-
*
|
|
1493
|
-
* Creates Proxy objects that emit data-dineway-ref attributes when spread onto elements.
|
|
1494
|
-
*/
|
|
1495
|
-
interface CMSAnnotation {
|
|
1496
|
-
collection: string;
|
|
1497
|
-
id: string;
|
|
1498
|
-
field?: string;
|
|
1499
|
-
/** Entry status — only present on entry-level annotations (not field-level) */
|
|
1500
|
-
status?: string;
|
|
1501
|
-
/** Whether the entry has unpublished draft changes */
|
|
1502
|
-
hasDraft?: boolean;
|
|
1503
|
-
}
|
|
1504
|
-
/** The shape returned when spreading an edit annotation onto an element */
|
|
1505
|
-
interface FieldAnnotation {
|
|
1506
|
-
"data-dineway-ref": string;
|
|
1507
|
-
}
|
|
1508
|
-
interface EditableOptions {
|
|
1509
|
-
/** Entry status: "draft", "published", "scheduled" */
|
|
1510
|
-
status?: string;
|
|
1511
|
-
/** true when draftRevisionId exists and differs from liveRevisionId */
|
|
1512
|
-
hasDraft?: boolean;
|
|
1513
|
-
}
|
|
1514
|
-
/**
|
|
1515
|
-
* Create an editable proxy for an entry.
|
|
1516
|
-
*
|
|
1517
|
-
* Usage:
|
|
1518
|
-
* - `{...entry.edit}` - entry-level annotation (includes status/hasDraft)
|
|
1519
|
-
* - `{...entry.edit.title}` - field-level annotation
|
|
1520
|
-
* - `{...entry.edit['nested.field']}` - nested field (bracket notation)
|
|
1521
|
-
*/
|
|
1522
|
-
declare function createEditable(collection: string, id: string, options?: EditableOptions): EditProxy;
|
|
1523
|
-
/**
|
|
1524
|
-
* Create a noop proxy for production mode.
|
|
1525
|
-
* Spreading this produces no attributes.
|
|
1526
|
-
*/
|
|
1527
|
-
declare function createNoop(): EditProxy;
|
|
1528
|
-
/**
|
|
1529
|
-
* Visual editing proxy type.
|
|
1530
|
-
*
|
|
1531
|
-
* Spread directly onto elements for entry-level annotations: `{...entry.edit}`
|
|
1532
|
-
* Access a field for field-level annotations: `{...entry.edit.title}`
|
|
1533
|
-
*
|
|
1534
|
-
* In production, spreading produces no attributes (noop).
|
|
1535
|
-
*/
|
|
1536
|
-
type EditProxy = {
|
|
1537
|
-
readonly [field: string]: Partial<FieldAnnotation>;
|
|
1538
|
-
};
|
|
1539
|
-
//#endregion
|
|
1540
|
-
//#region src/query.d.ts
|
|
1541
|
-
/**
|
|
1542
|
-
* Collection type registry for type-safe queries.
|
|
1543
|
-
*
|
|
1544
|
-
* This interface is extended by the generated dineway-env.d.ts file
|
|
1545
|
-
* to provide type inference for collection names and their data shapes.
|
|
1546
|
-
*
|
|
1547
|
-
* @example
|
|
1548
|
-
* ```ts
|
|
1549
|
-
* // In dineway-env.d.ts (generated):
|
|
1550
|
-
* declare module "dineway" {
|
|
1551
|
-
* interface DinewayCollections {
|
|
1552
|
-
* posts: { title: string; content: PortableTextBlock[]; };
|
|
1553
|
-
* pages: { title: string; body: PortableTextBlock[]; };
|
|
1554
|
-
* }
|
|
1555
|
-
* }
|
|
1556
|
-
*
|
|
1557
|
-
* // Then in your code:
|
|
1558
|
-
* const { entries } = await getDinewayCollection("posts");
|
|
1559
|
-
* // entries[0].data.title is typed as string
|
|
1560
|
-
* ```
|
|
1561
|
-
*/
|
|
1562
|
-
interface DinewayCollections {}
|
|
1563
|
-
/**
|
|
1564
|
-
* Helper type to infer the data type for a collection.
|
|
1565
|
-
* Returns the registered type if known, otherwise falls back to Record<string, unknown>.
|
|
1566
|
-
*/
|
|
1567
|
-
type InferCollectionData<T extends string> = T extends keyof DinewayCollections ? DinewayCollections[T] : Record<string, unknown>;
|
|
1568
|
-
/**
|
|
1569
|
-
* Sort direction
|
|
1570
|
-
*/
|
|
1571
|
-
type SortDirection$1 = "asc" | "desc";
|
|
1572
|
-
/**
|
|
1573
|
-
* Order by specification - field name to direction
|
|
1574
|
-
* @example { created_at: "desc" } - Sort by created_at descending
|
|
1575
|
-
* @example { title: "asc" } - Sort by title ascending
|
|
1576
|
-
* @example { published_at: "desc", title: "asc" } - Multi-field sort
|
|
1577
|
-
*/
|
|
1578
|
-
type OrderBySpec$1 = Record<string, SortDirection$1>;
|
|
1579
|
-
interface CollectionFilter$1 {
|
|
1580
|
-
status?: "draft" | "published" | "archived";
|
|
1581
|
-
limit?: number;
|
|
1582
|
-
/**
|
|
1583
|
-
* Opaque cursor for keyset pagination.
|
|
1584
|
-
* Pass the `nextCursor` value from a previous result to fetch the next page.
|
|
1585
|
-
* @example
|
|
1586
|
-
* ```ts
|
|
1587
|
-
* const cursor = Astro.url.searchParams.get("cursor") ?? undefined;
|
|
1588
|
-
* const { entries, nextCursor } = await getDinewayCollection("posts", {
|
|
1589
|
-
* limit: 10,
|
|
1590
|
-
* cursor,
|
|
1591
|
-
* });
|
|
1592
|
-
* ```
|
|
1593
|
-
*/
|
|
1594
|
-
cursor?: string;
|
|
1595
|
-
/**
|
|
1596
|
-
* Filter by field values or taxonomy terms
|
|
1597
|
-
* @example { category: 'news' } - Filter by taxonomy term
|
|
1598
|
-
* @example { category: ['news', 'featured'] } - Filter by multiple terms (OR)
|
|
1599
|
-
*/
|
|
1600
|
-
where?: Record<string, string | string[]>;
|
|
1601
|
-
/**
|
|
1602
|
-
* Order results by field(s)
|
|
1603
|
-
* @default { created_at: "desc" }
|
|
1604
|
-
* @example { created_at: "desc" } - Sort by created_at descending (default)
|
|
1605
|
-
* @example { title: "asc" } - Sort by title ascending
|
|
1606
|
-
* @example { published_at: "desc", title: "asc" } - Multi-field sort
|
|
1607
|
-
*/
|
|
1608
|
-
orderBy?: OrderBySpec$1;
|
|
1609
|
-
/**
|
|
1610
|
-
* Filter by locale. When set, only returns entries in this locale.
|
|
1611
|
-
* Only relevant when i18n is configured.
|
|
1612
|
-
* @example "en" — English entries only
|
|
1613
|
-
* @example "fr" — French entries only
|
|
1614
|
-
*/
|
|
1615
|
-
locale?: string;
|
|
1616
|
-
}
|
|
1617
|
-
interface ContentEntry<T = Record<string, unknown>> {
|
|
1618
|
-
id: string;
|
|
1619
|
-
data: T;
|
|
1620
|
-
/** Visual editing annotations. Spread onto elements: {...entry.edit.title} */
|
|
1621
|
-
edit: EditProxy;
|
|
1622
|
-
}
|
|
1623
|
-
/** Cache hint returned by the content loader for route caching */
|
|
1624
|
-
interface CacheHint {
|
|
1625
|
-
tags?: string[];
|
|
1626
|
-
lastModified?: Date;
|
|
1627
|
-
}
|
|
1628
|
-
/**
|
|
1629
|
-
* Result from getDinewayCollection
|
|
1630
|
-
*/
|
|
1631
|
-
interface CollectionResult<T> {
|
|
1632
|
-
/** The entries (empty array if error or none found) */
|
|
1633
|
-
entries: ContentEntry<T>[];
|
|
1634
|
-
/** Error if the query failed */
|
|
1635
|
-
error?: Error;
|
|
1636
|
-
/** Cache hint for route caching (pass to Astro.cache.set()) */
|
|
1637
|
-
cacheHint: CacheHint;
|
|
1638
|
-
/**
|
|
1639
|
-
* Opaque cursor for the next page.
|
|
1640
|
-
* Undefined when there are no more results.
|
|
1641
|
-
* Pass this as `cursor` in the next query to get the next page.
|
|
1642
|
-
*/
|
|
1643
|
-
nextCursor?: string;
|
|
1644
|
-
}
|
|
1645
|
-
/**
|
|
1646
|
-
* Result from getDinewayEntry
|
|
1647
|
-
*/
|
|
1648
|
-
interface EntryResult<T> {
|
|
1649
|
-
/** The entry, or null if not found */
|
|
1650
|
-
entry: ContentEntry<T> | null;
|
|
1651
|
-
/** Error if the query failed (not set for "not found", only for actual errors) */
|
|
1652
|
-
error?: Error;
|
|
1653
|
-
/** Whether we're in preview mode (valid token was provided) */
|
|
1654
|
-
isPreview: boolean;
|
|
1655
|
-
/** Set when a fallback locale was used instead of the requested locale */
|
|
1656
|
-
fallbackLocale?: string;
|
|
1657
|
-
/** Cache hint for route caching (pass to Astro.cache.set()) */
|
|
1658
|
-
cacheHint: CacheHint;
|
|
1659
|
-
}
|
|
1660
|
-
/** Edit metadata attached to PT arrays in edit mode */
|
|
1661
|
-
interface EditFieldMeta {
|
|
1662
|
-
collection: string;
|
|
1663
|
-
id: string;
|
|
1664
|
-
field: string;
|
|
1665
|
-
}
|
|
1666
|
-
/**
|
|
1667
|
-
* Read edit metadata from a value (returns undefined if not tagged).
|
|
1668
|
-
* Uses Object.getOwnPropertyDescriptor to access Symbol-keyed property
|
|
1669
|
-
* without an unsafe type assertion.
|
|
1670
|
-
*/
|
|
1671
|
-
declare function getEditMeta(value: unknown): EditFieldMeta | undefined;
|
|
1672
|
-
/**
|
|
1673
|
-
* Get all entries of a content type
|
|
1674
|
-
*
|
|
1675
|
-
* Returns { entries, error } for graceful error handling.
|
|
1676
|
-
*
|
|
1677
|
-
* When dineway-env.d.ts is generated, the collection name will be
|
|
1678
|
-
* type-checked and the return type will be inferred automatically.
|
|
1679
|
-
*
|
|
1680
|
-
* @example
|
|
1681
|
-
* ```ts
|
|
1682
|
-
* import { getDinewayCollection } from "dineway";
|
|
1683
|
-
*
|
|
1684
|
-
* const { entries: posts, error } = await getDinewayCollection("posts");
|
|
1685
|
-
* if (error) {
|
|
1686
|
-
* console.error("Failed to load posts:", error);
|
|
1687
|
-
* return;
|
|
1688
|
-
* }
|
|
1689
|
-
* // posts[0].data.title is typed (if dineway-env.d.ts exists)
|
|
1690
|
-
*
|
|
1691
|
-
* // With filters
|
|
1692
|
-
* const { entries: drafts } = await getDinewayCollection("posts", { status: "draft" });
|
|
1693
|
-
* ```
|
|
1694
|
-
*/
|
|
1695
|
-
declare function getDinewayCollection<T extends string, D = InferCollectionData<T>>(type: T, filter?: CollectionFilter$1): Promise<CollectionResult<D>>;
|
|
1696
|
-
/**
|
|
1697
|
-
* Get a single entry by type and ID/slug
|
|
1698
|
-
*
|
|
1699
|
-
* Returns { entry, error, isPreview } for graceful error handling.
|
|
1700
|
-
* - entry is null if not found (not an error)
|
|
1701
|
-
* - error is set only for actual errors (db issues, etc.)
|
|
1702
|
-
*
|
|
1703
|
-
* Preview mode is detected automatically from request context (ALS).
|
|
1704
|
-
* When the URL has a valid `_preview` token, the middleware sets preview
|
|
1705
|
-
* context and this function serves draft revision data if available.
|
|
1706
|
-
*
|
|
1707
|
-
* @example
|
|
1708
|
-
* ```ts
|
|
1709
|
-
* import { getDinewayEntry } from "dineway";
|
|
1710
|
-
*
|
|
1711
|
-
* // Simple usage — preview just works via middleware
|
|
1712
|
-
* const { entry: post, isPreview, error } = await getDinewayEntry("posts", "my-slug");
|
|
1713
|
-
* if (!post) return Astro.redirect("/404");
|
|
1714
|
-
* ```
|
|
1715
|
-
*/
|
|
1716
|
-
declare function getDinewayEntry<T extends string, D = InferCollectionData<T>>(type: T, id: string, options?: {
|
|
1717
|
-
locale?: string;
|
|
1718
|
-
}): Promise<EntryResult<D>>;
|
|
1719
|
-
/**
|
|
1720
|
-
* Translation summary for a single locale variant
|
|
1721
|
-
*/
|
|
1722
|
-
interface TranslationSummary {
|
|
1723
|
-
/** Content item ID */
|
|
1724
|
-
id: string;
|
|
1725
|
-
/** Locale code (e.g. "en", "fr") */
|
|
1726
|
-
locale: string;
|
|
1727
|
-
/** URL slug */
|
|
1728
|
-
slug: string | null;
|
|
1729
|
-
/** Current status */
|
|
1730
|
-
status: string;
|
|
1731
|
-
}
|
|
1732
|
-
/**
|
|
1733
|
-
* Result from getTranslations
|
|
1734
|
-
*/
|
|
1735
|
-
interface TranslationsResult {
|
|
1736
|
-
/** The translation group ID (shared across locales) */
|
|
1737
|
-
translationGroup: string;
|
|
1738
|
-
/** All locale variants in this group */
|
|
1739
|
-
translations: TranslationSummary[];
|
|
1740
|
-
/** Error if the query failed */
|
|
1741
|
-
error?: Error;
|
|
1742
|
-
}
|
|
1743
|
-
/**
|
|
1744
|
-
* Get all translations of a content item.
|
|
1745
|
-
*
|
|
1746
|
-
* Given a content entry, returns all locale variants that share the same
|
|
1747
|
-
* translation group. This is useful for building language switcher UI.
|
|
1748
|
-
*
|
|
1749
|
-
* @example
|
|
1750
|
-
* ```ts
|
|
1751
|
-
* import { getDinewayEntry, getTranslations } from "dineway";
|
|
1752
|
-
*
|
|
1753
|
-
* const { entry: post } = await getDinewayEntry("posts", "hello-world", { locale: "en" });
|
|
1754
|
-
* const { translations } = await getTranslations("posts", post.data.id);
|
|
1755
|
-
* // translations = [{ id: "...", locale: "en", slug: "hello-world", status: "published" }, ...]
|
|
1756
|
-
* ```
|
|
1757
|
-
*/
|
|
1758
|
-
declare function getTranslations(type: string, id: string): Promise<TranslationsResult>;
|
|
1759
|
-
/**
|
|
1760
|
-
* Result from resolveDinewayPath
|
|
1761
|
-
*/
|
|
1762
|
-
interface ResolvePathResult<T = Record<string, unknown>> {
|
|
1763
|
-
/** The matched entry */
|
|
1764
|
-
entry: ContentEntry<T>;
|
|
1765
|
-
/** The collection slug that matched */
|
|
1766
|
-
collection: string;
|
|
1767
|
-
/** Extracted parameters from the URL pattern (e.g. { slug: "my-post" }) */
|
|
1768
|
-
params: Record<string, string>;
|
|
1769
|
-
}
|
|
1770
|
-
/**
|
|
1771
|
-
* Resolve a URL path to a content entry by matching against collection URL patterns.
|
|
1772
|
-
*
|
|
1773
|
-
* Loads all collections with a `urlPattern` set, converts each pattern to a regex,
|
|
1774
|
-
* and tests the given path. On match, extracts the slug and fetches the entry.
|
|
1775
|
-
*
|
|
1776
|
-
* @example
|
|
1777
|
-
* ```ts
|
|
1778
|
-
* import { resolveDinewayPath } from "dineway";
|
|
1779
|
-
*
|
|
1780
|
-
* // Given pages with urlPattern "/{slug}" and posts with "/blog/{slug}":
|
|
1781
|
-
* const result = await resolveDinewayPath("/blog/hello-world");
|
|
1782
|
-
* if (result) {
|
|
1783
|
-
* console.log(result.collection); // "posts"
|
|
1784
|
-
* console.log(result.params.slug); // "hello-world"
|
|
1785
|
-
* console.log(result.entry.data); // post data
|
|
1786
|
-
* }
|
|
1787
|
-
* ```
|
|
1788
|
-
*/
|
|
1789
|
-
declare function resolveDinewayPath<T = Record<string, unknown>>(path: string): Promise<ResolvePathResult<T> | null>;
|
|
1790
|
-
//#endregion
|
|
1791
1347
|
//#region src/after.d.ts
|
|
1792
1348
|
/**
|
|
1793
1349
|
* Defer work past the current synchronous path.
|
|
@@ -2085,10 +1641,10 @@ declare function definePlugin(definition: StandardPluginDefinition): StandardPlu
|
|
|
2085
1641
|
*
|
|
2086
1642
|
* Every JSON.parse of a manifest.json should validate through this.
|
|
2087
1643
|
*/
|
|
2088
|
-
declare const pluginManifestSchema: z
|
|
2089
|
-
id: z
|
|
2090
|
-
version: z
|
|
2091
|
-
capabilities: z
|
|
1644
|
+
declare const pluginManifestSchema: z.ZodObject<{
|
|
1645
|
+
id: z.ZodString;
|
|
1646
|
+
version: z.ZodString;
|
|
1647
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
2092
1648
|
"network:request": "network:request";
|
|
2093
1649
|
"network:request:unrestricted": "network:request:unrestricted";
|
|
2094
1650
|
"content:read": "content:read";
|
|
@@ -2101,12 +1657,12 @@ declare const pluginManifestSchema: z$1.ZodObject<{
|
|
|
2101
1657
|
"hooks.email-events:register": "hooks.email-events:register";
|
|
2102
1658
|
"hooks.page-fragments:register": "hooks.page-fragments:register";
|
|
2103
1659
|
}>>;
|
|
2104
|
-
allowedHosts: z
|
|
2105
|
-
storage: z
|
|
2106
|
-
indexes: z
|
|
2107
|
-
uniqueIndexes: z
|
|
2108
|
-
}, z
|
|
2109
|
-
hooks: z
|
|
1660
|
+
allowedHosts: z.ZodArray<z.ZodString>;
|
|
1661
|
+
storage: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1662
|
+
indexes: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
1663
|
+
uniqueIndexes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
1664
|
+
}, z.core.$strip>>;
|
|
1665
|
+
hooks: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2110
1666
|
"plugin:install": "plugin:install";
|
|
2111
1667
|
"plugin:activate": "plugin:activate";
|
|
2112
1668
|
"plugin:deactivate": "plugin:deactivate";
|
|
@@ -2129,8 +1685,8 @@ declare const pluginManifestSchema: z$1.ZodObject<{
|
|
|
2129
1685
|
"comment:afterModerate": "comment:afterModerate";
|
|
2130
1686
|
"page:metadata": "page:metadata";
|
|
2131
1687
|
"page:fragments": "page:fragments";
|
|
2132
|
-
}>, z
|
|
2133
|
-
name: z
|
|
1688
|
+
}>, z.ZodObject<{
|
|
1689
|
+
name: z.ZodEnum<{
|
|
2134
1690
|
"plugin:install": "plugin:install";
|
|
2135
1691
|
"plugin:activate": "plugin:activate";
|
|
2136
1692
|
"plugin:deactivate": "plugin:deactivate";
|
|
@@ -2154,84 +1710,84 @@ declare const pluginManifestSchema: z$1.ZodObject<{
|
|
|
2154
1710
|
"page:metadata": "page:metadata";
|
|
2155
1711
|
"page:fragments": "page:fragments";
|
|
2156
1712
|
}>;
|
|
2157
|
-
exclusive: z
|
|
2158
|
-
priority: z
|
|
2159
|
-
timeout: z
|
|
2160
|
-
}, z
|
|
2161
|
-
routes: z
|
|
2162
|
-
name: z
|
|
2163
|
-
public: z
|
|
2164
|
-
}, z
|
|
2165
|
-
admin: z
|
|
2166
|
-
entry: z
|
|
2167
|
-
settingsSchema: z
|
|
2168
|
-
type: z
|
|
2169
|
-
default: z
|
|
2170
|
-
multiline: z
|
|
2171
|
-
label: z
|
|
2172
|
-
description: z
|
|
2173
|
-
}, z
|
|
2174
|
-
type: z
|
|
2175
|
-
default: z
|
|
2176
|
-
min: z
|
|
2177
|
-
max: z
|
|
2178
|
-
label: z
|
|
2179
|
-
description: z
|
|
2180
|
-
}, z
|
|
2181
|
-
type: z
|
|
2182
|
-
default: z
|
|
2183
|
-
label: z
|
|
2184
|
-
description: z
|
|
2185
|
-
}, z
|
|
2186
|
-
type: z
|
|
2187
|
-
options: z
|
|
2188
|
-
value: z
|
|
2189
|
-
label: z
|
|
2190
|
-
}, z
|
|
2191
|
-
default: z
|
|
2192
|
-
label: z
|
|
2193
|
-
description: z
|
|
2194
|
-
}, z
|
|
2195
|
-
type: z
|
|
2196
|
-
label: z
|
|
2197
|
-
description: z
|
|
2198
|
-
}, z
|
|
2199
|
-
type: z
|
|
2200
|
-
default: z
|
|
2201
|
-
placeholder: z
|
|
2202
|
-
label: z
|
|
2203
|
-
description: z
|
|
2204
|
-
}, z
|
|
2205
|
-
type: z
|
|
2206
|
-
default: z
|
|
2207
|
-
placeholder: z
|
|
2208
|
-
label: z
|
|
2209
|
-
description: z
|
|
2210
|
-
}, z
|
|
2211
|
-
pages: z
|
|
2212
|
-
path: z
|
|
2213
|
-
label: z
|
|
2214
|
-
icon: z
|
|
2215
|
-
}, z
|
|
2216
|
-
widgets: z
|
|
2217
|
-
id: z
|
|
2218
|
-
size: z
|
|
1713
|
+
exclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1714
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
1715
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1716
|
+
}, z.core.$strip>]>>;
|
|
1717
|
+
routes: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1718
|
+
name: z.ZodString;
|
|
1719
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
1720
|
+
}, z.core.$strip>]>>;
|
|
1721
|
+
admin: z.ZodObject<{
|
|
1722
|
+
entry: z.ZodOptional<z.ZodString>;
|
|
1723
|
+
settingsSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1724
|
+
type: z.ZodLiteral<"string">;
|
|
1725
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1726
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
1727
|
+
label: z.ZodString;
|
|
1728
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1729
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1730
|
+
type: z.ZodLiteral<"number">;
|
|
1731
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1732
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1733
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1734
|
+
label: z.ZodString;
|
|
1735
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1736
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1737
|
+
type: z.ZodLiteral<"boolean">;
|
|
1738
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
1739
|
+
label: z.ZodString;
|
|
1740
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1741
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1742
|
+
type: z.ZodLiteral<"select">;
|
|
1743
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1744
|
+
value: z.ZodString;
|
|
1745
|
+
label: z.ZodString;
|
|
1746
|
+
}, z.core.$strip>>;
|
|
1747
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1748
|
+
label: z.ZodString;
|
|
1749
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1750
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1751
|
+
type: z.ZodLiteral<"secret">;
|
|
1752
|
+
label: z.ZodString;
|
|
1753
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1754
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1755
|
+
type: z.ZodLiteral<"url">;
|
|
1756
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1757
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1758
|
+
label: z.ZodString;
|
|
1759
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1760
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1761
|
+
type: z.ZodLiteral<"email">;
|
|
1762
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1763
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1764
|
+
label: z.ZodString;
|
|
1765
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1766
|
+
}, z.core.$strip>], "type">>>;
|
|
1767
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1768
|
+
path: z.ZodString;
|
|
1769
|
+
label: z.ZodString;
|
|
1770
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1771
|
+
}, z.core.$strip>>>;
|
|
1772
|
+
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1773
|
+
id: z.ZodString;
|
|
1774
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
2219
1775
|
full: "full";
|
|
2220
1776
|
half: "half";
|
|
2221
1777
|
third: "third";
|
|
2222
1778
|
}>>;
|
|
2223
|
-
title: z
|
|
2224
|
-
}, z
|
|
2225
|
-
fieldWidgets: z
|
|
2226
|
-
name: z
|
|
2227
|
-
label: z
|
|
2228
|
-
fieldTypes: z
|
|
1779
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1780
|
+
}, z.core.$strip>>>;
|
|
1781
|
+
fieldWidgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1782
|
+
name: z.ZodString;
|
|
1783
|
+
label: z.ZodString;
|
|
1784
|
+
fieldTypes: z.ZodArray<z.ZodEnum<{
|
|
2229
1785
|
string: "string";
|
|
2230
1786
|
number: "number";
|
|
2231
1787
|
boolean: "boolean";
|
|
2232
1788
|
file: "file";
|
|
2233
|
-
slug: "slug";
|
|
2234
1789
|
image: "image";
|
|
1790
|
+
slug: "slug";
|
|
2235
1791
|
datetime: "datetime";
|
|
2236
1792
|
text: "text";
|
|
2237
1793
|
integer: "integer";
|
|
@@ -2242,15 +1798,15 @@ declare const pluginManifestSchema: z$1.ZodObject<{
|
|
|
2242
1798
|
json: "json";
|
|
2243
1799
|
repeater: "repeater";
|
|
2244
1800
|
}>>;
|
|
2245
|
-
elements: z
|
|
2246
|
-
type: z
|
|
2247
|
-
action_id: z
|
|
2248
|
-
label: z
|
|
2249
|
-
}, z
|
|
2250
|
-
}, z
|
|
2251
|
-
}, z
|
|
2252
|
-
}, z
|
|
2253
|
-
type ValidatedPluginManifest = z
|
|
1801
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1802
|
+
type: z.ZodString;
|
|
1803
|
+
action_id: z.ZodString;
|
|
1804
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1805
|
+
}, z.core.$loose>>>;
|
|
1806
|
+
}, z.core.$strip>>>;
|
|
1807
|
+
}, z.core.$strip>;
|
|
1808
|
+
}, z.core.$strip>;
|
|
1809
|
+
type ValidatedPluginManifest = z.infer<typeof pluginManifestSchema>;
|
|
2254
1810
|
//#endregion
|
|
2255
1811
|
//#region src/plugins/hooks.d.ts
|
|
2256
1812
|
type HookNameV2 = "plugin:install" | "plugin:activate" | "plugin:deactivate" | "plugin:uninstall" | "content:beforeSave" | "content:afterSave" | "content:beforeDelete" | "content:afterDelete" | "content:afterPublish" | "content:afterUnpublish" | "media:beforeUpload" | "media:afterUpload" | "cron" | "email:beforeSend" | "email:deliver" | "email:afterSend" | "comment:beforeCreate" | "comment:moderate" | "comment:afterCreate" | "comment:afterModerate" | "page:metadata" | "page:fragments";
|
|
@@ -3219,226 +2775,6 @@ interface PreviewToolbarConfig {
|
|
|
3219
2775
|
}
|
|
3220
2776
|
declare function renderPreviewToolbar(config: PreviewToolbarConfig): string;
|
|
3221
2777
|
//#endregion
|
|
3222
|
-
//#region src/settings/index.d.ts
|
|
3223
|
-
/**
|
|
3224
|
-
* Get a single site setting by key
|
|
3225
|
-
*
|
|
3226
|
-
* Returns `undefined` if the setting has not been configured.
|
|
3227
|
-
* For media settings (logo, favicon), the URL is resolved automatically.
|
|
3228
|
-
*
|
|
3229
|
-
* @param key - The setting key (e.g., "title", "logo", "social")
|
|
3230
|
-
* @returns The setting value, or undefined if not set
|
|
3231
|
-
*
|
|
3232
|
-
* @example
|
|
3233
|
-
* ```ts
|
|
3234
|
-
* import { getSiteSetting } from "dineway";
|
|
3235
|
-
*
|
|
3236
|
-
* const title = await getSiteSetting("title");
|
|
3237
|
-
* const logo = await getSiteSetting("logo");
|
|
3238
|
-
* console.log(logo?.url); // Resolved URL
|
|
3239
|
-
* ```
|
|
3240
|
-
*/
|
|
3241
|
-
declare function getSiteSetting<K extends SiteSettingKey>(key: K): Promise<SiteSettings[K] | undefined>;
|
|
3242
|
-
/**
|
|
3243
|
-
* Get all site settings
|
|
3244
|
-
*
|
|
3245
|
-
* Returns all configured settings. Unset values are undefined.
|
|
3246
|
-
* Media references (logo/favicon) are resolved to include URLs.
|
|
3247
|
-
*
|
|
3248
|
-
* @example
|
|
3249
|
-
* ```ts
|
|
3250
|
-
* import { getSiteSettings } from "dineway";
|
|
3251
|
-
*
|
|
3252
|
-
* const settings = await getSiteSettings();
|
|
3253
|
-
* console.log(settings.title); // "My Site"
|
|
3254
|
-
* console.log(settings.logo?.url); // "/_dineway/api/media/file/abc123"
|
|
3255
|
-
* ```
|
|
3256
|
-
*/
|
|
3257
|
-
declare function getSiteSettings(): Promise<Partial<SiteSettings>>;
|
|
3258
|
-
/**
|
|
3259
|
-
* Set site settings (internal function used by admin API)
|
|
3260
|
-
*
|
|
3261
|
-
* Merges provided settings with existing ones. Only provided fields are updated.
|
|
3262
|
-
* Media references should include just the mediaId; URLs are resolved on read.
|
|
3263
|
-
*
|
|
3264
|
-
* @param settings - Partial settings object with values to update
|
|
3265
|
-
* @param db - Kysely database instance
|
|
3266
|
-
* @returns Promise that resolves when settings are saved
|
|
3267
|
-
*
|
|
3268
|
-
* @internal
|
|
3269
|
-
*
|
|
3270
|
-
* @example
|
|
3271
|
-
* ```ts
|
|
3272
|
-
* // Update multiple settings at once
|
|
3273
|
-
* await setSiteSettings({
|
|
3274
|
-
* title: "My Site",
|
|
3275
|
-
* tagline: "Welcome",
|
|
3276
|
-
* logo: { mediaId: "med_123", alt: "Logo" }
|
|
3277
|
-
* }, db);
|
|
3278
|
-
* ```
|
|
3279
|
-
*/
|
|
3280
|
-
declare function setSiteSettings(settings: Partial<SiteSettings>, db: Kysely<Database>): Promise<void>;
|
|
3281
|
-
/**
|
|
3282
|
-
* Get a single plugin setting by key.
|
|
3283
|
-
*
|
|
3284
|
-
* Plugin settings are stored in the options table under
|
|
3285
|
-
* `plugin:<pluginId>:settings:<key>`.
|
|
3286
|
-
*/
|
|
3287
|
-
declare function getPluginSetting<T = unknown>(pluginId: string, key: string): Promise<T | undefined>;
|
|
3288
|
-
/**
|
|
3289
|
-
* Get all persisted plugin settings for a plugin.
|
|
3290
|
-
*
|
|
3291
|
-
* Defaults declared in `admin.settingsSchema` are not materialized
|
|
3292
|
-
* automatically; callers should apply their own fallback defaults.
|
|
3293
|
-
*/
|
|
3294
|
-
declare function getPluginSettings(pluginId: string): Promise<Record<string, unknown>>;
|
|
3295
|
-
//#endregion
|
|
3296
|
-
//#region src/comments/query.d.ts
|
|
3297
|
-
interface GetCommentsOptions {
|
|
3298
|
-
collection: string;
|
|
3299
|
-
contentId: string;
|
|
3300
|
-
threaded?: boolean;
|
|
3301
|
-
}
|
|
3302
|
-
interface GetCommentsResult {
|
|
3303
|
-
items: PublicComment[];
|
|
3304
|
-
total: number;
|
|
3305
|
-
}
|
|
3306
|
-
/**
|
|
3307
|
-
* Get approved comments for a content item.
|
|
3308
|
-
*
|
|
3309
|
-
* @example
|
|
3310
|
-
* ```ts
|
|
3311
|
-
* import { getComments } from "dineway";
|
|
3312
|
-
*
|
|
3313
|
-
* const { items, total } = await getComments({
|
|
3314
|
-
* collection: "posts",
|
|
3315
|
-
* contentId: post.id,
|
|
3316
|
-
* threaded: true,
|
|
3317
|
-
* });
|
|
3318
|
-
* ```
|
|
3319
|
-
*/
|
|
3320
|
-
declare function getComments(options: GetCommentsOptions): Promise<GetCommentsResult>;
|
|
3321
|
-
/**
|
|
3322
|
-
* Get the count of approved comments for a content item.
|
|
3323
|
-
*
|
|
3324
|
-
* @example
|
|
3325
|
-
* ```ts
|
|
3326
|
-
* import { getCommentCount } from "dineway";
|
|
3327
|
-
*
|
|
3328
|
-
* const count = await getCommentCount("posts", post.id);
|
|
3329
|
-
* ```
|
|
3330
|
-
*/
|
|
3331
|
-
declare function getCommentCount(collection: string, contentId: string): Promise<number>;
|
|
3332
|
-
//#endregion
|
|
3333
|
-
//#region src/menus/types.d.ts
|
|
3334
|
-
/**
|
|
3335
|
-
* Menu item types
|
|
3336
|
-
*/
|
|
3337
|
-
type MenuItemType = string;
|
|
3338
|
-
/**
|
|
3339
|
-
* Menu item as returned to templates (with resolved URL)
|
|
3340
|
-
*/
|
|
3341
|
-
interface MenuItem {
|
|
3342
|
-
id: string;
|
|
3343
|
-
label: string;
|
|
3344
|
-
url: string;
|
|
3345
|
-
target?: string;
|
|
3346
|
-
titleAttr?: string;
|
|
3347
|
-
cssClasses?: string;
|
|
3348
|
-
children: MenuItem[];
|
|
3349
|
-
}
|
|
3350
|
-
/**
|
|
3351
|
-
* Menu as returned to templates
|
|
3352
|
-
*/
|
|
3353
|
-
interface Menu {
|
|
3354
|
-
id: string;
|
|
3355
|
-
name: string;
|
|
3356
|
-
label: string;
|
|
3357
|
-
items: MenuItem[];
|
|
3358
|
-
}
|
|
3359
|
-
/**
|
|
3360
|
-
* Input for creating a menu item
|
|
3361
|
-
*/
|
|
3362
|
-
interface CreateMenuItemInput {
|
|
3363
|
-
type: MenuItemType;
|
|
3364
|
-
label: string;
|
|
3365
|
-
referenceCollection?: string;
|
|
3366
|
-
referenceId?: string;
|
|
3367
|
-
customUrl?: string;
|
|
3368
|
-
target?: string;
|
|
3369
|
-
titleAttr?: string;
|
|
3370
|
-
cssClasses?: string;
|
|
3371
|
-
parentId?: string;
|
|
3372
|
-
sortOrder?: number;
|
|
3373
|
-
}
|
|
3374
|
-
/**
|
|
3375
|
-
* Input for updating a menu item
|
|
3376
|
-
*/
|
|
3377
|
-
interface UpdateMenuItemInput {
|
|
3378
|
-
label?: string;
|
|
3379
|
-
customUrl?: string;
|
|
3380
|
-
target?: string;
|
|
3381
|
-
titleAttr?: string;
|
|
3382
|
-
cssClasses?: string;
|
|
3383
|
-
parentId?: string | null;
|
|
3384
|
-
sortOrder?: number;
|
|
3385
|
-
}
|
|
3386
|
-
/**
|
|
3387
|
-
* Input for creating a menu
|
|
3388
|
-
*/
|
|
3389
|
-
interface CreateMenuInput {
|
|
3390
|
-
name: string;
|
|
3391
|
-
label: string;
|
|
3392
|
-
}
|
|
3393
|
-
/**
|
|
3394
|
-
* Input for updating a menu
|
|
3395
|
-
*/
|
|
3396
|
-
interface UpdateMenuInput {
|
|
3397
|
-
label?: string;
|
|
3398
|
-
}
|
|
3399
|
-
/**
|
|
3400
|
-
* Input for reordering menu items
|
|
3401
|
-
*/
|
|
3402
|
-
interface ReorderMenuItemsInput {
|
|
3403
|
-
items: Array<{
|
|
3404
|
-
id: string;
|
|
3405
|
-
parentId: string | null;
|
|
3406
|
-
sortOrder: number;
|
|
3407
|
-
}>;
|
|
3408
|
-
}
|
|
3409
|
-
//#endregion
|
|
3410
|
-
//#region src/menus/index.d.ts
|
|
3411
|
-
/**
|
|
3412
|
-
* Get menu by name with resolved URLs
|
|
3413
|
-
*
|
|
3414
|
-
* @example
|
|
3415
|
-
* ```ts
|
|
3416
|
-
* import { getMenu } from "dineway";
|
|
3417
|
-
*
|
|
3418
|
-
* const menu = await getMenu("primary");
|
|
3419
|
-
* if (menu) {
|
|
3420
|
-
* console.log(menu.items); // Array of MenuItem with resolved URLs
|
|
3421
|
-
* }
|
|
3422
|
-
* ```
|
|
3423
|
-
*/
|
|
3424
|
-
declare function getMenu(name: string): Promise<Menu | null>;
|
|
3425
|
-
/**
|
|
3426
|
-
* Get all menus (without items - for admin list)
|
|
3427
|
-
*
|
|
3428
|
-
* @example
|
|
3429
|
-
* ```ts
|
|
3430
|
-
* import { getMenus } from "dineway";
|
|
3431
|
-
*
|
|
3432
|
-
* const menus = await getMenus();
|
|
3433
|
-
* console.log(menus); // [{ id, name, label }]
|
|
3434
|
-
* ```
|
|
3435
|
-
*/
|
|
3436
|
-
declare function getMenus(): Promise<Array<{
|
|
3437
|
-
id: string;
|
|
3438
|
-
name: string;
|
|
3439
|
-
label: string;
|
|
3440
|
-
}>>;
|
|
3441
|
-
//#endregion
|
|
3442
2778
|
//#region src/bylines/index.d.ts
|
|
3443
2779
|
/**
|
|
3444
2780
|
* Get a byline by ID.
|
|
@@ -3469,170 +2805,6 @@ declare function getByline(id: string): Promise<BylineSummary | null>;
|
|
|
3469
2805
|
*/
|
|
3470
2806
|
declare function getBylineBySlug(slug: string): Promise<BylineSummary | null>;
|
|
3471
2807
|
//#endregion
|
|
3472
|
-
//#region src/taxonomies/types.d.ts
|
|
3473
|
-
/**
|
|
3474
|
-
* Taxonomy types for Dineway Agentic Web builder
|
|
3475
|
-
*/
|
|
3476
|
-
/**
|
|
3477
|
-
* Taxonomy definition - describes a taxonomy like "category" or "tag"
|
|
3478
|
-
*/
|
|
3479
|
-
interface TaxonomyDef {
|
|
3480
|
-
id: string;
|
|
3481
|
-
name: string;
|
|
3482
|
-
label: string;
|
|
3483
|
-
labelSingular?: string;
|
|
3484
|
-
hierarchical: boolean;
|
|
3485
|
-
collections: string[];
|
|
3486
|
-
}
|
|
3487
|
-
/**
|
|
3488
|
-
* Taxonomy term - a specific term within a taxonomy (e.g., "News" in "category")
|
|
3489
|
-
*/
|
|
3490
|
-
interface TaxonomyTerm {
|
|
3491
|
-
id: string;
|
|
3492
|
-
name: string;
|
|
3493
|
-
slug: string;
|
|
3494
|
-
label: string;
|
|
3495
|
-
parentId?: string;
|
|
3496
|
-
description?: string;
|
|
3497
|
-
children: TaxonomyTerm[];
|
|
3498
|
-
count?: number;
|
|
3499
|
-
}
|
|
3500
|
-
/**
|
|
3501
|
-
* Flat version for DB row
|
|
3502
|
-
*/
|
|
3503
|
-
interface TaxonomyTermRow {
|
|
3504
|
-
id: string;
|
|
3505
|
-
name: string;
|
|
3506
|
-
slug: string;
|
|
3507
|
-
label: string;
|
|
3508
|
-
parent_id: string | null;
|
|
3509
|
-
data: string | null;
|
|
3510
|
-
}
|
|
3511
|
-
/**
|
|
3512
|
-
* Input for creating a term
|
|
3513
|
-
*/
|
|
3514
|
-
interface CreateTermInput {
|
|
3515
|
-
slug: string;
|
|
3516
|
-
label: string;
|
|
3517
|
-
parentId?: string;
|
|
3518
|
-
description?: string;
|
|
3519
|
-
}
|
|
3520
|
-
/**
|
|
3521
|
-
* Input for updating a term
|
|
3522
|
-
*/
|
|
3523
|
-
interface UpdateTermInput {
|
|
3524
|
-
slug?: string;
|
|
3525
|
-
label?: string;
|
|
3526
|
-
parentId?: string | null;
|
|
3527
|
-
description?: string;
|
|
3528
|
-
}
|
|
3529
|
-
//#endregion
|
|
3530
|
-
//#region src/taxonomies/index.d.ts
|
|
3531
|
-
/**
|
|
3532
|
-
* Get all taxonomy definitions
|
|
3533
|
-
*/
|
|
3534
|
-
declare function getTaxonomyDefs(): Promise<TaxonomyDef[]>;
|
|
3535
|
-
/**
|
|
3536
|
-
* Get a single taxonomy definition by name
|
|
3537
|
-
*/
|
|
3538
|
-
declare function getTaxonomyDef(name: string): Promise<TaxonomyDef | null>;
|
|
3539
|
-
/**
|
|
3540
|
-
* Get all terms for a taxonomy (as tree for hierarchical, flat for tags)
|
|
3541
|
-
*/
|
|
3542
|
-
declare function getTaxonomyTerms(taxonomyName: string): Promise<TaxonomyTerm[]>;
|
|
3543
|
-
/**
|
|
3544
|
-
* Get a single term by taxonomy and slug
|
|
3545
|
-
*/
|
|
3546
|
-
declare function getTerm(taxonomyName: string, slug: string): Promise<TaxonomyTerm | null>;
|
|
3547
|
-
/**
|
|
3548
|
-
* Get terms assigned to an entry
|
|
3549
|
-
*/
|
|
3550
|
-
declare function getEntryTerms(collection: string, entryId: string, taxonomyName?: string): Promise<TaxonomyTerm[]>;
|
|
3551
|
-
/**
|
|
3552
|
-
* Get terms for multiple entries in a single query (batched API)
|
|
3553
|
-
*
|
|
3554
|
-
* This is more efficient than calling getEntryTerms for each entry
|
|
3555
|
-
* when you need terms for a list of entries.
|
|
3556
|
-
*
|
|
3557
|
-
* @param collection - The collection type (e.g., "posts")
|
|
3558
|
-
* @param entryIds - Array of entry IDs
|
|
3559
|
-
* @param taxonomyName - The taxonomy name (e.g., "categories")
|
|
3560
|
-
* @returns Map from entry ID to array of terms
|
|
3561
|
-
*/
|
|
3562
|
-
declare function getTermsForEntries(collection: string, entryIds: string[], taxonomyName: string): Promise<Map<string, TaxonomyTerm[]>>;
|
|
3563
|
-
/**
|
|
3564
|
-
* Get entries by term (wraps getDinewayCollection)
|
|
3565
|
-
*/
|
|
3566
|
-
declare function getEntriesByTerm(collection: string, taxonomyName: string, termSlug: string): Promise<Array<{
|
|
3567
|
-
id: string;
|
|
3568
|
-
data: Record<string, unknown>;
|
|
3569
|
-
}>>;
|
|
3570
|
-
//#endregion
|
|
3571
|
-
//#region src/widgets/types.d.ts
|
|
3572
|
-
type WidgetType = "content" | "menu" | "component";
|
|
3573
|
-
interface Widget {
|
|
3574
|
-
id: string;
|
|
3575
|
-
type: WidgetType;
|
|
3576
|
-
title?: string;
|
|
3577
|
-
content?: PortableTextBlock$1[];
|
|
3578
|
-
menuName?: string;
|
|
3579
|
-
componentId?: string;
|
|
3580
|
-
componentProps?: Record<string, unknown>;
|
|
3581
|
-
}
|
|
3582
|
-
interface WidgetArea {
|
|
3583
|
-
id: string;
|
|
3584
|
-
name: string;
|
|
3585
|
-
label: string;
|
|
3586
|
-
description?: string;
|
|
3587
|
-
widgets: Widget[];
|
|
3588
|
-
}
|
|
3589
|
-
interface WidgetComponentDef {
|
|
3590
|
-
id: string;
|
|
3591
|
-
label: string;
|
|
3592
|
-
description?: string;
|
|
3593
|
-
props: Record<string, PropDef>;
|
|
3594
|
-
}
|
|
3595
|
-
interface PropDef {
|
|
3596
|
-
type: "string" | "number" | "boolean" | "select";
|
|
3597
|
-
label: string;
|
|
3598
|
-
default?: unknown;
|
|
3599
|
-
options?: Array<{
|
|
3600
|
-
value: string;
|
|
3601
|
-
label: string;
|
|
3602
|
-
}>;
|
|
3603
|
-
}
|
|
3604
|
-
interface CreateWidgetAreaInput {
|
|
3605
|
-
name: string;
|
|
3606
|
-
label: string;
|
|
3607
|
-
description?: string;
|
|
3608
|
-
}
|
|
3609
|
-
interface CreateWidgetInput {
|
|
3610
|
-
type: WidgetType;
|
|
3611
|
-
title?: string;
|
|
3612
|
-
content?: PortableTextBlock$1[];
|
|
3613
|
-
menuName?: string;
|
|
3614
|
-
componentId?: string;
|
|
3615
|
-
componentProps?: Record<string, unknown>;
|
|
3616
|
-
}
|
|
3617
|
-
interface UpdateWidgetInput extends Partial<CreateWidgetInput> {}
|
|
3618
|
-
interface ReorderWidgetsInput {
|
|
3619
|
-
widgetIds: string[];
|
|
3620
|
-
}
|
|
3621
|
-
//#endregion
|
|
3622
|
-
//#region src/widgets/index.d.ts
|
|
3623
|
-
/**
|
|
3624
|
-
* Get a widget area by name, with all its widgets
|
|
3625
|
-
*/
|
|
3626
|
-
declare function getWidgetArea(name: string): Promise<WidgetArea | null>;
|
|
3627
|
-
/**
|
|
3628
|
-
* Get all widget areas with their widgets
|
|
3629
|
-
*/
|
|
3630
|
-
declare function getWidgetAreas(): Promise<WidgetArea[]>;
|
|
3631
|
-
/**
|
|
3632
|
-
* Get available widget components (for admin UI)
|
|
3633
|
-
*/
|
|
3634
|
-
declare function getWidgetComponents(): WidgetComponentDef[];
|
|
3635
|
-
//#endregion
|
|
3636
2808
|
//#region src/search/types.d.ts
|
|
3637
2809
|
/**
|
|
3638
2810
|
* Search Types
|
|
@@ -4427,4 +3599,4 @@ declare global {
|
|
|
4427
3599
|
var __dinewayConfig: DinewayConfig | undefined;
|
|
4428
3600
|
}
|
|
4429
3601
|
//#endregion
|
|
4430
|
-
export {
|
|
3602
|
+
export { createPluginManager as $, isParseError as $n, SandboxOptions as $t, dropSessionDatabaseTables as A, handleContentDelete as An, verifyPreviewSignature as At, GeneratePreviewTokenOptions as B, handleContentSchedule as Bn, prosemirrorToPortableText as Bt, getByline as C, handleRevisionList as Cn, SessionOpenOrCreateOptions as Ct, AppliedSnapshotMeta as D, handleContentCountScheduled as Dn, defaultPreviewSidecarClient as Dt, renderPreviewToolbar as E, handleContentCompare as En, buildPreviewSignatureHeader as Et, getPreviewToken as F, handleContentList as Fn, AfterCallback as Ft, parseContentId as G, CreateMediaInput as Gn, PortableTextSpan as Gt, VerifyPreviewTokenOptions as H, handleContentUnpublish as Hn, PortableTextImageBlock as Ht, isPreviewRequest as I, handleContentListTrashed as In, after as It, createNodeSandboxRunner as J, ContentRepository as Jn, ProseMirrorDocument as Jt, verifyPreviewToken as K, MediaItem as Kn, PortableTextTextBlock as Kt, GetPreviewUrlOptions as L, handleContentPermanentDelete as Ln, computeContentHash as Lt, Snapshot as M, handleContentDuplicate as Mn, getFallbackChain as Mt, renderPreviewLoadingPage as N, handleContentGet as Nn, getI18nConfig as Nt, ApplySnapshotToDatabaseOptions as O, handleContentCountTrashed as On, parsePreviewSignatureHeader as Ot, isBlockedInPreview as P, handleContentGetIncludingTrashed as Pn, isI18nEnabled as Pt, PluginManager as Q, ParseResult as Qn, SandboxEmailSendCallback as Qt, buildPreviewUrl as R, handleContentPublish as Rn, hashString as Rt, Suggestion as S, handleRevisionGet as Sn, SessionOpenOptions as St, PreviewToolbarConfig as T, generateManifest as Tn, PreviewSidecarSignature as Tt, VerifyPreviewTokenResult as U, handleContentUnschedule as Un, PortableTextLinkMark as Ut, PreviewTokenPayload as V, handleContentTranslations as Vn, PortableTextCodeBlock as Vt, generatePreviewToken as W, handleContentUpdate as Wn, PortableTextMarkDef as Wt, SandboxNotAvailableError as X, DinewayDatabaseError as Xn, ProseMirrorNode as Xt, NoopSandboxRunner as Y, DatabaseConfig as Yn, ProseMirrorMark as Yt, createNoopSandboxRunner as Z, OptionsRepository as Zn, SandboxEmailMessage as Zt, SearchOptions as _, handleMediaGet as _n, SessionCleanupResult as _t, S3StorageConfig as a, getSections as an, ApiContext as ar, ValidatedPluginManifest as at, SearchStats as b, RevisionListResponse as bn, SessionDatabaseInfo as bt, extractSearchableFields as c, Section as cn, FieldDescriptor as cr, CollectionFilter as ct, search as d, SchemaError as dn, dinewayLoader as dt, SandboxRunner as en, parseBody as er, PluginRouteError as et, searchCollection as f, SchemaRegistry as fn, getDb as ft, SearchConfig as g, handleMediaDelete as gn, FileSessionDatabaseFactoryOptions as gt, CollectionSearchOptions as h, handleMediaCreate as hn, FileSessionDatabaseFactory as ht, LocalStorageConfig as i, getSection as in, handleError as ir, createHookPipeline as it, getAppliedSnapshotMeta as j, handleContentDiscardDraft as jn, I18nConfig as jt, applySnapshotToDatabase as k, handleContentCreate as kn, signPreviewUrl as kt, getSearchStats as l, SectionSource as ln, ListResponse as lr, EntryData as lt, FTSManager as m, MediaResponse as mn, createFilePreviewMiddleware as mt, PluginDescriptor as n, SandboxedPlugin as nn, apiError as nr, HookPipeline as nt, StorageDescriptor as o, CreateSectionInput as on, ContentListResponse as or, pluginManifestSchema as ot, searchWithDb as p, MediaListResponse as pn, FilePreviewMiddlewareConfig as pt, NodeSandboxRunner as q, MediaRepository as qn, PortableTextUnknownBlock as qt, getStoredConfig as r, SerializedRequest as rn, apiSuccess as rr, HookResult as rt, extractPlainText as s, GetSectionsOptions as sn, ContentResponse as sr, definePlugin as st, DinewayConfig as t, SandboxRunnerFactory as tn, parseQuery as tr, EmailPipeline as tt, getSuggestions as u, UpdateSectionInput as un, ManifestResponse as ur, EntryFilter as ut, SearchResponse as v, handleMediaList as vn, SessionDatabaseFactory as vt, getBylineBySlug as w, handleRevisionRestore as wn, PreviewSidecarClient as wt, SuggestOptions as x, RevisionResponse as xn, SessionDatabaseLimitError as xt, SearchResult as y, handleMediaUpdate as yn, SessionDatabaseHandle as yt, getPreviewUrl as z, handleContentRestore as zn, portableTextToProsemirror as zt };
|