@forumone/throughline 0.0.0-stage → 1.0.0-next.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/CHANGELOG.md +584 -0
- package/LICENSE +21 -0
- package/README.md +351 -2
- package/bin/payload-cli.mjs +443 -0
- package/bin/throughline-payload.mjs +6 -0
- package/dist/access/coreCollections.d.ts +18 -0
- package/dist/access/coreCollections.d.ts.map +1 -0
- package/dist/access/coreCollections.js +56 -0
- package/dist/access/coreCollections.js.map +1 -0
- package/dist/approvals/collection.d.ts +21 -0
- package/dist/approvals/collection.d.ts.map +1 -0
- package/dist/approvals/collection.js +99 -0
- package/dist/approvals/collection.js.map +1 -0
- package/dist/approvals/endpoints/action.d.ts +31 -0
- package/dist/approvals/endpoints/action.d.ts.map +1 -0
- package/dist/approvals/endpoints/action.js +205 -0
- package/dist/approvals/endpoints/action.js.map +1 -0
- package/dist/approvals/index.d.ts +19 -0
- package/dist/approvals/index.d.ts.map +1 -0
- package/dist/approvals/index.js +13 -0
- package/dist/approvals/index.js.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts +14 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.js +101 -0
- package/dist/approvals/jobs/expire-stale-approvals.js.map +1 -0
- package/dist/approvals/options.d.ts +76 -0
- package/dist/approvals/options.d.ts.map +1 -0
- package/dist/approvals/options.js +47 -0
- package/dist/approvals/options.js.map +1 -0
- package/dist/approvals/plugin.d.ts +4 -0
- package/dist/approvals/plugin.d.ts.map +1 -0
- package/dist/approvals/plugin.js +92 -0
- package/dist/approvals/plugin.js.map +1 -0
- package/dist/approvals/resolver.d.ts +18 -0
- package/dist/approvals/resolver.d.ts.map +1 -0
- package/dist/approvals/resolver.js +57 -0
- package/dist/approvals/resolver.js.map +1 -0
- package/dist/approvals/symbol.d.ts +12 -0
- package/dist/approvals/symbol.d.ts.map +1 -0
- package/dist/approvals/symbol.js +12 -0
- package/dist/approvals/symbol.js.map +1 -0
- package/dist/approvals/tokens.d.ts +48 -0
- package/dist/approvals/tokens.d.ts.map +1 -0
- package/dist/approvals/tokens.js +123 -0
- package/dist/approvals/tokens.js.map +1 -0
- package/dist/approvals/tools/descriptors.d.ts +26 -0
- package/dist/approvals/tools/descriptors.d.ts.map +1 -0
- package/dist/approvals/tools/descriptors.js +35 -0
- package/dist/approvals/tools/descriptors.js.map +1 -0
- package/dist/approvals/tools/get-approval-status.d.ts +11 -0
- package/dist/approvals/tools/get-approval-status.d.ts.map +1 -0
- package/dist/approvals/tools/get-approval-status.js +94 -0
- package/dist/approvals/tools/get-approval-status.js.map +1 -0
- package/dist/approvals/tools/index.d.ts +7 -0
- package/dist/approvals/tools/index.d.ts.map +1 -0
- package/dist/approvals/tools/index.js +7 -0
- package/dist/approvals/tools/index.js.map +1 -0
- package/dist/approvals/tools/list-my-requests.d.ts +11 -0
- package/dist/approvals/tools/list-my-requests.d.ts.map +1 -0
- package/dist/approvals/tools/list-my-requests.js +55 -0
- package/dist/approvals/tools/list-my-requests.js.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts +11 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.js +53 -0
- package/dist/approvals/tools/list-pending-approvals.js.map +1 -0
- package/dist/approvals/tools/request-approval.d.ts +13 -0
- package/dist/approvals/tools/request-approval.d.ts.map +1 -0
- package/dist/approvals/tools/request-approval.js +123 -0
- package/dist/approvals/tools/request-approval.js.map +1 -0
- package/dist/approvals/tools/respond-to-approval.d.ts +13 -0
- package/dist/approvals/tools/respond-to-approval.d.ts.map +1 -0
- package/dist/approvals/tools/respond-to-approval.js +98 -0
- package/dist/approvals/tools/respond-to-approval.js.map +1 -0
- package/dist/audit/collection.d.ts +22 -0
- package/dist/audit/collection.d.ts.map +1 -0
- package/dist/audit/collection.js +109 -0
- package/dist/audit/collection.js.map +1 -0
- package/dist/audit/index.d.ts +16 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +11 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/jobs/audit-event-echo.d.ts +14 -0
- package/dist/audit/jobs/audit-event-echo.d.ts.map +1 -0
- package/dist/audit/jobs/audit-event-echo.js +61 -0
- package/dist/audit/jobs/audit-event-echo.js.map +1 -0
- package/dist/audit/plugin.d.ts +20 -0
- package/dist/audit/plugin.d.ts.map +1 -0
- package/dist/audit/plugin.js +55 -0
- package/dist/audit/plugin.js.map +1 -0
- package/dist/audit/query/formatting/index.d.ts +40 -0
- package/dist/audit/query/formatting/index.d.ts.map +1 -0
- package/dist/audit/query/formatting/index.js +73 -0
- package/dist/audit/query/formatting/index.js.map +1 -0
- package/dist/audit/query/options.d.ts +34 -0
- package/dist/audit/query/options.d.ts.map +1 -0
- package/dist/audit/query/options.js +8 -0
- package/dist/audit/query/options.js.map +1 -0
- package/dist/audit/query/plugin.d.ts +11 -0
- package/dist/audit/query/plugin.d.ts.map +1 -0
- package/dist/audit/query/plugin.js +68 -0
- package/dist/audit/query/plugin.js.map +1 -0
- package/dist/audit/query/tools/access.d.ts +9 -0
- package/dist/audit/query/tools/access.d.ts.map +1 -0
- package/dist/audit/query/tools/access.js +14 -0
- package/dist/audit/query/tools/access.js.map +1 -0
- package/dist/audit/query/tools/descriptors.d.ts +26 -0
- package/dist/audit/query/tools/descriptors.d.ts.map +1 -0
- package/dist/audit/query/tools/descriptors.js +35 -0
- package/dist/audit/query/tools/descriptors.js.map +1 -0
- package/dist/audit/query/tools/get-change-history.d.ts +23 -0
- package/dist/audit/query/tools/get-change-history.d.ts.map +1 -0
- package/dist/audit/query/tools/get-change-history.js +44 -0
- package/dist/audit/query/tools/get-change-history.js.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts +23 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.js +56 -0
- package/dist/audit/query/tools/get-recent-failures.js.map +1 -0
- package/dist/audit/query/tools/index.d.ts +13 -0
- package/dist/audit/query/tools/index.d.ts.map +1 -0
- package/dist/audit/query/tools/index.js +8 -0
- package/dist/audit/query/tools/index.js.map +1 -0
- package/dist/audit/query/tools/query-audit.d.ts +53 -0
- package/dist/audit/query/tools/query-audit.d.ts.map +1 -0
- package/dist/audit/query/tools/query-audit.js +78 -0
- package/dist/audit/query/tools/query-audit.js.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts +23 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.js +86 -0
- package/dist/audit/query/tools/what-changed-in-range.js.map +1 -0
- package/dist/audit/query/tools/who-changed-what.d.ts +38 -0
- package/dist/audit/query/tools/who-changed-what.d.ts.map +1 -0
- package/dist/audit/query/tools/who-changed-what.js +66 -0
- package/dist/audit/query/tools/who-changed-what.js.map +1 -0
- package/dist/audit/types.d.ts +11 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +45 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/audit/writer.d.ts +50 -0
- package/dist/audit/writer.d.ts.map +1 -0
- package/dist/audit/writer.js +101 -0
- package/dist/audit/writer.js.map +1 -0
- package/dist/cache-tags.d.ts +31 -0
- package/dist/cache-tags.d.ts.map +1 -0
- package/dist/cache-tags.js +53 -0
- package/dist/cache-tags.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/manifest-source.d.ts +17 -0
- package/dist/components/manifest-source.d.ts.map +1 -0
- package/dist/components/manifest-source.js +60 -0
- package/dist/components/manifest-source.js.map +1 -0
- package/dist/components/matching/index.d.ts +3 -0
- package/dist/components/matching/index.d.ts.map +1 -0
- package/dist/components/matching/index.js +2 -0
- package/dist/components/matching/index.js.map +1 -0
- package/dist/components/matching/tfidf.d.ts +13 -0
- package/dist/components/matching/tfidf.d.ts.map +1 -0
- package/dist/components/matching/tfidf.js +118 -0
- package/dist/components/matching/tfidf.js.map +1 -0
- package/dist/components/matching/types.d.ts +22 -0
- package/dist/components/matching/types.d.ts.map +1 -0
- package/dist/components/matching/types.js +2 -0
- package/dist/components/matching/types.js.map +1 -0
- package/dist/components/options.d.ts +136 -0
- package/dist/components/options.d.ts.map +1 -0
- package/dist/components/options.js +40 -0
- package/dist/components/options.js.map +1 -0
- package/dist/components/plugin.d.ts +4 -0
- package/dist/components/plugin.d.ts.map +1 -0
- package/dist/components/plugin.js +95 -0
- package/dist/components/plugin.js.map +1 -0
- package/dist/components/tools/descriptors.d.ts +34 -0
- package/dist/components/tools/descriptors.d.ts.map +1 -0
- package/dist/components/tools/descriptors.js +43 -0
- package/dist/components/tools/descriptors.js.map +1 -0
- package/dist/components/tools/find-anti-pattern.d.ts +9 -0
- package/dist/components/tools/find-anti-pattern.d.ts.map +1 -0
- package/dist/components/tools/find-anti-pattern.js +31 -0
- package/dist/components/tools/find-anti-pattern.js.map +1 -0
- package/dist/components/tools/get-contract.d.ts +4 -0
- package/dist/components/tools/get-contract.d.ts.map +1 -0
- package/dist/components/tools/get-contract.js +19 -0
- package/dist/components/tools/get-contract.js.map +1 -0
- package/dist/components/tools/get-tokens.d.ts +4 -0
- package/dist/components/tools/get-tokens.d.ts.map +1 -0
- package/dist/components/tools/get-tokens.js +19 -0
- package/dist/components/tools/get-tokens.js.map +1 -0
- package/dist/components/tools/get-variants.d.ts +4 -0
- package/dist/components/tools/get-variants.d.ts.map +1 -0
- package/dist/components/tools/get-variants.js +19 -0
- package/dist/components/tools/get-variants.js.map +1 -0
- package/dist/components/tools/index.d.ts +9 -0
- package/dist/components/tools/index.d.ts.map +1 -0
- package/dist/components/tools/index.js +9 -0
- package/dist/components/tools/index.js.map +1 -0
- package/dist/components/tools/list-components.d.ts +4 -0
- package/dist/components/tools/list-components.d.ts.map +1 -0
- package/dist/components/tools/list-components.js +25 -0
- package/dist/components/tools/list-components.js.map +1 -0
- package/dist/components/tools/suggest-for-intent.d.ts +12 -0
- package/dist/components/tools/suggest-for-intent.d.ts.map +1 -0
- package/dist/components/tools/suggest-for-intent.js +83 -0
- package/dist/components/tools/suggest-for-intent.js.map +1 -0
- package/dist/components/tools/validate-composition.d.ts +9 -0
- package/dist/components/tools/validate-composition.d.ts.map +1 -0
- package/dist/components/tools/validate-composition.js +31 -0
- package/dist/components/tools/validate-composition.js.map +1 -0
- package/dist/components/validation/composition.d.ts +38 -0
- package/dist/components/validation/composition.d.ts.map +1 -0
- package/dist/components/validation/composition.js +135 -0
- package/dist/components/validation/composition.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts +9 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.js +47 -0
- package/dist/editorial/calendar/ContentCalendarReport.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts +3 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.js +36 -0
- package/dist/editorial/calendar/ContentCalendarView.js.map +1 -0
- package/dist/editorial/calendar/calendar.d.ts +30 -0
- package/dist/editorial/calendar/calendar.d.ts.map +1 -0
- package/dist/editorial/calendar/calendar.js +23 -0
- package/dist/editorial/calendar/calendar.js.map +1 -0
- package/dist/editorial/calendar/find.d.ts +41 -0
- package/dist/editorial/calendar/find.d.ts.map +1 -0
- package/dist/editorial/calendar/find.js +108 -0
- package/dist/editorial/calendar/find.js.map +1 -0
- package/dist/editorial/calendar/month.d.ts +45 -0
- package/dist/editorial/calendar/month.d.ts.map +1 -0
- package/dist/editorial/calendar/month.js +120 -0
- package/dist/editorial/calendar/month.js.map +1 -0
- package/dist/editorial/calendar/tool.d.ts +50 -0
- package/dist/editorial/calendar/tool.d.ts.map +1 -0
- package/dist/editorial/calendar/tool.js +68 -0
- package/dist/editorial/calendar/tool.js.map +1 -0
- package/dist/editorial/config.d.ts +25 -0
- package/dist/editorial/config.d.ts.map +1 -0
- package/dist/editorial/config.js +12 -0
- package/dist/editorial/config.js.map +1 -0
- package/dist/editorial/health/ContentHealthReport.d.ts +7 -0
- package/dist/editorial/health/ContentHealthReport.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthReport.js +29 -0
- package/dist/editorial/health/ContentHealthReport.js.map +1 -0
- package/dist/editorial/health/ContentHealthView.d.ts +3 -0
- package/dist/editorial/health/ContentHealthView.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthView.js +29 -0
- package/dist/editorial/health/ContentHealthView.js.map +1 -0
- package/dist/editorial/health/HealthSummary.d.ts +6 -0
- package/dist/editorial/health/HealthSummary.d.ts.map +1 -0
- package/dist/editorial/health/HealthSummary.js +39 -0
- package/dist/editorial/health/HealthSummary.js.map +1 -0
- package/dist/editorial/health/checks.d.ts +104 -0
- package/dist/editorial/health/checks.d.ts.map +1 -0
- package/dist/editorial/health/checks.js +188 -0
- package/dist/editorial/health/checks.js.map +1 -0
- package/dist/editorial/health/find.d.ts +43 -0
- package/dist/editorial/health/find.d.ts.map +1 -0
- package/dist/editorial/health/find.js +97 -0
- package/dist/editorial/health/find.js.map +1 -0
- package/dist/editorial/health/tool.d.ts +53 -0
- package/dist/editorial/health/tool.d.ts.map +1 -0
- package/dist/editorial/health/tool.js +80 -0
- package/dist/editorial/health/tool.js.map +1 -0
- package/dist/editorial/index.d.ts +25 -0
- package/dist/editorial/index.d.ts.map +1 -0
- package/dist/editorial/index.js +15 -0
- package/dist/editorial/index.js.map +1 -0
- package/dist/editorial/palette/CommandPalette.d.ts +15 -0
- package/dist/editorial/palette/CommandPalette.d.ts.map +1 -0
- package/dist/editorial/palette/CommandPalette.js +319 -0
- package/dist/editorial/palette/CommandPalette.js.map +1 -0
- package/dist/editorial/palette/ReportsNav.d.ts +5 -0
- package/dist/editorial/palette/ReportsNav.d.ts.map +1 -0
- package/dist/editorial/palette/ReportsNav.js +31 -0
- package/dist/editorial/palette/ReportsNav.js.map +1 -0
- package/dist/editorial/palette/search.d.ts +18 -0
- package/dist/editorial/palette/search.d.ts.map +1 -0
- package/dist/editorial/palette/search.js +41 -0
- package/dist/editorial/palette/search.js.map +1 -0
- package/dist/editorial/palette/sources.d.ts +64 -0
- package/dist/editorial/palette/sources.d.ts.map +1 -0
- package/dist/editorial/palette/sources.js +103 -0
- package/dist/editorial/palette/sources.js.map +1 -0
- package/dist/editorial/palette/styles.d.ts +2 -0
- package/dist/editorial/palette/styles.d.ts.map +1 -0
- package/dist/editorial/palette/styles.js +76 -0
- package/dist/editorial/palette/styles.js.map +1 -0
- package/dist/editorial/palette/tool.d.ts +31 -0
- package/dist/editorial/palette/tool.d.ts.map +1 -0
- package/dist/editorial/palette/tool.js +63 -0
- package/dist/editorial/palette/tool.js.map +1 -0
- package/dist/editorial/plugin.d.ts +76 -0
- package/dist/editorial/plugin.d.ts.map +1 -0
- package/dist/editorial/plugin.js +186 -0
- package/dist/editorial/plugin.js.map +1 -0
- package/dist/editorial/relativeTime.d.ts +3 -0
- package/dist/editorial/relativeTime.d.ts.map +1 -0
- package/dist/editorial/relativeTime.js +27 -0
- package/dist/editorial/relativeTime.js.map +1 -0
- package/dist/editorial/styles.d.ts +2 -0
- package/dist/editorial/styles.d.ts.map +1 -0
- package/dist/editorial/styles.js +191 -0
- package/dist/editorial/styles.js.map +1 -0
- package/dist/editorial/work/YourWork.d.ts +13 -0
- package/dist/editorial/work/YourWork.d.ts.map +1 -0
- package/dist/editorial/work/YourWork.js +40 -0
- package/dist/editorial/work/YourWork.js.map +1 -0
- package/dist/editorial/work/tool.d.ts +45 -0
- package/dist/editorial/work/tool.d.ts.map +1 -0
- package/dist/editorial/work/tool.js +54 -0
- package/dist/editorial/work/tool.js.map +1 -0
- package/dist/editorial/work/work.d.ts +31 -0
- package/dist/editorial/work/work.d.ts.map +1 -0
- package/dist/editorial/work/work.js +68 -0
- package/dist/editorial/work/work.js.map +1 -0
- package/dist/email/client.d.ts +78 -0
- package/dist/email/client.d.ts.map +1 -0
- package/dist/email/client.js +63 -0
- package/dist/email/client.js.map +1 -0
- package/dist/email/functions/_shared.d.ts +17 -0
- package/dist/email/functions/_shared.d.ts.map +1 -0
- package/dist/email/functions/_shared.js +40 -0
- package/dist/email/functions/_shared.js.map +1 -0
- package/dist/email/functions/index.d.ts +7 -0
- package/dist/email/functions/index.d.ts.map +1 -0
- package/dist/email/functions/index.js +4 -0
- package/dist/email/functions/index.js.map +1 -0
- package/dist/email/functions/notify-approval-decision.d.ts +34 -0
- package/dist/email/functions/notify-approval-decision.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-decision.js +77 -0
- package/dist/email/functions/notify-approval-decision.js.map +1 -0
- package/dist/email/functions/notify-approval-expired.d.ts +32 -0
- package/dist/email/functions/notify-approval-expired.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-expired.js +54 -0
- package/dist/email/functions/notify-approval-expired.js.map +1 -0
- package/dist/email/functions/notify-approval-request.d.ts +35 -0
- package/dist/email/functions/notify-approval-request.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-request.js +89 -0
- package/dist/email/functions/notify-approval-request.js.map +1 -0
- package/dist/email/index.d.ts +17 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +12 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/options.d.ts +100 -0
- package/dist/email/options.d.ts.map +1 -0
- package/dist/email/options.js +55 -0
- package/dist/email/options.js.map +1 -0
- package/dist/email/plugin.d.ts +28 -0
- package/dist/email/plugin.d.ts.map +1 -0
- package/dist/email/plugin.js +113 -0
- package/dist/email/plugin.js.map +1 -0
- package/dist/email/templates/ApprovalDecision.d.ts +15 -0
- package/dist/email/templates/ApprovalDecision.d.ts.map +1 -0
- package/dist/email/templates/ApprovalDecision.js +56 -0
- package/dist/email/templates/ApprovalDecision.js.map +1 -0
- package/dist/email/templates/ApprovalExpired.d.ts +10 -0
- package/dist/email/templates/ApprovalExpired.d.ts.map +1 -0
- package/dist/email/templates/ApprovalExpired.js +8 -0
- package/dist/email/templates/ApprovalExpired.js.map +1 -0
- package/dist/email/templates/ApprovalRequest.d.ts +24 -0
- package/dist/email/templates/ApprovalRequest.d.ts.map +1 -0
- package/dist/email/templates/ApprovalRequest.js +58 -0
- package/dist/email/templates/ApprovalRequest.js.map +1 -0
- package/dist/email/templates/_layout.d.ts +17 -0
- package/dist/email/templates/_layout.d.ts.map +1 -0
- package/dist/email/templates/_layout.js +39 -0
- package/dist/email/templates/_layout.js.map +1 -0
- package/dist/email/templates/index.d.ts +9 -0
- package/dist/email/templates/index.d.ts.map +1 -0
- package/dist/email/templates/index.js +5 -0
- package/dist/email/templates/index.js.map +1 -0
- package/dist/email/tokens.d.ts +39 -0
- package/dist/email/tokens.d.ts.map +1 -0
- package/dist/email/tokens.js +17 -0
- package/dist/email/tokens.js.map +1 -0
- package/dist/env/index.d.ts +54 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +113 -0
- package/dist/env/index.js.map +1 -0
- package/dist/events/inngest.d.ts +24 -0
- package/dist/events/inngest.d.ts.map +1 -0
- package/dist/events/inngest.js +24 -0
- package/dist/events/inngest.js.map +1 -0
- package/dist/events/taxonomy.d.ts +84 -0
- package/dist/events/taxonomy.d.ts.map +1 -0
- package/dist/events/taxonomy.js +10 -0
- package/dist/events/taxonomy.js.map +1 -0
- package/dist/events/vercel.d.ts +47 -0
- package/dist/events/vercel.d.ts.map +1 -0
- package/dist/events/vercel.js +69 -0
- package/dist/events/vercel.js.map +1 -0
- package/dist/exports/client.d.ts +24 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +21 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/rsc.d.ts +17 -0
- package/dist/exports/rsc.d.ts.map +1 -0
- package/dist/exports/rsc.js +19 -0
- package/dist/exports/rsc.js.map +1 -0
- package/dist/fields/CharacterCountField.d.ts +4 -0
- package/dist/fields/CharacterCountField.d.ts.map +1 -0
- package/dist/fields/CharacterCountField.js +94 -0
- package/dist/fields/CharacterCountField.js.map +1 -0
- package/dist/fields/characterCount.d.ts +15 -0
- package/dist/fields/characterCount.d.ts.map +1 -0
- package/dist/fields/characterCount.js +92 -0
- package/dist/fields/characterCount.js.map +1 -0
- package/dist/fields/checkSlug.d.ts +62 -0
- package/dist/fields/checkSlug.d.ts.map +1 -0
- package/dist/fields/checkSlug.js +119 -0
- package/dist/fields/checkSlug.js.map +1 -0
- package/dist/fields/index.d.ts +9 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.js +9 -0
- package/dist/fields/index.js.map +1 -0
- package/dist/fields/mapFields.d.ts +13 -0
- package/dist/fields/mapFields.d.ts.map +1 -0
- package/dist/fields/mapFields.js +32 -0
- package/dist/fields/mapFields.js.map +1 -0
- package/dist/fields/publishing.d.ts +33 -0
- package/dist/fields/publishing.d.ts.map +1 -0
- package/dist/fields/publishing.js +81 -0
- package/dist/fields/publishing.js.map +1 -0
- package/dist/fields/revisedAt.d.ts +15 -0
- package/dist/fields/revisedAt.d.ts.map +1 -0
- package/dist/fields/revisedAt.js +79 -0
- package/dist/fields/revisedAt.js.map +1 -0
- package/dist/fields/slug.d.ts +21 -0
- package/dist/fields/slug.d.ts.map +1 -0
- package/dist/fields/slug.js +102 -0
- package/dist/fields/slug.js.map +1 -0
- package/dist/fields/unlisted.d.ts +13 -0
- package/dist/fields/unlisted.d.ts.map +1 -0
- package/dist/fields/unlisted.js +35 -0
- package/dist/fields/unlisted.js.map +1 -0
- package/dist/fields/usedBy.d.ts +12 -0
- package/dist/fields/usedBy.d.ts.map +1 -0
- package/dist/fields/usedBy.js +36 -0
- package/dist/fields/usedBy.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/admin/SyncButton.d.ts +27 -0
- package/dist/integrations/admin/SyncButton.d.ts.map +1 -0
- package/dist/integrations/admin/SyncButton.js +134 -0
- package/dist/integrations/admin/SyncButton.js.map +1 -0
- package/dist/integrations/admin/sync-client.d.ts +83 -0
- package/dist/integrations/admin/sync-client.d.ts.map +1 -0
- package/dist/integrations/admin/sync-client.js +121 -0
- package/dist/integrations/admin/sync-client.js.map +1 -0
- package/dist/integrations/collection.d.ts +26 -0
- package/dist/integrations/collection.d.ts.map +1 -0
- package/dist/integrations/collection.js +193 -0
- package/dist/integrations/collection.js.map +1 -0
- package/dist/integrations/endpoints/sync.d.ts +27 -0
- package/dist/integrations/endpoints/sync.d.ts.map +1 -0
- package/dist/integrations/endpoints/sync.js +90 -0
- package/dist/integrations/endpoints/sync.js.map +1 -0
- package/dist/integrations/index.d.ts +22 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +15 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/index.d.ts +3 -0
- package/dist/integrations/integrations/index.d.ts.map +1 -0
- package/dist/integrations/integrations/index.js +2 -0
- package/dist/integrations/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts +33 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.js +54 -0
- package/dist/integrations/integrations/webhook/config-fields.js.map +1 -0
- package/dist/integrations/integrations/webhook/functions.d.ts +24 -0
- package/dist/integrations/integrations/webhook/functions.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/functions.js +139 -0
- package/dist/integrations/integrations/webhook/functions.js.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts +10 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.js +26 -0
- package/dist/integrations/integrations/webhook/healthcheck.js.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts +11 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.js +25 -0
- package/dist/integrations/integrations/webhook/hmac.js.map +1 -0
- package/dist/integrations/integrations/webhook/index.d.ts +6 -0
- package/dist/integrations/integrations/webhook/index.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/index.js +47 -0
- package/dist/integrations/integrations/webhook/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/payload.d.ts +9 -0
- package/dist/integrations/integrations/webhook/payload.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/payload.js +19 -0
- package/dist/integrations/integrations/webhook/payload.js.map +1 -0
- package/dist/integrations/jobs/healthcheck.d.ts +24 -0
- package/dist/integrations/jobs/healthcheck.d.ts.map +1 -0
- package/dist/integrations/jobs/healthcheck.js +133 -0
- package/dist/integrations/jobs/healthcheck.js.map +1 -0
- package/dist/integrations/options.d.ts +54 -0
- package/dist/integrations/options.d.ts.map +1 -0
- package/dist/integrations/options.js +8 -0
- package/dist/integrations/options.js.map +1 -0
- package/dist/integrations/plugin.d.ts +51 -0
- package/dist/integrations/plugin.d.ts.map +1 -0
- package/dist/integrations/plugin.js +215 -0
- package/dist/integrations/plugin.js.map +1 -0
- package/dist/integrations/registry.d.ts +27 -0
- package/dist/integrations/registry.d.ts.map +1 -0
- package/dist/integrations/registry.js +39 -0
- package/dist/integrations/registry.js.map +1 -0
- package/dist/integrations/sync/manual-sync.d.ts +70 -0
- package/dist/integrations/sync/manual-sync.d.ts.map +1 -0
- package/dist/integrations/sync/manual-sync.js +91 -0
- package/dist/integrations/sync/manual-sync.js.map +1 -0
- package/dist/integrations/sync/problems.d.ts +31 -0
- package/dist/integrations/sync/problems.d.ts.map +1 -0
- package/dist/integrations/sync/problems.js +40 -0
- package/dist/integrations/sync/problems.js.map +1 -0
- package/dist/integrations/sync/status.d.ts +15 -0
- package/dist/integrations/sync/status.d.ts.map +1 -0
- package/dist/integrations/sync/status.js +31 -0
- package/dist/integrations/sync/status.js.map +1 -0
- package/dist/integrations/tools/access.d.ts +5 -0
- package/dist/integrations/tools/access.d.ts.map +1 -0
- package/dist/integrations/tools/access.js +14 -0
- package/dist/integrations/tools/access.js.map +1 -0
- package/dist/integrations/tools/descriptors.d.ts +26 -0
- package/dist/integrations/tools/descriptors.d.ts.map +1 -0
- package/dist/integrations/tools/descriptors.js +35 -0
- package/dist/integrations/tools/descriptors.js.map +1 -0
- package/dist/integrations/tools/get-integration-status.d.ts +17 -0
- package/dist/integrations/tools/get-integration-status.d.ts.map +1 -0
- package/dist/integrations/tools/get-integration-status.js +41 -0
- package/dist/integrations/tools/get-integration-status.js.map +1 -0
- package/dist/integrations/tools/index.d.ts +13 -0
- package/dist/integrations/tools/index.d.ts.map +1 -0
- package/dist/integrations/tools/index.js +8 -0
- package/dist/integrations/tools/index.js.map +1 -0
- package/dist/integrations/tools/list-integration-types.d.ts +10 -0
- package/dist/integrations/tools/list-integration-types.d.ts.map +1 -0
- package/dist/integrations/tools/list-integration-types.js +22 -0
- package/dist/integrations/tools/list-integration-types.js.map +1 -0
- package/dist/integrations/tools/list-integrations.d.ts +20 -0
- package/dist/integrations/tools/list-integrations.d.ts.map +1 -0
- package/dist/integrations/tools/list-integrations.js +49 -0
- package/dist/integrations/tools/list-integrations.js.map +1 -0
- package/dist/integrations/tools/test-integration.d.ts +19 -0
- package/dist/integrations/tools/test-integration.d.ts.map +1 -0
- package/dist/integrations/tools/test-integration.js +51 -0
- package/dist/integrations/tools/test-integration.js.map +1 -0
- package/dist/integrations/tools/trigger-sync.d.ts +26 -0
- package/dist/integrations/tools/trigger-sync.d.ts.map +1 -0
- package/dist/integrations/tools/trigger-sync.js +44 -0
- package/dist/integrations/tools/trigger-sync.js.map +1 -0
- package/dist/integrations/types.d.ts +183 -0
- package/dist/integrations/types.d.ts.map +1 -0
- package/dist/integrations/types.js +2 -0
- package/dist/integrations/types.js.map +1 -0
- package/dist/jobs/define.d.ts +17 -0
- package/dist/jobs/define.d.ts.map +1 -0
- package/dist/jobs/define.js +39 -0
- package/dist/jobs/define.js.map +1 -0
- package/dist/jobs/failure-handler.d.ts +39 -0
- package/dist/jobs/failure-handler.d.ts.map +1 -0
- package/dist/jobs/failure-handler.js +62 -0
- package/dist/jobs/failure-handler.js.map +1 -0
- package/dist/jobs/index.d.ts +28 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +7 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/inngest/adapter.d.ts +39 -0
- package/dist/jobs/inngest/adapter.d.ts.map +1 -0
- package/dist/jobs/inngest/adapter.js +81 -0
- package/dist/jobs/inngest/adapter.js.map +1 -0
- package/dist/jobs/inngest/index.d.ts +15 -0
- package/dist/jobs/inngest/index.d.ts.map +1 -0
- package/dist/jobs/inngest/index.js +13 -0
- package/dist/jobs/inngest/index.js.map +1 -0
- package/dist/jobs/options.d.ts +18 -0
- package/dist/jobs/options.d.ts.map +1 -0
- package/dist/jobs/options.js +12 -0
- package/dist/jobs/options.js.map +1 -0
- package/dist/jobs/payload/adapter.d.ts +33 -0
- package/dist/jobs/payload/adapter.d.ts.map +1 -0
- package/dist/jobs/payload/adapter.js +257 -0
- package/dist/jobs/payload/adapter.js.map +1 -0
- package/dist/jobs/payload/index.d.ts +8 -0
- package/dist/jobs/payload/index.d.ts.map +1 -0
- package/dist/jobs/payload/index.js +7 -0
- package/dist/jobs/payload/index.js.map +1 -0
- package/dist/jobs/sender.d.ts +4 -0
- package/dist/jobs/sender.d.ts.map +1 -0
- package/dist/jobs/sender.js +19 -0
- package/dist/jobs/sender.js.map +1 -0
- package/dist/jobs/types.d.ts +105 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/workflow-types.d.ts +280 -0
- package/dist/jobs/workflow-types.d.ts.map +1 -0
- package/dist/jobs/workflow-types.js +22 -0
- package/dist/jobs/workflow-types.js.map +1 -0
- package/dist/logger/index.d.ts +9 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +41 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/mcp/api-key-access.d.ts +50 -0
- package/dist/mcp/api-key-access.d.ts.map +1 -0
- package/dist/mcp/api-key-access.js +94 -0
- package/dist/mcp/api-key-access.js.map +1 -0
- package/dist/mcp/audit-context.d.ts +39 -0
- package/dist/mcp/audit-context.d.ts.map +1 -0
- package/dist/mcp/audit-context.js +36 -0
- package/dist/mcp/audit-context.js.map +1 -0
- package/dist/mcp/audit-server.d.ts +13 -0
- package/dist/mcp/audit-server.d.ts.map +1 -0
- package/dist/mcp/audit-server.js +68 -0
- package/dist/mcp/audit-server.js.map +1 -0
- package/dist/mcp/collector.d.ts +51 -0
- package/dist/mcp/collector.d.ts.map +1 -0
- package/dist/mcp/collector.js +96 -0
- package/dist/mcp/collector.js.map +1 -0
- package/dist/mcp/envelope.d.ts +22 -0
- package/dist/mcp/envelope.d.ts.map +1 -0
- package/dist/mcp/envelope.js +22 -0
- package/dist/mcp/envelope.js.map +1 -0
- package/dist/mcp/index.d.ts +12 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/meta.d.ts +74 -0
- package/dist/mcp/meta.d.ts.map +1 -0
- package/dist/mcp/meta.js +27 -0
- package/dist/mcp/meta.js.map +1 -0
- package/dist/mcp/payload-mcp.d.ts +68 -0
- package/dist/mcp/payload-mcp.d.ts.map +1 -0
- package/dist/mcp/payload-mcp.js +175 -0
- package/dist/mcp/payload-mcp.js.map +1 -0
- package/dist/media/hooks.d.ts +70 -0
- package/dist/media/hooks.d.ts.map +1 -0
- package/dist/media/hooks.js +200 -0
- package/dist/media/hooks.js.map +1 -0
- package/dist/media/index.d.ts +8 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +7 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/svg.d.ts +17 -0
- package/dist/media/svg.d.ts.map +1 -0
- package/dist/media/svg.js +241 -0
- package/dist/media/svg.js.map +1 -0
- package/dist/media/uploadKey.d.ts +25 -0
- package/dist/media/uploadKey.d.ts.map +1 -0
- package/dist/media/uploadKey.js +70 -0
- package/dist/media/uploadKey.js.map +1 -0
- package/dist/observability/collection.d.ts +13 -0
- package/dist/observability/collection.d.ts.map +1 -0
- package/dist/observability/collection.js +76 -0
- package/dist/observability/collection.js.map +1 -0
- package/dist/observability/index.d.ts +10 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +6 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/plugin.d.ts +24 -0
- package/dist/observability/plugin.d.ts.map +1 -0
- package/dist/observability/plugin.js +59 -0
- package/dist/observability/plugin.js.map +1 -0
- package/dist/observability/report.d.ts +175 -0
- package/dist/observability/report.d.ts.map +1 -0
- package/dist/observability/report.js +274 -0
- package/dist/observability/report.js.map +1 -0
- package/dist/observability/tool.d.ts +33 -0
- package/dist/observability/tool.d.ts.map +1 -0
- package/dist/observability/tool.js +75 -0
- package/dist/observability/tool.js.map +1 -0
- package/dist/observability/writer.d.ts +24 -0
- package/dist/observability/writer.d.ts.map +1 -0
- package/dist/observability/writer.js +72 -0
- package/dist/observability/writer.js.map +1 -0
- package/dist/plugin-contract/admin.d.ts +45 -0
- package/dist/plugin-contract/admin.d.ts.map +1 -0
- package/dist/plugin-contract/admin.js +12 -0
- package/dist/plugin-contract/admin.js.map +1 -0
- package/dist/plugin-contract/env.d.ts +29 -0
- package/dist/plugin-contract/env.d.ts.map +1 -0
- package/dist/plugin-contract/env.js +2 -0
- package/dist/plugin-contract/env.js.map +1 -0
- package/dist/plugin-contract/index.d.ts +39 -0
- package/dist/plugin-contract/index.d.ts.map +1 -0
- package/dist/plugin-contract/index.js +5 -0
- package/dist/plugin-contract/index.js.map +1 -0
- package/dist/plugin-contract/mcp.d.ts +51 -0
- package/dist/plugin-contract/mcp.d.ts.map +1 -0
- package/dist/plugin-contract/mcp.js +2 -0
- package/dist/plugin-contract/mcp.js.map +1 -0
- package/dist/plugin-contract/registry.d.ts +23 -0
- package/dist/plugin-contract/registry.d.ts.map +1 -0
- package/dist/plugin-contract/registry.js +51 -0
- package/dist/plugin-contract/registry.js.map +1 -0
- package/dist/publishing/admin/PublishButton.d.ts +22 -0
- package/dist/publishing/admin/PublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/PublishButton.js +164 -0
- package/dist/publishing/admin/PublishButton.js.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts +24 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.js +160 -0
- package/dist/publishing/admin/SchedulePublishField.js.map +1 -0
- package/dist/publishing/admin/UnpublishButton.d.ts +15 -0
- package/dist/publishing/admin/UnpublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/UnpublishButton.js +90 -0
- package/dist/publishing/admin/UnpublishButton.js.map +1 -0
- package/dist/publishing/admin/publishing-client.d.ts +105 -0
- package/dist/publishing/admin/publishing-client.d.ts.map +1 -0
- package/dist/publishing/admin/publishing-client.js +139 -0
- package/dist/publishing/admin/publishing-client.js.map +1 -0
- package/dist/publishing/admin/schedule-state.d.ts +30 -0
- package/dist/publishing/admin/schedule-state.d.ts.map +1 -0
- package/dist/publishing/admin/schedule-state.js +39 -0
- package/dist/publishing/admin/schedule-state.js.map +1 -0
- package/dist/publishing/checks/alt-text.d.ts +17 -0
- package/dist/publishing/checks/alt-text.d.ts.map +1 -0
- package/dist/publishing/checks/alt-text.js +63 -0
- package/dist/publishing/checks/alt-text.js.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts +11 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.js +32 -0
- package/dist/publishing/checks/heading-hierarchy.js.map +1 -0
- package/dist/publishing/checks/index.d.ts +6 -0
- package/dist/publishing/checks/index.d.ts.map +1 -0
- package/dist/publishing/checks/index.js +13 -0
- package/dist/publishing/checks/index.js.map +1 -0
- package/dist/publishing/checks/link-labels.d.ts +9 -0
- package/dist/publishing/checks/link-labels.d.ts.map +1 -0
- package/dist/publishing/checks/link-labels.js +44 -0
- package/dist/publishing/checks/link-labels.js.map +1 -0
- package/dist/publishing/endpoints/admin.d.ts +19 -0
- package/dist/publishing/endpoints/admin.d.ts.map +1 -0
- package/dist/publishing/endpoints/admin.js +112 -0
- package/dist/publishing/endpoints/admin.js.map +1 -0
- package/dist/publishing/events.d.ts +16 -0
- package/dist/publishing/events.d.ts.map +1 -0
- package/dist/publishing/events.js +30 -0
- package/dist/publishing/events.js.map +1 -0
- package/dist/publishing/hooks/block-status-writes.d.ts +52 -0
- package/dist/publishing/hooks/block-status-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/block-status-writes.js +242 -0
- package/dist/publishing/hooks/block-status-writes.js.map +1 -0
- package/dist/publishing/hooks/draft-writes.d.ts +32 -0
- package/dist/publishing/hooks/draft-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/draft-writes.js +76 -0
- package/dist/publishing/hooks/draft-writes.js.map +1 -0
- package/dist/publishing/hooks/schedule-events.d.ts +26 -0
- package/dist/publishing/hooks/schedule-events.d.ts.map +1 -0
- package/dist/publishing/hooks/schedule-events.js +54 -0
- package/dist/publishing/hooks/schedule-events.js.map +1 -0
- package/dist/publishing/index.d.ts +35 -0
- package/dist/publishing/index.d.ts.map +1 -0
- package/dist/publishing/index.js +32 -0
- package/dist/publishing/index.js.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts +24 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js +114 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js.map +1 -0
- package/dist/publishing/jobs/next-revalidate.d.ts +43 -0
- package/dist/publishing/jobs/next-revalidate.d.ts.map +1 -0
- package/dist/publishing/jobs/next-revalidate.js +42 -0
- package/dist/publishing/jobs/next-revalidate.js.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts +24 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js +136 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts +24 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.js +78 -0
- package/dist/publishing/jobs/revalidate-on-publish.js.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts +80 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js +116 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js.map +1 -0
- package/dist/publishing/options.d.ts +100 -0
- package/dist/publishing/options.d.ts.map +1 -0
- package/dist/publishing/options.js +56 -0
- package/dist/publishing/options.js.map +1 -0
- package/dist/publishing/pipeline/index.d.ts +20 -0
- package/dist/publishing/pipeline/index.d.ts.map +1 -0
- package/dist/publishing/pipeline/index.js +88 -0
- package/dist/publishing/pipeline/index.js.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts +13 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.js +37 -0
- package/dist/publishing/pipeline/steps/accessibility.js.map +1 -0
- package/dist/publishing/pipeline/steps/approval.d.ts +14 -0
- package/dist/publishing/pipeline/steps/approval.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/approval.js +54 -0
- package/dist/publishing/pipeline/steps/approval.js.map +1 -0
- package/dist/publishing/pipeline/steps/composition.d.ts +14 -0
- package/dist/publishing/pipeline/steps/composition.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/composition.js +63 -0
- package/dist/publishing/pipeline/steps/composition.js.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts +12 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.js +41 -0
- package/dist/publishing/pipeline/steps/embargo.js.map +1 -0
- package/dist/publishing/pipeline/steps/execute.d.ts +52 -0
- package/dist/publishing/pipeline/steps/execute.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/execute.js +161 -0
- package/dist/publishing/pipeline/steps/execute.js.map +1 -0
- package/dist/publishing/pipeline/steps/exist.d.ts +9 -0
- package/dist/publishing/pipeline/steps/exist.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/exist.js +31 -0
- package/dist/publishing/pipeline/steps/exist.js.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts +9 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.js +63 -0
- package/dist/publishing/pipeline/steps/required-fields.js.map +1 -0
- package/dist/publishing/pipeline/types.d.ts +72 -0
- package/dist/publishing/pipeline/types.d.ts.map +1 -0
- package/dist/publishing/pipeline/types.js +2 -0
- package/dist/publishing/pipeline/types.js.map +1 -0
- package/dist/publishing/plugin.d.ts +4 -0
- package/dist/publishing/plugin.d.ts.map +1 -0
- package/dist/publishing/plugin.js +196 -0
- package/dist/publishing/plugin.js.map +1 -0
- package/dist/publishing/service.d.ts +149 -0
- package/dist/publishing/service.d.ts.map +1 -0
- package/dist/publishing/service.js +474 -0
- package/dist/publishing/service.js.map +1 -0
- package/dist/publishing/tools/actor.d.ts +32 -0
- package/dist/publishing/tools/actor.d.ts.map +1 -0
- package/dist/publishing/tools/actor.js +40 -0
- package/dist/publishing/tools/actor.js.map +1 -0
- package/dist/publishing/tools/descriptors.d.ts +26 -0
- package/dist/publishing/tools/descriptors.d.ts.map +1 -0
- package/dist/publishing/tools/descriptors.js +38 -0
- package/dist/publishing/tools/descriptors.js.map +1 -0
- package/dist/publishing/tools/get-publish-status.d.ts +12 -0
- package/dist/publishing/tools/get-publish-status.d.ts.map +1 -0
- package/dist/publishing/tools/get-publish-status.js +45 -0
- package/dist/publishing/tools/get-publish-status.js.map +1 -0
- package/dist/publishing/tools/index.d.ts +7 -0
- package/dist/publishing/tools/index.d.ts.map +1 -0
- package/dist/publishing/tools/index.js +7 -0
- package/dist/publishing/tools/index.js.map +1 -0
- package/dist/publishing/tools/publish.d.ts +14 -0
- package/dist/publishing/tools/publish.d.ts.map +1 -0
- package/dist/publishing/tools/publish.js +35 -0
- package/dist/publishing/tools/publish.js.map +1 -0
- package/dist/publishing/tools/rollback.d.ts +11 -0
- package/dist/publishing/tools/rollback.d.ts.map +1 -0
- package/dist/publishing/tools/rollback.js +98 -0
- package/dist/publishing/tools/rollback.js.map +1 -0
- package/dist/publishing/tools/schedule-publish.d.ts +20 -0
- package/dist/publishing/tools/schedule-publish.d.ts.map +1 -0
- package/dist/publishing/tools/schedule-publish.js +49 -0
- package/dist/publishing/tools/schedule-publish.js.map +1 -0
- package/dist/publishing/tools/unpublish.d.ts +14 -0
- package/dist/publishing/tools/unpublish.d.ts.map +1 -0
- package/dist/publishing/tools/unpublish.js +29 -0
- package/dist/publishing/tools/unpublish.js.map +1 -0
- package/dist/references/UsedOnPanel.d.ts +3 -0
- package/dist/references/UsedOnPanel.d.ts.map +1 -0
- package/dist/references/UsedOnPanel.js +47 -0
- package/dist/references/UsedOnPanel.js.map +1 -0
- package/dist/references/find.d.ts +46 -0
- package/dist/references/find.d.ts.map +1 -0
- package/dist/references/find.js +142 -0
- package/dist/references/find.js.map +1 -0
- package/dist/references/guards.d.ts +32 -0
- package/dist/references/guards.d.ts.map +1 -0
- package/dist/references/guards.js +76 -0
- package/dist/references/guards.js.map +1 -0
- package/dist/references/index.d.ts +11 -0
- package/dist/references/index.d.ts.map +1 -0
- package/dist/references/index.js +6 -0
- package/dist/references/index.js.map +1 -0
- package/dist/references/plugin.d.ts +51 -0
- package/dist/references/plugin.d.ts.map +1 -0
- package/dist/references/plugin.js +111 -0
- package/dist/references/plugin.js.map +1 -0
- package/dist/references/tools.d.ts +54 -0
- package/dist/references/tools.d.ts.map +1 -0
- package/dist/references/tools.js +124 -0
- package/dist/references/tools.js.map +1 -0
- package/dist/references/walk.d.ts +43 -0
- package/dist/references/walk.d.ts.map +1 -0
- package/dist/references/walk.js +214 -0
- package/dist/references/walk.js.map +1 -0
- package/dist/testing/anonymousAccess.d.ts +111 -0
- package/dist/testing/anonymousAccess.d.ts.map +1 -0
- package/dist/testing/anonymousAccess.js +185 -0
- package/dist/testing/anonymousAccess.js.map +1 -0
- package/dist/testing/describeAnonymousAccess.d.ts +26 -0
- package/dist/testing/describeAnonymousAccess.d.ts.map +1 -0
- package/dist/testing/describeAnonymousAccess.js +76 -0
- package/dist/testing/describeAnonymousAccess.js.map +1 -0
- package/dist/testing/index.d.ts +11 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +9 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/utils/content-hash.d.ts +31 -0
- package/dist/utils/content-hash.d.ts.map +1 -0
- package/dist/utils/content-hash.js +94 -0
- package/dist/utils/content-hash.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/relationships.d.ts +17 -0
- package/dist/utils/relationships.d.ts.map +1 -0
- package/dist/utils/relationships.js +26 -0
- package/dist/utils/relationships.js.map +1 -0
- package/dist/utils/sha256.d.ts +10 -0
- package/dist/utils/sha256.d.ts.map +1 -0
- package/dist/utils/sha256.js +16 -0
- package/dist/utils/sha256.js.map +1 -0
- package/dist/utils/zod-issues.d.ts +19 -0
- package/dist/utils/zod-issues.d.ts.map +1 -0
- package/dist/utils/zod-issues.js +22 -0
- package/dist/utils/zod-issues.js.map +1 -0
- package/package.json +180 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"month.d.ts","sourceRoot":"","sources":["../../../src/editorial/calendar/month.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,KAAK;IACpB,IAAI,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I,EAAE,MAAM,EACZ,SAAS,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAyB,GACrD,aAAa,CAqCf"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*
|
|
2
|
+
The calendar's date arithmetic, pure so the suite can hold it. From
|
|
3
|
+
forumone-2026's `admin/calendar/month.ts` (#761 there), with the site's zone
|
|
4
|
+
made an argument.
|
|
5
|
+
|
|
6
|
+
**Everything is placed in one zone, the site's.** An item belongs to the day it
|
|
7
|
+
falls on there, so two editors in different zones see the same grid. A calendar
|
|
8
|
+
day is a string key, `YYYY-MM-DD`, never a `Date`: a `Date` is an instant, and
|
|
9
|
+
"which day is this instant on" is only answerable once a zone is chosen.
|
|
10
|
+
`calendarClock(zone).dayKey` is the one place that choice is made.
|
|
11
|
+
|
|
12
|
+
The grid is whole weeks, Sunday first, covering the month. Days are counted with
|
|
13
|
+
`Date.UTC`, which has no daylight saving time, so adding a day is always
|
|
14
|
+
86,400,000 ms.
|
|
15
|
+
*/
|
|
16
|
+
const DAY_MS = 86_400_000;
|
|
17
|
+
/** `2026-10`, as the query string carries it. */
|
|
18
|
+
export function monthParam({ year, month }) {
|
|
19
|
+
return `${year}-${String(month).padStart(2, '0')}`;
|
|
20
|
+
}
|
|
21
|
+
/** The month `delta` months from `from`. */
|
|
22
|
+
export function shiftMonth(from, delta) {
|
|
23
|
+
const index = from.year * 12 + (from.month - 1) + delta;
|
|
24
|
+
return { year: Math.floor(index / 12), month: (index % 12) + 1 };
|
|
25
|
+
}
|
|
26
|
+
const keyOfUtc = (ms) => new Date(ms).toISOString().slice(0, 10);
|
|
27
|
+
/** Every day key in the grid: whole weeks, Sunday first, covering the month. */
|
|
28
|
+
export function gridDays({ year, month }) {
|
|
29
|
+
const first = Date.UTC(year, month - 1, 1);
|
|
30
|
+
const last = Date.UTC(year, month, 0);
|
|
31
|
+
const start = first - new Date(first).getUTCDay() * DAY_MS;
|
|
32
|
+
const end = last + (6 - new Date(last).getUTCDay()) * DAY_MS;
|
|
33
|
+
const days = [];
|
|
34
|
+
for (let ms = start; ms <= end; ms += DAY_MS)
|
|
35
|
+
days.push(keyOfUtc(ms));
|
|
36
|
+
return days;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The instants to query between so nothing on the grid is missed. No zone is
|
|
40
|
+
* more than fourteen hours from UTC, so a day either side is enough; the extra
|
|
41
|
+
* rows are dropped when items are bucketed by `dayKey`.
|
|
42
|
+
*/
|
|
43
|
+
export function queryRange(days) {
|
|
44
|
+
const first = Date.parse(`${days[0]}T00:00:00.000Z`) - DAY_MS;
|
|
45
|
+
const last = Date.parse(`${days[days.length - 1]}T00:00:00.000Z`) + 2 * DAY_MS;
|
|
46
|
+
return { from: new Date(first).toISOString(), to: new Date(last).toISOString() };
|
|
47
|
+
}
|
|
48
|
+
/** "October 2026". */
|
|
49
|
+
export function monthTitle({ year, month }) {
|
|
50
|
+
return new Intl.DateTimeFormat('en-US', {
|
|
51
|
+
month: 'long',
|
|
52
|
+
year: 'numeric',
|
|
53
|
+
timeZone: 'UTC',
|
|
54
|
+
}).format(new Date(Date.UTC(year, month - 1, 1)));
|
|
55
|
+
}
|
|
56
|
+
/** "Thursday, October 1", for the agenda list. */
|
|
57
|
+
export function dayTitle(key) {
|
|
58
|
+
return new Intl.DateTimeFormat('en-US', {
|
|
59
|
+
weekday: 'long',
|
|
60
|
+
month: 'long',
|
|
61
|
+
day: 'numeric',
|
|
62
|
+
timeZone: 'UTC',
|
|
63
|
+
}).format(new Date(`${key}T00:00:00.000Z`));
|
|
64
|
+
}
|
|
65
|
+
/** What follows a time: "ET". Intl's short generic name, e.g. "ET", "PT". */
|
|
66
|
+
export function defaultZoneLabel(zone) {
|
|
67
|
+
const part = new Intl.DateTimeFormat('en-US', { timeZone: zone, timeZoneName: 'shortGeneric' })
|
|
68
|
+
.formatToParts(new Date(0))
|
|
69
|
+
.find((p) => p.type === 'timeZoneName');
|
|
70
|
+
return part?.value ?? zone;
|
|
71
|
+
}
|
|
72
|
+
function isZone(value) {
|
|
73
|
+
if (typeof value !== 'string' || value === '')
|
|
74
|
+
return false;
|
|
75
|
+
try {
|
|
76
|
+
new Intl.DateTimeFormat('en-US', { timeZone: value });
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** The zone-bound half of the arithmetic. */
|
|
84
|
+
export function calendarClock(zone, zoneLabel = defaultZoneLabel) {
|
|
85
|
+
if (!isZone(zone))
|
|
86
|
+
throw new Error(`calendarClock: "${zone}" is not an IANA time zone.`);
|
|
87
|
+
const keyFormat = new Intl.DateTimeFormat('en-CA', {
|
|
88
|
+
timeZone: zone,
|
|
89
|
+
year: 'numeric',
|
|
90
|
+
month: '2-digit',
|
|
91
|
+
day: '2-digit',
|
|
92
|
+
});
|
|
93
|
+
const dayKey = (instant) => keyFormat.format(typeof instant === 'string' ? new Date(instant) : instant);
|
|
94
|
+
const clock = (instant, at) => new Intl.DateTimeFormat('en-US', { hour: 'numeric', minute: '2-digit', timeZone: at }).format(new Date(instant));
|
|
95
|
+
return {
|
|
96
|
+
zone,
|
|
97
|
+
label: zoneLabel(zone),
|
|
98
|
+
dayKey,
|
|
99
|
+
parseMonth: (param, now) => {
|
|
100
|
+
if (typeof param === 'string') {
|
|
101
|
+
const match = /^(\d{4})-(\d{2})$/.exec(param);
|
|
102
|
+
if (match) {
|
|
103
|
+
const year = Number(match[1]);
|
|
104
|
+
const month = Number(match[2]);
|
|
105
|
+
if (month >= 1 && month <= 12 && year >= 2000 && year <= 2100)
|
|
106
|
+
return { year, month };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const [year, month] = dayKey(now).split('-').map(Number);
|
|
110
|
+
return { year: year, month: month };
|
|
111
|
+
},
|
|
112
|
+
timeLabel: (instant, ownZone) => {
|
|
113
|
+
const site = `${clock(instant, zone)} ${zoneLabel(zone)}`;
|
|
114
|
+
if (!isZone(ownZone) || ownZone === zone)
|
|
115
|
+
return site;
|
|
116
|
+
return `${site} (${clock(instant, ownZone)} ${zoneLabel(ownZone)})`;
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=month.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"month.js","sourceRoot":"","sources":["../../../src/editorial/calendar/month.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AAQF,MAAM,MAAM,GAAG,UAAU,CAAA;AAEzB,iDAAiD;AACjD,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAS;IAC/C,OAAO,GAAG,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAA;AACpD,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,UAAU,CAAC,IAAW,EAAE,KAAa;IACnD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA;IACvD,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAA;AAClE,CAAC;AAED,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAExE,gFAAgF;AAChF,MAAM,UAAU,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAS;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;IAC1C,MAAM,IAAI,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AAI,IAAI;wBAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;gBACvF,CAAC;YACH,CAAC;YACD,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACxD,OAAO,EAAE,IAAI,EAAE,IAAK,EAAE,KAAK,EAAE,KAAM,EAAE,CAAA;QACvC,CAAC;QACD,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;YAC9B,MAAM,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,CAAA;YACzD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,OAAO,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAA;YACrD,OAAO,GAAG,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,CAAA;QACrE,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Payload } from 'payload';
|
|
3
|
+
import type { McpToolDefinition } from '../../plugin-contract/mcp.js';
|
|
4
|
+
import type { McpToolDescriptor } from '../../mcp/collector.js';
|
|
5
|
+
import { type CalendarMonth, type CalendarOptions } from './calendar.js';
|
|
6
|
+
import type { CalendarKind } from './find.js';
|
|
7
|
+
export declare const CALENDAR_TOOLS: {
|
|
8
|
+
readonly getContentCalendar: {
|
|
9
|
+
readonly name: "get_content_calendar";
|
|
10
|
+
readonly description: "One month of the content calendar: scheduled publishes, past publishes and events, by day in the site's time zone. Use for \"what goes live next week?\", \"is anything scheduled on the 14th?\", or to check two launches do not collide before scheduling. Pass `month` as YYYY-MM (default: this month) and `kinds` to narrow it.";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const CALENDAR_TOOL_DESCRIPTORS: readonly McpToolDescriptor[];
|
|
14
|
+
declare const inputSchema: z.ZodObject<{
|
|
15
|
+
month: z.ZodOptional<z.ZodString>;
|
|
16
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["scheduled", "published", "event"]>, "many">>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
month?: string | undefined;
|
|
19
|
+
kinds?: ("published" | "event" | "scheduled")[] | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
month?: string | undefined;
|
|
22
|
+
kinds?: ("published" | "event" | "scheduled")[] | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
/** The month as the tool returns it: the month's own days with anything on them. */
|
|
25
|
+
export declare function toolCalendar(calendar: CalendarMonth, adminRoute: string, kinds?: readonly CalendarKind[]): {
|
|
26
|
+
month: string;
|
|
27
|
+
timeZone: string;
|
|
28
|
+
today: string;
|
|
29
|
+
total: number;
|
|
30
|
+
days: {
|
|
31
|
+
day: string;
|
|
32
|
+
items: {
|
|
33
|
+
time: string;
|
|
34
|
+
adminUrl: string;
|
|
35
|
+
kind: CalendarKind;
|
|
36
|
+
collection: string;
|
|
37
|
+
id: number | string;
|
|
38
|
+
title: string;
|
|
39
|
+
at: string;
|
|
40
|
+
zone?: string;
|
|
41
|
+
draft?: boolean;
|
|
42
|
+
}[];
|
|
43
|
+
}[];
|
|
44
|
+
};
|
|
45
|
+
export declare function createGetContentCalendarTool(deps: {
|
|
46
|
+
payload: Payload;
|
|
47
|
+
calendar: CalendarOptions;
|
|
48
|
+
}): McpToolDefinition<typeof inputSchema>;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/editorial/calendar/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAQ7C,eAAO,MAAM,cAAc;;;;;CAM2B,CAAA;AAEtD,eAAO,MAAM,yBAAyB,EAAE,SAAS,iBAAiB,EAAkC,CAAA;AAEpG,QAAA,MAAM,WAAW;;;;;;;;;EAUf,CAAA;AAEF,oFAAoF;AACpF,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,SAAS,YAAY,EAAE;;;;;;;;;;;;;;;;;;;EAqBhC;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE;IACjD,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;CAC1B,GAAG,iBAAiB,CAAC,OAAO,WAAW,CAAC,CAoBxC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { daysInMonth, readCalendarMonth, } from './calendar.js';
|
|
3
|
+
import { monthParam } from './month.js';
|
|
4
|
+
/*
|
|
5
|
+
The content calendar, as an MCP tool: the same month the view reads, as the
|
|
6
|
+
caller, as a list of days.
|
|
7
|
+
*/
|
|
8
|
+
export const CALENDAR_TOOLS = {
|
|
9
|
+
getContentCalendar: {
|
|
10
|
+
name: 'get_content_calendar',
|
|
11
|
+
description: 'One month of the content calendar: scheduled publishes, past publishes and events, by day in the site\'s time zone. Use for "what goes live next week?", "is anything scheduled on the 14th?", or to check two launches do not collide before scheduling. Pass `month` as YYYY-MM (default: this month) and `kinds` to narrow it.',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export const CALENDAR_TOOL_DESCRIPTORS = Object.values(CALENDAR_TOOLS);
|
|
15
|
+
const inputSchema = z.object({
|
|
16
|
+
month: z
|
|
17
|
+
.string()
|
|
18
|
+
.regex(/^\d{4}-\d{2}$/)
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('The month, as YYYY-MM. Default: the current month in the site time zone.'),
|
|
21
|
+
kinds: z
|
|
22
|
+
.array(z.enum(['scheduled', 'published', 'event']))
|
|
23
|
+
.optional()
|
|
24
|
+
.describe('Only these kinds of item. Default: all.'),
|
|
25
|
+
});
|
|
26
|
+
/** The month as the tool returns it: the month's own days with anything on them. */
|
|
27
|
+
export function toolCalendar(calendar, adminRoute, kinds) {
|
|
28
|
+
const days = daysInMonth(calendar)
|
|
29
|
+
.map((day) => ({
|
|
30
|
+
day,
|
|
31
|
+
items: (calendar.items.get(day) ?? [])
|
|
32
|
+
.filter((item) => !kinds || kinds.includes(item.kind))
|
|
33
|
+
.map((item) => ({
|
|
34
|
+
...item,
|
|
35
|
+
time: calendar.clock.timeLabel(item.at, item.zone),
|
|
36
|
+
adminUrl: `${adminRoute}/collections/${item.collection}/${String(item.id)}`,
|
|
37
|
+
})),
|
|
38
|
+
}))
|
|
39
|
+
.filter((day) => day.items.length > 0);
|
|
40
|
+
return {
|
|
41
|
+
month: monthParam(calendar.month),
|
|
42
|
+
timeZone: calendar.clock.zone,
|
|
43
|
+
today: calendar.today,
|
|
44
|
+
total: days.reduce((sum, day) => sum + day.items.length, 0),
|
|
45
|
+
days,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function createGetContentCalendarTool(deps) {
|
|
49
|
+
return {
|
|
50
|
+
...CALENDAR_TOOLS.getContentCalendar,
|
|
51
|
+
inputSchema,
|
|
52
|
+
handler: async (input, ctx) => {
|
|
53
|
+
if (!ctx.user) {
|
|
54
|
+
return {
|
|
55
|
+
error: 'Must be authenticated: the calendar is read with your own access, and an API key alone carries no identity.',
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const calendar = await readCalendarMonth(deps.payload, {
|
|
59
|
+
calendar: deps.calendar,
|
|
60
|
+
// The same cast and the same reason as publishing's `resolvePublishingActor`.
|
|
61
|
+
user: ctx.user,
|
|
62
|
+
...(input.month ? { month: input.month } : {}),
|
|
63
|
+
});
|
|
64
|
+
return toolCalendar(calendar, deps.payload.config.routes.admin, input.kinds);
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/editorial/calendar/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EACL,WAAW,EACX,iBAAiB,GAGlB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC;;;EAGE;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,kBAAkB,EAAE;QAClB,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EACT,mUAAmU;KACtU;CACmD,CAAA;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAiC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;AAEpG,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,KAAK,CAAC,eAAe,CAAC;SACtB,QAAQ,EAAE;SACV,QAAQ,CAAC,0EAA0E,CAAC;IACvF,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;SAClD,QAAQ,EAAE;SACV,QAAQ,CAAC,yCAAyC,CAAC;CACvD,CAAC,CAAA;AAEF,oFAAoF;AACpF,MAAM,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AO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;gBACd,OAAO;oBACL,KAAK,EACH,6GAA6G;iBAChH,CAAA;YACH,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE;gBACrD,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,8EAA8E;gBAC9E,IAAI,EAAE,GAAG,CAAC,IAAyC;gBACnD,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC/C,CAAC,CAAA;YACF,OAAO,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;QAC9E,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Payload, SanitizedConfig } from 'payload';
|
|
2
|
+
import type { CalendarOptions } from './calendar/calendar.js';
|
|
3
|
+
import type { HealthCheck } from './health/checks.js';
|
|
4
|
+
import type { SearchSource } from './palette/sources.js';
|
|
5
|
+
import type { WorkOptions } from './work/work.js';
|
|
6
|
+
export declare const EDITORIAL_CUSTOM_KEY = "throughlineEditorial";
|
|
7
|
+
export interface EditorialRuntime {
|
|
8
|
+
health?: {
|
|
9
|
+
checks: readonly HealthCheck[];
|
|
10
|
+
/** The view's path under the admin route. */
|
|
11
|
+
path: string;
|
|
12
|
+
};
|
|
13
|
+
calendar?: {
|
|
14
|
+
options: CalendarOptions;
|
|
15
|
+
path: string;
|
|
16
|
+
};
|
|
17
|
+
work?: {
|
|
18
|
+
options: WorkOptions;
|
|
19
|
+
};
|
|
20
|
+
palette?: {
|
|
21
|
+
sources: readonly SearchSource[];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare function editorialRuntime(config: Payload['config'] | SanitizedConfig): EditorialRuntime;
|
|
25
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/editorial/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AASjD,eAAO,MAAM,oBAAoB,yBAAyB,CAAA;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE;QACP,MAAM,EAAE,SAAS,WAAW,EAAE,CAAA;QAC9B,6CAA6C;QAC7C,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,eAAe,CAAA;QACxB,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,IAAI,CAAC,EAAE;QACL,OAAO,EAAE,WAAW,CAAA;KACrB,CAAA;IACD,OAAO,CAAC,EAAE;QACR,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;KACjC,CAAA;CACF;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,eAAe,GAAG,gBAAgB,CAK9F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Where the editorial plugin leaves its configuration for its own server
|
|
3
|
+
components to find. Import-map components receive no plugin options, and the
|
|
4
|
+
health checks and the calendar's zone label are functions, which cannot ride on
|
|
5
|
+
serialized props; `config.custom` is server-only and holds anything.
|
|
6
|
+
*/
|
|
7
|
+
export const EDITORIAL_CUSTOM_KEY = 'throughlineEditorial';
|
|
8
|
+
export function editorialRuntime(config) {
|
|
9
|
+
return ((config.custom ?? {})[EDITORIAL_CUSTOM_KEY] ??
|
|
10
|
+
{});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/editorial/config.ts"],"names":[],"mappings":"AAMA;;;;;EAKE;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAA;AAoB1D,MAAM,UAAU,gBAAgB,CAAC,MAA2C;IAC1E,OAAO,CACJ,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAkD,CAAC,oBAAoB,CAAC;QAC7F,EAAE,CACH,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HealthReport } from './find.js';
|
|
2
|
+
export declare function EditorialStyles(): import("react").JSX.Element;
|
|
3
|
+
export declare function ContentHealthReport({ report, adminRoute, }: {
|
|
4
|
+
report: HealthReport;
|
|
5
|
+
adminRoute: string;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ContentHealthReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentHealthReport.d.ts","sourceRoot":"","sources":["../../../src/editorial/health/ContentHealthReport.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,WAAW,CAAA;AAW1D,wBAAgB,eAAe,gCAM9B;AAyBD,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,UAAU,GACX,EAAE;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;CACnB,+BAkDA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { relativeTime } from '../relativeTime.js';
|
|
3
|
+
import { EDITORIAL_CSS } from '../styles.js';
|
|
4
|
+
import { listHref } from './checks.js';
|
|
5
|
+
/*
|
|
6
|
+
The content-health report, as markup. Pure: it takes the report and renders it,
|
|
7
|
+
so the parity test can render exactly what an editor sees from exactly the rows
|
|
8
|
+
the MCP tool returns.
|
|
9
|
+
|
|
10
|
+
Each check is a section; each collection in it is a count linking to the admin
|
|
11
|
+
list filtered by the same `where`, and the first rows.
|
|
12
|
+
*/
|
|
13
|
+
export function EditorialStyles() {
|
|
14
|
+
return (_jsx("style", { href: "throughline-editorial", precedence: "default", children: EDITORIAL_CSS }));
|
|
15
|
+
}
|
|
16
|
+
function Rows({ group, adminRoute, now }) {
|
|
17
|
+
return (_jsx("ul", { className: "tl-editorial__list", children: group.rows.map((row) => (_jsxs("li", { className: "tl-editorial__row", children: [_jsx("a", { href: `${adminRoute}/collections/${group.collection}/${String(row.id)}`, children: row.title }), _jsxs("span", { className: "tl-editorial__meta", children: [row.at ? (_jsxs(_Fragment, { children: ["revised ", _jsx("time", { dateTime: row.at, children: relativeTime(row.at, now) })] })) : null, row.at && row.note ? ' · ' : null, row.note ?? null] })] }, String(row.id)))) }));
|
|
18
|
+
}
|
|
19
|
+
export function ContentHealthReport({ report, adminRoute, }) {
|
|
20
|
+
const now = new Date(report.generatedAt);
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsx(EditorialStyles, {}), report.checks.map((check) => {
|
|
22
|
+
const groups = check.groups.filter((group) => group.total > 0);
|
|
23
|
+
const excluded = check.groups.reduce((sum, group) => sum + (group.excluded ?? 0), 0);
|
|
24
|
+
return (_jsxs("section", { className: "tl-editorial__panel", "aria-labelledby": `tl-health-${check.id}`, children: [_jsx("h2", { id: `tl-health-${check.id}`, children: check.label }), check.description ? _jsx("p", { className: "tl-editorial__meta", children: check.description }) : null, check.skipped === 'failed' ? (_jsx("p", { className: "tl-editorial__empty", children: "This could not be checked." })) : groups.length === 0 ? (_jsx("p", { className: "tl-editorial__empty", children: check.empty })) : (groups.map((group) => (_jsxs("div", { className: "tl-health__group", children: [_jsxs("h3", { children: [group.label, ' ', _jsx("a", { href: listHref(adminRoute, group.collection, group.where), children: group.total + (group.excluded ?? 0) > group.rows.length
|
|
25
|
+
? `See all ${group.total + (group.excluded ?? 0)}`
|
|
26
|
+
: 'Open as a list' })] }), _jsx(Rows, { group: group, adminRoute: adminRoute, now: now })] }, group.collection)))), excluded > 0 ? (_jsxs("p", { className: "tl-editorial__meta", children: [excluded, " more ", excluded === 1 ? 'is' : 'are', " not listed because nothing uses", ' ', excluded === 1 ? 'it' : 'them', "."] })) : null] }, check.id));
|
|
27
|
+
})] }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ContentHealthReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentHealthReport.js","sourceRoot":"","sources":["../../../src/editorial/health/ContentHealthReport.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC;;;;;;;EAOE;AAEF,MAAM,UAAU,eAAe;IAC7B,OAAO,CACL,gBAAO,IAAI,EAAC,uBAAuB,EAAC,UAAU,EAAC,SAAS,YACrD,aAAa,GACR,CACT,CAAA;AACH,CAAC;AAED,SAAS,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAyD;IAC7F,OAAO,CACL,aAAI,SAAS,EAAC,oBAAoB,YAC/B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACvB,cAAyB,SAAS,EAAC,mBAAmB,aACpD,YAAG,IAAI,EAAE,GAAG,UAAU,gBAAgB,KAAK,CAAC,UAAU,IAAI,MAA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CAAC,CAAC,CAAC,MAAM,SAC7B,CACL,CAAC,CAAC,CAAC,IAAI,KAlCH,KAAK,CAAC,EAAE,CAmCL,CACX,CAAA;YACH,CAAC,CAAC,IACD,CACJ,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentHealthView.d.ts","sourceRoot":"","sources":["../../../src/editorial/health/ContentHealthView.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAcnD,wBAAsB,iBAAiB,CAAC,EACtC,cAAc,EACd,MAAM,EACN,YAAY,EACZ,OAAO,EACP,IAAI,GACL,EAAE,oBAAoB,wCAiCtB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DefaultTemplate } from '@payloadcms/next/templates';
|
|
3
|
+
import { Gutter } from '@payloadcms/ui';
|
|
4
|
+
import { redirect } from 'next/navigation.js';
|
|
5
|
+
import { editorialRuntime } from '../config.js';
|
|
6
|
+
import { ContentHealthReport } from './ContentHealthReport.js';
|
|
7
|
+
import { findContentNeedingAttention } from './find.js';
|
|
8
|
+
/*
|
|
9
|
+
`/admin/content-health`: what needs a review, and where it is. Moved from
|
|
10
|
+
forumone-2026's `admin/ContentHealth.tsx` (#757 there).
|
|
11
|
+
|
|
12
|
+
"Your work" answers "what is waiting on me"; this answers the question a
|
|
13
|
+
content lead asks every quarter, "what is going stale?", without anybody
|
|
14
|
+
building a filter. `editorialPlugin` registers it with the site's checks.
|
|
15
|
+
*/
|
|
16
|
+
export async function ContentHealthView({ initPageResult, params, searchParams, payload, i18n, }) {
|
|
17
|
+
const { req, permissions, locale, visibleEntities } = initPageResult;
|
|
18
|
+
// The signed-in person arrives on the request: Payload leaves the `user`
|
|
19
|
+
// prop empty for a custom root view.
|
|
20
|
+
const { user } = req;
|
|
21
|
+
const { admin } = payload.config.routes;
|
|
22
|
+
const health = editorialRuntime(payload.config).health;
|
|
23
|
+
const path = health?.path ?? '/content-health';
|
|
24
|
+
if (!user)
|
|
25
|
+
redirect(`${admin}/login?redirect=${encodeURIComponent(`${admin}${path}`)}`);
|
|
26
|
+
const report = await findContentNeedingAttention(payload, { checks: health?.checks ?? [], user });
|
|
27
|
+
return (_jsx(DefaultTemplate, { i18n: i18n, ...(locale ? { locale } : {}), ...(params ? { params } : {}), payload: payload, permissions: permissions, req: req, ...(searchParams ? { searchParams } : {}), user: user, visibleEntities: visibleEntities, children: _jsxs(Gutter, { className: "tl-health", children: [_jsx("h1", { children: "Content health" }), _jsx("p", { className: "tl-health__lede", children: "What needs a review, and where it is. Each count opens the list it counted." }), _jsx(ContentHealthReport, { report: report, adminRoute: admin })] }) }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ContentHealthView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentHealthView.js","sourceRoot":"","sources":["../../../src/editorial/health/ContentHealthView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAA;AAEvD;;;;;;;EAOE;AAEF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,cAAc,EACd,MAAM,EACN,YAAY,EACZ,OAAO,EACP,IAAI,GACiB;IACrB,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,cAAc,CAAA;IACpE,yEAAyE;IACzE,qCAAqC;IACrC,MAAM,EAAE,IA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src/editorial/health/HealthSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAetD,wBAAsB,aAAa,CAAC,EAClC,OAAO,EACP,IAAI,GACL,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;CAC7B,+CAoDA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { editorialRuntime } from '../config.js';
|
|
3
|
+
import { EditorialStyles } from './ContentHealthReport.js';
|
|
4
|
+
import { listHref } from './checks.js';
|
|
5
|
+
import { findContentNeedingAttention } from './find.js';
|
|
6
|
+
/*
|
|
7
|
+
Content health as counts, for a dashboard: each a link to the filtered list,
|
|
8
|
+
and a link to the full view. Costly checks are left to the view, because the
|
|
9
|
+
dashboard is opened far more often than anybody reviews anything.
|
|
10
|
+
|
|
11
|
+
A host renders it where it wants it, e.g. inside a `beforeDashboard` component:
|
|
12
|
+
`<HealthSummary payload={payload} user={user} />`.
|
|
13
|
+
*/
|
|
14
|
+
export async function HealthSummary({ payload, user, }) {
|
|
15
|
+
if (!user)
|
|
16
|
+
return null;
|
|
17
|
+
const health = editorialRuntime(payload.config).health;
|
|
18
|
+
if (!health)
|
|
19
|
+
return null;
|
|
20
|
+
const { admin } = payload.config.routes;
|
|
21
|
+
const report = await findContentNeedingAttention(payload, {
|
|
22
|
+
checks: health.checks,
|
|
23
|
+
user,
|
|
24
|
+
scope: 'summary',
|
|
25
|
+
});
|
|
26
|
+
const line = (check) => {
|
|
27
|
+
const groups = check.groups.filter((group) => group.total > 0);
|
|
28
|
+
const total = groups.reduce((sum, group) => sum + group.total, 0);
|
|
29
|
+
return (_jsxs("li", { className: "tl-editorial__row", children: [_jsxs("span", { children: [check.label, ": ", _jsx("strong", { children: total })] }), _jsx("span", { className: "tl-editorial__meta", children: groups.length === 0
|
|
30
|
+
? 'none'
|
|
31
|
+
: groups.map((group, index) => (_jsxs("span", { children: [index > 0 && ' · ', _jsxs("a", { href: listHref(admin, group.collection, group.where), children: [group.total, " ", (group.total === 1 ? group.singular : group.label).toLowerCase()] })] }, group.collection))) })] }, check.id));
|
|
32
|
+
};
|
|
33
|
+
const shown = report.checks.filter((check) => !check.skipped);
|
|
34
|
+
const left = report.checks
|
|
35
|
+
.filter((check) => check.skipped === 'costly')
|
|
36
|
+
.map((c) => c.label.toLowerCase());
|
|
37
|
+
return (_jsxs("section", { className: "tl-editorial__panel", "aria-labelledby": "tl-dashboard-health", children: [_jsx(EditorialStyles, {}), _jsx("h2", { id: "tl-dashboard-health", children: "Content health" }), _jsx("ul", { className: "tl-editorial__list", children: shown.map(line) }), _jsx("p", { className: "tl-editorial__more", children: _jsxs("a", { href: `${admin}${health.path}`, children: ["Review content health", left.length > 0 ? `, including ${left.join(' and ')}` : ''] }) })] }));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=HealthSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HealthSummary.js","sourceRoot":"","sources":["../../../src/editorial/health/HealthSummary.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,2BAA2B,EAA0B,MAAM,WAAW,CAAA;AAE/E;;;;;;;EAOE;AAEF,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAClC,OAAO,EACP,IAAI,GAIL;IACC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IACtB,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAA;IACtD,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,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CAAA;IACH,CAAC,CAAA;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC7D,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM;SACvB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC;SAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;IAEpC,OAAO,CACL,mBAAS,SAAS,EAAC,qBAAqB,qBAAiB,qBAAqB,aAC5E,KAAC,eAAe,KAAG,EACnB,aAAI,EAAE,EAAC,qBAAqB,+BAAoB,EAChD,aAAI,SAAS,EAAC,oBAAoB,YAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAM,EACzD,YAAG,SAAS,EAAC,oBAAoB,YAC/B,aAAG,IAAI,EAAE,GAAG,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,sCACT,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAC9E,GACF,IACI,CACX,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { CollectionSlug, Payload, Where } from 'payload';
|
|
2
|
+
/** One row a check found. */
|
|
3
|
+
export interface HealthRow {
|
|
4
|
+
id: number | string;
|
|
5
|
+
title: string;
|
|
6
|
+
/** The date the row is judged by, when the check has one. */
|
|
7
|
+
at?: string;
|
|
8
|
+
/** What is wrong, in a few words: "no description or image". */
|
|
9
|
+
note?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface HealthCheck {
|
|
12
|
+
/** Stable id, used by the MCP tool's `checks` filter. */
|
|
13
|
+
id: string;
|
|
14
|
+
/** The heading: "Not revised in a year". */
|
|
15
|
+
label: string;
|
|
16
|
+
/** One sentence under the heading saying what is and is not judged. */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** What to say when nothing is found. */
|
|
19
|
+
empty: string;
|
|
20
|
+
/** The collections it runs over, in display order. */
|
|
21
|
+
collections: readonly CollectionSlug[];
|
|
22
|
+
/** The query for one collection, or `null` to skip it. */
|
|
23
|
+
where: (collection: CollectionSlug, now: Date) => Where | null;
|
|
24
|
+
/** The fields `describe` and the title need. `id` is always read. */
|
|
25
|
+
select: Record<string, true>;
|
|
26
|
+
/** Database sort for the rows. Ignored when `order` is given. */
|
|
27
|
+
sort?: string;
|
|
28
|
+
/** In-memory order, for a sort no single column holds. Reads every matching row. */
|
|
29
|
+
order?: (a: HealthRow, b: HealthRow) => number;
|
|
30
|
+
/** The row's date and note. */
|
|
31
|
+
describe?: (doc: Record<string, unknown>, now: Date) => Pick<HealthRow, 'at' | 'note'>;
|
|
32
|
+
/**
|
|
33
|
+
* A second pass over every matching document, for a rule a `where` cannot
|
|
34
|
+
* state. Returns the ones that count. Implies reading every match.
|
|
35
|
+
*/
|
|
36
|
+
refine?: (docs: Record<string, unknown>[], payload: Payload) => Promise<Record<string, unknown>[]>;
|
|
37
|
+
/** Too expensive for the dashboard summary: shown only on the full view and to the tool. */
|
|
38
|
+
costly?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** `now` minus `months` calendar months, as an ISO string. */
|
|
41
|
+
export declare function monthsBefore(now: Date, months: number): string;
|
|
42
|
+
export interface StaleCheckOptions {
|
|
43
|
+
/** Months without a revision after which a published document is stale, per collection. */
|
|
44
|
+
after: Readonly<Record<string, number>>;
|
|
45
|
+
/**
|
|
46
|
+
* The date fields to judge by, most trusted first. A document is dated by the
|
|
47
|
+
* first that is set. Default: `revisedAt`, `publishedAt`, `createdAt`.
|
|
48
|
+
*/
|
|
49
|
+
dates?: readonly string[];
|
|
50
|
+
/** The first-publish stamp that marks a document as published in every version. Default `publishedAt`; `false` for none. */
|
|
51
|
+
publishedField?: string | false;
|
|
52
|
+
label?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
empty?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Published documents not revised within a threshold, oldest first. A
|
|
58
|
+
* collection with no threshold is not judged: a dated post is not a stale one.
|
|
59
|
+
*/
|
|
60
|
+
export declare function staleCheck(options: StaleCheckOptions): HealthCheck;
|
|
61
|
+
export interface MissingSeoCheckOptions {
|
|
62
|
+
collections: readonly CollectionSlug[];
|
|
63
|
+
/** Field paths. Defaults are `@payloadcms/plugin-seo`'s: `meta.description`, `meta.image`, `meta.noIndex`. */
|
|
64
|
+
fields?: {
|
|
65
|
+
description?: string;
|
|
66
|
+
image?: string;
|
|
67
|
+
noIndex?: string | false;
|
|
68
|
+
};
|
|
69
|
+
publishedField?: string | false;
|
|
70
|
+
/** Database sort. Default `-publishedAt`. */
|
|
71
|
+
sort?: string;
|
|
72
|
+
label?: string;
|
|
73
|
+
description?: string;
|
|
74
|
+
empty?: string;
|
|
75
|
+
}
|
|
76
|
+
/** Published, indexable documents with no meta description or no meta image. */
|
|
77
|
+
export declare function missingSeoCheck(options: MissingSeoCheckOptions): HealthCheck;
|
|
78
|
+
export interface MissingAltCheckOptions {
|
|
79
|
+
/** The upload collection. Default `media`. */
|
|
80
|
+
collection?: CollectionSlug;
|
|
81
|
+
/** The alt text field. Default `alt`. */
|
|
82
|
+
altField?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Only images something uses. Default `true`: an unused upload is on nobody's
|
|
85
|
+
* page. Needs a full read of every document that could hold an image, so the
|
|
86
|
+
* check is `costly`.
|
|
87
|
+
*/
|
|
88
|
+
onlyInUse?: boolean;
|
|
89
|
+
/** Finds the ids in use. `findReferencedIds` from `@forumone/throughline/media`. */
|
|
90
|
+
inUse?: (payload: Payload, collection: CollectionSlug) => Promise<Set<string>>;
|
|
91
|
+
label?: string;
|
|
92
|
+
description?: string;
|
|
93
|
+
empty?: string;
|
|
94
|
+
}
|
|
95
|
+
/** Image uploads with no alt text, by default only those something uses. */
|
|
96
|
+
export declare function missingAltCheck(options?: MissingAltCheckOptions): HealthCheck;
|
|
97
|
+
/**
|
|
98
|
+
* A `where` as the query string the admin list view reads, so a count links to
|
|
99
|
+
* the list it counted. Bracket notation, which is all the list view parses.
|
|
100
|
+
*/
|
|
101
|
+
export declare function whereQuery(where: Where): string;
|
|
102
|
+
/** The admin list for `collection`, filtered by `where`. */
|
|
103
|
+
export declare function listHref(adminRoute: string, collection: string, where: Where): string;
|
|
104
|
+
//# sourceMappingURL=checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../../src/editorial/health/checks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAkB7D,6BAA6B;AAC7B,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,6DAA6D;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAA;IACV,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,sDAAsD;IACtD,WAAW,EAAE,SAAS,cAAc,EAAE,CAAA;IACtC,0DAA0D;IAC1D,KAAK,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,EAAE,IAAI,KAAK,KAAK,GAAG,IAAI,CAAA;IAC9D,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA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