emdash 1.0.0 → 1.0.1-rc.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/README.md +4 -0
- package/dist/action-token-DBki7IT4.mjs +26 -0
- package/dist/action-token-DBki7IT4.mjs.map +1 -0
- package/dist/activation-DDuqAat2.mjs +387 -0
- package/dist/activation-DDuqAat2.mjs.map +1 -0
- package/dist/adapters-DcqT_GzQ.d.mts +171 -0
- package/dist/adapters-DcqT_GzQ.d.mts.map +1 -0
- package/dist/after-PcEvMY_6.mjs +96 -0
- package/dist/after-PcEvMY_6.mjs.map +1 -0
- package/dist/allowed-origins-CFtudhyw.mjs +116 -0
- package/dist/allowed-origins-CFtudhyw.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +69 -0
- package/dist/api/route-utils.d.mts.map +1 -0
- package/dist/api/route-utils.mjs +85 -0
- package/dist/api/route-utils.mjs.map +1 -0
- package/dist/api/schemas/index.d.mts +2 -0
- package/dist/api/schemas/index.mjs +13 -0
- package/dist/api-BJFwdTiG.mjs +4974 -0
- package/dist/api-BJFwdTiG.mjs.map +1 -0
- package/dist/api-tokens-BLz2MtQs.mjs +3 -0
- package/dist/api-tokens-P3mAaQgr.mjs +166 -0
- package/dist/api-tokens-P3mAaQgr.mjs.map +1 -0
- package/dist/apply-BNvvsD51.mjs +1672 -0
- package/dist/apply-BNvvsD51.mjs.map +1 -0
- package/dist/approvals-quy61IC4.mjs +460 -0
- package/dist/approvals-quy61IC4.mjs.map +1 -0
- package/dist/artifact-fetch-CWxyELVI.mjs +659 -0
- package/dist/artifact-fetch-CWxyELVI.mjs.map +1 -0
- package/dist/astro/image-endpoint.d.mts +8 -0
- package/dist/astro/image-endpoint.d.mts.map +1 -0
- package/dist/astro/image-endpoint.mjs +55 -0
- package/dist/astro/image-endpoint.mjs.map +1 -0
- package/dist/astro/index.d.mts +39 -7
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +908 -514
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +15 -7
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +146 -211
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.d.mts +15 -0
- package/dist/astro/middleware/media-usage-write-fence.d.mts.map +1 -0
- package/dist/astro/middleware/media-usage-write-fence.mjs +117 -0
- package/dist/astro/middleware/media-usage-write-fence.mjs.map +1 -0
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +48 -15
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.d.mts +5 -1
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +542 -76
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +66 -4
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +817 -1844
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/PluginRegistry.d.mts +19 -0
- package/dist/astro/routes/PluginRegistry.d.mts.map +1 -0
- package/dist/astro/routes/PluginRegistry.mjs +26 -0
- package/dist/astro/routes/PluginRegistry.mjs.map +1 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.d.mts +15 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +78 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.d.mts +15 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +78 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.d.mts +11 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +35 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/api-tokens/index.d.mts +17 -0
- package/dist/astro/routes/api/admin/api-tokens/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +54 -0
- package/dist/astro/routes/api/admin/api-tokens/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.d.mts +8 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +25 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.d.mts +10 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +66 -0
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/byline-fields/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +54 -0
- package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.d.mts +8 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +38 -0
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts +10 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +92 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/bylines/_id_/translations.d.mts +9 -0
- package/dist/astro/routes/api/admin/bylines/_id_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +84 -0
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/admin/bylines/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/bylines/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/bylines/index.mjs +91 -0
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.d.mts +8 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +59 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/_id_.d.mts +15 -0
- package/dist/astro/routes/api/admin/comments/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/_id_.mjs +51 -0
- package/dist/astro/routes/api/admin/comments/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/bulk.d.mts +8 -0
- package/dist/astro/routes/api/admin/comments/bulk.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/bulk.mjs +49 -0
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/counts.d.mts +8 -0
- package/dist/astro/routes/api/admin/comments/counts.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/counts.mjs +29 -0
- package/dist/astro/routes/api/admin/comments/counts.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/index.d.mts +11 -0
- package/dist/astro/routes/api/admin/comments/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/index.mjs +53 -0
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/core-update.d.mts +8 -0
- package/dist/astro/routes/api/admin/core-update.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/core-update.mjs +28 -0
- package/dist/astro/routes/api/admin/core-update.mjs.map +1 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.d.mts +8 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +50 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +35 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/activation.d.mts +9 -0
- package/dist/astro/routes/api/admin/media-usage/activation.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +54 -0
- package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +45 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +45 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/progress.d.mts +9 -0
- package/dist/astro/routes/api/admin/media-usage/progress.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +56 -0
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/repair.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/repair.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +53 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +46 -0
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.d.mts +8 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +46 -0
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.d.mts +19 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +71 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.d.mts +15 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +52 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +28 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +28 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +105 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +41 -0
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/settings.d.mts +9 -0
- package/dist/astro/routes/api/admin/plugins/_id_/settings.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +116 -0
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +112 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +139 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/index.mjs +103 -0
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +44 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +99 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +142 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +106 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +112 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +160 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/artifact.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/artifact.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +362 -0
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +155 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +221 -0
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +117 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/updates.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/updates.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/updates.mjs +109 -0
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -0
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.d.mts +8 -0
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +29 -0
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +99 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.d.mts +8 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +44 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +115 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/_...path_.d.mts +12 -0
- package/dist/astro/routes/api/admin/transfer/_...path_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs +144 -0
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +69 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +69 -0
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/approvals/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +68 -0
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/capabilities.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/capabilities.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs +71 -0
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +68 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +71 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +70 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +67 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +70 -0
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/transfer/exports/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs +92 -0
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +67 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +71 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +79 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +67 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +78 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +78 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +67 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +71 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +68 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.d.mts +8 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +67 -0
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/transfer/imports/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs +100 -0
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +45 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +34 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/users/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +117 -0
- package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +56 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/index.mjs +67 -0
- package/dist/astro/routes/api/admin/users/index.mjs.map +1 -0
- package/dist/astro/routes/api/auth/dev-bypass.d.mts +9 -0
- package/dist/astro/routes/api/auth/dev-bypass.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/dev-bypass.mjs +83 -0
- package/dist/astro/routes/api/auth/dev-bypass.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/accept.d.mts +8 -0
- package/dist/astro/routes/api/auth/invite/accept.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/invite/accept.mjs +36 -0
- package/dist/astro/routes/api/auth/invite/accept.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/complete.d.mts +8 -0
- package/dist/astro/routes/api/auth/invite/complete.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/invite/complete.mjs +70 -0
- package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/index.d.mts +8 -0
- package/dist/astro/routes/api/auth/invite/index.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/invite/index.mjs +70 -0
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/register-options.d.mts +8 -0
- package/dist/astro/routes/api/auth/invite/register-options.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/invite/register-options.mjs +57 -0
- package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -0
- package/dist/astro/routes/api/auth/logout.d.mts +8 -0
- package/dist/astro/routes/api/auth/logout.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/logout.mjs +29 -0
- package/dist/astro/routes/api/auth/logout.mjs.map +1 -0
- package/dist/astro/routes/api/auth/magic-link/send.d.mts +8 -0
- package/dist/astro/routes/api/auth/magic-link/send.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/magic-link/send.mjs +69 -0
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -0
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts +9 -0
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +59 -0
- package/dist/astro/routes/api/auth/magic-link/verify.mjs.map +1 -0
- package/dist/astro/routes/api/auth/me.d.mts +14 -0
- package/dist/astro/routes/api/auth/me.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/me.mjs +71 -0
- package/dist/astro/routes/api/auth/me.mjs.map +1 -0
- package/dist/astro/routes/api/auth/mode.d.mts +8 -0
- package/dist/astro/routes/api/auth/mode.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/mode.mjs +34 -0
- package/dist/astro/routes/api/auth/mode.mjs.map +1 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts +8 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +149 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.d.mts +8 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +66 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/_id_.d.mts +15 -0
- package/dist/astro/routes/api/auth/passkey/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +75 -0
- package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/index.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/index.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/index.mjs +30 -0
- package/dist/astro/routes/api/auth/passkey/index.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/options.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/options.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/options.mjs +50 -0
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/register/options.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/register/options.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +57 -0
- package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +72 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/verify.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/verify.mjs +63 -0
- package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -0
- package/dist/astro/routes/api/auth/signup/complete.d.mts +8 -0
- package/dist/astro/routes/api/auth/signup/complete.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/signup/complete.mjs +71 -0
- package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -0
- package/dist/astro/routes/api/auth/signup/request.d.mts +8 -0
- package/dist/astro/routes/api/auth/signup/request.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/signup/request.mjs +57 -0
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -0
- package/dist/astro/routes/api/auth/signup/verify.d.mts +8 -0
- package/dist/astro/routes/api/auth/signup/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/signup/verify.mjs +37 -0
- package/dist/astro/routes/api/auth/signup/verify.mjs.map +1 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts +15 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +60 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.d.mts +9 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.d.mts.map +1 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +189 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +22 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +51 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +32 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.d.mts +10 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +73 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +25 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +38 -0
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +135 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts +15 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +74 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +80 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +75 -0
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +30 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +24 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts +9 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +85 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts +15 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +133 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +45 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +58 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts +10 -0
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +114 -0
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/authors.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/authors.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/authors.mjs +21 -0
- package/dist/astro/routes/api/content/_collection_/authors.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/index.d.mts +9 -0
- package/dist/astro/routes/api/content/_collection_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs +77 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/trash.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/trash.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/trash.mjs +36 -0
- package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -0
- package/dist/astro/routes/api/dashboard.d.mts +8 -0
- package/dist/astro/routes/api/dashboard.d.mts.map +1 -0
- package/dist/astro/routes/api/dashboard.mjs +37 -0
- package/dist/astro/routes/api/dashboard.mjs.map +1 -0
- package/dist/astro/routes/api/dev/emails.d.mts +9 -0
- package/dist/astro/routes/api/dev/emails.d.mts.map +1 -0
- package/dist/astro/routes/api/dev/emails.mjs +22 -0
- package/dist/astro/routes/api/dev/emails.mjs.map +1 -0
- package/dist/astro/routes/api/health.d.mts +8 -0
- package/dist/astro/routes/api/health.d.mts.map +1 -0
- package/dist/astro/routes/api/health.mjs +23 -0
- package/dist/astro/routes/api/health.mjs.map +1 -0
- package/dist/astro/routes/api/import/probe.d.mts +18 -0
- package/dist/astro/routes/api/import/probe.d.mts.map +1 -0
- package/dist/astro/routes/api/import/probe.mjs +56 -0
- package/dist/astro/routes/api/import/probe.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts +88 -0
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +315 -0
- package/dist/astro/routes/api/import/wordpress/analyze.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +66 -0
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/execute.mjs +353 -0
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/media.d.mts +51 -0
- package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/media.mjs +241 -0
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/prepare.d.mts +20 -0
- package/dist/astro/routes/api/import/wordpress/prepare.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +131 -0
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +63 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +149 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +37 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +179 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +16 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +92 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.d.mts +8 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +29 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +60 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +718 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -0
- package/dist/astro/routes/api/manifest.d.mts +8 -0
- package/dist/astro/routes/api/manifest.d.mts.map +1 -0
- package/dist/astro/routes/api/manifest.mjs +65 -0
- package/dist/astro/routes/api/manifest.mjs.map +1 -0
- package/dist/astro/routes/api/mcp.d.mts +16 -0
- package/dist/astro/routes/api/mcp.d.mts.map +1 -0
- package/dist/astro/routes/api/mcp.mjs +2693 -0
- package/dist/astro/routes/api/mcp.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/confirm.d.mts +11 -0
- package/dist/astro/routes/api/media/_id_/confirm.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/confirm.mjs +178 -0
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/replace.d.mts +8 -0
- package/dist/astro/routes/api/media/_id_/replace.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/replace.mjs +99 -0
- package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/upload.d.mts +8 -0
- package/dist/astro/routes/api/media/_id_/upload.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/upload.mjs +170 -0
- package/dist/astro/routes/api/media/_id_/upload.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/usage.d.mts +8 -0
- package/dist/astro/routes/api/media/_id_/usage.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/usage.mjs +60 -0
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_.d.mts +23 -0
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_.mjs +129 -0
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/media/asset/_id_/_filename_.d.mts +8 -0
- package/dist/astro/routes/api/media/asset/_id_/_filename_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +54 -0
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs.map +1 -0
- package/dist/astro/routes/api/media/file/_...key_.d.mts +8 -0
- package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/file/_...key_.mjs +83 -0
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -0
- package/dist/astro/routes/api/media/folders/_id_.d.mts +10 -0
- package/dist/astro/routes/api/media/folders/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/folders/_id_.mjs +60 -0
- package/dist/astro/routes/api/media/folders/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/media/folders/index.d.mts +9 -0
- package/dist/astro/routes/api/media/folders/index.d.mts.map +1 -0
- package/dist/astro/routes/api/media/folders/index.mjs +49 -0
- package/dist/astro/routes/api/media/folders/index.mjs.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.d.mts +15 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +54 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.d.mts +15 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +77 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs.map +1 -0
- package/dist/astro/routes/api/media/providers/index.d.mts +11 -0
- package/dist/astro/routes/api/media/providers/index.d.mts.map +1 -0
- package/dist/astro/routes/api/media/providers/index.mjs +23 -0
- package/dist/astro/routes/api/media/providers/index.mjs.map +1 -0
- package/dist/astro/routes/api/media/upload-url.d.mts +11 -0
- package/dist/astro/routes/api/media/upload-url.d.mts.map +1 -0
- package/dist/astro/routes/api/media/upload-url.mjs +106 -0
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -0
- package/dist/astro/routes/api/media.d.mts +17 -0
- package/dist/astro/routes/api/media.d.mts.map +1 -0
- package/dist/astro/routes/api/media.mjs +211 -0
- package/dist/astro/routes/api/media.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts +9 -0
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +68 -0
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_/items.d.mts +8 -0
- package/dist/astro/routes/api/menus/_name_/items.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_/items.mjs +48 -0
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts +8 -0
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +48 -0
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_/translations.d.mts +9 -0
- package/dist/astro/routes/api/menus/_name_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_/translations.mjs +79 -0
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_.d.mts +10 -0
- package/dist/astro/routes/api/menus/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_.mjs +80 -0
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/menus/index.d.mts +9 -0
- package/dist/astro/routes/api/menus/index.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/index.mjs +57 -0
- package/dist/astro/routes/api/menus/index.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/authorize.d.mts +9 -0
- package/dist/astro/routes/api/oauth/authorize.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/authorize.mjs +276 -0
- package/dist/astro/routes/api/oauth/authorize.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/device/authorize.d.mts +9 -0
- package/dist/astro/routes/api/oauth/device/authorize.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/device/authorize.mjs +48 -0
- package/dist/astro/routes/api/oauth/device/authorize.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/device/code.d.mts +8 -0
- package/dist/astro/routes/api/oauth/device/code.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/device/code.mjs +38 -0
- package/dist/astro/routes/api/oauth/device/code.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/device/token.d.mts +8 -0
- package/dist/astro/routes/api/oauth/device/token.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/device/token.mjs +49 -0
- package/dist/astro/routes/api/oauth/device/token.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/register.d.mts +9 -0
- package/dist/astro/routes/api/oauth/register.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/register.mjs +123 -0
- package/dist/astro/routes/api/oauth/register.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/token/refresh.d.mts +8 -0
- package/dist/astro/routes/api/oauth/token/refresh.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/token/refresh.mjs +32 -0
- package/dist/astro/routes/api/oauth/token/refresh.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/token/revoke.d.mts +8 -0
- package/dist/astro/routes/api/oauth/token/revoke.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/token/revoke.mjs +29 -0
- package/dist/astro/routes/api/oauth/token/revoke.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/token.d.mts +9 -0
- package/dist/astro/routes/api/oauth/token.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/token.mjs +143 -0
- package/dist/astro/routes/api/oauth/token.mjs.map +1 -0
- package/dist/astro/routes/api/openapi.json.d.mts +8 -0
- package/dist/astro/routes/api/openapi.json.d.mts.map +1 -0
- package/dist/astro/routes/api/openapi.json.mjs +3676 -0
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts +13 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts.map +1 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +44 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -0
- package/dist/astro/routes/api/redirects/404s/index.d.mts +10 -0
- package/dist/astro/routes/api/redirects/404s/index.d.mts.map +1 -0
- package/dist/astro/routes/api/redirects/404s/index.mjs +76 -0
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -0
- package/dist/astro/routes/api/redirects/404s/summary.d.mts +8 -0
- package/dist/astro/routes/api/redirects/404s/summary.d.mts.map +1 -0
- package/dist/astro/routes/api/redirects/404s/summary.mjs +48 -0
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -0
- package/dist/astro/routes/api/redirects/_id_.d.mts +10 -0
- package/dist/astro/routes/api/redirects/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/redirects/_id_.mjs +80 -0
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/redirects/index.d.mts +9 -0
- package/dist/astro/routes/api/redirects/index.d.mts.map +1 -0
- package/dist/astro/routes/api/redirects/index.mjs +63 -0
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -0
- package/dist/astro/routes/api/relations/_id_/index.d.mts +10 -0
- package/dist/astro/routes/api/relations/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/relations/_id_/index.mjs +94 -0
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/relations/index.d.mts +9 -0
- package/dist/astro/routes/api/relations/index.d.mts.map +1 -0
- package/dist/astro/routes/api/relations/index.mjs +78 -0
- package/dist/astro/routes/api/relations/index.mjs.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.d.mts +8 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +21 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.d.mts +8 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.d.mts.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +48 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs.map +1 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +109 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.d.mts +8 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +103 -0
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -0
- package/dist/astro/routes/api/schema/block-types/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/block-types/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/block-types/index.mjs +109 -0
- package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.d.mts +10 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +123 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +111 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.d.mts +8 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +102 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.d.mts +10 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +127 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/collections/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/index.mjs +111 -0
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/reorder.d.mts +8 -0
- package/dist/astro/routes/api/schema/collections/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs +101 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/schema/index.d.mts +8 -0
- package/dist/astro/routes/api/schema/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/index.mjs +92 -0
- package/dist/astro/routes/api/schema/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.d.mts +8 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +103 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -0
- package/dist/astro/routes/api/schema/orphans/index.d.mts +8 -0
- package/dist/astro/routes/api/schema/orphans/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/orphans/index.mjs +98 -0
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -0
- package/dist/astro/routes/api/search/enable.d.mts +17 -0
- package/dist/astro/routes/api/search/enable.d.mts.map +1 -0
- package/dist/astro/routes/api/search/enable.mjs +71 -0
- package/dist/astro/routes/api/search/enable.mjs.map +1 -0
- package/dist/astro/routes/api/search/index.d.mts +17 -0
- package/dist/astro/routes/api/search/index.d.mts.map +1 -0
- package/dist/astro/routes/api/search/index.mjs +66 -0
- package/dist/astro/routes/api/search/index.mjs.map +1 -0
- package/dist/astro/routes/api/search/rebuild.d.mts +14 -0
- package/dist/astro/routes/api/search/rebuild.d.mts.map +1 -0
- package/dist/astro/routes/api/search/rebuild.mjs +60 -0
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -0
- package/dist/astro/routes/api/search/stats.d.mts +11 -0
- package/dist/astro/routes/api/search/stats.d.mts.map +1 -0
- package/dist/astro/routes/api/search/stats.mjs +33 -0
- package/dist/astro/routes/api/search/stats.mjs.map +1 -0
- package/dist/astro/routes/api/search/suggest.d.mts +16 -0
- package/dist/astro/routes/api/search/suggest.d.mts.map +1 -0
- package/dist/astro/routes/api/search/suggest.mjs +55 -0
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -0
- package/dist/astro/routes/api/sections/_slug_.d.mts +10 -0
- package/dist/astro/routes/api/sections/_slug_.d.mts.map +1 -0
- package/dist/astro/routes/api/sections/_slug_.mjs +77 -0
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -0
- package/dist/astro/routes/api/sections/index.d.mts +9 -0
- package/dist/astro/routes/api/sections/index.d.mts.map +1 -0
- package/dist/astro/routes/api/sections/index.mjs +60 -0
- package/dist/astro/routes/api/sections/index.mjs.map +1 -0
- package/dist/astro/routes/api/settings/backups/archives/_name_.d.mts +9 -0
- package/dist/astro/routes/api/settings/backups/archives/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +50 -0
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/settings/backups/archives/index.d.mts +8 -0
- package/dist/astro/routes/api/settings/backups/archives/index.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +26 -0
- package/dist/astro/routes/api/settings/backups/archives/index.mjs.map +1 -0
- package/dist/astro/routes/api/settings/backups/export.d.mts +8 -0
- package/dist/astro/routes/api/settings/backups/export.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/backups/export.mjs +37 -0
- package/dist/astro/routes/api/settings/backups/export.mjs.map +1 -0
- package/dist/astro/routes/api/settings/backups/index.d.mts +9 -0
- package/dist/astro/routes/api/settings/backups/index.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/backups/index.mjs +54 -0
- package/dist/astro/routes/api/settings/backups/index.mjs.map +1 -0
- package/dist/astro/routes/api/settings/email.d.mts +18 -0
- package/dist/astro/routes/api/settings/email.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/email.mjs +107 -0
- package/dist/astro/routes/api/settings/email.mjs.map +1 -0
- package/dist/astro/routes/api/settings.d.mts +21 -0
- package/dist/astro/routes/api/settings.d.mts.map +1 -0
- package/dist/astro/routes/api/settings.mjs +76 -0
- package/dist/astro/routes/api/settings.mjs.map +1 -0
- package/dist/astro/routes/api/setup/admin-verify.d.mts +8 -0
- package/dist/astro/routes/api/setup/admin-verify.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/admin-verify.mjs +83 -0
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -0
- package/dist/astro/routes/api/setup/admin.d.mts +8 -0
- package/dist/astro/routes/api/setup/admin.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/admin.mjs +83 -0
- package/dist/astro/routes/api/setup/admin.mjs.map +1 -0
- package/dist/astro/routes/api/setup/dev-bypass.d.mts +9 -0
- package/dist/astro/routes/api/setup/dev-bypass.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/dev-bypass.mjs +172 -0
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -0
- package/dist/astro/routes/api/setup/dev-reset.d.mts +8 -0
- package/dist/astro/routes/api/setup/dev-reset.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/dev-reset.mjs +27 -0
- package/dist/astro/routes/api/setup/dev-reset.mjs.map +1 -0
- package/dist/astro/routes/api/setup/index.d.mts +8 -0
- package/dist/astro/routes/api/setup/index.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/index.mjs +147 -0
- package/dist/astro/routes/api/setup/index.mjs.map +1 -0
- package/dist/astro/routes/api/setup/status.d.mts +8 -0
- package/dist/astro/routes/api/setup/status.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/status.mjs +62 -0
- package/dist/astro/routes/api/setup/status.mjs.map +1 -0
- package/dist/astro/routes/api/snapshot.d.mts +8 -0
- package/dist/astro/routes/api/snapshot.d.mts.map +1 -0
- package/dist/astro/routes/api/snapshot.mjs +68 -0
- package/dist/astro/routes/api/snapshot.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +57 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts +9 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +92 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts +19 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +103 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts +15 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +83 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +55 -0
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_.d.mts +19 -0
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_.mjs +104 -0
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/bulk-tag.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/bulk-tag.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +297 -0
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/index.d.mts +15 -0
- package/dist/astro/routes/api/taxonomies/index.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/index.mjs +75 -0
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -0
- package/dist/astro/routes/api/themes/preview.d.mts +8 -0
- package/dist/astro/routes/api/themes/preview.d.mts.map +1 -0
- package/dist/astro/routes/api/themes/preview.mjs +52 -0
- package/dist/astro/routes/api/themes/preview.mjs.map +1 -0
- package/dist/astro/routes/api/typegen.d.mts +18 -0
- package/dist/astro/routes/api/typegen.d.mts.map +1 -0
- package/dist/astro/routes/api/typegen.mjs +50 -0
- package/dist/astro/routes/api/typegen.mjs.map +1 -0
- package/dist/astro/routes/api/visual-editing/action-token.d.mts +8 -0
- package/dist/astro/routes/api/visual-editing/action-token.d.mts.map +1 -0
- package/dist/astro/routes/api/visual-editing/action-token.mjs +27 -0
- package/dist/astro/routes/api/visual-editing/action-token.mjs.map +1 -0
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.d.mts +8 -0
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.d.mts.map +1 -0
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +44 -0
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs.map +1 -0
- package/dist/astro/routes/api/visual-editing/toolbar-labels.d.mts +8 -0
- package/dist/astro/routes/api/visual-editing/toolbar-labels.d.mts.map +1 -0
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +22 -0
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs.map +1 -0
- package/dist/astro/routes/api/well-known/auth.d.mts +8 -0
- package/dist/astro/routes/api/well-known/auth.d.mts.map +1 -0
- package/dist/astro/routes/api/well-known/auth.mjs +42 -0
- package/dist/astro/routes/api/well-known/auth.mjs.map +1 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.d.mts +8 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.d.mts.map +1 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +33 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs.map +1 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.d.mts +8 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.d.mts.map +1 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +22 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts +8 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +49 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts +9 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +78 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts +8 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +64 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_.d.mts +9 -0
- package/dist/astro/routes/api/widget-areas/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_.mjs +55 -0
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/index.d.mts +9 -0
- package/dist/astro/routes/api/widget-areas/index.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/index.mjs +74 -0
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -0
- package/dist/astro/routes/api/widget-components.d.mts +8 -0
- package/dist/astro/routes/api/widget-components.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-components.mjs +20 -0
- package/dist/astro/routes/api/widget-components.mjs.map +1 -0
- package/dist/astro/routes/robots.txt.d.mts +8 -0
- package/dist/astro/routes/robots.txt.d.mts.map +1 -0
- package/dist/astro/routes/robots.txt.mjs +65 -0
- package/dist/astro/routes/robots.txt.mjs.map +1 -0
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts +8 -0
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -0
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +131 -0
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -0
- package/dist/astro/routes/sitemap.xml.d.mts +8 -0
- package/dist/astro/routes/sitemap.xml.d.mts.map +1 -0
- package/dist/astro/routes/sitemap.xml.mjs +68 -0
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -0
- package/dist/astro/types.d.mts +246 -25
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/audit-BszbE_BP.mjs +127 -0
- package/dist/audit-BszbE_BP.mjs.map +1 -0
- package/dist/auth/providers/github.d.mts +13 -0
- package/dist/auth/providers/github.d.mts.map +1 -0
- package/dist/auth/providers/github.mjs +18 -0
- package/dist/auth/providers/github.mjs.map +1 -0
- package/dist/auth/providers/google.d.mts +13 -0
- package/dist/auth/providers/google.d.mts.map +1 -0
- package/dist/auth/providers/google.mjs +18 -0
- package/dist/auth/providers/google.mjs.map +1 -0
- package/dist/authoritative-records-dSvXCfzb.mjs +5172 -0
- package/dist/authoritative-records-dSvXCfzb.mjs.map +1 -0
- package/dist/authorize-CJtizVbp.mjs +49 -0
- package/dist/authorize-CJtizVbp.mjs.map +1 -0
- package/dist/backup-Cpl8TqRz.mjs +246 -0
- package/dist/backup-Cpl8TqRz.mjs.map +1 -0
- package/dist/base64-DvnNgP7e.mjs +63 -0
- package/dist/base64-DvnNgP7e.mjs.map +1 -0
- package/dist/block-types-DIG_KZwi.mjs +132 -0
- package/dist/block-types-DIG_KZwi.mjs.map +1 -0
- package/dist/block-values-BrTrtA-v.mjs +175 -0
- package/dist/block-values-BrTrtA-v.mjs.map +1 -0
- package/dist/byline-02tu_Uc-.mjs +909 -0
- package/dist/byline-02tu_Uc-.mjs.map +1 -0
- package/dist/byline-fields-DHJs0Mja.mjs +280 -0
- package/dist/byline-fields-DHJs0Mja.mjs.map +1 -0
- package/dist/byline-fields-xdxE9kxZ.mjs +123 -0
- package/dist/byline-fields-xdxE9kxZ.mjs.map +1 -0
- package/dist/byline-registry-dvt4N3xV.mjs +406 -0
- package/dist/byline-registry-dvt4N3xV.mjs.map +1 -0
- package/dist/bylines-CTGTsEAs.mjs +150 -0
- package/dist/bylines-CTGTsEAs.mjs.map +1 -0
- package/dist/bylines-DATJ0B8u.mjs +214 -0
- package/dist/bylines-DATJ0B8u.mjs.map +1 -0
- package/dist/cache-CPanL9IO.mjs +114 -0
- package/dist/cache-CPanL9IO.mjs.map +1 -0
- package/dist/canonical-CAecl1UQ.mjs +174 -0
- package/dist/canonical-CAecl1UQ.mjs.map +1 -0
- package/dist/capture-triggers-CdZfvHtF.mjs +362 -0
- package/dist/capture-triggers-CdZfvHtF.mjs.map +1 -0
- package/dist/challenge-store-CxZxPqaw.mjs +51 -0
- package/dist/challenge-store-CxZxPqaw.mjs.map +1 -0
- package/dist/checksum-DtH6m5uk.mjs +162 -0
- package/dist/checksum-DtH6m5uk.mjs.map +1 -0
- package/dist/chrome-tags-CKELm-bo.mjs +24 -0
- package/dist/chrome-tags-CKELm-bo.mjs.map +1 -0
- package/dist/chunks-DBmkKmBH.mjs +25 -0
- package/dist/chunks-DBmkKmBH.mjs.map +1 -0
- package/dist/cli/index.mjs +3021 -1548
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +1296 -11
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +313 -27
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-deletion-JecE26cS.mjs +436 -0
- package/dist/collection-deletion-JecE26cS.mjs.map +1 -0
- package/dist/collection-deletion-processor-DgCfF3a1.mjs +217 -0
- package/dist/collection-deletion-processor-DgCfF3a1.mjs.map +1 -0
- package/dist/collection-slugs-cache-BNRAPNiu.mjs +85 -0
- package/dist/collection-slugs-cache-BNRAPNiu.mjs.map +1 -0
- package/dist/comment-Cq1UYN8_.mjs +313 -0
- package/dist/comment-Cq1UYN8_.mjs.map +1 -0
- package/dist/comment-reaction-DPeGAfjd.mjs +85 -0
- package/dist/comment-reaction-DPeGAfjd.mjs.map +1 -0
- package/dist/comments-BRtp992B.mjs +99 -0
- package/dist/comments-BRtp992B.mjs.map +1 -0
- package/dist/comments-Bi2j9IoX.mjs +195 -0
- package/dist/comments-Bi2j9IoX.mjs.map +1 -0
- package/dist/components-CQY-Sgm-.mjs +108 -0
- package/dist/components-CQY-Sgm-.mjs.map +1 -0
- package/dist/config-B-uePMLj.d.mts +39 -0
- package/dist/config-B-uePMLj.d.mts.map +1 -0
- package/dist/config-BVX7iYr4.d.mts +6679 -0
- package/dist/config-BVX7iYr4.d.mts.map +1 -0
- package/dist/config-CXPcy2iY.mjs +228 -0
- package/dist/config-CXPcy2iY.mjs.map +1 -0
- package/dist/config-CvmjJcVw.mjs +73 -0
- package/dist/config-CvmjJcVw.mjs.map +1 -0
- package/dist/connection-B9pIasFd.mjs +36 -0
- package/dist/connection-B9pIasFd.mjs.map +1 -0
- package/dist/content-RzEXY3QX.mjs +2020 -0
- package/dist/content-RzEXY3QX.mjs.map +1 -0
- package/dist/content-list-query-DiNwyKtd.d.mts +26 -0
- package/dist/content-list-query-DiNwyKtd.d.mts.map +1 -0
- package/dist/content-policy-Dm32n9C6.mjs +46 -0
- package/dist/content-policy-Dm32n9C6.mjs.map +1 -0
- package/dist/content-repair-B-k5JrVN.mjs +442 -0
- package/dist/content-repair-B-k5JrVN.mjs.map +1 -0
- package/dist/context-CTkYVMZV.mjs +2026 -0
- package/dist/context-CTkYVMZV.mjs.map +1 -0
- package/dist/credits-CAFPFhuk.mjs +110 -0
- package/dist/credits-CAFPFhuk.mjs.map +1 -0
- package/dist/cron-xe5XKqA-.mjs +306 -0
- package/dist/cron-xe5XKqA-.mjs.map +1 -0
- package/dist/dashboard-BoV4pwPP.mjs +151 -0
- package/dist/dashboard-BoV4pwPP.mjs.map +1 -0
- package/dist/database/instrumentation.d.mts +35 -5
- package/dist/database/instrumentation.d.mts.map +1 -1
- package/dist/database/instrumentation.mjs +40 -9
- package/dist/database/instrumentation.mjs.map +1 -1
- package/dist/database/migration-lock.d.mts +37 -0
- package/dist/database/migration-lock.d.mts.map +1 -0
- package/dist/database/migration-lock.mjs +76 -0
- package/dist/database/migration-lock.mjs.map +1 -0
- package/dist/database/pg-migration-lock.d.mts +21 -0
- package/dist/database/pg-migration-lock.d.mts.map +1 -0
- package/dist/database/pg-migration-lock.mjs +42 -0
- package/dist/database/pg-migration-lock.mjs.map +1 -0
- package/dist/datetime-normalization-PeiEdcRY.mjs +187 -0
- package/dist/datetime-normalization-PeiEdcRY.mjs.map +1 -0
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.mjs +35 -10
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql-migrations.d.mts +11 -0
- package/dist/db/libsql-migrations.d.mts.map +1 -0
- package/dist/db/libsql-migrations.mjs +58 -0
- package/dist/db/libsql-migrations.mjs.map +1 -0
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/libsql.d.mts.map +1 -1
- package/dist/db/libsql.mjs +7 -2
- package/dist/db/libsql.mjs.map +1 -1
- package/dist/db/postgres-migrations.d.mts +10 -0
- package/dist/db/postgres-migrations.d.mts.map +1 -0
- package/dist/db/postgres-migrations.mjs +48 -0
- package/dist/db/postgres-migrations.mjs.map +1 -0
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/postgres.d.mts.map +1 -1
- package/dist/db/postgres.mjs +20 -10
- package/dist/db/postgres.mjs.map +1 -1
- package/dist/db/sqlite-migrations.d.mts +10 -0
- package/dist/db/sqlite-migrations.d.mts.map +1 -0
- package/dist/db/sqlite-migrations.mjs +29 -0
- package/dist/db/sqlite-migrations.mjs.map +1 -0
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.d.mts.map +1 -1
- package/dist/db/sqlite.mjs +9 -4
- package/dist/db/sqlite.mjs.map +1 -1
- package/dist/db-errors-CBD5yMro.mjs +55 -0
- package/dist/db-errors-CBD5yMro.mjs.map +1 -0
- package/dist/default-DaoYyFRS.mjs +81 -0
- package/dist/default-DaoYyFRS.mjs.map +1 -0
- package/dist/deferred-tasks-BYcDx2o_.d.mts +9 -0
- package/dist/deferred-tasks-BYcDx2o_.d.mts.map +1 -0
- package/dist/destination-r2zIAZ2S.mjs +18 -0
- package/dist/destination-r2zIAZ2S.mjs.map +1 -0
- package/dist/dev-typegen-8JlYYFno.mjs +29 -0
- package/dist/dev-typegen-8JlYYFno.mjs.map +1 -0
- package/dist/device-flow-Ma5P5d2e.mjs +521 -0
- package/dist/device-flow-Ma5P5d2e.mjs.map +1 -0
- package/dist/dialect-helpers-7_IqPdh9.mjs +307 -0
- package/dist/dialect-helpers-7_IqPdh9.mjs.map +1 -0
- package/dist/digest-DiYAoZpf.mjs +194 -0
- package/dist/digest-DiYAoZpf.mjs.map +1 -0
- package/dist/direct-executor-FCIRepAU.mjs +104 -0
- package/dist/direct-executor-FCIRepAU.mjs.map +1 -0
- package/dist/dist-Cfu8mMBs.mjs +810 -0
- package/dist/dist-Cfu8mMBs.mjs.map +1 -0
- package/dist/email-console-DmqVF5J_.mjs +50 -0
- package/dist/email-console-DmqVF5J_.mjs.map +1 -0
- package/dist/email-locale-Cc5YSXfJ.mjs +25 -0
- package/dist/email-locale-Cc5YSXfJ.mjs.map +1 -0
- package/dist/emdash-runtime-YPrVnr6x.mjs +4226 -0
- package/dist/emdash-runtime-YPrVnr6x.mjs.map +1 -0
- package/dist/enrich-BDdVNeDK.mjs +194 -0
- package/dist/enrich-BDdVNeDK.mjs.map +1 -0
- package/dist/entry-lock-BtDo1zFm.d.mts +4544 -0
- package/dist/entry-lock-BtDo1zFm.d.mts.map +1 -0
- package/dist/entry-lock-PP1JCXBB.mjs +1180 -0
- package/dist/entry-lock-PP1JCXBB.mjs.map +1 -0
- package/dist/entry-lock-WyppUeRW.mjs +163 -0
- package/dist/entry-lock-WyppUeRW.mjs.map +1 -0
- package/dist/entry-locks-DJAqVweV.mjs +167 -0
- package/dist/entry-locks-DJAqVweV.mjs.map +1 -0
- package/dist/env-types-BaTCgn-y.mjs +38 -0
- package/dist/env-types-BaTCgn-y.mjs.map +1 -0
- package/dist/error-CEdm_AWU.mjs +90 -0
- package/dist/error-CEdm_AWU.mjs.map +1 -0
- package/dist/errors-9P_FDrJ_.mjs +17 -0
- package/dist/errors-9P_FDrJ_.mjs.map +1 -0
- package/dist/errors-CNvATh_7.mjs +469 -0
- package/dist/errors-CNvATh_7.mjs.map +1 -0
- package/dist/errors-CjXd1LgH.mjs +120 -0
- package/dist/errors-CjXd1LgH.mjs.map +1 -0
- package/dist/escape-nJW7dR0s.mjs +9 -0
- package/dist/escape-nJW7dR0s.mjs.map +1 -0
- package/dist/fence-BrnQffdY.mjs +162 -0
- package/dist/fence-BrnQffdY.mjs.map +1 -0
- package/dist/field-defs-cache-DEkFYCDE.mjs +77 -0
- package/dist/field-defs-cache-DEkFYCDE.mjs.map +1 -0
- package/dist/field-map-BfYMstlG.mjs +83 -0
- package/dist/field-map-BfYMstlG.mjs.map +1 -0
- package/dist/focal-point-JX8kcOTQ.mjs +23 -0
- package/dist/focal-point-JX8kcOTQ.mjs.map +1 -0
- package/dist/fts-manager-DU03MxWu.mjs +443 -0
- package/dist/fts-manager-DU03MxWu.mjs.map +1 -0
- package/dist/gc-BO9NqlAe.mjs +75 -0
- package/dist/gc-BO9NqlAe.mjs.map +1 -0
- package/dist/hash-CY4QdeMJ.mjs +37 -0
- package/dist/hash-CY4QdeMJ.mjs.map +1 -0
- package/dist/hook-result-DSRRxu_-.d.mts +31 -0
- package/dist/hook-result-DSRRxu_-.d.mts.map +1 -0
- package/dist/hreflang--av8HanY.d.mts +50 -0
- package/dist/hreflang--av8HanY.d.mts.map +1 -0
- package/dist/hreflang-CNbZjm4g.mjs +105 -0
- package/dist/hreflang-CNbZjm4g.mjs.map +1 -0
- package/dist/http-route-dispatch-16nzAM5m.mjs +339 -0
- package/dist/http-route-dispatch-16nzAM5m.mjs.map +1 -0
- package/dist/identity-DNaOsiip.mjs +35 -0
- package/dist/identity-DNaOsiip.mjs.map +1 -0
- package/dist/import-DUV3Gl6-.mjs +2020 -0
- package/dist/import-DUV3Gl6-.mjs.map +1 -0
- package/dist/index-m-lYQRqs.d.mts +623 -0
- package/dist/index-m-lYQRqs.d.mts.map +1 -0
- package/dist/index.d.mts +27 -11
- package/dist/index.mjs +120 -28
- package/dist/init-lock-4eRRB4Le.mjs +56 -0
- package/dist/init-lock-4eRRB4Le.mjs.map +1 -0
- package/dist/install-finalization-CPM7Gged.mjs +58 -0
- package/dist/install-finalization-CPM7Gged.mjs.map +1 -0
- package/dist/keys-B8g41vwJ.mjs +61 -0
- package/dist/keys-B8g41vwJ.mjs.map +1 -0
- package/dist/kinds-BKu9nb7q.mjs +974 -0
- package/dist/kinds-BKu9nb7q.mjs.map +1 -0
- package/dist/lifecycle-CpebZNAA.mjs +25 -0
- package/dist/lifecycle-CpebZNAA.mjs.map +1 -0
- package/dist/load-dHcR5yh9.mjs +28 -0
- package/dist/load-dHcR5yh9.mjs.map +1 -0
- package/dist/loader-CWb-ja1p.mjs +1197 -0
- package/dist/loader-CWb-ja1p.mjs.map +1 -0
- package/dist/loops-Dn1i16FP.mjs +205 -0
- package/dist/loops-Dn1i16FP.mjs.map +1 -0
- package/dist/manifest-builder-0ZHXBxOL.mjs +189 -0
- package/dist/manifest-builder-0ZHXBxOL.mjs.map +1 -0
- package/dist/manifest-schema-gy37bD_D.mjs +496 -0
- package/dist/manifest-schema-gy37bD_D.mjs.map +1 -0
- package/dist/marketplace-tHWSsCUo.mjs +257 -0
- package/dist/marketplace-tHWSsCUo.mjs.map +1 -0
- package/dist/media/image-endpoint.d.mts +104 -0
- package/dist/media/image-endpoint.d.mts.map +1 -0
- package/dist/media/image-endpoint.mjs +190 -0
- package/dist/media/image-endpoint.mjs.map +1 -0
- package/dist/media/index.d.mts +45 -2
- package/dist/media/index.d.mts.map +1 -1
- package/dist/media/index.mjs +17 -3
- package/dist/media/index.mjs.map +1 -1
- package/dist/media/local-runtime.d.mts +24 -7
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +41 -12
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/media-3v7mqAVX.mjs +294 -0
- package/dist/media-3v7mqAVX.mjs.map +1 -0
- package/dist/media-CputjGE1.mjs +373 -0
- package/dist/media-CputjGE1.mjs.map +1 -0
- package/dist/media-D1z_jisb.mjs +408 -0
- package/dist/media-D1z_jisb.mjs.map +1 -0
- package/dist/media-allowlist-D5a4d-RA.mjs +44 -0
- package/dist/media-allowlist-D5a4d-RA.mjs.map +1 -0
- package/dist/media-folders-D2VdVBf6.mjs +210 -0
- package/dist/media-folders-D2VdVBf6.mjs.map +1 -0
- package/dist/media-url-DloW2xrP.mjs +43 -0
- package/dist/media-url-DloW2xrP.mjs.map +1 -0
- package/dist/media-usage-B8q0owWQ.mjs +1629 -0
- package/dist/media-usage-B8q0owWQ.mjs.map +1 -0
- package/dist/media-usage-activation-CQWOOTJi.mjs +78 -0
- package/dist/media-usage-activation-CQWOOTJi.mjs.map +1 -0
- package/dist/media-usage-work-BC0qpkMD.mjs +152 -0
- package/dist/media-usage-work-BC0qpkMD.mjs.map +1 -0
- package/dist/media-usage-work-BlMjwPg8.mjs +586 -0
- package/dist/media-usage-work-BlMjwPg8.mjs.map +1 -0
- package/dist/menus-BQKqf0Up.mjs +92 -0
- package/dist/menus-BQKqf0Up.mjs.map +1 -0
- package/dist/menus-XQdKk-87.mjs +3647 -0
- package/dist/menus-XQdKk-87.mjs.map +1 -0
- package/dist/menus-trvc6_fW.mjs +753 -0
- package/dist/menus-trvc6_fW.mjs.map +1 -0
- package/dist/migrations/index.d.mts +22 -0
- package/dist/migrations/index.d.mts.map +1 -0
- package/dist/migrations/index.mjs +8 -0
- package/dist/mime-IZf-LHIS.mjs +36 -0
- package/dist/mime-IZf-LHIS.mjs.map +1 -0
- package/dist/mode-nh0ppSX5.mjs +23 -0
- package/dist/mode-nh0ppSX5.mjs.map +1 -0
- package/dist/node-sqlite-compat-CDOEcc97.mjs +63 -0
- package/dist/node-sqlite-compat-CDOEcc97.mjs.map +1 -0
- package/dist/normalize-BuWa0lvd.mjs +191 -0
- package/dist/normalize-BuWa0lvd.mjs.map +1 -0
- package/dist/oauth-authorization-BtYQ80uU.mjs +274 -0
- package/dist/oauth-authorization-BtYQ80uU.mjs.map +1 -0
- package/dist/oauth-clients-C1S4NQHh.mjs +266 -0
- package/dist/oauth-clients-C1S4NQHh.mjs.map +1 -0
- package/dist/oauth-state-store-CpGi2FZH.mjs +50 -0
- package/dist/oauth-state-store-CpGi2FZH.mjs.map +1 -0
- package/dist/oauth-user-lookup-BNp1aFAr.mjs +26 -0
- package/dist/oauth-user-lookup-BNp1aFAr.mjs.map +1 -0
- package/dist/object-cache/memory.d.mts +15 -0
- package/dist/object-cache/memory.d.mts.map +1 -0
- package/dist/object-cache/memory.mjs +56 -0
- package/dist/object-cache/memory.mjs.map +1 -0
- package/dist/object-cache-Bo6DGaC9.mjs +586 -0
- package/dist/object-cache-Bo6DGaC9.mjs.map +1 -0
- package/dist/options-DhrI7eMv.mjs +208 -0
- package/dist/options-DhrI7eMv.mjs.map +1 -0
- package/dist/options-Dl_W57-_.d.mts +81 -0
- package/dist/options-Dl_W57-_.d.mts.map +1 -0
- package/dist/ownership-DoeAIuTg.mjs +12 -0
- package/dist/ownership-DoeAIuTg.mjs.map +1 -0
- package/dist/page/index.d.mts +19 -5
- package/dist/page/index.d.mts.map +1 -1
- package/dist/page/index.mjs +32 -7
- package/dist/page/index.mjs.map +1 -1
- package/dist/parse-Gt2l4Sld.mjs +81 -0
- package/dist/parse-Gt2l4Sld.mjs.map +1 -0
- package/dist/parse-QVS0t5oR.d.mts +172 -0
- package/dist/parse-QVS0t5oR.d.mts.map +1 -0
- package/dist/passkey-config-C-MxsV22.mjs +46 -0
- package/dist/passkey-config-C-MxsV22.mjs.map +1 -0
- package/dist/paths-CqFwkjY8.mjs +77 -0
- package/dist/paths-CqFwkjY8.mjs.map +1 -0
- package/dist/patterns-DyZJ67I7.mjs +140 -0
- package/dist/patterns-DyZJ67I7.mjs.map +1 -0
- package/dist/placeholder-Dn7MMdWr.d.mts +306 -0
- package/dist/placeholder-Dn7MMdWr.d.mts.map +1 -0
- package/dist/plan-D8s1n84S.mjs +135 -0
- package/dist/plan-D8s1n84S.mjs.map +1 -0
- package/dist/plugin-test-runtime.d.mts +120 -0
- package/dist/plugin-test-runtime.d.mts.map +1 -0
- package/dist/plugin-test-runtime.mjs +126 -0
- package/dist/plugin-types.d.mts +196 -0
- package/dist/plugin-types.d.mts.map +1 -0
- package/dist/plugin-types.mjs +18 -0
- package/dist/plugin-types.mjs.map +1 -0
- package/dist/plugin-utils.d.mts +36 -16
- package/dist/plugin-utils.d.mts.map +1 -1
- package/dist/plugin-utils.mjs +19 -16
- package/dist/plugin-utils.mjs.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +23 -12
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +124 -28
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/plugins/host.d.mts +7 -0
- package/dist/plugins/host.mjs +59 -0
- package/dist/plugins/http-wire.d.mts +25 -0
- package/dist/plugins/http-wire.d.mts.map +1 -0
- package/dist/plugins/http-wire.mjs +148 -0
- package/dist/plugins/http-wire.mjs.map +1 -0
- package/dist/plugins/secret-redactor.d.mts +9 -0
- package/dist/plugins/secret-redactor.d.mts.map +1 -0
- package/dist/plugins/secret-redactor.mjs +51 -0
- package/dist/plugins/secret-redactor.mjs.map +1 -0
- package/dist/plugins-BpLkXA1S.mjs +277 -0
- package/dist/plugins-BpLkXA1S.mjs.map +1 -0
- package/dist/policy-C1qpNxrr.mjs +45 -0
- package/dist/policy-C1qpNxrr.mjs.map +1 -0
- package/dist/portable-text-BnRuiR1-.mjs +307 -0
- package/dist/portable-text-BnRuiR1-.mjs.map +1 -0
- package/dist/preview-DU5rwz_m.mjs +107 -0
- package/dist/preview-DU5rwz_m.mjs.map +1 -0
- package/dist/protocol-cEfbPvM6.d.mts +61 -0
- package/dist/protocol-cEfbPvM6.d.mts.map +1 -0
- package/dist/public-submission-x1eaT6Tx.mjs +250 -0
- package/dist/public-submission-x1eaT6Tx.mjs.map +1 -0
- package/dist/public-url-B5a0QAh6.mjs +101 -0
- package/dist/public-url-B5a0QAh6.mjs.map +1 -0
- package/dist/query-DSEkrw_m.mjs +41 -0
- package/dist/query-DSEkrw_m.mjs.map +1 -0
- package/dist/query-dHwqNf85.mjs +1161 -0
- package/dist/query-dHwqNf85.mjs.map +1 -0
- package/dist/rate-limit-BXx3Ecp9.mjs +120 -0
- package/dist/rate-limit-BXx3Ecp9.mjs.map +1 -0
- package/dist/receipt-RG5_pwsj.mjs +43 -0
- package/dist/receipt-RG5_pwsj.mjs.map +1 -0
- package/dist/redirect-BRoLiWQE.mjs +19 -0
- package/dist/redirect-BRoLiWQE.mjs.map +1 -0
- package/dist/redirect-BvFKh8Sz.mjs +416 -0
- package/dist/redirect-BvFKh8Sz.mjs.map +1 -0
- package/dist/redirects-CWQMKYOS.mjs +446 -0
- package/dist/redirects-CWQMKYOS.mjs.map +1 -0
- package/dist/redirects-D4EWeXAo.mjs +148 -0
- package/dist/redirects-D4EWeXAo.mjs.map +1 -0
- package/dist/registry/testing.d.mts +26 -0
- package/dist/registry/testing.d.mts.map +1 -0
- package/dist/registry/testing.mjs +265 -0
- package/dist/registry/testing.mjs.map +1 -0
- package/dist/registry-CtHRqVe-.mjs +6771 -0
- package/dist/registry-CtHRqVe-.mjs.map +1 -0
- package/dist/relations-CVI2nbrn.mjs +776 -0
- package/dist/relations-CVI2nbrn.mjs.map +1 -0
- package/dist/request-cache-C4CIo5ad.mjs +104 -0
- package/dist/request-cache-C4CIo5ad.mjs.map +1 -0
- package/dist/request-context.d.mts +45 -1
- package/dist/request-context.d.mts.map +1 -1
- package/dist/request-context.mjs +17 -3
- package/dist/request-context.mjs.map +1 -1
- package/dist/request-meta-B6blULFY.mjs +141 -0
- package/dist/request-meta-B6blULFY.mjs.map +1 -0
- package/dist/resolve-Cw4rWFJl.mjs +100 -0
- package/dist/resolve-Cw4rWFJl.mjs.map +1 -0
- package/dist/resolve-D-kqyKns.mjs +199 -0
- package/dist/resolve-D-kqyKns.mjs.map +1 -0
- package/dist/revision-CGkQA0e5.mjs +366 -0
- package/dist/revision-CGkQA0e5.mjs.map +1 -0
- package/dist/route-wire-DK600v4u.mjs +197 -0
- package/dist/route-wire-DK600v4u.mjs.map +1 -0
- package/dist/routes-D0u5zK2P.mjs +272 -0
- package/dist/routes-D0u5zK2P.mjs.map +1 -0
- package/dist/runner-CC8LZx97.d.mts +68 -0
- package/dist/runner-CC8LZx97.d.mts.map +1 -0
- package/dist/runner-CLpxmhl8.mjs +6197 -0
- package/dist/runner-CLpxmhl8.mjs.map +1 -0
- package/dist/runtime.d.mts +13 -6
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +6 -4
- package/dist/runtime.mjs.map +1 -1
- package/dist/schema/project-env-types.d.mts +12 -0
- package/dist/schema/project-env-types.d.mts.map +1 -0
- package/dist/schema/project-env-types.mjs +86 -0
- package/dist/schema/project-env-types.mjs.map +1 -0
- package/dist/schema-BZPj3kwZ.mjs +13 -0
- package/dist/schema-BZPj3kwZ.mjs.map +1 -0
- package/dist/schema-Berj5VQx.mjs +815 -0
- package/dist/schema-Berj5VQx.mjs.map +1 -0
- package/dist/scopes-CxvclshI.mjs +34 -0
- package/dist/scopes-CxvclshI.mjs.map +1 -0
- package/dist/search-CD5MiMdh.mjs +448 -0
- package/dist/search-CD5MiMdh.mjs.map +1 -0
- package/dist/secrets-CIi0nFiR.mjs +341 -0
- package/dist/secrets-CIi0nFiR.mjs.map +1 -0
- package/dist/sections-Do5KdTSQ.mjs +346 -0
- package/dist/sections-Do5KdTSQ.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +47 -14
- package/dist/seo/index.d.mts +15 -2
- package/dist/seo/index.d.mts.map +1 -1
- package/dist/seo/index.mjs +39 -18
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo-C61bnPuV.mjs +114 -0
- package/dist/seo-C61bnPuV.mjs.map +1 -0
- package/dist/seo-DpYxmGaL.mjs +133 -0
- package/dist/seo-DpYxmGaL.mjs.map +1 -0
- package/dist/service-BFUImckH.mjs +150 -0
- package/dist/service-BFUImckH.mjs.map +1 -0
- package/dist/session-user-DVcHsFD5.mjs +61 -0
- package/dist/session-user-DVcHsFD5.mjs.map +1 -0
- package/dist/settings-B0zQj_Tj.mjs +61 -0
- package/dist/settings-B0zQj_Tj.mjs.map +1 -0
- package/dist/settings-Ckzmx-A1.mjs +51 -0
- package/dist/settings-Ckzmx-A1.mjs.map +1 -0
- package/dist/settings-CnWoEDb0.mjs +439 -0
- package/dist/settings-CnWoEDb0.mjs.map +1 -0
- package/dist/setup-complete-B2_dhZZz.mjs +65 -0
- package/dist/setup-complete-B2_dhZZz.mjs.map +1 -0
- package/dist/setup-nonce-CJV9ftSK.mjs +25 -0
- package/dist/setup-nonce-CJV9ftSK.mjs.map +1 -0
- package/dist/single-flight-cache-B5O2qhO1.mjs +104 -0
- package/dist/single-flight-cache-B5O2qhO1.mjs.map +1 -0
- package/dist/site-settings-AYFvhwQn.mjs +50 -0
- package/dist/site-settings-AYFvhwQn.mjs.map +1 -0
- package/dist/site-url-Ceq_AUK0.mjs +16 -0
- package/dist/site-url-Ceq_AUK0.mjs.map +1 -0
- package/dist/slugify-T5GHH42D.mjs +17 -0
- package/dist/slugify-T5GHH42D.mjs.map +1 -0
- package/dist/snapshot-Dzsn3NZa.mjs +414 -0
- package/dist/snapshot-Dzsn3NZa.mjs.map +1 -0
- package/dist/ssrf-DsmvZB80.mjs +406 -0
- package/dist/ssrf-DsmvZB80.mjs.map +1 -0
- package/dist/ssrf-tA45vIPX.mjs +1 -0
- package/dist/stage-BcuakqfP.mjs +662 -0
- package/dist/stage-BcuakqfP.mjs.map +1 -0
- package/dist/staged-Bw5eHbKS.mjs +686 -0
- package/dist/staged-Bw5eHbKS.mjs.map +1 -0
- package/dist/state-kGdOMQRY.mjs +153 -0
- package/dist/state-kGdOMQRY.mjs.map +1 -0
- package/dist/status-D39Fpy8R.mjs +30 -0
- package/dist/status-D39Fpy8R.mjs.map +1 -0
- package/dist/storage/local.d.mts +2 -1
- package/dist/storage/local.d.mts.map +1 -1
- package/dist/storage/local.mjs +2 -2
- package/dist/storage/local.mjs.map +1 -1
- package/dist/storage/s3.d.mts +2 -1
- package/dist/storage/s3.d.mts.map +1 -1
- package/dist/storage/s3.mjs +4 -3
- package/dist/storage/s3.mjs.map +1 -1
- package/dist/storage-query-CKNIJhjo.d.mts +1614 -0
- package/dist/storage-query-CKNIJhjo.d.mts.map +1 -0
- package/dist/tar-n2OXqKpZ.mjs +449 -0
- package/dist/tar-n2OXqKpZ.mjs.map +1 -0
- package/dist/target-DOFs5oUC.mjs +27 -0
- package/dist/target-DOFs5oUC.mjs.map +1 -0
- package/dist/taxonomies-CMCnItWf.mjs +939 -0
- package/dist/taxonomies-CMCnItWf.mjs.map +1 -0
- package/dist/taxonomies-CvBe3xhM.mjs +697 -0
- package/dist/taxonomies-CvBe3xhM.mjs.map +1 -0
- package/dist/taxonomy-BesdHIwi.mjs +525 -0
- package/dist/taxonomy-BesdHIwi.mjs.map +1 -0
- package/dist/tokens-BIGxi8sP.mjs +171 -0
- package/dist/tokens-BIGxi8sP.mjs.map +1 -0
- package/dist/transaction-BVYIo_yu.mjs +29 -0
- package/dist/transaction-BVYIo_yu.mjs.map +1 -0
- package/dist/transfer-5Ce0QuNS.mjs +8856 -0
- package/dist/transfer-5Ce0QuNS.mjs.map +1 -0
- package/dist/transfer-CzdXsFRx.mjs +166 -0
- package/dist/transfer-CzdXsFRx.mjs.map +1 -0
- package/dist/transfer-download-Dc-ltjZY.mjs +33 -0
- package/dist/transfer-download-Dc-ltjZY.mjs.map +1 -0
- package/dist/transformations-BLzqMnpY.mjs +196 -0
- package/dist/transformations-BLzqMnpY.mjs.map +1 -0
- package/dist/transport-k1fykDBh.d.mts +42 -0
- package/dist/transport-k1fykDBh.d.mts.map +1 -0
- package/dist/transport-umzEbgYO.mjs +136 -0
- package/dist/transport-umzEbgYO.mjs.map +1 -0
- package/dist/trusted-proxy-BqfQFs6a.mjs +51 -0
- package/dist/trusted-proxy-BqfQFs6a.mjs.map +1 -0
- package/dist/turnstile-CvvKLtqE.mjs +53 -0
- package/dist/turnstile-CvvKLtqE.mjs.map +1 -0
- package/dist/types-B8tO_KdV.d.mts +896 -0
- package/dist/types-B8tO_KdV.d.mts.map +1 -0
- package/dist/types-BGmQ0uXs.mjs +201 -0
- package/dist/types-BGmQ0uXs.mjs.map +1 -0
- package/dist/types-BYaPWs_F.d.mts +198 -0
- package/dist/types-BYaPWs_F.d.mts.map +1 -0
- package/dist/types-CLTQ9b_r.d.mts +374 -0
- package/dist/types-CLTQ9b_r.d.mts.map +1 -0
- package/dist/types-CPkQw2T2.d.mts +85 -0
- package/dist/types-CPkQw2T2.d.mts.map +1 -0
- package/dist/types-CQLvuXoZ.d.mts +198 -0
- package/dist/types-CQLvuXoZ.d.mts.map +1 -0
- package/dist/types-CV5xszpF.d.mts +363 -0
- package/dist/types-CV5xszpF.d.mts.map +1 -0
- package/dist/types-CVsmpTcU.mjs +18 -0
- package/dist/types-CVsmpTcU.mjs.map +1 -0
- package/dist/types-CdEMurNh.mjs +77 -0
- package/dist/types-CdEMurNh.mjs.map +1 -0
- package/dist/types-CxwtnuSS.mjs +37 -0
- package/dist/types-CxwtnuSS.mjs.map +1 -0
- package/dist/types-DGw8KMX_.mjs +16 -0
- package/dist/types-DGw8KMX_.mjs.map +1 -0
- package/dist/types-DOfVMPoo.d.mts +125 -0
- package/dist/types-DOfVMPoo.d.mts.map +1 -0
- package/dist/types-Dsco9Y38.d.mts +1720 -0
- package/dist/types-Dsco9Y38.d.mts.map +1 -0
- package/dist/types-LtS0SM4F.d.mts +287 -0
- package/dist/types-LtS0SM4F.d.mts.map +1 -0
- package/dist/types-j6MBDjlZ.mjs +103 -0
- package/dist/types-j6MBDjlZ.mjs.map +1 -0
- package/dist/update-check-B2JKz5cr.mjs +161 -0
- package/dist/update-check-B2JKz5cr.mjs.map +1 -0
- package/dist/upload-attempts-BodUoFBu.mjs +32 -0
- package/dist/upload-attempts-BodUoFBu.mjs.map +1 -0
- package/dist/url-Dn3IStq8.mjs +104 -0
- package/dist/url-Dn3IStq8.mjs.map +1 -0
- package/dist/url-pattern-DGAG6ZP2.mjs +41 -0
- package/dist/url-pattern-DGAG6ZP2.mjs.map +1 -0
- package/dist/user-BOvuF1sQ.mjs +171 -0
- package/dist/user-BOvuF1sQ.mjs.map +1 -0
- package/dist/utils-CoV-PYhg.mjs +439 -0
- package/dist/utils-CoV-PYhg.mjs.map +1 -0
- package/dist/validate-DANX1-Qi.mjs +120 -0
- package/dist/validate-DANX1-Qi.mjs.map +1 -0
- package/dist/validate-DpP1QUiV.d.mts +468 -0
- package/dist/validate-DpP1QUiV.d.mts.map +1 -0
- package/dist/validate-WkjGwBSO.mjs +516 -0
- package/dist/validate-WkjGwBSO.mjs.map +1 -0
- package/dist/validation-DG7Y9H4u.mjs +219 -0
- package/dist/validation-DG7Y9H4u.mjs.map +1 -0
- package/dist/version-BnlfLUa6.mjs +7 -0
- package/dist/version-BnlfLUa6.mjs.map +1 -0
- package/dist/version-BwEGkqkx.mjs +9 -0
- package/dist/version-BwEGkqkx.mjs.map +1 -0
- package/dist/virtual-modules-B6vJW15k.mjs +516 -0
- package/dist/virtual-modules-B6vJW15k.mjs.map +1 -0
- package/dist/widgets-D7I_9xff.mjs +126 -0
- package/dist/widgets-D7I_9xff.mjs.map +1 -0
- package/dist/wxr-taxonomies-Di1w9HDU.d.mts +34 -0
- package/dist/wxr-taxonomies-Di1w9HDU.d.mts.map +1 -0
- package/dist/wxr-taxonomies-m_141EtN.mjs +453 -0
- package/dist/wxr-taxonomies-m_141EtN.mjs.map +1 -0
- package/dist/zod-generator-DnfG5sGQ.mjs +424 -0
- package/dist/zod-generator-DnfG5sGQ.mjs.map +1 -0
- package/locals.d.ts +1 -6
- package/package.json +142 -31
- package/src/after.ts +6 -1
- package/src/api/authorize.ts +27 -1
- package/src/api/email-locale.ts +24 -0
- package/src/api/error.ts +22 -7
- package/src/api/errors.ts +131 -0
- package/src/api/handlers/api-tokens.ts +37 -3
- package/src/api/handlers/backup.ts +318 -0
- package/src/api/handlers/block-types.ts +129 -0
- package/src/api/handlers/bulk-tag.ts +309 -0
- package/src/api/handlers/byline-fields.ts +212 -0
- package/src/api/handlers/bylines.ts +283 -0
- package/src/api/handlers/comment-reactions.ts +165 -0
- package/src/api/handlers/comments.ts +6 -32
- package/src/api/handlers/content.ts +1552 -156
- package/src/api/handlers/dashboard.ts +73 -38
- package/src/api/handlers/device-flow.ts +80 -23
- package/src/api/handlers/entry-lock.ts +206 -0
- package/src/api/handlers/index.ts +90 -0
- package/src/api/handlers/manifest.ts +245 -12
- package/src/api/handlers/marketplace.ts +251 -53
- package/src/api/handlers/media-allowlist.ts +52 -0
- package/src/api/handlers/media-folders.ts +130 -0
- package/src/api/handlers/media-upload.ts +186 -0
- package/src/api/handlers/media-usage-activation.ts +102 -0
- package/src/api/handlers/media-usage-work.ts +188 -0
- package/src/api/handlers/media-usage.ts +418 -0
- package/src/api/handlers/media.ts +207 -16
- package/src/api/handlers/menus.ts +294 -392
- package/src/api/handlers/oauth-authorization.ts +74 -39
- package/src/api/handlers/oauth-clients.ts +1 -1
- package/src/api/handlers/plugin-settings.ts +250 -0
- package/src/api/handlers/plugins.ts +195 -41
- package/src/api/handlers/redirects.ts +225 -131
- package/src/api/handlers/registry.ts +1844 -0
- package/src/api/handlers/relations.ts +960 -0
- package/src/api/handlers/revision.ts +70 -20
- package/src/api/handlers/schema.ts +486 -8
- package/src/api/handlers/seo.ts +68 -5
- package/src/api/handlers/settings.ts +2 -2
- package/src/api/handlers/snapshot.ts +359 -68
- package/src/api/handlers/staged-references.ts +208 -0
- package/src/api/handlers/taxonomies.ts +887 -156
- package/src/api/handlers/transfer.ts +1347 -0
- package/src/api/handlers/update-check.ts +236 -0
- package/src/api/handlers/validate-media-fields.ts +237 -0
- package/src/api/handlers/validate-references.ts +146 -0
- package/src/api/handlers/validation.ts +120 -19
- package/src/api/media-usage-write-fence.ts +43 -0
- package/src/api/openapi/document.ts +1644 -262
- package/src/api/parse.ts +3 -17
- package/src/api/public-url.ts +66 -6
- package/src/api/redirect.ts +9 -1
- package/src/api/schemas/auth.ts +10 -4
- package/src/api/schemas/byline-fields.ts +188 -0
- package/src/api/schemas/bylines.ts +97 -1
- package/src/api/schemas/comments.ts +19 -3
- package/src/api/schemas/common.ts +29 -9
- package/src/api/schemas/content.ts +302 -8
- package/src/api/schemas/entry-lock.ts +57 -0
- package/src/api/schemas/import.ts +69 -14
- package/src/api/schemas/index.ts +4 -0
- package/src/api/schemas/media-usage.ts +341 -0
- package/src/api/schemas/media.ts +186 -5
- package/src/api/schemas/menus.ts +50 -22
- package/src/api/schemas/redirects.ts +17 -5
- package/src/api/schemas/relations.ts +121 -0
- package/src/api/schemas/schema.ts +267 -7
- package/src/api/schemas/search.ts +7 -0
- package/src/api/schemas/sections.ts +3 -3
- package/src/api/schemas/settings.ts +41 -9
- package/src/api/schemas/setup.ts +1 -1
- package/src/api/schemas/taxonomies.ts +134 -10
- package/src/api/schemas/transfer.ts +249 -0
- package/src/api/schemas/users.ts +2 -2
- package/src/api/setup-complete.ts +49 -1
- package/src/api/site-url.ts +16 -6
- package/src/api/transfer-download.ts +36 -0
- package/src/api/types.ts +45 -10
- package/src/astro/dev-typegen.ts +28 -0
- package/src/astro/image-endpoint.ts +84 -0
- package/src/astro/index.ts +6 -0
- package/src/astro/integration/dev-typegen.ts +120 -0
- package/src/astro/integration/index.ts +501 -122
- package/src/astro/integration/route-naming.ts +19 -0
- package/src/astro/integration/routes.ts +367 -16
- package/src/astro/integration/runtime.ts +250 -24
- package/src/astro/integration/shims/use-sync-external-store-with-selector.js +71 -0
- package/src/astro/integration/shims/use-sync-external-store.js +1 -0
- package/src/astro/integration/virtual-modules.ts +213 -7
- package/src/astro/integration/vite-config.ts +261 -31
- package/src/astro/middleware/auth.ts +157 -102
- package/src/astro/middleware/csp.ts +79 -3
- package/src/astro/middleware/media-usage-write-fence.ts +125 -0
- package/src/astro/middleware/redirect.ts +68 -24
- package/src/astro/middleware/request-context.ts +223 -27
- package/src/astro/middleware/scoped-db.ts +183 -0
- package/src/astro/middleware/stream-end-metrics.ts +102 -0
- package/src/astro/middleware.ts +699 -115
- package/src/astro/object-cache/adapters.ts +50 -0
- package/src/astro/prefetch.ts +82 -0
- package/src/astro/public-plugin-api-routes.ts +42 -0
- package/src/astro/routes/PluginRegistry.tsx +5 -2
- package/src/astro/routes/admin.astro +74 -19
- package/src/astro/routes/api/admin/api-tokens/index.ts +6 -3
- package/src/astro/routes/api/admin/byline-fields/[slug]/usage.ts +36 -0
- package/src/astro/routes/api/admin/byline-fields/[slug].ts +92 -0
- package/src/astro/routes/api/admin/byline-fields/index.ts +66 -0
- package/src/astro/routes/api/admin/byline-fields/reorder.ts +39 -0
- package/src/astro/routes/api/admin/bylines/[id]/index.ts +34 -31
- package/src/astro/routes/api/admin/bylines/[id]/translations.ts +102 -0
- package/src/astro/routes/api/admin/bylines/index.ts +25 -11
- package/src/astro/routes/api/admin/comments/[id]/status.ts +23 -60
- package/src/astro/routes/api/admin/comments/index.ts +1 -2
- package/src/astro/routes/api/admin/core-update.ts +34 -0
- package/src/astro/routes/api/admin/hooks/exclusive/index.ts +1 -5
- package/src/astro/routes/api/admin/media-usage/activation.ts +42 -0
- package/src/astro/routes/api/admin/media-usage/collection-deletions/index.ts +22 -0
- package/src/astro/routes/api/admin/media-usage/collection-deletions/retry.ts +22 -0
- package/src/astro/routes/api/admin/media-usage/progress.ts +37 -0
- package/src/astro/routes/api/admin/media-usage/repair.ts +24 -0
- package/src/astro/routes/api/admin/media-usage/work/index.ts +26 -0
- package/src/astro/routes/api/admin/media-usage/work/retry.ts +26 -0
- package/src/astro/routes/api/admin/oauth-clients/[id].ts +1 -1
- package/src/astro/routes/api/admin/oauth-clients/index.ts +1 -1
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +7 -10
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +7 -10
- package/src/astro/routes/api/admin/plugins/[id]/index.ts +7 -0
- package/src/astro/routes/api/admin/plugins/[id]/mcp.ts +42 -0
- package/src/astro/routes/api/admin/plugins/[id]/settings.ts +80 -0
- package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +6 -0
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +31 -4
- package/src/astro/routes/api/admin/plugins/index.ts +10 -0
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/icon.ts +6 -2
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +25 -3
- package/src/astro/routes/api/admin/plugins/registry/[id]/uninstall.ts +57 -0
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +112 -0
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +538 -0
- package/src/astro/routes/api/admin/plugins/registry/install.ts +134 -0
- package/src/astro/routes/api/admin/plugins/registry/publisher-handle.ts +59 -0
- package/src/astro/routes/api/admin/plugins/registry/verify.ts +61 -0
- package/src/astro/routes/api/admin/plugins/updates.ts +45 -6
- package/src/astro/routes/api/admin/scheduled-policy-rejections/[collection]/[id].ts +34 -0
- package/src/astro/routes/api/admin/themes/marketplace/[id]/thumbnail.ts +6 -2
- package/src/astro/routes/api/admin/themes/marketplace/index.ts +1 -1
- package/src/astro/routes/api/admin/transfer/[...path].ts +143 -0
- package/src/astro/routes/api/admin/transfer/approvals/[id]/approve.ts +35 -0
- package/src/astro/routes/api/admin/transfer/approvals/[id]/deny.ts +35 -0
- package/src/astro/routes/api/admin/transfer/approvals/index.ts +33 -0
- package/src/astro/routes/api/admin/transfer/capabilities.ts +36 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/advance.ts +34 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/archive.ts +35 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/files/[...path].ts +40 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/index.ts +25 -0
- package/src/astro/routes/api/admin/transfer/exports/[id]/manifest.ts +38 -0
- package/src/astro/routes/api/admin/transfer/exports/index.ts +64 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/abandon.ts +28 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/advance.ts +37 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/analyze.ts +51 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/cancel.ts +27 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/execute.ts +48 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/files/[...path].ts +54 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/index.ts +25 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/missing.ts +34 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/plan.ts +29 -0
- package/src/astro/routes/api/admin/transfer/imports/[id]/receipt.ts +25 -0
- package/src/astro/routes/api/admin/transfer/imports/index.ts +85 -0
- package/src/astro/routes/api/admin/users/[id]/send-recovery.ts +11 -3
- package/src/astro/routes/api/auth/dev-bypass.ts +0 -4
- package/src/astro/routes/api/auth/invite/complete.ts +10 -5
- package/src/astro/routes/api/auth/invite/index.ts +17 -3
- package/src/astro/routes/api/auth/invite/register-options.ts +8 -1
- package/src/astro/routes/api/auth/magic-link/send.ts +11 -3
- package/src/astro/routes/api/auth/magic-link/verify.ts +40 -39
- package/src/astro/routes/api/auth/me.ts +34 -11
- package/src/astro/routes/api/auth/mode.ts +6 -14
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +30 -9
- package/src/astro/routes/api/auth/oauth/[provider].ts +24 -7
- package/src/astro/routes/api/auth/passkey/options.ts +2 -21
- package/src/astro/routes/api/auth/passkey/register/verify.ts +6 -1
- package/src/astro/routes/api/auth/passkey/verify.ts +10 -5
- package/src/astro/routes/api/auth/signup/complete.ts +10 -5
- package/src/astro/routes/api/auth/signup/request.ts +2 -2
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +4 -246
- package/src/astro/routes/api/comments/[collection]/[contentId]/reactions.ts +97 -0
- package/src/astro/routes/api/content/[collection]/[id]/compare.ts +3 -4
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +26 -6
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +5 -6
- package/src/astro/routes/api/content/[collection]/[id]/lock.ts +133 -0
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +3 -4
- package/src/astro/routes/api/content/[collection]/[id]/plugin-extensions/[pluginId]/[kind]/[extensionId].ts +29 -0
- package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +87 -15
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +58 -8
- package/src/astro/routes/api/content/[collection]/[id]/references/[relation]/children.ts +52 -0
- package/src/astro/routes/api/content/[collection]/[id]/references/[relation]/parents.ts +47 -0
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +6 -4
- package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +6 -6
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +42 -9
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +103 -38
- package/src/astro/routes/api/content/[collection]/[id]/translations.ts +4 -5
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +26 -6
- package/src/astro/routes/api/content/[collection]/[id].ts +62 -18
- package/src/astro/routes/api/content/[collection]/authors.ts +33 -0
- package/src/astro/routes/api/content/[collection]/index.ts +10 -9
- package/src/astro/routes/api/content/[collection]/trash.ts +2 -3
- package/src/astro/routes/api/health.ts +18 -0
- package/src/astro/routes/api/import/wordpress/execute.ts +428 -8
- package/src/astro/routes/api/import/wordpress/media.ts +9 -3
- package/src/astro/routes/api/import/wordpress/prepare.ts +10 -12
- package/src/astro/routes/api/import/wordpress/rewrite-url-helpers.ts +225 -0
- package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +132 -273
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +798 -46
- package/src/astro/routes/api/manifest.ts +85 -46
- package/src/astro/routes/api/mcp.ts +6 -2
- package/src/astro/routes/api/media/[id]/confirm.ts +169 -11
- package/src/astro/routes/api/media/[id]/replace.ts +114 -0
- package/src/astro/routes/api/media/[id]/upload.ts +262 -0
- package/src/astro/routes/api/media/[id]/usage.ts +30 -0
- package/src/astro/routes/api/media/[id].ts +32 -18
- package/src/astro/routes/api/media/asset/[id]/[filename].ts +50 -0
- package/src/astro/routes/api/media/file/[...key].ts +37 -1
- package/src/astro/routes/api/media/folders/[id].ts +55 -0
- package/src/astro/routes/api/media/folders/index.ts +37 -0
- package/src/astro/routes/api/media/providers/[providerId]/index.ts +12 -3
- package/src/astro/routes/api/media/upload-url.ts +44 -37
- package/src/astro/routes/api/media.ts +115 -33
- package/src/astro/routes/api/menus/[name]/items/[id].ts +74 -0
- package/src/astro/routes/api/menus/[name]/items.ts +12 -60
- package/src/astro/routes/api/menus/[name]/reorder.ts +12 -4
- package/src/astro/routes/api/menus/[name]/translations.ts +85 -0
- package/src/astro/routes/api/menus/[name].ts +25 -11
- package/src/astro/routes/api/menus/index.ts +13 -7
- package/src/astro/routes/api/oauth/authorize.ts +47 -15
- package/src/astro/routes/api/oauth/device/authorize.ts +33 -4
- package/src/astro/routes/api/oauth/register.ts +22 -2
- package/src/astro/routes/api/openapi.json.ts +27 -10
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +13 -59
- package/src/astro/routes/api/redirects/404s/index.ts +7 -1
- package/src/astro/routes/api/redirects/404s/summary.ts +3 -1
- package/src/astro/routes/api/redirects/[id].ts +7 -4
- package/src/astro/routes/api/redirects/index.ts +5 -3
- package/src/astro/routes/api/relations/[id]/index.ts +84 -0
- package/src/astro/routes/api/relations/index.ts +56 -0
- package/src/astro/routes/api/revisions/[revisionId]/index.ts +1 -1
- package/src/astro/routes/api/revisions/[revisionId]/restore.ts +17 -1
- package/src/astro/routes/api/schema/block-types/[slug]/index.ts +29 -0
- package/src/astro/routes/api/schema/block-types/[slug]/versions/[version]/activate.ts +31 -0
- package/src/astro/routes/api/schema/block-types/index.ts +29 -0
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +9 -13
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +2 -8
- package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +1 -2
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +5 -11
- package/src/astro/routes/api/schema/collections/index.ts +4 -4
- package/src/astro/routes/api/schema/collections/reorder.ts +31 -0
- package/src/astro/routes/api/schema/index.ts +19 -19
- package/src/astro/routes/api/schema/orphans/[slug].ts +1 -1
- package/src/astro/routes/api/schema/orphans/index.ts +1 -1
- package/src/astro/routes/api/search/enable.ts +5 -1
- package/src/astro/routes/api/search/index.ts +13 -2
- package/src/astro/routes/api/search/rebuild.ts +6 -1
- package/src/astro/routes/api/sections/[slug].ts +7 -1
- package/src/astro/routes/api/sections/index.ts +5 -1
- package/src/astro/routes/api/settings/backups/archives/[name].ts +78 -0
- package/src/astro/routes/api/settings/backups/archives/index.ts +33 -0
- package/src/astro/routes/api/settings/backups/export.ts +43 -0
- package/src/astro/routes/api/settings/backups/index.ts +76 -0
- package/src/astro/routes/api/settings/email.ts +1 -1
- package/src/astro/routes/api/settings.ts +4 -1
- package/src/astro/routes/api/setup/admin-verify.ts +20 -10
- package/src/astro/routes/api/setup/admin.ts +11 -4
- package/src/astro/routes/api/setup/dev-bypass.ts +26 -10
- package/src/astro/routes/api/setup/index.ts +71 -36
- package/src/astro/routes/api/snapshot.ts +48 -19
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +44 -0
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts +92 -0
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +28 -23
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +19 -15
- package/src/astro/routes/api/taxonomies/[name]/translations.ts +48 -0
- package/src/astro/routes/api/taxonomies/[name].ts +107 -0
- package/src/astro/routes/api/taxonomies/bulk-tag.ts +29 -0
- package/src/astro/routes/api/taxonomies/index.ts +13 -8
- package/src/astro/routes/api/themes/preview.ts +11 -5
- package/src/astro/routes/api/typegen.ts +4 -42
- package/src/astro/routes/api/visual-editing/action-token.ts +36 -0
- package/src/astro/routes/api/visual-editing/content/[collection]/[id]/publish.ts +32 -0
- package/src/astro/routes/api/visual-editing/toolbar-labels.ts +16 -0
- package/src/astro/routes/api/well-known/oauth-authorization-server.ts +4 -1
- package/src/astro/routes/api/well-known/oauth-protected-resource.ts +5 -1
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +3 -1
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +5 -2
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +3 -1
- package/src/astro/routes/api/widget-areas/[name].ts +3 -1
- package/src/astro/routes/api/widget-areas/index.ts +3 -1
- package/src/astro/routes/sitemap-[collection].xml.ts +133 -14
- package/src/astro/session-user.ts +71 -0
- package/src/astro/types.ts +304 -16
- package/src/auth/allowed-origins.ts +168 -0
- package/src/auth/api-tokens.ts +2 -0
- package/src/auth/challenge-store.ts +3 -1
- package/src/auth/oauth-state-store.ts +3 -0
- package/src/auth/passkey-config.ts +35 -13
- package/src/auth/providers/github-admin.tsx +5 -6
- package/src/auth/providers/google-admin.tsx +5 -6
- package/src/auth/rate-limit.ts +6 -5
- package/src/auth/scopes.ts +14 -9
- package/src/auth/trusted-proxy.ts +1 -1
- package/src/aws-sdk.d.ts +1 -0
- package/src/bylines/credits.ts +149 -0
- package/src/bylines/field-defs-cache.ts +188 -0
- package/src/bylines/index.ts +152 -152
- package/src/cache/chrome-tags.ts +24 -0
- package/src/cleanup.ts +72 -26
- package/src/cli/client-factory.ts +6 -2
- package/src/cli/commands/content.ts +48 -7
- package/src/cli/commands/doctor.ts +219 -7
- package/src/cli/commands/export-seed.ts +1021 -142
- package/src/cli/commands/init.ts +4 -8
- package/src/cli/commands/login.ts +8 -1
- package/src/cli/commands/media.ts +127 -0
- package/src/cli/commands/migrate.ts +641 -0
- package/src/cli/commands/secrets.ts +183 -0
- package/src/cli/commands/seed.ts +9 -3
- package/src/cli/commands/site.ts +556 -0
- package/src/cli/credentials.ts +2 -61
- package/src/cli/index.ts +6 -28
- package/src/cli/site/archive.ts +273 -0
- package/src/cli/site/export.ts +311 -0
- package/src/cli/site/import.ts +815 -0
- package/src/cli/site/shared.ts +241 -0
- package/src/cli/wxr/parser.ts +263 -0
- package/src/client/index.ts +849 -31
- package/src/client/portable-text.ts +41 -0
- package/src/client/transport.ts +23 -9
- package/src/comments/public-submission.ts +254 -0
- package/src/comments/query.ts +78 -7
- package/src/comments/ranking.ts +58 -0
- package/src/comments/service.ts +60 -13
- package/src/comments/turnstile.ts +64 -0
- package/src/components/Block.astro +83 -0
- package/src/components/BlockquoteGroup.astro +34 -0
- package/src/components/Blocks.astro +46 -0
- package/src/components/Break.astro +2 -2
- package/src/components/Columns.astro +3 -1
- package/src/components/CommentForm.astro +13 -6
- package/src/components/Comments.astro +137 -2
- package/src/components/Cover.astro +3 -1
- package/src/components/EmDashBodyEnd.astro +4 -1
- package/src/components/EmDashBodyStart.astro +4 -1
- package/src/components/EmDashHead.astro +113 -25
- package/src/components/EmDashImage.astro +210 -53
- package/src/components/EmDashMedia.astro +3 -3
- package/src/components/Embed.astro +1 -1
- package/src/components/Gallery.astro +166 -29
- package/src/components/Image.astro +158 -40
- package/src/components/InlineEditor.astro +3 -1
- package/src/components/InlinePortableTextEditor.tsx +854 -97
- package/src/components/JsonLdScript.astro +9 -0
- package/src/components/LiveSearch.astro +63 -4
- package/src/components/OrderedList.astro +14 -0
- package/src/components/PortableText.astro +34 -2
- package/src/components/Table.astro +147 -62
- package/src/components/WidgetArea.astro +3 -2
- package/src/components/blocks.ts +44 -0
- package/src/components/code-mark.ts +11 -0
- package/src/components/index.ts +25 -8
- package/src/components/inline-code-block.tsx +474 -0
- package/src/components/live-search-routing.ts +30 -0
- package/src/components/marks/Link.astro +5 -1
- package/src/components/ordered-list.ts +549 -0
- package/src/components/portable-text-blockquote-group.ts +68 -0
- package/src/components/portable-text-text-align.ts +38 -0
- package/src/components/widgets/Archives.astro +7 -41
- package/src/components/widgets/Categories.astro +1 -1
- package/src/components/widgets/Tags.astro +1 -1
- package/src/config/errors.ts +13 -0
- package/src/config/secrets.ts +562 -0
- package/src/content/converters/gallery.ts +101 -0
- package/src/content/converters/image-link.ts +27 -0
- package/src/content/converters/index.ts +3 -0
- package/src/content/converters/mark-safety.ts +121 -0
- package/src/content/converters/numbered-list.ts +148 -0
- package/src/content/converters/portable-text-identity.ts +139 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +400 -90
- package/src/content/converters/prosemirror-to-portable-text.ts +234 -46
- package/src/content/converters/types.ts +80 -0
- package/src/content/known-fields.ts +44 -0
- package/src/content/portable-text-lists.ts +205 -0
- package/src/content-list-query.ts +29 -0
- package/src/database/connection.ts +9 -41
- package/src/database/content-datetime.ts +228 -0
- package/src/database/datetime-storage.ts +452 -0
- package/src/database/dialect-helpers.ts +352 -10
- package/src/database/errors.ts +14 -0
- package/src/database/index.ts +11 -3
- package/src/database/instrumentation.ts +56 -9
- package/src/database/json-recordset.ts +16 -0
- package/src/database/migration-lock.ts +140 -0
- package/src/database/migrations/006_taxonomy_defs.ts +1 -1
- package/src/database/migrations/014_draft_revisions.ts +6 -6
- package/src/database/migrations/016_api_tokens.ts +18 -3
- package/src/database/migrations/017_authorization_codes.ts +14 -4
- package/src/database/migrations/019_i18n.ts +3 -3
- package/src/database/migrations/034_published_at_index.ts +1 -1
- package/src/database/migrations/035_bounded_404_log.ts +37 -31
- package/src/database/migrations/036_i18n_menus_and_taxonomies.ts +655 -0
- package/src/database/migrations/037_credential_algorithm.ts +18 -0
- package/src/database/migrations/038_registry_plugin_state.ts +130 -0
- package/src/database/migrations/039_fix_fts5_triggers.ts +264 -0
- package/src/database/migrations/040_byline_i18n.ts +497 -0
- package/src/database/migrations/041_content_locale_list_index.ts +47 -0
- package/src/database/migrations/042_byline_fields.ts +157 -0
- package/src/database/migrations/043_content_references.ts +121 -0
- package/src/database/migrations/044_comment_reactions.ts +56 -0
- package/src/database/migrations/045_taxonomy_parent_group.ts +68 -0
- package/src/database/migrations/046_media_usage_index.ts +115 -0
- package/src/database/migrations/047_restore_taxonomy_parent_index.ts +29 -0
- package/src/database/migrations/048_restore_content_taxonomies_term_index.ts +32 -0
- package/src/database/migrations/049_taxonomies_name_locale_index.ts +42 -0
- package/src/database/migrations/050_media_usage_index_status.ts +142 -0
- package/src/database/migrations/051_content_taxonomies_denorm.ts +120 -0
- package/src/database/migrations/052_media_usage_read_index.ts +26 -0
- package/src/database/migrations/053_plugin_mcp_tools.ts +21 -0
- package/src/database/migrations/054_media_upload_attempts.ts +41 -0
- package/src/database/migrations/055_content_translation_group_locale_index.ts +67 -0
- package/src/database/migrations/056_taxonomy_term_sort_order.ts +189 -0
- package/src/database/migrations/057_collection_hidden.ts +24 -0
- package/src/database/migrations/058_collection_sort_order.ts +20 -0
- package/src/database/migrations/059_revision_prune_queue.ts +36 -0
- package/src/database/migrations/060_collection_admin_config.ts +16 -0
- package/src/database/migrations/061_media_usage_cleanup.ts +77 -0
- package/src/database/migrations/062_media_usage_cleanup_fence.ts +295 -0
- package/src/database/migrations/063_media_usage_incremental_work.ts +397 -0
- package/src/database/migrations/064_fts_plain_text.ts +253 -0
- package/src/database/migrations/065_media_usage_collection_deletion.ts +85 -0
- package/src/database/migrations/066_media_usage_reconciliation.ts +115 -0
- package/src/database/migrations/067_indexed_content_fields.ts +39 -0
- package/src/database/migrations/068_content_taxonomy_entry_groups.ts +61 -0
- package/src/database/migrations/069_collection_title_date_fields.ts +45 -0
- package/src/database/migrations/070_collection_routable.ts +18 -0
- package/src/database/migrations/071_restore_content_bylines_table.ts +43 -0
- package/src/database/migrations/072_media_folders.ts +72 -0
- package/src/database/migrations/073_media_focal_point.ts +57 -0
- package/src/database/migrations/074_content_deleted_scheduled_index.ts +55 -0
- package/src/database/migrations/075_entry_edit_locks.ts +44 -0
- package/src/database/migrations/076_collection_nav_group.ts +22 -0
- package/src/database/migrations/077_plugin_storage_revisions.ts +89 -0
- package/src/database/migrations/078_menu_item_translation_groups.ts +15 -0
- package/src/database/migrations/079_datetime_normalization.ts +13 -0
- package/src/database/migrations/080_content_translation_locale_unique.ts +88 -0
- package/src/database/migrations/081_redirect_write_guards.ts +260 -0
- package/src/database/migrations/082_taxonomy_translation_locale_unique.ts +49 -0
- package/src/database/migrations/083_block_types.ts +58 -0
- package/src/database/migrations/084_site_transfer.ts +264 -0
- package/src/database/migrations/085_taxonomy_def_groups.ts +155 -0
- package/src/database/migrations/086_relations_structural.ts +197 -0
- package/src/database/migrations/087_reference_field_relations.ts +407 -0
- package/src/database/migrations/088_cron_oneshot_utc.ts +39 -0
- package/src/database/migrations/089_auto_seed_completion.ts +13 -0
- package/src/database/migrations/policy.ts +70 -0
- package/src/database/migrations/runner.ts +416 -43
- package/src/database/pg-migration-lock.ts +69 -0
- package/src/database/reference-backfill.ts +141 -0
- package/src/database/repositories/audit.ts +13 -3
- package/src/database/repositories/byline.ts +1120 -87
- package/src/database/repositories/comment-reaction.ts +132 -0
- package/src/database/repositories/comment.ts +99 -3
- package/src/database/repositories/content.ts +2210 -267
- package/src/database/repositories/entry-locks.ts +257 -0
- package/src/database/repositories/index.ts +21 -0
- package/src/database/repositories/media-folders.ts +115 -0
- package/src/database/repositories/media-usage-work.ts +1132 -0
- package/src/database/repositories/media-usage.ts +4040 -0
- package/src/database/repositories/media.ts +465 -55
- package/src/database/repositories/menu.ts +657 -0
- package/src/database/repositories/options.ts +128 -10
- package/src/database/repositories/plugin-storage.ts +265 -44
- package/src/database/repositories/redirect.ts +296 -79
- package/src/database/repositories/relation.ts +1004 -0
- package/src/database/repositories/revision.ts +225 -31
- package/src/database/repositories/seo.ts +3 -0
- package/src/database/repositories/taxonomy-def.ts +126 -0
- package/src/database/repositories/taxonomy.ts +747 -97
- package/src/database/repositories/types.ts +209 -0
- package/src/database/repositories/user.ts +18 -0
- package/src/database/transaction.ts +12 -0
- package/src/database/types.ts +525 -7
- package/src/database/validate.ts +39 -0
- package/src/datetime-normalization.ts +311 -0
- package/src/db/adapters.ts +105 -5
- package/src/db/index.ts +6 -1
- package/src/db/libsql-migrations.ts +72 -0
- package/src/db/libsql.ts +1 -3
- package/src/db/node-sqlite-compat.ts +105 -0
- package/src/db/postgres-migrations.ts +59 -0
- package/src/db/postgres.ts +28 -2
- package/src/db/sqlite-migrations.ts +37 -0
- package/src/db/sqlite.ts +4 -7
- package/src/deferred-tasks.ts +71 -0
- package/src/emdash-runtime.ts +4558 -909
- package/src/fields/boolean.ts +1 -1
- package/src/fields/datetime.ts +1 -1
- package/src/fields/file.ts +15 -11
- package/src/fields/image.ts +29 -13
- package/src/fields/integer.ts +1 -1
- package/src/fields/json.ts +1 -1
- package/src/fields/multiselect.ts +1 -1
- package/src/fields/number.ts +1 -1
- package/src/fields/portable-text.ts +1 -1
- package/src/fields/richtext.ts +1 -1
- package/src/fields/select.ts +1 -1
- package/src/fields/slug.ts +1 -1
- package/src/fields/text.ts +1 -1
- package/src/fields/textarea.ts +1 -1
- package/src/fields/types.ts +29 -9
- package/src/i18n/config.ts +57 -10
- package/src/i18n/normalize.ts +31 -0
- package/src/i18n/repair-locale-casing.ts +37 -0
- package/src/i18n/resolve.ts +272 -0
- package/src/i18n/taxonomy-locale-diagnostic.ts +47 -0
- package/src/import/comments.ts +159 -0
- package/src/import/index.ts +8 -1
- package/src/import/settings.ts +65 -189
- package/src/import/sources/wordpress-plugin.ts +347 -44
- package/src/import/sources/wxr.ts +20 -3
- package/src/import/ssrf.ts +20 -500
- package/src/import/types.ts +12 -0
- package/src/import/utils.ts +214 -0
- package/src/import/wxr-taxonomies.ts +748 -0
- package/src/index.ts +274 -20
- package/src/loader.ts +1257 -152
- package/src/mcp/server.ts +2065 -272
- package/src/mcp/transfer.ts +569 -0
- package/src/media/enrich.ts +78 -0
- package/src/media/focal-point.ts +37 -0
- package/src/media/image-endpoint.ts +206 -0
- package/src/media/index.ts +1 -0
- package/src/media/local-runtime.ts +49 -15
- package/src/media/local.ts +1 -1
- package/src/media/mime.ts +76 -0
- package/src/media/normalize.ts +82 -9
- package/src/media/placeholder.ts +29 -9
- package/src/media/responsive.ts +148 -0
- package/src/media/types.ts +24 -0
- package/src/media/upload-attempts.ts +38 -0
- package/src/media/url.ts +15 -0
- package/src/media/usage/activation.ts +762 -0
- package/src/media/usage/capture-triggers.ts +559 -0
- package/src/media/usage/cleanup.ts +306 -0
- package/src/media/usage/collection-deletion-processor.ts +360 -0
- package/src/media/usage/collection-deletion.ts +846 -0
- package/src/media/usage/content-fields.ts +220 -0
- package/src/media/usage/content-refresh.ts +1000 -0
- package/src/media/usage/content-repair.ts +802 -0
- package/src/media/usage/content-snapshots.ts +516 -0
- package/src/media/usage/extractor.ts +427 -0
- package/src/media/usage/gc.ts +50 -0
- package/src/media/usage/maintenance-engine.ts +166 -0
- package/src/media/usage/projection-fingerprint.ts +143 -0
- package/src/media/usage/reconciliation-processor.ts +449 -0
- package/src/media/usage/reconciliation.ts +1200 -0
- package/src/media/usage/schema-invalidation.ts +72 -0
- package/src/media/usage/site-settings.ts +52 -0
- package/src/media/usage/source-key.ts +26 -0
- package/src/media/usage/types.ts +50 -0
- package/src/media/usage/work-processor.ts +489 -0
- package/src/menus/index.ts +408 -198
- package/src/menus/types.ts +15 -1
- package/src/migrations/config-loader.ts +210 -0
- package/src/migrations/direct-executor.ts +179 -0
- package/src/migrations/identity.ts +46 -0
- package/src/migrations/index.ts +20 -0
- package/src/migrations/integration-metadata.ts +67 -0
- package/src/migrations/manifest-builder.ts +55 -0
- package/src/migrations/manifest-writer.ts +63 -0
- package/src/migrations/manifest.ts +197 -0
- package/src/migrations/protocol.ts +69 -0
- package/src/migrations/target.ts +35 -0
- package/src/object-cache/codec.ts +73 -0
- package/src/object-cache/index.ts +852 -0
- package/src/object-cache/memory.ts +91 -0
- package/src/object-cache/types.ts +125 -0
- package/src/page/absolute-url.ts +146 -0
- package/src/page/jsonld.ts +10 -2
- package/src/page/metadata.ts +50 -3
- package/src/page/seo-contributions.ts +94 -6
- package/src/page/seo-panel.ts +47 -0
- package/src/page/site-identity.ts +58 -0
- package/src/plugin-test-runtime.ts +18 -0
- package/src/plugin-types.ts +410 -0
- package/src/plugin-utils.ts +31 -6
- package/src/plugins/adapt-sandbox-entry.ts +249 -56
- package/src/plugins/byline-access.ts +158 -0
- package/src/plugins/conditional-storage.ts +30 -0
- package/src/plugins/content-access.ts +170 -0
- package/src/plugins/content-policy.ts +74 -0
- package/src/plugins/context.ts +1160 -251
- package/src/plugins/cron.ts +69 -19
- package/src/plugins/define-plugin.ts +129 -86
- package/src/plugins/editor-draft.ts +257 -0
- package/src/plugins/email-console.ts +3 -1
- package/src/plugins/email.ts +16 -0
- package/src/plugins/hooks.ts +330 -57
- package/src/plugins/host.ts +30 -0
- package/src/plugins/http-route-dispatch.ts +389 -0
- package/src/plugins/http-wire.ts +180 -0
- package/src/plugins/index.ts +148 -12
- package/src/plugins/install-finalization.ts +77 -0
- package/src/plugins/lifecycle.ts +47 -0
- package/src/plugins/manager.ts +40 -2
- package/src/plugins/manifest-schema.ts +452 -49
- package/src/plugins/marketplace.ts +110 -42
- package/src/plugins/media.ts +166 -0
- package/src/plugins/request-meta.ts +12 -2
- package/src/plugins/route-error.ts +57 -0
- package/src/plugins/route-wire.ts +304 -0
- package/src/plugins/routes.ts +183 -62
- package/src/plugins/sandbox/hook-result.ts +52 -0
- package/src/plugins/sandbox/index.ts +25 -1
- package/src/plugins/sandbox/noop.ts +13 -5
- package/src/plugins/sandbox/proxy.ts +130 -0
- package/src/plugins/sandbox/runner-options.ts +16 -0
- package/src/plugins/sandbox/types.ts +218 -9
- package/src/plugins/save-rejection.ts +20 -0
- package/src/plugins/scheduler/node.ts +9 -2
- package/src/plugins/secret-redactor.ts +65 -0
- package/src/plugins/settings.ts +303 -0
- package/src/plugins/state.ts +137 -39
- package/src/plugins/storage-indexes.ts +50 -11
- package/src/plugins/storage-query.ts +111 -32
- package/src/plugins/storage-update.ts +96 -0
- package/src/plugins/types.ts +1014 -152
- package/src/preview/urls.ts +23 -3
- package/src/query.ts +1188 -85
- package/src/redirects/cache.ts +113 -23
- package/src/redirects/destination.ts +20 -0
- package/src/redirects/loops.ts +10 -6
- package/src/redirects/patterns.ts +12 -30
- package/src/redirects/status.ts +27 -0
- package/src/references/field-map.ts +115 -0
- package/src/references/resolve.ts +160 -0
- package/src/references/staged.ts +157 -0
- package/src/references/types.ts +16 -0
- package/src/registry/artifact-checksum.ts +15 -0
- package/src/registry/artifact-fetch.ts +317 -0
- package/src/registry/artifact-verification.ts +85 -0
- package/src/registry/authoritative-records.ts +206 -0
- package/src/registry/config.ts +461 -0
- package/src/registry/plugin-id.ts +116 -0
- package/src/registry/publisher-handle.ts +273 -0
- package/src/registry/record-labels.ts +28 -0
- package/src/registry/testing.ts +145 -0
- package/src/registry/types.ts +126 -0
- package/src/request-cache.ts +31 -4
- package/src/request-context.ts +62 -3
- package/src/scheduled-publish.ts +225 -0
- package/src/scheduler-health.ts +46 -0
- package/src/schema/block-type-contract.ts +478 -0
- package/src/schema/block-type-registry.ts +689 -0
- package/src/schema/block-types.ts +110 -0
- package/src/schema/block-values.ts +293 -0
- package/src/schema/byline-registry.ts +671 -0
- package/src/schema/collection-slugs-cache.ts +157 -0
- package/src/schema/env-types.ts +37 -0
- package/src/schema/index.ts +29 -0
- package/src/schema/project-env-types.ts +41 -0
- package/src/schema/query.ts +11 -4
- package/src/schema/registry.ts +1837 -264
- package/src/schema/types.ts +326 -5
- package/src/schema/url-pattern.ts +43 -0
- package/src/schema/zod-generator.ts +357 -34
- package/src/search/fts-manager.ts +256 -39
- package/src/search/index.ts +2 -0
- package/src/search/match.ts +50 -0
- package/src/search/query.ts +155 -18
- package/src/search/types.ts +18 -0
- package/src/security/ssrf.ts +549 -0
- package/src/seed/apply.ts +1547 -274
- package/src/seed/ownership.ts +15 -0
- package/src/seed/types.ts +145 -11
- package/src/seed/validate.ts +415 -26
- package/src/seo/hreflang.ts +196 -0
- package/src/seo/index.ts +28 -32
- package/src/seo/media-url.ts +58 -0
- package/src/settings/index.ts +206 -27
- package/src/settings/types.ts +42 -1
- package/src/storage/local.ts +2 -1
- package/src/storage/s3.ts +6 -4
- package/src/storage/types.ts +8 -0
- package/src/taxonomies/index.ts +686 -302
- package/src/taxonomies/term-counts.ts +175 -0
- package/src/taxonomies/types.ts +10 -0
- package/src/transfer/analyze/index.ts +45 -0
- package/src/transfer/analyze/issues.ts +55 -0
- package/src/transfer/analyze/plan.ts +327 -0
- package/src/transfer/analyze/read.ts +134 -0
- package/src/transfer/analyze/step.ts +551 -0
- package/src/transfer/analyze/target.ts +269 -0
- package/src/transfer/analyze/unique-keys.ts +219 -0
- package/src/transfer/analyze/validate.ts +1550 -0
- package/src/transfer/analyze/values.ts +341 -0
- package/src/transfer/analyze/write-rules.ts +204 -0
- package/src/transfer/audit.ts +38 -0
- package/src/transfer/auth.ts +25 -0
- package/src/transfer/container/tar.ts +242 -0
- package/src/transfer/domain.ts +248 -0
- package/src/transfer/errors.ts +134 -0
- package/src/transfer/export/exporter.ts +1067 -0
- package/src/transfer/export/fence.ts +84 -0
- package/src/transfer/export/media.ts +165 -0
- package/src/transfer/export/readers.ts +1168 -0
- package/src/transfer/export/verify.ts +677 -0
- package/src/transfer/fence.ts +193 -0
- package/src/transfer/format/canonical.ts +151 -0
- package/src/transfer/format/column-codec.ts +275 -0
- package/src/transfer/format/columns.ts +727 -0
- package/src/transfer/format/digest.ts +287 -0
- package/src/transfer/format/features.ts +91 -0
- package/src/transfer/format/issues.ts +39 -0
- package/src/transfer/format/kinds.ts +952 -0
- package/src/transfer/format/limits.ts +87 -0
- package/src/transfer/format/manifest.ts +297 -0
- package/src/transfer/format/media-refs.ts +716 -0
- package/src/transfer/format/paths.ts +73 -0
- package/src/transfer/format/plan.ts +162 -0
- package/src/transfer/format/receipt.ts +43 -0
- package/src/transfer/format/records.ts +127 -0
- package/src/transfer/format/settings.ts +94 -0
- package/src/transfer/format/transformations.ts +260 -0
- package/src/transfer/format/version.ts +9 -0
- package/src/transfer/gc.ts +103 -0
- package/src/transfer/import/advance.ts +522 -0
- package/src/transfer/import/context.ts +288 -0
- package/src/transfer/import/entries.ts +186 -0
- package/src/transfer/import/ids.ts +40 -0
- package/src/transfer/import/index.ts +15 -0
- package/src/transfer/import/media.ts +141 -0
- package/src/transfer/import/rebuild.ts +300 -0
- package/src/transfer/import/rows.ts +114 -0
- package/src/transfer/import/scaffold.ts +221 -0
- package/src/transfer/import/sql.ts +134 -0
- package/src/transfer/import/stages.ts +329 -0
- package/src/transfer/import/writers.ts +370 -0
- package/src/transfer/index.ts +472 -0
- package/src/transfer/ops/approvals.ts +359 -0
- package/src/transfer/ops/budget.ts +82 -0
- package/src/transfer/ops/collation.ts +21 -0
- package/src/transfer/ops/identity-map.ts +142 -0
- package/src/transfer/ops/media-blobs.ts +135 -0
- package/src/transfer/ops/operations.ts +842 -0
- package/src/transfer/ops/package-index.ts +159 -0
- package/src/transfer/ops/staged-files.ts +231 -0
- package/src/transfer/ops/states.ts +265 -0
- package/src/transfer/ops/time.ts +54 -0
- package/src/transfer/schema-importer.ts +34 -0
- package/src/transfer/site-id.ts +30 -0
- package/src/transfer/staging/assembler.ts +217 -0
- package/src/transfer/staging/keys.ts +94 -0
- package/src/transfer/staging/package.ts +229 -0
- package/src/transfer/staging/stage.ts +231 -0
- package/src/ui-comments.ts +19 -0
- package/src/ui.ts +26 -3
- package/src/utils/base64.ts +7 -2
- package/src/utils/db-errors.ts +26 -0
- package/src/utils/hash.ts +14 -3
- package/src/utils/init-lock.ts +143 -0
- package/src/utils/single-flight-cache.ts +194 -0
- package/src/utils/slugify.ts +1 -29
- package/src/utils/url.ts +58 -3
- package/src/virtual-modules.d.ts +84 -0
- package/src/visual-editing/action-token.ts +31 -0
- package/src/visual-editing/editable.ts +41 -35
- package/src/visual-editing/toolbar-bootstrap.ts +145 -0
- package/src/visual-editing/toolbar.ts +273 -48
- package/src/widgets/archives.ts +68 -0
- package/src/widgets/index.ts +83 -54
- package/dist/adapters-BKSf3T9R.d.mts +0 -121
- package/dist/adapters-BKSf3T9R.d.mts.map +0 -1
- package/dist/apply-x0eMK1lX.mjs +0 -1528
- package/dist/apply-x0eMK1lX.mjs.map +0 -1
- package/dist/base64-MBPo9ozB.mjs +0 -59
- package/dist/base64-MBPo9ozB.mjs.map +0 -1
- package/dist/byline-Chbr2GoP.mjs +0 -220
- package/dist/byline-Chbr2GoP.mjs.map +0 -1
- package/dist/bylines-CRNsVG88.mjs +0 -157
- package/dist/bylines-CRNsVG88.mjs.map +0 -1
- package/dist/cache-BkKBuIvS.mjs +0 -56
- package/dist/cache-BkKBuIvS.mjs.map +0 -1
- package/dist/chunk-ClPoSABd.mjs +0 -21
- package/dist/chunks-HGz06Soa.mjs +0 -19
- package/dist/chunks-HGz06Soa.mjs.map +0 -1
- package/dist/config-BXwuX8Bx.mjs +0 -47
- package/dist/config-BXwuX8Bx.mjs.map +0 -1
- package/dist/connection-2igzM-AT.mjs +0 -57
- package/dist/connection-2igzM-AT.mjs.map +0 -1
- package/dist/content-BcQPYxdV.mjs +0 -878
- package/dist/content-BcQPYxdV.mjs.map +0 -1
- package/dist/db-errors-l1Qh2RPR.mjs +0 -41
- package/dist/db-errors-l1Qh2RPR.mjs.map +0 -1
- package/dist/default-DCVqE5ib.mjs +0 -81
- package/dist/default-DCVqE5ib.mjs.map +0 -1
- package/dist/dialect-helpers-DhTzaUxP.mjs +0 -93
- package/dist/dialect-helpers-DhTzaUxP.mjs.map +0 -1
- package/dist/error-zG5T1UGA.mjs +0 -27
- package/dist/error-zG5T1UGA.mjs.map +0 -1
- package/dist/index-DIb-CzNx.d.mts +0 -4955
- package/dist/index-DIb-CzNx.d.mts.map +0 -1
- package/dist/load-CyEoextb.mjs +0 -28
- package/dist/load-CyEoextb.mjs.map +0 -1
- package/dist/loader-CndGj8kM.mjs +0 -457
- package/dist/loader-CndGj8kM.mjs.map +0 -1
- package/dist/manifest-schema-DH9xhc6t.mjs +0 -199
- package/dist/manifest-schema-DH9xhc6t.mjs.map +0 -1
- package/dist/media-D8FbNsl0.mjs +0 -197
- package/dist/media-D8FbNsl0.mjs.map +0 -1
- package/dist/mode-BnAOqItE.mjs +0 -23
- package/dist/mode-BnAOqItE.mjs.map +0 -1
- package/dist/patterns-CrCYkMBb.mjs +0 -93
- package/dist/patterns-CrCYkMBb.mjs.map +0 -1
- package/dist/placeholder-C-fk5hYI.mjs +0 -268
- package/dist/placeholder-C-fk5hYI.mjs.map +0 -1
- package/dist/placeholder-D29tWZ7o.d.mts +0 -284
- package/dist/placeholder-D29tWZ7o.d.mts.map +0 -1
- package/dist/query-fqEdLFms.mjs +0 -558
- package/dist/query-fqEdLFms.mjs.map +0 -1
- package/dist/redirect-D_pshWdf.mjs +0 -302
- package/dist/redirect-D_pshWdf.mjs.map +0 -1
- package/dist/registry-C3Mr0ODu.mjs +0 -902
- package/dist/registry-C3Mr0ODu.mjs.map +0 -1
- package/dist/request-cache-Ci7f5pBb.mjs +0 -79
- package/dist/request-cache-Ci7f5pBb.mjs.map +0 -1
- package/dist/runner-OURCaApa.d.mts +0 -34
- package/dist/runner-OURCaApa.d.mts.map +0 -1
- package/dist/runner-tQ7BJ4T7.mjs +0 -1619
- package/dist/runner-tQ7BJ4T7.mjs.map +0 -1
- package/dist/search-BoZYFuUk.mjs +0 -9637
- package/dist/search-BoZYFuUk.mjs.map +0 -1
- package/dist/taxonomies-B4IAshV8.mjs +0 -308
- package/dist/taxonomies-B4IAshV8.mjs.map +0 -1
- package/dist/tokens-D9vnZqYS.mjs +0 -171
- package/dist/tokens-D9vnZqYS.mjs.map +0 -1
- package/dist/transaction-Cn2rjY78.mjs +0 -28
- package/dist/transaction-Cn2rjY78.mjs.map +0 -1
- package/dist/transport-C9ugt2Nr.mjs +0 -418
- package/dist/transport-C9ugt2Nr.mjs.map +0 -1
- package/dist/transport-CUnEL3Vs.d.mts +0 -42
- package/dist/transport-CUnEL3Vs.d.mts.map +0 -1
- package/dist/types-BIgulNsW.mjs +0 -68
- package/dist/types-BIgulNsW.mjs.map +0 -1
- package/dist/types-Bm1dn-q3.mjs +0 -83
- package/dist/types-Bm1dn-q3.mjs.map +0 -1
- package/dist/types-BmPPSUEx.d.mts +0 -243
- package/dist/types-BmPPSUEx.d.mts.map +0 -1
- package/dist/types-BrA0xf5I.d.mts +0 -126
- package/dist/types-BrA0xf5I.d.mts.map +0 -1
- package/dist/types-CS8FIX7L.d.mts +0 -435
- package/dist/types-CS8FIX7L.d.mts.map +0 -1
- package/dist/types-CgqmmMJB.mjs +0 -16
- package/dist/types-CgqmmMJB.mjs.map +0 -1
- package/dist/types-DIMwPFub.d.mts +0 -192
- package/dist/types-DIMwPFub.d.mts.map +0 -1
- package/dist/types-i36XcA_X.d.mts +0 -1252
- package/dist/types-i36XcA_X.d.mts.map +0 -1
- package/dist/validate-CxVsLehf.mjs +0 -328
- package/dist/validate-CxVsLehf.mjs.map +0 -1
- package/dist/validate-DHxmpFJt.d.mts +0 -331
- package/dist/validate-DHxmpFJt.d.mts.map +0 -1
- package/dist/validate-VPnKoIzW.mjs +0 -97
- package/dist/validate-VPnKoIzW.mjs.map +0 -1
- package/dist/validation-C-ZpN2GI.mjs +0 -144
- package/dist/validation-C-ZpN2GI.mjs.map +0 -1
- package/dist/version-DJrV1K0M.mjs +0 -7
- package/dist/version-DJrV1K0M.mjs.map +0 -1
- package/dist/zod-generator-CpwccCIv.mjs +0 -132
- package/dist/zod-generator-CpwccCIv.mjs.map +0 -1
- package/src/cli/commands/auth.ts +0 -46
- package/src/cli/commands/bundle-utils.ts +0 -273
- package/src/cli/commands/bundle.ts +0 -626
- package/src/cli/commands/dev.ts +0 -191
- package/src/cli/commands/plugin-init.ts +0 -291
- package/src/cli/commands/plugin-validate.ts +0 -31
- package/src/cli/commands/plugin.ts +0 -33
- package/src/cli/commands/publish.ts +0 -697
- package/src/plugins/scheduler/piggyback.ts +0 -71
|
@@ -0,0 +1,3676 @@
|
|
|
1
|
+
import "../../../dialect-helpers-7_IqPdh9.mjs";
|
|
2
|
+
import "../../../config-CvmjJcVw.mjs";
|
|
3
|
+
import "../../../base64-DvnNgP7e.mjs";
|
|
4
|
+
import "../../../url-Dn3IStq8.mjs";
|
|
5
|
+
import "../../../types-j6MBDjlZ.mjs";
|
|
6
|
+
import "../../../errors-CjXd1LgH.mjs";
|
|
7
|
+
import "../../../canonical-CAecl1UQ.mjs";
|
|
8
|
+
import "../../../digest-DiYAoZpf.mjs";
|
|
9
|
+
import "../../../errors-CNvATh_7.mjs";
|
|
10
|
+
import "../../../settings-B0zQj_Tj.mjs";
|
|
11
|
+
import "../../../site-settings-AYFvhwQn.mjs";
|
|
12
|
+
import { r as handleError } from "../../../error-CEdm_AWU.mjs";
|
|
13
|
+
import { T as successEnvelope, _ as deleteResponseSchema, a as notFoundPruneBody, d as redirectsListQuery, f as updateRedirectBody, i as notFoundListResponseSchema, l as redirectListResponseSchema, m as apiErrorSchema, r as notFoundListQuery, s as notFoundSummaryResponseSchema, t as createRedirectBody, u as redirectSchema, x as mediaDeleteResponseSchema } from "../../../redirects-D4EWeXAo.mjs";
|
|
14
|
+
import { $ as activateBlockTypeVersionBody, A as createSectionBody, At as contentItemSchema, B as taxonomyDefTranslationsSchema, C as searchQuery, Ct as updateCollectionBody, D as searchSuggestQuery, Dt as contentCompareResponseSchema, Et as contentAuthorsResponseSchema, Ft as contentResponseSchema, G as termListResponseSchema, Gt as contentTrashQuery, H as taxonomyResponseSchema, Ht as contentTermsResponseSchema, It as contentRestoreResponseSchema, K as termReorderResponseSchema, Kt as contentUpdateBody, L as createTermBody, Lt as contentRevisionConditionBody, M as sectionSchema, Mt as contentListResponseSchema, N as sectionsListQuery, O as settingsUpdateBody, Ot as contentCreateBody, P as updateSectionBody, Pt as contentPublishBody, Q as updateTermBody, R as reorderTermsBody, Rt as contentScheduleBody, S as searchEnableBody, St as updateBlockTypeBody, T as searchResponseSchema, U as termGetResponseSchema, V as taxonomyListResponseSchema, Vt as contentTermsBody, W as termListQuery, Wt as contentTranslationsResponseSchema, Yt as trashedContentListResponseSchema, Z as updateTaxonomyDefBody, _ as userDetailSchema, a as entryLockStatusSchema, at as collectionGetQuery, b as userUpdateBody, c as createWidgetBody, ct as collectionResponseSchema, d as widgetAreaSchema, dt as createBlockTypeBody, f as widgetAreaWithWidgetsAndCountSchema, ft as createCollectionBody, g as allowedDomainUpdateBody, gt as fieldResponseSchema, h as allowedDomainCreateBody, ht as fieldReorderBody, i as entryLockReleaseResponseSchema, j as sectionListResponseSchema, jt as contentListQuery, k as siteSettingsSchema, l as reorderWidgetsBody, m as widgetSchema, mt as fieldListResponseSchema, nt as blockTypeResponseSchema, o as entryMutationConflictSchema, ot as collectionListResponseSchema, p as widgetAreaWithWidgetsSchema, pt as createFieldBody, q as termResponseSchema, s as createWidgetAreaBody, st as collectionReorderBody, t as entryLockAcquireBody, tt as blockTypeListResponseSchema, u as updateWidgetBody, ut as collectionWithFieldsResponseSchema, v as userListResponseSchema, vt as orphanRegisterBody, w as searchRebuildBody, wt as updateFieldBody, x as usersListQuery, y as userSchema, yt as orphanedTableListResponseSchema } from "../../../entry-lock-PP1JCXBB.mjs";
|
|
15
|
+
import { $ as mediaUsageProgressSchema, B as mediaUsageCollectionDeletionListQuery, C as mediaReplaceBody, D as mediaStreamUploadResponseSchema, E as mediaResponseSchema, F as mediaUsageActivationAdvanceResponseSchema, I as mediaUsageActivationConflictSchema, J as mediaUsageDetailsQuery, M as mediaUploadUrlBody, N as mediaUploadUrlResponseSchema, O as mediaUpdateBody, P as mediaUsageActivationAdvanceBody, Q as mediaUsageProgressAdvanceResponseSchema, R as mediaUsageActivationStatusSchema, S as mediaReadResponseSchema, T as mediaReplaceResponseSchema, U as mediaUsageCollectionDeletionRetryBody, V as mediaUsageCollectionDeletionListResponseSchema, W as mediaUsageCollectionDeletionRetryResponseSchema, Y as mediaUsageDetailsResponseSchema, a as mediaConfirmResponseSchema, c as mediaFolderBody, ct as mediaUsageWorkListQuery, d as mediaFolderListResponseSchema, dt as mediaUsageWorkRetryConflictSchema, et as mediaUsageRepairBody, f as mediaFolderResponseSchema, ft as mediaUsageWorkRetryResponseSchema, g as mediaListQuery, i as mediaConfirmBody, j as mediaUploadResponseSchema, l as mediaFolderIdSchema, lt as mediaUsageWorkListResponseSchema, m as mediaGetQuery, n as DEFAULT_MAX_UPLOAD_SIZE, nt as mediaUsageRepairResponseSchema, o as mediaDirectUploadBody, s as mediaExistingResponseSchema, u as mediaFolderListQuery, ut as mediaUsageWorkRetryBody, v as mediaListReadResponseSchema, y as mediaListResponseSchema } from "../../../media-D1z_jisb.mjs";
|
|
16
|
+
import { a as commentListQuery, c as createCommentBody, i as commentCountsResponseSchema, n as commentBulkBody, o as commentSchema, r as commentBulkResponseSchema, s as commentStatusBody, t as adminCommentListResponseSchema, u as publicCommentListResponseSchema } from "../../../comments-BRtp992B.mjs";
|
|
17
|
+
import { a as menuListItemSchema, c as menuWithItemsSchema, d as updateMenuBody, f as updateMenuItemBody, l as reorderMenuItemsBody, n as createMenuItemBody, r as menuItemSchema, t as createMenuBody } from "../../../menus-BQKqf0Up.mjs";
|
|
18
|
+
import "../../../status-D39Fpy8R.mjs";
|
|
19
|
+
import "../../../kinds-BKu9nb7q.mjs";
|
|
20
|
+
import "../../../transformations-BLzqMnpY.mjs";
|
|
21
|
+
import "../../../version-BwEGkqkx.mjs";
|
|
22
|
+
import "../../../approvals-quy61IC4.mjs";
|
|
23
|
+
import "../../../plan-D8s1n84S.mjs";
|
|
24
|
+
import { _ as transferOperationListResponseSchema, a as transferCapabilitiesSchema, c as transferFileUploadResponseSchema, d as transferImportCreateResponseSchema, f as transferImportExecuteBody, g as transferMissingFilesResponseSchema, h as transferImportStatusResponseSchema, i as transferApprovalResponseSchema, l as transferImportAnalyzeBody, m as transferImportReceiptResponseSchema, n as transferApprovalListQuery, o as transferExportCreateBody, p as transferImportPlanResponseSchema, r as transferApprovalListResponseSchema, s as transferExportCreateResponseSchema, t as transferAdvanceResponseSchema, u as transferImportAnalyzeResponseSchema, v as transferOperationResponseSchema, y as transferPaginationQuery } from "../../../transfer-CzdXsFRx.mjs";
|
|
25
|
+
import { z } from "zod";
|
|
26
|
+
import { globalRegistry } from "zod/v4/core";
|
|
27
|
+
import { globalRegistry as globalRegistry$1, object, registry, toJSONSchema } from "zod/v4";
|
|
28
|
+
|
|
29
|
+
//#region ../../node_modules/.pnpm/zod-openapi@5.4.6_zod@4.5.4/node_modules/zod-openapi/dist/components-DiNDbisK.mjs
|
|
30
|
+
const isAnyZodType = (schema) => typeof schema === "object" && schema !== null && "_zod" in schema;
|
|
31
|
+
const createExamples = (examples, registry$1, path) => {
|
|
32
|
+
if (!examples) return;
|
|
33
|
+
const examplesObject = {};
|
|
34
|
+
for (const [name, example] of Object.entries(examples)) examplesObject[name] = registry$1.addExample(example, [...path, name]);
|
|
35
|
+
return examplesObject;
|
|
36
|
+
};
|
|
37
|
+
const createMediaTypeObject = (mediaType, ctx, path) => {
|
|
38
|
+
const { schema, examples, ...rest } = mediaType;
|
|
39
|
+
const mediaTypeObject = rest;
|
|
40
|
+
if (isAnyZodType(schema)) mediaTypeObject.schema = ctx.registry.addSchema(schema, [...path, "schema"], {
|
|
41
|
+
io: ctx.io,
|
|
42
|
+
source: { type: "mediaType" }
|
|
43
|
+
});
|
|
44
|
+
else mediaTypeObject.schema = schema;
|
|
45
|
+
if (examples) mediaTypeObject.examples = createExamples(examples, ctx.registry, [...path, "examples"]);
|
|
46
|
+
return mediaTypeObject;
|
|
47
|
+
};
|
|
48
|
+
const createContent = (content, ctx, path) => {
|
|
49
|
+
const contentObject = {};
|
|
50
|
+
for (const [mediaType, mediaTypeObject] of Object.entries(content)) if (mediaTypeObject) contentObject[mediaType] = createMediaTypeObject(mediaTypeObject, ctx, [...path, mediaType]);
|
|
51
|
+
return contentObject;
|
|
52
|
+
};
|
|
53
|
+
const unwrapZodObject = (zodType, io, path) => {
|
|
54
|
+
const def = zodType._zod.def;
|
|
55
|
+
switch (def.type) {
|
|
56
|
+
case "object": return zodType;
|
|
57
|
+
case "lazy": return unwrapZodObject(def.getter(), io, path);
|
|
58
|
+
case "pipe":
|
|
59
|
+
if (io === "input") return unwrapZodObject(def.in, io, path);
|
|
60
|
+
return unwrapZodObject(def.out, io, path);
|
|
61
|
+
}
|
|
62
|
+
throw new Error(`Failed to unwrap ZodObject from type: ${zodType._zod.def.type} at ${path.join(" > ")}`);
|
|
63
|
+
};
|
|
64
|
+
const isRequired = (zodType, io) => {
|
|
65
|
+
if (io === "input") return zodType._zod.optin === void 0;
|
|
66
|
+
return zodType._zod.optout === void 0;
|
|
67
|
+
};
|
|
68
|
+
const createHeaders = (headers, registry$1, path) => {
|
|
69
|
+
if (!headers) return;
|
|
70
|
+
if (isAnyZodType(headers)) {
|
|
71
|
+
const zodObject = unwrapZodObject(headers, "output", path);
|
|
72
|
+
const headersObject = {};
|
|
73
|
+
for (const [key, zodSchema] of Object.entries(zodObject._zod.def.shape)) headersObject[key] = registry$1.addHeader(zodSchema, [...path, key]);
|
|
74
|
+
return headersObject;
|
|
75
|
+
}
|
|
76
|
+
return headers;
|
|
77
|
+
};
|
|
78
|
+
const createLinks = (links, registry$1, path) => {
|
|
79
|
+
if (!links) return;
|
|
80
|
+
const linksObject = {};
|
|
81
|
+
for (const [name, link] of Object.entries(links)) linksObject[name] = registry$1.addLink(link, [...path, name]);
|
|
82
|
+
return linksObject;
|
|
83
|
+
};
|
|
84
|
+
const createManualParameters = (parameters, registry$1, path) => {
|
|
85
|
+
if (!parameters) return;
|
|
86
|
+
const parameterObjects = [];
|
|
87
|
+
for (const parameter of parameters) {
|
|
88
|
+
if (isAnyZodType(parameter)) {
|
|
89
|
+
const paramObject = registry$1.addParameter(parameter, [...path, "parameters"]);
|
|
90
|
+
parameterObjects.push(paramObject);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
parameterObjects.push(parameter);
|
|
94
|
+
}
|
|
95
|
+
return parameterObjects;
|
|
96
|
+
};
|
|
97
|
+
const createParameters = (requestParams, registry$1, path) => {
|
|
98
|
+
if (!requestParams) return;
|
|
99
|
+
const parameterObjects = [];
|
|
100
|
+
for (const [location, schema] of Object.entries(requestParams ?? {})) {
|
|
101
|
+
const zodObject = unwrapZodObject(schema, "input", path);
|
|
102
|
+
for (const [name, zodSchema] of Object.entries(zodObject._zod.def.shape)) {
|
|
103
|
+
const paramObject = registry$1.addParameter(zodSchema, [
|
|
104
|
+
...path,
|
|
105
|
+
location,
|
|
106
|
+
name
|
|
107
|
+
], { location: {
|
|
108
|
+
in: location,
|
|
109
|
+
name
|
|
110
|
+
} });
|
|
111
|
+
parameterObjects.push(paramObject);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return parameterObjects;
|
|
115
|
+
};
|
|
116
|
+
const isISpecificationExtension = (key) => key.startsWith("x-");
|
|
117
|
+
const createCallbacks = (callbacks, registry$1, path) => {
|
|
118
|
+
if (!callbacks) return;
|
|
119
|
+
const callbacksObject = {};
|
|
120
|
+
for (const [name, value] of Object.entries(callbacks)) {
|
|
121
|
+
if (isISpecificationExtension(name)) {
|
|
122
|
+
callbacksObject[name] = value;
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
callbacksObject[name] = registry$1.addCallback(value, [...path, name]);
|
|
126
|
+
}
|
|
127
|
+
return callbacksObject;
|
|
128
|
+
};
|
|
129
|
+
const createResponses = (responses, registry$1, path) => {
|
|
130
|
+
if (!responses) return;
|
|
131
|
+
const responsesObject = {};
|
|
132
|
+
for (const [statusCode, response] of Object.entries(responses)) {
|
|
133
|
+
if (!response) continue;
|
|
134
|
+
if (isISpecificationExtension(statusCode)) {
|
|
135
|
+
responsesObject[statusCode] = response;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if ("$ref" in response) {
|
|
139
|
+
responsesObject[statusCode] = response;
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
responsesObject[statusCode] = registry$1.addResponse(response, [...path, statusCode]);
|
|
143
|
+
}
|
|
144
|
+
return responsesObject;
|
|
145
|
+
};
|
|
146
|
+
const createOperation = (operation, registry$1, path) => {
|
|
147
|
+
const { parameters, requestParams, requestBody, responses, callbacks, ...rest } = operation;
|
|
148
|
+
const operationObject = rest;
|
|
149
|
+
const maybeManualParameters = createManualParameters(parameters, registry$1, [...path, "parameters"]);
|
|
150
|
+
const maybeRequestParams = createParameters(requestParams, registry$1, [...path, "requestParams"]);
|
|
151
|
+
if (maybeRequestParams || maybeManualParameters) operationObject.parameters = [...maybeRequestParams ?? [], ...maybeManualParameters ?? []];
|
|
152
|
+
const maybeRequestBody = requestBody && registry$1.addRequestBody(requestBody, path);
|
|
153
|
+
if (maybeRequestBody) operationObject.requestBody = maybeRequestBody;
|
|
154
|
+
const maybeResponses = createResponses(responses, registry$1, [...path, "responses"]);
|
|
155
|
+
if (maybeResponses) operationObject.responses = maybeResponses;
|
|
156
|
+
const maybeCallbacks = createCallbacks(callbacks, registry$1, [...path, "callbacks"]);
|
|
157
|
+
if (maybeCallbacks) operationObject.callbacks = maybeCallbacks;
|
|
158
|
+
return operationObject;
|
|
159
|
+
};
|
|
160
|
+
const createPaths = (paths, registry$1, path) => {
|
|
161
|
+
if (!paths) return;
|
|
162
|
+
const pathsObject = {};
|
|
163
|
+
for (const [singlePath, pathItemObject] of Object.entries(paths)) {
|
|
164
|
+
if (isISpecificationExtension(singlePath)) {
|
|
165
|
+
pathsObject[singlePath] = pathItemObject;
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
pathsObject[singlePath] = registry$1.addPathItem(pathItemObject, [...path, singlePath]);
|
|
169
|
+
}
|
|
170
|
+
return pathsObject;
|
|
171
|
+
};
|
|
172
|
+
const openApiVersions = [
|
|
173
|
+
"3.0.0",
|
|
174
|
+
"3.0.1",
|
|
175
|
+
"3.0.2",
|
|
176
|
+
"3.0.3",
|
|
177
|
+
"3.1.0",
|
|
178
|
+
"3.1.1"
|
|
179
|
+
];
|
|
180
|
+
const satisfiesVersion = (test, against) => openApiVersions.indexOf(test) >= openApiVersions.indexOf(against);
|
|
181
|
+
const override = (ctx) => {
|
|
182
|
+
const def = ctx.zodSchema._zod.def;
|
|
183
|
+
switch (def.type) {
|
|
184
|
+
case "bigint":
|
|
185
|
+
ctx.jsonSchema.type = "integer";
|
|
186
|
+
ctx.jsonSchema.format = "int64";
|
|
187
|
+
break;
|
|
188
|
+
case "union": {
|
|
189
|
+
if ("discriminator" in def && typeof def.discriminator === "string") {
|
|
190
|
+
ctx.jsonSchema.oneOf ??= ctx.jsonSchema.anyOf;
|
|
191
|
+
delete ctx.jsonSchema.anyOf;
|
|
192
|
+
ctx.jsonSchema.type = "object";
|
|
193
|
+
ctx.jsonSchema.discriminator = { propertyName: def.discriminator };
|
|
194
|
+
const mapping = {};
|
|
195
|
+
for (const [index, obj] of Object.entries(ctx.jsonSchema.oneOf)) {
|
|
196
|
+
const ref = obj.$ref;
|
|
197
|
+
if (!ref) {
|
|
198
|
+
delete ctx.jsonSchema.discriminator;
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const discriminatorValues = def.options[Number(index)]._zod.propValues?.[def.discriminator];
|
|
202
|
+
if (!discriminatorValues?.size) return;
|
|
203
|
+
for (const value of [...discriminatorValues ?? []]) {
|
|
204
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") return;
|
|
205
|
+
mapping[String(value)] = ref;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
ctx.jsonSchema.discriminator.mapping = mapping;
|
|
209
|
+
}
|
|
210
|
+
const meta = globalRegistry$1.get(ctx.zodSchema);
|
|
211
|
+
if (typeof meta?.unionOneOf === "boolean") {
|
|
212
|
+
if (meta.unionOneOf) {
|
|
213
|
+
ctx.jsonSchema.oneOf = ctx.jsonSchema.anyOf;
|
|
214
|
+
delete ctx.jsonSchema.anyOf;
|
|
215
|
+
}
|
|
216
|
+
delete ctx.jsonSchema.unionOneOf;
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
case "date":
|
|
221
|
+
ctx.jsonSchema.type = "string";
|
|
222
|
+
break;
|
|
223
|
+
case "literal":
|
|
224
|
+
if (def.values.includes(void 0)) break;
|
|
225
|
+
break;
|
|
226
|
+
case "undefined":
|
|
227
|
+
ctx.jsonSchema.not = {};
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
const validate = (ctx, opts, previousContext) => {
|
|
232
|
+
if (previousContext.context && ctx.zodSchema._zod.parent !== previousContext.context.zodSchema) {
|
|
233
|
+
if (previousContext.context.zodSchema._zod.def.type === "pipe") throw new Error(`Zod transform found at ${previousContext.context.path.join(" > ")} are not supported in output schemas. Please use \`.overwrite()\` or wrap the schema in a \`.pipe()\` or assign it manual metadata with \`.meta()\``);
|
|
234
|
+
throw new Error(`Zod schema of type \`${previousContext.context.zodSchema._zod.def.type}\` at ${previousContext.context?.path.join(" > ")} cannot be represented in OpenAPI. Please assign it metadata with \`.meta()\``);
|
|
235
|
+
}
|
|
236
|
+
previousContext.context = void 0;
|
|
237
|
+
if (Object.keys(ctx.jsonSchema).length) return;
|
|
238
|
+
const def = ctx.zodSchema._zod.def;
|
|
239
|
+
const allowEmptySchema = opts.allowEmptySchema?.[def.type];
|
|
240
|
+
if (allowEmptySchema === true || allowEmptySchema?.[ctx.io]) return;
|
|
241
|
+
switch (def.type) {
|
|
242
|
+
case "optional":
|
|
243
|
+
validate({
|
|
244
|
+
...ctx,
|
|
245
|
+
zodSchema: def.innerType
|
|
246
|
+
}, opts, previousContext);
|
|
247
|
+
return;
|
|
248
|
+
case "any": return;
|
|
249
|
+
case "unknown": return;
|
|
250
|
+
case "pipe":
|
|
251
|
+
if (ctx.io === "output") {
|
|
252
|
+
if (!ctx.zodSchema._zod.parent) {
|
|
253
|
+
previousContext.context = ctx;
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return;
|
|
258
|
+
case "transform":
|
|
259
|
+
if (ctx.io === "output") return;
|
|
260
|
+
break;
|
|
261
|
+
case "literal":
|
|
262
|
+
if (def.values.includes(void 0)) throw new Error(`Zod literal at ${ctx.path.join(" > ")} cannot include \`undefined\` as a value. Please use \`z.undefined()\` or \`.optional()\` instead.`);
|
|
263
|
+
return;
|
|
264
|
+
case "custom": if (!ctx.zodSchema._zod.parent) {
|
|
265
|
+
previousContext.context = ctx;
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
throw new Error(`Zod schema of type \`${def.type}\` at ${ctx.path.join(" > ")} cannot be represented in OpenAPI. Please assign it metadata with \`.meta()\``);
|
|
270
|
+
};
|
|
271
|
+
const renameComponents = (components, outputIds, ctx, refPath) => {
|
|
272
|
+
const componentsToRename = /* @__PURE__ */ new Map();
|
|
273
|
+
if (ctx.io === "input") return componentsToRename;
|
|
274
|
+
const componentDependencies = /* @__PURE__ */ new Map();
|
|
275
|
+
const stringifiedComponents = /* @__PURE__ */ new Map();
|
|
276
|
+
for (const [key, value] of Object.entries(components)) {
|
|
277
|
+
const stringified = JSON.stringify(value);
|
|
278
|
+
const regex = new RegExp(`"${refPath}([^"]+)"`, "g");
|
|
279
|
+
const matches = stringified.matchAll(regex);
|
|
280
|
+
const dependencies = /* @__PURE__ */ new Set();
|
|
281
|
+
for (const match of matches) {
|
|
282
|
+
const dep = match[1];
|
|
283
|
+
if (dep !== key) dependencies.add(dep);
|
|
284
|
+
}
|
|
285
|
+
stringifiedComponents.set(key, stringified);
|
|
286
|
+
componentDependencies.set(key, { dependencies });
|
|
287
|
+
}
|
|
288
|
+
for (const [key] of stringifiedComponents) {
|
|
289
|
+
if (!ctx.registry.components.schemas.ids.get(key)) continue;
|
|
290
|
+
if (isDependencyPure(componentDependencies, stringifiedComponents, ctx.registry, key)) continue;
|
|
291
|
+
const newName = outputIds.get(key) ?? `${key}${ctx.opts.outputIdSuffix ?? "Output"}`;
|
|
292
|
+
componentsToRename.set(key, newName);
|
|
293
|
+
components[newName] = components[key];
|
|
294
|
+
delete components[key];
|
|
295
|
+
}
|
|
296
|
+
return componentsToRename;
|
|
297
|
+
};
|
|
298
|
+
const isDependencyPure = (componentDependencies, stringifiedComponents, registry$1, key, visited = /* @__PURE__ */ new Set()) => {
|
|
299
|
+
if (visited.has(key)) return true;
|
|
300
|
+
const dependencies = componentDependencies.get(key);
|
|
301
|
+
if (dependencies.pure !== void 0) return dependencies.pure;
|
|
302
|
+
const stringified = stringifiedComponents.get(key);
|
|
303
|
+
const component = registry$1.components.schemas.ids.get(key);
|
|
304
|
+
if (component && stringified !== JSON.stringify(component)) {
|
|
305
|
+
dependencies.pure = false;
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
visited.add(key);
|
|
309
|
+
const result = [...dependencies.dependencies].every((dep) => isDependencyPure(componentDependencies, stringifiedComponents, registry$1, dep, new Set(visited)));
|
|
310
|
+
dependencies.pure = result;
|
|
311
|
+
return result;
|
|
312
|
+
};
|
|
313
|
+
const zodOpenApiMetadataFields = [
|
|
314
|
+
"param",
|
|
315
|
+
"header",
|
|
316
|
+
"unusedIO",
|
|
317
|
+
"override",
|
|
318
|
+
"outputId"
|
|
319
|
+
];
|
|
320
|
+
const deleteZodOpenApiMeta = (jsonSchema) => {
|
|
321
|
+
zodOpenApiMetadataFields.forEach((field) => {
|
|
322
|
+
delete jsonSchema[field];
|
|
323
|
+
});
|
|
324
|
+
};
|
|
325
|
+
const deleteInvalidJsonSchemaFields = (jsonSchema) => {
|
|
326
|
+
delete jsonSchema.$schema;
|
|
327
|
+
delete jsonSchema.id;
|
|
328
|
+
delete jsonSchema.$id;
|
|
329
|
+
};
|
|
330
|
+
const createSchemas = (schemas, ctx) => {
|
|
331
|
+
const refPath = ctx.opts.schemaRefPath ?? "#/components/schemas/";
|
|
332
|
+
const entries = {};
|
|
333
|
+
for (const [name, { zodType }] of Object.entries(schemas)) entries[name] = zodType;
|
|
334
|
+
const zodRegistry = registry();
|
|
335
|
+
zodRegistry.add(object(entries), { id: "zodOpenApiCreateSchema" });
|
|
336
|
+
for (const [id, { zodType }] of ctx.registry.components.schemas.manual) zodRegistry.add(zodType, { id });
|
|
337
|
+
const outputIds = /* @__PURE__ */ new Map();
|
|
338
|
+
const defsName = satisfiesVersion(ctx.openapiVersion ?? "3.1.0", "3.1.0") ? "$defs" : "definitions";
|
|
339
|
+
const previousContext = {};
|
|
340
|
+
const jsonSchema = toJSONSchema(zodRegistry, {
|
|
341
|
+
override(context) {
|
|
342
|
+
const meta = globalRegistry$1.get(context.zodSchema);
|
|
343
|
+
if (meta?.outputId && meta?.id) outputIds.set(meta.id, meta.outputId);
|
|
344
|
+
if (context.jsonSchema.$ref) return;
|
|
345
|
+
const enrichedContext = {
|
|
346
|
+
...context,
|
|
347
|
+
io: ctx.io
|
|
348
|
+
};
|
|
349
|
+
override(enrichedContext);
|
|
350
|
+
if (typeof ctx.opts.override === "function") ctx.opts.override(enrichedContext);
|
|
351
|
+
if (typeof meta?.override === "function") {
|
|
352
|
+
meta.override(enrichedContext);
|
|
353
|
+
delete context.jsonSchema.override;
|
|
354
|
+
}
|
|
355
|
+
if (typeof meta?.override === "object" && meta.override !== null) {
|
|
356
|
+
Object.assign(context.jsonSchema, meta.override);
|
|
357
|
+
delete context.jsonSchema.override;
|
|
358
|
+
}
|
|
359
|
+
deleteInvalidJsonSchemaFields(context.jsonSchema);
|
|
360
|
+
deleteZodOpenApiMeta(context.jsonSchema);
|
|
361
|
+
validate(enrichedContext, ctx.opts, previousContext);
|
|
362
|
+
},
|
|
363
|
+
io: ctx.io,
|
|
364
|
+
unrepresentable: "any",
|
|
365
|
+
reused: ctx.opts.reused,
|
|
366
|
+
cycles: ctx.opts.cycles,
|
|
367
|
+
target: satisfiesVersion(ctx.openapiVersion ?? "3.1.0", "3.1.0") ? void 0 : "openapi-3.0",
|
|
368
|
+
uri: (id) => id === "__shared" ? `#ZOD_OPENAPI/${id}` : `#ZOD_OPENAPI/__shared#/${defsName}/${id}`
|
|
369
|
+
});
|
|
370
|
+
const components = jsonSchema.schemas.__shared?.[defsName] ?? {};
|
|
371
|
+
jsonSchema.schemas.__shared ??= { [defsName]: components };
|
|
372
|
+
const dynamicComponents = /* @__PURE__ */ new Map();
|
|
373
|
+
for (const [key, value] of Object.entries(components)) {
|
|
374
|
+
deleteInvalidJsonSchemaFields(value);
|
|
375
|
+
if (/^schema\d+$/.test(key)) {
|
|
376
|
+
const newName = `__schema${ctx.registry.components.schemas.dynamicSchemaCount++}`;
|
|
377
|
+
dynamicComponents.set(key, `"${refPath}${newName}"`);
|
|
378
|
+
if (newName !== key) {
|
|
379
|
+
components[newName] = value;
|
|
380
|
+
delete components[key];
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
for (const [key] of ctx.registry.components.schemas.manual) {
|
|
385
|
+
const manualComponent = jsonSchema.schemas[key];
|
|
386
|
+
if (!manualComponent) continue;
|
|
387
|
+
deleteInvalidJsonSchemaFields(manualComponent);
|
|
388
|
+
}
|
|
389
|
+
const manualUsed = {};
|
|
390
|
+
const parsedJsonSchema = JSON.parse(JSON.stringify(jsonSchema).replace(/"#ZOD_OPENAPI\/__shared#\/(?:\$defs|definitions)\/([^"]+)"/g, (_, match) => {
|
|
391
|
+
const dynamic = dynamicComponents.get(match);
|
|
392
|
+
if (dynamic) return dynamic;
|
|
393
|
+
if (ctx.registry.components.schemas.manual.get(match)) manualUsed[match] = true;
|
|
394
|
+
return `"${refPath}${match}"`;
|
|
395
|
+
}));
|
|
396
|
+
const parsedComponents = parsedJsonSchema.schemas.__shared?.[defsName] ?? {};
|
|
397
|
+
parsedJsonSchema.schemas.__shared ??= { [defsName]: parsedComponents };
|
|
398
|
+
for (const [key] of ctx.registry.components.schemas.manual) {
|
|
399
|
+
const manualComponent = parsedJsonSchema.schemas[key];
|
|
400
|
+
if (!manualComponent) continue;
|
|
401
|
+
if (manualUsed[key]) {
|
|
402
|
+
if (parsedComponents[key]) throw new Error(`Component "${key}" is already registered as a component in the registry`);
|
|
403
|
+
parsedComponents[key] = manualComponent;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
const componentsToRename = renameComponents(parsedComponents, outputIds, ctx, refPath);
|
|
407
|
+
if (!componentsToRename.size) {
|
|
408
|
+
const parsedSchemas = parsedJsonSchema.schemas.zodOpenApiCreateSchema?.properties;
|
|
409
|
+
delete parsedJsonSchema.schemas.zodOpenApiCreateSchema;
|
|
410
|
+
delete parsedJsonSchema.schemas.__shared;
|
|
411
|
+
return {
|
|
412
|
+
schemas: parsedSchemas,
|
|
413
|
+
components: parsedComponents,
|
|
414
|
+
manual: parsedJsonSchema.schemas
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
const renamedJsonSchema = JSON.parse(JSON.stringify(parsedJsonSchema).replace(new RegExp(`"${refPath}([^"]+)"`, "g"), (_, match) => {
|
|
418
|
+
const replacement = componentsToRename.get(match);
|
|
419
|
+
if (replacement) return `"${refPath}${replacement}"`;
|
|
420
|
+
return `"${refPath}${match}"`;
|
|
421
|
+
}));
|
|
422
|
+
const renamedSchemas = renamedJsonSchema.schemas.zodOpenApiCreateSchema?.properties;
|
|
423
|
+
const renamedComponents = renamedJsonSchema.schemas.__shared?.[defsName] ?? {};
|
|
424
|
+
delete renamedJsonSchema.schemas.zodOpenApiCreateSchema;
|
|
425
|
+
delete renamedJsonSchema.schemas.__shared;
|
|
426
|
+
return {
|
|
427
|
+
schemas: renamedSchemas,
|
|
428
|
+
components: renamedComponents,
|
|
429
|
+
manual: renamedJsonSchema.schemas
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
const createRegistry = (components) => {
|
|
433
|
+
const registry$1 = {
|
|
434
|
+
components: {
|
|
435
|
+
schemas: {
|
|
436
|
+
dynamicSchemaCount: 0,
|
|
437
|
+
input: /* @__PURE__ */ new Map(),
|
|
438
|
+
output: /* @__PURE__ */ new Map(),
|
|
439
|
+
ids: /* @__PURE__ */ new Map(),
|
|
440
|
+
manual: /* @__PURE__ */ new Map()
|
|
441
|
+
},
|
|
442
|
+
headers: {
|
|
443
|
+
ids: /* @__PURE__ */ new Map(),
|
|
444
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
445
|
+
},
|
|
446
|
+
requestBodies: {
|
|
447
|
+
ids: /* @__PURE__ */ new Map(),
|
|
448
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
449
|
+
},
|
|
450
|
+
responses: {
|
|
451
|
+
ids: /* @__PURE__ */ new Map(),
|
|
452
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
453
|
+
},
|
|
454
|
+
parameters: {
|
|
455
|
+
ids: /* @__PURE__ */ new Map(),
|
|
456
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
457
|
+
},
|
|
458
|
+
callbacks: {
|
|
459
|
+
ids: /* @__PURE__ */ new Map(),
|
|
460
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
461
|
+
},
|
|
462
|
+
pathItems: {
|
|
463
|
+
ids: /* @__PURE__ */ new Map(),
|
|
464
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
465
|
+
},
|
|
466
|
+
securitySchemes: {
|
|
467
|
+
ids: /* @__PURE__ */ new Map(),
|
|
468
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
469
|
+
},
|
|
470
|
+
links: {
|
|
471
|
+
ids: /* @__PURE__ */ new Map(),
|
|
472
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
473
|
+
},
|
|
474
|
+
examples: {
|
|
475
|
+
ids: /* @__PURE__ */ new Map(),
|
|
476
|
+
seen: /* @__PURE__ */ new WeakMap()
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
addSchema: (schema, path, opts) => {
|
|
480
|
+
const schemaObject = {};
|
|
481
|
+
registry$1.components.schemas[opts.io].set(path.join(" > "), {
|
|
482
|
+
schemaObject,
|
|
483
|
+
zodType: schema,
|
|
484
|
+
source: {
|
|
485
|
+
path,
|
|
486
|
+
...opts?.source
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
return schemaObject;
|
|
490
|
+
},
|
|
491
|
+
addParameter: (parameter, path, opts) => {
|
|
492
|
+
const seenParameter = registry$1.components.parameters.seen.get(parameter);
|
|
493
|
+
if (seenParameter) return seenParameter;
|
|
494
|
+
const meta = globalRegistry.get(parameter);
|
|
495
|
+
const name = opts?.location?.name ?? meta?.param?.name;
|
|
496
|
+
const inLocation = opts?.location?.in ?? meta?.param?.in;
|
|
497
|
+
if (opts?.location?.name && meta?.param?.name || opts?.location?.in && meta?.param?.in) throw new Error(`Parameter at ${path.join(" > ")} has both \`.meta({ param: { name, in } })\` and \`.meta({ param: { location: { in, name } } })\` information`);
|
|
498
|
+
if (!name || !inLocation) throw new Error(`Parameter at ${path.join(" > ")} is missing \`.meta({ param: { name, in } })\` information`);
|
|
499
|
+
const schemaObject = registry$1.addSchema(parameter, [
|
|
500
|
+
...path,
|
|
501
|
+
inLocation,
|
|
502
|
+
name,
|
|
503
|
+
"schema"
|
|
504
|
+
], {
|
|
505
|
+
io: "input",
|
|
506
|
+
source: {
|
|
507
|
+
type: "parameter",
|
|
508
|
+
location: {
|
|
509
|
+
in: inLocation,
|
|
510
|
+
name
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
const { id: metaId, examples, ...rest } = meta?.param ?? {};
|
|
515
|
+
const parameterObject = {
|
|
516
|
+
in: inLocation,
|
|
517
|
+
name,
|
|
518
|
+
schema: schemaObject,
|
|
519
|
+
...rest
|
|
520
|
+
};
|
|
521
|
+
const examplesObject = createExamples(examples, registry$1, [
|
|
522
|
+
...path,
|
|
523
|
+
inLocation,
|
|
524
|
+
name,
|
|
525
|
+
"examples"
|
|
526
|
+
]);
|
|
527
|
+
if (examplesObject) parameterObject.examples = examplesObject;
|
|
528
|
+
if (isRequired(parameter, "input")) parameterObject.required = true;
|
|
529
|
+
if (!parameterObject.description && meta?.description) parameterObject.description = meta.description;
|
|
530
|
+
const id = metaId ?? opts?.manualId;
|
|
531
|
+
if (id) {
|
|
532
|
+
if (registry$1.components.parameters.ids.has(id)) throw new Error(`Schema "${id}" at ${path.join(" > ")} is already registered`);
|
|
533
|
+
const ref = { $ref: `#/components/parameters/${id}` };
|
|
534
|
+
registry$1.components.parameters.seen.set(parameter, ref);
|
|
535
|
+
registry$1.components.parameters.ids.set(id, parameterObject);
|
|
536
|
+
if (opts?.manualId) return parameterObject;
|
|
537
|
+
return ref;
|
|
538
|
+
}
|
|
539
|
+
if (opts?.location?.name || opts?.location?.in) return parameterObject;
|
|
540
|
+
registry$1.components.parameters.seen.set(parameter, parameterObject);
|
|
541
|
+
return parameterObject;
|
|
542
|
+
},
|
|
543
|
+
addHeader: (header, path, opts) => {
|
|
544
|
+
const seenHeader = registry$1.components.headers.seen.get(header);
|
|
545
|
+
if (seenHeader) return seenHeader;
|
|
546
|
+
const meta = globalRegistry.get(header);
|
|
547
|
+
const { id: metaId, ...rest } = meta?.header ?? {};
|
|
548
|
+
const id = metaId ?? opts?.manualId;
|
|
549
|
+
const headerObject = rest;
|
|
550
|
+
if (isRequired(header, "output")) headerObject.required = true;
|
|
551
|
+
if (!headerObject.description && meta?.description) headerObject.description = meta.description;
|
|
552
|
+
headerObject.schema = registry$1.addSchema(header, [...path, "schema"], {
|
|
553
|
+
io: "output",
|
|
554
|
+
source: { type: "header" }
|
|
555
|
+
});
|
|
556
|
+
if (id) {
|
|
557
|
+
if (registry$1.components.schemas.ids.has(id)) throw new Error(`Schema "${id}" at ${path.join(" > ")} is already registered`);
|
|
558
|
+
const ref = { $ref: `#/components/headers/${id}` };
|
|
559
|
+
registry$1.components.headers.ids.set(id, headerObject);
|
|
560
|
+
registry$1.components.headers.seen.set(header, ref);
|
|
561
|
+
if (opts?.manualId) return headerObject;
|
|
562
|
+
return ref;
|
|
563
|
+
}
|
|
564
|
+
registry$1.components.headers.seen.set(header, headerObject);
|
|
565
|
+
return headerObject;
|
|
566
|
+
},
|
|
567
|
+
addRequestBody: (requestBody, path, opts) => {
|
|
568
|
+
const seenRequestBody = registry$1.components.requestBodies.seen.get(requestBody);
|
|
569
|
+
if (seenRequestBody) return seenRequestBody;
|
|
570
|
+
const { content, id: metaId, ...rest } = requestBody;
|
|
571
|
+
const requestBodyObject = {
|
|
572
|
+
...rest,
|
|
573
|
+
content: createContent(content, {
|
|
574
|
+
registry: registry$1,
|
|
575
|
+
io: "input"
|
|
576
|
+
}, [...path, "content"])
|
|
577
|
+
};
|
|
578
|
+
const id = metaId ?? opts?.manualId;
|
|
579
|
+
if (id) {
|
|
580
|
+
if (registry$1.components.requestBodies.ids.has(id)) throw new Error(`RequestBody "${id}" at ${path.join(" > ")} is already registered`);
|
|
581
|
+
const ref = { $ref: `#/components/requestBodies/${id}` };
|
|
582
|
+
registry$1.components.requestBodies.ids.set(id, requestBodyObject);
|
|
583
|
+
registry$1.components.requestBodies.seen.set(requestBody, ref);
|
|
584
|
+
if (opts?.manualId) return requestBodyObject;
|
|
585
|
+
return ref;
|
|
586
|
+
}
|
|
587
|
+
registry$1.components.requestBodies.seen.set(requestBody, requestBodyObject);
|
|
588
|
+
return requestBodyObject;
|
|
589
|
+
},
|
|
590
|
+
addPathItem: (pathItem, path, opts) => {
|
|
591
|
+
const seenPathItem = registry$1.components.pathItems.seen.get(pathItem);
|
|
592
|
+
if (seenPathItem) return seenPathItem;
|
|
593
|
+
const pathItemObject = {};
|
|
594
|
+
const { id: metaId, ...rest } = pathItem;
|
|
595
|
+
const id = metaId ?? opts?.manualId;
|
|
596
|
+
for (const [key, value] of Object.entries(rest)) {
|
|
597
|
+
if (isISpecificationExtension(key)) {
|
|
598
|
+
pathItemObject[key] = value;
|
|
599
|
+
continue;
|
|
600
|
+
}
|
|
601
|
+
if (key === "get" || key === "put" || key === "post" || key === "delete" || key === "options" || key === "head" || key === "patch" || key === "trace") {
|
|
602
|
+
pathItemObject[key] = createOperation(value, registry$1, [...path, key]);
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
if (key === "parameters") {
|
|
606
|
+
pathItemObject[key] = createManualParameters(value, registry$1, [...path, key]);
|
|
607
|
+
continue;
|
|
608
|
+
}
|
|
609
|
+
pathItemObject[key] = value;
|
|
610
|
+
}
|
|
611
|
+
if (id) {
|
|
612
|
+
if (registry$1.components.pathItems.ids.has(id)) throw new Error(`PathItem "${id}" at ${path.join(" > ")} is already registered`);
|
|
613
|
+
const ref = { $ref: `#/components/pathItems/${id}` };
|
|
614
|
+
registry$1.components.pathItems.ids.set(id, pathItemObject);
|
|
615
|
+
registry$1.components.pathItems.seen.set(pathItem, ref);
|
|
616
|
+
if (opts?.manualId) return pathItemObject;
|
|
617
|
+
return ref;
|
|
618
|
+
}
|
|
619
|
+
registry$1.components.pathItems.seen.set(pathItem, pathItemObject);
|
|
620
|
+
return pathItemObject;
|
|
621
|
+
},
|
|
622
|
+
addResponse: (response, path, opts) => {
|
|
623
|
+
const seenResponse = registry$1.components.responses.seen.get(response);
|
|
624
|
+
if (seenResponse) return seenResponse;
|
|
625
|
+
const { content, headers, links, id: metaId, ...rest } = response;
|
|
626
|
+
const responseObject = rest;
|
|
627
|
+
const maybeHeaders = createHeaders(headers, registry$1, [...path, "headers"]);
|
|
628
|
+
if (maybeHeaders) responseObject.headers = maybeHeaders;
|
|
629
|
+
if (content) responseObject.content = createContent(content, {
|
|
630
|
+
registry: registry$1,
|
|
631
|
+
io: "output"
|
|
632
|
+
}, [...path, "content"]);
|
|
633
|
+
if (links) responseObject.links = createLinks(links, registry$1, [...path, "links"]);
|
|
634
|
+
const id = metaId ?? opts?.manualId;
|
|
635
|
+
if (id) {
|
|
636
|
+
if (registry$1.components.responses.ids.has(id)) throw new Error(`Response "${id}" at ${path.join(" > ")} is already registered`);
|
|
637
|
+
const ref = { $ref: `#/components/responses/${id}` };
|
|
638
|
+
registry$1.components.responses.ids.set(id, responseObject);
|
|
639
|
+
registry$1.components.responses.seen.set(response, ref);
|
|
640
|
+
if (opts?.manualId) return responseObject;
|
|
641
|
+
return ref;
|
|
642
|
+
}
|
|
643
|
+
registry$1.components.responses.seen.set(response, responseObject);
|
|
644
|
+
return responseObject;
|
|
645
|
+
},
|
|
646
|
+
addCallback: (callback, path, opts) => {
|
|
647
|
+
const seenCallback = registry$1.components.callbacks.seen.get(callback);
|
|
648
|
+
if (seenCallback) return seenCallback;
|
|
649
|
+
const { id: metaId, ...rest } = callback;
|
|
650
|
+
const callbackObject = {};
|
|
651
|
+
for (const [name, pathItem] of Object.entries(rest)) {
|
|
652
|
+
if (isISpecificationExtension(name)) {
|
|
653
|
+
callbackObject[name] = pathItem;
|
|
654
|
+
continue;
|
|
655
|
+
}
|
|
656
|
+
callbackObject[name] = registry$1.addPathItem(pathItem, [...path, name]);
|
|
657
|
+
}
|
|
658
|
+
const id = metaId ?? opts?.manualId;
|
|
659
|
+
if (id) {
|
|
660
|
+
if (registry$1.components.callbacks.ids.has(id)) throw new Error(`Callback "${id}" at ${path.join(" > ")} is already registered`);
|
|
661
|
+
const ref = { $ref: `#/components/callbacks/${id}` };
|
|
662
|
+
registry$1.components.callbacks.ids.set(id, callbackObject);
|
|
663
|
+
registry$1.components.callbacks.seen.set(callback, ref);
|
|
664
|
+
if (opts?.manualId) return callbackObject;
|
|
665
|
+
return ref;
|
|
666
|
+
}
|
|
667
|
+
registry$1.components.callbacks.seen.set(callback, callbackObject);
|
|
668
|
+
return callbackObject;
|
|
669
|
+
},
|
|
670
|
+
addSecurityScheme: (securityScheme, path, opts) => {
|
|
671
|
+
const seenSecurityScheme = registry$1.components.securitySchemes.seen.get(securityScheme);
|
|
672
|
+
if (seenSecurityScheme) return seenSecurityScheme;
|
|
673
|
+
const { id: metaId, ...rest } = securityScheme;
|
|
674
|
+
const securitySchemeObject = rest;
|
|
675
|
+
const id = metaId ?? opts?.manualId;
|
|
676
|
+
if (id) {
|
|
677
|
+
if (registry$1.components.securitySchemes.ids.has(id)) throw new Error(`SecurityScheme "${id}" at ${path.join(" > ")} is already registered`);
|
|
678
|
+
const ref = { $ref: `#/components/securitySchemes/${id}` };
|
|
679
|
+
registry$1.components.securitySchemes.ids.set(id, securitySchemeObject);
|
|
680
|
+
registry$1.components.securitySchemes.seen.set(securityScheme, ref);
|
|
681
|
+
if (opts?.manualId) return securitySchemeObject;
|
|
682
|
+
return ref;
|
|
683
|
+
}
|
|
684
|
+
registry$1.components.securitySchemes.seen.set(securityScheme, securitySchemeObject);
|
|
685
|
+
return securitySchemeObject;
|
|
686
|
+
},
|
|
687
|
+
addLink: (link, path, opts) => {
|
|
688
|
+
const seenLink = registry$1.components.links.seen.get(link);
|
|
689
|
+
if (seenLink) return seenLink;
|
|
690
|
+
const { id: metaId, ...rest } = link;
|
|
691
|
+
const linkObject = rest;
|
|
692
|
+
const id = metaId ?? opts?.manualId;
|
|
693
|
+
if (id) {
|
|
694
|
+
if (registry$1.components.links.ids.has(id)) throw new Error(`Link "${id}" at ${path.join(" > ")} is already registered`);
|
|
695
|
+
const ref = { $ref: `#/components/links/${id}` };
|
|
696
|
+
registry$1.components.links.ids.set(id, linkObject);
|
|
697
|
+
registry$1.components.links.seen.set(link, ref);
|
|
698
|
+
if (opts?.manualId) return linkObject;
|
|
699
|
+
return ref;
|
|
700
|
+
}
|
|
701
|
+
registry$1.components.links.seen.set(link, linkObject);
|
|
702
|
+
return linkObject;
|
|
703
|
+
},
|
|
704
|
+
addExample: (example, path, opts) => {
|
|
705
|
+
const seenExample = registry$1.components.examples.seen.get(example);
|
|
706
|
+
if (seenExample) return seenExample;
|
|
707
|
+
const { id: metaId, ...rest } = example;
|
|
708
|
+
const exampleObject = rest;
|
|
709
|
+
const id = metaId ?? opts?.manualId;
|
|
710
|
+
if (id) {
|
|
711
|
+
if (registry$1.components.examples.ids.has(id)) throw new Error(`Example "${id}" at ${path.join(" > ")} is already registered`);
|
|
712
|
+
const ref = { $ref: `#/components/examples/${id}` };
|
|
713
|
+
registry$1.components.examples.ids.set(id, exampleObject);
|
|
714
|
+
registry$1.components.examples.seen.set(example, ref);
|
|
715
|
+
if (opts?.manualId) return exampleObject;
|
|
716
|
+
return ref;
|
|
717
|
+
}
|
|
718
|
+
registry$1.components.examples.seen.set(example, exampleObject);
|
|
719
|
+
return exampleObject;
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
registerSchemas(components?.schemas, registry$1);
|
|
723
|
+
registerParameters(components?.parameters, registry$1);
|
|
724
|
+
registerHeaders(components?.headers, registry$1);
|
|
725
|
+
registerResponses(components?.responses, registry$1);
|
|
726
|
+
registerPathItems(components?.pathItems, registry$1);
|
|
727
|
+
registerRequestBodies(components?.requestBodies, registry$1);
|
|
728
|
+
registerCallbacks(components?.callbacks, registry$1);
|
|
729
|
+
registerSecuritySchemes(components?.securitySchemes, registry$1);
|
|
730
|
+
registerLinks(components?.links, registry$1);
|
|
731
|
+
registerExamples(components?.examples, registry$1);
|
|
732
|
+
return registry$1;
|
|
733
|
+
};
|
|
734
|
+
const registerSchemas = (schemas, registry$1) => {
|
|
735
|
+
if (!schemas) return;
|
|
736
|
+
for (const [key, schema] of Object.entries(schemas)) {
|
|
737
|
+
if (isAnyZodType(schema)) {
|
|
738
|
+
const id = globalRegistry.get(schema)?.id ?? key;
|
|
739
|
+
registry$1.components.schemas.manual.set(id, {
|
|
740
|
+
input: { schemaObject: {} },
|
|
741
|
+
output: { schemaObject: {} },
|
|
742
|
+
zodType: schema
|
|
743
|
+
});
|
|
744
|
+
continue;
|
|
745
|
+
}
|
|
746
|
+
registry$1.components.schemas.ids.set(key, schema);
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
const registerParameters = (parameters, registry$1) => {
|
|
750
|
+
if (!parameters) return;
|
|
751
|
+
for (const [key, schema] of Object.entries(parameters)) {
|
|
752
|
+
if (isAnyZodType(schema)) {
|
|
753
|
+
const path = [
|
|
754
|
+
"components",
|
|
755
|
+
"parameters",
|
|
756
|
+
key
|
|
757
|
+
];
|
|
758
|
+
registry$1.addParameter(schema, path, { manualId: key });
|
|
759
|
+
continue;
|
|
760
|
+
}
|
|
761
|
+
registry$1.components.parameters.ids.set(key, schema);
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
const registerHeaders = (headers, registry$1) => {
|
|
765
|
+
if (!headers) return;
|
|
766
|
+
for (const [key, schema] of Object.entries(headers)) {
|
|
767
|
+
if (isAnyZodType(schema)) {
|
|
768
|
+
const path = [
|
|
769
|
+
"components",
|
|
770
|
+
"headers",
|
|
771
|
+
key
|
|
772
|
+
];
|
|
773
|
+
registry$1.addHeader(schema, path, { manualId: key });
|
|
774
|
+
continue;
|
|
775
|
+
}
|
|
776
|
+
registry$1.components.headers.ids.set(key, schema);
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
const registerResponses = (responses, registry$1) => {
|
|
780
|
+
if (!responses) return;
|
|
781
|
+
for (const [key, schema] of Object.entries(responses)) {
|
|
782
|
+
const responseObject = registry$1.addResponse(schema, [
|
|
783
|
+
"components",
|
|
784
|
+
"responses",
|
|
785
|
+
key
|
|
786
|
+
], { manualId: key });
|
|
787
|
+
registry$1.components.responses.ids.set(key, responseObject);
|
|
788
|
+
registry$1.components.responses.seen.set(schema, responseObject);
|
|
789
|
+
}
|
|
790
|
+
};
|
|
791
|
+
const registerRequestBodies = (requestBodies, registry$1) => {
|
|
792
|
+
if (!requestBodies) return;
|
|
793
|
+
for (const [key, schema] of Object.entries(requestBodies)) {
|
|
794
|
+
if (isAnyZodType(schema)) {
|
|
795
|
+
registry$1.addRequestBody(schema, [
|
|
796
|
+
"components",
|
|
797
|
+
"requestBodies",
|
|
798
|
+
key
|
|
799
|
+
], { manualId: key });
|
|
800
|
+
continue;
|
|
801
|
+
}
|
|
802
|
+
registry$1.components.requestBodies.ids.set(key, schema);
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
const registerCallbacks = (callbacks, registry$1) => {
|
|
806
|
+
if (!callbacks) return;
|
|
807
|
+
for (const [key, schema] of Object.entries(callbacks)) registry$1.addCallback(schema, [
|
|
808
|
+
"components",
|
|
809
|
+
"callbacks",
|
|
810
|
+
key
|
|
811
|
+
], { manualId: key });
|
|
812
|
+
};
|
|
813
|
+
const registerPathItems = (pathItems, registry$1) => {
|
|
814
|
+
if (!pathItems) return;
|
|
815
|
+
for (const [key, schema] of Object.entries(pathItems)) registry$1.addPathItem(schema, [
|
|
816
|
+
"components",
|
|
817
|
+
"pathItems",
|
|
818
|
+
key
|
|
819
|
+
], { manualId: key });
|
|
820
|
+
};
|
|
821
|
+
const registerSecuritySchemes = (securitySchemes, registry$1) => {
|
|
822
|
+
if (!securitySchemes) return;
|
|
823
|
+
for (const [key, schema] of Object.entries(securitySchemes)) registry$1.addSecurityScheme(schema, [
|
|
824
|
+
"components",
|
|
825
|
+
"securitySchemes",
|
|
826
|
+
key
|
|
827
|
+
], { manualId: key });
|
|
828
|
+
};
|
|
829
|
+
const registerLinks = (links, registry$1) => {
|
|
830
|
+
if (!links) return;
|
|
831
|
+
for (const [key, schema] of Object.entries(links)) registry$1.addLink(schema, [
|
|
832
|
+
"components",
|
|
833
|
+
"links",
|
|
834
|
+
key
|
|
835
|
+
], { manualId: key });
|
|
836
|
+
};
|
|
837
|
+
const registerExamples = (examples, registry$1) => {
|
|
838
|
+
if (!examples) return;
|
|
839
|
+
for (const [key, schema] of Object.entries(examples)) registry$1.components.examples.ids.set(key, schema);
|
|
840
|
+
};
|
|
841
|
+
const createIOSchemas = (ctx) => {
|
|
842
|
+
const { schemas, components, manual } = createSchemas(Object.fromEntries(ctx.registry.components.schemas[ctx.io]), ctx);
|
|
843
|
+
for (const [key, schema] of Object.entries(components)) ctx.registry.components.schemas.ids.set(key, schema);
|
|
844
|
+
for (const [key, schema] of Object.entries(schemas)) {
|
|
845
|
+
const ioSchema = ctx.registry.components.schemas[ctx.io].get(key);
|
|
846
|
+
if (ioSchema) Object.assign(ioSchema.schemaObject, schema);
|
|
847
|
+
}
|
|
848
|
+
for (const [key, value] of Object.entries(manual)) {
|
|
849
|
+
const manualSchema = ctx.registry.components.schemas.manual.get(key);
|
|
850
|
+
if (!manualSchema) continue;
|
|
851
|
+
if (components[key]) manualSchema[ctx.io].used = true;
|
|
852
|
+
Object.assign(manualSchema[ctx.io].schemaObject, value);
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
const createManualSchemas = (registry$1) => {
|
|
856
|
+
for (const [key, value] of registry$1.components.schemas.manual) if (!value.input.used) {
|
|
857
|
+
const schema = value[globalRegistry.get(value.zodType)?.unusedIO ?? "output"].schemaObject;
|
|
858
|
+
registry$1.components.schemas.ids.set(key, schema);
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
const createComponents = (registry$1, opts, openapiVersion) => {
|
|
862
|
+
createIOSchemas({
|
|
863
|
+
registry: registry$1,
|
|
864
|
+
io: "input",
|
|
865
|
+
opts,
|
|
866
|
+
openapiVersion
|
|
867
|
+
});
|
|
868
|
+
createIOSchemas({
|
|
869
|
+
registry: registry$1,
|
|
870
|
+
io: "output",
|
|
871
|
+
opts,
|
|
872
|
+
openapiVersion
|
|
873
|
+
});
|
|
874
|
+
createManualSchemas(registry$1);
|
|
875
|
+
const components = {};
|
|
876
|
+
if (registry$1.components.schemas.ids.size > 0) components.schemas = Object.fromEntries(registry$1.components.schemas.ids);
|
|
877
|
+
if (registry$1.components.headers.ids.size > 0) components.headers = Object.fromEntries(registry$1.components.headers.ids);
|
|
878
|
+
if (registry$1.components.requestBodies.ids.size > 0) components.requestBodies = Object.fromEntries(registry$1.components.requestBodies.ids);
|
|
879
|
+
if (registry$1.components.responses.ids.size > 0) components.responses = Object.fromEntries(registry$1.components.responses.ids);
|
|
880
|
+
if (registry$1.components.parameters.ids.size > 0) components.parameters = Object.fromEntries(registry$1.components.parameters.ids);
|
|
881
|
+
if (registry$1.components.callbacks.ids.size > 0) components.callbacks = Object.fromEntries(registry$1.components.callbacks.ids);
|
|
882
|
+
if (registry$1.components.pathItems.ids.size > 0) components.pathItems = Object.fromEntries(registry$1.components.pathItems.ids);
|
|
883
|
+
if (registry$1.components.securitySchemes.ids.size > 0) components.securitySchemes = Object.fromEntries(registry$1.components.securitySchemes.ids);
|
|
884
|
+
if (registry$1.components.links.ids.size > 0) components.links = Object.fromEntries(registry$1.components.links.ids);
|
|
885
|
+
if (registry$1.components.examples.ids.size > 0) components.examples = Object.fromEntries(registry$1.components.examples.ids);
|
|
886
|
+
return components;
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
//#endregion
|
|
890
|
+
//#region ../../node_modules/.pnpm/zod-openapi@5.4.6_zod@4.5.4/node_modules/zod-openapi/dist/index.mjs
|
|
891
|
+
const createDocument = (zodOpenApiObject, opts = {}) => {
|
|
892
|
+
const { paths, webhooks, components, ...rest } = zodOpenApiObject;
|
|
893
|
+
const document = rest;
|
|
894
|
+
const registry = createRegistry(components);
|
|
895
|
+
const createdPaths = createPaths(paths, registry, ["paths"]);
|
|
896
|
+
if (createdPaths) document.paths = createdPaths;
|
|
897
|
+
const createdWebhooks = createPaths(webhooks, registry, ["webhooks"]);
|
|
898
|
+
if (createdWebhooks) document.webhooks = createdWebhooks;
|
|
899
|
+
const createdComponents = createComponents(registry, opts, zodOpenApiObject.openapi);
|
|
900
|
+
if (Object.keys(createdComponents).length > 0) document.components = createdComponents;
|
|
901
|
+
return document;
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
//#endregion
|
|
905
|
+
//#region src/api/openapi/document.ts
|
|
906
|
+
/**
|
|
907
|
+
* OpenAPI 3.1 document generator.
|
|
908
|
+
*
|
|
909
|
+
* Builds the full OpenAPI spec from Zod schemas. The Zod schemas are the
|
|
910
|
+
* single source of truth -- we never hand-write OpenAPI YAML.
|
|
911
|
+
*
|
|
912
|
+
* Covers all public API domains.
|
|
913
|
+
*/
|
|
914
|
+
const JSON_CONTENT = "application/json";
|
|
915
|
+
const MULTIPART_CONTENT = "multipart/form-data";
|
|
916
|
+
/** Standard error responses shared across all authenticated endpoints */
|
|
917
|
+
function standardErrors(...codes) {
|
|
918
|
+
const responses = {};
|
|
919
|
+
const errorMap = {
|
|
920
|
+
400: "Bad Request",
|
|
921
|
+
401: "Not authenticated",
|
|
922
|
+
403: "Forbidden",
|
|
923
|
+
404: "Not Found",
|
|
924
|
+
409: "Conflict",
|
|
925
|
+
410: "Gone",
|
|
926
|
+
411: "Length Required",
|
|
927
|
+
413: "Payload Too Large",
|
|
928
|
+
422: "Unprocessable Entity",
|
|
929
|
+
500: "Internal Server Error",
|
|
930
|
+
503: "Service Unavailable"
|
|
931
|
+
};
|
|
932
|
+
for (const code of codes) responses[String(code)] = {
|
|
933
|
+
description: errorMap[code] ?? `Error ${code}`,
|
|
934
|
+
content: { [JSON_CONTENT]: { schema: apiErrorSchema } }
|
|
935
|
+
};
|
|
936
|
+
return responses;
|
|
937
|
+
}
|
|
938
|
+
/** Common auth error responses (401 + 403) */
|
|
939
|
+
const authErrors = standardErrors(401, 403);
|
|
940
|
+
const entryPathParams = z.object({
|
|
941
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
942
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
943
|
+
});
|
|
944
|
+
/** 409 for optimistic-concurrency or edit-lock conflicts. */
|
|
945
|
+
const entryMutationConflict = { "409": {
|
|
946
|
+
description: "The content changed or another editor holds its edit lock",
|
|
947
|
+
content: { [JSON_CONTENT]: { schema: entryMutationConflictSchema } }
|
|
948
|
+
} };
|
|
949
|
+
const contentPaths = {
|
|
950
|
+
"/_emdash/api/content/{collection}": {
|
|
951
|
+
get: {
|
|
952
|
+
operationId: "listContent",
|
|
953
|
+
summary: "List content items",
|
|
954
|
+
description: "Returns a paginated list of content items in the specified collection.",
|
|
955
|
+
tags: ["Content"],
|
|
956
|
+
requestParams: {
|
|
957
|
+
path: z.object({ collection: z.string().meta({
|
|
958
|
+
description: "Collection slug",
|
|
959
|
+
examples: ["posts"]
|
|
960
|
+
}) }),
|
|
961
|
+
query: contentListQuery
|
|
962
|
+
},
|
|
963
|
+
responses: {
|
|
964
|
+
"200": {
|
|
965
|
+
description: "Content list",
|
|
966
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentListResponseSchema) } }
|
|
967
|
+
},
|
|
968
|
+
...authErrors,
|
|
969
|
+
...standardErrors(500)
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
post: {
|
|
973
|
+
operationId: "createContent",
|
|
974
|
+
summary: "Create a content item",
|
|
975
|
+
tags: ["Content"],
|
|
976
|
+
requestParams: { path: z.object({ collection: z.string().meta({ description: "Collection slug" }) }) },
|
|
977
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: contentCreateBody } } },
|
|
978
|
+
responses: {
|
|
979
|
+
"201": {
|
|
980
|
+
description: "Created content item",
|
|
981
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentResponseSchema) } }
|
|
982
|
+
},
|
|
983
|
+
...authErrors,
|
|
984
|
+
...standardErrors(400, 422, 500)
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
"/_emdash/api/content/{collection}/{id}": {
|
|
989
|
+
get: {
|
|
990
|
+
operationId: "getContent",
|
|
991
|
+
summary: "Get a content item",
|
|
992
|
+
tags: ["Content"],
|
|
993
|
+
requestParams: {
|
|
994
|
+
path: z.object({
|
|
995
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
996
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
997
|
+
}),
|
|
998
|
+
query: z.object({ locale: z.string().optional().meta({ description: "Locale filter" }) })
|
|
999
|
+
},
|
|
1000
|
+
responses: {
|
|
1001
|
+
"200": {
|
|
1002
|
+
description: "Content item",
|
|
1003
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentResponseSchema) } }
|
|
1004
|
+
},
|
|
1005
|
+
...authErrors,
|
|
1006
|
+
...standardErrors(404, 500)
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
put: {
|
|
1010
|
+
operationId: "updateContent",
|
|
1011
|
+
summary: "Update a content item",
|
|
1012
|
+
tags: ["Content"],
|
|
1013
|
+
requestParams: {
|
|
1014
|
+
path: z.object({
|
|
1015
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1016
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
1017
|
+
}),
|
|
1018
|
+
query: z.object({ locale: z.string().optional().meta({ description: "Locale filter" }) })
|
|
1019
|
+
},
|
|
1020
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: contentUpdateBody } } },
|
|
1021
|
+
responses: {
|
|
1022
|
+
"200": {
|
|
1023
|
+
description: "Updated content item",
|
|
1024
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentResponseSchema) } }
|
|
1025
|
+
},
|
|
1026
|
+
...authErrors,
|
|
1027
|
+
...standardErrors(400, 404, 409, 422, 500)
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
delete: {
|
|
1031
|
+
operationId: "deleteContent",
|
|
1032
|
+
summary: "Delete a content item (soft delete)",
|
|
1033
|
+
description: "Moves the content item to trash. Use the permanent delete endpoint to remove permanently.",
|
|
1034
|
+
tags: ["Content"],
|
|
1035
|
+
requestParams: {
|
|
1036
|
+
path: entryPathParams,
|
|
1037
|
+
query: z.object({ overrideLock: z.enum(["true", "false"]).optional().meta({ description: "Delete even though another editor holds this entry's edit lock. Without it the delete is refused with 409 ENTRY_LOCKED." }) })
|
|
1038
|
+
},
|
|
1039
|
+
responses: {
|
|
1040
|
+
"200": {
|
|
1041
|
+
description: "Deleted",
|
|
1042
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
1043
|
+
},
|
|
1044
|
+
...authErrors,
|
|
1045
|
+
...standardErrors(404, 500),
|
|
1046
|
+
...entryMutationConflict
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
"/_emdash/api/content/{collection}/{id}/publish": { post: {
|
|
1051
|
+
operationId: "publishContent",
|
|
1052
|
+
summary: "Publish a content item",
|
|
1053
|
+
description: "Promotes the current draft to live content and clears any pending schedule. An optional revision token rejects stale publication attempts.",
|
|
1054
|
+
tags: ["Content"],
|
|
1055
|
+
requestParams: { path: z.object({
|
|
1056
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1057
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
1058
|
+
}) },
|
|
1059
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: contentPublishBody } } },
|
|
1060
|
+
responses: {
|
|
1061
|
+
"200": {
|
|
1062
|
+
description: "Published content item",
|
|
1063
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentResponseSchema) } }
|
|
1064
|
+
},
|
|
1065
|
+
...authErrors,
|
|
1066
|
+
...standardErrors(400, 404, 500),
|
|
1067
|
+
...entryMutationConflict
|
|
1068
|
+
}
|
|
1069
|
+
} },
|
|
1070
|
+
"/_emdash/api/content/{collection}/{id}/unpublish": { post: {
|
|
1071
|
+
operationId: "unpublishContent",
|
|
1072
|
+
summary: "Unpublish a content item",
|
|
1073
|
+
description: "Reverts content to draft status.",
|
|
1074
|
+
tags: ["Content"],
|
|
1075
|
+
requestParams: { path: z.object({
|
|
1076
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1077
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
1078
|
+
}) },
|
|
1079
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: contentRevisionConditionBody } } },
|
|
1080
|
+
responses: {
|
|
1081
|
+
"200": {
|
|
1082
|
+
description: "Unpublished content item",
|
|
1083
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentResponseSchema) } }
|
|
1084
|
+
},
|
|
1085
|
+
...authErrors,
|
|
1086
|
+
...standardErrors(400, 404, 500),
|
|
1087
|
+
...entryMutationConflict
|
|
1088
|
+
}
|
|
1089
|
+
} },
|
|
1090
|
+
"/_emdash/api/content/{collection}/{id}/schedule": {
|
|
1091
|
+
post: {
|
|
1092
|
+
operationId: "scheduleContent",
|
|
1093
|
+
summary: "Schedule content for future publishing",
|
|
1094
|
+
tags: ["Content"],
|
|
1095
|
+
requestParams: { path: z.object({
|
|
1096
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1097
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
1098
|
+
}) },
|
|
1099
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: contentScheduleBody } } },
|
|
1100
|
+
responses: {
|
|
1101
|
+
"200": {
|
|
1102
|
+
description: "Scheduled content item",
|
|
1103
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentResponseSchema) } }
|
|
1104
|
+
},
|
|
1105
|
+
...authErrors,
|
|
1106
|
+
...standardErrors(400, 404, 500),
|
|
1107
|
+
...entryMutationConflict
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
delete: {
|
|
1111
|
+
operationId: "unscheduleContent",
|
|
1112
|
+
summary: "Cancel scheduled publishing",
|
|
1113
|
+
description: "Clears the scheduled publication time. A scheduled draft returns to draft status; a published item stays published.",
|
|
1114
|
+
tags: ["Content"],
|
|
1115
|
+
requestParams: {
|
|
1116
|
+
path: entryPathParams,
|
|
1117
|
+
query: z.object({ overrideLock: z.enum(["true", "false"]).optional().meta({ description: "Unschedule even though another editor holds this entry's edit lock. Without it the request is refused with 409 ENTRY_LOCKED." }) })
|
|
1118
|
+
},
|
|
1119
|
+
responses: {
|
|
1120
|
+
"200": {
|
|
1121
|
+
description: "Unscheduled content item",
|
|
1122
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentResponseSchema) } }
|
|
1123
|
+
},
|
|
1124
|
+
...authErrors,
|
|
1125
|
+
...standardErrors(404, 500),
|
|
1126
|
+
...entryMutationConflict
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
"/_emdash/api/content/{collection}/{id}/duplicate": { post: {
|
|
1131
|
+
operationId: "duplicateContent",
|
|
1132
|
+
summary: "Duplicate a content item",
|
|
1133
|
+
tags: ["Content"],
|
|
1134
|
+
requestParams: { path: z.object({
|
|
1135
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1136
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
1137
|
+
}) },
|
|
1138
|
+
responses: {
|
|
1139
|
+
"201": {
|
|
1140
|
+
description: "Duplicated content item",
|
|
1141
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ item: contentItemSchema })) } }
|
|
1142
|
+
},
|
|
1143
|
+
...authErrors,
|
|
1144
|
+
...standardErrors(404, 500)
|
|
1145
|
+
}
|
|
1146
|
+
} },
|
|
1147
|
+
"/_emdash/api/content/{collection}/{id}/restore": { post: {
|
|
1148
|
+
operationId: "restoreContent",
|
|
1149
|
+
summary: "Restore a content item from trash",
|
|
1150
|
+
tags: ["Content"],
|
|
1151
|
+
requestParams: { path: z.object({
|
|
1152
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1153
|
+
id: z.string().meta({ description: "Content ID" })
|
|
1154
|
+
}) },
|
|
1155
|
+
responses: {
|
|
1156
|
+
"200": {
|
|
1157
|
+
description: "Restored",
|
|
1158
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentRestoreResponseSchema) } }
|
|
1159
|
+
},
|
|
1160
|
+
...authErrors,
|
|
1161
|
+
...standardErrors(404, 409, 500)
|
|
1162
|
+
}
|
|
1163
|
+
} },
|
|
1164
|
+
"/_emdash/api/content/{collection}/{id}/permanent": { delete: {
|
|
1165
|
+
operationId: "permanentDeleteContent",
|
|
1166
|
+
summary: "Permanently delete a content item",
|
|
1167
|
+
description: "Permanently removes a trashed content item. This cannot be undone.",
|
|
1168
|
+
tags: ["Content"],
|
|
1169
|
+
requestParams: { path: z.object({
|
|
1170
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1171
|
+
id: z.string().meta({ description: "Content ID" })
|
|
1172
|
+
}) },
|
|
1173
|
+
responses: {
|
|
1174
|
+
"200": {
|
|
1175
|
+
description: "Permanently deleted",
|
|
1176
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
1177
|
+
},
|
|
1178
|
+
...authErrors,
|
|
1179
|
+
...standardErrors(404, 500)
|
|
1180
|
+
}
|
|
1181
|
+
} },
|
|
1182
|
+
"/_emdash/api/content/{collection}/{id}/compare": { get: {
|
|
1183
|
+
operationId: "compareContent",
|
|
1184
|
+
summary: "Compare live and draft revisions",
|
|
1185
|
+
tags: ["Content"],
|
|
1186
|
+
requestParams: { path: z.object({
|
|
1187
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1188
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
1189
|
+
}) },
|
|
1190
|
+
responses: {
|
|
1191
|
+
"200": {
|
|
1192
|
+
description: "Comparison result",
|
|
1193
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentCompareResponseSchema) } }
|
|
1194
|
+
},
|
|
1195
|
+
...authErrors,
|
|
1196
|
+
...standardErrors(404, 500)
|
|
1197
|
+
}
|
|
1198
|
+
} },
|
|
1199
|
+
"/_emdash/api/content/{collection}/{id}/discard-draft": { post: {
|
|
1200
|
+
operationId: "discardDraft",
|
|
1201
|
+
summary: "Discard draft changes",
|
|
1202
|
+
description: "Reverts the content item to its live (published) version.",
|
|
1203
|
+
tags: ["Content"],
|
|
1204
|
+
requestParams: { path: z.object({
|
|
1205
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1206
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
1207
|
+
}) },
|
|
1208
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: contentRevisionConditionBody } } },
|
|
1209
|
+
responses: {
|
|
1210
|
+
"200": {
|
|
1211
|
+
description: "Content item reverted to live version",
|
|
1212
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentResponseSchema) } }
|
|
1213
|
+
},
|
|
1214
|
+
...authErrors,
|
|
1215
|
+
...standardErrors(400, 404, 500),
|
|
1216
|
+
...entryMutationConflict
|
|
1217
|
+
}
|
|
1218
|
+
} },
|
|
1219
|
+
"/_emdash/api/content/{collection}/{id}/lock": {
|
|
1220
|
+
get: {
|
|
1221
|
+
operationId: "getEntryLock",
|
|
1222
|
+
summary: "Read the entry's edit lock",
|
|
1223
|
+
description: "Reports who is holding the entry, if anyone, without changing the lease.",
|
|
1224
|
+
tags: ["Content"],
|
|
1225
|
+
requestParams: { path: entryPathParams },
|
|
1226
|
+
responses: {
|
|
1227
|
+
"200": {
|
|
1228
|
+
description: "Current lock state",
|
|
1229
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(entryLockStatusSchema) } }
|
|
1230
|
+
},
|
|
1231
|
+
...authErrors,
|
|
1232
|
+
...standardErrors(404, 500)
|
|
1233
|
+
}
|
|
1234
|
+
},
|
|
1235
|
+
post: {
|
|
1236
|
+
operationId: "acquireEntryLock",
|
|
1237
|
+
summary: "Take or refresh the entry's edit lock",
|
|
1238
|
+
description: "Takes the lock for the caller, or reports who holds it. `heldByCaller` tells the two apart. The lease lasts seven minutes; repeating this call and every save on the entry extend it. `takeover` claims the lock from whoever holds it; their next heartbeat or save reports the new holder.",
|
|
1239
|
+
tags: ["Content"],
|
|
1240
|
+
requestParams: { path: entryPathParams },
|
|
1241
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: entryLockAcquireBody } } },
|
|
1242
|
+
responses: {
|
|
1243
|
+
"200": {
|
|
1244
|
+
description: "Lock state after the attempt",
|
|
1245
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(entryLockStatusSchema) } }
|
|
1246
|
+
},
|
|
1247
|
+
...authErrors,
|
|
1248
|
+
...standardErrors(404, 500)
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
delete: {
|
|
1252
|
+
operationId: "releaseEntryLock",
|
|
1253
|
+
summary: "Release the caller's edit lock",
|
|
1254
|
+
description: "Releases the lock only when the caller holds it; `released` is false otherwise.",
|
|
1255
|
+
tags: ["Content"],
|
|
1256
|
+
requestParams: {
|
|
1257
|
+
path: entryPathParams,
|
|
1258
|
+
query: z.object({ token: z.string().optional().meta({ description: "The session token sent on acquire. With it, only the tab that last claimed the lock releases it." }) })
|
|
1259
|
+
},
|
|
1260
|
+
responses: {
|
|
1261
|
+
"200": {
|
|
1262
|
+
description: "Whether a lock was released",
|
|
1263
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(entryLockReleaseResponseSchema) } }
|
|
1264
|
+
},
|
|
1265
|
+
...authErrors,
|
|
1266
|
+
...standardErrors(404, 500)
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1270
|
+
"/_emdash/api/content/{collection}/{id}/translations": { get: {
|
|
1271
|
+
operationId: "getContentTranslations",
|
|
1272
|
+
summary: "Get translations for a content item",
|
|
1273
|
+
tags: ["Content"],
|
|
1274
|
+
requestParams: { path: z.object({
|
|
1275
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1276
|
+
id: z.string().meta({ description: "Content ID or slug" })
|
|
1277
|
+
}) },
|
|
1278
|
+
responses: {
|
|
1279
|
+
"200": {
|
|
1280
|
+
description: "Translation group members",
|
|
1281
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentTranslationsResponseSchema) } }
|
|
1282
|
+
},
|
|
1283
|
+
...authErrors,
|
|
1284
|
+
...standardErrors(404, 500)
|
|
1285
|
+
}
|
|
1286
|
+
} },
|
|
1287
|
+
"/_emdash/api/content/{collection}/{id}/terms/{taxonomy}": {
|
|
1288
|
+
get: {
|
|
1289
|
+
operationId: "getContentTerms",
|
|
1290
|
+
summary: "Get taxonomy terms assigned to a content item",
|
|
1291
|
+
description: "Returns the terms of one taxonomy that are assigned to the content item, resolved to the item's locale with fallback to the site default.",
|
|
1292
|
+
tags: ["Content"],
|
|
1293
|
+
requestParams: { path: z.object({
|
|
1294
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1295
|
+
id: z.string().meta({ description: "Content ID or slug" }),
|
|
1296
|
+
taxonomy: z.string().meta({ description: "Taxonomy name" })
|
|
1297
|
+
}) },
|
|
1298
|
+
responses: {
|
|
1299
|
+
"200": {
|
|
1300
|
+
description: "Terms assigned to the content item",
|
|
1301
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentTermsResponseSchema) } }
|
|
1302
|
+
},
|
|
1303
|
+
...authErrors,
|
|
1304
|
+
...standardErrors(400, 404, 500)
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
post: {
|
|
1308
|
+
operationId: "setContentTerms",
|
|
1309
|
+
summary: "Set taxonomy terms on a content item",
|
|
1310
|
+
description: "Assign a set of terms to the content item for the named taxonomy, replacing any existing assignments for that taxonomy. Every term id must belong to the named taxonomy.",
|
|
1311
|
+
tags: ["Content"],
|
|
1312
|
+
requestParams: { path: z.object({
|
|
1313
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
1314
|
+
id: z.string().meta({ description: "Content ID or slug" }),
|
|
1315
|
+
taxonomy: z.string().meta({ description: "Taxonomy name" })
|
|
1316
|
+
}) },
|
|
1317
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: contentTermsBody } } },
|
|
1318
|
+
responses: {
|
|
1319
|
+
"200": {
|
|
1320
|
+
description: "Terms updated",
|
|
1321
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentTermsResponseSchema) } }
|
|
1322
|
+
},
|
|
1323
|
+
...authErrors,
|
|
1324
|
+
...standardErrors(400, 404, 500)
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
"/_emdash/api/content/{collection}/authors": { get: {
|
|
1329
|
+
operationId: "listContentAuthors",
|
|
1330
|
+
summary: "List distinct authors of a collection's content",
|
|
1331
|
+
tags: ["Content"],
|
|
1332
|
+
requestParams: { path: z.object({ collection: z.string().meta({ description: "Collection slug" }) }) },
|
|
1333
|
+
responses: {
|
|
1334
|
+
"200": {
|
|
1335
|
+
description: "Content authors",
|
|
1336
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(contentAuthorsResponseSchema) } }
|
|
1337
|
+
},
|
|
1338
|
+
...authErrors,
|
|
1339
|
+
...standardErrors(500)
|
|
1340
|
+
}
|
|
1341
|
+
} },
|
|
1342
|
+
"/_emdash/api/content/{collection}/trash": { get: {
|
|
1343
|
+
operationId: "listTrashedContent",
|
|
1344
|
+
summary: "List trashed content items",
|
|
1345
|
+
tags: ["Content"],
|
|
1346
|
+
requestParams: {
|
|
1347
|
+
path: z.object({ collection: z.string().meta({ description: "Collection slug" }) }),
|
|
1348
|
+
query: contentTrashQuery
|
|
1349
|
+
},
|
|
1350
|
+
responses: {
|
|
1351
|
+
"200": {
|
|
1352
|
+
description: "Trashed content list",
|
|
1353
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(trashedContentListResponseSchema) } }
|
|
1354
|
+
},
|
|
1355
|
+
...authErrors,
|
|
1356
|
+
...standardErrors(500)
|
|
1357
|
+
}
|
|
1358
|
+
} }
|
|
1359
|
+
};
|
|
1360
|
+
function buildMediaPaths(maxUploadSize) {
|
|
1361
|
+
return {
|
|
1362
|
+
"/_emdash/api/media": {
|
|
1363
|
+
get: {
|
|
1364
|
+
operationId: "listMedia",
|
|
1365
|
+
summary: "List media items",
|
|
1366
|
+
description: "Lists media items. Set `includeUsage=1` to attach coverage-aware advisory usage counts; a count may be null when the caller cannot read draft-derived usage.",
|
|
1367
|
+
tags: ["Media"],
|
|
1368
|
+
requestParams: { query: mediaListQuery },
|
|
1369
|
+
responses: {
|
|
1370
|
+
"200": {
|
|
1371
|
+
description: "Media list",
|
|
1372
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaListReadResponseSchema) } }
|
|
1373
|
+
},
|
|
1374
|
+
...authErrors,
|
|
1375
|
+
...standardErrors(400, 500)
|
|
1376
|
+
}
|
|
1377
|
+
},
|
|
1378
|
+
post: {
|
|
1379
|
+
operationId: "uploadMedia",
|
|
1380
|
+
summary: "Upload a media item",
|
|
1381
|
+
tags: ["Media"],
|
|
1382
|
+
requestBody: {
|
|
1383
|
+
required: true,
|
|
1384
|
+
content: { [MULTIPART_CONTENT]: { schema: mediaDirectUploadBody } }
|
|
1385
|
+
},
|
|
1386
|
+
responses: {
|
|
1387
|
+
"200": {
|
|
1388
|
+
description: "Existing deduplicated media item",
|
|
1389
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUploadResponseSchema) } }
|
|
1390
|
+
},
|
|
1391
|
+
"201": {
|
|
1392
|
+
description: "Created media item",
|
|
1393
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUploadResponseSchema) } }
|
|
1394
|
+
},
|
|
1395
|
+
...authErrors,
|
|
1396
|
+
...standardErrors(400, 413, 500)
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
"/_emdash/api/media/folders": {
|
|
1401
|
+
get: {
|
|
1402
|
+
operationId: "listMediaFolders",
|
|
1403
|
+
summary: "List media folders",
|
|
1404
|
+
tags: ["Media"],
|
|
1405
|
+
requestParams: { query: mediaFolderListQuery },
|
|
1406
|
+
responses: {
|
|
1407
|
+
"200": {
|
|
1408
|
+
description: "Media folder list",
|
|
1409
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaFolderListResponseSchema) } }
|
|
1410
|
+
},
|
|
1411
|
+
...authErrors,
|
|
1412
|
+
...standardErrors(400, 500)
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
post: {
|
|
1416
|
+
operationId: "createMediaFolder",
|
|
1417
|
+
summary: "Create a media folder",
|
|
1418
|
+
tags: ["Media"],
|
|
1419
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: mediaFolderBody } } },
|
|
1420
|
+
responses: {
|
|
1421
|
+
"201": {
|
|
1422
|
+
description: "Created media folder",
|
|
1423
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaFolderResponseSchema) } }
|
|
1424
|
+
},
|
|
1425
|
+
...authErrors,
|
|
1426
|
+
...standardErrors(400, 409, 500)
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
"/_emdash/api/media/folders/{id}": {
|
|
1431
|
+
get: {
|
|
1432
|
+
operationId: "getMediaFolder",
|
|
1433
|
+
summary: "Get a media folder",
|
|
1434
|
+
tags: ["Media"],
|
|
1435
|
+
requestParams: { path: z.object({ id: mediaFolderIdSchema.meta({ description: "Media folder ID" }) }) },
|
|
1436
|
+
responses: {
|
|
1437
|
+
"200": {
|
|
1438
|
+
description: "Media folder",
|
|
1439
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaFolderResponseSchema) } }
|
|
1440
|
+
},
|
|
1441
|
+
...authErrors,
|
|
1442
|
+
...standardErrors(400, 404, 500)
|
|
1443
|
+
}
|
|
1444
|
+
},
|
|
1445
|
+
put: {
|
|
1446
|
+
operationId: "updateMediaFolder",
|
|
1447
|
+
summary: "Update a media folder",
|
|
1448
|
+
tags: ["Media"],
|
|
1449
|
+
requestParams: { path: z.object({ id: mediaFolderIdSchema.meta({ description: "Media folder ID" }) }) },
|
|
1450
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: mediaFolderBody } } },
|
|
1451
|
+
responses: {
|
|
1452
|
+
"200": {
|
|
1453
|
+
description: "Updated media folder",
|
|
1454
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaFolderResponseSchema) } }
|
|
1455
|
+
},
|
|
1456
|
+
...authErrors,
|
|
1457
|
+
...standardErrors(400, 404, 409, 500)
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
delete: {
|
|
1461
|
+
operationId: "deleteMediaFolder",
|
|
1462
|
+
summary: "Delete a media folder",
|
|
1463
|
+
description: "Deletes the folder and returns its media to the Main library.",
|
|
1464
|
+
tags: ["Media"],
|
|
1465
|
+
requestParams: { path: z.object({ id: mediaFolderIdSchema.meta({ description: "Media folder ID" }) }) },
|
|
1466
|
+
responses: {
|
|
1467
|
+
"200": {
|
|
1468
|
+
description: "Deleted media folder",
|
|
1469
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
1470
|
+
},
|
|
1471
|
+
...authErrors,
|
|
1472
|
+
...standardErrors(400, 404, 500)
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
"/_emdash/api/media/{id}": {
|
|
1477
|
+
get: {
|
|
1478
|
+
operationId: "getMedia",
|
|
1479
|
+
summary: "Get a media item",
|
|
1480
|
+
description: "Gets a media item. Set `includeUsage=1` to attach a coverage-aware advisory usage count; the count may be null when the caller cannot read draft-derived usage.",
|
|
1481
|
+
tags: ["Media"],
|
|
1482
|
+
requestParams: {
|
|
1483
|
+
path: z.object({ id: z.string().meta({ description: "Media ID" }) }),
|
|
1484
|
+
query: mediaGetQuery
|
|
1485
|
+
},
|
|
1486
|
+
responses: {
|
|
1487
|
+
"200": {
|
|
1488
|
+
description: "Media item",
|
|
1489
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaReadResponseSchema) } }
|
|
1490
|
+
},
|
|
1491
|
+
...authErrors,
|
|
1492
|
+
...standardErrors(400, 404, 500)
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1495
|
+
put: {
|
|
1496
|
+
operationId: "updateMedia",
|
|
1497
|
+
summary: "Update media metadata",
|
|
1498
|
+
tags: ["Media"],
|
|
1499
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Media ID" }) }) },
|
|
1500
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: mediaUpdateBody } } },
|
|
1501
|
+
responses: {
|
|
1502
|
+
"200": {
|
|
1503
|
+
description: "Updated media item",
|
|
1504
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaResponseSchema) } }
|
|
1505
|
+
},
|
|
1506
|
+
...authErrors,
|
|
1507
|
+
...standardErrors(400, 404, 500)
|
|
1508
|
+
}
|
|
1509
|
+
},
|
|
1510
|
+
delete: {
|
|
1511
|
+
operationId: "deleteMedia",
|
|
1512
|
+
summary: "Delete a media item",
|
|
1513
|
+
tags: ["Media"],
|
|
1514
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Media ID" }) }) },
|
|
1515
|
+
responses: {
|
|
1516
|
+
"200": {
|
|
1517
|
+
description: "Deleted",
|
|
1518
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaDeleteResponseSchema) } }
|
|
1519
|
+
},
|
|
1520
|
+
...authErrors,
|
|
1521
|
+
...standardErrors(404, 500)
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
"/_emdash/api/media/{id}/usage": { get: {
|
|
1526
|
+
operationId: "getMediaUsage",
|
|
1527
|
+
summary: "Get media usage details",
|
|
1528
|
+
description: "Returns paginated content entry groups whose current indexed sources reference a local media item, and the site settings that select it. Results include aggregate coverage and are advisory during concurrent writes. Requires media read and draft-content read permission; token-authenticated callers also require admin scope.",
|
|
1529
|
+
tags: ["Media"],
|
|
1530
|
+
requestParams: {
|
|
1531
|
+
path: z.object({ id: z.string().meta({ description: "Media ID" }) }),
|
|
1532
|
+
query: mediaUsageDetailsQuery
|
|
1533
|
+
},
|
|
1534
|
+
responses: {
|
|
1535
|
+
"200": {
|
|
1536
|
+
description: "Entry-grouped media usage details",
|
|
1537
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageDetailsResponseSchema) } }
|
|
1538
|
+
},
|
|
1539
|
+
...authErrors,
|
|
1540
|
+
...standardErrors(400, 404, 500)
|
|
1541
|
+
}
|
|
1542
|
+
} },
|
|
1543
|
+
"/_emdash/api/media/{id}/replace": { put: {
|
|
1544
|
+
operationId: "replaceMediaImage",
|
|
1545
|
+
summary: "Replace a media image",
|
|
1546
|
+
description: "Overwrites a ready local image under its existing storage key and refreshes its file metadata while preserving its media ID, filename, and URL. The replacement may use different dimensions or an aspect ratio from the original.",
|
|
1547
|
+
tags: ["Media"],
|
|
1548
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Media ID" }) }) },
|
|
1549
|
+
requestBody: {
|
|
1550
|
+
required: true,
|
|
1551
|
+
content: { [MULTIPART_CONTENT]: { schema: mediaReplaceBody } }
|
|
1552
|
+
},
|
|
1553
|
+
responses: {
|
|
1554
|
+
"200": {
|
|
1555
|
+
description: "Replaced media item",
|
|
1556
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaReplaceResponseSchema) } }
|
|
1557
|
+
},
|
|
1558
|
+
...authErrors,
|
|
1559
|
+
...standardErrors(400, 404, 413, 500)
|
|
1560
|
+
}
|
|
1561
|
+
} },
|
|
1562
|
+
"/_emdash/api/admin/media-usage/repair": { post: {
|
|
1563
|
+
operationId: "repairMediaUsage",
|
|
1564
|
+
summary: "Repair media usage indexes",
|
|
1565
|
+
description: "Repairs content media usage indexes for one collection or all collections. The request succeeds with HTTP 200 when a structured repair result is produced; inspect `data.status` because it may be `failed` or `stale`.",
|
|
1566
|
+
tags: ["Media"],
|
|
1567
|
+
requestBody: {
|
|
1568
|
+
required: true,
|
|
1569
|
+
content: { [JSON_CONTENT]: { schema: mediaUsageRepairBody } }
|
|
1570
|
+
},
|
|
1571
|
+
responses: {
|
|
1572
|
+
"200": {
|
|
1573
|
+
description: "Media usage repair result",
|
|
1574
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageRepairResponseSchema) } }
|
|
1575
|
+
},
|
|
1576
|
+
...authErrors,
|
|
1577
|
+
...standardErrors(400, 413, 500)
|
|
1578
|
+
}
|
|
1579
|
+
} },
|
|
1580
|
+
"/_emdash/api/admin/media-usage/progress": {
|
|
1581
|
+
get: {
|
|
1582
|
+
operationId: "getMediaUsageProgress",
|
|
1583
|
+
summary: "Get media usage indexing progress",
|
|
1584
|
+
description: "Returns aggregate indexing readiness for current content collections after controlled activation is active. Requires `schema:manage`; bearer tokens also require the `admin` scope.",
|
|
1585
|
+
tags: ["Media"],
|
|
1586
|
+
responses: {
|
|
1587
|
+
"200": {
|
|
1588
|
+
description: "Aggregate media usage indexing progress",
|
|
1589
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageProgressSchema) } }
|
|
1590
|
+
},
|
|
1591
|
+
...authErrors,
|
|
1592
|
+
...standardErrors(409),
|
|
1593
|
+
...standardErrors(500)
|
|
1594
|
+
}
|
|
1595
|
+
},
|
|
1596
|
+
post: {
|
|
1597
|
+
operationId: "advanceMediaUsageProgress",
|
|
1598
|
+
summary: "Advance media usage indexing",
|
|
1599
|
+
description: "Runs one bounded Media Usage maintenance step and returns the stored activation and indexing state. Requires `schema:manage`; bearer tokens also require the `admin` scope.",
|
|
1600
|
+
tags: ["Media"],
|
|
1601
|
+
responses: {
|
|
1602
|
+
"200": {
|
|
1603
|
+
description: "Media Usage progress after one maintenance step",
|
|
1604
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageProgressAdvanceResponseSchema) } }
|
|
1605
|
+
},
|
|
1606
|
+
...authErrors,
|
|
1607
|
+
...standardErrors(409),
|
|
1608
|
+
...standardErrors(500)
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
},
|
|
1612
|
+
"/_emdash/api/admin/media-usage/work": { get: {
|
|
1613
|
+
operationId: "listMediaUsageWork",
|
|
1614
|
+
summary: "List durable media usage work",
|
|
1615
|
+
description: "Returns one bounded cursor page of durable entry-indexing work for a current collection. Requires `schema:manage`; bearer tokens also require the `admin` scope. The response omits lease tokens, work versions, indexed content, media references, raw errors, and an exact backlog count.",
|
|
1616
|
+
tags: ["Media"],
|
|
1617
|
+
requestParams: { query: mediaUsageWorkListQuery },
|
|
1618
|
+
responses: {
|
|
1619
|
+
"200": {
|
|
1620
|
+
description: "Bounded media usage work page",
|
|
1621
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageWorkListResponseSchema) } }
|
|
1622
|
+
},
|
|
1623
|
+
...authErrors,
|
|
1624
|
+
...standardErrors(400, 404, 500)
|
|
1625
|
+
}
|
|
1626
|
+
} },
|
|
1627
|
+
"/_emdash/api/admin/media-usage/activation": {
|
|
1628
|
+
get: {
|
|
1629
|
+
operationId: "getMediaUsageActivation",
|
|
1630
|
+
summary: "Get media usage activation status",
|
|
1631
|
+
description: "Returns the redacted status of controlled Media Usage capture activation. This operation is read-only and does not start or resume activation. Requires `schema:manage`; bearer tokens also require the `admin` scope.",
|
|
1632
|
+
tags: ["Media"],
|
|
1633
|
+
responses: {
|
|
1634
|
+
"200": {
|
|
1635
|
+
description: "Media usage activation status",
|
|
1636
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageActivationStatusSchema) } }
|
|
1637
|
+
},
|
|
1638
|
+
...authErrors,
|
|
1639
|
+
...standardErrors(409, 500)
|
|
1640
|
+
}
|
|
1641
|
+
},
|
|
1642
|
+
post: {
|
|
1643
|
+
operationId: "advanceMediaUsageActivation",
|
|
1644
|
+
summary: "Advance media usage activation",
|
|
1645
|
+
description: "Starts, resumes, or retries exactly one bounded activation batch after the operator confirms that all writers are drained. Continue setup through the Media Usage progress endpoint. Requires `schema:manage`; bearer tokens also require the `admin` scope.",
|
|
1646
|
+
tags: ["Media"],
|
|
1647
|
+
requestBody: {
|
|
1648
|
+
required: true,
|
|
1649
|
+
content: { [JSON_CONTENT]: { schema: mediaUsageActivationAdvanceBody } }
|
|
1650
|
+
},
|
|
1651
|
+
responses: {
|
|
1652
|
+
"200": {
|
|
1653
|
+
description: "Current media usage activation progress",
|
|
1654
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageActivationAdvanceResponseSchema) } }
|
|
1655
|
+
},
|
|
1656
|
+
...authErrors,
|
|
1657
|
+
...standardErrors(400, 500),
|
|
1658
|
+
"409": {
|
|
1659
|
+
description: "Activation is busy, changed ownership, or is incompatible",
|
|
1660
|
+
content: { [JSON_CONTENT]: { schema: mediaUsageActivationConflictSchema } }
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
"/_emdash/api/admin/media-usage/work/retry": { post: {
|
|
1666
|
+
operationId: "retryMediaUsageWork",
|
|
1667
|
+
summary: "Retry one durable media usage job",
|
|
1668
|
+
description: "Idempotently reopens or creates one entry-indexing job for a current immutable collection identity. Requires `schema:manage`; bearer tokens also require the `admin` scope. A live worker lease or a concurrent work change returns a stable conflict without exposing ownership tokens.",
|
|
1669
|
+
tags: ["Media"],
|
|
1670
|
+
requestBody: {
|
|
1671
|
+
required: true,
|
|
1672
|
+
content: { [JSON_CONTENT]: { schema: mediaUsageWorkRetryBody } }
|
|
1673
|
+
},
|
|
1674
|
+
responses: {
|
|
1675
|
+
"200": {
|
|
1676
|
+
description: "Current pending work state",
|
|
1677
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageWorkRetryResponseSchema) } }
|
|
1678
|
+
},
|
|
1679
|
+
...authErrors,
|
|
1680
|
+
...standardErrors(400, 404, 500),
|
|
1681
|
+
"409": {
|
|
1682
|
+
description: "The job has a live lease or changed concurrently",
|
|
1683
|
+
content: { [JSON_CONTENT]: { schema: mediaUsageWorkRetryConflictSchema } }
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
} },
|
|
1687
|
+
"/_emdash/api/admin/media-usage/collection-deletions": { get: {
|
|
1688
|
+
operationId: "listMediaUsageCollectionDeletions",
|
|
1689
|
+
summary: "List durable collection deletions",
|
|
1690
|
+
description: "Returns a bounded, redacted cursor page of collection deletion work. Requires `schema:manage`; bearer tokens also require the `admin` scope.",
|
|
1691
|
+
tags: ["Media"],
|
|
1692
|
+
requestParams: { query: mediaUsageCollectionDeletionListQuery },
|
|
1693
|
+
responses: {
|
|
1694
|
+
"200": {
|
|
1695
|
+
description: "Bounded collection deletion page",
|
|
1696
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageCollectionDeletionListResponseSchema) } }
|
|
1697
|
+
},
|
|
1698
|
+
...authErrors,
|
|
1699
|
+
...standardErrors(400, 500)
|
|
1700
|
+
}
|
|
1701
|
+
} },
|
|
1702
|
+
"/_emdash/api/admin/media-usage/collection-deletions/retry": { post: {
|
|
1703
|
+
operationId: "retryMediaUsageCollectionDeletion",
|
|
1704
|
+
summary: "Retry one collection deletion",
|
|
1705
|
+
tags: ["Media"],
|
|
1706
|
+
requestBody: {
|
|
1707
|
+
required: true,
|
|
1708
|
+
content: { [JSON_CONTENT]: { schema: mediaUsageCollectionDeletionRetryBody } }
|
|
1709
|
+
},
|
|
1710
|
+
responses: {
|
|
1711
|
+
"200": {
|
|
1712
|
+
description: "Pending collection deletion state",
|
|
1713
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaUsageCollectionDeletionRetryResponseSchema) } }
|
|
1714
|
+
},
|
|
1715
|
+
...authErrors,
|
|
1716
|
+
...standardErrors(400, 404, 500),
|
|
1717
|
+
"409": {
|
|
1718
|
+
description: "The deletion has a live lease or changed concurrently",
|
|
1719
|
+
content: { [JSON_CONTENT]: { schema: mediaUsageWorkRetryConflictSchema } }
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
} },
|
|
1723
|
+
"/_emdash/api/media/upload-url": { post: {
|
|
1724
|
+
operationId: "getMediaUploadUrl",
|
|
1725
|
+
summary: "Get a media upload target",
|
|
1726
|
+
description: "Returns either a signed direct-to-storage URL or a same-origin streaming target. Creates a pending media record.",
|
|
1727
|
+
tags: ["Media"],
|
|
1728
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: mediaUploadUrlBody(maxUploadSize) } } },
|
|
1729
|
+
responses: {
|
|
1730
|
+
"200": {
|
|
1731
|
+
description: "Upload URL or existing media (deduplication)",
|
|
1732
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.union([mediaUploadUrlResponseSchema, mediaExistingResponseSchema])) } }
|
|
1733
|
+
},
|
|
1734
|
+
...authErrors,
|
|
1735
|
+
...standardErrors(400, 500)
|
|
1736
|
+
}
|
|
1737
|
+
} },
|
|
1738
|
+
"/_emdash/api/media/{id}/confirm": { post: {
|
|
1739
|
+
operationId: "confirmMediaUpload",
|
|
1740
|
+
summary: "Confirm a media upload",
|
|
1741
|
+
description: "Marks a pending media record as ready after the file has been uploaded.",
|
|
1742
|
+
tags: ["Media"],
|
|
1743
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Media ID" }) }) },
|
|
1744
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: mediaConfirmBody } } },
|
|
1745
|
+
responses: {
|
|
1746
|
+
"200": {
|
|
1747
|
+
description: "Confirmed media item with URL",
|
|
1748
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaConfirmResponseSchema) } }
|
|
1749
|
+
},
|
|
1750
|
+
...authErrors,
|
|
1751
|
+
...standardErrors(400, 404, 409, 500)
|
|
1752
|
+
}
|
|
1753
|
+
} },
|
|
1754
|
+
"/_emdash/api/media/{id}/upload": { put: {
|
|
1755
|
+
operationId: "uploadPendingMedia",
|
|
1756
|
+
summary: "Upload a pending media file through EmDash",
|
|
1757
|
+
description: "Streams a file to storage when the configured adapter cannot provide a signed upload URL. The Content-Type and byte count must match the pending media item.",
|
|
1758
|
+
tags: ["Media"],
|
|
1759
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Media ID" }) }) },
|
|
1760
|
+
requestBody: {
|
|
1761
|
+
required: true,
|
|
1762
|
+
content: { "*/*": { schema: z.string().meta({ format: "binary" }) } }
|
|
1763
|
+
},
|
|
1764
|
+
responses: {
|
|
1765
|
+
"200": {
|
|
1766
|
+
description: "File uploaded and ready for confirmation",
|
|
1767
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(mediaStreamUploadResponseSchema) } }
|
|
1768
|
+
},
|
|
1769
|
+
...authErrors,
|
|
1770
|
+
...standardErrors(400, 404, 413, 500)
|
|
1771
|
+
}
|
|
1772
|
+
} }
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1775
|
+
const schemaPaths = {
|
|
1776
|
+
"/_emdash/api/schema/block-types": {
|
|
1777
|
+
get: {
|
|
1778
|
+
operationId: "listBlockTypes",
|
|
1779
|
+
summary: "List block types",
|
|
1780
|
+
tags: ["Schema"],
|
|
1781
|
+
responses: {
|
|
1782
|
+
"200": {
|
|
1783
|
+
description: "Block type list",
|
|
1784
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(blockTypeListResponseSchema) } }
|
|
1785
|
+
},
|
|
1786
|
+
...authErrors,
|
|
1787
|
+
...standardErrors(500)
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
post: {
|
|
1791
|
+
operationId: "createBlockType",
|
|
1792
|
+
summary: "Create a block type",
|
|
1793
|
+
tags: ["Schema"],
|
|
1794
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createBlockTypeBody } } },
|
|
1795
|
+
responses: {
|
|
1796
|
+
"201": {
|
|
1797
|
+
description: "Created block type",
|
|
1798
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(blockTypeResponseSchema) } }
|
|
1799
|
+
},
|
|
1800
|
+
...authErrors,
|
|
1801
|
+
...standardErrors(400, 409, 500)
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
"/_emdash/api/schema/block-types/{slug}": {
|
|
1806
|
+
get: {
|
|
1807
|
+
operationId: "getBlockType",
|
|
1808
|
+
summary: "Get a block type",
|
|
1809
|
+
tags: ["Schema"],
|
|
1810
|
+
requestParams: { path: z.object({ slug: z.string() }) },
|
|
1811
|
+
responses: {
|
|
1812
|
+
"200": {
|
|
1813
|
+
description: "Block type",
|
|
1814
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(blockTypeResponseSchema) } }
|
|
1815
|
+
},
|
|
1816
|
+
...authErrors,
|
|
1817
|
+
...standardErrors(404, 500)
|
|
1818
|
+
}
|
|
1819
|
+
},
|
|
1820
|
+
put: {
|
|
1821
|
+
operationId: "updateBlockType",
|
|
1822
|
+
summary: "Update a block type",
|
|
1823
|
+
tags: ["Schema"],
|
|
1824
|
+
requestParams: { path: z.object({ slug: z.string() }) },
|
|
1825
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateBlockTypeBody } } },
|
|
1826
|
+
responses: {
|
|
1827
|
+
"200": {
|
|
1828
|
+
description: "Updated block type",
|
|
1829
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(blockTypeResponseSchema) } }
|
|
1830
|
+
},
|
|
1831
|
+
...authErrors,
|
|
1832
|
+
...standardErrors(400, 404, 409, 500)
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1836
|
+
"/_emdash/api/schema/block-types/{slug}/versions/{version}/activate": { post: {
|
|
1837
|
+
operationId: "activateBlockTypeVersion",
|
|
1838
|
+
summary: "Activate a block type version",
|
|
1839
|
+
tags: ["Schema"],
|
|
1840
|
+
requestParams: { path: z.object({
|
|
1841
|
+
slug: z.string(),
|
|
1842
|
+
version: z.coerce.number().int().positive()
|
|
1843
|
+
}) },
|
|
1844
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: activateBlockTypeVersionBody } } },
|
|
1845
|
+
responses: {
|
|
1846
|
+
"200": {
|
|
1847
|
+
description: "Activated block type",
|
|
1848
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(blockTypeResponseSchema) } }
|
|
1849
|
+
},
|
|
1850
|
+
...authErrors,
|
|
1851
|
+
...standardErrors(400, 404, 409, 500)
|
|
1852
|
+
}
|
|
1853
|
+
} },
|
|
1854
|
+
"/_emdash/api/schema/collections": {
|
|
1855
|
+
get: {
|
|
1856
|
+
operationId: "listCollections",
|
|
1857
|
+
summary: "List all collections",
|
|
1858
|
+
tags: ["Schema"],
|
|
1859
|
+
responses: {
|
|
1860
|
+
"200": {
|
|
1861
|
+
description: "Collection list",
|
|
1862
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(collectionListResponseSchema) } }
|
|
1863
|
+
},
|
|
1864
|
+
...authErrors,
|
|
1865
|
+
...standardErrors(500)
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
post: {
|
|
1869
|
+
operationId: "createCollection",
|
|
1870
|
+
summary: "Create a collection",
|
|
1871
|
+
tags: ["Schema"],
|
|
1872
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createCollectionBody } } },
|
|
1873
|
+
responses: {
|
|
1874
|
+
"201": {
|
|
1875
|
+
description: "Created collection",
|
|
1876
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(collectionResponseSchema) } }
|
|
1877
|
+
},
|
|
1878
|
+
...authErrors,
|
|
1879
|
+
...standardErrors(400, 409, 500)
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1883
|
+
"/_emdash/api/schema/collections/{slug}": {
|
|
1884
|
+
get: {
|
|
1885
|
+
operationId: "getCollection",
|
|
1886
|
+
summary: "Get a collection",
|
|
1887
|
+
tags: ["Schema"],
|
|
1888
|
+
requestParams: {
|
|
1889
|
+
path: z.object({ slug: z.string().meta({ description: "Collection slug" }) }),
|
|
1890
|
+
query: collectionGetQuery
|
|
1891
|
+
},
|
|
1892
|
+
responses: {
|
|
1893
|
+
"200": {
|
|
1894
|
+
description: "Collection (optionally with fields)",
|
|
1895
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.union([collectionResponseSchema.shape.item, collectionWithFieldsResponseSchema.shape.item])) } }
|
|
1896
|
+
},
|
|
1897
|
+
...authErrors,
|
|
1898
|
+
...standardErrors(404, 500)
|
|
1899
|
+
}
|
|
1900
|
+
},
|
|
1901
|
+
put: {
|
|
1902
|
+
operationId: "updateCollection",
|
|
1903
|
+
summary: "Update a collection",
|
|
1904
|
+
tags: ["Schema"],
|
|
1905
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Collection slug" }) }) },
|
|
1906
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateCollectionBody } } },
|
|
1907
|
+
responses: {
|
|
1908
|
+
"200": {
|
|
1909
|
+
description: "Updated collection",
|
|
1910
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(collectionResponseSchema) } }
|
|
1911
|
+
},
|
|
1912
|
+
...authErrors,
|
|
1913
|
+
...standardErrors(400, 404, 500)
|
|
1914
|
+
}
|
|
1915
|
+
},
|
|
1916
|
+
delete: {
|
|
1917
|
+
operationId: "deleteCollection",
|
|
1918
|
+
summary: "Delete a collection",
|
|
1919
|
+
tags: ["Schema"],
|
|
1920
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Collection slug" }) }) },
|
|
1921
|
+
responses: {
|
|
1922
|
+
"200": {
|
|
1923
|
+
description: "Deleted",
|
|
1924
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
1925
|
+
},
|
|
1926
|
+
...authErrors,
|
|
1927
|
+
...standardErrors(404, 500)
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
},
|
|
1931
|
+
"/_emdash/api/schema/collections/{slug}/fields": {
|
|
1932
|
+
get: {
|
|
1933
|
+
operationId: "listFields",
|
|
1934
|
+
summary: "List fields for a collection",
|
|
1935
|
+
tags: ["Schema"],
|
|
1936
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Collection slug" }) }) },
|
|
1937
|
+
responses: {
|
|
1938
|
+
"200": {
|
|
1939
|
+
description: "Field list",
|
|
1940
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(fieldListResponseSchema) } }
|
|
1941
|
+
},
|
|
1942
|
+
...authErrors,
|
|
1943
|
+
...standardErrors(404, 500)
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
post: {
|
|
1947
|
+
operationId: "createField",
|
|
1948
|
+
summary: "Create a field",
|
|
1949
|
+
tags: ["Schema"],
|
|
1950
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Collection slug" }) }) },
|
|
1951
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createFieldBody } } },
|
|
1952
|
+
responses: {
|
|
1953
|
+
"201": {
|
|
1954
|
+
description: "Created field",
|
|
1955
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(fieldResponseSchema) } }
|
|
1956
|
+
},
|
|
1957
|
+
...authErrors,
|
|
1958
|
+
...standardErrors(400, 409, 500)
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
},
|
|
1962
|
+
"/_emdash/api/schema/collections/{slug}/fields/{fieldSlug}": {
|
|
1963
|
+
get: {
|
|
1964
|
+
operationId: "getField",
|
|
1965
|
+
summary: "Get a field",
|
|
1966
|
+
tags: ["Schema"],
|
|
1967
|
+
requestParams: { path: z.object({
|
|
1968
|
+
slug: z.string().meta({ description: "Collection slug" }),
|
|
1969
|
+
fieldSlug: z.string().meta({ description: "Field slug" })
|
|
1970
|
+
}) },
|
|
1971
|
+
responses: {
|
|
1972
|
+
"200": {
|
|
1973
|
+
description: "Field",
|
|
1974
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(fieldResponseSchema) } }
|
|
1975
|
+
},
|
|
1976
|
+
...authErrors,
|
|
1977
|
+
...standardErrors(404, 500)
|
|
1978
|
+
}
|
|
1979
|
+
},
|
|
1980
|
+
put: {
|
|
1981
|
+
operationId: "updateField",
|
|
1982
|
+
summary: "Update a field",
|
|
1983
|
+
tags: ["Schema"],
|
|
1984
|
+
requestParams: { path: z.object({
|
|
1985
|
+
slug: z.string().meta({ description: "Collection slug" }),
|
|
1986
|
+
fieldSlug: z.string().meta({ description: "Field slug" })
|
|
1987
|
+
}) },
|
|
1988
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateFieldBody } } },
|
|
1989
|
+
responses: {
|
|
1990
|
+
"200": {
|
|
1991
|
+
description: "Updated field",
|
|
1992
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(fieldResponseSchema) } }
|
|
1993
|
+
},
|
|
1994
|
+
...authErrors,
|
|
1995
|
+
...standardErrors(400, 404, 500)
|
|
1996
|
+
}
|
|
1997
|
+
},
|
|
1998
|
+
delete: {
|
|
1999
|
+
operationId: "deleteField",
|
|
2000
|
+
summary: "Delete a field",
|
|
2001
|
+
tags: ["Schema"],
|
|
2002
|
+
requestParams: { path: z.object({
|
|
2003
|
+
slug: z.string().meta({ description: "Collection slug" }),
|
|
2004
|
+
fieldSlug: z.string().meta({ description: "Field slug" })
|
|
2005
|
+
}) },
|
|
2006
|
+
responses: {
|
|
2007
|
+
"200": {
|
|
2008
|
+
description: "Deleted",
|
|
2009
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2010
|
+
},
|
|
2011
|
+
...authErrors,
|
|
2012
|
+
...standardErrors(404, 500)
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
},
|
|
2016
|
+
"/_emdash/api/schema/collections/reorder": { post: {
|
|
2017
|
+
operationId: "reorderCollections",
|
|
2018
|
+
summary: "Reorder collections in the admin sidebar",
|
|
2019
|
+
description: "Sets the sidebar order. Collections omitted from the list lose their explicit position and fall back to alphabetical order after the ordered ones.",
|
|
2020
|
+
tags: ["Schema"],
|
|
2021
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: collectionReorderBody } } },
|
|
2022
|
+
responses: {
|
|
2023
|
+
"200": {
|
|
2024
|
+
description: "Reordered",
|
|
2025
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ success: z.literal(true) })) } }
|
|
2026
|
+
},
|
|
2027
|
+
...authErrors,
|
|
2028
|
+
...standardErrors(400, 404, 500)
|
|
2029
|
+
}
|
|
2030
|
+
} },
|
|
2031
|
+
"/_emdash/api/schema/collections/{slug}/fields/reorder": { post: {
|
|
2032
|
+
operationId: "reorderFields",
|
|
2033
|
+
summary: "Reorder fields in a collection",
|
|
2034
|
+
tags: ["Schema"],
|
|
2035
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Collection slug" }) }) },
|
|
2036
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: fieldReorderBody } } },
|
|
2037
|
+
responses: {
|
|
2038
|
+
"200": {
|
|
2039
|
+
description: "Reordered",
|
|
2040
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ success: z.literal(true) })) } }
|
|
2041
|
+
},
|
|
2042
|
+
...authErrors,
|
|
2043
|
+
...standardErrors(400, 404, 500)
|
|
2044
|
+
}
|
|
2045
|
+
} },
|
|
2046
|
+
"/_emdash/api/schema/orphans": { get: {
|
|
2047
|
+
operationId: "listOrphanedTables",
|
|
2048
|
+
summary: "List orphaned content tables",
|
|
2049
|
+
description: "Finds ec_* tables without matching collection definitions.",
|
|
2050
|
+
tags: ["Schema"],
|
|
2051
|
+
responses: {
|
|
2052
|
+
"200": {
|
|
2053
|
+
description: "Orphaned tables",
|
|
2054
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(orphanedTableListResponseSchema) } }
|
|
2055
|
+
},
|
|
2056
|
+
...authErrors,
|
|
2057
|
+
...standardErrors(500)
|
|
2058
|
+
}
|
|
2059
|
+
} },
|
|
2060
|
+
"/_emdash/api/schema/orphans/{slug}": { post: {
|
|
2061
|
+
operationId: "registerOrphanedTable",
|
|
2062
|
+
summary: "Register an orphaned table as a collection",
|
|
2063
|
+
tags: ["Schema"],
|
|
2064
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Table slug (without ec_ prefix)" }) }) },
|
|
2065
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: orphanRegisterBody } } },
|
|
2066
|
+
responses: {
|
|
2067
|
+
"201": {
|
|
2068
|
+
description: "Registered collection",
|
|
2069
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(collectionResponseSchema) } }
|
|
2070
|
+
},
|
|
2071
|
+
...authErrors,
|
|
2072
|
+
...standardErrors(400, 404, 500)
|
|
2073
|
+
}
|
|
2074
|
+
} }
|
|
2075
|
+
};
|
|
2076
|
+
const commentsPaths = {
|
|
2077
|
+
"/_emdash/api/comments/{collection}/{contentId}": {
|
|
2078
|
+
get: {
|
|
2079
|
+
operationId: "listPublicComments",
|
|
2080
|
+
summary: "List approved comments for content",
|
|
2081
|
+
description: "Public endpoint. Returns approved comments with optional threading.",
|
|
2082
|
+
tags: ["Comments"],
|
|
2083
|
+
requestParams: {
|
|
2084
|
+
path: z.object({
|
|
2085
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
2086
|
+
contentId: z.string().meta({ description: "Content ID" })
|
|
2087
|
+
}),
|
|
2088
|
+
query: z.object({
|
|
2089
|
+
limit: z.coerce.number().int().min(1).max(100).optional(),
|
|
2090
|
+
cursor: z.string().optional(),
|
|
2091
|
+
threaded: z.enum(["true", "false"]).transform((v) => v === "true").optional()
|
|
2092
|
+
})
|
|
2093
|
+
},
|
|
2094
|
+
responses: {
|
|
2095
|
+
"200": {
|
|
2096
|
+
description: "Comment list",
|
|
2097
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(publicCommentListResponseSchema) } }
|
|
2098
|
+
},
|
|
2099
|
+
...standardErrors(500)
|
|
2100
|
+
}
|
|
2101
|
+
},
|
|
2102
|
+
post: {
|
|
2103
|
+
operationId: "createComment",
|
|
2104
|
+
summary: "Submit a new comment",
|
|
2105
|
+
description: "Public endpoint. Comment enters moderation queue.",
|
|
2106
|
+
tags: ["Comments"],
|
|
2107
|
+
requestParams: { path: z.object({
|
|
2108
|
+
collection: z.string().meta({ description: "Collection slug" }),
|
|
2109
|
+
contentId: z.string().meta({ description: "Content ID" })
|
|
2110
|
+
}) },
|
|
2111
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createCommentBody } } },
|
|
2112
|
+
responses: {
|
|
2113
|
+
"201": {
|
|
2114
|
+
description: "Comment created (pending moderation)",
|
|
2115
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({
|
|
2116
|
+
id: z.string(),
|
|
2117
|
+
status: z.string()
|
|
2118
|
+
})) } }
|
|
2119
|
+
},
|
|
2120
|
+
...standardErrors(400, 429, 500)
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
},
|
|
2124
|
+
"/_emdash/api/admin/comments": { get: {
|
|
2125
|
+
operationId: "listAdminComments",
|
|
2126
|
+
summary: "List comments for moderation",
|
|
2127
|
+
tags: ["Comments"],
|
|
2128
|
+
requestParams: { query: commentListQuery },
|
|
2129
|
+
responses: {
|
|
2130
|
+
"200": {
|
|
2131
|
+
description: "Comment moderation inbox",
|
|
2132
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(adminCommentListResponseSchema) } }
|
|
2133
|
+
},
|
|
2134
|
+
...authErrors,
|
|
2135
|
+
...standardErrors(500)
|
|
2136
|
+
}
|
|
2137
|
+
} },
|
|
2138
|
+
"/_emdash/api/admin/comments/counts": { get: {
|
|
2139
|
+
operationId: "getCommentCounts",
|
|
2140
|
+
summary: "Get comment status counts",
|
|
2141
|
+
tags: ["Comments"],
|
|
2142
|
+
responses: {
|
|
2143
|
+
"200": {
|
|
2144
|
+
description: "Counts by status",
|
|
2145
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(commentCountsResponseSchema) } }
|
|
2146
|
+
},
|
|
2147
|
+
...authErrors,
|
|
2148
|
+
...standardErrors(500)
|
|
2149
|
+
}
|
|
2150
|
+
} },
|
|
2151
|
+
"/_emdash/api/admin/comments/bulk": { post: {
|
|
2152
|
+
operationId: "bulkCommentAction",
|
|
2153
|
+
summary: "Bulk approve, spam, trash, or delete comments",
|
|
2154
|
+
tags: ["Comments"],
|
|
2155
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: commentBulkBody } } },
|
|
2156
|
+
responses: {
|
|
2157
|
+
"200": {
|
|
2158
|
+
description: "Bulk action result",
|
|
2159
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(commentBulkResponseSchema) } }
|
|
2160
|
+
},
|
|
2161
|
+
...authErrors,
|
|
2162
|
+
...standardErrors(400, 500)
|
|
2163
|
+
}
|
|
2164
|
+
} },
|
|
2165
|
+
"/_emdash/api/admin/comments/{id}": {
|
|
2166
|
+
get: {
|
|
2167
|
+
operationId: "getComment",
|
|
2168
|
+
summary: "Get a single comment",
|
|
2169
|
+
tags: ["Comments"],
|
|
2170
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Comment ID" }) }) },
|
|
2171
|
+
responses: {
|
|
2172
|
+
"200": {
|
|
2173
|
+
description: "Comment",
|
|
2174
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(commentSchema) } }
|
|
2175
|
+
},
|
|
2176
|
+
...authErrors,
|
|
2177
|
+
...standardErrors(404, 500)
|
|
2178
|
+
}
|
|
2179
|
+
},
|
|
2180
|
+
delete: {
|
|
2181
|
+
operationId: "deleteComment",
|
|
2182
|
+
summary: "Permanently delete a comment",
|
|
2183
|
+
tags: ["Comments"],
|
|
2184
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Comment ID" }) }) },
|
|
2185
|
+
responses: {
|
|
2186
|
+
"200": {
|
|
2187
|
+
description: "Deleted",
|
|
2188
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2189
|
+
},
|
|
2190
|
+
...authErrors,
|
|
2191
|
+
...standardErrors(404, 500)
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
},
|
|
2195
|
+
"/_emdash/api/admin/comments/{id}/status": { put: {
|
|
2196
|
+
operationId: "updateCommentStatus",
|
|
2197
|
+
summary: "Change comment status",
|
|
2198
|
+
tags: ["Comments"],
|
|
2199
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Comment ID" }) }) },
|
|
2200
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: commentStatusBody } } },
|
|
2201
|
+
responses: {
|
|
2202
|
+
"200": {
|
|
2203
|
+
description: "Updated comment",
|
|
2204
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(commentSchema) } }
|
|
2205
|
+
},
|
|
2206
|
+
...authErrors,
|
|
2207
|
+
...standardErrors(400, 404, 500)
|
|
2208
|
+
}
|
|
2209
|
+
} }
|
|
2210
|
+
};
|
|
2211
|
+
const taxonomyPaths = {
|
|
2212
|
+
"/_emdash/api/taxonomies": { get: {
|
|
2213
|
+
operationId: "listTaxonomies",
|
|
2214
|
+
summary: "List all taxonomy definitions",
|
|
2215
|
+
tags: ["Taxonomies"],
|
|
2216
|
+
responses: {
|
|
2217
|
+
"200": {
|
|
2218
|
+
description: "Taxonomy list",
|
|
2219
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(taxonomyListResponseSchema) } }
|
|
2220
|
+
},
|
|
2221
|
+
...authErrors,
|
|
2222
|
+
...standardErrors(500)
|
|
2223
|
+
}
|
|
2224
|
+
} },
|
|
2225
|
+
"/_emdash/api/taxonomies/{name}": {
|
|
2226
|
+
get: {
|
|
2227
|
+
operationId: "getTaxonomy",
|
|
2228
|
+
summary: "Get a taxonomy definition",
|
|
2229
|
+
description: "Definitions are per-locale; `locale` picks one. Without it the configured default locale is returned, falling back to the lowest locale code.",
|
|
2230
|
+
tags: ["Taxonomies"],
|
|
2231
|
+
requestParams: {
|
|
2232
|
+
path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }),
|
|
2233
|
+
query: z.object({ locale: z.string().optional().meta({ description: "Locale filter" }) })
|
|
2234
|
+
},
|
|
2235
|
+
responses: {
|
|
2236
|
+
"200": {
|
|
2237
|
+
description: "Taxonomy definition",
|
|
2238
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(taxonomyResponseSchema) } }
|
|
2239
|
+
},
|
|
2240
|
+
...authErrors,
|
|
2241
|
+
...standardErrors(400, 404, 500)
|
|
2242
|
+
}
|
|
2243
|
+
},
|
|
2244
|
+
put: {
|
|
2245
|
+
operationId: "updateTaxonomy",
|
|
2246
|
+
summary: "Update a taxonomy definition",
|
|
2247
|
+
description: "Writes `label` and `labelSingular` to the single definition `name` + `locale` resolves to. `hierarchical` and `collections` belong to the taxonomy and change for every locale. `name` and `locale` cannot be changed — terms are keyed on `name`, and each locale is its own definition row.",
|
|
2248
|
+
tags: ["Taxonomies"],
|
|
2249
|
+
requestParams: {
|
|
2250
|
+
path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }),
|
|
2251
|
+
query: z.object({ locale: z.string().optional().meta({ description: "Locale of the definition to update" }) })
|
|
2252
|
+
},
|
|
2253
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateTaxonomyDefBody } } },
|
|
2254
|
+
responses: {
|
|
2255
|
+
"200": {
|
|
2256
|
+
description: "Updated taxonomy definition",
|
|
2257
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(taxonomyResponseSchema) } }
|
|
2258
|
+
},
|
|
2259
|
+
...authErrors,
|
|
2260
|
+
...standardErrors(400, 404, 500)
|
|
2261
|
+
}
|
|
2262
|
+
},
|
|
2263
|
+
delete: {
|
|
2264
|
+
operationId: "deleteTaxonomy",
|
|
2265
|
+
summary: "Delete a taxonomy, its terms, and their content assignments",
|
|
2266
|
+
description: "Destructive and unscoped: every locale's definition goes, along with every term under the name and the assignments those terms hold. There is no locale parameter and no guard on a taxonomy that is still in use.",
|
|
2267
|
+
tags: ["Taxonomies"],
|
|
2268
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }) },
|
|
2269
|
+
responses: {
|
|
2270
|
+
"200": {
|
|
2271
|
+
description: "Deleted",
|
|
2272
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2273
|
+
},
|
|
2274
|
+
...authErrors,
|
|
2275
|
+
...standardErrors(404, 500)
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
},
|
|
2279
|
+
"/_emdash/api/taxonomies/{name}/translations": { get: {
|
|
2280
|
+
operationId: "listTaxonomyTranslations",
|
|
2281
|
+
summary: "List every locale variant of a taxonomy definition",
|
|
2282
|
+
description: "Create a translation with `POST /_emdash/api/taxonomies` and `translationOf` set to a definition id from this list.",
|
|
2283
|
+
tags: ["Taxonomies"],
|
|
2284
|
+
requestParams: {
|
|
2285
|
+
path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }),
|
|
2286
|
+
query: z.object({ locale: z.string().optional().meta({ description: "Locale of the definition to resolve the group from" }) })
|
|
2287
|
+
},
|
|
2288
|
+
responses: {
|
|
2289
|
+
"200": {
|
|
2290
|
+
description: "Translations sharing a translation_group",
|
|
2291
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(taxonomyDefTranslationsSchema) } }
|
|
2292
|
+
},
|
|
2293
|
+
...authErrors,
|
|
2294
|
+
...standardErrors(400, 404, 500)
|
|
2295
|
+
}
|
|
2296
|
+
} },
|
|
2297
|
+
"/_emdash/api/taxonomies/{name}/reorder": { post: {
|
|
2298
|
+
operationId: "reorderTerms",
|
|
2299
|
+
summary: "Set the manual order of one sibling group of terms",
|
|
2300
|
+
description: "`ids` names the terms to move, in the desired order, and may be a subset of the group — the listed terms are permuted within the positions they already occupy. A position belongs to a term across every locale, so there is no `locale` parameter. Ordering never reparents — use the term update endpoint to change a parent.",
|
|
2301
|
+
tags: ["Taxonomies"],
|
|
2302
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }) },
|
|
2303
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: reorderTermsBody } } },
|
|
2304
|
+
responses: {
|
|
2305
|
+
"200": {
|
|
2306
|
+
description: "The group in its new order",
|
|
2307
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(termReorderResponseSchema) } }
|
|
2308
|
+
},
|
|
2309
|
+
...authErrors,
|
|
2310
|
+
...standardErrors(400, 404, 500)
|
|
2311
|
+
}
|
|
2312
|
+
} },
|
|
2313
|
+
"/_emdash/api/taxonomies/{name}/terms": {
|
|
2314
|
+
get: {
|
|
2315
|
+
operationId: "listTerms",
|
|
2316
|
+
summary: "List terms for a taxonomy",
|
|
2317
|
+
description: "Returns a tree for hierarchical taxonomies, flat list otherwise.",
|
|
2318
|
+
tags: ["Taxonomies"],
|
|
2319
|
+
requestParams: {
|
|
2320
|
+
path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }),
|
|
2321
|
+
query: termListQuery
|
|
2322
|
+
},
|
|
2323
|
+
responses: {
|
|
2324
|
+
"200": {
|
|
2325
|
+
description: "Term list",
|
|
2326
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(termListResponseSchema) } }
|
|
2327
|
+
},
|
|
2328
|
+
...authErrors,
|
|
2329
|
+
...standardErrors(404, 500)
|
|
2330
|
+
}
|
|
2331
|
+
},
|
|
2332
|
+
post: {
|
|
2333
|
+
operationId: "createTerm",
|
|
2334
|
+
summary: "Create a term",
|
|
2335
|
+
tags: ["Taxonomies"],
|
|
2336
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Taxonomy name" }) }) },
|
|
2337
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createTermBody } } },
|
|
2338
|
+
responses: {
|
|
2339
|
+
"201": {
|
|
2340
|
+
description: "Created term",
|
|
2341
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(termResponseSchema) } }
|
|
2342
|
+
},
|
|
2343
|
+
...authErrors,
|
|
2344
|
+
...standardErrors(400, 409, 500)
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
},
|
|
2348
|
+
"/_emdash/api/taxonomies/{name}/terms/{slug}": {
|
|
2349
|
+
get: {
|
|
2350
|
+
operationId: "getTerm",
|
|
2351
|
+
summary: "Get a term by slug",
|
|
2352
|
+
tags: ["Taxonomies"],
|
|
2353
|
+
requestParams: { path: z.object({
|
|
2354
|
+
name: z.string().meta({ description: "Taxonomy name" }),
|
|
2355
|
+
slug: z.string().meta({ description: "Term slug" })
|
|
2356
|
+
}) },
|
|
2357
|
+
responses: {
|
|
2358
|
+
"200": {
|
|
2359
|
+
description: "Term with children and count",
|
|
2360
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(termGetResponseSchema) } }
|
|
2361
|
+
},
|
|
2362
|
+
...authErrors,
|
|
2363
|
+
...standardErrors(404, 500)
|
|
2364
|
+
}
|
|
2365
|
+
},
|
|
2366
|
+
put: {
|
|
2367
|
+
operationId: "updateTerm",
|
|
2368
|
+
summary: "Update a term",
|
|
2369
|
+
tags: ["Taxonomies"],
|
|
2370
|
+
requestParams: { path: z.object({
|
|
2371
|
+
name: z.string().meta({ description: "Taxonomy name" }),
|
|
2372
|
+
slug: z.string().meta({ description: "Term slug" })
|
|
2373
|
+
}) },
|
|
2374
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateTermBody } } },
|
|
2375
|
+
responses: {
|
|
2376
|
+
"200": {
|
|
2377
|
+
description: "Updated term",
|
|
2378
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(termResponseSchema) } }
|
|
2379
|
+
},
|
|
2380
|
+
...authErrors,
|
|
2381
|
+
...standardErrors(400, 404, 409, 500)
|
|
2382
|
+
}
|
|
2383
|
+
},
|
|
2384
|
+
delete: {
|
|
2385
|
+
operationId: "deleteTerm",
|
|
2386
|
+
summary: "Delete a term",
|
|
2387
|
+
tags: ["Taxonomies"],
|
|
2388
|
+
requestParams: { path: z.object({
|
|
2389
|
+
name: z.string().meta({ description: "Taxonomy name" }),
|
|
2390
|
+
slug: z.string().meta({ description: "Term slug" })
|
|
2391
|
+
}) },
|
|
2392
|
+
responses: {
|
|
2393
|
+
"200": {
|
|
2394
|
+
description: "Deleted",
|
|
2395
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2396
|
+
},
|
|
2397
|
+
...authErrors,
|
|
2398
|
+
...standardErrors(400, 404, 500)
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
};
|
|
2403
|
+
const menuPaths = {
|
|
2404
|
+
"/_emdash/api/menus": {
|
|
2405
|
+
get: {
|
|
2406
|
+
operationId: "listMenus",
|
|
2407
|
+
summary: "List all menus with item counts",
|
|
2408
|
+
tags: ["Menus"],
|
|
2409
|
+
responses: {
|
|
2410
|
+
"200": {
|
|
2411
|
+
description: "Menu list",
|
|
2412
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.array(menuListItemSchema)) } }
|
|
2413
|
+
},
|
|
2414
|
+
...authErrors,
|
|
2415
|
+
...standardErrors(500)
|
|
2416
|
+
}
|
|
2417
|
+
},
|
|
2418
|
+
post: {
|
|
2419
|
+
operationId: "createMenu",
|
|
2420
|
+
summary: "Create a menu",
|
|
2421
|
+
tags: ["Menus"],
|
|
2422
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createMenuBody } } },
|
|
2423
|
+
responses: {
|
|
2424
|
+
"201": {
|
|
2425
|
+
description: "Created menu",
|
|
2426
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(menuWithItemsSchema) } }
|
|
2427
|
+
},
|
|
2428
|
+
...authErrors,
|
|
2429
|
+
...standardErrors(400, 409, 500)
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
},
|
|
2433
|
+
"/_emdash/api/menus/{name}": {
|
|
2434
|
+
get: {
|
|
2435
|
+
operationId: "getMenu",
|
|
2436
|
+
summary: "Get a menu with all items",
|
|
2437
|
+
tags: ["Menus"],
|
|
2438
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Menu name" }) }) },
|
|
2439
|
+
responses: {
|
|
2440
|
+
"200": {
|
|
2441
|
+
description: "Menu with items",
|
|
2442
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(menuWithItemsSchema) } }
|
|
2443
|
+
},
|
|
2444
|
+
...authErrors,
|
|
2445
|
+
...standardErrors(404, 500)
|
|
2446
|
+
}
|
|
2447
|
+
},
|
|
2448
|
+
put: {
|
|
2449
|
+
operationId: "updateMenu",
|
|
2450
|
+
summary: "Update a menu",
|
|
2451
|
+
tags: ["Menus"],
|
|
2452
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Menu name" }) }) },
|
|
2453
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateMenuBody } } },
|
|
2454
|
+
responses: {
|
|
2455
|
+
"200": {
|
|
2456
|
+
description: "Updated menu",
|
|
2457
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(menuWithItemsSchema) } }
|
|
2458
|
+
},
|
|
2459
|
+
...authErrors,
|
|
2460
|
+
...standardErrors(404, 500)
|
|
2461
|
+
}
|
|
2462
|
+
},
|
|
2463
|
+
delete: {
|
|
2464
|
+
operationId: "deleteMenu",
|
|
2465
|
+
summary: "Delete a menu and its items",
|
|
2466
|
+
tags: ["Menus"],
|
|
2467
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Menu name" }) }) },
|
|
2468
|
+
responses: {
|
|
2469
|
+
"200": {
|
|
2470
|
+
description: "Deleted",
|
|
2471
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2472
|
+
},
|
|
2473
|
+
...authErrors,
|
|
2474
|
+
...standardErrors(404, 500)
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
},
|
|
2478
|
+
"/_emdash/api/menus/{name}/items": { post: {
|
|
2479
|
+
operationId: "createMenuItem",
|
|
2480
|
+
summary: "Add an item to a menu",
|
|
2481
|
+
tags: ["Menus"],
|
|
2482
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Menu name" }) }) },
|
|
2483
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createMenuItemBody } } },
|
|
2484
|
+
responses: {
|
|
2485
|
+
"201": {
|
|
2486
|
+
description: "Created menu item",
|
|
2487
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(menuItemSchema) } }
|
|
2488
|
+
},
|
|
2489
|
+
...authErrors,
|
|
2490
|
+
...standardErrors(400, 404, 500)
|
|
2491
|
+
}
|
|
2492
|
+
} },
|
|
2493
|
+
"/_emdash/api/menus/{name}/items/{id}": {
|
|
2494
|
+
put: {
|
|
2495
|
+
operationId: "updateMenuItem",
|
|
2496
|
+
summary: "Update a menu item",
|
|
2497
|
+
tags: ["Menus"],
|
|
2498
|
+
requestParams: { path: z.object({
|
|
2499
|
+
name: z.string().meta({ description: "Menu name" }),
|
|
2500
|
+
id: z.string().meta({ description: "Menu item id" })
|
|
2501
|
+
}) },
|
|
2502
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateMenuItemBody } } },
|
|
2503
|
+
responses: {
|
|
2504
|
+
"200": {
|
|
2505
|
+
description: "Updated menu item",
|
|
2506
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(menuItemSchema) } }
|
|
2507
|
+
},
|
|
2508
|
+
...authErrors,
|
|
2509
|
+
...standardErrors(400, 404, 500)
|
|
2510
|
+
}
|
|
2511
|
+
},
|
|
2512
|
+
delete: {
|
|
2513
|
+
operationId: "deleteMenuItem",
|
|
2514
|
+
summary: "Delete a menu item",
|
|
2515
|
+
tags: ["Menus"],
|
|
2516
|
+
requestParams: { path: z.object({
|
|
2517
|
+
name: z.string().meta({ description: "Menu name" }),
|
|
2518
|
+
id: z.string().meta({ description: "Menu item id" })
|
|
2519
|
+
}) },
|
|
2520
|
+
responses: {
|
|
2521
|
+
"200": {
|
|
2522
|
+
description: "Deleted",
|
|
2523
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2524
|
+
},
|
|
2525
|
+
...authErrors,
|
|
2526
|
+
...standardErrors(404, 500)
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
},
|
|
2530
|
+
"/_emdash/api/menus/{name}/reorder": { post: {
|
|
2531
|
+
operationId: "reorderMenuItems",
|
|
2532
|
+
summary: "Batch reorder menu items",
|
|
2533
|
+
tags: ["Menus"],
|
|
2534
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Menu name" }) }) },
|
|
2535
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: reorderMenuItemsBody } } },
|
|
2536
|
+
responses: {
|
|
2537
|
+
"200": {
|
|
2538
|
+
description: "Reordered items",
|
|
2539
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.array(menuItemSchema)) } }
|
|
2540
|
+
},
|
|
2541
|
+
...authErrors,
|
|
2542
|
+
...standardErrors(400, 404, 500)
|
|
2543
|
+
}
|
|
2544
|
+
} }
|
|
2545
|
+
};
|
|
2546
|
+
const sectionPaths = {
|
|
2547
|
+
"/_emdash/api/sections": {
|
|
2548
|
+
get: {
|
|
2549
|
+
operationId: "listSections",
|
|
2550
|
+
summary: "List sections",
|
|
2551
|
+
tags: ["Sections"],
|
|
2552
|
+
requestParams: { query: sectionsListQuery },
|
|
2553
|
+
responses: {
|
|
2554
|
+
"200": {
|
|
2555
|
+
description: "Section list",
|
|
2556
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(sectionListResponseSchema) } }
|
|
2557
|
+
},
|
|
2558
|
+
...authErrors,
|
|
2559
|
+
...standardErrors(500)
|
|
2560
|
+
}
|
|
2561
|
+
},
|
|
2562
|
+
post: {
|
|
2563
|
+
operationId: "createSection",
|
|
2564
|
+
summary: "Create a section",
|
|
2565
|
+
tags: ["Sections"],
|
|
2566
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createSectionBody } } },
|
|
2567
|
+
responses: {
|
|
2568
|
+
"201": {
|
|
2569
|
+
description: "Created section",
|
|
2570
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(sectionSchema) } }
|
|
2571
|
+
},
|
|
2572
|
+
...authErrors,
|
|
2573
|
+
...standardErrors(400, 409, 500)
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
},
|
|
2577
|
+
"/_emdash/api/sections/{slug}": {
|
|
2578
|
+
get: {
|
|
2579
|
+
operationId: "getSection",
|
|
2580
|
+
summary: "Get a section by slug",
|
|
2581
|
+
tags: ["Sections"],
|
|
2582
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Section slug" }) }) },
|
|
2583
|
+
responses: {
|
|
2584
|
+
"200": {
|
|
2585
|
+
description: "Section",
|
|
2586
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(sectionSchema) } }
|
|
2587
|
+
},
|
|
2588
|
+
...authErrors,
|
|
2589
|
+
...standardErrors(404, 500)
|
|
2590
|
+
}
|
|
2591
|
+
},
|
|
2592
|
+
put: {
|
|
2593
|
+
operationId: "updateSection",
|
|
2594
|
+
summary: "Update a section",
|
|
2595
|
+
tags: ["Sections"],
|
|
2596
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Section slug" }) }) },
|
|
2597
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateSectionBody } } },
|
|
2598
|
+
responses: {
|
|
2599
|
+
"200": {
|
|
2600
|
+
description: "Updated section",
|
|
2601
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(sectionSchema) } }
|
|
2602
|
+
},
|
|
2603
|
+
...authErrors,
|
|
2604
|
+
...standardErrors(400, 404, 409, 500)
|
|
2605
|
+
}
|
|
2606
|
+
},
|
|
2607
|
+
delete: {
|
|
2608
|
+
operationId: "deleteSection",
|
|
2609
|
+
summary: "Delete a section",
|
|
2610
|
+
tags: ["Sections"],
|
|
2611
|
+
requestParams: { path: z.object({ slug: z.string().meta({ description: "Section slug" }) }) },
|
|
2612
|
+
responses: {
|
|
2613
|
+
"200": {
|
|
2614
|
+
description: "Deleted",
|
|
2615
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2616
|
+
},
|
|
2617
|
+
...authErrors,
|
|
2618
|
+
...standardErrors(403, 404, 500)
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
};
|
|
2623
|
+
const widgetPaths = {
|
|
2624
|
+
"/_emdash/api/widget-areas": {
|
|
2625
|
+
get: {
|
|
2626
|
+
operationId: "listWidgetAreas",
|
|
2627
|
+
summary: "List all widget areas",
|
|
2628
|
+
tags: ["Widgets"],
|
|
2629
|
+
responses: {
|
|
2630
|
+
"200": {
|
|
2631
|
+
description: "Widget area list",
|
|
2632
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ items: z.array(widgetAreaWithWidgetsAndCountSchema) })) } }
|
|
2633
|
+
},
|
|
2634
|
+
...authErrors,
|
|
2635
|
+
...standardErrors(500)
|
|
2636
|
+
}
|
|
2637
|
+
},
|
|
2638
|
+
post: {
|
|
2639
|
+
operationId: "createWidgetArea",
|
|
2640
|
+
summary: "Create a widget area",
|
|
2641
|
+
tags: ["Widgets"],
|
|
2642
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createWidgetAreaBody } } },
|
|
2643
|
+
responses: {
|
|
2644
|
+
"201": {
|
|
2645
|
+
description: "Created widget area",
|
|
2646
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(widgetAreaSchema) } }
|
|
2647
|
+
},
|
|
2648
|
+
...authErrors,
|
|
2649
|
+
...standardErrors(400, 409, 500)
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
},
|
|
2653
|
+
"/_emdash/api/widget-areas/{name}": {
|
|
2654
|
+
get: {
|
|
2655
|
+
operationId: "getWidgetArea",
|
|
2656
|
+
summary: "Get a widget area with widgets",
|
|
2657
|
+
tags: ["Widgets"],
|
|
2658
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Widget area name" }) }) },
|
|
2659
|
+
responses: {
|
|
2660
|
+
"200": {
|
|
2661
|
+
description: "Widget area with widgets",
|
|
2662
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(widgetAreaWithWidgetsSchema) } }
|
|
2663
|
+
},
|
|
2664
|
+
...authErrors,
|
|
2665
|
+
...standardErrors(404, 500)
|
|
2666
|
+
}
|
|
2667
|
+
},
|
|
2668
|
+
delete: {
|
|
2669
|
+
operationId: "deleteWidgetArea",
|
|
2670
|
+
summary: "Delete a widget area and its widgets",
|
|
2671
|
+
tags: ["Widgets"],
|
|
2672
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Widget area name" }) }) },
|
|
2673
|
+
responses: {
|
|
2674
|
+
"200": {
|
|
2675
|
+
description: "Deleted",
|
|
2676
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2677
|
+
},
|
|
2678
|
+
...authErrors,
|
|
2679
|
+
...standardErrors(404, 500)
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
},
|
|
2683
|
+
"/_emdash/api/widget-areas/{name}/widgets": { post: {
|
|
2684
|
+
operationId: "createWidget",
|
|
2685
|
+
summary: "Add a widget to an area",
|
|
2686
|
+
tags: ["Widgets"],
|
|
2687
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Widget area name" }) }) },
|
|
2688
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createWidgetBody } } },
|
|
2689
|
+
responses: {
|
|
2690
|
+
"201": {
|
|
2691
|
+
description: "Created widget",
|
|
2692
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(widgetSchema) } }
|
|
2693
|
+
},
|
|
2694
|
+
...authErrors,
|
|
2695
|
+
...standardErrors(400, 404, 500)
|
|
2696
|
+
}
|
|
2697
|
+
} },
|
|
2698
|
+
"/_emdash/api/widget-areas/{name}/widgets/{id}": {
|
|
2699
|
+
put: {
|
|
2700
|
+
operationId: "updateWidget",
|
|
2701
|
+
summary: "Update a widget",
|
|
2702
|
+
tags: ["Widgets"],
|
|
2703
|
+
requestParams: { path: z.object({
|
|
2704
|
+
name: z.string().meta({ description: "Widget area name" }),
|
|
2705
|
+
id: z.string().meta({ description: "Widget ID" })
|
|
2706
|
+
}) },
|
|
2707
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateWidgetBody } } },
|
|
2708
|
+
responses: {
|
|
2709
|
+
"200": {
|
|
2710
|
+
description: "Updated widget",
|
|
2711
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(widgetSchema) } }
|
|
2712
|
+
},
|
|
2713
|
+
...authErrors,
|
|
2714
|
+
...standardErrors(400, 404, 500)
|
|
2715
|
+
}
|
|
2716
|
+
},
|
|
2717
|
+
delete: {
|
|
2718
|
+
operationId: "deleteWidget",
|
|
2719
|
+
summary: "Delete a widget",
|
|
2720
|
+
tags: ["Widgets"],
|
|
2721
|
+
requestParams: { path: z.object({
|
|
2722
|
+
name: z.string().meta({ description: "Widget area name" }),
|
|
2723
|
+
id: z.string().meta({ description: "Widget ID" })
|
|
2724
|
+
}) },
|
|
2725
|
+
responses: {
|
|
2726
|
+
"200": {
|
|
2727
|
+
description: "Deleted",
|
|
2728
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2729
|
+
},
|
|
2730
|
+
...authErrors,
|
|
2731
|
+
...standardErrors(404, 500)
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
},
|
|
2735
|
+
"/_emdash/api/widget-areas/{name}/reorder": { post: {
|
|
2736
|
+
operationId: "reorderWidgets",
|
|
2737
|
+
summary: "Reorder widgets in an area",
|
|
2738
|
+
tags: ["Widgets"],
|
|
2739
|
+
requestParams: { path: z.object({ name: z.string().meta({ description: "Widget area name" }) }) },
|
|
2740
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: reorderWidgetsBody } } },
|
|
2741
|
+
responses: {
|
|
2742
|
+
"200": {
|
|
2743
|
+
description: "Reordered",
|
|
2744
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ success: z.literal(true) })) } }
|
|
2745
|
+
},
|
|
2746
|
+
...authErrors,
|
|
2747
|
+
...standardErrors(400, 404, 500)
|
|
2748
|
+
}
|
|
2749
|
+
} }
|
|
2750
|
+
};
|
|
2751
|
+
const settingsPaths = { "/_emdash/api/settings": {
|
|
2752
|
+
get: {
|
|
2753
|
+
operationId: "getSettings",
|
|
2754
|
+
summary: "Get site settings",
|
|
2755
|
+
tags: ["Settings"],
|
|
2756
|
+
responses: {
|
|
2757
|
+
"200": {
|
|
2758
|
+
description: "Site settings",
|
|
2759
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(siteSettingsSchema) } }
|
|
2760
|
+
},
|
|
2761
|
+
...authErrors,
|
|
2762
|
+
...standardErrors(500)
|
|
2763
|
+
}
|
|
2764
|
+
},
|
|
2765
|
+
put: {
|
|
2766
|
+
operationId: "updateSettings",
|
|
2767
|
+
summary: "Update site settings",
|
|
2768
|
+
tags: ["Settings"],
|
|
2769
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: settingsUpdateBody } } },
|
|
2770
|
+
responses: {
|
|
2771
|
+
"200": {
|
|
2772
|
+
description: "Updated settings",
|
|
2773
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(siteSettingsSchema) } }
|
|
2774
|
+
},
|
|
2775
|
+
...authErrors,
|
|
2776
|
+
...standardErrors(400, 500)
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
} };
|
|
2780
|
+
const searchPaths = {
|
|
2781
|
+
"/_emdash/api/search": { get: {
|
|
2782
|
+
operationId: "search",
|
|
2783
|
+
summary: "Full-text search across collections",
|
|
2784
|
+
tags: ["Search"],
|
|
2785
|
+
requestParams: { query: searchQuery },
|
|
2786
|
+
responses: {
|
|
2787
|
+
"200": {
|
|
2788
|
+
description: "Search results",
|
|
2789
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(searchResponseSchema) } }
|
|
2790
|
+
},
|
|
2791
|
+
...authErrors,
|
|
2792
|
+
...standardErrors(500)
|
|
2793
|
+
}
|
|
2794
|
+
} },
|
|
2795
|
+
"/_emdash/api/search/suggest": { get: {
|
|
2796
|
+
operationId: "searchSuggest",
|
|
2797
|
+
summary: "Autocomplete search suggestions",
|
|
2798
|
+
tags: ["Search"],
|
|
2799
|
+
requestParams: { query: searchSuggestQuery },
|
|
2800
|
+
responses: {
|
|
2801
|
+
"200": {
|
|
2802
|
+
description: "Search suggestions",
|
|
2803
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(searchResponseSchema) } }
|
|
2804
|
+
},
|
|
2805
|
+
...authErrors,
|
|
2806
|
+
...standardErrors(500)
|
|
2807
|
+
}
|
|
2808
|
+
} },
|
|
2809
|
+
"/_emdash/api/search/rebuild": { post: {
|
|
2810
|
+
operationId: "rebuildSearchIndex",
|
|
2811
|
+
summary: "Rebuild the search index for a collection",
|
|
2812
|
+
tags: ["Search"],
|
|
2813
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: searchRebuildBody } } },
|
|
2814
|
+
responses: {
|
|
2815
|
+
"200": {
|
|
2816
|
+
description: "Rebuild started",
|
|
2817
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({
|
|
2818
|
+
collection: z.string(),
|
|
2819
|
+
indexed: z.number().int()
|
|
2820
|
+
})) } }
|
|
2821
|
+
},
|
|
2822
|
+
...authErrors,
|
|
2823
|
+
...standardErrors(400, 500)
|
|
2824
|
+
}
|
|
2825
|
+
} },
|
|
2826
|
+
"/_emdash/api/search/enable": { post: {
|
|
2827
|
+
operationId: "enableSearch",
|
|
2828
|
+
summary: "Enable or disable search for a collection",
|
|
2829
|
+
tags: ["Search"],
|
|
2830
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: searchEnableBody } } },
|
|
2831
|
+
responses: {
|
|
2832
|
+
"200": {
|
|
2833
|
+
description: "Search config updated",
|
|
2834
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({
|
|
2835
|
+
collection: z.string(),
|
|
2836
|
+
enabled: z.boolean()
|
|
2837
|
+
})) } }
|
|
2838
|
+
},
|
|
2839
|
+
...authErrors,
|
|
2840
|
+
...standardErrors(400, 500)
|
|
2841
|
+
}
|
|
2842
|
+
} },
|
|
2843
|
+
"/_emdash/api/search/stats": { get: {
|
|
2844
|
+
operationId: "getSearchStats",
|
|
2845
|
+
summary: "Get search index statistics",
|
|
2846
|
+
tags: ["Search"],
|
|
2847
|
+
responses: {
|
|
2848
|
+
"200": {
|
|
2849
|
+
description: "Search stats per collection",
|
|
2850
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ collections: z.array(z.object({
|
|
2851
|
+
collection: z.string(),
|
|
2852
|
+
enabled: z.boolean(),
|
|
2853
|
+
indexed: z.number().int()
|
|
2854
|
+
})) })) } }
|
|
2855
|
+
},
|
|
2856
|
+
...authErrors,
|
|
2857
|
+
...standardErrors(500)
|
|
2858
|
+
}
|
|
2859
|
+
} }
|
|
2860
|
+
};
|
|
2861
|
+
const redirectPaths = {
|
|
2862
|
+
"/_emdash/api/redirects": {
|
|
2863
|
+
get: {
|
|
2864
|
+
operationId: "listRedirects",
|
|
2865
|
+
summary: "List redirects",
|
|
2866
|
+
tags: ["Redirects"],
|
|
2867
|
+
requestParams: { query: redirectsListQuery },
|
|
2868
|
+
responses: {
|
|
2869
|
+
"200": {
|
|
2870
|
+
description: "Redirect list",
|
|
2871
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(redirectListResponseSchema) } }
|
|
2872
|
+
},
|
|
2873
|
+
...authErrors,
|
|
2874
|
+
...standardErrors(500)
|
|
2875
|
+
}
|
|
2876
|
+
},
|
|
2877
|
+
post: {
|
|
2878
|
+
operationId: "createRedirect",
|
|
2879
|
+
summary: "Create a redirect rule",
|
|
2880
|
+
tags: ["Redirects"],
|
|
2881
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: createRedirectBody } } },
|
|
2882
|
+
responses: {
|
|
2883
|
+
"201": {
|
|
2884
|
+
description: "Created redirect",
|
|
2885
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(redirectSchema) } }
|
|
2886
|
+
},
|
|
2887
|
+
...authErrors,
|
|
2888
|
+
...standardErrors(400, 409, 500)
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
},
|
|
2892
|
+
"/_emdash/api/redirects/{id}": {
|
|
2893
|
+
get: {
|
|
2894
|
+
operationId: "getRedirect",
|
|
2895
|
+
summary: "Get a redirect",
|
|
2896
|
+
tags: ["Redirects"],
|
|
2897
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Redirect ID" }) }) },
|
|
2898
|
+
responses: {
|
|
2899
|
+
"200": {
|
|
2900
|
+
description: "Redirect",
|
|
2901
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(redirectSchema) } }
|
|
2902
|
+
},
|
|
2903
|
+
...authErrors,
|
|
2904
|
+
...standardErrors(404, 500)
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
put: {
|
|
2908
|
+
operationId: "updateRedirect",
|
|
2909
|
+
summary: "Update a redirect",
|
|
2910
|
+
tags: ["Redirects"],
|
|
2911
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Redirect ID" }) }) },
|
|
2912
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: updateRedirectBody } } },
|
|
2913
|
+
responses: {
|
|
2914
|
+
"200": {
|
|
2915
|
+
description: "Updated redirect",
|
|
2916
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(redirectSchema) } }
|
|
2917
|
+
},
|
|
2918
|
+
...authErrors,
|
|
2919
|
+
...standardErrors(400, 404, 409, 500)
|
|
2920
|
+
}
|
|
2921
|
+
},
|
|
2922
|
+
delete: {
|
|
2923
|
+
operationId: "deleteRedirect",
|
|
2924
|
+
summary: "Delete a redirect",
|
|
2925
|
+
tags: ["Redirects"],
|
|
2926
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "Redirect ID" }) }) },
|
|
2927
|
+
responses: {
|
|
2928
|
+
"200": {
|
|
2929
|
+
description: "Deleted",
|
|
2930
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
2931
|
+
},
|
|
2932
|
+
...authErrors,
|
|
2933
|
+
...standardErrors(404, 500)
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
},
|
|
2937
|
+
"/_emdash/api/redirects/404s": {
|
|
2938
|
+
get: {
|
|
2939
|
+
operationId: "listNotFoundEntries",
|
|
2940
|
+
summary: "List 404 log entries",
|
|
2941
|
+
tags: ["Redirects"],
|
|
2942
|
+
requestParams: { query: notFoundListQuery },
|
|
2943
|
+
responses: {
|
|
2944
|
+
"200": {
|
|
2945
|
+
description: "404 log entries",
|
|
2946
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(notFoundListResponseSchema) } }
|
|
2947
|
+
},
|
|
2948
|
+
...authErrors,
|
|
2949
|
+
...standardErrors(500)
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
delete: {
|
|
2953
|
+
operationId: "clearNotFoundLog",
|
|
2954
|
+
summary: "Clear all 404 log entries",
|
|
2955
|
+
tags: ["Redirects"],
|
|
2956
|
+
responses: {
|
|
2957
|
+
"200": {
|
|
2958
|
+
description: "Cleared",
|
|
2959
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ deleted: z.number().int() })) } }
|
|
2960
|
+
},
|
|
2961
|
+
...authErrors,
|
|
2962
|
+
...standardErrors(500)
|
|
2963
|
+
}
|
|
2964
|
+
},
|
|
2965
|
+
post: {
|
|
2966
|
+
operationId: "pruneNotFoundLog",
|
|
2967
|
+
summary: "Prune old 404 log entries",
|
|
2968
|
+
tags: ["Redirects"],
|
|
2969
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: notFoundPruneBody } } },
|
|
2970
|
+
responses: {
|
|
2971
|
+
"200": {
|
|
2972
|
+
description: "Pruned",
|
|
2973
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ deleted: z.number().int() })) } }
|
|
2974
|
+
},
|
|
2975
|
+
...authErrors,
|
|
2976
|
+
...standardErrors(400, 500)
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
},
|
|
2980
|
+
"/_emdash/api/redirects/404s/summary": { get: {
|
|
2981
|
+
operationId: "getNotFoundSummary",
|
|
2982
|
+
summary: "Get 404 summary grouped by path",
|
|
2983
|
+
tags: ["Redirects"],
|
|
2984
|
+
responses: {
|
|
2985
|
+
"200": {
|
|
2986
|
+
description: "404 summary",
|
|
2987
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(notFoundSummaryResponseSchema) } }
|
|
2988
|
+
},
|
|
2989
|
+
...authErrors,
|
|
2990
|
+
...standardErrors(500)
|
|
2991
|
+
}
|
|
2992
|
+
} }
|
|
2993
|
+
};
|
|
2994
|
+
const userPaths = {
|
|
2995
|
+
"/_emdash/api/admin/users": { get: {
|
|
2996
|
+
operationId: "listUsers",
|
|
2997
|
+
summary: "List users",
|
|
2998
|
+
tags: ["Users"],
|
|
2999
|
+
requestParams: { query: usersListQuery },
|
|
3000
|
+
responses: {
|
|
3001
|
+
"200": {
|
|
3002
|
+
description: "User list",
|
|
3003
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(userListResponseSchema) } }
|
|
3004
|
+
},
|
|
3005
|
+
...authErrors,
|
|
3006
|
+
...standardErrors(500)
|
|
3007
|
+
}
|
|
3008
|
+
} },
|
|
3009
|
+
"/_emdash/api/admin/users/{id}": {
|
|
3010
|
+
get: {
|
|
3011
|
+
operationId: "getUser",
|
|
3012
|
+
summary: "Get user details",
|
|
3013
|
+
tags: ["Users"],
|
|
3014
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "User ID" }) }) },
|
|
3015
|
+
responses: {
|
|
3016
|
+
"200": {
|
|
3017
|
+
description: "User detail",
|
|
3018
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ item: userDetailSchema })) } }
|
|
3019
|
+
},
|
|
3020
|
+
...authErrors,
|
|
3021
|
+
...standardErrors(404, 500)
|
|
3022
|
+
}
|
|
3023
|
+
},
|
|
3024
|
+
put: {
|
|
3025
|
+
operationId: "updateUser",
|
|
3026
|
+
summary: "Update a user",
|
|
3027
|
+
tags: ["Users"],
|
|
3028
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "User ID" }) }) },
|
|
3029
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: userUpdateBody } } },
|
|
3030
|
+
responses: {
|
|
3031
|
+
"200": {
|
|
3032
|
+
description: "Updated user",
|
|
3033
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ item: userSchema })) } }
|
|
3034
|
+
},
|
|
3035
|
+
...authErrors,
|
|
3036
|
+
...standardErrors(400, 404, 409, 500)
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
},
|
|
3040
|
+
"/_emdash/api/admin/users/{id}/disable": { post: {
|
|
3041
|
+
operationId: "disableUser",
|
|
3042
|
+
summary: "Disable a user account",
|
|
3043
|
+
tags: ["Users"],
|
|
3044
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "User ID" }) }) },
|
|
3045
|
+
responses: {
|
|
3046
|
+
"200": {
|
|
3047
|
+
description: "User disabled",
|
|
3048
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ item: userSchema })) } }
|
|
3049
|
+
},
|
|
3050
|
+
...authErrors,
|
|
3051
|
+
...standardErrors(400, 404, 500)
|
|
3052
|
+
}
|
|
3053
|
+
} },
|
|
3054
|
+
"/_emdash/api/admin/users/{id}/enable": { post: {
|
|
3055
|
+
operationId: "enableUser",
|
|
3056
|
+
summary: "Enable a user account",
|
|
3057
|
+
tags: ["Users"],
|
|
3058
|
+
requestParams: { path: z.object({ id: z.string().meta({ description: "User ID" }) }) },
|
|
3059
|
+
responses: {
|
|
3060
|
+
"200": {
|
|
3061
|
+
description: "User enabled",
|
|
3062
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ item: userSchema })) } }
|
|
3063
|
+
},
|
|
3064
|
+
...authErrors,
|
|
3065
|
+
...standardErrors(404, 500)
|
|
3066
|
+
}
|
|
3067
|
+
} },
|
|
3068
|
+
"/_emdash/api/admin/allowed-domains": {
|
|
3069
|
+
get: {
|
|
3070
|
+
operationId: "listAllowedDomains",
|
|
3071
|
+
summary: "List allowed email domains",
|
|
3072
|
+
tags: ["Users"],
|
|
3073
|
+
responses: {
|
|
3074
|
+
"200": {
|
|
3075
|
+
description: "Allowed domains list",
|
|
3076
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({ items: z.array(z.object({
|
|
3077
|
+
domain: z.string(),
|
|
3078
|
+
defaultRole: z.number().int(),
|
|
3079
|
+
enabled: z.boolean(),
|
|
3080
|
+
createdAt: z.string()
|
|
3081
|
+
})) })) } }
|
|
3082
|
+
},
|
|
3083
|
+
...authErrors,
|
|
3084
|
+
...standardErrors(500)
|
|
3085
|
+
}
|
|
3086
|
+
},
|
|
3087
|
+
post: {
|
|
3088
|
+
operationId: "createAllowedDomain",
|
|
3089
|
+
summary: "Add an allowed email domain",
|
|
3090
|
+
tags: ["Users"],
|
|
3091
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: allowedDomainCreateBody } } },
|
|
3092
|
+
responses: {
|
|
3093
|
+
"201": {
|
|
3094
|
+
description: "Created",
|
|
3095
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({
|
|
3096
|
+
domain: z.string(),
|
|
3097
|
+
defaultRole: z.number().int(),
|
|
3098
|
+
enabled: z.boolean()
|
|
3099
|
+
})) } }
|
|
3100
|
+
},
|
|
3101
|
+
...authErrors,
|
|
3102
|
+
...standardErrors(400, 409, 500)
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
},
|
|
3106
|
+
"/_emdash/api/admin/allowed-domains/{domain}": {
|
|
3107
|
+
put: {
|
|
3108
|
+
operationId: "updateAllowedDomain",
|
|
3109
|
+
summary: "Update an allowed domain",
|
|
3110
|
+
tags: ["Users"],
|
|
3111
|
+
requestParams: { path: z.object({ domain: z.string().meta({ description: "Domain name" }) }) },
|
|
3112
|
+
requestBody: { content: { [JSON_CONTENT]: { schema: allowedDomainUpdateBody } } },
|
|
3113
|
+
responses: {
|
|
3114
|
+
"200": {
|
|
3115
|
+
description: "Updated",
|
|
3116
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(z.object({
|
|
3117
|
+
domain: z.string(),
|
|
3118
|
+
defaultRole: z.number().int(),
|
|
3119
|
+
enabled: z.boolean()
|
|
3120
|
+
})) } }
|
|
3121
|
+
},
|
|
3122
|
+
...authErrors,
|
|
3123
|
+
...standardErrors(404, 500)
|
|
3124
|
+
}
|
|
3125
|
+
},
|
|
3126
|
+
delete: {
|
|
3127
|
+
operationId: "deleteAllowedDomain",
|
|
3128
|
+
summary: "Remove an allowed domain",
|
|
3129
|
+
tags: ["Users"],
|
|
3130
|
+
requestParams: { path: z.object({ domain: z.string().meta({ description: "Domain name" }) }) },
|
|
3131
|
+
responses: {
|
|
3132
|
+
"200": {
|
|
3133
|
+
description: "Deleted",
|
|
3134
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(deleteResponseSchema) } }
|
|
3135
|
+
},
|
|
3136
|
+
...authErrors,
|
|
3137
|
+
...standardErrors(404, 500)
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
};
|
|
3142
|
+
const TRANSFER_AUTH = "Session users need the `transfer:import` permission (admins); bearer tokens need `admin` or the scope named here.";
|
|
3143
|
+
const importPathParams = z.object({ id: z.string().meta({ description: "Import operation ID" }) });
|
|
3144
|
+
const exportPathParams = z.object({ id: z.string().meta({ description: "Export operation ID" }) });
|
|
3145
|
+
const EXPORT_AUTH = "Session users need the `transfer:export` permission (admins); bearer tokens need the `transfer:export` scope. Any holder of both can read any export.";
|
|
3146
|
+
const approvalPathParams = z.object({ id: z.string().meta({ description: "Approval ID" }) });
|
|
3147
|
+
const transferPaths = {
|
|
3148
|
+
"/_emdash/api/admin/transfer/capabilities": { get: {
|
|
3149
|
+
operationId: "getTransferCapabilities",
|
|
3150
|
+
summary: "Get site transfer capabilities",
|
|
3151
|
+
description: "Returns the supported package format versions, features, and limits, and whether this site can receive an import (`portableDomain`, with the reasons it cannot). Session users need `transfer:export` or `transfer:import`; bearer tokens need any transfer scope.",
|
|
3152
|
+
tags: ["Transfer"],
|
|
3153
|
+
responses: {
|
|
3154
|
+
"200": {
|
|
3155
|
+
description: "Transfer capabilities",
|
|
3156
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferCapabilitiesSchema) } }
|
|
3157
|
+
},
|
|
3158
|
+
...authErrors,
|
|
3159
|
+
...standardErrors(500)
|
|
3160
|
+
}
|
|
3161
|
+
} },
|
|
3162
|
+
"/_emdash/api/admin/transfer/imports": {
|
|
3163
|
+
get: {
|
|
3164
|
+
operationId: "listTransferImports",
|
|
3165
|
+
summary: "List site imports",
|
|
3166
|
+
description: `Returns imports newest first. ${TRANSFER_AUTH} Scope: \`transfer:analyze\` or \`transfer:execute\`.`,
|
|
3167
|
+
tags: ["Transfer"],
|
|
3168
|
+
requestParams: { query: transferPaginationQuery },
|
|
3169
|
+
responses: {
|
|
3170
|
+
"200": {
|
|
3171
|
+
description: "One page of imports",
|
|
3172
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferOperationListResponseSchema) } }
|
|
3173
|
+
},
|
|
3174
|
+
...authErrors,
|
|
3175
|
+
...standardErrors(400, 500)
|
|
3176
|
+
}
|
|
3177
|
+
},
|
|
3178
|
+
post: {
|
|
3179
|
+
operationId: "createTransferImport",
|
|
3180
|
+
summary: "Create a site import",
|
|
3181
|
+
description: `The request body is the package's \`manifest.json\`, byte for byte (at most 8 MiB). An optional \`Idempotency-Key\` header returns the existing operation on retry; reusing a key with a different manifest fails with \`TRANSFER_IDEMPOTENCY_CONFLICT\`. The response lists the first files to upload. ${TRANSFER_AUTH} Scope: \`transfer:analyze\`.`,
|
|
3182
|
+
tags: ["Transfer"],
|
|
3183
|
+
requestBody: {
|
|
3184
|
+
required: true,
|
|
3185
|
+
content: { [JSON_CONTENT]: { schema: z.string().meta({ format: "binary" }) } }
|
|
3186
|
+
},
|
|
3187
|
+
responses: {
|
|
3188
|
+
"200": {
|
|
3189
|
+
description: "Existing import for this idempotency key",
|
|
3190
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferImportCreateResponseSchema) } }
|
|
3191
|
+
},
|
|
3192
|
+
"201": {
|
|
3193
|
+
description: "Import created",
|
|
3194
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferImportCreateResponseSchema) } }
|
|
3195
|
+
},
|
|
3196
|
+
...authErrors,
|
|
3197
|
+
...standardErrors(400, 409, 413, 422, 500, 503)
|
|
3198
|
+
}
|
|
3199
|
+
}
|
|
3200
|
+
},
|
|
3201
|
+
"/_emdash/api/admin/transfer/imports/{id}": { get: {
|
|
3202
|
+
operationId: "getTransferImport",
|
|
3203
|
+
summary: "Get a site import",
|
|
3204
|
+
description: `Returns the import and how many of its files are uploaded. ${TRANSFER_AUTH} Scope: \`transfer:analyze\` or \`transfer:execute\`.`,
|
|
3205
|
+
tags: ["Transfer"],
|
|
3206
|
+
requestParams: { path: importPathParams },
|
|
3207
|
+
responses: {
|
|
3208
|
+
"200": {
|
|
3209
|
+
description: "Import status",
|
|
3210
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferImportStatusResponseSchema) } }
|
|
3211
|
+
},
|
|
3212
|
+
...authErrors,
|
|
3213
|
+
...standardErrors(404, 500)
|
|
3214
|
+
}
|
|
3215
|
+
} },
|
|
3216
|
+
"/_emdash/api/admin/transfer/imports/{id}/missing": { get: {
|
|
3217
|
+
operationId: "listTransferImportMissingFiles",
|
|
3218
|
+
summary: "List package files still to upload",
|
|
3219
|
+
description: `Returns declared files that are not uploaded yet, in path order. Uploading an index chunk declares the files it lists, so list again after each round of uploads until the list is empty. ${TRANSFER_AUTH} Scope: \`transfer:analyze\`.`,
|
|
3220
|
+
tags: ["Transfer"],
|
|
3221
|
+
requestParams: {
|
|
3222
|
+
path: importPathParams,
|
|
3223
|
+
query: transferPaginationQuery
|
|
3224
|
+
},
|
|
3225
|
+
responses: {
|
|
3226
|
+
"200": {
|
|
3227
|
+
description: "One page of missing files",
|
|
3228
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferMissingFilesResponseSchema) } }
|
|
3229
|
+
},
|
|
3230
|
+
...authErrors,
|
|
3231
|
+
...standardErrors(400, 404, 500)
|
|
3232
|
+
}
|
|
3233
|
+
} },
|
|
3234
|
+
"/_emdash/api/admin/transfer/imports/{id}/files/{path}": { put: {
|
|
3235
|
+
operationId: "uploadTransferImportFile",
|
|
3236
|
+
summary: "Upload one package file",
|
|
3237
|
+
description: `Streams one declared package file (\`index/…\`, \`records/…\`, or \`media/…\`; the path keeps its slashes). \`Content-Length\` is required and must equal the declared size, and the bytes must match the declared SHA-256. Media files may not exceed the site's \`maxUploadSize\`. ${TRANSFER_AUTH} Scope: \`transfer:analyze\`.`,
|
|
3238
|
+
tags: ["Transfer"],
|
|
3239
|
+
requestParams: { path: importPathParams.extend({ path: z.string().meta({ description: "Package file path" }) }) },
|
|
3240
|
+
requestBody: {
|
|
3241
|
+
required: true,
|
|
3242
|
+
content: { "application/octet-stream": { schema: z.string().meta({ format: "binary" }) } }
|
|
3243
|
+
},
|
|
3244
|
+
responses: {
|
|
3245
|
+
"200": {
|
|
3246
|
+
description: "File stored and verified",
|
|
3247
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferFileUploadResponseSchema) } }
|
|
3248
|
+
},
|
|
3249
|
+
...authErrors,
|
|
3250
|
+
...standardErrors(400, 404, 409, 411, 413, 422, 500, 503)
|
|
3251
|
+
}
|
|
3252
|
+
} },
|
|
3253
|
+
"/_emdash/api/admin/transfer/imports/{id}/analyze": { post: {
|
|
3254
|
+
operationId: "analyzeTransferImport",
|
|
3255
|
+
summary: "Advance import analysis",
|
|
3256
|
+
description: `Runs one bounded analysis step once every file is uploaded. Call again after \`nextRequestInMs\` until it is null; the response then includes the plan and its digest. Submitted decisions are applied once the import is planned. ${TRANSFER_AUTH} Scope: \`transfer:analyze\`.`,
|
|
3257
|
+
tags: ["Transfer"],
|
|
3258
|
+
requestParams: { path: importPathParams },
|
|
3259
|
+
requestBody: {
|
|
3260
|
+
required: false,
|
|
3261
|
+
content: { [JSON_CONTENT]: { schema: transferImportAnalyzeBody } }
|
|
3262
|
+
},
|
|
3263
|
+
responses: {
|
|
3264
|
+
"200": {
|
|
3265
|
+
description: "Analysis progress, or the plan",
|
|
3266
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferImportAnalyzeResponseSchema) } }
|
|
3267
|
+
},
|
|
3268
|
+
...authErrors,
|
|
3269
|
+
...standardErrors(400, 404, 409, 422, 500, 503)
|
|
3270
|
+
}
|
|
3271
|
+
} },
|
|
3272
|
+
"/_emdash/api/admin/transfer/imports/{id}/plan": { get: {
|
|
3273
|
+
operationId: "getTransferImportPlan",
|
|
3274
|
+
summary: "Get an import plan",
|
|
3275
|
+
description: `${TRANSFER_AUTH} Scope: \`transfer:analyze\` or \`transfer:execute\`.`,
|
|
3276
|
+
tags: ["Transfer"],
|
|
3277
|
+
requestParams: { path: importPathParams },
|
|
3278
|
+
responses: {
|
|
3279
|
+
"200": {
|
|
3280
|
+
description: "The plan and its digest",
|
|
3281
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferImportPlanResponseSchema) } }
|
|
3282
|
+
},
|
|
3283
|
+
...authErrors,
|
|
3284
|
+
...standardErrors(404, 409, 500, 503)
|
|
3285
|
+
}
|
|
3286
|
+
} },
|
|
3287
|
+
"/_emdash/api/admin/transfer/imports/{id}/cancel": { post: {
|
|
3288
|
+
operationId: "cancelTransferImport",
|
|
3289
|
+
summary: "Cancel a site import",
|
|
3290
|
+
description: `A step in progress stops after its current batch. ${TRANSFER_AUTH} Scope: \`transfer:execute\`.`,
|
|
3291
|
+
tags: ["Transfer"],
|
|
3292
|
+
requestParams: { path: importPathParams },
|
|
3293
|
+
responses: {
|
|
3294
|
+
"200": {
|
|
3295
|
+
description: "The cancelled import",
|
|
3296
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferOperationResponseSchema) } }
|
|
3297
|
+
},
|
|
3298
|
+
...authErrors,
|
|
3299
|
+
...standardErrors(404, 409, 500)
|
|
3300
|
+
}
|
|
3301
|
+
} },
|
|
3302
|
+
"/_emdash/api/admin/transfer/imports/{id}/abandon": { post: {
|
|
3303
|
+
operationId: "abandonTransferImport",
|
|
3304
|
+
summary: "Abandon a failed or cancelled import",
|
|
3305
|
+
description: `Lifts the site write fence after an import failed or was cancelled. Data the import already wrote stays in place. ${TRANSFER_AUTH} Scope: \`transfer:execute\`.`,
|
|
3306
|
+
tags: ["Transfer"],
|
|
3307
|
+
requestParams: { path: importPathParams },
|
|
3308
|
+
responses: {
|
|
3309
|
+
"200": {
|
|
3310
|
+
description: "The abandoned import",
|
|
3311
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferOperationResponseSchema) } }
|
|
3312
|
+
},
|
|
3313
|
+
...authErrors,
|
|
3314
|
+
...standardErrors(404, 409, 500)
|
|
3315
|
+
}
|
|
3316
|
+
} },
|
|
3317
|
+
"/_emdash/api/admin/transfer/imports/{id}/execute": { post: {
|
|
3318
|
+
operationId: "executeTransferImport",
|
|
3319
|
+
summary: "Start a planned import",
|
|
3320
|
+
description: `Starts a planned import once the reviewed package and plan digests match. The plan must have no blockers. Then call \`advance\` until \`nextRequestInMs\` is null. ${TRANSFER_AUTH} Scope: \`transfer:execute\`.`,
|
|
3321
|
+
tags: ["Transfer"],
|
|
3322
|
+
requestParams: { path: importPathParams },
|
|
3323
|
+
requestBody: {
|
|
3324
|
+
required: true,
|
|
3325
|
+
content: { [JSON_CONTENT]: { schema: transferImportExecuteBody } }
|
|
3326
|
+
},
|
|
3327
|
+
responses: {
|
|
3328
|
+
"200": {
|
|
3329
|
+
description: "The import, marked for execution",
|
|
3330
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferOperationResponseSchema) } }
|
|
3331
|
+
},
|
|
3332
|
+
...authErrors,
|
|
3333
|
+
...standardErrors(400, 404, 409, 500, 503)
|
|
3334
|
+
}
|
|
3335
|
+
} },
|
|
3336
|
+
"/_emdash/api/admin/transfer/imports/{id}/advance": { post: {
|
|
3337
|
+
operationId: "advanceTransferImport",
|
|
3338
|
+
summary: "Advance an executing import",
|
|
3339
|
+
description: `Runs one bounded import step. Retryable failures are recorded on the import and delay \`nextRequestInMs\`; it is null once the import has ended. While the import runs, and after it fails or is cancelled until it is abandoned, other site writes return 503 \`TRANSFER_IMPORT_IN_PROGRESS\`. ${TRANSFER_AUTH} Scope: \`transfer:execute\`.`,
|
|
3340
|
+
tags: ["Transfer"],
|
|
3341
|
+
requestParams: { path: importPathParams },
|
|
3342
|
+
responses: {
|
|
3343
|
+
"200": {
|
|
3344
|
+
description: "The import after one step",
|
|
3345
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferAdvanceResponseSchema) } }
|
|
3346
|
+
},
|
|
3347
|
+
...authErrors,
|
|
3348
|
+
...standardErrors(404, 409, 500, 503)
|
|
3349
|
+
}
|
|
3350
|
+
} },
|
|
3351
|
+
"/_emdash/api/admin/transfer/imports/{id}/receipt": { get: {
|
|
3352
|
+
operationId: "getTransferImportReceipt",
|
|
3353
|
+
summary: "Get an import receipt",
|
|
3354
|
+
description: `The verified receipt of a complete import; its \`receiptDigest\` covers every other field. ${TRANSFER_AUTH} Scope: \`transfer:analyze\` or \`transfer:execute\`.`,
|
|
3355
|
+
tags: ["Transfer"],
|
|
3356
|
+
requestParams: { path: importPathParams },
|
|
3357
|
+
responses: {
|
|
3358
|
+
"200": {
|
|
3359
|
+
description: "The receipt",
|
|
3360
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferImportReceiptResponseSchema) } }
|
|
3361
|
+
},
|
|
3362
|
+
...authErrors,
|
|
3363
|
+
...standardErrors(404, 409, 500)
|
|
3364
|
+
}
|
|
3365
|
+
} },
|
|
3366
|
+
"/_emdash/api/admin/transfer/exports": {
|
|
3367
|
+
get: {
|
|
3368
|
+
operationId: "listTransferExports",
|
|
3369
|
+
summary: "List site exports",
|
|
3370
|
+
description: `Returns exports newest first. ${EXPORT_AUTH}`,
|
|
3371
|
+
tags: ["Transfer"],
|
|
3372
|
+
requestParams: { query: transferPaginationQuery },
|
|
3373
|
+
responses: {
|
|
3374
|
+
"200": {
|
|
3375
|
+
description: "One page of exports",
|
|
3376
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferOperationListResponseSchema) } }
|
|
3377
|
+
},
|
|
3378
|
+
...authErrors,
|
|
3379
|
+
...standardErrors(400, 500)
|
|
3380
|
+
}
|
|
3381
|
+
},
|
|
3382
|
+
post: {
|
|
3383
|
+
operationId: "createTransferExport",
|
|
3384
|
+
summary: "Start a site export",
|
|
3385
|
+
description: `Creates an export; call \`advance\` until \`nextRequestInMs\` is null. An optional \`Idempotency-Key\` header returns the existing export on retry. ${EXPORT_AUTH}`,
|
|
3386
|
+
tags: ["Transfer"],
|
|
3387
|
+
requestBody: {
|
|
3388
|
+
required: false,
|
|
3389
|
+
content: { [JSON_CONTENT]: { schema: transferExportCreateBody } }
|
|
3390
|
+
},
|
|
3391
|
+
responses: {
|
|
3392
|
+
"200": {
|
|
3393
|
+
description: "Existing export for this idempotency key",
|
|
3394
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferExportCreateResponseSchema) } }
|
|
3395
|
+
},
|
|
3396
|
+
"201": {
|
|
3397
|
+
description: "Export created",
|
|
3398
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferExportCreateResponseSchema) } }
|
|
3399
|
+
},
|
|
3400
|
+
...authErrors,
|
|
3401
|
+
...standardErrors(400, 409, 500)
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
},
|
|
3405
|
+
"/_emdash/api/admin/transfer/exports/{id}": { get: {
|
|
3406
|
+
operationId: "getTransferExport",
|
|
3407
|
+
summary: "Get a site export",
|
|
3408
|
+
description: EXPORT_AUTH,
|
|
3409
|
+
tags: ["Transfer"],
|
|
3410
|
+
requestParams: { path: exportPathParams },
|
|
3411
|
+
responses: {
|
|
3412
|
+
"200": {
|
|
3413
|
+
description: "Export status",
|
|
3414
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferOperationResponseSchema) } }
|
|
3415
|
+
},
|
|
3416
|
+
...authErrors,
|
|
3417
|
+
...standardErrors(404, 500)
|
|
3418
|
+
}
|
|
3419
|
+
} },
|
|
3420
|
+
"/_emdash/api/admin/transfer/exports/{id}/advance": { post: {
|
|
3421
|
+
operationId: "advanceTransferExport",
|
|
3422
|
+
summary: "Advance a site export",
|
|
3423
|
+
description: `Runs one bounded export step; \`nextRequestInMs\` is null once the export has ended. ${EXPORT_AUTH}`,
|
|
3424
|
+
tags: ["Transfer"],
|
|
3425
|
+
requestParams: { path: exportPathParams },
|
|
3426
|
+
responses: {
|
|
3427
|
+
"200": {
|
|
3428
|
+
description: "The export after one step",
|
|
3429
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferAdvanceResponseSchema) } }
|
|
3430
|
+
},
|
|
3431
|
+
...authErrors,
|
|
3432
|
+
...standardErrors(404, 409, 500, 503)
|
|
3433
|
+
}
|
|
3434
|
+
} },
|
|
3435
|
+
"/_emdash/api/admin/transfer/exports/{id}/manifest": { get: {
|
|
3436
|
+
operationId: "getTransferExportManifest",
|
|
3437
|
+
summary: "Download an export manifest",
|
|
3438
|
+
description: `The complete export's \`manifest.json\`, byte for byte; its SHA-256 is the package digest. ${EXPORT_AUTH}`,
|
|
3439
|
+
tags: ["Transfer"],
|
|
3440
|
+
requestParams: { path: exportPathParams },
|
|
3441
|
+
responses: {
|
|
3442
|
+
"200": {
|
|
3443
|
+
description: "The manifest",
|
|
3444
|
+
content: { [JSON_CONTENT]: { schema: z.string().meta({ format: "binary" }) } }
|
|
3445
|
+
},
|
|
3446
|
+
...authErrors,
|
|
3447
|
+
...standardErrors(404, 409, 410, 500, 503)
|
|
3448
|
+
}
|
|
3449
|
+
} },
|
|
3450
|
+
"/_emdash/api/admin/transfer/exports/{id}/files/{path}": { get: {
|
|
3451
|
+
operationId: "downloadTransferExportFile",
|
|
3452
|
+
summary: "Download one export file",
|
|
3453
|
+
description: `Streams one index chunk, record chunk, or media blob listed by the export (the path keeps its slashes). \`Content-Length\` and the \`ETag\` (hex SHA-256) describe the file; the stream fails partway if the stored bytes no longer match. ${EXPORT_AUTH}`,
|
|
3454
|
+
tags: ["Transfer"],
|
|
3455
|
+
requestParams: { path: exportPathParams.extend({ path: z.string().meta({ description: "Package file path" }) }) },
|
|
3456
|
+
responses: {
|
|
3457
|
+
"200": {
|
|
3458
|
+
description: "The file",
|
|
3459
|
+
content: { "application/octet-stream": { schema: z.string().meta({ format: "binary" }) } }
|
|
3460
|
+
},
|
|
3461
|
+
...authErrors,
|
|
3462
|
+
...standardErrors(404, 409, 410, 422, 500, 503)
|
|
3463
|
+
}
|
|
3464
|
+
} },
|
|
3465
|
+
"/_emdash/api/admin/transfer/exports/{id}/archive": { get: {
|
|
3466
|
+
operationId: "downloadTransferExportArchive",
|
|
3467
|
+
summary: "Download an export archive",
|
|
3468
|
+
description: `Streams the complete export as one \`.emdash\` tar archive, manifest first. On Workers the whole archive streams within one request; large sites should download files individually. ${EXPORT_AUTH}`,
|
|
3469
|
+
tags: ["Transfer"],
|
|
3470
|
+
requestParams: { path: exportPathParams },
|
|
3471
|
+
responses: {
|
|
3472
|
+
"200": {
|
|
3473
|
+
description: "The archive",
|
|
3474
|
+
content: { "application/x-tar": { schema: z.string().meta({ format: "binary" }) } }
|
|
3475
|
+
},
|
|
3476
|
+
...authErrors,
|
|
3477
|
+
...standardErrors(404, 409, 410, 500, 503)
|
|
3478
|
+
}
|
|
3479
|
+
} },
|
|
3480
|
+
"/_emdash/api/admin/transfer/approvals": { get: {
|
|
3481
|
+
operationId: "listTransferApprovals",
|
|
3482
|
+
summary: "List transfer approvals",
|
|
3483
|
+
description: "Approval grants requested by MCP callers, newest first. Signed-in sessions only (`transfer:export` or `transfer:import`); bearer tokens are refused.",
|
|
3484
|
+
tags: ["Transfer"],
|
|
3485
|
+
requestParams: { query: transferApprovalListQuery },
|
|
3486
|
+
responses: {
|
|
3487
|
+
"200": {
|
|
3488
|
+
description: "One page of approvals",
|
|
3489
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferApprovalListResponseSchema) } }
|
|
3490
|
+
},
|
|
3491
|
+
...authErrors,
|
|
3492
|
+
...standardErrors(400, 500)
|
|
3493
|
+
}
|
|
3494
|
+
} },
|
|
3495
|
+
"/_emdash/api/admin/transfer/approvals/{id}/approve": { post: {
|
|
3496
|
+
operationId: "approveTransferApproval",
|
|
3497
|
+
summary: "Approve a transfer request",
|
|
3498
|
+
description: "Approves a pending grant; the requester can use it once within 15 minutes. Signed-in sessions only, with the permission for the grant's action; bearer tokens are refused.",
|
|
3499
|
+
tags: ["Transfer"],
|
|
3500
|
+
requestParams: { path: approvalPathParams },
|
|
3501
|
+
responses: {
|
|
3502
|
+
"200": {
|
|
3503
|
+
description: "The approved grant",
|
|
3504
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferApprovalResponseSchema) } }
|
|
3505
|
+
},
|
|
3506
|
+
...authErrors,
|
|
3507
|
+
...standardErrors(500)
|
|
3508
|
+
}
|
|
3509
|
+
} },
|
|
3510
|
+
"/_emdash/api/admin/transfer/approvals/{id}/deny": { post: {
|
|
3511
|
+
operationId: "denyTransferApproval",
|
|
3512
|
+
summary: "Deny a transfer request",
|
|
3513
|
+
description: "Denies a pending grant. Signed-in sessions only, with the permission for the grant's action; bearer tokens are refused.",
|
|
3514
|
+
tags: ["Transfer"],
|
|
3515
|
+
requestParams: { path: approvalPathParams },
|
|
3516
|
+
responses: {
|
|
3517
|
+
"200": {
|
|
3518
|
+
description: "The denied grant",
|
|
3519
|
+
content: { [JSON_CONTENT]: { schema: successEnvelope(transferApprovalResponseSchema) } }
|
|
3520
|
+
},
|
|
3521
|
+
...authErrors,
|
|
3522
|
+
...standardErrors(500)
|
|
3523
|
+
}
|
|
3524
|
+
} }
|
|
3525
|
+
};
|
|
3526
|
+
function buildAllPaths(maxUploadSize) {
|
|
3527
|
+
return {
|
|
3528
|
+
...contentPaths,
|
|
3529
|
+
...buildMediaPaths(maxUploadSize),
|
|
3530
|
+
...schemaPaths,
|
|
3531
|
+
...commentsPaths,
|
|
3532
|
+
...taxonomyPaths,
|
|
3533
|
+
...menuPaths,
|
|
3534
|
+
...sectionPaths,
|
|
3535
|
+
...widgetPaths,
|
|
3536
|
+
...settingsPaths,
|
|
3537
|
+
...searchPaths,
|
|
3538
|
+
...redirectPaths,
|
|
3539
|
+
...userPaths,
|
|
3540
|
+
...transferPaths
|
|
3541
|
+
};
|
|
3542
|
+
}
|
|
3543
|
+
/**
|
|
3544
|
+
* Generate the OpenAPI 3.1 document for the EmDash CMS API.
|
|
3545
|
+
*
|
|
3546
|
+
* Covers: Content, Media, Schema, Comments, Taxonomies, Menus,
|
|
3547
|
+
* Sections, Widgets, Settings, Search, Redirects, Users, Transfer.
|
|
3548
|
+
*/
|
|
3549
|
+
function generateOpenApiDocument(options = {}) {
|
|
3550
|
+
const maxUploadSize = options.maxUploadSize ?? DEFAULT_MAX_UPLOAD_SIZE;
|
|
3551
|
+
return createDocument({
|
|
3552
|
+
openapi: "3.1.0",
|
|
3553
|
+
info: {
|
|
3554
|
+
title: "EmDash CMS API",
|
|
3555
|
+
version: "0.1.0",
|
|
3556
|
+
description: "REST API for the EmDash CMS. All endpoints require authentication and return responses wrapped in a `{ success, data }` envelope."
|
|
3557
|
+
},
|
|
3558
|
+
servers: [{
|
|
3559
|
+
url: "{baseUrl}",
|
|
3560
|
+
description: "CMS instance",
|
|
3561
|
+
variables: { baseUrl: { default: "http://localhost:4321" } }
|
|
3562
|
+
}],
|
|
3563
|
+
tags: [
|
|
3564
|
+
{
|
|
3565
|
+
name: "Content",
|
|
3566
|
+
description: "CRUD operations for content items across collections"
|
|
3567
|
+
},
|
|
3568
|
+
{
|
|
3569
|
+
name: "Media",
|
|
3570
|
+
description: "Media library — upload, manage, and serve files"
|
|
3571
|
+
},
|
|
3572
|
+
{
|
|
3573
|
+
name: "Schema",
|
|
3574
|
+
description: "Collection and field management"
|
|
3575
|
+
},
|
|
3576
|
+
{
|
|
3577
|
+
name: "Comments",
|
|
3578
|
+
description: "Public comments and admin moderation"
|
|
3579
|
+
},
|
|
3580
|
+
{
|
|
3581
|
+
name: "Taxonomies",
|
|
3582
|
+
description: "Taxonomy definitions and terms"
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
name: "Menus",
|
|
3586
|
+
description: "Navigation menu management"
|
|
3587
|
+
},
|
|
3588
|
+
{
|
|
3589
|
+
name: "Sections",
|
|
3590
|
+
description: "Reusable content sections"
|
|
3591
|
+
},
|
|
3592
|
+
{
|
|
3593
|
+
name: "Widgets",
|
|
3594
|
+
description: "Widget areas and widget management"
|
|
3595
|
+
},
|
|
3596
|
+
{
|
|
3597
|
+
name: "Settings",
|
|
3598
|
+
description: "Site-wide settings"
|
|
3599
|
+
},
|
|
3600
|
+
{
|
|
3601
|
+
name: "Search",
|
|
3602
|
+
description: "Full-text search and index management"
|
|
3603
|
+
},
|
|
3604
|
+
{
|
|
3605
|
+
name: "Redirects",
|
|
3606
|
+
description: "Redirect rules and 404 logging"
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
name: "Users",
|
|
3610
|
+
description: "User management and access control"
|
|
3611
|
+
},
|
|
3612
|
+
{
|
|
3613
|
+
name: "Transfer",
|
|
3614
|
+
description: "Whole-site export and import (site packages)"
|
|
3615
|
+
}
|
|
3616
|
+
],
|
|
3617
|
+
components: {
|
|
3618
|
+
schemas: { MediaListResponse: mediaListResponseSchema },
|
|
3619
|
+
securitySchemes: {
|
|
3620
|
+
session: {
|
|
3621
|
+
type: "apiKey",
|
|
3622
|
+
in: "cookie",
|
|
3623
|
+
name: "emdash_session",
|
|
3624
|
+
description: "Session cookie set by the auth endpoints"
|
|
3625
|
+
},
|
|
3626
|
+
bearer: {
|
|
3627
|
+
type: "http",
|
|
3628
|
+
scheme: "bearer",
|
|
3629
|
+
description: "OAuth2 or API token"
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
},
|
|
3633
|
+
security: [{ session: [] }, { bearer: [] }],
|
|
3634
|
+
paths: buildAllPaths(maxUploadSize)
|
|
3635
|
+
});
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
//#endregion
|
|
3639
|
+
//#region src/astro/routes/api/openapi.json.ts
|
|
3640
|
+
const prerender = false;
|
|
3641
|
+
const OPENAPI_CACHE_KEY = Symbol.for("emdash.openapi.cachedSpec");
|
|
3642
|
+
function getCachedSpec() {
|
|
3643
|
+
const val = globalThis[OPENAPI_CACHE_KEY];
|
|
3644
|
+
return typeof val === "string" ? val : null;
|
|
3645
|
+
}
|
|
3646
|
+
function setCachedSpec(spec) {
|
|
3647
|
+
globalThis[OPENAPI_CACHE_KEY] = spec;
|
|
3648
|
+
}
|
|
3649
|
+
const GET = async ({ locals }) => {
|
|
3650
|
+
const { emdash } = locals;
|
|
3651
|
+
let spec = getCachedSpec();
|
|
3652
|
+
if (!spec && emdash) try {
|
|
3653
|
+
const doc = generateOpenApiDocument({ maxUploadSize: emdash.config.maxUploadSize });
|
|
3654
|
+
spec = JSON.stringify(doc);
|
|
3655
|
+
setCachedSpec(spec);
|
|
3656
|
+
} catch (error) {
|
|
3657
|
+
return handleError(error, "Failed to generate OpenAPI document", "OPENAPI_ERROR");
|
|
3658
|
+
}
|
|
3659
|
+
if (!spec) try {
|
|
3660
|
+
spec = JSON.stringify(generateOpenApiDocument());
|
|
3661
|
+
} catch (error) {
|
|
3662
|
+
return handleError(error, "Failed to generate OpenAPI document", "OPENAPI_ERROR");
|
|
3663
|
+
}
|
|
3664
|
+
return new Response(spec, {
|
|
3665
|
+
status: 200,
|
|
3666
|
+
headers: {
|
|
3667
|
+
"Content-Type": "application/json",
|
|
3668
|
+
"Cache-Control": "private, no-store",
|
|
3669
|
+
"Access-Control-Allow-Origin": "*"
|
|
3670
|
+
}
|
|
3671
|
+
});
|
|
3672
|
+
};
|
|
3673
|
+
|
|
3674
|
+
//#endregion
|
|
3675
|
+
export { GET, prerender };
|
|
3676
|
+
//# sourceMappingURL=openapi.json.mjs.map
|