@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,15 @@
|
|
|
1
|
+
import type { Field } from 'payload';
|
|
2
|
+
/**
|
|
3
|
+
* A read-only sidebar date, set when a person's save changes a published
|
|
4
|
+
* document. Not for a collection mirrored from elsewhere, where nobody edits
|
|
5
|
+
* anything and every field is overwritten on every sync.
|
|
6
|
+
*/
|
|
7
|
+
export declare function revisedAtField(options?: {
|
|
8
|
+
description?: string;
|
|
9
|
+
}): Field;
|
|
10
|
+
/** When a published document last changed, or `undefined` when nothing honest is known. */
|
|
11
|
+
export declare function contentRevisedAt(doc: {
|
|
12
|
+
revisedAt?: string | null | undefined;
|
|
13
|
+
publishedAt?: string | null | undefined;
|
|
14
|
+
}): string | undefined;
|
|
15
|
+
//# sourceMappingURL=revisedAt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revisedAt.d.ts","sourceRoot":"","sources":["../../src/fields/revisedAt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAkBpC;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,KAAK,CA8C5E;AAED,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,GAAG,EAAE;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACrC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACxC,GAAG,MAAM,GAAG,SAAS,CAQrB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
When an editor last revised the published document, not when the row last
|
|
3
|
+
changed. From forumone-2026's `fields/revisedAt.ts` (#444 there).
|
|
4
|
+
|
|
5
|
+
**These are not the same thing.** A sitemap's `lastmod` and
|
|
6
|
+
`article:modified_time` that read Payload's `updatedAt` tell crawlers whatever
|
|
7
|
+
last touched the row: forumone-2026's content migration put all 153 timestamps
|
|
8
|
+
inside a 17-day window, so the site claimed its whole archive was revised in
|
|
9
|
+
the same three days. `lastmod` is a pre-read filter, and a crawler that learns a
|
|
10
|
+
site's `lastmod` is noise stops using it.
|
|
11
|
+
|
|
12
|
+
`updatedAt` cannot be made correct about content after the fact, so this
|
|
13
|
+
records real revisions from here on. A reader of it falls back to `publishedAt`
|
|
14
|
+
for a document never revised, which needs no backfill.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* A read-only sidebar date, set when a person's save changes a published
|
|
18
|
+
* document. Not for a collection mirrored from elsewhere, where nobody edits
|
|
19
|
+
* anything and every field is overwritten on every sync.
|
|
20
|
+
*/
|
|
21
|
+
export function revisedAtField(options = {}) {
|
|
22
|
+
return {
|
|
23
|
+
name: 'revisedAt',
|
|
24
|
+
type: 'date',
|
|
25
|
+
/*
|
|
26
|
+
No index. Nothing sorts or filters on it (the sitemap and the metadata each
|
|
27
|
+
read it off a row they already have), and an index would be one per
|
|
28
|
+
collection and per version table to serve no query.
|
|
29
|
+
*/
|
|
30
|
+
admin: {
|
|
31
|
+
position: 'sidebar',
|
|
32
|
+
readOnly: true,
|
|
33
|
+
date: { pickerAppearance: 'dayAndTime' },
|
|
34
|
+
description: options.description ??
|
|
35
|
+
'Set automatically when a change is published. Until then, the published date is used.',
|
|
36
|
+
},
|
|
37
|
+
hooks: {
|
|
38
|
+
beforeChange: [
|
|
39
|
+
({ value, req, operation, data, originalDoc }) => {
|
|
40
|
+
/*
|
|
41
|
+
A new document has not been revised; it has been written. Leaving this
|
|
42
|
+
empty is what makes the fallback to `publishedAt` fire.
|
|
43
|
+
*/
|
|
44
|
+
if (operation === 'create')
|
|
45
|
+
return undefined;
|
|
46
|
+
/*
|
|
47
|
+
Only a person's save counts. Integrations, workers and scripts write
|
|
48
|
+
with no user, and those are exactly the writes that produced the bad
|
|
49
|
+
data this field exists to replace.
|
|
50
|
+
*/
|
|
51
|
+
if (!req?.user)
|
|
52
|
+
return value;
|
|
53
|
+
/*
|
|
54
|
+
And only once it is public. `lastmod` describes the URL a crawler can
|
|
55
|
+
fetch; a draft revision has not reached it. With autosave this is
|
|
56
|
+
load-bearing: otherwise every draft save would advance the date.
|
|
57
|
+
*/
|
|
58
|
+
const status = (data?.['_status'] ?? originalDoc?._status);
|
|
59
|
+
if (status !== 'published')
|
|
60
|
+
return value;
|
|
61
|
+
return new Date().toISOString();
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** When a published document last changed, or `undefined` when nothing honest is known. */
|
|
68
|
+
export function contentRevisedAt(doc) {
|
|
69
|
+
for (const value of [doc.revisedAt, doc.publishedAt]) {
|
|
70
|
+
if (typeof value !== 'string' || value.trim() === '')
|
|
71
|
+
continue;
|
|
72
|
+
// A stored date that does not parse is not worth emitting.
|
|
73
|
+
if (Number.isNaN(new Date(value).getTime()))
|
|
74
|
+
continue;
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=revisedAt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revisedAt.js","sourceRoot":"","sources":["../../src/fields/revisedAt.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;EAcE;AAEF;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,UAAoC,EAAE;IACnE,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,MAAM;QACZ;;;;UAIE;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,EAAE,gBAAgB,EAAE,YAAY,EAAE;YACxC,WAAW,EACT,OAAO,CAAC,WAAW;gBACnB,uFAAuF;SAC1F;QACD,KAAK,EAAE;YACL,YAAY,EAAE;gBACZ,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE;oBAC/C;;;sBAGE;oBACF,IAAI,SAAS,KAAK,QAAQ;wBAAE,OAAO,SAAS,CAAA;oBAE5C;;;;sBAIE;oBACF,IAAI,CAAC,GAAG,EAAE,IAAI;wBAAE,OAAO,KAAK,CAAA;oBAE5B;;;;sBAIE;oBACF,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,WAAW,EAAE,OAAO,CAAuB,CAAA;oBAChF,IAAI,MAAM,KAAK,WAAW;wBAAE,OAAO,KAAK,CAAA;oBAExC,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;gBACjC,CAAC;aACF;SACF;KACF,CAAA;AACH,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,gBAAgB,CAAC,GAGhC;IACC,KAAK,MAAM,KAAK,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QACrD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,SAAQ;QAC9D,2DAA2D;QAC3D,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;YAAE,SAAQ;QACrD,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type CollectionBeforeValidateHook, type CollectionSlug, type Field } from 'payload';
|
|
2
|
+
/** Lowercase, hyphenated, no leading or trailing hyphen. */
|
|
3
|
+
export declare function slugify(input: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* The URL segment, derived from another field but editable.
|
|
6
|
+
*
|
|
7
|
+
* Filled from `from` when empty and normalised whenever it is set, so an author
|
|
8
|
+
* who types nothing gets a correct slug and an author who types `About Us!`
|
|
9
|
+
* gets `about-us` rather than a 404. It is never *re*-derived once set:
|
|
10
|
+
* retitling a published page must not silently move its URL.
|
|
11
|
+
*/
|
|
12
|
+
export declare function slugField(options?: {
|
|
13
|
+
from?: string;
|
|
14
|
+
unique?: boolean;
|
|
15
|
+
}): Field;
|
|
16
|
+
/** The refusal when a trashed document holds a slug. */
|
|
17
|
+
export declare function heldInTrash(slug: string, title: string, kind?: string): string;
|
|
18
|
+
/** A title, a name, or failing both the slug. */
|
|
19
|
+
export declare function titleOf(doc: Record<string, unknown>): string;
|
|
20
|
+
export declare function refuseSlugHeldInTrash(collection: CollectionSlug): CollectionBeforeValidateHook;
|
|
21
|
+
//# sourceMappingURL=slug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../src/fields/slug.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,KAAK,EACX,MAAM,SAAS,CAAA;AAOhB,4DAA4D;AAC5D,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAW7C;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,KAAK,CAwBlF;AAED,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAG9E;AAED,iDAAiD;AACjD,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAM5D;AAiBD,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,cAAc,GAAG,4BAA4B,CAwB9F"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ValidationError, } from 'payload';
|
|
2
|
+
/*
|
|
3
|
+
The URL segment, and the trash that still holds one. From forumone-2026's
|
|
4
|
+
`fields/slug.ts` and `hooks/trashedSlug.ts`.
|
|
5
|
+
*/
|
|
6
|
+
/** Lowercase, hyphenated, no leading or trailing hyphen. */
|
|
7
|
+
export function slugify(input) {
|
|
8
|
+
return (input
|
|
9
|
+
.normalize('NFKD')
|
|
10
|
+
// Strip accents, so "Sécurité" slugs as "securite" rather than losing the
|
|
11
|
+
// letter entirely.
|
|
12
|
+
.replace(/[̀-ͯ]/g, '')
|
|
13
|
+
.toLowerCase()
|
|
14
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
15
|
+
.replace(/^-+|-+$/g, ''));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The URL segment, derived from another field but editable.
|
|
19
|
+
*
|
|
20
|
+
* Filled from `from` when empty and normalised whenever it is set, so an author
|
|
21
|
+
* who types nothing gets a correct slug and an author who types `About Us!`
|
|
22
|
+
* gets `about-us` rather than a 404. It is never *re*-derived once set:
|
|
23
|
+
* retitling a published page must not silently move its URL.
|
|
24
|
+
*/
|
|
25
|
+
export function slugField(options = {}) {
|
|
26
|
+
const from = options.from ?? 'title';
|
|
27
|
+
return {
|
|
28
|
+
name: 'slug',
|
|
29
|
+
type: 'text',
|
|
30
|
+
required: true,
|
|
31
|
+
index: true,
|
|
32
|
+
...(options.unique === false ? {} : { unique: true }),
|
|
33
|
+
admin: {
|
|
34
|
+
position: 'sidebar',
|
|
35
|
+
description: 'The last segment of the URL. Left empty, it follows the title.',
|
|
36
|
+
},
|
|
37
|
+
hooks: {
|
|
38
|
+
beforeValidate: [
|
|
39
|
+
({ value, data }) => {
|
|
40
|
+
if (typeof value === 'string' && value.trim() !== '')
|
|
41
|
+
return slugify(value);
|
|
42
|
+
const source = data?.[from];
|
|
43
|
+
return typeof source === 'string' && source.trim() !== '' ? slugify(source) : value;
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** The refusal when a trashed document holds a slug. */
|
|
50
|
+
export function heldInTrash(slug, title, kind) {
|
|
51
|
+
const what = kind ? `the ${kind} "${title}"` : `"${title}"`;
|
|
52
|
+
return `/${slug} belongs to ${what}, which is in the trash. Restore it, or delete it permanently, to use this slug.`;
|
|
53
|
+
}
|
|
54
|
+
/** A title, a name, or failing both the slug. */
|
|
55
|
+
export function titleOf(doc) {
|
|
56
|
+
for (const key of ['title', 'name']) {
|
|
57
|
+
const value = doc[key];
|
|
58
|
+
if (typeof value === 'string' && value)
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
return String(doc['slug']);
|
|
62
|
+
}
|
|
63
|
+
/*
|
|
64
|
+
A trashed document keeps its slug, and says so.
|
|
65
|
+
|
|
66
|
+
`slug` carries a unique index, and the trash is a `deletedAt` timestamp on the
|
|
67
|
+
same row, so a page in the trash still holds its address: that is what lets it
|
|
68
|
+
be restored to the URL it had. The cost is the save that collides with it. An
|
|
69
|
+
editor creates a new "About" page and gets Payload's bare "The following field
|
|
70
|
+
is invalid: slug", caused by a document the list no longer shows them.
|
|
71
|
+
|
|
72
|
+
This names the document and the way out before the database refuses. Every
|
|
73
|
+
other read in the admin leaves the trash out, so it asks with `trash: true`. It
|
|
74
|
+
runs after the field hooks, so `slugField` has already normalised the value, and
|
|
75
|
+
it only queries when the slug is new or has changed: autosave sends the whole
|
|
76
|
+
document every two seconds.
|
|
77
|
+
*/
|
|
78
|
+
export function refuseSlugHeldInTrash(collection) {
|
|
79
|
+
return async ({ data, originalDoc, req }) => {
|
|
80
|
+
const candidate = data?.['slug'];
|
|
81
|
+
const slug = typeof candidate === 'string' ? candidate.trim() : '';
|
|
82
|
+
if (!slug || slug === originalDoc?.slug)
|
|
83
|
+
return data;
|
|
84
|
+
const { docs } = await req.payload.find({
|
|
85
|
+
collection,
|
|
86
|
+
where: { and: [{ slug: { equals: slug } }, { deletedAt: { exists: true } }] },
|
|
87
|
+
trash: true,
|
|
88
|
+
depth: 0,
|
|
89
|
+
limit: 1,
|
|
90
|
+
overrideAccess: true,
|
|
91
|
+
req,
|
|
92
|
+
});
|
|
93
|
+
const holder = docs[0];
|
|
94
|
+
if (!holder)
|
|
95
|
+
return data;
|
|
96
|
+
throw new ValidationError({
|
|
97
|
+
collection,
|
|
98
|
+
errors: [{ path: 'slug', label: 'Slug', message: heldInTrash(slug, titleOf(holder)) }],
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=slug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug.js","sourceRoot":"","sources":["../../src/fields/slug.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,GAIhB,MAAM,SAAS,CAAA;AAEhB;;;EAGE;AAEF,4DAA4D;AAC5D,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,OAAO,CACL,KAAK;SACF,SAAS,CAAC,MAAM,CAAC;QAClB,0EAA0E;QAC1E,mBAAmB;SAClB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAC3B,CAAA;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,UAA+C,EAAE;IACzE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAA;IAEpC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACrD,KAAK,EAAE;YACL,QAAQ,EAAE,SAAS;YACnB,WAAW,EAAE,gEAAgE;SAC9E;QACD,KAAK,EAAE;YACL,cAAc,EAAE;gBACd,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;oBAClB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KA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;QAClE,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,WAAW,EAAE,IAAI;YAAE,OAAO,IAAI,CAAA;QAEpD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACtC,UAAU;YACV,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE;YAC7E,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;YACR,cAAc,EAAE,IAAI;YACpB,GAAG;SACJ,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAwC,CAAA;QAC7D,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAA;QAExB,MAAM,IAAI,eAAe,CAAC;YACxB,UAAU;YACV,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;SACvF,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Field, Where } from 'payload';
|
|
2
|
+
export declare function unlistedField(options?: {
|
|
3
|
+
description?: string;
|
|
4
|
+
}): Field;
|
|
5
|
+
/**
|
|
6
|
+
* The constraint every automatic list carries.
|
|
7
|
+
*
|
|
8
|
+
* `not_equals` rather than `equals: false`: the Postgres adapter reads it as
|
|
9
|
+
* `IS NULL OR <> true`, so a row written before the column existed counts as
|
|
10
|
+
* listed rather than vanishing.
|
|
11
|
+
*/
|
|
12
|
+
export declare const LISTED: Where;
|
|
13
|
+
//# sourceMappingURL=unlisted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unlisted.d.ts","sourceRoot":"","sources":["../../src/fields/unlisted.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAe3C,wBAAgB,aAAa,CAAC,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,KAAK,CAa3E;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,EAAE,KAA0C,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
A document that is live at its URL and absent from every automatic list. From
|
|
3
|
+
forumone-2026's `fields/unlisted.ts`, where the case was a conference: an
|
|
4
|
+
article written for the people in one room, handed out as a link, that would be
|
|
5
|
+
noise at the top of the site's listings.
|
|
6
|
+
|
|
7
|
+
**It is not `meta.noIndex`**, and the two are deliberately independent. That is
|
|
8
|
+
about search engines; this is about the site's own lists. A host applies
|
|
9
|
+
`LISTED` to every query that *chooses* documents (archives, listing blocks in
|
|
10
|
+
query mode, related content, feeds) and leaves it off a list an editor filled
|
|
11
|
+
by hand, because picking a document by name is a decision this flag must not
|
|
12
|
+
overrule.
|
|
13
|
+
*/
|
|
14
|
+
export function unlistedField(options = {}) {
|
|
15
|
+
return {
|
|
16
|
+
name: 'unlisted',
|
|
17
|
+
type: 'checkbox',
|
|
18
|
+
label: 'Hide from listings',
|
|
19
|
+
defaultValue: false,
|
|
20
|
+
admin: {
|
|
21
|
+
position: 'sidebar',
|
|
22
|
+
description: options.description ??
|
|
23
|
+
'Live at its URL, but left out of listings, related content and feeds. Search engines still see it unless it is also hidden from them.',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The constraint every automatic list carries.
|
|
29
|
+
*
|
|
30
|
+
* `not_equals` rather than `equals: false`: the Postgres adapter reads it as
|
|
31
|
+
* `IS NULL OR <> true`, so a row written before the column existed counts as
|
|
32
|
+
* listed rather than vanishing.
|
|
33
|
+
*/
|
|
34
|
+
export const LISTED = { unlisted: { not_equals: true } };
|
|
35
|
+
//# sourceMappingURL=unlisted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unlisted.js","sourceRoot":"","sources":["../../src/fields/unlisted.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;EAYE;AACF,MAAM,UAAU,aAAa,CAAC,UAAoC,EAAE;IAClE,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,oBAAoB;QAC3B,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE;YACL,QAAQ,EAAE,SAAS;YACnB,WAAW,EACT,OAAO,CAAC,WAAW;gBACnB,uIAAuI;SAC1I;KACF,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAU,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CollectionSlug, Field, FieldAccess } from 'payload';
|
|
2
|
+
export declare function usedBy(options: {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
collection: CollectionSlug;
|
|
6
|
+
/** The relationship field on `collection` that points here. */
|
|
7
|
+
on: string;
|
|
8
|
+
defaultColumns: string[];
|
|
9
|
+
/** Who may read the list. Default: anyone signed in. */
|
|
10
|
+
read?: FieldAccess;
|
|
11
|
+
}): Field;
|
|
12
|
+
//# sourceMappingURL=usedBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usedBy.d.ts","sourceRoot":"","sources":["../../src/fields/usedBy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAuBjE,wBAAgB,MAAM,CAAC,OAAO,EAAE;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,cAAc,CAAA;IAC1B,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAA;IACV,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,wDAAwD;IACxD,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,GAAG,KAAK,CAeR"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
"Where is this used?" for the collections other documents point at. From
|
|
3
|
+
forumone-2026's `fields/usedBy.ts`.
|
|
4
|
+
|
|
5
|
+
A join field is a read-only list, on the document being pointed at, of the
|
|
6
|
+
documents that point at it through a relationship: a person's articles, a
|
|
7
|
+
client's case studies. It is virtual (no column, no migration, nothing to keep
|
|
8
|
+
in sync) because it is a query over the relationship that already exists.
|
|
9
|
+
|
|
10
|
+
What it cannot see is a reference inside a block, which has no relationship row
|
|
11
|
+
to join. `findReferences` scans for those.
|
|
12
|
+
|
|
13
|
+
**Keep it admin-only in cost as well as in sight.** `access.read` is signed-in
|
|
14
|
+
by default, so a public read never returns the lists. And the owning
|
|
15
|
+
collection's `defaultPopulate` should exclude every join field, and render-path
|
|
16
|
+
reads pass `joins: false`; otherwise Postgres builds each join as a subquery on
|
|
17
|
+
every populated document.
|
|
18
|
+
*/
|
|
19
|
+
const signedIn = ({ req }) => Boolean(req.user);
|
|
20
|
+
export function usedBy(options) {
|
|
21
|
+
return {
|
|
22
|
+
name: options.name,
|
|
23
|
+
type: 'join',
|
|
24
|
+
label: options.label,
|
|
25
|
+
collection: options.collection,
|
|
26
|
+
on: options.on,
|
|
27
|
+
defaultLimit: 10,
|
|
28
|
+
defaultSort: '-updatedAt',
|
|
29
|
+
access: { read: options.read ?? signedIn },
|
|
30
|
+
admin: {
|
|
31
|
+
allowCreate: false,
|
|
32
|
+
defaultColumns: options.defaultColumns,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=usedBy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usedBy.js","sourceRoot":"","sources":["../../src/fields/usedBy.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;EAiBE;AAEF,MAAM,QAAQ,GAAgB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAE5D,MAAM,UAAU,MAAM,CAAC,OAStB;IACC,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,YAAY;QACzB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,QAAQ,EAAE;QAC1C,KAAK,EAAE;YACL,WAAW,EAAE,KAAK;YAClB,cAAc,EAAE,OAAO,CAAC,cAAc;SACvC;KACF,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { EnvironmentError, assertEnvironment, checkEnvValue } from './env/index.js';
|
|
2
|
+
export type { EnvValueProblem, EnvironmentCheck } from './env/index.js';
|
|
3
|
+
export { MCP_API_KEYS_SLUG, McpMetaSchema, auditContext, deniedEnvelope, isMcpApiKeyPrincipal, isSignedIn, mcpApiKeyAccess, signedIn, withMeta, } from './mcp/index.js';
|
|
4
|
+
export type { AuditContextFields, McpMeta } from './mcp/index.js';
|
|
5
|
+
export { createMcpToolCollector, toPayloadMcpTool, toPayloadMcpTools } from './mcp/index.js';
|
|
6
|
+
export type { AddToolsOptions, CreateMcpToolCollectorOptions, DeclareToolsOptions, McpToolCollector, McpToolDescriptor, PayloadMcpRequest, PayloadMcpTool, ToPayloadMcpToolOptions, } from './mcp/index.js';
|
|
7
|
+
export { defaultLogger, createNamedLogger } from './logger/index.js';
|
|
8
|
+
export { LOCKED_DOCUMENTS_SLUG, hardenCoreCollections } from './access/coreCollections.js';
|
|
9
|
+
export type { HardenCoreCollectionsOptions } from './access/coreCollections.js';
|
|
10
|
+
export { documentContentHash, formatZodIssues, sha256Hex, unwrapRelationshipId, } from './utils/index.js';
|
|
11
|
+
export type { DocumentContentHashOptions } from './utils/index.js';
|
|
12
|
+
export type { AuthenticatedUser, BaseCorePluginOptions, CollectionPluginOptions, CorePlugin, EnvRequirement, Logger, McpToolContext, McpToolDefinition, PluginAdminGroup, PluginAdminOptions, } from './plugin-contract/index.js';
|
|
13
|
+
/**
|
|
14
|
+
* @internal The plugin registry and admin-group helpers. Public only while
|
|
15
|
+
* plugins still ship as separate packages that need them; `throughline()`
|
|
16
|
+
* owns the registration order once they have all moved in.
|
|
17
|
+
*/
|
|
18
|
+
export { DEFAULT_ADMIN_GROUP, getPluginRegistry, resolveAdminGroup, } from './plugin-contract/index.js';
|
|
19
|
+
/** @internal See `getPluginRegistry`. */
|
|
20
|
+
export type { PluginRegistry, PluginRegistryEntry } from './plugin-contract/index.js';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnF,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAGvE,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,eAAe,EACf,QAAQ,EACR,QAAQ,GACT,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAGjE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAC5F,YAAY,EACV,eAAe,EACf,6BAA6B,EAC7B,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,GACxB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEpE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAC1F,YAAY,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,oBAAoB,GACrB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAA;AAGlE,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,4BAA4B,CAAA;AAEnC;;;;GAIG;AACH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,4BAA4B,CAAA;AACnC,yCAAyC;AACzC,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// `@forumone/throughline`: what every part of the suite shares. Each plugin
|
|
2
|
+
// lives on its own subpath (`/audit`, `/media`, `/fields`, `/observability`,
|
|
3
|
+
// …); docs/spec/1.0-exports.md maps every 0.x import to its 1.0 one.
|
|
4
|
+
export { EnvironmentError, assertEnvironment, checkEnvValue } from './env/index.js';
|
|
5
|
+
// What a site needs to write an MCP tool of its own.
|
|
6
|
+
export { MCP_API_KEYS_SLUG, McpMetaSchema, auditContext, deniedEnvelope, isMcpApiKeyPrincipal, isSignedIn, mcpApiKeyAccess, signedIn, withMeta, } from './mcp/index.js';
|
|
7
|
+
// The collector, until `throughline()` wires it and it becomes internal.
|
|
8
|
+
export { createMcpToolCollector, toPayloadMcpTool, toPayloadMcpTools } from './mcp/index.js';
|
|
9
|
+
export { defaultLogger, createNamedLogger } from './logger/index.js';
|
|
10
|
+
export { LOCKED_DOCUMENTS_SLUG, hardenCoreCollections } from './access/coreCollections.js';
|
|
11
|
+
export { documentContentHash, formatZodIssues, sha256Hex, unwrapRelationshipId, } from './utils/index.js';
|
|
12
|
+
/**
|
|
13
|
+
* @internal The plugin registry and admin-group helpers. Public only while
|
|
14
|
+
* plugins still ship as separate packages that need them; `throughline()`
|
|
15
|
+
* owns the registration order once they have all moved in.
|
|
16
|
+
*/
|
|
17
|
+
export { DEFAULT_ADMIN_GROUP, getPluginRegistry, resolveAdminGroup, } from './plugin-contract/index.js';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,6EAA6E;AAC7E,qEAAqE;AAErE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAGnF,qDAAqD;AACrD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,eAAe,EACf,QAAQ,EACR,QAAQ,GACT,MAAM,gBAAgB,CAAA;AAGvB,yEAAyE;AACzE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAY5F,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEpE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAG1F,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,oBAAoB,GACrB,MAAM,kBAAkB,CAAA;AAiBzB;;;;GAIG;AACH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ThroughlineSyncButtonProps {
|
|
3
|
+
/** Slug the integrations collection is mounted at. Injected via `clientProps`. */
|
|
4
|
+
collectionSlug?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* "Sync now", in the sidebar beside the status fields it moves.
|
|
8
|
+
*
|
|
9
|
+
* Everything behind this button already existed — the `integration/manual-sync`
|
|
10
|
+
* event, a handler on every integration, the status fields, the audit rows —
|
|
11
|
+
* and reaching it meant an MCP round trip with a minted API key or a hand-sent
|
|
12
|
+
* event in the Inngest dashboard. Neither is available to the person who has
|
|
13
|
+
* just fixed a job posting and wants to see it on the site before the next
|
|
14
|
+
* hourly cron.
|
|
15
|
+
*
|
|
16
|
+
* It fires an event; it does not wait for the sync. So the button says the run
|
|
17
|
+
* was *queued*, then watches `lastSyncAt` for the two minutes a sync normally
|
|
18
|
+
* takes and reports the outcome when it moves. Stopping watching is not the
|
|
19
|
+
* same as failing, and the copy says so — the run continues either way.
|
|
20
|
+
*
|
|
21
|
+
* The form is deliberately untouched. Writing the new status into form state
|
|
22
|
+
* would put server values into a document the editor may not have saved, so
|
|
23
|
+
* the result is rendered here instead and the sidebar fields catch up on the
|
|
24
|
+
* next load.
|
|
25
|
+
*/
|
|
26
|
+
export declare function SyncButton(props?: ThroughlineSyncButtonProps): React.ReactNode;
|
|
27
|
+
//# sourceMappingURL=SyncButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyncButton.d.ts","sourceRoot":"","sources":["../../../src/integrations/admin/SyncButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAWvE,MAAM,WAAW,0BAA0B;IACzC,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAQD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,KAAK,GAAE,0BAA+B,GAAG,KAAK,CAAC,SAAS,CAyHlF"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { Button, FieldLabel, toast, useAuth, useConfig, useDocumentInfo } from '@payloadcms/ui';
|
|
5
|
+
import { describeSyncOutcome, fetchSyncStatus, formatSyncTime, syncHasFinished, triggerSync, } from './sync-client.js';
|
|
6
|
+
/** How long to watch for the run to finish before saying so and stopping. */
|
|
7
|
+
const POLL_INTERVAL_MS = 3_000;
|
|
8
|
+
const POLL_TIMEOUT_MS = 120_000;
|
|
9
|
+
/**
|
|
10
|
+
* "Sync now", in the sidebar beside the status fields it moves.
|
|
11
|
+
*
|
|
12
|
+
* Everything behind this button already existed — the `integration/manual-sync`
|
|
13
|
+
* event, a handler on every integration, the status fields, the audit rows —
|
|
14
|
+
* and reaching it meant an MCP round trip with a minted API key or a hand-sent
|
|
15
|
+
* event in the Inngest dashboard. Neither is available to the person who has
|
|
16
|
+
* just fixed a job posting and wants to see it on the site before the next
|
|
17
|
+
* hourly cron.
|
|
18
|
+
*
|
|
19
|
+
* It fires an event; it does not wait for the sync. So the button says the run
|
|
20
|
+
* was *queued*, then watches `lastSyncAt` for the two minutes a sync normally
|
|
21
|
+
* takes and reports the outcome when it moves. Stopping watching is not the
|
|
22
|
+
* same as failing, and the copy says so — the run continues either way.
|
|
23
|
+
*
|
|
24
|
+
* The form is deliberately untouched. Writing the new status into form state
|
|
25
|
+
* would put server values into a document the editor may not have saved, so
|
|
26
|
+
* the result is rendered here instead and the sidebar fields catch up on the
|
|
27
|
+
* next load.
|
|
28
|
+
*/
|
|
29
|
+
export function SyncButton(props = {}) {
|
|
30
|
+
const collectionSlug = props.collectionSlug ?? 'integrations';
|
|
31
|
+
const { id, data } = useDocumentInfo();
|
|
32
|
+
const { config } = useConfig();
|
|
33
|
+
const { user } = useAuth();
|
|
34
|
+
const [phase, setPhase] = useState('idle');
|
|
35
|
+
const [baseline, setBaseline] = useState(null);
|
|
36
|
+
const [outcome, setOutcome] = useState(null);
|
|
37
|
+
const [gaveUpWaiting, setGaveUpWaiting] = useState(false);
|
|
38
|
+
const { api } = config.routes;
|
|
39
|
+
const serverURL = config.serverURL ?? '';
|
|
40
|
+
const instanceName = typeof data?.['name'] === 'string' ? data['name'] : undefined;
|
|
41
|
+
const enabled = data?.['enabled'] === true;
|
|
42
|
+
const roles = user?.['roles'];
|
|
43
|
+
const isAdmin = Array.isArray(roles) && roles.includes('admin');
|
|
44
|
+
// Read inside the poll effect, which must not restart every time the name
|
|
45
|
+
// changes — a restarted effect is a restarted timeout.
|
|
46
|
+
const instanceNameRef = useRef(instanceName);
|
|
47
|
+
instanceNameRef.current = instanceName;
|
|
48
|
+
const start = useCallback(async () => {
|
|
49
|
+
if (id === undefined || id === null || phase !== 'idle')
|
|
50
|
+
return;
|
|
51
|
+
setPhase('triggering');
|
|
52
|
+
setOutcome(null);
|
|
53
|
+
setGaveUpWaiting(false);
|
|
54
|
+
const result = await triggerSync({ serverURL, apiRoute: api, collectionSlug, id });
|
|
55
|
+
if (!result.ok) {
|
|
56
|
+
toast.error(result.message);
|
|
57
|
+
setPhase('idle');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
toast.success(result.body.message ?? 'Sync queued.');
|
|
61
|
+
setBaseline(result.body.lastSyncAt ?? null);
|
|
62
|
+
setPhase('waiting');
|
|
63
|
+
}, [api, collectionSlug, id, phase, serverURL]);
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (phase !== 'waiting' || id === undefined || id === null)
|
|
66
|
+
return;
|
|
67
|
+
const controller = new AbortController();
|
|
68
|
+
let timer;
|
|
69
|
+
const deadline = Date.now() + POLL_TIMEOUT_MS;
|
|
70
|
+
const poll = async () => {
|
|
71
|
+
const status = await fetchSyncStatus({
|
|
72
|
+
serverURL,
|
|
73
|
+
apiRoute: api,
|
|
74
|
+
collectionSlug,
|
|
75
|
+
id,
|
|
76
|
+
signal: controller.signal,
|
|
77
|
+
});
|
|
78
|
+
if (controller.signal.aborted)
|
|
79
|
+
return;
|
|
80
|
+
if (status && syncHasFinished(baseline, status)) {
|
|
81
|
+
setOutcome(status);
|
|
82
|
+
setPhase('idle');
|
|
83
|
+
const described = describeSyncOutcome(status, instanceNameRef.current);
|
|
84
|
+
const options = described.description ? { description: described.description } : {};
|
|
85
|
+
if (described.severity === 'success')
|
|
86
|
+
toast.success(described.title, options);
|
|
87
|
+
else if (described.severity === 'warning')
|
|
88
|
+
toast.warning(described.title, options);
|
|
89
|
+
else
|
|
90
|
+
toast.error(described.title, { ...options, duration: 10_000 });
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (Date.now() >= deadline) {
|
|
94
|
+
setGaveUpWaiting(true);
|
|
95
|
+
setPhase('idle');
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
timer = setTimeout(() => void poll(), POLL_INTERVAL_MS);
|
|
99
|
+
};
|
|
100
|
+
timer = setTimeout(() => void poll(), POLL_INTERVAL_MS);
|
|
101
|
+
return () => {
|
|
102
|
+
controller.abort();
|
|
103
|
+
if (timer)
|
|
104
|
+
clearTimeout(timer);
|
|
105
|
+
};
|
|
106
|
+
}, [api, baseline, collectionSlug, id, phase, serverURL]);
|
|
107
|
+
// Create view: no instance to sync, and no id to sync it by.
|
|
108
|
+
if (id === undefined || id === null)
|
|
109
|
+
return null;
|
|
110
|
+
// The endpoint refuses a non-admin anyway; not rendering the control is how
|
|
111
|
+
// an editor finds that out without pressing it.
|
|
112
|
+
if (!isAdmin)
|
|
113
|
+
return null;
|
|
114
|
+
const label = phase === 'idle' ? 'Sync now' : phase === 'triggering' ? 'Queueing…' : 'Syncing…';
|
|
115
|
+
return (_jsxs("div", { className: "field-type throughline-integration-sync", children: [_jsx(FieldLabel, { as: "span", label: "Manual sync" }), _jsx(Button, { buttonStyle: "secondary", disabled: !enabled || phase !== 'idle', onClick: () => {
|
|
116
|
+
void start();
|
|
117
|
+
}, size: "small", type: "button", ...(enabled ? {} : { tooltip: 'Enable this integration first.' }), children: label }), _jsx("p", { "aria-live": "polite", className: "field-description", children: state({ enabled, gaveUpWaiting, outcome, phase }) })] }));
|
|
118
|
+
}
|
|
119
|
+
/** The line under the button. Pure, so the copy can be read in one place. */
|
|
120
|
+
function state(args) {
|
|
121
|
+
if (!args.enabled)
|
|
122
|
+
return 'Disabled integrations cannot be synced. Enable and save first.';
|
|
123
|
+
if (args.phase === 'triggering')
|
|
124
|
+
return 'Asking the queue to run this integration…';
|
|
125
|
+
if (args.phase === 'waiting')
|
|
126
|
+
return 'Queued. Watching for the run to finish.';
|
|
127
|
+
if (args.gaveUpWaiting) {
|
|
128
|
+
return 'Still running after two minutes. It has not failed — reload to see the result.';
|
|
129
|
+
}
|
|
130
|
+
if (args.outcome)
|
|
131
|
+
return `Finished at ${formatSyncTime(args.outcome.lastSyncAt)}.`;
|
|
132
|
+
return 'Runs this integration now, instead of waiting for its schedule.';
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=SyncButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyncButton.js","sourceRoot":"","sources":["../../../src/integrations/admin/SyncButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC/F,OAAO,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