@growth-labs/cms 0.1.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 +165 -0
- package/dist/engine/activity-log.d.ts +17 -0
- package/dist/engine/activity-log.d.ts.map +1 -0
- package/dist/engine/activity-log.js +17 -0
- package/dist/engine/activity-log.js.map +1 -0
- package/dist/engine/ai-prompts.d.ts +57 -0
- package/dist/engine/ai-prompts.d.ts.map +1 -0
- package/dist/engine/ai-prompts.js +90 -0
- package/dist/engine/ai-prompts.js.map +1 -0
- package/dist/engine/ai-writeback.d.ts +36 -0
- package/dist/engine/ai-writeback.d.ts.map +1 -0
- package/dist/engine/ai-writeback.js +45 -0
- package/dist/engine/ai-writeback.js.map +1 -0
- package/dist/engine/api-keys.d.ts +76 -0
- package/dist/engine/api-keys.d.ts.map +1 -0
- package/dist/engine/api-keys.js +165 -0
- package/dist/engine/api-keys.js.map +1 -0
- package/dist/engine/content-insights.d.ts +36 -0
- package/dist/engine/content-insights.d.ts.map +1 -0
- package/dist/engine/content-insights.js +114 -0
- package/dist/engine/content-insights.js.map +1 -0
- package/dist/engine/contributors.d.ts +25 -0
- package/dist/engine/contributors.d.ts.map +1 -0
- package/dist/engine/contributors.js +59 -0
- package/dist/engine/contributors.js.map +1 -0
- package/dist/engine/cron.d.ts +15 -0
- package/dist/engine/cron.d.ts.map +1 -0
- package/dist/engine/cron.js +33 -0
- package/dist/engine/cron.js.map +1 -0
- package/dist/engine/d1.d.ts +16 -0
- package/dist/engine/d1.d.ts.map +1 -0
- package/dist/engine/d1.js +13 -0
- package/dist/engine/d1.js.map +1 -0
- package/dist/engine/foundry-dispatch.d.ts +52 -0
- package/dist/engine/foundry-dispatch.d.ts.map +1 -0
- package/dist/engine/foundry-dispatch.js +290 -0
- package/dist/engine/foundry-dispatch.js.map +1 -0
- package/dist/engine/import-parsers.d.ts +11 -0
- package/dist/engine/import-parsers.d.ts.map +1 -0
- package/dist/engine/import-parsers.js +373 -0
- package/dist/engine/import-parsers.js.map +1 -0
- package/dist/engine/index.d.ts +28 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +57 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/invites.d.ts +78 -0
- package/dist/engine/invites.d.ts.map +1 -0
- package/dist/engine/invites.js +158 -0
- package/dist/engine/invites.js.map +1 -0
- package/dist/engine/members.d.ts +59 -0
- package/dist/engine/members.d.ts.map +1 -0
- package/dist/engine/members.js +124 -0
- package/dist/engine/members.js.map +1 -0
- package/dist/engine/membership-rules.d.ts +25 -0
- package/dist/engine/membership-rules.d.ts.map +1 -0
- package/dist/engine/membership-rules.js +44 -0
- package/dist/engine/membership-rules.js.map +1 -0
- package/dist/engine/og-render.d.ts +40 -0
- package/dist/engine/og-render.d.ts.map +1 -0
- package/dist/engine/og-render.js +26 -0
- package/dist/engine/og-render.js.map +1 -0
- package/dist/engine/publish-guard.d.ts +58 -0
- package/dist/engine/publish-guard.d.ts.map +1 -0
- package/dist/engine/publish-guard.js +80 -0
- package/dist/engine/publish-guard.js.map +1 -0
- package/dist/engine/publisher.d.ts +171 -0
- package/dist/engine/publisher.d.ts.map +1 -0
- package/dist/engine/publisher.js +597 -0
- package/dist/engine/publisher.js.map +1 -0
- package/dist/engine/revisions.d.ts +39 -0
- package/dist/engine/revisions.d.ts.map +1 -0
- package/dist/engine/revisions.js +203 -0
- package/dist/engine/revisions.js.map +1 -0
- package/dist/engine/sanitize.d.ts +52 -0
- package/dist/engine/sanitize.d.ts.map +1 -0
- package/dist/engine/sanitize.js +155 -0
- package/dist/engine/sanitize.js.map +1 -0
- package/dist/engine/seed-membership.d.ts +29 -0
- package/dist/engine/seed-membership.d.ts.map +1 -0
- package/dist/engine/seed-membership.js +65 -0
- package/dist/engine/seed-membership.js.map +1 -0
- package/dist/engine/seo.d.ts +20 -0
- package/dist/engine/seo.d.ts.map +1 -0
- package/dist/engine/seo.js +50 -0
- package/dist/engine/seo.js.map +1 -0
- package/dist/engine/slug-redirects.d.ts +8 -0
- package/dist/engine/slug-redirects.d.ts.map +1 -0
- package/dist/engine/slug-redirects.js +26 -0
- package/dist/engine/slug-redirects.js.map +1 -0
- package/dist/engine/slug.d.ts +6 -0
- package/dist/engine/slug.d.ts.map +1 -0
- package/dist/engine/slug.js +28 -0
- package/dist/engine/slug.js.map +1 -0
- package/dist/engine/soft-delete.d.ts +8 -0
- package/dist/engine/soft-delete.d.ts.map +1 -0
- package/dist/engine/soft-delete.js +28 -0
- package/dist/engine/soft-delete.js.map +1 -0
- package/dist/engine/tags.d.ts +14 -0
- package/dist/engine/tags.d.ts.map +1 -0
- package/dist/engine/tags.js +79 -0
- package/dist/engine/tags.js.map +1 -0
- package/dist/engine/topics.d.ts +10 -0
- package/dist/engine/topics.d.ts.map +1 -0
- package/dist/engine/topics.js +140 -0
- package/dist/engine/topics.js.map +1 -0
- package/dist/engine/url-guard.d.ts +12 -0
- package/dist/engine/url-guard.d.ts.map +1 -0
- package/dist/engine/url-guard.js +129 -0
- package/dist/engine/url-guard.js.map +1 -0
- package/dist/engine/validator/checks/bare-url-not-autolinked.d.ts +20 -0
- package/dist/engine/validator/checks/bare-url-not-autolinked.d.ts.map +1 -0
- package/dist/engine/validator/checks/bare-url-not-autolinked.js +54 -0
- package/dist/engine/validator/checks/bare-url-not-autolinked.js.map +1 -0
- package/dist/engine/validator/checks/broken-footnote-label.d.ts +16 -0
- package/dist/engine/validator/checks/broken-footnote-label.d.ts.map +1 -0
- package/dist/engine/validator/checks/broken-footnote-label.js +17 -0
- package/dist/engine/validator/checks/broken-footnote-label.js.map +1 -0
- package/dist/engine/validator/checks/double-encoded-entities.d.ts +18 -0
- package/dist/engine/validator/checks/double-encoded-entities.d.ts.map +1 -0
- package/dist/engine/validator/checks/double-encoded-entities.js +23 -0
- package/dist/engine/validator/checks/double-encoded-entities.js.map +1 -0
- package/dist/engine/validator/checks/empty-alt-text.d.ts +14 -0
- package/dist/engine/validator/checks/empty-alt-text.d.ts.map +1 -0
- package/dist/engine/validator/checks/empty-alt-text.js +23 -0
- package/dist/engine/validator/checks/empty-alt-text.js.map +1 -0
- package/dist/engine/validator/checks/heading-hierarchy-skip.d.ts +11 -0
- package/dist/engine/validator/checks/heading-hierarchy-skip.d.ts.map +1 -0
- package/dist/engine/validator/checks/heading-hierarchy-skip.js +20 -0
- package/dist/engine/validator/checks/heading-hierarchy-skip.js.map +1 -0
- package/dist/engine/validator/checks/html-comment-leak.d.ts +20 -0
- package/dist/engine/validator/checks/html-comment-leak.d.ts.map +1 -0
- package/dist/engine/validator/checks/html-comment-leak.js +30 -0
- package/dist/engine/validator/checks/html-comment-leak.js.map +1 -0
- package/dist/engine/validator/checks/iframe-missing-dims-and-wrapper.d.ts +12 -0
- package/dist/engine/validator/checks/iframe-missing-dims-and-wrapper.d.ts.map +1 -0
- package/dist/engine/validator/checks/iframe-missing-dims-and-wrapper.js +17 -0
- package/dist/engine/validator/checks/iframe-missing-dims-and-wrapper.js.map +1 -0
- package/dist/engine/validator/checks/invisible-control-chars.d.ts +24 -0
- package/dist/engine/validator/checks/invisible-control-chars.d.ts.map +1 -0
- package/dist/engine/validator/checks/invisible-control-chars.js +30 -0
- package/dist/engine/validator/checks/invisible-control-chars.js.map +1 -0
- package/dist/engine/validator/checks/paywall-marker-leak.d.ts +17 -0
- package/dist/engine/validator/checks/paywall-marker-leak.d.ts.map +1 -0
- package/dist/engine/validator/checks/paywall-marker-leak.js +22 -0
- package/dist/engine/validator/checks/paywall-marker-leak.js.map +1 -0
- package/dist/engine/validator/checks/raw-block-html.d.ts +28 -0
- package/dist/engine/validator/checks/raw-block-html.d.ts.map +1 -0
- package/dist/engine/validator/checks/raw-block-html.js +38 -0
- package/dist/engine/validator/checks/raw-block-html.js.map +1 -0
- package/dist/engine/validator/checks/stale-body-html.d.ts +28 -0
- package/dist/engine/validator/checks/stale-body-html.d.ts.map +1 -0
- package/dist/engine/validator/checks/stale-body-html.js +15 -0
- package/dist/engine/validator/checks/stale-body-html.js.map +1 -0
- package/dist/engine/validator/checks/unresolved-footnote-anchor.d.ts +11 -0
- package/dist/engine/validator/checks/unresolved-footnote-anchor.d.ts.map +1 -0
- package/dist/engine/validator/checks/unresolved-footnote-anchor.js +48 -0
- package/dist/engine/validator/checks/unresolved-footnote-anchor.js.map +1 -0
- package/dist/engine/validator/checks/word-gdocs-paste-artifacts.d.ts +23 -0
- package/dist/engine/validator/checks/word-gdocs-paste-artifacts.d.ts.map +1 -0
- package/dist/engine/validator/checks/word-gdocs-paste-artifacts.js +47 -0
- package/dist/engine/validator/checks/word-gdocs-paste-artifacts.js.map +1 -0
- package/dist/engine/validator/index.d.ts +75 -0
- package/dist/engine/validator/index.d.ts.map +1 -0
- package/dist/engine/validator/index.js +313 -0
- package/dist/engine/validator/index.js.map +1 -0
- package/dist/engine/validator/scan.d.ts +28 -0
- package/dist/engine/validator/scan.d.ts.map +1 -0
- package/dist/engine/validator/scan.js +97 -0
- package/dist/engine/validator/scan.js.map +1 -0
- package/dist/engine/validator/types.d.ts +50 -0
- package/dist/engine/validator/types.d.ts.map +1 -0
- package/dist/engine/validator/types.js +51 -0
- package/dist/engine/validator/types.js.map +1 -0
- package/dist/engine/webhook-signer.d.ts +39 -0
- package/dist/engine/webhook-signer.d.ts.map +1 -0
- package/dist/engine/webhook-signer.js +117 -0
- package/dist/engine/webhook-signer.js.map +1 -0
- package/dist/engine/webhooks.d.ts +75 -0
- package/dist/engine/webhooks.d.ts.map +1 -0
- package/dist/engine/webhooks.js +139 -0
- package/dist/engine/webhooks.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/integration/index.d.ts +6 -0
- package/dist/integration/index.d.ts.map +1 -0
- package/dist/integration/index.js +294 -0
- package/dist/integration/index.js.map +1 -0
- package/dist/integration/options.d.ts +105 -0
- package/dist/integration/options.d.ts.map +1 -0
- package/dist/integration/options.js +25 -0
- package/dist/integration/options.js.map +1 -0
- package/dist/integration/vite-plugin.d.ts +4 -0
- package/dist/integration/vite-plugin.d.ts.map +1 -0
- package/dist/integration/vite-plugin.js +37 -0
- package/dist/integration/vite-plugin.js.map +1 -0
- package/dist/providers/index.d.ts +3 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +3 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/null.d.ts +9 -0
- package/dist/providers/null.d.ts.map +1 -0
- package/dist/providers/null.js +144 -0
- package/dist/providers/null.js.map +1 -0
- package/dist/providers/types.d.ts +277 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/routes/ai.d.ts +25 -0
- package/dist/routes/ai.d.ts.map +1 -0
- package/dist/routes/ai.js +381 -0
- package/dist/routes/ai.js.map +1 -0
- package/dist/routes/analytics.d.ts +15 -0
- package/dist/routes/analytics.d.ts.map +1 -0
- package/dist/routes/analytics.js +61 -0
- package/dist/routes/analytics.js.map +1 -0
- package/dist/routes/api-keys.d.ts +13 -0
- package/dist/routes/api-keys.d.ts.map +1 -0
- package/dist/routes/api-keys.js +109 -0
- package/dist/routes/api-keys.js.map +1 -0
- package/dist/routes/authors.d.ts +19 -0
- package/dist/routes/authors.d.ts.map +1 -0
- package/dist/routes/authors.js +202 -0
- package/dist/routes/authors.js.map +1 -0
- package/dist/routes/authz-matrix.d.ts +78 -0
- package/dist/routes/authz-matrix.d.ts.map +1 -0
- package/dist/routes/authz-matrix.js +170 -0
- package/dist/routes/authz-matrix.js.map +1 -0
- package/dist/routes/calendar.d.ts +19 -0
- package/dist/routes/calendar.d.ts.map +1 -0
- package/dist/routes/calendar.js +89 -0
- package/dist/routes/calendar.js.map +1 -0
- package/dist/routes/config.d.ts +70 -0
- package/dist/routes/config.d.ts.map +1 -0
- package/dist/routes/config.js +23 -0
- package/dist/routes/config.js.map +1 -0
- package/dist/routes/content-insights.d.ts +18 -0
- package/dist/routes/content-insights.d.ts.map +1 -0
- package/dist/routes/content-insights.js +137 -0
- package/dist/routes/content-insights.js.map +1 -0
- package/dist/routes/content.d.ts +145 -0
- package/dist/routes/content.d.ts.map +1 -0
- package/dist/routes/content.js +1374 -0
- package/dist/routes/content.js.map +1 -0
- package/dist/routes/context.d.ts +104 -0
- package/dist/routes/context.d.ts.map +1 -0
- package/dist/routes/context.js +26 -0
- package/dist/routes/context.js.map +1 -0
- package/dist/routes/cron.d.ts +8 -0
- package/dist/routes/cron.d.ts.map +1 -0
- package/dist/routes/cron.js +20 -0
- package/dist/routes/cron.js.map +1 -0
- package/dist/routes/dashboard.d.ts +12 -0
- package/dist/routes/dashboard.d.ts.map +1 -0
- package/dist/routes/dashboard.js +113 -0
- package/dist/routes/dashboard.js.map +1 -0
- package/dist/routes/imports.d.ts +10 -0
- package/dist/routes/imports.d.ts.map +1 -0
- package/dist/routes/imports.js +149 -0
- package/dist/routes/imports.js.map +1 -0
- package/dist/routes/index.d.ts +75 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +141 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/media-lib.d.ts +75 -0
- package/dist/routes/media-lib.d.ts.map +1 -0
- package/dist/routes/media-lib.js +305 -0
- package/dist/routes/media-lib.js.map +1 -0
- package/dist/routes/media.d.ts +32 -0
- package/dist/routes/media.d.ts.map +1 -0
- package/dist/routes/media.js +756 -0
- package/dist/routes/media.js.map +1 -0
- package/dist/routes/preview.d.ts +19 -0
- package/dist/routes/preview.d.ts.map +1 -0
- package/dist/routes/preview.js +150 -0
- package/dist/routes/preview.js.map +1 -0
- package/dist/routes/rbac-invites.d.ts +31 -0
- package/dist/routes/rbac-invites.d.ts.map +1 -0
- package/dist/routes/rbac-invites.js +174 -0
- package/dist/routes/rbac-invites.js.map +1 -0
- package/dist/routes/rbac.d.ts +12 -0
- package/dist/routes/rbac.d.ts.map +1 -0
- package/dist/routes/rbac.js +126 -0
- package/dist/routes/rbac.js.map +1 -0
- package/dist/routes/shell.d.ts +22 -0
- package/dist/routes/shell.d.ts.map +1 -0
- package/dist/routes/shell.js +123 -0
- package/dist/routes/shell.js.map +1 -0
- package/dist/routes/subscriptions.d.ts +21 -0
- package/dist/routes/subscriptions.d.ts.map +1 -0
- package/dist/routes/subscriptions.js +127 -0
- package/dist/routes/subscriptions.js.map +1 -0
- package/dist/routes/tags.d.ts +23 -0
- package/dist/routes/tags.d.ts.map +1 -0
- package/dist/routes/tags.js +68 -0
- package/dist/routes/tags.js.map +1 -0
- package/dist/routes/topics.d.ts +12 -0
- package/dist/routes/topics.d.ts.map +1 -0
- package/dist/routes/topics.js +49 -0
- package/dist/routes/topics.js.map +1 -0
- package/dist/routes/webhooks.d.ts +31 -0
- package/dist/routes/webhooks.d.ts.map +1 -0
- package/dist/routes/webhooks.js +173 -0
- package/dist/routes/webhooks.js.map +1 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +6 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/insights-ingest.d.ts +959 -0
- package/dist/schema/insights-ingest.d.ts.map +1 -0
- package/dist/schema/insights-ingest.js +112 -0
- package/dist/schema/insights-ingest.js.map +1 -0
- package/dist/schema/migrations.d.ts +63 -0
- package/dist/schema/migrations.d.ts.map +1 -0
- package/dist/schema/migrations.js +589 -0
- package/dist/schema/migrations.js.map +1 -0
- package/dist/schema/tables.d.ts +11 -0
- package/dist/schema/tables.d.ts.map +1 -0
- package/dist/schema/tables.js +56 -0
- package/dist/schema/tables.js.map +1 -0
- package/dist/schema/types.d.ts +476 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/types.js +37 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/ui/api/_authz.d.ts +6 -0
- package/dist/ui/api/_authz.d.ts.map +1 -0
- package/dist/ui/api/_authz.js +74 -0
- package/dist/ui/api/_authz.js.map +1 -0
- package/dist/ui/api/_content-config.d.ts +22 -0
- package/dist/ui/api/_content-config.d.ts.map +1 -0
- package/dist/ui/api/_content-config.js +50 -0
- package/dist/ui/api/_content-config.js.map +1 -0
- package/dist/ui/api/activity.d.ts +3 -0
- package/dist/ui/api/activity.d.ts.map +1 -0
- package/dist/ui/api/activity.js +28 -0
- package/dist/ui/api/activity.js.map +1 -0
- package/dist/ui/api/analytics.d.ts +3 -0
- package/dist/ui/api/analytics.d.ts.map +1 -0
- package/dist/ui/api/analytics.js +36 -0
- package/dist/ui/api/analytics.js.map +1 -0
- package/dist/ui/api/authors/[id].d.ts +4 -0
- package/dist/ui/api/authors/[id].d.ts.map +1 -0
- package/dist/ui/api/authors/[id].js +17 -0
- package/dist/ui/api/authors/[id].js.map +1 -0
- package/dist/ui/api/authors.d.ts +4 -0
- package/dist/ui/api/authors.d.ts.map +1 -0
- package/dist/ui/api/authors.js +12 -0
- package/dist/ui/api/authors.js.map +1 -0
- package/dist/ui/api/calendar.d.ts +3 -0
- package/dist/ui/api/calendar.d.ts.map +1 -0
- package/dist/ui/api/calendar.js +16 -0
- package/dist/ui/api/calendar.js.map +1 -0
- package/dist/ui/api/content/[id]/ai/headlines.d.ts +3 -0
- package/dist/ui/api/content/[id]/ai/headlines.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/ai/headlines.js +7 -0
- package/dist/ui/api/content/[id]/ai/headlines.js.map +1 -0
- package/dist/ui/api/content/[id]/ai/meta-description.d.ts +3 -0
- package/dist/ui/api/content/[id]/ai/meta-description.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/ai/meta-description.js +6 -0
- package/dist/ui/api/content/[id]/ai/meta-description.js.map +1 -0
- package/dist/ui/api/content/[id]/ai/og-image.d.ts +3 -0
- package/dist/ui/api/content/[id]/ai/og-image.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/ai/og-image.js +7 -0
- package/dist/ui/api/content/[id]/ai/og-image.js.map +1 -0
- package/dist/ui/api/content/[id]/ai/proofread.d.ts +3 -0
- package/dist/ui/api/content/[id]/ai/proofread.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/ai/proofread.js +7 -0
- package/dist/ui/api/content/[id]/ai/proofread.js.map +1 -0
- package/dist/ui/api/content/[id]/ai/takeaways.d.ts +3 -0
- package/dist/ui/api/content/[id]/ai/takeaways.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/ai/takeaways.js +6 -0
- package/dist/ui/api/content/[id]/ai/takeaways.js.map +1 -0
- package/dist/ui/api/content/[id]/contributors.d.ts +4 -0
- package/dist/ui/api/content/[id]/contributors.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/contributors.js +8 -0
- package/dist/ui/api/content/[id]/contributors.js.map +1 -0
- package/dist/ui/api/content/[id]/preview-token.d.ts +3 -0
- package/dist/ui/api/content/[id]/preview-token.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/preview-token.js +16 -0
- package/dist/ui/api/content/[id]/preview-token.js.map +1 -0
- package/dist/ui/api/content/[id]/revisions/[rev]/restore.d.ts +3 -0
- package/dist/ui/api/content/[id]/revisions/[rev]/restore.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/revisions/[rev]/restore.js +7 -0
- package/dist/ui/api/content/[id]/revisions/[rev]/restore.js.map +1 -0
- package/dist/ui/api/content/[id]/revisions/[rev].d.ts +3 -0
- package/dist/ui/api/content/[id]/revisions/[rev].d.ts.map +1 -0
- package/dist/ui/api/content/[id]/revisions/[rev].js +6 -0
- package/dist/ui/api/content/[id]/revisions/[rev].js.map +1 -0
- package/dist/ui/api/content/[id]/revisions.d.ts +3 -0
- package/dist/ui/api/content/[id]/revisions.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/revisions.js +6 -0
- package/dist/ui/api/content/[id]/revisions.js.map +1 -0
- package/dist/ui/api/content/[id]/seo-score.d.ts +3 -0
- package/dist/ui/api/content/[id]/seo-score.d.ts.map +1 -0
- package/dist/ui/api/content/[id]/seo-score.js +7 -0
- package/dist/ui/api/content/[id]/seo-score.js.map +1 -0
- package/dist/ui/api/content/[id].d.ts +5 -0
- package/dist/ui/api/content/[id].d.ts.map +1 -0
- package/dist/ui/api/content/[id].js +17 -0
- package/dist/ui/api/content/[id].js.map +1 -0
- package/dist/ui/api/content/bulk.d.ts +3 -0
- package/dist/ui/api/content/bulk.d.ts.map +1 -0
- package/dist/ui/api/content/bulk.js +7 -0
- package/dist/ui/api/content/bulk.js.map +1 -0
- package/dist/ui/api/content/counts.d.ts +3 -0
- package/dist/ui/api/content/counts.d.ts.map +1 -0
- package/dist/ui/api/content/counts.js +8 -0
- package/dist/ui/api/content/counts.js.map +1 -0
- package/dist/ui/api/content/foundry-callback.d.ts +3 -0
- package/dist/ui/api/content/foundry-callback.d.ts.map +1 -0
- package/dist/ui/api/content/foundry-callback.js +8 -0
- package/dist/ui/api/content/foundry-callback.js.map +1 -0
- package/dist/ui/api/content/import/confirm.d.ts +3 -0
- package/dist/ui/api/content/import/confirm.d.ts.map +1 -0
- package/dist/ui/api/content/import/confirm.js +11 -0
- package/dist/ui/api/content/import/confirm.js.map +1 -0
- package/dist/ui/api/content/import/parse.d.ts +3 -0
- package/dist/ui/api/content/import/parse.d.ts.map +1 -0
- package/dist/ui/api/content/import/parse.js +11 -0
- package/dist/ui/api/content/import/parse.js.map +1 -0
- package/dist/ui/api/content/insights-ingest.d.ts +3 -0
- package/dist/ui/api/content/insights-ingest.d.ts.map +1 -0
- package/dist/ui/api/content/insights-ingest.js +15 -0
- package/dist/ui/api/content/insights-ingest.js.map +1 -0
- package/dist/ui/api/content-insights/dismiss.d.ts +3 -0
- package/dist/ui/api/content-insights/dismiss.d.ts.map +1 -0
- package/dist/ui/api/content-insights/dismiss.js +16 -0
- package/dist/ui/api/content-insights/dismiss.js.map +1 -0
- package/dist/ui/api/content-insights/index.d.ts +3 -0
- package/dist/ui/api/content-insights/index.d.ts.map +1 -0
- package/dist/ui/api/content-insights/index.js +12 -0
- package/dist/ui/api/content-insights/index.js.map +1 -0
- package/dist/ui/api/content-insights/undismiss.d.ts +3 -0
- package/dist/ui/api/content-insights/undismiss.d.ts.map +1 -0
- package/dist/ui/api/content-insights/undismiss.js +16 -0
- package/dist/ui/api/content-insights/undismiss.js.map +1 -0
- package/dist/ui/api/content.d.ts +4 -0
- package/dist/ui/api/content.d.ts.map +1 -0
- package/dist/ui/api/content.js +16 -0
- package/dist/ui/api/content.js.map +1 -0
- package/dist/ui/api/dashboard.d.ts +3 -0
- package/dist/ui/api/dashboard.d.ts.map +1 -0
- package/dist/ui/api/dashboard.js +22 -0
- package/dist/ui/api/dashboard.js.map +1 -0
- package/dist/ui/api/me.d.ts +3 -0
- package/dist/ui/api/me.d.ts.map +1 -0
- package/dist/ui/api/me.js +18 -0
- package/dist/ui/api/me.js.map +1 -0
- package/dist/ui/api/media/[id].d.ts +3 -0
- package/dist/ui/api/media/[id].d.ts.map +1 -0
- package/dist/ui/api/media/[id].js +17 -0
- package/dist/ui/api/media/[id].js.map +1 -0
- package/dist/ui/api/media/images.d.ts +3 -0
- package/dist/ui/api/media/images.d.ts.map +1 -0
- package/dist/ui/api/media/images.js +6 -0
- package/dist/ui/api/media/images.js.map +1 -0
- package/dist/ui/api/media/library/[id].d.ts +3 -0
- package/dist/ui/api/media/library/[id].d.ts.map +1 -0
- package/dist/ui/api/media/library/[id].js +6 -0
- package/dist/ui/api/media/library/[id].js.map +1 -0
- package/dist/ui/api/media/library.d.ts +3 -0
- package/dist/ui/api/media/library.d.ts.map +1 -0
- package/dist/ui/api/media/library.js +17 -0
- package/dist/ui/api/media/library.js.map +1 -0
- package/dist/ui/api/media/podcast/abort.d.ts +3 -0
- package/dist/ui/api/media/podcast/abort.d.ts.map +1 -0
- package/dist/ui/api/media/podcast/abort.js +4 -0
- package/dist/ui/api/media/podcast/abort.js.map +1 -0
- package/dist/ui/api/media/podcast/complete.d.ts +3 -0
- package/dist/ui/api/media/podcast/complete.d.ts.map +1 -0
- package/dist/ui/api/media/podcast/complete.js +4 -0
- package/dist/ui/api/media/podcast/complete.js.map +1 -0
- package/dist/ui/api/media/podcast/init.d.ts +3 -0
- package/dist/ui/api/media/podcast/init.d.ts.map +1 -0
- package/dist/ui/api/media/podcast/init.js +4 -0
- package/dist/ui/api/media/podcast/init.js.map +1 -0
- package/dist/ui/api/media/podcast/part.d.ts +3 -0
- package/dist/ui/api/media/podcast/part.d.ts.map +1 -0
- package/dist/ui/api/media/podcast/part.js +4 -0
- package/dist/ui/api/media/podcast/part.js.map +1 -0
- package/dist/ui/api/media/podcast.d.ts +3 -0
- package/dist/ui/api/media/podcast.d.ts.map +1 -0
- package/dist/ui/api/media/podcast.js +6 -0
- package/dist/ui/api/media/podcast.js.map +1 -0
- package/dist/ui/api/media/videos/abort.d.ts +3 -0
- package/dist/ui/api/media/videos/abort.d.ts.map +1 -0
- package/dist/ui/api/media/videos/abort.js +6 -0
- package/dist/ui/api/media/videos/abort.js.map +1 -0
- package/dist/ui/api/media/videos/complete.d.ts +3 -0
- package/dist/ui/api/media/videos/complete.d.ts.map +1 -0
- package/dist/ui/api/media/videos/complete.js +6 -0
- package/dist/ui/api/media/videos/complete.js.map +1 -0
- package/dist/ui/api/media/videos/init.d.ts +3 -0
- package/dist/ui/api/media/videos/init.d.ts.map +1 -0
- package/dist/ui/api/media/videos/init.js +6 -0
- package/dist/ui/api/media/videos/init.js.map +1 -0
- package/dist/ui/api/media/videos/part.d.ts +3 -0
- package/dist/ui/api/media/videos/part.d.ts.map +1 -0
- package/dist/ui/api/media/videos/part.js +6 -0
- package/dist/ui/api/media/videos/part.js.map +1 -0
- package/dist/ui/api/notifications.d.ts +4 -0
- package/dist/ui/api/notifications.d.ts.map +1 -0
- package/dist/ui/api/notifications.js +20 -0
- package/dist/ui/api/notifications.js.map +1 -0
- package/dist/ui/api/search.d.ts +3 -0
- package/dist/ui/api/search.d.ts.map +1 -0
- package/dist/ui/api/search.js +18 -0
- package/dist/ui/api/search.js.map +1 -0
- package/dist/ui/api/settings/api-keys/[id].d.ts +3 -0
- package/dist/ui/api/settings/api-keys/[id].d.ts.map +1 -0
- package/dist/ui/api/settings/api-keys/[id].js +22 -0
- package/dist/ui/api/settings/api-keys/[id].js.map +1 -0
- package/dist/ui/api/settings/api-keys.d.ts +4 -0
- package/dist/ui/api/settings/api-keys.d.ts.map +1 -0
- package/dist/ui/api/settings/api-keys.js +19 -0
- package/dist/ui/api/settings/api-keys.js.map +1 -0
- package/dist/ui/api/settings/domains.d.ts +3 -0
- package/dist/ui/api/settings/domains.d.ts.map +1 -0
- package/dist/ui/api/settings/domains.js +32 -0
- package/dist/ui/api/settings/domains.js.map +1 -0
- package/dist/ui/api/settings/integrations.d.ts +3 -0
- package/dist/ui/api/settings/integrations.d.ts.map +1 -0
- package/dist/ui/api/settings/integrations.js +32 -0
- package/dist/ui/api/settings/integrations.js.map +1 -0
- package/dist/ui/api/settings/members/[userId].d.ts +4 -0
- package/dist/ui/api/settings/members/[userId].d.ts.map +1 -0
- package/dist/ui/api/settings/members/[userId].js +26 -0
- package/dist/ui/api/settings/members/[userId].js.map +1 -0
- package/dist/ui/api/settings/members/invite.d.ts +3 -0
- package/dist/ui/api/settings/members/invite.d.ts.map +1 -0
- package/dist/ui/api/settings/members/invite.js +21 -0
- package/dist/ui/api/settings/members/invite.js.map +1 -0
- package/dist/ui/api/settings/members.d.ts +3 -0
- package/dist/ui/api/settings/members.d.ts.map +1 -0
- package/dist/ui/api/settings/members.js +17 -0
- package/dist/ui/api/settings/members.js.map +1 -0
- package/dist/ui/api/settings/webhooks/[id]/test.d.ts +3 -0
- package/dist/ui/api/settings/webhooks/[id]/test.d.ts.map +1 -0
- package/dist/ui/api/settings/webhooks/[id]/test.js +24 -0
- package/dist/ui/api/settings/webhooks/[id]/test.js.map +1 -0
- package/dist/ui/api/settings/webhooks/[id].d.ts +3 -0
- package/dist/ui/api/settings/webhooks/[id].d.ts.map +1 -0
- package/dist/ui/api/settings/webhooks/[id].js +23 -0
- package/dist/ui/api/settings/webhooks/[id].js.map +1 -0
- package/dist/ui/api/settings/webhooks.d.ts +4 -0
- package/dist/ui/api/settings/webhooks.d.ts.map +1 -0
- package/dist/ui/api/settings/webhooks.js +21 -0
- package/dist/ui/api/settings/webhooks.js.map +1 -0
- package/dist/ui/api/subscriptions.d.ts +4 -0
- package/dist/ui/api/subscriptions.d.ts.map +1 -0
- package/dist/ui/api/subscriptions.js +47 -0
- package/dist/ui/api/subscriptions.js.map +1 -0
- package/dist/ui/api/tags/[id].d.ts +4 -0
- package/dist/ui/api/tags/[id].d.ts.map +1 -0
- package/dist/ui/api/tags/[id].js +18 -0
- package/dist/ui/api/tags/[id].js.map +1 -0
- package/dist/ui/api/tags/index.d.ts +4 -0
- package/dist/ui/api/tags/index.d.ts.map +1 -0
- package/dist/ui/api/tags/index.js +13 -0
- package/dist/ui/api/tags/index.js.map +1 -0
- package/dist/ui/api/topics/[id].d.ts +3 -0
- package/dist/ui/api/topics/[id].d.ts.map +1 -0
- package/dist/ui/api/topics/[id].js +15 -0
- package/dist/ui/api/topics/[id].js.map +1 -0
- package/dist/ui/api/topics/index.d.ts +4 -0
- package/dist/ui/api/topics/index.d.ts.map +1 -0
- package/dist/ui/api/topics/index.js +12 -0
- package/dist/ui/api/topics/index.js.map +1 -0
- package/dist/ui/api/workspace-settings.d.ts +4 -0
- package/dist/ui/api/workspace-settings.d.ts.map +1 -0
- package/dist/ui/api/workspace-settings.js +20 -0
- package/dist/ui/api/workspace-settings.js.map +1 -0
- package/dist/ui/client/boot-state.d.ts +15 -0
- package/dist/ui/client/boot-state.d.ts.map +1 -0
- package/dist/ui/client/boot-state.js +36 -0
- package/dist/ui/client/boot-state.js.map +1 -0
- package/dist/ui/client/mount.d.ts +3 -0
- package/dist/ui/client/mount.d.ts.map +1 -0
- package/dist/ui/client/mount.js +37 -0
- package/dist/ui/client/mount.js.map +1 -0
- package/dist/ui/commands.d.ts +23 -0
- package/dist/ui/commands.d.ts.map +1 -0
- package/dist/ui/commands.js +48 -0
- package/dist/ui/commands.js.map +1 -0
- package/dist/ui/components/CmsApp.d.ts +16 -0
- package/dist/ui/components/CmsApp.d.ts.map +1 -0
- package/dist/ui/components/CmsApp.js +74 -0
- package/dist/ui/components/CmsApp.js.map +1 -0
- package/dist/ui/components/CommandPalette.d.ts +7 -0
- package/dist/ui/components/CommandPalette.d.ts.map +1 -0
- package/dist/ui/components/CommandPalette.js +61 -0
- package/dist/ui/components/CommandPalette.js.map +1 -0
- package/dist/ui/components/NoAccessScreen.d.ts +2 -0
- package/dist/ui/components/NoAccessScreen.d.ts.map +1 -0
- package/dist/ui/components/NoAccessScreen.js +42 -0
- package/dist/ui/components/NoAccessScreen.js.map +1 -0
- package/dist/ui/components/ShareModal.d.ts +27 -0
- package/dist/ui/components/ShareModal.d.ts.map +1 -0
- package/dist/ui/components/ShareModal.js +208 -0
- package/dist/ui/components/ShareModal.js.map +1 -0
- package/dist/ui/components/SharePickers.d.ts +39 -0
- package/dist/ui/components/SharePickers.d.ts.map +1 -0
- package/dist/ui/components/SharePickers.js +352 -0
- package/dist/ui/components/SharePickers.js.map +1 -0
- package/dist/ui/components/ShareStatsPanel.d.ts +22 -0
- package/dist/ui/components/ShareStatsPanel.d.ts.map +1 -0
- package/dist/ui/components/ShareStatsPanel.js +317 -0
- package/dist/ui/components/ShareStatsPanel.js.map +1 -0
- package/dist/ui/components/Sidebar.d.ts +7 -0
- package/dist/ui/components/Sidebar.d.ts.map +1 -0
- package/dist/ui/components/Sidebar.js +20 -0
- package/dist/ui/components/Sidebar.js.map +1 -0
- package/dist/ui/components/SiteSwitcher.d.ts +4 -0
- package/dist/ui/components/SiteSwitcher.d.ts.map +1 -0
- package/dist/ui/components/SiteSwitcher.js +35 -0
- package/dist/ui/components/SiteSwitcher.js.map +1 -0
- package/dist/ui/components/Topbar.d.ts +9 -0
- package/dist/ui/components/Topbar.d.ts.map +1 -0
- package/dist/ui/components/Topbar.js +20 -0
- package/dist/ui/components/Topbar.js.map +1 -0
- package/dist/ui/editor/AiAssistPanel.d.ts +8 -0
- package/dist/ui/editor/AiAssistPanel.d.ts.map +1 -0
- package/dist/ui/editor/AiAssistPanel.js +221 -0
- package/dist/ui/editor/AiAssistPanel.js.map +1 -0
- package/dist/ui/editor/ContentForm.d.ts +46 -0
- package/dist/ui/editor/ContentForm.d.ts.map +1 -0
- package/dist/ui/editor/ContentForm.js +821 -0
- package/dist/ui/editor/ContentForm.js.map +1 -0
- package/dist/ui/editor/Rte.d.ts +16 -0
- package/dist/ui/editor/Rte.d.ts.map +1 -0
- package/dist/ui/editor/Rte.js +272 -0
- package/dist/ui/editor/Rte.js.map +1 -0
- package/dist/ui/editor/ai-assist.d.ts +43 -0
- package/dist/ui/editor/ai-assist.d.ts.map +1 -0
- package/dist/ui/editor/ai-assist.js +114 -0
- package/dist/ui/editor/ai-assist.js.map +1 -0
- package/dist/ui/editor/autosave.d.ts +18 -0
- package/dist/ui/editor/autosave.d.ts.map +1 -0
- package/dist/ui/editor/autosave.js +23 -0
- package/dist/ui/editor/autosave.js.map +1 -0
- package/dist/ui/editor/content-payload.d.ts +19 -0
- package/dist/ui/editor/content-payload.d.ts.map +1 -0
- package/dist/ui/editor/content-payload.js +97 -0
- package/dist/ui/editor/content-payload.js.map +1 -0
- package/dist/ui/editor/editor-media-upload.d.ts +6 -0
- package/dist/ui/editor/editor-media-upload.d.ts.map +1 -0
- package/dist/ui/editor/editor-media-upload.js +20 -0
- package/dist/ui/editor/editor-media-upload.js.map +1 -0
- package/dist/ui/editor/serialize.d.ts +6 -0
- package/dist/ui/editor/serialize.d.ts.map +1 -0
- package/dist/ui/editor/serialize.js +479 -0
- package/dist/ui/editor/serialize.js.map +1 -0
- package/dist/ui/editor/tweet-embed.d.ts +4 -0
- package/dist/ui/editor/tweet-embed.d.ts.map +1 -0
- package/dist/ui/editor/tweet-embed.js +49 -0
- package/dist/ui/editor/tweet-embed.js.map +1 -0
- package/dist/ui/hash-router.d.ts +5 -0
- package/dist/ui/hash-router.d.ts.map +1 -0
- package/dist/ui/hash-router.js +25 -0
- package/dist/ui/hash-router.js.map +1 -0
- package/dist/ui/icons.d.ts +32 -0
- package/dist/ui/icons.d.ts.map +1 -0
- package/dist/ui/icons.js +86 -0
- package/dist/ui/icons.js.map +1 -0
- package/dist/ui/inspector/Field.d.ts +12 -0
- package/dist/ui/inspector/Field.d.ts.map +1 -0
- package/dist/ui/inspector/Field.js +8 -0
- package/dist/ui/inspector/Field.js.map +1 -0
- package/dist/ui/inspector/FoundryTab.d.ts +9 -0
- package/dist/ui/inspector/FoundryTab.d.ts.map +1 -0
- package/dist/ui/inspector/FoundryTab.js +362 -0
- package/dist/ui/inspector/FoundryTab.js.map +1 -0
- package/dist/ui/inspector/HistoryTab.d.ts +7 -0
- package/dist/ui/inspector/HistoryTab.d.ts.map +1 -0
- package/dist/ui/inspector/HistoryTab.js +289 -0
- package/dist/ui/inspector/HistoryTab.js.map +1 -0
- package/dist/ui/inspector/Inspector.d.ts +13 -0
- package/dist/ui/inspector/Inspector.d.ts.map +1 -0
- package/dist/ui/inspector/Inspector.js +163 -0
- package/dist/ui/inspector/Inspector.js.map +1 -0
- package/dist/ui/inspector/OrganizeTab.d.ts +15 -0
- package/dist/ui/inspector/OrganizeTab.d.ts.map +1 -0
- package/dist/ui/inspector/OrganizeTab.js +319 -0
- package/dist/ui/inspector/OrganizeTab.js.map +1 -0
- package/dist/ui/inspector/PublishTab.d.ts +18 -0
- package/dist/ui/inspector/PublishTab.d.ts.map +1 -0
- package/dist/ui/inspector/PublishTab.js +339 -0
- package/dist/ui/inspector/PublishTab.js.map +1 -0
- package/dist/ui/inspector/Section.d.ts +10 -0
- package/dist/ui/inspector/Section.d.ts.map +1 -0
- package/dist/ui/inspector/Section.js +40 -0
- package/dist/ui/inspector/Section.js.map +1 -0
- package/dist/ui/inspector/SeoTab.d.ts +19 -0
- package/dist/ui/inspector/SeoTab.d.ts.map +1 -0
- package/dist/ui/inspector/SeoTab.js +328 -0
- package/dist/ui/inspector/SeoTab.js.map +1 -0
- package/dist/ui/inspector/foundry-stages.d.ts +36 -0
- package/dist/ui/inspector/foundry-stages.d.ts.map +1 -0
- package/dist/ui/inspector/foundry-stages.js +101 -0
- package/dist/ui/inspector/foundry-stages.js.map +1 -0
- package/dist/ui/inspector/inspector-data.d.ts +80 -0
- package/dist/ui/inspector/inspector-data.d.ts.map +1 -0
- package/dist/ui/inspector/inspector-data.js +172 -0
- package/dist/ui/inspector/inspector-data.js.map +1 -0
- package/dist/ui/inspector/organize-data.d.ts +23 -0
- package/dist/ui/inspector/organize-data.d.ts.map +1 -0
- package/dist/ui/inspector/organize-data.js +28 -0
- package/dist/ui/inspector/organize-data.js.map +1 -0
- package/dist/ui/inspector/revision-diff.d.ts +49 -0
- package/dist/ui/inspector/revision-diff.d.ts.map +1 -0
- package/dist/ui/inspector/revision-diff.js +166 -0
- package/dist/ui/inspector/revision-diff.js.map +1 -0
- package/dist/ui/inspector/seo-helpers.d.ts +37 -0
- package/dist/ui/inspector/seo-helpers.d.ts.map +1 -0
- package/dist/ui/inspector/seo-helpers.js +37 -0
- package/dist/ui/inspector/seo-helpers.js.map +1 -0
- package/dist/ui/inspector/tab-visibility.d.ts +14 -0
- package/dist/ui/inspector/tab-visibility.d.ts.map +1 -0
- package/dist/ui/inspector/tab-visibility.js +28 -0
- package/dist/ui/inspector/tab-visibility.js.map +1 -0
- package/dist/ui/nav.d.ts +16 -0
- package/dist/ui/nav.d.ts.map +1 -0
- package/dist/ui/nav.js +33 -0
- package/dist/ui/nav.js.map +1 -0
- package/dist/ui/pages/admin.astro +32 -0
- package/dist/ui/preview/draft-page.d.ts +37 -0
- package/dist/ui/preview/draft-page.d.ts.map +1 -0
- package/dist/ui/preview/draft-page.js +212 -0
- package/dist/ui/preview/draft-page.js.map +1 -0
- package/dist/ui/preview/preview-layout.d.ts +23 -0
- package/dist/ui/preview/preview-layout.d.ts.map +1 -0
- package/dist/ui/preview/preview-layout.js +30 -0
- package/dist/ui/preview/preview-layout.js.map +1 -0
- package/dist/ui/screens/AnalyticsScreen.d.ts +2 -0
- package/dist/ui/screens/AnalyticsScreen.d.ts.map +1 -0
- package/dist/ui/screens/AnalyticsScreen.js +408 -0
- package/dist/ui/screens/AnalyticsScreen.js.map +1 -0
- package/dist/ui/screens/AuthorsScreen.d.ts +2 -0
- package/dist/ui/screens/AuthorsScreen.d.ts.map +1 -0
- package/dist/ui/screens/AuthorsScreen.js +225 -0
- package/dist/ui/screens/AuthorsScreen.js.map +1 -0
- package/dist/ui/screens/CalendarScreen.d.ts +6 -0
- package/dist/ui/screens/CalendarScreen.d.ts.map +1 -0
- package/dist/ui/screens/CalendarScreen.js +327 -0
- package/dist/ui/screens/CalendarScreen.js.map +1 -0
- package/dist/ui/screens/ContentInsightsScreen.d.ts +2 -0
- package/dist/ui/screens/ContentInsightsScreen.d.ts.map +1 -0
- package/dist/ui/screens/ContentInsightsScreen.js +129 -0
- package/dist/ui/screens/ContentInsightsScreen.js.map +1 -0
- package/dist/ui/screens/ContentRoute.d.ts +2 -0
- package/dist/ui/screens/ContentRoute.d.ts.map +1 -0
- package/dist/ui/screens/ContentRoute.js +32 -0
- package/dist/ui/screens/ContentRoute.js.map +1 -0
- package/dist/ui/screens/DashboardScreen.d.ts +6 -0
- package/dist/ui/screens/DashboardScreen.d.ts.map +1 -0
- package/dist/ui/screens/DashboardScreen.js +273 -0
- package/dist/ui/screens/DashboardScreen.js.map +1 -0
- package/dist/ui/screens/EditorScreen.d.ts +7 -0
- package/dist/ui/screens/EditorScreen.d.ts.map +1 -0
- package/dist/ui/screens/EditorScreen.js +426 -0
- package/dist/ui/screens/EditorScreen.js.map +1 -0
- package/dist/ui/screens/LibraryScreen.d.ts +6 -0
- package/dist/ui/screens/LibraryScreen.d.ts.map +1 -0
- package/dist/ui/screens/LibraryScreen.js +580 -0
- package/dist/ui/screens/LibraryScreen.js.map +1 -0
- package/dist/ui/screens/MediaScreen.d.ts +2 -0
- package/dist/ui/screens/MediaScreen.d.ts.map +1 -0
- package/dist/ui/screens/MediaScreen.js +173 -0
- package/dist/ui/screens/MediaScreen.js.map +1 -0
- package/dist/ui/screens/SettingsScreen.d.ts +4 -0
- package/dist/ui/screens/SettingsScreen.d.ts.map +1 -0
- package/dist/ui/screens/SettingsScreen.js +751 -0
- package/dist/ui/screens/SettingsScreen.js.map +1 -0
- package/dist/ui/screens/SocialShareScreen.d.ts +2 -0
- package/dist/ui/screens/SocialShareScreen.d.ts.map +1 -0
- package/dist/ui/screens/SocialShareScreen.js +224 -0
- package/dist/ui/screens/SocialShareScreen.js.map +1 -0
- package/dist/ui/screens/SubscriptionsScreen.d.ts +2 -0
- package/dist/ui/screens/SubscriptionsScreen.d.ts.map +1 -0
- package/dist/ui/screens/SubscriptionsScreen.js +441 -0
- package/dist/ui/screens/SubscriptionsScreen.js.map +1 -0
- package/dist/ui/screens/TopicsScreen.d.ts +2 -0
- package/dist/ui/screens/TopicsScreen.d.ts.map +1 -0
- package/dist/ui/screens/TopicsScreen.js +360 -0
- package/dist/ui/screens/TopicsScreen.js.map +1 -0
- package/dist/ui/screens/analytics-data.d.ts +19 -0
- package/dist/ui/screens/analytics-data.d.ts.map +1 -0
- package/dist/ui/screens/analytics-data.js +42 -0
- package/dist/ui/screens/analytics-data.js.map +1 -0
- package/dist/ui/screens/calendar-data.d.ts +45 -0
- package/dist/ui/screens/calendar-data.d.ts.map +1 -0
- package/dist/ui/screens/calendar-data.js +70 -0
- package/dist/ui/screens/calendar-data.js.map +1 -0
- package/dist/ui/screens/content-insights-data.d.ts +54 -0
- package/dist/ui/screens/content-insights-data.d.ts.map +1 -0
- package/dist/ui/screens/content-insights-data.js +82 -0
- package/dist/ui/screens/content-insights-data.js.map +1 -0
- package/dist/ui/screens/content-view.d.ts +21 -0
- package/dist/ui/screens/content-view.d.ts.map +1 -0
- package/dist/ui/screens/content-view.js +17 -0
- package/dist/ui/screens/content-view.js.map +1 -0
- package/dist/ui/screens/library-data.d.ts +76 -0
- package/dist/ui/screens/library-data.d.ts.map +1 -0
- package/dist/ui/screens/library-data.js +116 -0
- package/dist/ui/screens/library-data.js.map +1 -0
- package/dist/ui/screens/media-upload.d.ts +19 -0
- package/dist/ui/screens/media-upload.d.ts.map +1 -0
- package/dist/ui/screens/media-upload.js +187 -0
- package/dist/ui/screens/media-upload.js.map +1 -0
- package/dist/ui/screens/public-url.d.ts +24 -0
- package/dist/ui/screens/public-url.d.ts.map +1 -0
- package/dist/ui/screens/public-url.js +74 -0
- package/dist/ui/screens/public-url.js.map +1 -0
- package/dist/ui/screens/registry.d.ts +3 -0
- package/dist/ui/screens/registry.d.ts.map +1 -0
- package/dist/ui/screens/registry.js +38 -0
- package/dist/ui/screens/registry.js.map +1 -0
- package/dist/ui/screens/render-state.d.ts +105 -0
- package/dist/ui/screens/render-state.d.ts.map +1 -0
- package/dist/ui/screens/render-state.js +127 -0
- package/dist/ui/screens/render-state.js.map +1 -0
- package/dist/ui/screens/settings-data.d.ts +55 -0
- package/dist/ui/screens/settings-data.d.ts.map +1 -0
- package/dist/ui/screens/settings-data.js +89 -0
- package/dist/ui/screens/settings-data.js.map +1 -0
- package/dist/ui/screens/settings-panels-data.d.ts +58 -0
- package/dist/ui/screens/settings-panels-data.d.ts.map +1 -0
- package/dist/ui/screens/settings-panels-data.js +88 -0
- package/dist/ui/screens/settings-panels-data.js.map +1 -0
- package/dist/ui/screens/social-share-data.d.ts +307 -0
- package/dist/ui/screens/social-share-data.d.ts.map +1 -0
- package/dist/ui/screens/social-share-data.js +447 -0
- package/dist/ui/screens/social-share-data.js.map +1 -0
- package/dist/ui/screens/topics-data.d.ts +38 -0
- package/dist/ui/screens/topics-data.d.ts.map +1 -0
- package/dist/ui/screens/topics-data.js +50 -0
- package/dist/ui/screens/topics-data.js.map +1 -0
- package/dist/ui/styles/broadsheet.css +394 -0
- package/dist/ui/theme.d.ts +23 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +87 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/ui/tweaks.d.ts +7 -0
- package/dist/ui/tweaks.d.ts.map +1 -0
- package/dist/ui/tweaks.js +31 -0
- package/dist/ui/tweaks.js.map +1 -0
- package/dist/ui/use-hash-router.d.ts +6 -0
- package/dist/ui/use-hash-router.d.ts.map +1 -0
- package/dist/ui/use-hash-router.js +15 -0
- package/dist/ui/use-hash-router.js.map +1 -0
- package/dist/ui/use-tweaks.d.ts +6 -0
- package/dist/ui/use-tweaks.d.ts.map +1 -0
- package/dist/ui/use-tweaks.js +24 -0
- package/dist/ui/use-tweaks.js.map +1 -0
- package/dist/ui/workspace-context.d.ts +34 -0
- package/dist/ui/workspace-context.d.ts.map +1 -0
- package/dist/ui/workspace-context.js +32 -0
- package/dist/ui/workspace-context.js.map +1 -0
- package/migrations/0001_create_cms_tables.sql +200 -0
- package/migrations/0002_review_softdelete_board.sql +112 -0
- package/migrations/0003_content_contributors.sql +16 -0
- package/migrations/0004_seo_faq_columns.sql +6 -0
- package/migrations/0005_revision_delta_columns.sql +5 -0
- package/migrations/0006_processing_trigger_token.sql +4 -0
- package/migrations/0007_content_slug_redirects.sql +9 -0
- package/migrations/0008_workspace_settings.sql +17 -0
- package/migrations/0009_workspace_memberships.sql +36 -0
- package/migrations/0010_api_keys_webhooks.sql +21 -0
- package/migrations/0011_notifications_activity.sql +22 -0
- package/migrations/0012_content_imports.sql +10 -0
- package/migrations/0013_media_normalization.sql +4 -0
- package/migrations/0014_api_key_prefix.sql +3 -0
- package/migrations/0015_cms_topics.sql +7 -0
- package/migrations/0016_content_insights.sql +53 -0
- package/package.json +82 -0
- package/src/engine/activity-log.ts +39 -0
- package/src/engine/ai-prompts.ts +124 -0
- package/src/engine/ai-writeback.ts +62 -0
- package/src/engine/api-keys.ts +239 -0
- package/src/engine/content-insights.ts +198 -0
- package/src/engine/contributors.ts +95 -0
- package/src/engine/cron.ts +62 -0
- package/src/engine/d1.ts +29 -0
- package/src/engine/foundry-dispatch.ts +417 -0
- package/src/engine/import-parsers.ts +478 -0
- package/src/engine/index.ts +230 -0
- package/src/engine/invites.ts +271 -0
- package/src/engine/members.ts +216 -0
- package/src/engine/membership-rules.ts +63 -0
- package/src/engine/og-render.ts +59 -0
- package/src/engine/publish-guard.ts +123 -0
- package/src/engine/publisher.ts +1032 -0
- package/src/engine/revisions.ts +292 -0
- package/src/engine/sanitize.ts +183 -0
- package/src/engine/seed-membership.ts +92 -0
- package/src/engine/seo.ts +72 -0
- package/src/engine/slug-redirects.ts +34 -0
- package/src/engine/slug.ts +33 -0
- package/src/engine/soft-delete.ts +42 -0
- package/src/engine/tags.ts +95 -0
- package/src/engine/topics.ts +158 -0
- package/src/engine/url-guard.ts +136 -0
- package/src/engine/validator/checks/bare-url-not-autolinked.ts +78 -0
- package/src/engine/validator/checks/broken-footnote-label.ts +33 -0
- package/src/engine/validator/checks/double-encoded-entities.ts +46 -0
- package/src/engine/validator/checks/empty-alt-text.ts +35 -0
- package/src/engine/validator/checks/heading-hierarchy-skip.ts +33 -0
- package/src/engine/validator/checks/html-comment-leak.ts +58 -0
- package/src/engine/validator/checks/iframe-missing-dims-and-wrapper.ts +34 -0
- package/src/engine/validator/checks/invisible-control-chars.ts +58 -0
- package/src/engine/validator/checks/paywall-marker-leak.ts +43 -0
- package/src/engine/validator/checks/raw-block-html.ts +65 -0
- package/src/engine/validator/checks/stale-body-html.ts +39 -0
- package/src/engine/validator/checks/unresolved-footnote-anchor.ts +61 -0
- package/src/engine/validator/checks/word-gdocs-paste-artifacts.ts +72 -0
- package/src/engine/validator/index.ts +385 -0
- package/src/engine/validator/scan.ts +103 -0
- package/src/engine/validator/types.ts +114 -0
- package/src/engine/webhook-signer.ts +139 -0
- package/src/engine/webhooks.ts +224 -0
- package/src/index.ts +79 -0
- package/src/integration/index.ts +298 -0
- package/src/integration/options.ts +30 -0
- package/src/integration/vite-plugin.ts +37 -0
- package/src/providers/index.ts +2 -0
- package/src/providers/null.ts +160 -0
- package/src/providers/types.ts +284 -0
- package/src/routes/ai.ts +461 -0
- package/src/routes/analytics.ts +78 -0
- package/src/routes/api-keys.ts +133 -0
- package/src/routes/authors.ts +282 -0
- package/src/routes/authz-matrix.ts +239 -0
- package/src/routes/calendar.ts +127 -0
- package/src/routes/config.ts +99 -0
- package/src/routes/content-insights.ts +159 -0
- package/src/routes/content.ts +1753 -0
- package/src/routes/context.ts +146 -0
- package/src/routes/cron.ts +27 -0
- package/src/routes/dashboard.ts +174 -0
- package/src/routes/imports.ts +190 -0
- package/src/routes/index.ts +295 -0
- package/src/routes/media-lib.ts +405 -0
- package/src/routes/media.ts +944 -0
- package/src/routes/preview.ts +182 -0
- package/src/routes/rbac-invites.ts +220 -0
- package/src/routes/rbac.ts +155 -0
- package/src/routes/shell.ts +163 -0
- package/src/routes/subscriptions.ts +167 -0
- package/src/routes/tags.ts +93 -0
- package/src/routes/topics.ts +58 -0
- package/src/routes/webhooks.ts +233 -0
- package/src/schema/index.ts +45 -0
- package/src/schema/insights-ingest.ts +126 -0
- package/src/schema/migrations.ts +599 -0
- package/src/schema/tables.ts +59 -0
- package/src/schema/types.ts +576 -0
- package/src/ui/api/_authz.ts +100 -0
- package/src/ui/api/_content-config.ts +75 -0
- package/src/ui/api/activity.ts +33 -0
- package/src/ui/api/analytics.ts +42 -0
- package/src/ui/api/authors/[id].ts +23 -0
- package/src/ui/api/authors.ts +19 -0
- package/src/ui/api/calendar.ts +21 -0
- package/src/ui/api/content/[id]/ai/headlines.ts +10 -0
- package/src/ui/api/content/[id]/ai/meta-description.ts +11 -0
- package/src/ui/api/content/[id]/ai/og-image.ts +10 -0
- package/src/ui/api/content/[id]/ai/proofread.ts +10 -0
- package/src/ui/api/content/[id]/ai/takeaways.ts +11 -0
- package/src/ui/api/content/[id]/contributors.ts +13 -0
- package/src/ui/api/content/[id]/preview-token.ts +21 -0
- package/src/ui/api/content/[id]/revisions/[rev]/restore.ts +12 -0
- package/src/ui/api/content/[id]/revisions/[rev].ts +11 -0
- package/src/ui/api/content/[id]/revisions.ts +9 -0
- package/src/ui/api/content/[id]/seo-score.ts +10 -0
- package/src/ui/api/content/[id].ts +23 -0
- package/src/ui/api/content/bulk.ts +10 -0
- package/src/ui/api/content/counts.ts +11 -0
- package/src/ui/api/content/foundry-callback.ts +11 -0
- package/src/ui/api/content/import/confirm.ts +16 -0
- package/src/ui/api/content/import/parse.ts +16 -0
- package/src/ui/api/content/insights-ingest.ts +24 -0
- package/src/ui/api/content-insights/dismiss.ts +23 -0
- package/src/ui/api/content-insights/index.ts +21 -0
- package/src/ui/api/content-insights/undismiss.ts +23 -0
- package/src/ui/api/content.ts +21 -0
- package/src/ui/api/dashboard.ts +28 -0
- package/src/ui/api/me.ts +23 -0
- package/src/ui/api/media/[id].ts +22 -0
- package/src/ui/api/media/images.ts +9 -0
- package/src/ui/api/media/library/[id].ts +9 -0
- package/src/ui/api/media/library.ts +22 -0
- package/src/ui/api/media/podcast/abort.ts +6 -0
- package/src/ui/api/media/podcast/complete.ts +6 -0
- package/src/ui/api/media/podcast/init.ts +6 -0
- package/src/ui/api/media/podcast/part.ts +6 -0
- package/src/ui/api/media/podcast.ts +9 -0
- package/src/ui/api/media/videos/abort.ts +9 -0
- package/src/ui/api/media/videos/complete.ts +9 -0
- package/src/ui/api/media/videos/init.ts +9 -0
- package/src/ui/api/media/videos/part.ts +9 -0
- package/src/ui/api/notifications.ts +26 -0
- package/src/ui/api/search.ts +23 -0
- package/src/ui/api/settings/api-keys/[id].ts +28 -0
- package/src/ui/api/settings/api-keys.ts +25 -0
- package/src/ui/api/settings/domains.ts +37 -0
- package/src/ui/api/settings/integrations.ts +40 -0
- package/src/ui/api/settings/members/[userId].ts +33 -0
- package/src/ui/api/settings/members/invite.ts +27 -0
- package/src/ui/api/settings/members.ts +23 -0
- package/src/ui/api/settings/webhooks/[id]/test.ts +30 -0
- package/src/ui/api/settings/webhooks/[id].ts +29 -0
- package/src/ui/api/settings/webhooks.ts +27 -0
- package/src/ui/api/subscriptions.ts +56 -0
- package/src/ui/api/tags/[id].ts +24 -0
- package/src/ui/api/tags/index.ts +18 -0
- package/src/ui/api/topics/[id].ts +20 -0
- package/src/ui/api/topics/index.ts +17 -0
- package/src/ui/api/workspace-settings.ts +26 -0
- package/src/ui/client/boot-state.ts +42 -0
- package/src/ui/client/mount.tsx +41 -0
- package/src/ui/commands.ts +62 -0
- package/src/ui/components/CmsApp.tsx +149 -0
- package/src/ui/components/CommandPalette.tsx +118 -0
- package/src/ui/components/NoAccessScreen.tsx +79 -0
- package/src/ui/components/ShareModal.tsx +650 -0
- package/src/ui/components/SharePickers.tsx +790 -0
- package/src/ui/components/ShareStatsPanel.tsx +721 -0
- package/src/ui/components/Sidebar.tsx +86 -0
- package/src/ui/components/SiteSwitcher.tsx +100 -0
- package/src/ui/components/Topbar.tsx +93 -0
- package/src/ui/editor/AiAssistPanel.tsx +407 -0
- package/src/ui/editor/ContentForm.tsx +1462 -0
- package/src/ui/editor/Rte.tsx +382 -0
- package/src/ui/editor/ai-assist.ts +139 -0
- package/src/ui/editor/autosave.ts +36 -0
- package/src/ui/editor/content-payload.ts +125 -0
- package/src/ui/editor/editor-media-upload.ts +26 -0
- package/src/ui/editor/serialize.ts +522 -0
- package/src/ui/editor/tweet-embed.ts +60 -0
- package/src/ui/hash-router.ts +30 -0
- package/src/ui/icons.tsx +208 -0
- package/src/ui/inspector/Field.tsx +30 -0
- package/src/ui/inspector/FoundryTab.tsx +613 -0
- package/src/ui/inspector/HistoryTab.tsx +482 -0
- package/src/ui/inspector/Inspector.tsx +328 -0
- package/src/ui/inspector/OrganizeTab.tsx +534 -0
- package/src/ui/inspector/PublishTab.tsx +626 -0
- package/src/ui/inspector/Section.tsx +81 -0
- package/src/ui/inspector/SeoTab.tsx +573 -0
- package/src/ui/inspector/foundry-stages.ts +140 -0
- package/src/ui/inspector/inspector-data.ts +232 -0
- package/src/ui/inspector/organize-data.ts +51 -0
- package/src/ui/inspector/revision-diff.ts +213 -0
- package/src/ui/inspector/seo-helpers.ts +71 -0
- package/src/ui/inspector/tab-visibility.ts +37 -0
- package/src/ui/nav.ts +48 -0
- package/src/ui/pages/admin.astro +32 -0
- package/src/ui/preview/draft-page.tsx +395 -0
- package/src/ui/preview/preview-layout.ts +49 -0
- package/src/ui/screens/AnalyticsScreen.tsx +938 -0
- package/src/ui/screens/AuthorsScreen.tsx +524 -0
- package/src/ui/screens/CalendarScreen.tsx +694 -0
- package/src/ui/screens/ContentInsightsScreen.tsx +417 -0
- package/src/ui/screens/ContentRoute.tsx +35 -0
- package/src/ui/screens/DashboardScreen.tsx +654 -0
- package/src/ui/screens/EditorScreen.tsx +673 -0
- package/src/ui/screens/LibraryScreen.tsx +1350 -0
- package/src/ui/screens/MediaScreen.tsx +357 -0
- package/src/ui/screens/SettingsScreen.tsx +1841 -0
- package/src/ui/screens/SocialShareScreen.tsx +670 -0
- package/src/ui/screens/SubscriptionsScreen.tsx +1240 -0
- package/src/ui/screens/TopicsScreen.tsx +912 -0
- package/src/ui/screens/analytics-data.ts +68 -0
- package/src/ui/screens/calendar-data.ts +126 -0
- package/src/ui/screens/content-insights-data.ts +127 -0
- package/src/ui/screens/content-view.ts +30 -0
- package/src/ui/screens/library-data.ts +177 -0
- package/src/ui/screens/media-upload.ts +283 -0
- package/src/ui/screens/public-url.ts +81 -0
- package/src/ui/screens/registry.tsx +53 -0
- package/src/ui/screens/render-state.ts +228 -0
- package/src/ui/screens/settings-data.ts +140 -0
- package/src/ui/screens/settings-panels-data.ts +142 -0
- package/src/ui/screens/social-share-data.ts +753 -0
- package/src/ui/screens/topics-data.ts +75 -0
- package/src/ui/styles/broadsheet.css +394 -0
- package/src/ui/theme.ts +104 -0
- package/src/ui/tweaks.ts +37 -0
- package/src/ui/use-hash-router.ts +17 -0
- package/src/ui/use-tweaks.ts +31 -0
- package/src/ui/workspace-context.tsx +62 -0
- package/src/virtual.d.ts +4 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
// TypeScript row types for the CMS D1 contract.
|
|
2
|
+
//
|
|
3
|
+
// These mirror the prod-verified schema in migrations/0001_create_cms_tables.sql
|
|
4
|
+
// column-for-column, including the deliberate timestamp divergence: content-side
|
|
5
|
+
// tables store INTEGER unix epoch seconds; `media_assets` stores TEXT
|
|
6
|
+
// `datetime('now')` strings. The types encode that divergence so callers cannot
|
|
7
|
+
// silently normalize it.
|
|
8
|
+
//
|
|
9
|
+
// Nullability: a column declared NOT NULL maps to a required, non-nullable
|
|
10
|
+
// field; a nullable column maps to `T | null` (D1 returns SQL NULL as JS null).
|
|
11
|
+
|
|
12
|
+
/** content_items.type CHECK domain (includes 'newsletter' per prod 0024). */
|
|
13
|
+
export type ContentType = 'article' | 'video' | 'podcast' | 'newsletter'
|
|
14
|
+
|
|
15
|
+
/** content_items.status CHECK domain. */
|
|
16
|
+
export type ContentStatus = 'draft' | 'scheduled' | 'review' | 'published' | 'archived'
|
|
17
|
+
|
|
18
|
+
/** content_items.visibility CHECK domain. */
|
|
19
|
+
export type ContentVisibility = 'free' | 'premium'
|
|
20
|
+
|
|
21
|
+
/** video_content.processing_state CHECK domain (bead 08 state machine). */
|
|
22
|
+
export type VideoProcessingState =
|
|
23
|
+
| 'pending'
|
|
24
|
+
| 'queued'
|
|
25
|
+
| 'fetching'
|
|
26
|
+
| 'transcribing'
|
|
27
|
+
| 'transcoding'
|
|
28
|
+
| 'ready'
|
|
29
|
+
| 'failed'
|
|
30
|
+
|
|
31
|
+
/** A core content record. Timestamps are INTEGER unix epoch seconds. */
|
|
32
|
+
export interface ContentItemRow {
|
|
33
|
+
id: string
|
|
34
|
+
type: ContentType
|
|
35
|
+
status: ContentStatus
|
|
36
|
+
visibility: ContentVisibility
|
|
37
|
+
slug: string
|
|
38
|
+
title: string
|
|
39
|
+
seo_title: string | null
|
|
40
|
+
description: string | null
|
|
41
|
+
excerpt: string | null
|
|
42
|
+
byline: string | null
|
|
43
|
+
/** Theme-token taxonomy (site-supplied vocabulary). */
|
|
44
|
+
channel: string | null
|
|
45
|
+
/** Theme-token taxonomy (site-supplied vocabulary). */
|
|
46
|
+
primary_topic: string | null
|
|
47
|
+
featured: number
|
|
48
|
+
author_id: string | null
|
|
49
|
+
hero_image_id: string | null
|
|
50
|
+
hero_image_alt: string | null
|
|
51
|
+
hero_image_caption: string | null
|
|
52
|
+
social_image_id: string | null
|
|
53
|
+
canonical_url: string | null
|
|
54
|
+
publish_at: number | null
|
|
55
|
+
published_at: number | null
|
|
56
|
+
created_at: number
|
|
57
|
+
updated_at: number
|
|
58
|
+
/** Theme-token default ('Europe/Paris' in prod). */
|
|
59
|
+
publish_tz: string
|
|
60
|
+
/** JSON-encoded string array. */
|
|
61
|
+
ai_locked_fields: string
|
|
62
|
+
published_revision_id: string | null
|
|
63
|
+
/** Unix epoch seconds; NULL when not soft-deleted (migration 0002). */
|
|
64
|
+
deleted_at: number | null
|
|
65
|
+
/** Editorial board sort position (migration 0002). */
|
|
66
|
+
board_position: number | null
|
|
67
|
+
/** SEO quality score 0–100 (migration 0004). */
|
|
68
|
+
seo_score: number | null
|
|
69
|
+
/** SEO focus keyword for scoring/hints (migration 0004). */
|
|
70
|
+
seo_focus_keyword: string | null
|
|
71
|
+
/** AI-generated OG image asset id (migration 0004). */
|
|
72
|
+
ai_og_image_id: string | null
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Standalone topic taxonomy row. Counts are derived from content_items.primary_topic. */
|
|
76
|
+
export interface CmsTopicRow {
|
|
77
|
+
slug: string
|
|
78
|
+
label: string
|
|
79
|
+
created_at: number
|
|
80
|
+
updated_at: number
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Article body + Hermes-fed takeaways/FAQ metadata (KEPT per OD-EST1). */
|
|
84
|
+
export interface ArticleContentRow {
|
|
85
|
+
content_id: string
|
|
86
|
+
body_markdown: string
|
|
87
|
+
body_html: string | null
|
|
88
|
+
word_count: number | null
|
|
89
|
+
read_time_minutes: number | null
|
|
90
|
+
subtitle: string | null
|
|
91
|
+
ai_takeaways: string | null
|
|
92
|
+
ai_takeaways_at: number | null
|
|
93
|
+
ai_takeaways_model: string | null
|
|
94
|
+
editor_takeaways: string | null
|
|
95
|
+
ai_takeaways_correlation_id: string | null
|
|
96
|
+
faq_correlation_id: string | null
|
|
97
|
+
faq_generated_at: number | null
|
|
98
|
+
faq_model: string | null
|
|
99
|
+
/** JSON-encoded FAQ entries (migration 0004). */
|
|
100
|
+
faq_json: string | null
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Video body + processing state machine. NOTE the prod column is `video_id`
|
|
105
|
+
* (renamed from `stream_uid` in migration 0018) — do not reintroduce stream_uid.
|
|
106
|
+
*/
|
|
107
|
+
export interface VideoContentRow {
|
|
108
|
+
content_id: string
|
|
109
|
+
script: string
|
|
110
|
+
video_id: string
|
|
111
|
+
duration_seconds: number | null
|
|
112
|
+
thumbnail_image_id: string | null
|
|
113
|
+
processing_state: VideoProcessingState
|
|
114
|
+
processing_correlation_id: string | null
|
|
115
|
+
processing_started_at: number | null
|
|
116
|
+
processing_completed_at: number | null
|
|
117
|
+
processing_last_event_at: number | null
|
|
118
|
+
processing_error: string | null
|
|
119
|
+
processing_source_url: string | null
|
|
120
|
+
processing_source_kind: string | null
|
|
121
|
+
source_fetched: number
|
|
122
|
+
transcript_ready: number
|
|
123
|
+
hls_ready: number
|
|
124
|
+
transcript_url: string | null
|
|
125
|
+
hls_manifest_url: string | null
|
|
126
|
+
hls_poster_url: string | null
|
|
127
|
+
/** Idempotency token for re-triggering processing (migration 0006). */
|
|
128
|
+
processing_trigger_token: string | null
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface PodcastContentRow {
|
|
132
|
+
content_id: string
|
|
133
|
+
transcript: string
|
|
134
|
+
audio_r2_key: string
|
|
135
|
+
duration_seconds: number | null
|
|
136
|
+
/** Idempotency token for re-triggering processing (migration 0006). */
|
|
137
|
+
processing_trigger_token: string | null
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** A version-history snapshot. payload_json is a JSON-encoded content payload. */
|
|
141
|
+
export interface ContentRevisionRow {
|
|
142
|
+
id: string
|
|
143
|
+
content_id: string
|
|
144
|
+
payload_json: string
|
|
145
|
+
created_at: number
|
|
146
|
+
created_by: string | null
|
|
147
|
+
/** Net word additions vs prior revision (migration 0005). */
|
|
148
|
+
words_added: number | null
|
|
149
|
+
/** Net word removals vs prior revision (migration 0005). */
|
|
150
|
+
words_removed: number | null
|
|
151
|
+
/** Human or autosave label, e.g. 'autosave' | 'manual' | 'restore' (migration 0005). */
|
|
152
|
+
tag: string | null
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface ContentTagRow {
|
|
156
|
+
id: string
|
|
157
|
+
slug: string
|
|
158
|
+
label: string
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface ContentTagLinkRow {
|
|
162
|
+
content_id: string
|
|
163
|
+
tag_id: string
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface ContentRelationRow {
|
|
167
|
+
content_id: string
|
|
168
|
+
related_id: string
|
|
169
|
+
rank: number
|
|
170
|
+
reason: string | null
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* A media asset. IMPORTANT: created_at/updated_at are TEXT `datetime('now')`
|
|
175
|
+
* strings here, NOT INTEGER unix seconds like the content tables. This
|
|
176
|
+
* divergence is intentional and matches prod — do not normalize.
|
|
177
|
+
*/
|
|
178
|
+
export interface MediaAssetRow {
|
|
179
|
+
id: string
|
|
180
|
+
/** Theme-token default ('fronts' in prod). */
|
|
181
|
+
site_id: string
|
|
182
|
+
asset_type: string
|
|
183
|
+
source_type: string | null
|
|
184
|
+
original_filename: string | null
|
|
185
|
+
status: string
|
|
186
|
+
object_key: string | null
|
|
187
|
+
public_url: string | null
|
|
188
|
+
url: string | null
|
|
189
|
+
width: number | null
|
|
190
|
+
height: number | null
|
|
191
|
+
/** JSON-encoded variant map. */
|
|
192
|
+
variants_json: string | null
|
|
193
|
+
r2_binding: string | null
|
|
194
|
+
/** TEXT `datetime('now')` — NOT a unix epoch integer. */
|
|
195
|
+
created_at: string
|
|
196
|
+
/** TEXT `datetime('now')` — NOT a unix epoch integer. */
|
|
197
|
+
updated_at: string
|
|
198
|
+
pinned: number
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** A CMS author. Timestamps are INTEGER unix seconds (strftime('%s','now')). */
|
|
202
|
+
export interface AuthorRow {
|
|
203
|
+
id: string
|
|
204
|
+
name: string
|
|
205
|
+
slug: string
|
|
206
|
+
bio: string | null
|
|
207
|
+
avatar: string | null
|
|
208
|
+
email: string | null
|
|
209
|
+
/** JSON-encoded social links. */
|
|
210
|
+
social: string | null
|
|
211
|
+
created_at: number
|
|
212
|
+
updated_at: number
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** Foundry HMAC-callback dedupe record (takeaways/faq/hls; bead 08). */
|
|
216
|
+
export interface FoundryCallbackEventRow {
|
|
217
|
+
event_id: string
|
|
218
|
+
event_kind: string
|
|
219
|
+
correlation_id: string
|
|
220
|
+
received_at: number
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** Multi-byline contributor record linking authors to content with a role (migration 0003). */
|
|
224
|
+
export interface ContentContributorRow {
|
|
225
|
+
content_id: string
|
|
226
|
+
author_id: string
|
|
227
|
+
role: string | null
|
|
228
|
+
position: number
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Redirect record mapping old slugs to content items (migration 0007). */
|
|
232
|
+
export interface ContentSlugRedirectRow {
|
|
233
|
+
old_slug: string
|
|
234
|
+
content_id: string
|
|
235
|
+
created_at: number
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// ---------------------------------------------------------------------------
|
|
239
|
+
// Masthead platform tables (migrations 0008–0011)
|
|
240
|
+
// ---------------------------------------------------------------------------
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Role union for workspace members (migration 0009).
|
|
244
|
+
* NOTE: this must stay in sync with CmsRole in src/routes/context.ts — one is
|
|
245
|
+
* re-exported from the other to keep a single source of truth.
|
|
246
|
+
*/
|
|
247
|
+
export type CmsRole = 'owner' | 'senior_editor' | 'editor' | 'contributor' | 'producer'
|
|
248
|
+
|
|
249
|
+
/** Per-workspace publication settings (migration 0008). */
|
|
250
|
+
export interface WorkspaceSettingsRow {
|
|
251
|
+
workspace_id: string
|
|
252
|
+
publication_name: string | null
|
|
253
|
+
tagline: string | null
|
|
254
|
+
language: string
|
|
255
|
+
timezone: string
|
|
256
|
+
require_review: number
|
|
257
|
+
auto_seo: number
|
|
258
|
+
scheduled_publish: number
|
|
259
|
+
premium_default: number
|
|
260
|
+
accent_color: string | null
|
|
261
|
+
display_typeface: string | null
|
|
262
|
+
logo_r2_key: string | null
|
|
263
|
+
created_at: number
|
|
264
|
+
updated_at: number
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Mirror of the OpenAuth subject for profile/name caching (migration 0009).
|
|
269
|
+
* INTEGER timestamps per content convention (diverges from inbox's TEXT).
|
|
270
|
+
*/
|
|
271
|
+
export interface MastheadUserRow {
|
|
272
|
+
id: string
|
|
273
|
+
email: string
|
|
274
|
+
name: string | null
|
|
275
|
+
image: string | null
|
|
276
|
+
last_login_at: number | null
|
|
277
|
+
created_at: number
|
|
278
|
+
updated_at: number
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** Workspace membership keyed on OpenAuth subject (migration 0009). */
|
|
282
|
+
export interface WorkspaceMembershipRow {
|
|
283
|
+
workspace_id: string
|
|
284
|
+
user_id: string
|
|
285
|
+
role: CmsRole
|
|
286
|
+
invited_by: string | null
|
|
287
|
+
invited_at: number | null
|
|
288
|
+
accepted_at: number | null
|
|
289
|
+
created_at: number
|
|
290
|
+
updated_at: number
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** Pending workspace invitation (migration 0009). */
|
|
294
|
+
export interface WorkspaceInviteRow {
|
|
295
|
+
id: string
|
|
296
|
+
workspace_id: string
|
|
297
|
+
email: string
|
|
298
|
+
role: CmsRole
|
|
299
|
+
invited_by: string
|
|
300
|
+
token_hash: string
|
|
301
|
+
expires_at: number
|
|
302
|
+
accepted_at: number | null
|
|
303
|
+
created_at: number
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* CMS API key. key_hash is a SHA-256 hex of the raw key. The raw key is
|
|
308
|
+
* NEVER stored here — only shown once on creation (migration 0010).
|
|
309
|
+
* key_prefix stores a safe display hint (e.g. 'mk_live_••••ab12') added
|
|
310
|
+
* in migration 0014 so the masked list can show prefix + last-4 chars.
|
|
311
|
+
*/
|
|
312
|
+
export interface CmsApiKeyRow {
|
|
313
|
+
id: string
|
|
314
|
+
workspace_id: string
|
|
315
|
+
name: string
|
|
316
|
+
key_hash: string
|
|
317
|
+
/** JSON-encoded string array of scope identifiers. */
|
|
318
|
+
scopes: string
|
|
319
|
+
created_at: number
|
|
320
|
+
last_used: number | null
|
|
321
|
+
/** Display hint: '<prefix>••••<last4>' — stored on create, never the raw key. */
|
|
322
|
+
key_prefix: string | null
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Outbound webhook registration. HMAC secret lives in the Secrets Store, NEVER
|
|
327
|
+
* in D1 (spec §12 + risk 7) — there is deliberately no secret column here
|
|
328
|
+
* (migration 0010).
|
|
329
|
+
*/
|
|
330
|
+
export interface CmsWebhookRow {
|
|
331
|
+
id: string
|
|
332
|
+
workspace_id: string
|
|
333
|
+
event_type: string
|
|
334
|
+
url: string
|
|
335
|
+
last_status: string | null
|
|
336
|
+
last_fired_at: number | null
|
|
337
|
+
created_at: number
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/** In-app notification for a workspace member (migration 0011). */
|
|
341
|
+
export interface CmsNotificationRow {
|
|
342
|
+
id: string
|
|
343
|
+
workspace_id: string
|
|
344
|
+
user_id: string
|
|
345
|
+
kind: string
|
|
346
|
+
body: string | null
|
|
347
|
+
read_at: number | null
|
|
348
|
+
created_at: number
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/** Audit/activity log entry (migration 0011). */
|
|
352
|
+
export interface CmsActivityLogRow {
|
|
353
|
+
id: string
|
|
354
|
+
workspace_id: string
|
|
355
|
+
user_id: string | null
|
|
356
|
+
action: string
|
|
357
|
+
target_id: string | null
|
|
358
|
+
target_title: string | null
|
|
359
|
+
type: string | null
|
|
360
|
+
created_at: number
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// ---------------------------------------------------------------------------
|
|
364
|
+
// Content import staging (migration 0012)
|
|
365
|
+
// ---------------------------------------------------------------------------
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Staged import record for content ingested from an external source (e.g.
|
|
369
|
+
* RSS, Ghost export, Substack). status: 'pending' | 'processing' | 'done' |
|
|
370
|
+
* 'error'. payload_json holds the raw import data before normalization.
|
|
371
|
+
*/
|
|
372
|
+
export interface ContentImportRow {
|
|
373
|
+
id: string
|
|
374
|
+
workspace_id: string
|
|
375
|
+
source: string
|
|
376
|
+
status: string
|
|
377
|
+
payload_json: string | null
|
|
378
|
+
created_at: number
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// ---------------------------------------------------------------------------
|
|
382
|
+
// Media normalization notes (migration 0013 — non-destructive, index only)
|
|
383
|
+
// ---------------------------------------------------------------------------
|
|
384
|
+
//
|
|
385
|
+
// MediaAssetRow.asset_type reconciliation (spec §4/§13.8):
|
|
386
|
+
// - 'podcast' = published podcast episode audio asset
|
|
387
|
+
// - 'audio' = any other audio asset (music, SFX, general audio)
|
|
388
|
+
// Both values are valid and must remain queryable. Media pickers query both.
|
|
389
|
+
// public_url is the canonical delivery URL (migration 0013 adds an index on
|
|
390
|
+
// it for fast lookup by URL). Do NOT normalize 'podcast' → 'audio'.
|
|
391
|
+
//
|
|
392
|
+
// See migration 0013_media_normalization.sql for the idx_media_assets_public_url
|
|
393
|
+
// index creation (IF NOT EXISTS — safe on any existing DB).
|
|
394
|
+
|
|
395
|
+
// ---------------------------------------------------------------------------
|
|
396
|
+
// Content Insights shared types (migration 0016)
|
|
397
|
+
// ---------------------------------------------------------------------------
|
|
398
|
+
// Shared Content Insights TS types — imported/mirrored by BOTH the Foundry
|
|
399
|
+
// capability (discover.content_insights) and the CMS package (@growth-labs/cms).
|
|
400
|
+
// Row types mirror migration 0016 column-for-column: a NOT NULL column maps to a
|
|
401
|
+
// required non-nullable field; a nullable column maps to `T | null` (D1 returns
|
|
402
|
+
// SQL NULL as JS null) — the same convention as the content tables above.
|
|
403
|
+
|
|
404
|
+
/** content_insights.suggestion_type CHECK domain. */
|
|
405
|
+
export type InsightSuggestionType = 'cluster' | 'tracker'
|
|
406
|
+
|
|
407
|
+
/** content_insights.signal_type CHECK domain. */
|
|
408
|
+
export type InsightSignalType = 'demand' | 'opportunity'
|
|
409
|
+
|
|
410
|
+
/** content_insight_runs.status CHECK domain. */
|
|
411
|
+
export type InsightRunStatus = 'running' | 'completed' | 'partial' | 'failed'
|
|
412
|
+
|
|
413
|
+
/** Beat facet — secondary topical facet (geographic theater lives in desk). */
|
|
414
|
+
export type InsightBeat = 'defense' | 'intelligence' | 'diplomacy' | 'analysis'
|
|
415
|
+
|
|
416
|
+
/** Demand evidence chip (signal_type='demand'): the real GSC metric. */
|
|
417
|
+
export interface InsightEvidenceDemand {
|
|
418
|
+
query: string
|
|
419
|
+
impressions: number
|
|
420
|
+
clicks: number
|
|
421
|
+
/** Click-through rate, 0..1. */
|
|
422
|
+
ctr: number
|
|
423
|
+
/** Average GSC position (lower is better; permission zone ~5..20). */
|
|
424
|
+
position: number
|
|
425
|
+
/** Impression delta vs the prior window (signed). */
|
|
426
|
+
trend: number
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/** Opportunity evidence chip (signal_type='opportunity'): validated-research basis. */
|
|
430
|
+
export interface InsightEvidenceOpportunity {
|
|
431
|
+
/** One-line statement of the validated editorial basis. */
|
|
432
|
+
basis: string
|
|
433
|
+
/** Count of cite-or-cut validated sources backing the idea. */
|
|
434
|
+
source_count: number
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/** content_insights.evidence — JSON stored as TEXT NOT NULL, zod-validated. */
|
|
438
|
+
export type InsightEvidence = InsightEvidenceDemand | InsightEvidenceOpportunity
|
|
439
|
+
|
|
440
|
+
/** Which open-web discovery stream produced an opportunity row (theater split). */
|
|
441
|
+
export type DiscoveryKind = 'competitor' | 'audience_question'
|
|
442
|
+
|
|
443
|
+
/** One recent competitor article — the COMPETITOR-WATCH pulse evidence. */
|
|
444
|
+
export interface InsightCompetitorArticle {
|
|
445
|
+
title: string
|
|
446
|
+
url: string
|
|
447
|
+
outlet?: string
|
|
448
|
+
published?: string
|
|
449
|
+
/** true → the article's topic is already in our pipeline (flagged, NOT dropped). */
|
|
450
|
+
covered?: boolean
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/** content_insights.brief — JSON stored as TEXT NOT NULL, zod-validated. */
|
|
454
|
+
export interface InsightBrief {
|
|
455
|
+
why_now: string
|
|
456
|
+
angle: string
|
|
457
|
+
cluster: {
|
|
458
|
+
canonical: string
|
|
459
|
+
spokes: string[]
|
|
460
|
+
}
|
|
461
|
+
sources: Array<{ title: string; url: string }>
|
|
462
|
+
/**
|
|
463
|
+
* Which open-web discovery STREAM produced this opportunity row (the theater
|
|
464
|
+
* split): 'competitor' (RSS competitor-watch) vs 'audience_question' (Google
|
|
465
|
+
* PAA reader questions). Optional + back-compat (an old opportunity row renders
|
|
466
|
+
* as the legacy single Opportunity stream). Lives in the opaque brief TEXT blob
|
|
467
|
+
* — no DB migration — but the ingest zod schema MUST mirror it (Zod strips
|
|
468
|
+
* unknown brief keys), or the board never sees it.
|
|
469
|
+
*/
|
|
470
|
+
discoveryKind?: DiscoveryKind
|
|
471
|
+
/** COMPETITOR-WATCH pulse: the recent rival articles per theater (raw signal). */
|
|
472
|
+
competitor_articles?: InsightCompetitorArticle[]
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* A content_insights row (the suggestion). `evidence` and `brief` are TEXT
|
|
477
|
+
* columns in D1; this is the DECODED, in-memory shape after JSON.parse +
|
|
478
|
+
* zod validation. The wire/DB string forms are decoded at the route boundary.
|
|
479
|
+
*/
|
|
480
|
+
export interface ContentInsightRow {
|
|
481
|
+
id: string
|
|
482
|
+
site_id: string
|
|
483
|
+
run_id: string
|
|
484
|
+
/** YYYY-MM-DD. */
|
|
485
|
+
run_date: string
|
|
486
|
+
/** primary_topic desk slug. */
|
|
487
|
+
desk: string
|
|
488
|
+
suggestion_type: InsightSuggestionType
|
|
489
|
+
signal_type: InsightSignalType
|
|
490
|
+
/** 0 | 1. */
|
|
491
|
+
is_best_bet: number
|
|
492
|
+
/** Cross-desk Best Bets rank; NULL when not a best bet. */
|
|
493
|
+
best_bet_rank: number | null
|
|
494
|
+
/** Within-desk display order. */
|
|
495
|
+
desk_rank: number
|
|
496
|
+
/** The question/headline. */
|
|
497
|
+
headline: string
|
|
498
|
+
/** Decoded evidence chip (TEXT column in D1). */
|
|
499
|
+
evidence: InsightEvidence
|
|
500
|
+
/** Decoded mini-brief (TEXT column in D1). */
|
|
501
|
+
brief: InsightBrief
|
|
502
|
+
/** Stable dedup/dismissal key — see deriveIntentKey. */
|
|
503
|
+
intent_key: string
|
|
504
|
+
/** Secondary topical facet (geographic theater lives in desk). */
|
|
505
|
+
beat: InsightBeat | null
|
|
506
|
+
/** Unix epoch seconds. */
|
|
507
|
+
created_at: number
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/** A content_insight_runs row (per-(site_id, run_date) replay guard, UNIQUE). */
|
|
511
|
+
export interface ContentInsightRunRow {
|
|
512
|
+
id: string
|
|
513
|
+
site_id: string
|
|
514
|
+
run_date: string
|
|
515
|
+
status: InsightRunStatus
|
|
516
|
+
/** Dedupe key (mirrors foundry_callback_events.event_id). */
|
|
517
|
+
event_id: string
|
|
518
|
+
/** Monotonic; the stale-replay guard rejects equal-or-lower. */
|
|
519
|
+
run_attempt: number
|
|
520
|
+
/** Unix epoch seconds the board was generated. */
|
|
521
|
+
generated_at: number
|
|
522
|
+
/** Content hash of the board for change detection. */
|
|
523
|
+
content_hash: string
|
|
524
|
+
demand_count: number
|
|
525
|
+
opportunity_count: number
|
|
526
|
+
started_at: number | null
|
|
527
|
+
completed_at: number | null
|
|
528
|
+
error: string | null
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/** A content_insight_dismissals row (PK (site_id, intent_key)). */
|
|
532
|
+
export interface ContentInsightDismissalRow {
|
|
533
|
+
site_id: string
|
|
534
|
+
intent_key: string
|
|
535
|
+
dismissed_at: number
|
|
536
|
+
dismissed_by: string | null
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Schema version for the intent_key derivation. Bump ONLY on a breaking change
|
|
541
|
+
* to the canonical-cluster-id semantics; bumping rotates every intent_key (and
|
|
542
|
+
* therefore drops every existing dismissal) so treat as a migration event.
|
|
543
|
+
*/
|
|
544
|
+
export const INTENT_KEY_VERSION = 1
|
|
545
|
+
|
|
546
|
+
/** Stable inputs to the intent_key hash. NOT headline-based. */
|
|
547
|
+
export interface IntentKeyInput {
|
|
548
|
+
/** Canonical cluster/intent id (the stable identity of the topic). */
|
|
549
|
+
canonicalClusterId: string
|
|
550
|
+
/** primary_topic desk slug. */
|
|
551
|
+
desk: string
|
|
552
|
+
signalType: InsightSignalType
|
|
553
|
+
/** Defaults to INTENT_KEY_VERSION. */
|
|
554
|
+
version?: number
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* intent_key = stable hash of (canonicalClusterId + desk + signalType +
|
|
559
|
+
* version). The canonical string is the lowercased, ''-joined tuple; the
|
|
560
|
+
* hash is lowercase hex SHA-256 (Web Crypto). BOTH sides MUST derive it
|
|
561
|
+
* identically — rephrasing a headline must not lose a dismissal, and the same
|
|
562
|
+
* headline across distinct intents must not collide.
|
|
563
|
+
*/
|
|
564
|
+
export async function deriveIntentKey(input: IntentKeyInput): Promise<string> {
|
|
565
|
+
const version = input.version ?? INTENT_KEY_VERSION
|
|
566
|
+
const canonical = [
|
|
567
|
+
input.canonicalClusterId.trim().toLowerCase(),
|
|
568
|
+
input.desk.trim().toLowerCase(),
|
|
569
|
+
input.signalType,
|
|
570
|
+
String(version),
|
|
571
|
+
].join('')
|
|
572
|
+
const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(canonical))
|
|
573
|
+
return Array.from(new Uint8Array(digest))
|
|
574
|
+
.map((b) => b.toString(16).padStart(2, '0'))
|
|
575
|
+
.join('')
|
|
576
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// src/ui/api/_authz.ts — default Authz builder for the package's own endpoint
|
|
2
|
+
// adapters. Reads Astro.locals.user (populated by the host's auth middleware)
|
|
3
|
+
// and maps the host session to a CmsUser.
|
|
4
|
+
//
|
|
5
|
+
// IMPORTANT: the real user subject must come from the host's OpenAuth integration
|
|
6
|
+
// (e.g. @growth-labs/auth), never a placeholder id. This default reads whatever
|
|
7
|
+
// the host populates on locals.user; the host overrides this at mount with its
|
|
8
|
+
// own production authz/providers glue (spec §15).
|
|
9
|
+
//
|
|
10
|
+
// NOTE (P7 Task 12): the stale rank map (owner/admin/editor/author/viewer) has been
|
|
11
|
+
// superseded. requireRole now resolves capability tokens against the 5-role matrix
|
|
12
|
+
// (owner/senior_editor/editor/contributor/producer) via CAPABILITY_MATRIX + roleCan
|
|
13
|
+
// from authz-matrix.ts. 'admin', 'author', 'viewer' are not valid CmsRole values.
|
|
14
|
+
//
|
|
15
|
+
// TODO(host): the Fronts cutover PR replaces this with src/lib/cms-providers.ts authz
|
|
16
|
+
// which injects the real buildMatrixAuthz wired to the D1 workspace_memberships table.
|
|
17
|
+
import type { APIContext } from 'astro'
|
|
18
|
+
import { CAPABILITY_MATRIX, roleCan } from '../../routes/authz-matrix.js'
|
|
19
|
+
import type { Authz, Capability, CmsRole, CmsUser, RouteContext } from '../../routes/context.js'
|
|
20
|
+
|
|
21
|
+
interface LocalsUser {
|
|
22
|
+
subject?: string
|
|
23
|
+
email?: string
|
|
24
|
+
role?: string
|
|
25
|
+
name?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Admin-level roles — owner only for destructive/operational gates.
|
|
29
|
+
const ADMIN_ROLES: ReadonlySet<string> = new Set(['owner'])
|
|
30
|
+
// Publisher-level roles — all 5 roles are workspace members and may publish (within their capability).
|
|
31
|
+
const PUBLISHER_ROLES: ReadonlySet<string> = new Set([
|
|
32
|
+
'owner',
|
|
33
|
+
'senior_editor',
|
|
34
|
+
'editor',
|
|
35
|
+
'contributor',
|
|
36
|
+
'producer',
|
|
37
|
+
])
|
|
38
|
+
|
|
39
|
+
export function buildSiteAuthz(c: APIContext): Authz {
|
|
40
|
+
return {
|
|
41
|
+
requireAdmin(_ctx: RouteContext): Response | null {
|
|
42
|
+
const user = getLocalsUser(c)
|
|
43
|
+
if (!user || !ADMIN_ROLES.has(user.role ?? '')) {
|
|
44
|
+
return new Response(JSON.stringify({ error: 'Unauthorized' }), {
|
|
45
|
+
status: 401,
|
|
46
|
+
headers: { 'Content-Type': 'application/json' },
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
return null
|
|
50
|
+
},
|
|
51
|
+
requirePublisher(_ctx: RouteContext): Response | null {
|
|
52
|
+
const user = getLocalsUser(c)
|
|
53
|
+
if (!user || !PUBLISHER_ROLES.has(user.role ?? '')) {
|
|
54
|
+
return new Response(JSON.stringify({ error: 'Unauthorized' }), {
|
|
55
|
+
status: 401,
|
|
56
|
+
headers: { 'Content-Type': 'application/json' },
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
return null
|
|
60
|
+
},
|
|
61
|
+
async getUser(_ctx: RouteContext): Promise<CmsUser | null> {
|
|
62
|
+
const user = getLocalsUser(c)
|
|
63
|
+
if (!user?.subject) return null
|
|
64
|
+
// Only accept valid 5-role values — reject stale 'admin'/'author'/'viewer'.
|
|
65
|
+
if (!PUBLISHER_ROLES.has(user.role ?? '')) return null
|
|
66
|
+
return {
|
|
67
|
+
subject: user.subject,
|
|
68
|
+
email: user.email ?? null,
|
|
69
|
+
role: user.role as CmsRole,
|
|
70
|
+
name: user.name ?? null,
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
requireRole(cap: Capability, _ctx: RouteContext): Response | null {
|
|
74
|
+
const user = getLocalsUser(c)
|
|
75
|
+
if (!user?.subject || !PUBLISHER_ROLES.has(user.role ?? '')) {
|
|
76
|
+
return new Response(JSON.stringify({ error: 'Unauthorized' }), {
|
|
77
|
+
status: 401,
|
|
78
|
+
headers: { 'Content-Type': 'application/json' },
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
// Resolve via the 5-role capability matrix (supersedes the stale rank map).
|
|
82
|
+
const role = user.role as CmsRole
|
|
83
|
+
if (!roleCan(role, cap)) {
|
|
84
|
+
return new Response(JSON.stringify({ error: 'Forbidden', required: cap, role }), {
|
|
85
|
+
status: 403,
|
|
86
|
+
headers: { 'Content-Type': 'application/json' },
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
return null
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function getLocalsUser(c: APIContext): LocalsUser | null {
|
|
95
|
+
const locals = c.locals as { user?: LocalsUser }
|
|
96
|
+
return locals.user ?? null
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Re-export CAPABILITY_MATRIX for convenience (host glue may need it for UI hints).
|
|
100
|
+
export { CAPABILITY_MATRIX }
|