@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,142 @@
|
|
|
1
|
+
import { couldReference, referencesIn } from './walk.js';
|
|
2
|
+
const LABEL_FIELDS = ['title', 'name', 'slug', 'heading'];
|
|
3
|
+
function labelOf(doc) {
|
|
4
|
+
for (const key of LABEL_FIELDS) {
|
|
5
|
+
const value = doc[key];
|
|
6
|
+
if (typeof value === 'string' && value.trim() !== '')
|
|
7
|
+
return value;
|
|
8
|
+
}
|
|
9
|
+
return `#${String(doc['id'])}`;
|
|
10
|
+
}
|
|
11
|
+
/** The config's block registry plus any extras, by slug. */
|
|
12
|
+
export function blockRegistry(payload, extra = []) {
|
|
13
|
+
const registry = new Map();
|
|
14
|
+
const configured = payload.config.blocks ?? [];
|
|
15
|
+
for (const block of [...configured, ...extra])
|
|
16
|
+
registry.set(block.slug, block);
|
|
17
|
+
return registry;
|
|
18
|
+
}
|
|
19
|
+
/** Every row and global that could reference `target`, published and draft. */
|
|
20
|
+
async function eachSource(payload, target, req, visit) {
|
|
21
|
+
for (const collection of payload.config.collections) {
|
|
22
|
+
if (!couldReference(collection.fields, target))
|
|
23
|
+
continue;
|
|
24
|
+
const passes = collection.versions ? [false, true] : [false];
|
|
25
|
+
for (const draft of passes) {
|
|
26
|
+
const result = await payload.find({
|
|
27
|
+
collection: collection.slug,
|
|
28
|
+
depth: 0,
|
|
29
|
+
// Join fields would add a subquery per row, and the walk reads only
|
|
30
|
+
// stored fields. Typed per collection, hence the cast.
|
|
31
|
+
joins: false,
|
|
32
|
+
limit: 0,
|
|
33
|
+
pagination: false,
|
|
34
|
+
overrideAccess: true,
|
|
35
|
+
...(draft ? { draft: true } : {}),
|
|
36
|
+
...(req ? { req } : {}),
|
|
37
|
+
});
|
|
38
|
+
for (const doc of result.docs) {
|
|
39
|
+
visit({
|
|
40
|
+
collection: collection.slug,
|
|
41
|
+
id: doc['id'],
|
|
42
|
+
label: labelOf(doc),
|
|
43
|
+
fields: collection.fields,
|
|
44
|
+
data: doc,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
for (const global of payload.config.globals) {
|
|
50
|
+
if (!couldReference(global.fields, target))
|
|
51
|
+
continue;
|
|
52
|
+
const data = (await payload.findGlobal({
|
|
53
|
+
slug: global.slug,
|
|
54
|
+
depth: 0,
|
|
55
|
+
overrideAccess: true,
|
|
56
|
+
...(req ? { req } : {}),
|
|
57
|
+
}));
|
|
58
|
+
const label = typeof global.label === 'string' ? global.label : global.slug;
|
|
59
|
+
visit({
|
|
60
|
+
collection: global.slug,
|
|
61
|
+
id: global.slug,
|
|
62
|
+
label,
|
|
63
|
+
fields: global.fields,
|
|
64
|
+
data,
|
|
65
|
+
global: true,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Every document and global that references `collection`'s document `id`,
|
|
71
|
+
* merged across the published and draft states.
|
|
72
|
+
*/
|
|
73
|
+
export async function findReferences(payload, target, options = {}) {
|
|
74
|
+
const blocks = blockRegistry(payload, options.blocks);
|
|
75
|
+
const found = new Map();
|
|
76
|
+
await eachSource(payload, target.collection, options.req, (source) => {
|
|
77
|
+
// The document itself is not a reference to itself.
|
|
78
|
+
if (!source.global &&
|
|
79
|
+
source.collection === target.collection &&
|
|
80
|
+
String(source.id) === String(target.id)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const references = referencesIn(source.fields, source.data, {
|
|
84
|
+
collection: target.collection,
|
|
85
|
+
blocks,
|
|
86
|
+
}).filter((reference) => String(reference.id) === String(target.id));
|
|
87
|
+
if (references.length === 0)
|
|
88
|
+
return;
|
|
89
|
+
const key = `${source.global ? 'global' : 'collection'}:${source.collection}:${String(source.id)}`;
|
|
90
|
+
const existing = found.get(key);
|
|
91
|
+
if (existing) {
|
|
92
|
+
// Seen as published and as draft: keep the union of paths.
|
|
93
|
+
const seen = new Set(existing.references.map((r) => r.path));
|
|
94
|
+
for (const reference of references) {
|
|
95
|
+
if (!seen.has(reference.path))
|
|
96
|
+
existing.references.push(reference);
|
|
97
|
+
}
|
|
98
|
+
existing.viaBlock ||= references.some((r) => r.viaBlock);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
found.set(key, {
|
|
102
|
+
collection: source.collection,
|
|
103
|
+
id: source.id,
|
|
104
|
+
label: source.label,
|
|
105
|
+
references,
|
|
106
|
+
viaBlock: references.some((r) => r.viaBlock),
|
|
107
|
+
...(source.global ? { global: true } : {}),
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
return [...found.values()];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Every id in `collection` that anything references, from one read of the
|
|
114
|
+
* whole config. For a caller that needs the answer for a whole library at once
|
|
115
|
+
* (an "unused media" report) rather than one scan per document. Ids are
|
|
116
|
+
* strings, since a JSON block and a relationship column disagree on whether an
|
|
117
|
+
* id is a number.
|
|
118
|
+
*/
|
|
119
|
+
export async function findReferencedIds(payload, collection, options = {}) {
|
|
120
|
+
const blocks = blockRegistry(payload, options.blocks);
|
|
121
|
+
const used = new Set();
|
|
122
|
+
await eachSource(payload, collection, options.req, (source) => {
|
|
123
|
+
for (const reference of referencesIn(source.fields, source.data, { collection, blocks })) {
|
|
124
|
+
const id = String(reference.id);
|
|
125
|
+
// A document naming itself does not make it used.
|
|
126
|
+
if (!source.global && source.collection === collection && id === String(source.id))
|
|
127
|
+
continue;
|
|
128
|
+
used.add(id);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
return used;
|
|
132
|
+
}
|
|
133
|
+
/** One line per document: `pages › Homepage (layout[2] › ImageHero › image)`. */
|
|
134
|
+
export function describeReferences(found, limit = 5) {
|
|
135
|
+
const lines = found.map((entry) => {
|
|
136
|
+
const where = entry.references[0]?.path;
|
|
137
|
+
return `• ${entry.collection} › ${entry.label}${where ? ` (${where})` : ''}`;
|
|
138
|
+
});
|
|
139
|
+
const named = lines.slice(0, limit).join('\n');
|
|
140
|
+
return lines.length > limit ? `${named}\n…and ${lines.length - limit} more.` : named;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/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AAE,EAAE,CAAA;IAC9E,CAAC,CAAC,CAAA;IACF,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC9C,OAAO,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,UAAU,KAAK,CAAC,MAAM,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAA;AACtF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Block, type CollectionBeforeChangeHook, type CollectionBeforeDeleteHook, type CollectionSlug } from 'payload';
|
|
2
|
+
import { type DocumentReferences } from './find.js';
|
|
3
|
+
export interface ReferenceGuardOptions {
|
|
4
|
+
/** What the document is called in the message: "file", "person", "term". Default "document". */
|
|
5
|
+
noun?: string;
|
|
6
|
+
/**
|
|
7
|
+
* What deleting it would do to the documents that use it, appended to the
|
|
8
|
+
* refusal: "deleting it now would untag them without saying so".
|
|
9
|
+
*/
|
|
10
|
+
consequence?: string;
|
|
11
|
+
/** Blocks beyond the config's registry. See `FindReferencesOptions.blocks`. */
|
|
12
|
+
blocks?: readonly Block[];
|
|
13
|
+
}
|
|
14
|
+
type Verb = 'delete' | 'move to the trash';
|
|
15
|
+
/** The refusal an editor reads. Exported so a host can show the same words elsewhere. */
|
|
16
|
+
export declare function referenceRefusal(found: readonly DocumentReferences[], options?: {
|
|
17
|
+
noun?: string;
|
|
18
|
+
verb?: Verb;
|
|
19
|
+
consequence?: string;
|
|
20
|
+
}): string;
|
|
21
|
+
/** Whether this write puts the document in the trash: `deletedAt` set now and not before. */
|
|
22
|
+
export declare function movesToTrash(data: unknown, originalDoc: unknown): boolean;
|
|
23
|
+
/** `beforeDelete`: refuse while anything references the document. */
|
|
24
|
+
export declare function refuseDeleteWhileReferenced(collection: CollectionSlug, options?: ReferenceGuardOptions): CollectionBeforeDeleteHook;
|
|
25
|
+
/**
|
|
26
|
+
* `beforeChange`: refuse a write that moves the document to the trash while
|
|
27
|
+
* anything references it. Every other write passes untouched and costs
|
|
28
|
+
* nothing, since the scan reads the whole config.
|
|
29
|
+
*/
|
|
30
|
+
export declare function refuseTrashWhileReferenced(collection: CollectionSlug, options?: ReferenceGuardOptions): CollectionBeforeChangeHook;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=guards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../src/references/guards.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EAEpB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAsC,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAA;AA2BvF,MAAM,WAAW,qBAAqB;IACpC,gGAAgG;IAChG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,SAAS,KAAK,EAAE,CAAA;CAC1B;AAED,KAAK,IAAI,GAAG,QAAQ,GAAG,mBAAmB,CAAA;AAE1C,yFAAyF;AACzF,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GACjE,MAAM,CAmBR;AAsDD,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAIzE;AAED,qEAAqE;AACrE,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,cAAc,EAC1B,OAAO,GAAE,qBAA0B,GAClC,0BAA0B,CAE5B;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,cAAc,EAC1B,OAAO,GAAE,qBAA0B,GAClC,0BAA0B,CAQ5B"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { APIError, } from 'payload';
|
|
2
|
+
import { describeReferences, findReferences } from './find.js';
|
|
3
|
+
/** The refusal an editor reads. Exported so a host can show the same words elsewhere. */
|
|
4
|
+
export function referenceRefusal(found, options = {}) {
|
|
5
|
+
const noun = options.noun ?? 'document';
|
|
6
|
+
const verb = options.verb ?? 'delete';
|
|
7
|
+
const count = found.length;
|
|
8
|
+
const then = verb === 'delete' ? 'delete it' : 'move it to the trash';
|
|
9
|
+
const consequence = options.consequence ? ` — ${options.consequence}` : '';
|
|
10
|
+
/*
|
|
11
|
+
Block references are called out because they are the half nothing else would
|
|
12
|
+
have said: a field reference at least shows as an empty control afterwards,
|
|
13
|
+
where a block reference renders nothing at all.
|
|
14
|
+
*/
|
|
15
|
+
const blocks = found.filter((entry) => entry.viaBlock).length;
|
|
16
|
+
const note = blocks > 0
|
|
17
|
+
? `\n\n${blocks} of these use it inside a block, where nothing would have warned you and it would simply have stopped appearing.`
|
|
18
|
+
: '';
|
|
19
|
+
return `This ${noun} is still used by ${count} document${count === 1 ? '' : 's'}. Remove it there first, then ${then}${consequence}.\n\n${describeReferences(found)}${note}`;
|
|
20
|
+
}
|
|
21
|
+
async function refuseIfReferenced(req, collection, id, verb, options) {
|
|
22
|
+
const noun = options.noun ?? 'document';
|
|
23
|
+
let found;
|
|
24
|
+
try {
|
|
25
|
+
found = await findReferences(req.payload, { collection, id }, {
|
|
26
|
+
req,
|
|
27
|
+
...(options.blocks ? { blocks: options.blocks } : {}),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
req.payload.logger.error({ event: 'references.scan-failed', collection, id, err: error }, `Could not check whether this ${noun} is in use; refusing to ${verb} it`);
|
|
32
|
+
throw new APIError(`Could not check whether this ${noun} is still in use, so nothing has changed. Try again; if it keeps happening, this needs a developer.`, 500);
|
|
33
|
+
}
|
|
34
|
+
if (found.length === 0)
|
|
35
|
+
return;
|
|
36
|
+
req.payload.logger.info({
|
|
37
|
+
event: 'references.refused',
|
|
38
|
+
collection,
|
|
39
|
+
id,
|
|
40
|
+
verb,
|
|
41
|
+
documents: found.map((entry) => `${entry.collection}:${String(entry.id)}`),
|
|
42
|
+
}, `Refused to ${verb} a ${noun} that is still referenced`);
|
|
43
|
+
// 400: answerable, and the caller can fix it, which is what the list is for.
|
|
44
|
+
throw new APIError(referenceRefusal(found, {
|
|
45
|
+
noun,
|
|
46
|
+
verb,
|
|
47
|
+
...(options.consequence ? { consequence: options.consequence } : {}),
|
|
48
|
+
}), 400);
|
|
49
|
+
}
|
|
50
|
+
/** Whether this write puts the document in the trash: `deletedAt` set now and not before. */
|
|
51
|
+
export function movesToTrash(data, originalDoc) {
|
|
52
|
+
const next = data?.['deletedAt'];
|
|
53
|
+
const previous = originalDoc?.['deletedAt'];
|
|
54
|
+
return next !== null && next !== undefined && (previous === null || previous === undefined);
|
|
55
|
+
}
|
|
56
|
+
/** `beforeDelete`: refuse while anything references the document. */
|
|
57
|
+
export function refuseDeleteWhileReferenced(collection, options = {}) {
|
|
58
|
+
return async ({ req, id }) => refuseIfReferenced(req, collection, id, 'delete', options);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* `beforeChange`: refuse a write that moves the document to the trash while
|
|
62
|
+
* anything references it. Every other write passes untouched and costs
|
|
63
|
+
* nothing, since the scan reads the whole config.
|
|
64
|
+
*/
|
|
65
|
+
export function refuseTrashWhileReferenced(collection, options = {}) {
|
|
66
|
+
return async ({ data, originalDoc, operation, req }) => {
|
|
67
|
+
if (operation !== 'update' || !movesToTrash(data, originalDoc))
|
|
68
|
+
return data;
|
|
69
|
+
const id = originalDoc?.id;
|
|
70
|
+
if (id === undefined)
|
|
71
|
+
return data;
|
|
72
|
+
await refuseIfReferenced(req, collection, id, 'move to the trash', options);
|
|
73
|
+
return data;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=guards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/references/guards.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAMT,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAA2B,MAAM,WAAW,CAAA;AAyCvF,yFAAyF;AACzF,MAAM,UAAU,gBAAgB,CAC9B,KAAoC,EACpC,UAAgE,EAAE;IAElE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,UAAU,CAAA;IACvC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAA;IACrC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAA;IAC1B,MAAM,IAAI,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,sBAAsB,CAAA;IACrE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAE1E;;;;MAIE;IACF,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAA;IAC7D,MAAM,IAAI,GACR,MAAM,GAAG,CAAC;QACR,CAAC,CAAC,OAAO,MAAM,kHAAkH;QACjI,CAAC,CAAC,EAAE,CAAA;IAER,OAAO,QAAQ,IAAI,qBAAqB,KAAK,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,iCAAiC,IAAI,GAAG,WAAW,QAAQ,kBAAkB,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAA;AAC9K,CAAC;AAED,KAAK,U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,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { couldReference, pointsAt, referencesIn, referencesTo } from './walk.js';
|
|
2
|
+
export type { Reference, ReferencesInOptions } from './walk.js';
|
|
3
|
+
export { blockRegistry, describeReferences, findReferencedIds, findReferences } from './find.js';
|
|
4
|
+
export type { DocumentReferences, FindReferencesOptions } from './find.js';
|
|
5
|
+
export { movesToTrash, referenceRefusal, refuseDeleteWhileReferenced, refuseTrashWhileReferenced, } from './guards.js';
|
|
6
|
+
export type { ReferenceGuardOptions } from './guards.js';
|
|
7
|
+
export { REFERENCE_TOOLS, REFERENCE_TOOL_DESCRIPTORS, createCanDeleteTool, createFindReferencesTool, } from './tools.js';
|
|
8
|
+
export type { ReferenceToolDeps } from './tools.js';
|
|
9
|
+
export { USED_ON_FIELD, USED_ON_PANEL_PATH, referencesPlugin } from './plugin.js';
|
|
10
|
+
export type { ReferenceCollectionOptions, ReferencesPluginOptions } from './plugin.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/references/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAChF,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAE/D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAChG,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAE1E,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,YAAY,CAAA;AACnB,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACjF,YAAY,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { couldReference, pointsAt, referencesIn, referencesTo } from './walk.js';
|
|
2
|
+
export { blockRegistry, describeReferences, findReferencedIds, findReferences } from './find.js';
|
|
3
|
+
export { movesToTrash, referenceRefusal, refuseDeleteWhileReferenced, refuseTrashWhileReferenced, } from './guards.js';
|
|
4
|
+
export { REFERENCE_TOOLS, REFERENCE_TOOL_DESCRIPTORS, createCanDeleteTool, createFindReferencesTool, } from './tools.js';
|
|
5
|
+
export { USED_ON_FIELD, USED_ON_PANEL_PATH, referencesPlugin } from './plugin.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/references/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAGhF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAGhG,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,aAAa,CAAA;AAGpB,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,YAAY,CAAA;AAGnB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Block, Plugin } from 'payload';
|
|
2
|
+
import type { McpToolContext } from '../plugin-contract/index.js';
|
|
3
|
+
import type { McpToolCollector } from '../mcp/collector.js';
|
|
4
|
+
export interface ReferenceCollectionOptions {
|
|
5
|
+
/** The collection to guard: deletes and trashing are refused while anything references a document. */
|
|
6
|
+
slug: string;
|
|
7
|
+
/** What a document is called in the refusal: "file", "person", "term". */
|
|
8
|
+
noun?: string;
|
|
9
|
+
/** What deleting would do to the documents that use it, appended to the refusal. */
|
|
10
|
+
consequence?: string;
|
|
11
|
+
/** Add the "Used on" sidebar panel. Default `true`. */
|
|
12
|
+
panel?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ReferencesPluginOptions {
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
/** The collections to guard, and whether each gets the panel. */
|
|
17
|
+
collections: readonly ReferenceCollectionOptions[];
|
|
18
|
+
/**
|
|
19
|
+
* Blocks to resolve by slug beyond the config's `blocks` registry. A
|
|
20
|
+
* `blocks` field's own blocks are always used, so this is rarely needed.
|
|
21
|
+
*/
|
|
22
|
+
blocks?: readonly Block[];
|
|
23
|
+
/** Where `find_references` and `can_delete` go. Omit for no MCP tools. Must come before `mcpPlugin`. */
|
|
24
|
+
mcpTools?: McpToolCollector;
|
|
25
|
+
/** Who may call the tools. Default: a user with the `admin` or `editor` role. */
|
|
26
|
+
canUse?: (ctx: McpToolContext) => boolean;
|
|
27
|
+
}
|
|
28
|
+
/** The panel's import-map path. */
|
|
29
|
+
export declare const USED_ON_PANEL_PATH = "@forumone/throughline/rsc#UsedOnPanel";
|
|
30
|
+
/** The name of the panel's `ui` field. */
|
|
31
|
+
export declare const USED_ON_FIELD = "usedOn";
|
|
32
|
+
/**
|
|
33
|
+
* Reference tracking: what uses a document, refusing to delete or trash it
|
|
34
|
+
* while anything does, a "Used on" panel, and the `find_references` and
|
|
35
|
+
* `can_delete` MCP tools.
|
|
36
|
+
*
|
|
37
|
+
* Works with blocks stored as JSON, which Payload cannot query: see
|
|
38
|
+
* `references/find.ts` for how, and for what it costs.
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* referencesPlugin({
|
|
42
|
+
* collections: [
|
|
43
|
+
* { slug: 'media', noun: 'file' },
|
|
44
|
+
* { slug: 'people', noun: 'person', panel: false },
|
|
45
|
+
* ],
|
|
46
|
+
* mcpTools,
|
|
47
|
+
* })
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function referencesPlugin(options: ReferencesPluginOptions): Plugin;
|
|
51
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/references/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAmC,MAAM,EAAE,MAAM,SAAS,CAAA;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,6BAA6B,CAAA;AACpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAQ3D,MAAM,WAAW,0BAA0B;IACzC,sGAAsG;IACtG,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uDAAuD;IACvD,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iEAAiE;IACjE,WAAW,EAAE,SAAS,0BAA0B,EAAE,CAAA;IAClD;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,KAAK,EAAE,CAAA;IACzB,wGAAwG;IACxG,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,iFAAiF;IACjF,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAA;CAC1C;AAED,mCAAmC;AACnC,eAAO,MAAM,kBAAkB,0CAA0C,CAAA;AAEzE,0CAA0C;AAC1C,eAAO,MAAM,aAAa,WAAW,CAAA;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAkGzE"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { refuseDeleteWhileReferenced, refuseTrashWhileReferenced } from './guards.js';
|
|
2
|
+
import { REFERENCE_TOOL_DESCRIPTORS, createCanDeleteTool, createFindReferencesTool, } from './tools.js';
|
|
3
|
+
/** The panel's import-map path. */
|
|
4
|
+
export const USED_ON_PANEL_PATH = '@forumone/throughline/rsc#UsedOnPanel';
|
|
5
|
+
/** The name of the panel's `ui` field. */
|
|
6
|
+
export const USED_ON_FIELD = 'usedOn';
|
|
7
|
+
/**
|
|
8
|
+
* Reference tracking: what uses a document, refusing to delete or trash it
|
|
9
|
+
* while anything does, a "Used on" panel, and the `find_references` and
|
|
10
|
+
* `can_delete` MCP tools.
|
|
11
|
+
*
|
|
12
|
+
* Works with blocks stored as JSON, which Payload cannot query: see
|
|
13
|
+
* `references/find.ts` for how, and for what it costs.
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* referencesPlugin({
|
|
17
|
+
* collections: [
|
|
18
|
+
* { slug: 'media', noun: 'file' },
|
|
19
|
+
* { slug: 'people', noun: 'person', panel: false },
|
|
20
|
+
* ],
|
|
21
|
+
* mcpTools,
|
|
22
|
+
* })
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export function referencesPlugin(options) {
|
|
26
|
+
return (incoming) => {
|
|
27
|
+
if (options.enabled === false)
|
|
28
|
+
return incoming;
|
|
29
|
+
const bySlug = new Map(options.collections.map((entry) => [entry.slug, entry]));
|
|
30
|
+
const known = new Set((incoming.collections ?? []).map((collection) => collection.slug));
|
|
31
|
+
const missing = [...bySlug.keys()].filter((slug) => !known.has(slug));
|
|
32
|
+
if (missing.length > 0) {
|
|
33
|
+
throw new Error(`referencesPlugin: no collection ${missing.map((slug) => `"${slug}"`).join(', ')} in the config. ` +
|
|
34
|
+
`Register this plugin after the plugins that add collections it guards.`);
|
|
35
|
+
}
|
|
36
|
+
const collections = (incoming.collections ?? []).map((collection) => {
|
|
37
|
+
const entry = bySlug.get(collection.slug);
|
|
38
|
+
if (!entry)
|
|
39
|
+
return collection;
|
|
40
|
+
const guard = {
|
|
41
|
+
...(entry.noun ? { noun: entry.noun } : {}),
|
|
42
|
+
...(entry.consequence ? { consequence: entry.consequence } : {}),
|
|
43
|
+
...(options.blocks ? { blocks: options.blocks } : {}),
|
|
44
|
+
};
|
|
45
|
+
let fields = collection.fields;
|
|
46
|
+
if (entry.panel !== false) {
|
|
47
|
+
if (fields.some((field) => 'name' in field && field.name === USED_ON_FIELD)) {
|
|
48
|
+
throw new Error(`referencesPlugin: "${collection.slug}" already has a field named "${USED_ON_FIELD}". ` +
|
|
49
|
+
`Remove it, or pass panel: false.`);
|
|
50
|
+
}
|
|
51
|
+
/*
|
|
52
|
+
A `ui` field stores nothing. First, so it sits at the top of the
|
|
53
|
+
sidebar: an editor about to change an image needs to know it is on five
|
|
54
|
+
pages before they change it.
|
|
55
|
+
*/
|
|
56
|
+
const panel = {
|
|
57
|
+
name: USED_ON_FIELD,
|
|
58
|
+
type: 'ui',
|
|
59
|
+
admin: { position: 'sidebar', components: { Field: USED_ON_PANEL_PATH } },
|
|
60
|
+
...(options.blocks ? { custom: { references: { blocks: options.blocks } } } : {}),
|
|
61
|
+
};
|
|
62
|
+
fields = [panel, ...fields];
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
...collection,
|
|
66
|
+
fields,
|
|
67
|
+
hooks: {
|
|
68
|
+
...collection.hooks,
|
|
69
|
+
// First in each list, so a refusal happens before any other hook acts.
|
|
70
|
+
beforeChange: [
|
|
71
|
+
refuseTrashWhileReferenced(collection.slug, guard),
|
|
72
|
+
...(collection.hooks?.beforeChange ?? []),
|
|
73
|
+
],
|
|
74
|
+
beforeDelete: [
|
|
75
|
+
refuseDeleteWhileReferenced(collection.slug, guard),
|
|
76
|
+
...(collection.hooks?.beforeDelete ?? []),
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
// Declared at config time so `mcpPlugin` makes a checkbox per tool; bound at `onInit`.
|
|
82
|
+
options.mcpTools?.declare(REFERENCE_TOOL_DESCRIPTORS, { serverName: 'references' });
|
|
83
|
+
return {
|
|
84
|
+
...incoming,
|
|
85
|
+
collections,
|
|
86
|
+
onInit: async (payload) => {
|
|
87
|
+
if (incoming.onInit)
|
|
88
|
+
await incoming.onInit(payload);
|
|
89
|
+
if (!options.mcpTools)
|
|
90
|
+
return;
|
|
91
|
+
const deps = {
|
|
92
|
+
payload,
|
|
93
|
+
guarded: new Map(options.collections.map((entry) => [
|
|
94
|
+
entry.slug,
|
|
95
|
+
{
|
|
96
|
+
...(entry.noun ? { noun: entry.noun } : {}),
|
|
97
|
+
...(entry.consequence ? { consequence: entry.consequence } : {}),
|
|
98
|
+
},
|
|
99
|
+
])),
|
|
100
|
+
...(options.blocks ? { blocks: options.blocks } : {}),
|
|
101
|
+
...(options.canUse ? { canUse: options.canUse } : {}),
|
|
102
|
+
};
|
|
103
|
+
options.mcpTools.add([
|
|
104
|
+
createFindReferencesTool(deps),
|
|
105
|
+
createCanDeleteTool(deps),
|
|
106
|
+
], { serverName: 'references' });
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/references/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACrF,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,YAAY,CAAA;A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AW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;yBACjE;qBACF,CAAC,CACH;oBACD,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBACrD,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACtD,CAAA;gBACD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB;oBACE,wBAAwB,CAAC,IAAI,CAAC;oBAC9B,mBAAmB,CAAC,IAAI,CAAC;iBACQ,EACnC,EAAE,UAAU,EAAE,YAAY,EAAE,CAC7B,CAAA;YACH,CAAC;SACF,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Block, Payload } from 'payload';
|
|
3
|
+
import type { McpToolContext, McpToolDefinition } from '../plugin-contract/index.js';
|
|
4
|
+
import type { McpToolDescriptor } from '../mcp/collector.js';
|
|
5
|
+
export declare const REFERENCE_TOOLS: {
|
|
6
|
+
readonly findReferences: {
|
|
7
|
+
readonly name: "find_references";
|
|
8
|
+
readonly description: "Lists every document and global that references a document: an image, a person, a taxonomy term, or anything else that can be linked or embedded. Covers references inside blocks and rich text, which Payload itself cannot query, and both the published and draft state of each document. Use before replacing or deleting something shared, or to answer \"where is this used?\".";
|
|
9
|
+
};
|
|
10
|
+
readonly canDelete: {
|
|
11
|
+
readonly name: "can_delete";
|
|
12
|
+
readonly description: "Whether a document can be deleted or moved to the trash without breaking another document that uses it. Returns canDelete, and when false, the documents that still reference it and the message an editor would see. Deleting is refused while anything references a guarded document, so ask this first and remove the references before trying.";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const REFERENCE_TOOL_DESCRIPTORS: readonly McpToolDescriptor[];
|
|
16
|
+
export interface ReferenceToolDeps {
|
|
17
|
+
payload: Payload;
|
|
18
|
+
/** Collections whose deletes are refused while referenced, with their nouns. */
|
|
19
|
+
guarded: ReadonlyMap<string, {
|
|
20
|
+
noun?: string;
|
|
21
|
+
consequence?: string;
|
|
22
|
+
}>;
|
|
23
|
+
blocks?: readonly Block[];
|
|
24
|
+
/** Who may ask. Default: a user with the `admin` or `editor` role. */
|
|
25
|
+
canUse?: (ctx: McpToolContext) => boolean;
|
|
26
|
+
}
|
|
27
|
+
declare const inputSchema: z.ZodObject<{
|
|
28
|
+
collection: z.ZodString;
|
|
29
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
collection: string;
|
|
32
|
+
id: string | number;
|
|
33
|
+
}, {
|
|
34
|
+
collection: string;
|
|
35
|
+
id: string | number;
|
|
36
|
+
}>;
|
|
37
|
+
declare const findInputSchema: z.ZodObject<{
|
|
38
|
+
collection: z.ZodString;
|
|
39
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
40
|
+
} & {
|
|
41
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
collection: string;
|
|
44
|
+
id: string | number;
|
|
45
|
+
limit?: number | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
collection: string;
|
|
48
|
+
id: string | number;
|
|
49
|
+
limit?: number | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export declare function createFindReferencesTool(deps: ReferenceToolDeps): McpToolDefinition<typeof findInputSchema>;
|
|
52
|
+
export declare function createCanDeleteTool(deps: ReferenceToolDeps): McpToolDefinition<typeof inputSchema>;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/references/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,KAAK,EAAkB,OAAO,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAe5D,eAAO,MAAM,eAAe;;;;;;;;;CAW0B,CAAA;AAEtD,eAAO,MAAM,0BAA0B,EAAE,SAAS,iBAAiB,EACnC,CAAA;AAEhC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,gFAAgF;IAChF,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACrE,MAAM,CAAC,EAAE,SAAS,KAAK,EAAE,CAAA;IACzB,sEAAsE;IACtE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAA;CAC1C;AAED,QAAA,MAAM,WAAW;;;;;;;;;EAGf,CAAA;AAEF,QAAA,MAAM,eAAe;;;;;;;;;;;;;EAQnB,CAAA;AAgCF,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,iBAAiB,GACtB,iBAAiB,CAAC,OAAO,eAAe,CAAC,CAuB3C;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,iBAAiB,GACtB,iBAAiB,CAAC,OAAO,WAAW,CAAC,CAyCvC"}
|