@forumone/throughline 0.0.0 → 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 +352 -0
- 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 +183 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*
|
|
2
|
+
The editorial views' styles, in Payload's own tokens so both admin themes work.
|
|
3
|
+
|
|
4
|
+
Shipped as a string and rendered as a React 19 `<style href precedence>`, which
|
|
5
|
+
React hoists into the head and de-duplicates however many panels render it. A
|
|
6
|
+
package cannot rely on the host's `custom.css`, and importing a `.css` file from
|
|
7
|
+
a package is a bundler question this avoids. Ported from forumone-2026's
|
|
8
|
+
`app/(payload)/custom.css` dashboard and health rules.
|
|
9
|
+
*/
|
|
10
|
+
export const EDITORIAL_CSS = `
|
|
11
|
+
.tl-editorial__dashboard {
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
|
|
14
|
+
gap: var(--base);
|
|
15
|
+
margin-bottom: calc(var(--base) * 2);
|
|
16
|
+
}
|
|
17
|
+
.tl-editorial__panel {
|
|
18
|
+
border: 1px solid var(--theme-elevation-150);
|
|
19
|
+
border-radius: var(--style-radius-m);
|
|
20
|
+
padding: var(--base);
|
|
21
|
+
}
|
|
22
|
+
.tl-editorial__panel h2 {
|
|
23
|
+
margin: 0 0 calc(var(--base) * 0.5);
|
|
24
|
+
font-size: 1.125rem;
|
|
25
|
+
}
|
|
26
|
+
.tl-editorial__list {
|
|
27
|
+
list-style: none;
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
|
+
.tl-editorial__row {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
gap: 0 var(--base);
|
|
36
|
+
padding: calc(var(--base) * 0.4) 0;
|
|
37
|
+
border-top: 1px solid var(--theme-elevation-100);
|
|
38
|
+
}
|
|
39
|
+
.tl-editorial__row:first-child {
|
|
40
|
+
border-top: 0;
|
|
41
|
+
}
|
|
42
|
+
.tl-editorial__meta,
|
|
43
|
+
.tl-editorial__empty {
|
|
44
|
+
color: var(--theme-elevation-500);
|
|
45
|
+
}
|
|
46
|
+
.tl-editorial__empty {
|
|
47
|
+
margin: 0;
|
|
48
|
+
}
|
|
49
|
+
.tl-editorial__more {
|
|
50
|
+
margin: calc(var(--base) * 0.5) 0 0;
|
|
51
|
+
}
|
|
52
|
+
.tl-health {
|
|
53
|
+
display: grid;
|
|
54
|
+
gap: var(--base);
|
|
55
|
+
padding-bottom: calc(var(--base) * 3);
|
|
56
|
+
}
|
|
57
|
+
.tl-health h1 {
|
|
58
|
+
margin: calc(var(--base) * 1.5) 0 0;
|
|
59
|
+
}
|
|
60
|
+
.tl-health__lede {
|
|
61
|
+
margin: 0;
|
|
62
|
+
color: var(--theme-elevation-500);
|
|
63
|
+
}
|
|
64
|
+
.tl-health__group h3 {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
gap: 0 var(--base);
|
|
69
|
+
margin: var(--base) 0 calc(var(--base) * 0.25);
|
|
70
|
+
font-size: 1rem;
|
|
71
|
+
}
|
|
72
|
+
.tl-health__group h3 a {
|
|
73
|
+
font-weight: normal;
|
|
74
|
+
}
|
|
75
|
+
.tl-calendar {
|
|
76
|
+
padding-bottom: calc(var(--base) * 3);
|
|
77
|
+
}
|
|
78
|
+
.tl-calendar__header {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
align-items: baseline;
|
|
82
|
+
justify-content: space-between;
|
|
83
|
+
gap: calc(var(--base) * 0.5) var(--base);
|
|
84
|
+
margin-top: calc(var(--base) * 1.5);
|
|
85
|
+
}
|
|
86
|
+
.tl-calendar__header h1 {
|
|
87
|
+
margin: 0;
|
|
88
|
+
}
|
|
89
|
+
.tl-calendar__controls {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-wrap: wrap;
|
|
92
|
+
gap: calc(var(--base) * 0.75);
|
|
93
|
+
}
|
|
94
|
+
.tl-calendar__legend {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-wrap: wrap;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: calc(var(--base) * 0.5);
|
|
99
|
+
margin: var(--base) 0;
|
|
100
|
+
}
|
|
101
|
+
.tl-calendar__grid {
|
|
102
|
+
width: 100%;
|
|
103
|
+
border-collapse: collapse;
|
|
104
|
+
table-layout: fixed;
|
|
105
|
+
}
|
|
106
|
+
.tl-calendar__caption,
|
|
107
|
+
.tl-calendar__kind {
|
|
108
|
+
position: absolute;
|
|
109
|
+
width: 1px;
|
|
110
|
+
height: 1px;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
clip-path: inset(50%);
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
}
|
|
115
|
+
.tl-calendar__grid th {
|
|
116
|
+
padding: calc(var(--base) * 0.25);
|
|
117
|
+
color: var(--theme-elevation-500);
|
|
118
|
+
font-weight: normal;
|
|
119
|
+
text-align: left;
|
|
120
|
+
}
|
|
121
|
+
.tl-calendar__day {
|
|
122
|
+
height: 7.5rem;
|
|
123
|
+
padding: calc(var(--base) * 0.25);
|
|
124
|
+
border: 1px solid var(--theme-elevation-150);
|
|
125
|
+
vertical-align: top;
|
|
126
|
+
}
|
|
127
|
+
.tl-calendar__day--outside {
|
|
128
|
+
background: var(--theme-elevation-50);
|
|
129
|
+
color: var(--theme-elevation-400);
|
|
130
|
+
}
|
|
131
|
+
.tl-calendar__day--today .tl-calendar__date {
|
|
132
|
+
border-radius: var(--style-radius-s);
|
|
133
|
+
padding: 0 0.35em;
|
|
134
|
+
background: var(--theme-text);
|
|
135
|
+
color: var(--theme-bg);
|
|
136
|
+
}
|
|
137
|
+
.tl-calendar__date {
|
|
138
|
+
display: inline-block;
|
|
139
|
+
margin-bottom: 0.25rem;
|
|
140
|
+
font-size: 0.8125rem;
|
|
141
|
+
}
|
|
142
|
+
/* Kinds differ by border style as well as colour, so the grid does not rely on colour alone. */
|
|
143
|
+
.tl-calendar__item {
|
|
144
|
+
display: block;
|
|
145
|
+
margin-top: 2px;
|
|
146
|
+
padding: 1px 0.4em;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
border: 1px solid transparent;
|
|
149
|
+
border-left-width: 3px;
|
|
150
|
+
border-radius: var(--style-radius-s);
|
|
151
|
+
color: var(--theme-text);
|
|
152
|
+
font-size: 0.8125rem;
|
|
153
|
+
text-decoration: none;
|
|
154
|
+
text-overflow: ellipsis;
|
|
155
|
+
white-space: nowrap;
|
|
156
|
+
}
|
|
157
|
+
.tl-calendar__legend .tl-calendar__item {
|
|
158
|
+
display: inline-block;
|
|
159
|
+
margin: 0;
|
|
160
|
+
}
|
|
161
|
+
.tl-calendar__item--scheduled {
|
|
162
|
+
border-color: var(--theme-warning-500);
|
|
163
|
+
border-style: dashed;
|
|
164
|
+
background: var(--theme-warning-50);
|
|
165
|
+
}
|
|
166
|
+
.tl-calendar__item--published {
|
|
167
|
+
border-color: var(--theme-success-500);
|
|
168
|
+
background: var(--theme-success-50);
|
|
169
|
+
}
|
|
170
|
+
.tl-calendar__item--event {
|
|
171
|
+
border-color: var(--theme-elevation-800);
|
|
172
|
+
border-left-width: 6px;
|
|
173
|
+
background: var(--theme-elevation-100);
|
|
174
|
+
}
|
|
175
|
+
.tl-calendar__more {
|
|
176
|
+
display: block;
|
|
177
|
+
margin-top: 2px;
|
|
178
|
+
font-size: 0.75rem;
|
|
179
|
+
}
|
|
180
|
+
@media (max-width: 768px) {
|
|
181
|
+
.tl-calendar__day {
|
|
182
|
+
height: 4.5rem;
|
|
183
|
+
}
|
|
184
|
+
.tl-calendar__item {
|
|
185
|
+
font-size: 0;
|
|
186
|
+
height: 0.5rem;
|
|
187
|
+
padding: 0;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
`;
|
|
191
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/editorial/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;EAQE;AACF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoL5B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Payload, PayloadRequest } from 'payload';
|
|
2
|
+
import { type YourWorkResult } from './work.js';
|
|
3
|
+
/** The two panels, from a result already read. Pure, for the parity test. */
|
|
4
|
+
export declare function YourWorkReport({ work, adminRoute }: {
|
|
5
|
+
work: YourWorkResult;
|
|
6
|
+
adminRoute: string;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
/** `beforeDashboard`: "Your work", and content health's counts when there are checks. */
|
|
9
|
+
export declare function YourWorkDashboard({ payload, user, }: {
|
|
10
|
+
payload: Payload;
|
|
11
|
+
user?: PayloadRequest['user'];
|
|
12
|
+
}): Promise<import("react").JSX.Element | null>;
|
|
13
|
+
//# sourceMappingURL=YourWork.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YourWork.d.ts","sourceRoot":"","sources":["../../../src/editorial/work/YourWork.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAKtD,OAAO,EAA8B,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AAyC3E,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,+BAyBhG;AAED,yFAAyF;AACzF,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,IAAI,GACL,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;CAC9B,+CAcA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { editorialRuntime } from '../config.js';
|
|
3
|
+
import { EditorialStyles } from '../health/ContentHealthReport.js';
|
|
4
|
+
import { HealthSummary } from '../health/HealthSummary.js';
|
|
5
|
+
import { relativeTime } from '../relativeTime.js';
|
|
6
|
+
import { readYourWork } from './work.js';
|
|
7
|
+
/*
|
|
8
|
+
The top of the dashboard: what is waiting on somebody. From forumone-2026's
|
|
9
|
+
`admin/YourWork.tsx`.
|
|
10
|
+
|
|
11
|
+
Payload's default dashboard is a card per collection, each saying only its own
|
|
12
|
+
name, so the first screen after signing in answers "what collections are
|
|
13
|
+
there", which nobody asks twice. The questions an editor opens the admin with
|
|
14
|
+
are "what did I leave half done" and "what is about to go out".
|
|
15
|
+
|
|
16
|
+
`editorialPlugin` puts `YourWorkDashboard` in `beforeDashboard`: the two panels,
|
|
17
|
+
and the content-health counts beside them when health is configured.
|
|
18
|
+
*/
|
|
19
|
+
function Rows({ rows, empty, now, adminRoute, }) {
|
|
20
|
+
if (rows.length === 0)
|
|
21
|
+
return _jsx("p", { className: "tl-editorial__empty", children: empty });
|
|
22
|
+
return (_jsx("ul", { className: "tl-editorial__list", children: rows.map((row) => (_jsxs("li", { className: "tl-editorial__row", children: [_jsx("a", { href: `${adminRoute}/collections/${row.collection}/${String(row.id)}`, children: row.title }), _jsxs("span", { className: "tl-editorial__meta", children: [row.label, " \u00B7 ", _jsx("time", { dateTime: row.at, children: relativeTime(row.at, now) })] })] }, `${row.collection}:${String(row.id)}`))) }));
|
|
23
|
+
}
|
|
24
|
+
/** The two panels, from a result already read. Pure, for the parity test. */
|
|
25
|
+
export function YourWorkReport({ work, adminRoute }) {
|
|
26
|
+
const now = new Date(work.generatedAt);
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsx(EditorialStyles, {}), _jsxs("section", { className: "tl-editorial__panel", "aria-labelledby": "tl-dashboard-changes", children: [_jsx("h2", { id: "tl-dashboard-changes", children: "Unpublished changes" }), _jsx(Rows, { rows: work.changes, empty: "Nothing is waiting to be published.", now: now, adminRoute: adminRoute })] }), _jsxs("section", { className: "tl-editorial__panel", "aria-labelledby": "tl-dashboard-scheduled", children: [_jsx("h2", { id: "tl-dashboard-scheduled", children: "Scheduled to publish" }), _jsx(Rows, { rows: work.scheduled, empty: "Nothing is scheduled.", now: now, adminRoute: adminRoute })] })] }));
|
|
28
|
+
}
|
|
29
|
+
/** `beforeDashboard`: "Your work", and content health's counts when there are checks. */
|
|
30
|
+
export async function YourWorkDashboard({ payload, user, }) {
|
|
31
|
+
if (!user)
|
|
32
|
+
return null;
|
|
33
|
+
const runtime = editorialRuntime(payload.config);
|
|
34
|
+
const { admin } = payload.config.routes;
|
|
35
|
+
const work = runtime.work
|
|
36
|
+
? await readYourWork(payload, { work: runtime.work.options, user })
|
|
37
|
+
: null;
|
|
38
|
+
return (_jsxs("div", { className: "tl-editorial__dashboard", children: [work ? _jsx(YourWorkReport, { work: work, adminRoute: admin }) : null, _jsx(HealthSummary, { payload: payload, user: user })] }));
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=YourWork.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YourWork.js","sourceRoot":"","sources":["../../../src/editorial/work/YourWork.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAqC,MAAM,WAAW,CAAA;AAE3E;;;;;;;;;;;EAWE;AAEF,SAAS,IAAI,CAAC,EACZ,IAAI,EACJ,KAAK,EACL,GAAG,EACH,UAAU,GAMX;IACC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,YAAG,SAAS,EAAC,qBAAqB,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AAU,GACtB,IACM,IACT,CACJ,CAAA;AACH,CAAC;AAED,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,OAAO,EACP,IAAI,GAIL;IACC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IACtB,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAChD,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAA;IACvC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI;QACvB,CAAC,CAAC,MAAM,YAAY,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC;QACnE,CAAC,CAAC,IAAI,CAAA;IAER,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aACrC,IAAI,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAChE,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAI,IAC3C,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Payload } from 'payload';
|
|
3
|
+
import type { McpToolDefinition } from '../../plugin-contract/mcp.js';
|
|
4
|
+
import type { McpToolDescriptor } from '../../mcp/collector.js';
|
|
5
|
+
import { type WorkOptions, type YourWorkResult } from './work.js';
|
|
6
|
+
export declare const WORK_TOOLS: {
|
|
7
|
+
readonly listMyWork: {
|
|
8
|
+
readonly name: "list_my_work";
|
|
9
|
+
readonly description: "What is waiting on somebody: documents with unpublished changes, newest first, and scheduled publishes, soonest first, each with its admin link. These are the dashboard's \"Your work\" panels. They list everything waiting that you can open, not only what you edited, because nothing records who edited what. Use for \"what is half done?\" or \"what goes out next?\".";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const WORK_TOOL_DESCRIPTORS: readonly McpToolDescriptor[];
|
|
13
|
+
declare const inputSchema: z.ZodObject<{
|
|
14
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
limit?: number | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
limit?: number | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
/** The lists as the tool returns them, with an admin link per row. */
|
|
21
|
+
export declare function toolWork(work: YourWorkResult, adminRoute: string): {
|
|
22
|
+
generatedAt: string;
|
|
23
|
+
unpublishedChanges: {
|
|
24
|
+
adminUrl: string;
|
|
25
|
+
collection: string;
|
|
26
|
+
label: string;
|
|
27
|
+
id: number | string;
|
|
28
|
+
title: string;
|
|
29
|
+
at: string;
|
|
30
|
+
}[];
|
|
31
|
+
scheduledToPublish: {
|
|
32
|
+
adminUrl: string;
|
|
33
|
+
collection: string;
|
|
34
|
+
label: string;
|
|
35
|
+
id: number | string;
|
|
36
|
+
title: string;
|
|
37
|
+
at: string;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
export declare function createListMyWorkTool(deps: {
|
|
41
|
+
payload: Payload;
|
|
42
|
+
work: WorkOptions;
|
|
43
|
+
}): McpToolDefinition<typeof inputSchema>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/editorial/work/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAgB,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AAO/E,eAAO,MAAM,UAAU;;;;;CAM+B,CAAA;AAEtD,eAAO,MAAM,qBAAqB,EAAE,SAAS,iBAAiB,EAA8B,CAAA;AAE5F,QAAA,MAAM,WAAW;;;;;;EAQf,CAAA;AAEF,sEAAsE;AACtE,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;EAUhE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,WAAW,CAAA;CAClB,GAAG,iBAAiB,CAAC,OAAO,WAAW,CAAC,CAmBxC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { readYourWork } from './work.js';
|
|
3
|
+
/*
|
|
4
|
+
"Your work", as an MCP tool: the same two lists the dashboard shows, read the
|
|
5
|
+
same way, as the caller.
|
|
6
|
+
*/
|
|
7
|
+
export const WORK_TOOLS = {
|
|
8
|
+
listMyWork: {
|
|
9
|
+
name: 'list_my_work',
|
|
10
|
+
description: 'What is waiting on somebody: documents with unpublished changes, newest first, and scheduled publishes, soonest first, each with its admin link. These are the dashboard\'s "Your work" panels. They list everything waiting that you can open, not only what you edited, because nothing records who edited what. Use for "what is half done?" or "what goes out next?".',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
export const WORK_TOOL_DESCRIPTORS = Object.values(WORK_TOOLS);
|
|
14
|
+
const inputSchema = z.object({
|
|
15
|
+
limit: z
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.positive()
|
|
19
|
+
.max(50)
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Rows per list. Default: the dashboard's, 8."),
|
|
22
|
+
});
|
|
23
|
+
/** The lists as the tool returns them, with an admin link per row. */
|
|
24
|
+
export function toolWork(work, adminRoute) {
|
|
25
|
+
const link = (row) => ({
|
|
26
|
+
...row,
|
|
27
|
+
adminUrl: `${adminRoute}/collections/${row.collection}/${String(row.id)}`,
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
generatedAt: work.generatedAt,
|
|
31
|
+
unpublishedChanges: work.changes.map(link),
|
|
32
|
+
scheduledToPublish: work.scheduled.map(link),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export function createListMyWorkTool(deps) {
|
|
36
|
+
return {
|
|
37
|
+
...WORK_TOOLS.listMyWork,
|
|
38
|
+
inputSchema,
|
|
39
|
+
handler: async (input, ctx) => {
|
|
40
|
+
if (!ctx.user) {
|
|
41
|
+
return {
|
|
42
|
+
error: 'Must be authenticated: your work is read with your own access, and an API key alone carries no identity.',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const work = await readYourWork(deps.payload, {
|
|
46
|
+
work: { ...deps.work, ...(input.limit ? { limit: input.limit } : {}) },
|
|
47
|
+
// The same cast and the same reason as publishing's `resolvePublishingActor`.
|
|
48
|
+
user: ctx.user,
|
|
49
|
+
});
|
|
50
|
+
return toolWork(work, deps.payload.config.routes.admin);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/editorial/work/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,YAAY,EAAyC,MAAM,WAAW,CAAA;AAE/E;;;EAGE;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE;QACV,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,2WAA2W;KAC9W;CACmD,CAAA;AAEtD,MAAM,CAAC,MAAM,qBAAqB,GAAiC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,C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E;gBAC9E,IAAI,EAAE,GAAG,CAAC,IAAyC;aACpD,CAAC,CAAA;YACF,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACzD,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { CollectionSlug, Payload, PayloadRequest } from 'payload';
|
|
2
|
+
export interface WorkOptions {
|
|
3
|
+
/** The collections to look in. */
|
|
4
|
+
collections: readonly CollectionSlug[];
|
|
5
|
+
/** Default `scheduledPublishAt`, the field `publishingPlugin` schedules by. */
|
|
6
|
+
scheduledField?: string;
|
|
7
|
+
/** Rows per list. Default 8. */
|
|
8
|
+
limit?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface WorkRow {
|
|
11
|
+
collection: string;
|
|
12
|
+
/** The collection's singular label: "Page". */
|
|
13
|
+
label: string;
|
|
14
|
+
id: number | string;
|
|
15
|
+
title: string;
|
|
16
|
+
/** When it was last saved, or when it will publish. */
|
|
17
|
+
at: string;
|
|
18
|
+
}
|
|
19
|
+
export interface YourWorkResult {
|
|
20
|
+
generatedAt: string;
|
|
21
|
+
/** Latest save is a draft, newest first. */
|
|
22
|
+
changes: WorkRow[];
|
|
23
|
+
/** A schedule in the future, soonest first. */
|
|
24
|
+
scheduled: WorkRow[];
|
|
25
|
+
}
|
|
26
|
+
export declare function readYourWork(payload: Payload, options: {
|
|
27
|
+
work: WorkOptions;
|
|
28
|
+
user: PayloadRequest['user'];
|
|
29
|
+
now?: Date;
|
|
30
|
+
}): Promise<YourWorkResult>;
|
|
31
|
+
//# sourceMappingURL=work.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work.d.ts","sourceRoot":"","sources":["../../../src/editorial/work/work.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAiBtE,MAAM,WAAW,WAAW;IAC1B,kCAAkC;IAClC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAA;IACtC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,4CAA4C;IAC5C,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,+CAA+C;IAC/C,SAAS,EAAE,OAAO,EAAE,CAAA;CACrB;AA4CD,wBAAsB,YAAY,CAChC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,IAAI,CAAA;CAAE,GACvE,OAAO,CAAC,cAAc,CAAC,CA6CzB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function labelOf(payload, slug) {
|
|
2
|
+
const singular = payload.collections[slug]?.config.labels.singular;
|
|
3
|
+
return typeof singular === 'string' ? singular : slug;
|
|
4
|
+
}
|
|
5
|
+
function titleOf(doc) {
|
|
6
|
+
for (const key of ['title', 'name']) {
|
|
7
|
+
const value = doc[key];
|
|
8
|
+
if (typeof value === 'string' && value !== '')
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
return 'Untitled';
|
|
12
|
+
}
|
|
13
|
+
async function rowsFrom(payload, collections, query, at) {
|
|
14
|
+
const settled = await Promise.allSettled(collections.map(async (collection) => {
|
|
15
|
+
const { docs } = await query(collection);
|
|
16
|
+
return docs.map((doc) => {
|
|
17
|
+
const when = at(doc);
|
|
18
|
+
return {
|
|
19
|
+
collection,
|
|
20
|
+
label: labelOf(payload, collection),
|
|
21
|
+
id: doc['id'],
|
|
22
|
+
title: titleOf(doc),
|
|
23
|
+
at: typeof when === 'string' ? when : '',
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}));
|
|
27
|
+
const rows = [];
|
|
28
|
+
for (const result of settled) {
|
|
29
|
+
if (result.status === 'fulfilled')
|
|
30
|
+
rows.push(...result.value);
|
|
31
|
+
else
|
|
32
|
+
payload.logger.warn({ err: result.reason }, 'Your work: a collection did not answer.');
|
|
33
|
+
}
|
|
34
|
+
return rows;
|
|
35
|
+
}
|
|
36
|
+
export async function readYourWork(payload, options) {
|
|
37
|
+
const now = options.now ?? new Date();
|
|
38
|
+
const limit = options.work.limit ?? 8;
|
|
39
|
+
const scheduledField = options.work.scheduledField ?? 'scheduledPublishAt';
|
|
40
|
+
const common = {
|
|
41
|
+
depth: 0,
|
|
42
|
+
limit,
|
|
43
|
+
draft: true,
|
|
44
|
+
overrideAccess: false,
|
|
45
|
+
user: options.user,
|
|
46
|
+
};
|
|
47
|
+
const [changes, scheduled] = await Promise.all([
|
|
48
|
+
rowsFrom(payload, options.work.collections, (collection) => payload.find({
|
|
49
|
+
...common,
|
|
50
|
+
collection,
|
|
51
|
+
where: { _status: { equals: 'draft' } },
|
|
52
|
+
sort: '-updatedAt',
|
|
53
|
+
}), (doc) => doc['updatedAt']),
|
|
54
|
+
rowsFrom(payload, options.work.collections, (collection) => payload.find({
|
|
55
|
+
...common,
|
|
56
|
+
collection,
|
|
57
|
+
where: { [scheduledField]: { greater_than: now.toISOString() } },
|
|
58
|
+
sort: scheduledField,
|
|
59
|
+
}), (doc) => doc[scheduledField]),
|
|
60
|
+
]);
|
|
61
|
+
return {
|
|
62
|
+
generatedAt: now.toISOString(),
|
|
63
|
+
// Each collection gave its own first `limit`; these are the first across all of them.
|
|
64
|
+
changes: changes.sort((a, b) => b.at.localeCompare(a.at)).slice(0, limit),
|
|
65
|
+
scheduled: scheduled.sort((a, b) => a.at.localeCompare(b.at)).slice(0, limit),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=work.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work.js","sourceRoot":"","sources":["../../../src/editorial/work/work.ts"],"names":[],"mappings":"AA4CA,SAAS,OAAO,CAAC,OAAgB,EAAE,IAAY;IAC7C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,IAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAA;IACpF,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA;AACvD,CAAC;AAED,SAAS,OAAO,CAAC,GAA4B;IAC3C,KAAK,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;QACtB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE;YAAE,OAAO,KAAK,CAAA;IAC7D,CAAC;IACD,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,KAAK,UAAU,QAAQ,CACrB,OAAgB,EAChB,WAAsC,EACtC,KAAmE,EACnE,EAA6C;IAE7C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CACtC,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;QACnC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,CAAA;QACxC,OAAQ,IAAkC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACrD,MAAM,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;YACpB,OAAO;gBACL,UAAU;g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
|
|
5
|
+
export interface SendEmailParams {
|
|
6
|
+
to: string | string[];
|
|
7
|
+
subject: string;
|
|
8
|
+
template: ReactElement;
|
|
9
|
+
tags?: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}>;
|
|
13
|
+
replyTo?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SendEmailResult {
|
|
16
|
+
id: string;
|
|
17
|
+
deliveredAt: string;
|
|
18
|
+
}
|
|
19
|
+
export interface EmailClientOptions {
|
|
20
|
+
apiKey: string;
|
|
21
|
+
fromAddress: string;
|
|
22
|
+
fromName: string;
|
|
23
|
+
defaultReplyTo?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional Resend constructor override for tests or self-hosted Resend
|
|
26
|
+
* deployments. The default loads `resend` lazily so the package is
|
|
27
|
+
* still importable in environments without Resend installed (e.g. tests
|
|
28
|
+
* that mock the client entirely).
|
|
29
|
+
*/
|
|
30
|
+
resendClient?: {
|
|
31
|
+
emails: {
|
|
32
|
+
send: (input: ResendSendInput) => Promise<ResendSendResult>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Optional renderer override. The default lazily imports
|
|
37
|
+
* `@react-email/render` and produces both HTML and plaintext.
|
|
38
|
+
*/
|
|
39
|
+
render?: TemplateRenderer;
|
|
40
|
+
}
|
|
41
|
+
export interface TemplateRenderer {
|
|
42
|
+
toHtml: (template: ReactElement) => Promise<string>;
|
|
43
|
+
toText: (template: ReactElement) => Promise<string>;
|
|
44
|
+
}
|
|
45
|
+
interface ResendSendInput {
|
|
46
|
+
from: string;
|
|
47
|
+
to: string[];
|
|
48
|
+
subject: string;
|
|
49
|
+
html: string;
|
|
50
|
+
text: string;
|
|
51
|
+
tags?: Array<{
|
|
52
|
+
name: string;
|
|
53
|
+
value: string;
|
|
54
|
+
}>;
|
|
55
|
+
replyTo?: string;
|
|
56
|
+
}
|
|
57
|
+
interface ResendSendResult {
|
|
58
|
+
data: {
|
|
59
|
+
id: string;
|
|
60
|
+
} | null;
|
|
61
|
+
error: {
|
|
62
|
+
message: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
} | null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Wraps Resend with React Email rendering and a stable result envelope.
|
|
68
|
+
* Each `send` call produces both HTML and plaintext from the same React
|
|
69
|
+
* tree — plaintext is non-optional for accessibility (screen readers),
|
|
70
|
+
* deliverability (spam scores), and clients that refuse HTML.
|
|
71
|
+
*
|
|
72
|
+
* Construction is lazy: the Resend SDK and the renderer are only loaded
|
|
73
|
+
* when `send()` is first called. That keeps tests that mock the client
|
|
74
|
+
* fully runnable in environments where neither package is installed.
|
|
75
|
+
*/
|
|
76
|
+
export declare function createEmailClient(options: EmailClientOptions): EmailClient;
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/email/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;CACxD;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,YAAY,CAAA;IACtB,IAAI,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MA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|
|
3
|
+
* Each `send` call produces both HTML and plaintext from the same React
|
|
4
|
+
* tree — plaintext is non-optional for accessibility (screen readers),
|
|
5
|
+
* deliverability (spam scores), and clients that refuse HTML.
|
|
6
|
+
*
|
|
7
|
+
* Construction is lazy: the Resend SDK and the renderer are only loaded
|
|
8
|
+
* when `send()` is first called. That keeps tests that mock the client
|
|
9
|
+
* fully runnable in environments where neither package is installed.
|
|
10
|
+
*/
|
|
11
|
+
export function createEmailClient(options) {
|
|
12
|
+
const from = `${options.fromName} <${options.fromAddress}>`;
|
|
13
|
+
let cachedResend = options.resendClient;
|
|
14
|
+
let cachedRenderer = options.render;
|
|
15
|
+
async function getResend() {
|
|
16
|
+
if (cachedResend)
|
|
17
|
+
return cachedResend;
|
|
18
|
+
const mod = (await import('resend'));
|
|
19
|
+
cachedResend = new mod.Resend(options.apiKey);
|
|
20
|
+
return cachedResend;
|
|
21
|
+
}
|
|
22
|
+
async function getRenderer() {
|
|
23
|
+
if (cachedRenderer)
|
|
24
|
+
return cachedRenderer;
|
|
25
|
+
const mod = (await import('@react-email/render'));
|
|
26
|
+
cachedRenderer = {
|
|
27
|
+
toHtml: (template) => mod.render(template),
|
|
28
|
+
toText: (template) => mod.render(template, { plainText: true }),
|
|
29
|
+
};
|
|
30
|
+
return cachedRenderer;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
async send(params) {
|
|
34
|
+
const renderer = await getRenderer();
|
|
35
|
+
const [html, text] = await Promise.all([
|
|
36
|
+
renderer.toHtml(params.template),
|
|
37
|
+
renderer.toText(params.template),
|
|
38
|
+
]);
|
|
39
|
+
const resend = await getResend();
|
|
40
|
+
const input = {
|
|
41
|
+
from,
|
|
42
|
+
to: Array.isArray(params.to) ? params.to : [params.to],
|
|
43
|
+
subject: params.subject,
|
|
44
|
+
html,
|
|
45
|
+
text,
|
|
46
|
+
};
|
|
47
|
+
if (params.tags)
|
|
48
|
+
input.tags = params.tags;
|
|
49
|
+
const replyTo = params.replyTo ?? options.defaultReplyTo;
|
|
50
|
+
if (replyTo)
|
|
51
|
+
input.replyTo = replyTo;
|
|
52
|
+
const result = await resend.emails.send(input);
|
|
53
|
+
if (result.error) {
|
|
54
|
+
throw new Error(`Email send failed: ${result.error.message}`);
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
id: result.data?.id ?? 'unknown',
|
|
58
|
+
deliveredAt: new Date().toISOString(),
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/email/client.ts"],"names":[],"mappings":"AAgEA;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA2B;IAC3D,MAAM,IAAI,GAAG,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,WAAW,GAAG,CAAA;IAE3D,IAAI,YAAY,GAAmD,OAAO,CAAC,YAAY,CAAA;IACvF,IAAI,cAAc,GAAiC,OAAO,CAAC,MAAM,CAAA;IAEjE,KAAK,UAAU,SAAS;QACtB,IAAI,YAAY;YAAE,OAAO,YAAY,CAAA;QACrC,MAAM,GAAG,GAAG,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,CAA2B,CAAA;QAC9D,YAAY,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAC7C,OAAO,YAAY,CAAA;IACrB,CAAC;IAED,KAAK,UAAU,WAAW;QACxB,IAAI,cAAc;YAAE,OAAO,cAAc,CAAA;QACzC,MAAM,GAAG,GAAG,CAAC,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAE/C,CAAA;QACD,cAAc,GAAG;YACf,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC;YAC1C,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,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C,IAAI,EAAE,EAAE,IAAI,SAAS;gBAChC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACtC,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { unwrapRelationshipId } from '../../utils/relationships.js';
|
|
2
|
+
import type { ApprovalTargetKind } from '../templates/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Maps a collection slug to the human-friendly noun the templates render.
|
|
5
|
+
* Defaults to "item" so unknown collections still produce sensible copy
|
|
6
|
+
* ("the item Homepage" reads weirder than "the page Homepage" but it's
|
|
7
|
+
* better than dropping the noun entirely).
|
|
8
|
+
*/
|
|
9
|
+
export declare function targetKindFromCollection(slug: string): ApprovalTargetKind;
|
|
10
|
+
/**
|
|
11
|
+
* Defensive normalizer for the `notifiedApprovers` json field. Older
|
|
12
|
+
* snapshots stored an array of strings; the post-C7 fixup wraps each
|
|
13
|
+
* as `{ id, at, channel }`. We accept either shape.
|
|
14
|
+
*/
|
|
15
|
+
export declare function readApproverIds(value: unknown): string[];
|
|
16
|
+
export declare function formatHumanDate(iso: string): string;
|
|
17
|
+
//# sourceMappingURL=_shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../../src/email/functions/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAO/D;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAWxD;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAInD"}
|