@forumone/throughline 0.0.0-stage → 1.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +584 -0
- package/LICENSE +21 -0
- package/README.md +351 -2
- package/bin/payload-cli.mjs +443 -0
- package/bin/throughline-payload.mjs +6 -0
- package/dist/access/coreCollections.d.ts +18 -0
- package/dist/access/coreCollections.d.ts.map +1 -0
- package/dist/access/coreCollections.js +56 -0
- package/dist/access/coreCollections.js.map +1 -0
- package/dist/approvals/collection.d.ts +21 -0
- package/dist/approvals/collection.d.ts.map +1 -0
- package/dist/approvals/collection.js +99 -0
- package/dist/approvals/collection.js.map +1 -0
- package/dist/approvals/endpoints/action.d.ts +31 -0
- package/dist/approvals/endpoints/action.d.ts.map +1 -0
- package/dist/approvals/endpoints/action.js +205 -0
- package/dist/approvals/endpoints/action.js.map +1 -0
- package/dist/approvals/index.d.ts +19 -0
- package/dist/approvals/index.d.ts.map +1 -0
- package/dist/approvals/index.js +13 -0
- package/dist/approvals/index.js.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts +14 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.js +101 -0
- package/dist/approvals/jobs/expire-stale-approvals.js.map +1 -0
- package/dist/approvals/options.d.ts +76 -0
- package/dist/approvals/options.d.ts.map +1 -0
- package/dist/approvals/options.js +47 -0
- package/dist/approvals/options.js.map +1 -0
- package/dist/approvals/plugin.d.ts +4 -0
- package/dist/approvals/plugin.d.ts.map +1 -0
- package/dist/approvals/plugin.js +92 -0
- package/dist/approvals/plugin.js.map +1 -0
- package/dist/approvals/resolver.d.ts +18 -0
- package/dist/approvals/resolver.d.ts.map +1 -0
- package/dist/approvals/resolver.js +57 -0
- package/dist/approvals/resolver.js.map +1 -0
- package/dist/approvals/symbol.d.ts +12 -0
- package/dist/approvals/symbol.d.ts.map +1 -0
- package/dist/approvals/symbol.js +12 -0
- package/dist/approvals/symbol.js.map +1 -0
- package/dist/approvals/tokens.d.ts +48 -0
- package/dist/approvals/tokens.d.ts.map +1 -0
- package/dist/approvals/tokens.js +123 -0
- package/dist/approvals/tokens.js.map +1 -0
- package/dist/approvals/tools/descriptors.d.ts +26 -0
- package/dist/approvals/tools/descriptors.d.ts.map +1 -0
- package/dist/approvals/tools/descriptors.js +35 -0
- package/dist/approvals/tools/descriptors.js.map +1 -0
- package/dist/approvals/tools/get-approval-status.d.ts +11 -0
- package/dist/approvals/tools/get-approval-status.d.ts.map +1 -0
- package/dist/approvals/tools/get-approval-status.js +94 -0
- package/dist/approvals/tools/get-approval-status.js.map +1 -0
- package/dist/approvals/tools/index.d.ts +7 -0
- package/dist/approvals/tools/index.d.ts.map +1 -0
- package/dist/approvals/tools/index.js +7 -0
- package/dist/approvals/tools/index.js.map +1 -0
- package/dist/approvals/tools/list-my-requests.d.ts +11 -0
- package/dist/approvals/tools/list-my-requests.d.ts.map +1 -0
- package/dist/approvals/tools/list-my-requests.js +55 -0
- package/dist/approvals/tools/list-my-requests.js.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts +11 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.js +53 -0
- package/dist/approvals/tools/list-pending-approvals.js.map +1 -0
- package/dist/approvals/tools/request-approval.d.ts +13 -0
- package/dist/approvals/tools/request-approval.d.ts.map +1 -0
- package/dist/approvals/tools/request-approval.js +123 -0
- package/dist/approvals/tools/request-approval.js.map +1 -0
- package/dist/approvals/tools/respond-to-approval.d.ts +13 -0
- package/dist/approvals/tools/respond-to-approval.d.ts.map +1 -0
- package/dist/approvals/tools/respond-to-approval.js +98 -0
- package/dist/approvals/tools/respond-to-approval.js.map +1 -0
- package/dist/audit/collection.d.ts +22 -0
- package/dist/audit/collection.d.ts.map +1 -0
- package/dist/audit/collection.js +109 -0
- package/dist/audit/collection.js.map +1 -0
- package/dist/audit/index.d.ts +16 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +11 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/jobs/audit-event-echo.d.ts +14 -0
- package/dist/audit/jobs/audit-event-echo.d.ts.map +1 -0
- package/dist/audit/jobs/audit-event-echo.js +61 -0
- package/dist/audit/jobs/audit-event-echo.js.map +1 -0
- package/dist/audit/plugin.d.ts +20 -0
- package/dist/audit/plugin.d.ts.map +1 -0
- package/dist/audit/plugin.js +55 -0
- package/dist/audit/plugin.js.map +1 -0
- package/dist/audit/query/formatting/index.d.ts +40 -0
- package/dist/audit/query/formatting/index.d.ts.map +1 -0
- package/dist/audit/query/formatting/index.js +73 -0
- package/dist/audit/query/formatting/index.js.map +1 -0
- package/dist/audit/query/options.d.ts +34 -0
- package/dist/audit/query/options.d.ts.map +1 -0
- package/dist/audit/query/options.js +8 -0
- package/dist/audit/query/options.js.map +1 -0
- package/dist/audit/query/plugin.d.ts +11 -0
- package/dist/audit/query/plugin.d.ts.map +1 -0
- package/dist/audit/query/plugin.js +68 -0
- package/dist/audit/query/plugin.js.map +1 -0
- package/dist/audit/query/tools/access.d.ts +9 -0
- package/dist/audit/query/tools/access.d.ts.map +1 -0
- package/dist/audit/query/tools/access.js +14 -0
- package/dist/audit/query/tools/access.js.map +1 -0
- package/dist/audit/query/tools/descriptors.d.ts +26 -0
- package/dist/audit/query/tools/descriptors.d.ts.map +1 -0
- package/dist/audit/query/tools/descriptors.js +35 -0
- package/dist/audit/query/tools/descriptors.js.map +1 -0
- package/dist/audit/query/tools/get-change-history.d.ts +23 -0
- package/dist/audit/query/tools/get-change-history.d.ts.map +1 -0
- package/dist/audit/query/tools/get-change-history.js +44 -0
- package/dist/audit/query/tools/get-change-history.js.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts +23 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.js +56 -0
- package/dist/audit/query/tools/get-recent-failures.js.map +1 -0
- package/dist/audit/query/tools/index.d.ts +13 -0
- package/dist/audit/query/tools/index.d.ts.map +1 -0
- package/dist/audit/query/tools/index.js +8 -0
- package/dist/audit/query/tools/index.js.map +1 -0
- package/dist/audit/query/tools/query-audit.d.ts +53 -0
- package/dist/audit/query/tools/query-audit.d.ts.map +1 -0
- package/dist/audit/query/tools/query-audit.js +78 -0
- package/dist/audit/query/tools/query-audit.js.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts +23 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.js +86 -0
- package/dist/audit/query/tools/what-changed-in-range.js.map +1 -0
- package/dist/audit/query/tools/who-changed-what.d.ts +38 -0
- package/dist/audit/query/tools/who-changed-what.d.ts.map +1 -0
- package/dist/audit/query/tools/who-changed-what.js +66 -0
- package/dist/audit/query/tools/who-changed-what.js.map +1 -0
- package/dist/audit/types.d.ts +11 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +45 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/audit/writer.d.ts +50 -0
- package/dist/audit/writer.d.ts.map +1 -0
- package/dist/audit/writer.js +101 -0
- package/dist/audit/writer.js.map +1 -0
- package/dist/cache-tags.d.ts +31 -0
- package/dist/cache-tags.d.ts.map +1 -0
- package/dist/cache-tags.js +53 -0
- package/dist/cache-tags.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/manifest-source.d.ts +17 -0
- package/dist/components/manifest-source.d.ts.map +1 -0
- package/dist/components/manifest-source.js +60 -0
- package/dist/components/manifest-source.js.map +1 -0
- package/dist/components/matching/index.d.ts +3 -0
- package/dist/components/matching/index.d.ts.map +1 -0
- package/dist/components/matching/index.js +2 -0
- package/dist/components/matching/index.js.map +1 -0
- package/dist/components/matching/tfidf.d.ts +13 -0
- package/dist/components/matching/tfidf.d.ts.map +1 -0
- package/dist/components/matching/tfidf.js +118 -0
- package/dist/components/matching/tfidf.js.map +1 -0
- package/dist/components/matching/types.d.ts +22 -0
- package/dist/components/matching/types.d.ts.map +1 -0
- package/dist/components/matching/types.js +2 -0
- package/dist/components/matching/types.js.map +1 -0
- package/dist/components/options.d.ts +136 -0
- package/dist/components/options.d.ts.map +1 -0
- package/dist/components/options.js +40 -0
- package/dist/components/options.js.map +1 -0
- package/dist/components/plugin.d.ts +4 -0
- package/dist/components/plugin.d.ts.map +1 -0
- package/dist/components/plugin.js +95 -0
- package/dist/components/plugin.js.map +1 -0
- package/dist/components/tools/descriptors.d.ts +34 -0
- package/dist/components/tools/descriptors.d.ts.map +1 -0
- package/dist/components/tools/descriptors.js +43 -0
- package/dist/components/tools/descriptors.js.map +1 -0
- package/dist/components/tools/find-anti-pattern.d.ts +9 -0
- package/dist/components/tools/find-anti-pattern.d.ts.map +1 -0
- package/dist/components/tools/find-anti-pattern.js +31 -0
- package/dist/components/tools/find-anti-pattern.js.map +1 -0
- package/dist/components/tools/get-contract.d.ts +4 -0
- package/dist/components/tools/get-contract.d.ts.map +1 -0
- package/dist/components/tools/get-contract.js +19 -0
- package/dist/components/tools/get-contract.js.map +1 -0
- package/dist/components/tools/get-tokens.d.ts +4 -0
- package/dist/components/tools/get-tokens.d.ts.map +1 -0
- package/dist/components/tools/get-tokens.js +19 -0
- package/dist/components/tools/get-tokens.js.map +1 -0
- package/dist/components/tools/get-variants.d.ts +4 -0
- package/dist/components/tools/get-variants.d.ts.map +1 -0
- package/dist/components/tools/get-variants.js +19 -0
- package/dist/components/tools/get-variants.js.map +1 -0
- package/dist/components/tools/index.d.ts +9 -0
- package/dist/components/tools/index.d.ts.map +1 -0
- package/dist/components/tools/index.js +9 -0
- package/dist/components/tools/index.js.map +1 -0
- package/dist/components/tools/list-components.d.ts +4 -0
- package/dist/components/tools/list-components.d.ts.map +1 -0
- package/dist/components/tools/list-components.js +25 -0
- package/dist/components/tools/list-components.js.map +1 -0
- package/dist/components/tools/suggest-for-intent.d.ts +12 -0
- package/dist/components/tools/suggest-for-intent.d.ts.map +1 -0
- package/dist/components/tools/suggest-for-intent.js +83 -0
- package/dist/components/tools/suggest-for-intent.js.map +1 -0
- package/dist/components/tools/validate-composition.d.ts +9 -0
- package/dist/components/tools/validate-composition.d.ts.map +1 -0
- package/dist/components/tools/validate-composition.js +31 -0
- package/dist/components/tools/validate-composition.js.map +1 -0
- package/dist/components/validation/composition.d.ts +38 -0
- package/dist/components/validation/composition.d.ts.map +1 -0
- package/dist/components/validation/composition.js +135 -0
- package/dist/components/validation/composition.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts +9 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.js +47 -0
- package/dist/editorial/calendar/ContentCalendarReport.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts +3 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.js +36 -0
- package/dist/editorial/calendar/ContentCalendarView.js.map +1 -0
- package/dist/editorial/calendar/calendar.d.ts +30 -0
- package/dist/editorial/calendar/calendar.d.ts.map +1 -0
- package/dist/editorial/calendar/calendar.js +23 -0
- package/dist/editorial/calendar/calendar.js.map +1 -0
- package/dist/editorial/calendar/find.d.ts +41 -0
- package/dist/editorial/calendar/find.d.ts.map +1 -0
- package/dist/editorial/calendar/find.js +108 -0
- package/dist/editorial/calendar/find.js.map +1 -0
- package/dist/editorial/calendar/month.d.ts +45 -0
- package/dist/editorial/calendar/month.d.ts.map +1 -0
- package/dist/editorial/calendar/month.js +120 -0
- package/dist/editorial/calendar/month.js.map +1 -0
- package/dist/editorial/calendar/tool.d.ts +50 -0
- package/dist/editorial/calendar/tool.d.ts.map +1 -0
- package/dist/editorial/calendar/tool.js +68 -0
- package/dist/editorial/calendar/tool.js.map +1 -0
- package/dist/editorial/config.d.ts +25 -0
- package/dist/editorial/config.d.ts.map +1 -0
- package/dist/editorial/config.js +12 -0
- package/dist/editorial/config.js.map +1 -0
- package/dist/editorial/health/ContentHealthReport.d.ts +7 -0
- package/dist/editorial/health/ContentHealthReport.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthReport.js +29 -0
- package/dist/editorial/health/ContentHealthReport.js.map +1 -0
- package/dist/editorial/health/ContentHealthView.d.ts +3 -0
- package/dist/editorial/health/ContentHealthView.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthView.js +29 -0
- package/dist/editorial/health/ContentHealthView.js.map +1 -0
- package/dist/editorial/health/HealthSummary.d.ts +6 -0
- package/dist/editorial/health/HealthSummary.d.ts.map +1 -0
- package/dist/editorial/health/HealthSummary.js +39 -0
- package/dist/editorial/health/HealthSummary.js.map +1 -0
- package/dist/editorial/health/checks.d.ts +104 -0
- package/dist/editorial/health/checks.d.ts.map +1 -0
- package/dist/editorial/health/checks.js +188 -0
- package/dist/editorial/health/checks.js.map +1 -0
- package/dist/editorial/health/find.d.ts +43 -0
- package/dist/editorial/health/find.d.ts.map +1 -0
- package/dist/editorial/health/find.js +97 -0
- package/dist/editorial/health/find.js.map +1 -0
- package/dist/editorial/health/tool.d.ts +53 -0
- package/dist/editorial/health/tool.d.ts.map +1 -0
- package/dist/editorial/health/tool.js +80 -0
- package/dist/editorial/health/tool.js.map +1 -0
- package/dist/editorial/index.d.ts +25 -0
- package/dist/editorial/index.d.ts.map +1 -0
- package/dist/editorial/index.js +15 -0
- package/dist/editorial/index.js.map +1 -0
- package/dist/editorial/palette/CommandPalette.d.ts +15 -0
- package/dist/editorial/palette/CommandPalette.d.ts.map +1 -0
- package/dist/editorial/palette/CommandPalette.js +319 -0
- package/dist/editorial/palette/CommandPalette.js.map +1 -0
- package/dist/editorial/palette/ReportsNav.d.ts +5 -0
- package/dist/editorial/palette/ReportsNav.d.ts.map +1 -0
- package/dist/editorial/palette/ReportsNav.js +31 -0
- package/dist/editorial/palette/ReportsNav.js.map +1 -0
- package/dist/editorial/palette/search.d.ts +18 -0
- package/dist/editorial/palette/search.d.ts.map +1 -0
- package/dist/editorial/palette/search.js +41 -0
- package/dist/editorial/palette/search.js.map +1 -0
- package/dist/editorial/palette/sources.d.ts +64 -0
- package/dist/editorial/palette/sources.d.ts.map +1 -0
- package/dist/editorial/palette/sources.js +103 -0
- package/dist/editorial/palette/sources.js.map +1 -0
- package/dist/editorial/palette/styles.d.ts +2 -0
- package/dist/editorial/palette/styles.d.ts.map +1 -0
- package/dist/editorial/palette/styles.js +76 -0
- package/dist/editorial/palette/styles.js.map +1 -0
- package/dist/editorial/palette/tool.d.ts +31 -0
- package/dist/editorial/palette/tool.d.ts.map +1 -0
- package/dist/editorial/palette/tool.js +63 -0
- package/dist/editorial/palette/tool.js.map +1 -0
- package/dist/editorial/plugin.d.ts +76 -0
- package/dist/editorial/plugin.d.ts.map +1 -0
- package/dist/editorial/plugin.js +186 -0
- package/dist/editorial/plugin.js.map +1 -0
- package/dist/editorial/relativeTime.d.ts +3 -0
- package/dist/editorial/relativeTime.d.ts.map +1 -0
- package/dist/editorial/relativeTime.js +27 -0
- package/dist/editorial/relativeTime.js.map +1 -0
- package/dist/editorial/styles.d.ts +2 -0
- package/dist/editorial/styles.d.ts.map +1 -0
- package/dist/editorial/styles.js +191 -0
- package/dist/editorial/styles.js.map +1 -0
- package/dist/editorial/work/YourWork.d.ts +13 -0
- package/dist/editorial/work/YourWork.d.ts.map +1 -0
- package/dist/editorial/work/YourWork.js +40 -0
- package/dist/editorial/work/YourWork.js.map +1 -0
- package/dist/editorial/work/tool.d.ts +45 -0
- package/dist/editorial/work/tool.d.ts.map +1 -0
- package/dist/editorial/work/tool.js +54 -0
- package/dist/editorial/work/tool.js.map +1 -0
- package/dist/editorial/work/work.d.ts +31 -0
- package/dist/editorial/work/work.d.ts.map +1 -0
- package/dist/editorial/work/work.js +68 -0
- package/dist/editorial/work/work.js.map +1 -0
- package/dist/email/client.d.ts +78 -0
- package/dist/email/client.d.ts.map +1 -0
- package/dist/email/client.js +63 -0
- package/dist/email/client.js.map +1 -0
- package/dist/email/functions/_shared.d.ts +17 -0
- package/dist/email/functions/_shared.d.ts.map +1 -0
- package/dist/email/functions/_shared.js +40 -0
- package/dist/email/functions/_shared.js.map +1 -0
- package/dist/email/functions/index.d.ts +7 -0
- package/dist/email/functions/index.d.ts.map +1 -0
- package/dist/email/functions/index.js +4 -0
- package/dist/email/functions/index.js.map +1 -0
- package/dist/email/functions/notify-approval-decision.d.ts +34 -0
- package/dist/email/functions/notify-approval-decision.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-decision.js +77 -0
- package/dist/email/functions/notify-approval-decision.js.map +1 -0
- package/dist/email/functions/notify-approval-expired.d.ts +32 -0
- package/dist/email/functions/notify-approval-expired.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-expired.js +54 -0
- package/dist/email/functions/notify-approval-expired.js.map +1 -0
- package/dist/email/functions/notify-approval-request.d.ts +35 -0
- package/dist/email/functions/notify-approval-request.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-request.js +89 -0
- package/dist/email/functions/notify-approval-request.js.map +1 -0
- package/dist/email/index.d.ts +17 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +12 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/options.d.ts +100 -0
- package/dist/email/options.d.ts.map +1 -0
- package/dist/email/options.js +55 -0
- package/dist/email/options.js.map +1 -0
- package/dist/email/plugin.d.ts +28 -0
- package/dist/email/plugin.d.ts.map +1 -0
- package/dist/email/plugin.js +113 -0
- package/dist/email/plugin.js.map +1 -0
- package/dist/email/templates/ApprovalDecision.d.ts +15 -0
- package/dist/email/templates/ApprovalDecision.d.ts.map +1 -0
- package/dist/email/templates/ApprovalDecision.js +56 -0
- package/dist/email/templates/ApprovalDecision.js.map +1 -0
- package/dist/email/templates/ApprovalExpired.d.ts +10 -0
- package/dist/email/templates/ApprovalExpired.d.ts.map +1 -0
- package/dist/email/templates/ApprovalExpired.js +8 -0
- package/dist/email/templates/ApprovalExpired.js.map +1 -0
- package/dist/email/templates/ApprovalRequest.d.ts +24 -0
- package/dist/email/templates/ApprovalRequest.d.ts.map +1 -0
- package/dist/email/templates/ApprovalRequest.js +58 -0
- package/dist/email/templates/ApprovalRequest.js.map +1 -0
- package/dist/email/templates/_layout.d.ts +17 -0
- package/dist/email/templates/_layout.d.ts.map +1 -0
- package/dist/email/templates/_layout.js +39 -0
- package/dist/email/templates/_layout.js.map +1 -0
- package/dist/email/templates/index.d.ts +9 -0
- package/dist/email/templates/index.d.ts.map +1 -0
- package/dist/email/templates/index.js +5 -0
- package/dist/email/templates/index.js.map +1 -0
- package/dist/email/tokens.d.ts +39 -0
- package/dist/email/tokens.d.ts.map +1 -0
- package/dist/email/tokens.js +17 -0
- package/dist/email/tokens.js.map +1 -0
- package/dist/env/index.d.ts +54 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +113 -0
- package/dist/env/index.js.map +1 -0
- package/dist/events/inngest.d.ts +24 -0
- package/dist/events/inngest.d.ts.map +1 -0
- package/dist/events/inngest.js +24 -0
- package/dist/events/inngest.js.map +1 -0
- package/dist/events/taxonomy.d.ts +84 -0
- package/dist/events/taxonomy.d.ts.map +1 -0
- package/dist/events/taxonomy.js +10 -0
- package/dist/events/taxonomy.js.map +1 -0
- package/dist/events/vercel.d.ts +47 -0
- package/dist/events/vercel.d.ts.map +1 -0
- package/dist/events/vercel.js +69 -0
- package/dist/events/vercel.js.map +1 -0
- package/dist/exports/client.d.ts +24 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +21 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/rsc.d.ts +17 -0
- package/dist/exports/rsc.d.ts.map +1 -0
- package/dist/exports/rsc.js +19 -0
- package/dist/exports/rsc.js.map +1 -0
- package/dist/fields/CharacterCountField.d.ts +4 -0
- package/dist/fields/CharacterCountField.d.ts.map +1 -0
- package/dist/fields/CharacterCountField.js +94 -0
- package/dist/fields/CharacterCountField.js.map +1 -0
- package/dist/fields/characterCount.d.ts +15 -0
- package/dist/fields/characterCount.d.ts.map +1 -0
- package/dist/fields/characterCount.js +92 -0
- package/dist/fields/characterCount.js.map +1 -0
- package/dist/fields/checkSlug.d.ts +62 -0
- package/dist/fields/checkSlug.d.ts.map +1 -0
- package/dist/fields/checkSlug.js +119 -0
- package/dist/fields/checkSlug.js.map +1 -0
- package/dist/fields/index.d.ts +9 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.js +9 -0
- package/dist/fields/index.js.map +1 -0
- package/dist/fields/mapFields.d.ts +13 -0
- package/dist/fields/mapFields.d.ts.map +1 -0
- package/dist/fields/mapFields.js +32 -0
- package/dist/fields/mapFields.js.map +1 -0
- package/dist/fields/publishing.d.ts +33 -0
- package/dist/fields/publishing.d.ts.map +1 -0
- package/dist/fields/publishing.js +81 -0
- package/dist/fields/publishing.js.map +1 -0
- package/dist/fields/revisedAt.d.ts +15 -0
- package/dist/fields/revisedAt.d.ts.map +1 -0
- package/dist/fields/revisedAt.js +79 -0
- package/dist/fields/revisedAt.js.map +1 -0
- package/dist/fields/slug.d.ts +21 -0
- package/dist/fields/slug.d.ts.map +1 -0
- package/dist/fields/slug.js +102 -0
- package/dist/fields/slug.js.map +1 -0
- package/dist/fields/unlisted.d.ts +13 -0
- package/dist/fields/unlisted.d.ts.map +1 -0
- package/dist/fields/unlisted.js +35 -0
- package/dist/fields/unlisted.js.map +1 -0
- package/dist/fields/usedBy.d.ts +12 -0
- package/dist/fields/usedBy.d.ts.map +1 -0
- package/dist/fields/usedBy.js +36 -0
- package/dist/fields/usedBy.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/admin/SyncButton.d.ts +27 -0
- package/dist/integrations/admin/SyncButton.d.ts.map +1 -0
- package/dist/integrations/admin/SyncButton.js +134 -0
- package/dist/integrations/admin/SyncButton.js.map +1 -0
- package/dist/integrations/admin/sync-client.d.ts +83 -0
- package/dist/integrations/admin/sync-client.d.ts.map +1 -0
- package/dist/integrations/admin/sync-client.js +121 -0
- package/dist/integrations/admin/sync-client.js.map +1 -0
- package/dist/integrations/collection.d.ts +26 -0
- package/dist/integrations/collection.d.ts.map +1 -0
- package/dist/integrations/collection.js +193 -0
- package/dist/integrations/collection.js.map +1 -0
- package/dist/integrations/endpoints/sync.d.ts +27 -0
- package/dist/integrations/endpoints/sync.d.ts.map +1 -0
- package/dist/integrations/endpoints/sync.js +90 -0
- package/dist/integrations/endpoints/sync.js.map +1 -0
- package/dist/integrations/index.d.ts +22 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +15 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/index.d.ts +3 -0
- package/dist/integrations/integrations/index.d.ts.map +1 -0
- package/dist/integrations/integrations/index.js +2 -0
- package/dist/integrations/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts +33 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.js +54 -0
- package/dist/integrations/integrations/webhook/config-fields.js.map +1 -0
- package/dist/integrations/integrations/webhook/functions.d.ts +24 -0
- package/dist/integrations/integrations/webhook/functions.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/functions.js +139 -0
- package/dist/integrations/integrations/webhook/functions.js.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts +10 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.js +26 -0
- package/dist/integrations/integrations/webhook/healthcheck.js.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts +11 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.js +25 -0
- package/dist/integrations/integrations/webhook/hmac.js.map +1 -0
- package/dist/integrations/integrations/webhook/index.d.ts +6 -0
- package/dist/integrations/integrations/webhook/index.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/index.js +47 -0
- package/dist/integrations/integrations/webhook/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/payload.d.ts +9 -0
- package/dist/integrations/integrations/webhook/payload.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/payload.js +19 -0
- package/dist/integrations/integrations/webhook/payload.js.map +1 -0
- package/dist/integrations/jobs/healthcheck.d.ts +24 -0
- package/dist/integrations/jobs/healthcheck.d.ts.map +1 -0
- package/dist/integrations/jobs/healthcheck.js +133 -0
- package/dist/integrations/jobs/healthcheck.js.map +1 -0
- package/dist/integrations/options.d.ts +54 -0
- package/dist/integrations/options.d.ts.map +1 -0
- package/dist/integrations/options.js +8 -0
- package/dist/integrations/options.js.map +1 -0
- package/dist/integrations/plugin.d.ts +51 -0
- package/dist/integrations/plugin.d.ts.map +1 -0
- package/dist/integrations/plugin.js +215 -0
- package/dist/integrations/plugin.js.map +1 -0
- package/dist/integrations/registry.d.ts +27 -0
- package/dist/integrations/registry.d.ts.map +1 -0
- package/dist/integrations/registry.js +39 -0
- package/dist/integrations/registry.js.map +1 -0
- package/dist/integrations/sync/manual-sync.d.ts +70 -0
- package/dist/integrations/sync/manual-sync.d.ts.map +1 -0
- package/dist/integrations/sync/manual-sync.js +91 -0
- package/dist/integrations/sync/manual-sync.js.map +1 -0
- package/dist/integrations/sync/problems.d.ts +31 -0
- package/dist/integrations/sync/problems.d.ts.map +1 -0
- package/dist/integrations/sync/problems.js +40 -0
- package/dist/integrations/sync/problems.js.map +1 -0
- package/dist/integrations/sync/status.d.ts +15 -0
- package/dist/integrations/sync/status.d.ts.map +1 -0
- package/dist/integrations/sync/status.js +31 -0
- package/dist/integrations/sync/status.js.map +1 -0
- package/dist/integrations/tools/access.d.ts +5 -0
- package/dist/integrations/tools/access.d.ts.map +1 -0
- package/dist/integrations/tools/access.js +14 -0
- package/dist/integrations/tools/access.js.map +1 -0
- package/dist/integrations/tools/descriptors.d.ts +26 -0
- package/dist/integrations/tools/descriptors.d.ts.map +1 -0
- package/dist/integrations/tools/descriptors.js +35 -0
- package/dist/integrations/tools/descriptors.js.map +1 -0
- package/dist/integrations/tools/get-integration-status.d.ts +17 -0
- package/dist/integrations/tools/get-integration-status.d.ts.map +1 -0
- package/dist/integrations/tools/get-integration-status.js +41 -0
- package/dist/integrations/tools/get-integration-status.js.map +1 -0
- package/dist/integrations/tools/index.d.ts +13 -0
- package/dist/integrations/tools/index.d.ts.map +1 -0
- package/dist/integrations/tools/index.js +8 -0
- package/dist/integrations/tools/index.js.map +1 -0
- package/dist/integrations/tools/list-integration-types.d.ts +10 -0
- package/dist/integrations/tools/list-integration-types.d.ts.map +1 -0
- package/dist/integrations/tools/list-integration-types.js +22 -0
- package/dist/integrations/tools/list-integration-types.js.map +1 -0
- package/dist/integrations/tools/list-integrations.d.ts +20 -0
- package/dist/integrations/tools/list-integrations.d.ts.map +1 -0
- package/dist/integrations/tools/list-integrations.js +49 -0
- package/dist/integrations/tools/list-integrations.js.map +1 -0
- package/dist/integrations/tools/test-integration.d.ts +19 -0
- package/dist/integrations/tools/test-integration.d.ts.map +1 -0
- package/dist/integrations/tools/test-integration.js +51 -0
- package/dist/integrations/tools/test-integration.js.map +1 -0
- package/dist/integrations/tools/trigger-sync.d.ts +26 -0
- package/dist/integrations/tools/trigger-sync.d.ts.map +1 -0
- package/dist/integrations/tools/trigger-sync.js +44 -0
- package/dist/integrations/tools/trigger-sync.js.map +1 -0
- package/dist/integrations/types.d.ts +183 -0
- package/dist/integrations/types.d.ts.map +1 -0
- package/dist/integrations/types.js +2 -0
- package/dist/integrations/types.js.map +1 -0
- package/dist/jobs/define.d.ts +17 -0
- package/dist/jobs/define.d.ts.map +1 -0
- package/dist/jobs/define.js +39 -0
- package/dist/jobs/define.js.map +1 -0
- package/dist/jobs/failure-handler.d.ts +39 -0
- package/dist/jobs/failure-handler.d.ts.map +1 -0
- package/dist/jobs/failure-handler.js +62 -0
- package/dist/jobs/failure-handler.js.map +1 -0
- package/dist/jobs/index.d.ts +28 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +7 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/inngest/adapter.d.ts +39 -0
- package/dist/jobs/inngest/adapter.d.ts.map +1 -0
- package/dist/jobs/inngest/adapter.js +81 -0
- package/dist/jobs/inngest/adapter.js.map +1 -0
- package/dist/jobs/inngest/index.d.ts +15 -0
- package/dist/jobs/inngest/index.d.ts.map +1 -0
- package/dist/jobs/inngest/index.js +13 -0
- package/dist/jobs/inngest/index.js.map +1 -0
- package/dist/jobs/options.d.ts +18 -0
- package/dist/jobs/options.d.ts.map +1 -0
- package/dist/jobs/options.js +12 -0
- package/dist/jobs/options.js.map +1 -0
- package/dist/jobs/payload/adapter.d.ts +33 -0
- package/dist/jobs/payload/adapter.d.ts.map +1 -0
- package/dist/jobs/payload/adapter.js +257 -0
- package/dist/jobs/payload/adapter.js.map +1 -0
- package/dist/jobs/payload/index.d.ts +8 -0
- package/dist/jobs/payload/index.d.ts.map +1 -0
- package/dist/jobs/payload/index.js +7 -0
- package/dist/jobs/payload/index.js.map +1 -0
- package/dist/jobs/sender.d.ts +4 -0
- package/dist/jobs/sender.d.ts.map +1 -0
- package/dist/jobs/sender.js +19 -0
- package/dist/jobs/sender.js.map +1 -0
- package/dist/jobs/types.d.ts +105 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/workflow-types.d.ts +280 -0
- package/dist/jobs/workflow-types.d.ts.map +1 -0
- package/dist/jobs/workflow-types.js +22 -0
- package/dist/jobs/workflow-types.js.map +1 -0
- package/dist/logger/index.d.ts +9 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +41 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/mcp/api-key-access.d.ts +50 -0
- package/dist/mcp/api-key-access.d.ts.map +1 -0
- package/dist/mcp/api-key-access.js +94 -0
- package/dist/mcp/api-key-access.js.map +1 -0
- package/dist/mcp/audit-context.d.ts +39 -0
- package/dist/mcp/audit-context.d.ts.map +1 -0
- package/dist/mcp/audit-context.js +36 -0
- package/dist/mcp/audit-context.js.map +1 -0
- package/dist/mcp/audit-server.d.ts +13 -0
- package/dist/mcp/audit-server.d.ts.map +1 -0
- package/dist/mcp/audit-server.js +68 -0
- package/dist/mcp/audit-server.js.map +1 -0
- package/dist/mcp/collector.d.ts +51 -0
- package/dist/mcp/collector.d.ts.map +1 -0
- package/dist/mcp/collector.js +96 -0
- package/dist/mcp/collector.js.map +1 -0
- package/dist/mcp/envelope.d.ts +22 -0
- package/dist/mcp/envelope.d.ts.map +1 -0
- package/dist/mcp/envelope.js +22 -0
- package/dist/mcp/envelope.js.map +1 -0
- package/dist/mcp/index.d.ts +12 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/meta.d.ts +74 -0
- package/dist/mcp/meta.d.ts.map +1 -0
- package/dist/mcp/meta.js +27 -0
- package/dist/mcp/meta.js.map +1 -0
- package/dist/mcp/payload-mcp.d.ts +68 -0
- package/dist/mcp/payload-mcp.d.ts.map +1 -0
- package/dist/mcp/payload-mcp.js +175 -0
- package/dist/mcp/payload-mcp.js.map +1 -0
- package/dist/media/hooks.d.ts +70 -0
- package/dist/media/hooks.d.ts.map +1 -0
- package/dist/media/hooks.js +200 -0
- package/dist/media/hooks.js.map +1 -0
- package/dist/media/index.d.ts +8 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +7 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/svg.d.ts +17 -0
- package/dist/media/svg.d.ts.map +1 -0
- package/dist/media/svg.js +241 -0
- package/dist/media/svg.js.map +1 -0
- package/dist/media/uploadKey.d.ts +25 -0
- package/dist/media/uploadKey.d.ts.map +1 -0
- package/dist/media/uploadKey.js +70 -0
- package/dist/media/uploadKey.js.map +1 -0
- package/dist/observability/collection.d.ts +13 -0
- package/dist/observability/collection.d.ts.map +1 -0
- package/dist/observability/collection.js +76 -0
- package/dist/observability/collection.js.map +1 -0
- package/dist/observability/index.d.ts +10 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +6 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/plugin.d.ts +24 -0
- package/dist/observability/plugin.d.ts.map +1 -0
- package/dist/observability/plugin.js +59 -0
- package/dist/observability/plugin.js.map +1 -0
- package/dist/observability/report.d.ts +175 -0
- package/dist/observability/report.d.ts.map +1 -0
- package/dist/observability/report.js +274 -0
- package/dist/observability/report.js.map +1 -0
- package/dist/observability/tool.d.ts +33 -0
- package/dist/observability/tool.d.ts.map +1 -0
- package/dist/observability/tool.js +75 -0
- package/dist/observability/tool.js.map +1 -0
- package/dist/observability/writer.d.ts +24 -0
- package/dist/observability/writer.d.ts.map +1 -0
- package/dist/observability/writer.js +72 -0
- package/dist/observability/writer.js.map +1 -0
- package/dist/plugin-contract/admin.d.ts +45 -0
- package/dist/plugin-contract/admin.d.ts.map +1 -0
- package/dist/plugin-contract/admin.js +12 -0
- package/dist/plugin-contract/admin.js.map +1 -0
- package/dist/plugin-contract/env.d.ts +29 -0
- package/dist/plugin-contract/env.d.ts.map +1 -0
- package/dist/plugin-contract/env.js +2 -0
- package/dist/plugin-contract/env.js.map +1 -0
- package/dist/plugin-contract/index.d.ts +39 -0
- package/dist/plugin-contract/index.d.ts.map +1 -0
- package/dist/plugin-contract/index.js +5 -0
- package/dist/plugin-contract/index.js.map +1 -0
- package/dist/plugin-contract/mcp.d.ts +51 -0
- package/dist/plugin-contract/mcp.d.ts.map +1 -0
- package/dist/plugin-contract/mcp.js +2 -0
- package/dist/plugin-contract/mcp.js.map +1 -0
- package/dist/plugin-contract/registry.d.ts +23 -0
- package/dist/plugin-contract/registry.d.ts.map +1 -0
- package/dist/plugin-contract/registry.js +51 -0
- package/dist/plugin-contract/registry.js.map +1 -0
- package/dist/publishing/admin/PublishButton.d.ts +22 -0
- package/dist/publishing/admin/PublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/PublishButton.js +164 -0
- package/dist/publishing/admin/PublishButton.js.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts +24 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.js +160 -0
- package/dist/publishing/admin/SchedulePublishField.js.map +1 -0
- package/dist/publishing/admin/UnpublishButton.d.ts +15 -0
- package/dist/publishing/admin/UnpublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/UnpublishButton.js +90 -0
- package/dist/publishing/admin/UnpublishButton.js.map +1 -0
- package/dist/publishing/admin/publishing-client.d.ts +105 -0
- package/dist/publishing/admin/publishing-client.d.ts.map +1 -0
- package/dist/publishing/admin/publishing-client.js +139 -0
- package/dist/publishing/admin/publishing-client.js.map +1 -0
- package/dist/publishing/admin/schedule-state.d.ts +30 -0
- package/dist/publishing/admin/schedule-state.d.ts.map +1 -0
- package/dist/publishing/admin/schedule-state.js +39 -0
- package/dist/publishing/admin/schedule-state.js.map +1 -0
- package/dist/publishing/checks/alt-text.d.ts +17 -0
- package/dist/publishing/checks/alt-text.d.ts.map +1 -0
- package/dist/publishing/checks/alt-text.js +63 -0
- package/dist/publishing/checks/alt-text.js.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts +11 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.js +32 -0
- package/dist/publishing/checks/heading-hierarchy.js.map +1 -0
- package/dist/publishing/checks/index.d.ts +6 -0
- package/dist/publishing/checks/index.d.ts.map +1 -0
- package/dist/publishing/checks/index.js +13 -0
- package/dist/publishing/checks/index.js.map +1 -0
- package/dist/publishing/checks/link-labels.d.ts +9 -0
- package/dist/publishing/checks/link-labels.d.ts.map +1 -0
- package/dist/publishing/checks/link-labels.js +44 -0
- package/dist/publishing/checks/link-labels.js.map +1 -0
- package/dist/publishing/endpoints/admin.d.ts +19 -0
- package/dist/publishing/endpoints/admin.d.ts.map +1 -0
- package/dist/publishing/endpoints/admin.js +112 -0
- package/dist/publishing/endpoints/admin.js.map +1 -0
- package/dist/publishing/events.d.ts +16 -0
- package/dist/publishing/events.d.ts.map +1 -0
- package/dist/publishing/events.js +30 -0
- package/dist/publishing/events.js.map +1 -0
- package/dist/publishing/hooks/block-status-writes.d.ts +52 -0
- package/dist/publishing/hooks/block-status-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/block-status-writes.js +242 -0
- package/dist/publishing/hooks/block-status-writes.js.map +1 -0
- package/dist/publishing/hooks/draft-writes.d.ts +32 -0
- package/dist/publishing/hooks/draft-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/draft-writes.js +76 -0
- package/dist/publishing/hooks/draft-writes.js.map +1 -0
- package/dist/publishing/hooks/schedule-events.d.ts +26 -0
- package/dist/publishing/hooks/schedule-events.d.ts.map +1 -0
- package/dist/publishing/hooks/schedule-events.js +54 -0
- package/dist/publishing/hooks/schedule-events.js.map +1 -0
- package/dist/publishing/index.d.ts +35 -0
- package/dist/publishing/index.d.ts.map +1 -0
- package/dist/publishing/index.js +32 -0
- package/dist/publishing/index.js.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts +24 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js +114 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js.map +1 -0
- package/dist/publishing/jobs/next-revalidate.d.ts +43 -0
- package/dist/publishing/jobs/next-revalidate.d.ts.map +1 -0
- package/dist/publishing/jobs/next-revalidate.js +42 -0
- package/dist/publishing/jobs/next-revalidate.js.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts +24 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js +136 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts +24 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.js +78 -0
- package/dist/publishing/jobs/revalidate-on-publish.js.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts +80 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js +116 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js.map +1 -0
- package/dist/publishing/options.d.ts +100 -0
- package/dist/publishing/options.d.ts.map +1 -0
- package/dist/publishing/options.js +56 -0
- package/dist/publishing/options.js.map +1 -0
- package/dist/publishing/pipeline/index.d.ts +20 -0
- package/dist/publishing/pipeline/index.d.ts.map +1 -0
- package/dist/publishing/pipeline/index.js +88 -0
- package/dist/publishing/pipeline/index.js.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts +13 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.js +37 -0
- package/dist/publishing/pipeline/steps/accessibility.js.map +1 -0
- package/dist/publishing/pipeline/steps/approval.d.ts +14 -0
- package/dist/publishing/pipeline/steps/approval.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/approval.js +54 -0
- package/dist/publishing/pipeline/steps/approval.js.map +1 -0
- package/dist/publishing/pipeline/steps/composition.d.ts +14 -0
- package/dist/publishing/pipeline/steps/composition.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/composition.js +63 -0
- package/dist/publishing/pipeline/steps/composition.js.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts +12 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.js +41 -0
- package/dist/publishing/pipeline/steps/embargo.js.map +1 -0
- package/dist/publishing/pipeline/steps/execute.d.ts +52 -0
- package/dist/publishing/pipeline/steps/execute.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/execute.js +161 -0
- package/dist/publishing/pipeline/steps/execute.js.map +1 -0
- package/dist/publishing/pipeline/steps/exist.d.ts +9 -0
- package/dist/publishing/pipeline/steps/exist.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/exist.js +31 -0
- package/dist/publishing/pipeline/steps/exist.js.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts +9 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.js +63 -0
- package/dist/publishing/pipeline/steps/required-fields.js.map +1 -0
- package/dist/publishing/pipeline/types.d.ts +72 -0
- package/dist/publishing/pipeline/types.d.ts.map +1 -0
- package/dist/publishing/pipeline/types.js +2 -0
- package/dist/publishing/pipeline/types.js.map +1 -0
- package/dist/publishing/plugin.d.ts +4 -0
- package/dist/publishing/plugin.d.ts.map +1 -0
- package/dist/publishing/plugin.js +196 -0
- package/dist/publishing/plugin.js.map +1 -0
- package/dist/publishing/service.d.ts +149 -0
- package/dist/publishing/service.d.ts.map +1 -0
- package/dist/publishing/service.js +474 -0
- package/dist/publishing/service.js.map +1 -0
- package/dist/publishing/tools/actor.d.ts +32 -0
- package/dist/publishing/tools/actor.d.ts.map +1 -0
- package/dist/publishing/tools/actor.js +40 -0
- package/dist/publishing/tools/actor.js.map +1 -0
- package/dist/publishing/tools/descriptors.d.ts +26 -0
- package/dist/publishing/tools/descriptors.d.ts.map +1 -0
- package/dist/publishing/tools/descriptors.js +38 -0
- package/dist/publishing/tools/descriptors.js.map +1 -0
- package/dist/publishing/tools/get-publish-status.d.ts +12 -0
- package/dist/publishing/tools/get-publish-status.d.ts.map +1 -0
- package/dist/publishing/tools/get-publish-status.js +45 -0
- package/dist/publishing/tools/get-publish-status.js.map +1 -0
- package/dist/publishing/tools/index.d.ts +7 -0
- package/dist/publishing/tools/index.d.ts.map +1 -0
- package/dist/publishing/tools/index.js +7 -0
- package/dist/publishing/tools/index.js.map +1 -0
- package/dist/publishing/tools/publish.d.ts +14 -0
- package/dist/publishing/tools/publish.d.ts.map +1 -0
- package/dist/publishing/tools/publish.js +35 -0
- package/dist/publishing/tools/publish.js.map +1 -0
- package/dist/publishing/tools/rollback.d.ts +11 -0
- package/dist/publishing/tools/rollback.d.ts.map +1 -0
- package/dist/publishing/tools/rollback.js +98 -0
- package/dist/publishing/tools/rollback.js.map +1 -0
- package/dist/publishing/tools/schedule-publish.d.ts +20 -0
- package/dist/publishing/tools/schedule-publish.d.ts.map +1 -0
- package/dist/publishing/tools/schedule-publish.js +49 -0
- package/dist/publishing/tools/schedule-publish.js.map +1 -0
- package/dist/publishing/tools/unpublish.d.ts +14 -0
- package/dist/publishing/tools/unpublish.d.ts.map +1 -0
- package/dist/publishing/tools/unpublish.js +29 -0
- package/dist/publishing/tools/unpublish.js.map +1 -0
- package/dist/references/UsedOnPanel.d.ts +3 -0
- package/dist/references/UsedOnPanel.d.ts.map +1 -0
- package/dist/references/UsedOnPanel.js +47 -0
- package/dist/references/UsedOnPanel.js.map +1 -0
- package/dist/references/find.d.ts +46 -0
- package/dist/references/find.d.ts.map +1 -0
- package/dist/references/find.js +142 -0
- package/dist/references/find.js.map +1 -0
- package/dist/references/guards.d.ts +32 -0
- package/dist/references/guards.d.ts.map +1 -0
- package/dist/references/guards.js +76 -0
- package/dist/references/guards.js.map +1 -0
- package/dist/references/index.d.ts +11 -0
- package/dist/references/index.d.ts.map +1 -0
- package/dist/references/index.js +6 -0
- package/dist/references/index.js.map +1 -0
- package/dist/references/plugin.d.ts +51 -0
- package/dist/references/plugin.d.ts.map +1 -0
- package/dist/references/plugin.js +111 -0
- package/dist/references/plugin.js.map +1 -0
- package/dist/references/tools.d.ts +54 -0
- package/dist/references/tools.d.ts.map +1 -0
- package/dist/references/tools.js +124 -0
- package/dist/references/tools.js.map +1 -0
- package/dist/references/walk.d.ts +43 -0
- package/dist/references/walk.d.ts.map +1 -0
- package/dist/references/walk.js +214 -0
- package/dist/references/walk.js.map +1 -0
- package/dist/testing/anonymousAccess.d.ts +111 -0
- package/dist/testing/anonymousAccess.d.ts.map +1 -0
- package/dist/testing/anonymousAccess.js +185 -0
- package/dist/testing/anonymousAccess.js.map +1 -0
- package/dist/testing/describeAnonymousAccess.d.ts +26 -0
- package/dist/testing/describeAnonymousAccess.d.ts.map +1 -0
- package/dist/testing/describeAnonymousAccess.js +76 -0
- package/dist/testing/describeAnonymousAccess.js.map +1 -0
- package/dist/testing/index.d.ts +11 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +9 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/utils/content-hash.d.ts +31 -0
- package/dist/utils/content-hash.d.ts.map +1 -0
- package/dist/utils/content-hash.js +94 -0
- package/dist/utils/content-hash.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/relationships.d.ts +17 -0
- package/dist/utils/relationships.d.ts.map +1 -0
- package/dist/utils/relationships.js +26 -0
- package/dist/utils/relationships.js.map +1 -0
- package/dist/utils/sha256.d.ts +10 -0
- package/dist/utils/sha256.d.ts.map +1 -0
- package/dist/utils/sha256.js +16 -0
- package/dist/utils/sha256.js.map +1 -0
- package/dist/utils/zod-issues.d.ts +19 -0
- package/dist/utils/zod-issues.d.ts.map +1 -0
- package/dist/utils/zod-issues.js +22 -0
- package/dist/utils/zod-issues.js.map +1 -0
- package/package.json +180 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"healthcheck.js","sourceRoot":"","sources":["../../../src/integrations/jobs/healthcheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,M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AC,oBAAoB,CAAC;iBAClD,CAAC,CAAA;gBACF,IAAI,QAAQ,CAAC,EAAE;oBAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;gBACpC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAA;YAC1D,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,EAAE,EAAE,KAAK;oBACT,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;iBAClE,CAAA;YACH,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { WorkflowFailureHandler } from '../jobs/workflow-types.js';
|
|
2
|
+
import type { McpToolCollector } from '../mcp/collector.js';
|
|
3
|
+
import type { Inngest } from 'inngest';
|
|
4
|
+
import type { BaseCorePluginOptions } from '../plugin-contract/index.js';
|
|
5
|
+
import type { CollectionPluginOptions } from '../plugin-contract/admin.js';
|
|
6
|
+
import type { Integration } from './types.js';
|
|
7
|
+
export declare const DEFAULT_INTEGRATIONS_SLUG = "integrations";
|
|
8
|
+
export interface IntegrationsPluginOptions extends Omit<BaseCorePluginOptions, 'routePrefix'>, CollectionPluginOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Inngest client used to register integration functions and to fire
|
|
11
|
+
* manual-sync trigger events. Give this or `emit`: integrations are an
|
|
12
|
+
* event-driven feature and there is no useful behaviour without one.
|
|
13
|
+
*/
|
|
14
|
+
inngest?: Inngest;
|
|
15
|
+
/**
|
|
16
|
+
* How to send events, for a site that runs integrations as jobs rather than
|
|
17
|
+
* on Inngest: `payloadJobs().emit`. Defaults to `inngest.send`.
|
|
18
|
+
*/
|
|
19
|
+
emit?: (event: {
|
|
20
|
+
name: string;
|
|
21
|
+
data: unknown;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Called once when an integration's Inngest run has exhausted its retries,
|
|
25
|
+
* and given to every integration as `ctx.onFailure`. Default:
|
|
26
|
+
* `createTerminalFailureHandler({ payload })` from the workflows package,
|
|
27
|
+
* which records a `job-failures` row (with `jobFailuresPlugin`), logs, and
|
|
28
|
+
* reports. The webhook integration's two functions ran with none.
|
|
29
|
+
*/
|
|
30
|
+
onTerminalFailure?: WorkflowFailureHandler;
|
|
31
|
+
/**
|
|
32
|
+
* Integration modules to register, in addition to the built-in webhook
|
|
33
|
+
* integration. Order matters only for tie-breaking in lists; the registry
|
|
34
|
+
* rejects duplicate ids.
|
|
35
|
+
*/
|
|
36
|
+
integrations?: Integration[];
|
|
37
|
+
/** Override the Integrations collection slug. Default: 'integrations'. */
|
|
38
|
+
collectionSlug?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Where to put this server's MCP tools so Payload's own MCP plugin can serve
|
|
41
|
+
* them.
|
|
42
|
+
*
|
|
43
|
+
* `createMcpToolCollector()` from `@forumone/throughline`. The host hands
|
|
44
|
+
* its array to `@payloadcms/plugin-mcp` at config time and this plugin fills
|
|
45
|
+
* it at `onInit` — which is the first moment the tools can exist, since they
|
|
46
|
+
* close over `payload`, and still before any request reads the array.
|
|
47
|
+
*
|
|
48
|
+
* Omit it and nothing changes: this server keeps its own `/mcp` endpoint,
|
|
49
|
+
* which is what lets a host move one server at a time.
|
|
50
|
+
*/
|
|
51
|
+
mcpTools?: McpToolCollector;
|
|
52
|
+
}
|
|
53
|
+
export declare function validateOptions(options: IntegrationsPluginOptions): IntegrationsPluginOptions;
|
|
54
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/integrations/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;AAOvD,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,aAAa,CAAC,EAChD,uBAAuB;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAChE;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;IAC1C;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,yBAAyB,GAAG,yBAAyB,CAO7F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const DEFAULT_INTEGRATIONS_SLUG = 'integrations';
|
|
2
|
+
export function validateOptions(options) {
|
|
3
|
+
if (!options.inngest && !options.emit) {
|
|
4
|
+
throw new Error('integrationsPlugin requires an Inngest client (`options.inngest`) or a jobs adapter\'s `emit`.');
|
|
5
|
+
}
|
|
6
|
+
return options;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/integrations/options.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,yBAAyB,GAAG,cAAc,CAAA;AAqDvD,MAAM,UAAU,eAAe,CAAC,OAAkC;IAChE,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAA;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { CorePlugin } from '../plugin-contract/index.js';
|
|
2
|
+
import { type IntegrationsPluginOptions } from './options.js';
|
|
3
|
+
import { IntegrationRegistry } from './registry.js';
|
|
4
|
+
import type { IntegrationContext } from './types.js';
|
|
5
|
+
import { type Job } from '../jobs/types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Integrations server. Registers the Integrations collection — with its
|
|
8
|
+
* manual-sync endpoint and the Sync now button in its sidebar — the five-tool
|
|
9
|
+
* MCP server, and a process-local registry of integration modules. The webhook integration is registered automatically; clients
|
|
10
|
+
* extend the registry by passing additional integrations via options.
|
|
11
|
+
*
|
|
12
|
+
* Integration Inngest functions are not served here — they are exposed
|
|
13
|
+
* via `getIntegrationRegistry(payload)` so the client app's Inngest
|
|
14
|
+
* endpoint can merge them with its own functions. See
|
|
15
|
+
* `docs/integrations-wiring.md` in the repository root.
|
|
16
|
+
*
|
|
17
|
+
* The collection carries one admin component, the sidebar's Sync now button,
|
|
18
|
+
* so hosts must run `payload generate:importmap` after adding this plugin (the
|
|
19
|
+
* dev server does it automatically). A stale import map 500s the admin screen.
|
|
20
|
+
*/
|
|
21
|
+
export declare const integrationsPlugin: CorePlugin<IntegrationsPluginOptions>;
|
|
22
|
+
/**
|
|
23
|
+
* The registry this plugin attached at init, if it did.
|
|
24
|
+
*
|
|
25
|
+
* `Fn` is the host's own Inngest function type. Naming it is what lets the host
|
|
26
|
+
* serve `createFunctions()` results without asserting them back — the registry
|
|
27
|
+
* stores integrations at `unknown` otherwise, and an `unknown[]` cannot be
|
|
28
|
+
* handed to `serve()`:
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* const registry = getIntegrationRegistry<InngestFunction.Any>(payload)
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* There is no checking behind it either way — the value comes off a symbol on
|
|
35
|
+
* the Payload instance. What the parameter buys is that the assertion happens
|
|
36
|
+
* once, here, in terms of the host's own types, rather than at every read.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getIntegrationRegistry<Fn = unknown>(payload: unknown): IntegrationRegistry<Fn> | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Every registered integration's jobs, for a site whose jobs adapter takes its
|
|
41
|
+
* jobs while the config is being built (`payloadJobs().plugin(...)`).
|
|
42
|
+
*
|
|
43
|
+
* Pass the same `integrations` as `integrationsPlugin`; the built-in webhook is
|
|
44
|
+
* included, as the plugin includes it. An integration without `createJobs`
|
|
45
|
+
* contributes nothing here and runs on Inngest only. Each job reads the
|
|
46
|
+
* integrations context from Payload when it runs, so `integrationsPlugin` must
|
|
47
|
+
* be registered too.
|
|
48
|
+
*/
|
|
49
|
+
export declare function integrationsJobs(options?: Pick<IntegrationsPluginOptions, 'integrations'>): Job[];
|
|
50
|
+
export declare function getIntegrationContext(payload: unknown): IntegrationContext | undefined;
|
|
51
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/integrations/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAK7D,OAAO,EAAE,KAAK,yBAAyB,EAA8C,MAAM,cAAc,CAAA;AACzG,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAKnD,OAAO,KAAK,EAAe,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEjE,OAAO,EAAE,KAAK,GAAG,EAAmB,MAAM,kBAAkB,CAAA;AA6B5D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CA8IlE,CAAA;AAEH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,GAAG,OAAO,EACjD,OAAO,EAAE,OAAO,GACf,mBAAmB,CAAC,EAAE,CAAC,GAAG,SAAS,CAIrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,IAAI,CAAC,yBAAyB,EAAE,cAAc,CAAM,GAC5D,GAAG,EAAE,CAiBP;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAEtF"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { getPluginRegistry } from '../plugin-contract/registry.js';
|
|
2
|
+
import { createNamedLogger, defaultLogger } from '../logger/index.js';
|
|
3
|
+
import { getAuditWriter } from '../audit/plugin.js';
|
|
4
|
+
import { validateOptions, DEFAULT_INTEGRATIONS_SLUG } from './options.js';
|
|
5
|
+
import { IntegrationRegistry } from './registry.js';
|
|
6
|
+
import { createIntegrationsCollection } from './collection.js';
|
|
7
|
+
import { createSyncEndpoint } from './endpoints/sync.js';
|
|
8
|
+
import { createStatusWriter } from './sync/status.js';
|
|
9
|
+
import { webhookIntegration } from './integrations/index.js';
|
|
10
|
+
import { createTerminalFailureHandler } from '../jobs/failure-handler.js';
|
|
11
|
+
import { INTEGRATIONS_TOOL_DESCRIPTORS, createGetIntegrationStatusTool, createListIntegrationsTool, createListIntegrationTypesTool, createTestIntegrationTool, createTriggerSyncTool, } from './tools/index.js';
|
|
12
|
+
const PLUGIN_ID = '@forumone/throughline/integrations';
|
|
13
|
+
const PLUGIN_VERSION = '0.1.0';
|
|
14
|
+
/*
|
|
15
|
+
A site that runs integrations as jobs has no Inngest client, but the context's
|
|
16
|
+
type still promises one, so existing integrations keep compiling. Any use of it
|
|
17
|
+
says what to do instead.
|
|
18
|
+
*/
|
|
19
|
+
const noInngest = new Proxy({}, {
|
|
20
|
+
get: () => {
|
|
21
|
+
throw new Error('This site runs integrations as jobs and has no Inngest client. Send events with ctx.emit, and give the integration createJobs.');
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
const REGISTRY_SYMBOL = Symbol.for('@forumone/throughline/integrations-registry');
|
|
25
|
+
const CONTEXT_SYMBOL = Symbol.for('@forumone/throughline/integrations-context');
|
|
26
|
+
/**
|
|
27
|
+
* Integrations server. Registers the Integrations collection — with its
|
|
28
|
+
* manual-sync endpoint and the Sync now button in its sidebar — the five-tool
|
|
29
|
+
* MCP server, and a process-local registry of integration modules. The webhook integration is registered automatically; clients
|
|
30
|
+
* extend the registry by passing additional integrations via options.
|
|
31
|
+
*
|
|
32
|
+
* Integration Inngest functions are not served here — they are exposed
|
|
33
|
+
* via `getIntegrationRegistry(payload)` so the client app's Inngest
|
|
34
|
+
* endpoint can merge them with its own functions. See
|
|
35
|
+
* `docs/integrations-wiring.md` in the repository root.
|
|
36
|
+
*
|
|
37
|
+
* The collection carries one admin component, the sidebar's Sync now button,
|
|
38
|
+
* so hosts must run `payload generate:importmap` after adding this plugin (the
|
|
39
|
+
* dev server does it automatically). A stale import map 500s the admin screen.
|
|
40
|
+
*/
|
|
41
|
+
export const integrationsPlugin = (rawOptions) => (incomingConfig) => {
|
|
42
|
+
if (rawOptions.enabled === false)
|
|
43
|
+
return incomingConfig;
|
|
44
|
+
const options = validateOptions(rawOptions);
|
|
45
|
+
const collectionSlug = options.collectionSlug ?? DEFAULT_INTEGRATIONS_SLUG;
|
|
46
|
+
const inngest = options.inngest;
|
|
47
|
+
// `emit` when the site gave one, otherwise Inngest; validateOptions saw to one of them.
|
|
48
|
+
const emit = options.emit ??
|
|
49
|
+
(async (event) => {
|
|
50
|
+
await inngest.send(event);
|
|
51
|
+
});
|
|
52
|
+
// What the manual-sync endpoint and tool send through.
|
|
53
|
+
const transport = { ...(inngest ? { inngest } : {}), emit };
|
|
54
|
+
const logger = createNamedLogger('integrations', options.logger ?? defaultLogger);
|
|
55
|
+
const registry = new IntegrationRegistry();
|
|
56
|
+
registry.register(webhookIntegration);
|
|
57
|
+
for (const integration of options.integrations ?? []) {
|
|
58
|
+
registry.register(integration);
|
|
59
|
+
}
|
|
60
|
+
const collection = createIntegrationsCollection({
|
|
61
|
+
slug: collectionSlug,
|
|
62
|
+
registry,
|
|
63
|
+
// The admin's path to `integration/manual-sync`, sharing
|
|
64
|
+
// `requestManualSync` with the `trigger_sync` MCP tool so the two cannot
|
|
65
|
+
// disagree about what a trigger checks or what event it sends.
|
|
66
|
+
endpoints: [createSyncEndpoint({ collectionSlug, ...transport })],
|
|
67
|
+
...(options.admin ? { admin: options.admin } : {}),
|
|
68
|
+
});
|
|
69
|
+
/*
|
|
70
|
+
Declared here, bound at `onInit` — `mcpPlugin` generates its per-key
|
|
71
|
+
checkboxes from these names and descriptions while the config is built, and
|
|
72
|
+
denies any tool it has no checkbox for. This plugin must therefore come
|
|
73
|
+
before `mcpPlugin` in the host's array.
|
|
74
|
+
*/
|
|
75
|
+
options.mcpTools?.declare(INTEGRATIONS_TOOL_DESCRIPTORS, { serverName: 'integrations' });
|
|
76
|
+
return {
|
|
77
|
+
...incomingConfig,
|
|
78
|
+
collections: [...(incomingConfig.collections ?? []), collection],
|
|
79
|
+
onInit: async (payload) => {
|
|
80
|
+
if (incomingConfig.onInit)
|
|
81
|
+
await incomingConfig.onInit(payload);
|
|
82
|
+
const pluginRegistry = getPluginRegistry(payload);
|
|
83
|
+
pluginRegistry.requireCapability('audit-log', PLUGIN_ID);
|
|
84
|
+
const auditWriter = getAuditWriter(payload);
|
|
85
|
+
const context = {
|
|
86
|
+
inngest: options.inngest ?? noInngest,
|
|
87
|
+
emit,
|
|
88
|
+
onFailure: options.onTerminalFailure ?? createTerminalFailureHandler({ payload }),
|
|
89
|
+
integrationsCollectionSlug: collectionSlug,
|
|
90
|
+
async loadInstances(integrationId) {
|
|
91
|
+
const result = await payload.find({
|
|
92
|
+
collection: collectionSlug,
|
|
93
|
+
where: {
|
|
94
|
+
and: [
|
|
95
|
+
{ integrationType: { equals: integrationId } },
|
|
96
|
+
{ enabled: { equals: true } },
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
limit: 100,
|
|
100
|
+
});
|
|
101
|
+
return result.docs.map((doc) => ({
|
|
102
|
+
id: String(doc['id']),
|
|
103
|
+
name: String(doc['name']),
|
|
104
|
+
config: (doc['config'] ?? {}),
|
|
105
|
+
}));
|
|
106
|
+
},
|
|
107
|
+
updateStatus: createStatusWriter(payload, collectionSlug),
|
|
108
|
+
async recordAudit(event) {
|
|
109
|
+
await auditWriter({
|
|
110
|
+
actor: { type: 'system', apiKeyName: `integration:${event.integrationId}` },
|
|
111
|
+
action: event.action,
|
|
112
|
+
mcpServer: 'integrations',
|
|
113
|
+
mcpTool: `integration:${event.integrationId}`,
|
|
114
|
+
integrationId: event.instanceName,
|
|
115
|
+
summary: event.summary,
|
|
116
|
+
...(event.errorMessage ? { errorMessage: event.errorMessage } : {}),
|
|
117
|
+
success: event.action === 'integration.synced',
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
for (const integration of registry.list()) {
|
|
122
|
+
if (options.inngest) {
|
|
123
|
+
const fnCount = integration.createFunctions(context).length;
|
|
124
|
+
logger.info('Integration registered', { id: integration.id, inngestFunctions: fnCount });
|
|
125
|
+
}
|
|
126
|
+
else if (integration.createJobs) {
|
|
127
|
+
logger.info('Integration registered', { id: integration.id, runner: 'jobs' });
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
logger.warn('Integration has no jobs, and this site has no Inngest client, so it will not run', { id: integration.id });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const deps = { payload, collectionSlug };
|
|
134
|
+
const tools = [
|
|
135
|
+
createListIntegrationsTool(deps),
|
|
136
|
+
createGetIntegrationStatusTool(deps),
|
|
137
|
+
createTriggerSyncTool({ ...deps, ...transport }),
|
|
138
|
+
createTestIntegrationTool({ ...deps, registry }),
|
|
139
|
+
createListIntegrationTypesTool({ registry }),
|
|
140
|
+
];
|
|
141
|
+
// Payload's own MCP plugin, and the only transport these tools have.
|
|
142
|
+
// `onInit` is both the earliest they can exist and still early enough
|
|
143
|
+
// that `mcpPlugin` reads the array populated.
|
|
144
|
+
options.mcpTools?.add(tools, { serverName: 'integrations', logger, audit: auditWriter });
|
|
145
|
+
Object.defineProperty(payload, REGISTRY_SYMBOL, {
|
|
146
|
+
value: registry,
|
|
147
|
+
enumerable: false,
|
|
148
|
+
writable: false,
|
|
149
|
+
configurable: false,
|
|
150
|
+
});
|
|
151
|
+
Object.defineProperty(payload, CONTEXT_SYMBOL, {
|
|
152
|
+
value: context,
|
|
153
|
+
enumerable: false,
|
|
154
|
+
writable: false,
|
|
155
|
+
configurable: false,
|
|
156
|
+
});
|
|
157
|
+
pluginRegistry.register({
|
|
158
|
+
id: PLUGIN_ID,
|
|
159
|
+
version: PLUGIN_VERSION,
|
|
160
|
+
capabilities: ['integrations', 'integration-registry'],
|
|
161
|
+
});
|
|
162
|
+
logger.info('Integrations server ready', {
|
|
163
|
+
collectionSlug,
|
|
164
|
+
integrationCount: registry.size,
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* The registry this plugin attached at init, if it did.
|
|
171
|
+
*
|
|
172
|
+
* `Fn` is the host's own Inngest function type. Naming it is what lets the host
|
|
173
|
+
* serve `createFunctions()` results without asserting them back — the registry
|
|
174
|
+
* stores integrations at `unknown` otherwise, and an `unknown[]` cannot be
|
|
175
|
+
* handed to `serve()`:
|
|
176
|
+
*
|
|
177
|
+
* ```ts
|
|
178
|
+
* const registry = getIntegrationRegistry<InngestFunction.Any>(payload)
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* There is no checking behind it either way — the value comes off a symbol on
|
|
182
|
+
* the Payload instance. What the parameter buys is that the assertion happens
|
|
183
|
+
* once, here, in terms of the host's own types, rather than at every read.
|
|
184
|
+
*/
|
|
185
|
+
export function getIntegrationRegistry(payload) {
|
|
186
|
+
return payload[REGISTRY_SYMBOL];
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Every registered integration's jobs, for a site whose jobs adapter takes its
|
|
190
|
+
* jobs while the config is being built (`payloadJobs().plugin(...)`).
|
|
191
|
+
*
|
|
192
|
+
* Pass the same `integrations` as `integrationsPlugin`; the built-in webhook is
|
|
193
|
+
* included, as the plugin includes it. An integration without `createJobs`
|
|
194
|
+
* contributes nothing here and runs on Inngest only. Each job reads the
|
|
195
|
+
* integrations context from Payload when it runs, so `integrationsPlugin` must
|
|
196
|
+
* be registered too.
|
|
197
|
+
*/
|
|
198
|
+
export function integrationsJobs(options = {}) {
|
|
199
|
+
const getContext = (job) => {
|
|
200
|
+
if (!job.payload) {
|
|
201
|
+
throw new Error('integrationsJobs: this runner gave the job no Payload instance. Use payloadJobs, or pass `payload` to inngestJobs.');
|
|
202
|
+
}
|
|
203
|
+
const context = getIntegrationContext(job.payload);
|
|
204
|
+
if (!context) {
|
|
205
|
+
throw new Error('integrationsJobs: no integrations context on Payload. Register integrationsPlugin as well.');
|
|
206
|
+
}
|
|
207
|
+
return context;
|
|
208
|
+
};
|
|
209
|
+
const integrations = [webhookIntegration, ...(options.integrations ?? [])];
|
|
210
|
+
return integrations.flatMap((integration) => integration.createJobs?.(getContext) ?? []);
|
|
211
|
+
}
|
|
212
|
+
export function getIntegrationContext(payload) {
|
|
213
|
+
return payload[CONTEXT_SYMBOL];
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/integrations/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAi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E;gBACvC,cAAc;gBACd,gBAAgB,EAAE,QAAQ,CAAC,IAAI;aAChC,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAgB;IAEhB,OAAQ,OAAmC,CAAC,eAAe,CAE9C,CAAA;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAA2D,EAAE;IAE7D,MAAM,UAAU,GAAG,CAAC,GAAe,EAAsB,EAAE;QACzD,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CACb,oHAAoH,CACrH,CAAA;QACH,CAAC;QACD,MAAM,OAAO,GAAG,qBAAqB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAClD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CACb,4FAA4F,CAC7F,CAAA;QACH,CAAC;QACD,OAAO,OAAO,CAAA;IAChB,CAAC,CAAA;IACD,MAAM,YAAY,GAAG,CAAC,kBAA4C,EAAE,GAAG,CAAC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,CAAA;IACpG,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;AAC1F,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAQ,OAAmC,CAAC,cAAc,CAAmC,CAAA;AAC/F,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Integration } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tiny registry keyed by integration id. Construction is per-plugin-init
|
|
4
|
+
* (not a module-level singleton) so two Payload configs in the same process
|
|
5
|
+
* don't share state. Keeps duplicate-id detection synchronous and simple.
|
|
6
|
+
*
|
|
7
|
+
* Generic in the integrations' function type, and `unknown` by default, for the
|
|
8
|
+
* same reason `Integration` is: this package never touches what
|
|
9
|
+
* `createFunctions` returns, and the host that serves them should not have to
|
|
10
|
+
* assert its way back to its own type after putting them in here.
|
|
11
|
+
*
|
|
12
|
+
* A host names it once, where it reads the registry:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* const registry = getIntegrationRegistry<InngestFunction.Any>(payload)
|
|
16
|
+
* const functions = registry?.list().flatMap((i) => i.createFunctions(ctx)) ?? []
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class IntegrationRegistry<Fn = unknown> {
|
|
20
|
+
private readonly byId;
|
|
21
|
+
register(integration: Integration<Record<string, unknown>, Fn>): void;
|
|
22
|
+
get(id: string): Integration<Record<string, unknown>, Fn> | undefined;
|
|
23
|
+
list(): Integration<Record<string, unknown>, Fn>[];
|
|
24
|
+
has(id: string): boolean;
|
|
25
|
+
get size(): number;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/integrations/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,mBAAmB,CAAC,EAAE,GAAG,OAAO;IAC3C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA8D;IAEnF,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI;IAOrE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,SAAS;IAIrE,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,EAAE;IAIlD,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIxB,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny registry keyed by integration id. Construction is per-plugin-init
|
|
3
|
+
* (not a module-level singleton) so two Payload configs in the same process
|
|
4
|
+
* don't share state. Keeps duplicate-id detection synchronous and simple.
|
|
5
|
+
*
|
|
6
|
+
* Generic in the integrations' function type, and `unknown` by default, for the
|
|
7
|
+
* same reason `Integration` is: this package never touches what
|
|
8
|
+
* `createFunctions` returns, and the host that serves them should not have to
|
|
9
|
+
* assert its way back to its own type after putting them in here.
|
|
10
|
+
*
|
|
11
|
+
* A host names it once, where it reads the registry:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* const registry = getIntegrationRegistry<InngestFunction.Any>(payload)
|
|
15
|
+
* const functions = registry?.list().flatMap((i) => i.createFunctions(ctx)) ?? []
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export class IntegrationRegistry {
|
|
19
|
+
byId = new Map();
|
|
20
|
+
register(integration) {
|
|
21
|
+
if (this.byId.has(integration.id)) {
|
|
22
|
+
throw new Error(`Integration "${integration.id}" is already registered`);
|
|
23
|
+
}
|
|
24
|
+
this.byId.set(integration.id, integration);
|
|
25
|
+
}
|
|
26
|
+
get(id) {
|
|
27
|
+
return this.byId.get(id);
|
|
28
|
+
}
|
|
29
|
+
list() {
|
|
30
|
+
return Array.from(this.byId.values());
|
|
31
|
+
}
|
|
32
|
+
has(id) {
|
|
33
|
+
return this.byId.has(id);
|
|
34
|
+
}
|
|
35
|
+
get size() {
|
|
36
|
+
return this.byId.size;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/integrations/registry.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,mBAAmB;IACb,IAAI,GAAG,IAAI,GAAG,EAAoD,CAAA;IAEnF,QAAQ,CAAC,WAAqD;QAC5D,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,gBAAgB,WAAW,CAAC,EAAE,yBAAyB,CAAC,CAAA;QAC1E,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,WAAW,CAAC,CAAA;IAC5C,CAAC;IAED,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAC1B,CAAC;IAED,IAAI;QACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IACvC,CAAC;IAED,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAC1B,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;CACF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Inngest } from 'inngest';
|
|
2
|
+
import type { Payload } from 'payload';
|
|
3
|
+
/**
|
|
4
|
+
* The event every integration's manual-sync function subscribes to. Fired for
|
|
5
|
+
* *all* integrations, which is why each handler filters the payload down to
|
|
6
|
+
* its own instance rather than trusting the event.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MANUAL_SYNC_EVENT = "integration/manual-sync";
|
|
9
|
+
export interface RequestManualSyncDeps {
|
|
10
|
+
payload: Payload;
|
|
11
|
+
collectionSlug: string;
|
|
12
|
+
/** Sends the manual-sync event, unless `emit` is given. */
|
|
13
|
+
inngest?: Inngest;
|
|
14
|
+
/** Sends the manual-sync event on a site that runs integrations as jobs. */
|
|
15
|
+
emit?: (event: {
|
|
16
|
+
name: string;
|
|
17
|
+
data: unknown;
|
|
18
|
+
}) => Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export interface RequestManualSyncArgs {
|
|
21
|
+
/** Payload id of the instance to sync. */
|
|
22
|
+
instanceId: string;
|
|
23
|
+
/** Who asked. Recorded on the event so the run can be traced back to them. */
|
|
24
|
+
triggeredBy?: number | string | null;
|
|
25
|
+
/** Why. Carried on the event for the audit trail; not otherwise used. */
|
|
26
|
+
reason?: string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Why a trigger was refused. Callers map these onto whatever their transport
|
|
30
|
+
* uses to say no — an error envelope for MCP, a status code for HTTP.
|
|
31
|
+
*/
|
|
32
|
+
export type ManualSyncRefusal =
|
|
33
|
+
/** No instance with that id. */
|
|
34
|
+
'not-found'
|
|
35
|
+
/** The instance exists but `enabled` is false. */
|
|
36
|
+
| 'disabled'
|
|
37
|
+
/** Inngest would not take the event. */
|
|
38
|
+
| 'send-failed';
|
|
39
|
+
export type RequestManualSyncResult = {
|
|
40
|
+
ok: true;
|
|
41
|
+
instanceId: string;
|
|
42
|
+
instanceName: string;
|
|
43
|
+
integrationType: string;
|
|
44
|
+
/**
|
|
45
|
+
* The instance's `lastSyncAt` at the moment the event was sent, or null
|
|
46
|
+
* if it has never run. A caller watching for the run to finish compares
|
|
47
|
+
* against this rather than against whatever it last rendered.
|
|
48
|
+
*/
|
|
49
|
+
lastSyncAt: string | null;
|
|
50
|
+
} | {
|
|
51
|
+
ok: false;
|
|
52
|
+
code: ManualSyncRefusal;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Sends `integration/manual-sync` for one instance, having checked that the
|
|
57
|
+
* instance exists and is enabled.
|
|
58
|
+
*
|
|
59
|
+
* This is the single definition of what triggering a sync *means*, shared by
|
|
60
|
+
* the `trigger_sync` MCP tool and the admin endpoint behind the Sync now
|
|
61
|
+
* button. It deliberately does not check permissions: MCP and HTTP authenticate
|
|
62
|
+
* differently and each caller applies `admin`-only itself, before calling.
|
|
63
|
+
*
|
|
64
|
+
* It fires an event and returns. The sync runs in Inngest and finishes later —
|
|
65
|
+
* an `ok` result means the run was *requested*, never that it succeeded. The
|
|
66
|
+
* outcome lands on the instance's `lastSyncAt` / `lastSyncStatus` / `lastError`
|
|
67
|
+
* when the run completes.
|
|
68
|
+
*/
|
|
69
|
+
export declare function requestManualSync(deps: RequestManualSyncDeps, args: RequestManualSyncArgs): Promise<RequestManualSyncResult>;
|
|
70
|
+
//# sourceMappingURL=manual-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manual-sync.d.ts","sourceRoot":"","sources":["../../../src/integrations/sync/manual-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,4BAA4B,CAAA;AAE1D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACjE;AAED,MAAM,WAAW,qBAAqB;IACpC,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IACpC,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB;AAC3B,gCAAgC;AAC9B,WAAW;AACb,kDAAkD;GAChD,UAAU;AACZ,wCAAwC;GACtC,aAAa,CAAA;AAEjB,MAAM,MAAM,uBAAuB,GAC/B;IACE,EAAE,EAAE,IAAI,CAAA;IACR,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB;;;;OAIG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,GACD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,qBAAqB,EAC3B,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,uBAAuB,CAAC,CA6ElC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The event every integration's manual-sync function subscribes to. Fired for
|
|
3
|
+
* *all* integrations, which is why each handler filters the payload down to
|
|
4
|
+
* its own instance rather than trusting the event.
|
|
5
|
+
*/
|
|
6
|
+
export const MANUAL_SYNC_EVENT = 'integration/manual-sync';
|
|
7
|
+
/**
|
|
8
|
+
* Sends `integration/manual-sync` for one instance, having checked that the
|
|
9
|
+
* instance exists and is enabled.
|
|
10
|
+
*
|
|
11
|
+
* This is the single definition of what triggering a sync *means*, shared by
|
|
12
|
+
* the `trigger_sync` MCP tool and the admin endpoint behind the Sync now
|
|
13
|
+
* button. It deliberately does not check permissions: MCP and HTTP authenticate
|
|
14
|
+
* differently and each caller applies `admin`-only itself, before calling.
|
|
15
|
+
*
|
|
16
|
+
* It fires an event and returns. The sync runs in Inngest and finishes later —
|
|
17
|
+
* an `ok` result means the run was *requested*, never that it succeeded. The
|
|
18
|
+
* outcome lands on the instance's `lastSyncAt` / `lastSyncStatus` / `lastError`
|
|
19
|
+
* when the run completes.
|
|
20
|
+
*/
|
|
21
|
+
export async function requestManualSync(deps, args) {
|
|
22
|
+
let doc;
|
|
23
|
+
try {
|
|
24
|
+
doc = (await deps.payload.findByID({
|
|
25
|
+
collection: deps.collectionSlug,
|
|
26
|
+
id: args.instanceId,
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
doc = null;
|
|
31
|
+
}
|
|
32
|
+
if (!doc) {
|
|
33
|
+
return {
|
|
34
|
+
ok: false,
|
|
35
|
+
code: 'not-found',
|
|
36
|
+
message: `No integration instance with id "${args.instanceId}".`,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const instanceName = String(doc['name']);
|
|
40
|
+
if (doc['enabled'] !== true) {
|
|
41
|
+
return {
|
|
42
|
+
ok: false,
|
|
43
|
+
code: 'disabled',
|
|
44
|
+
message: `Integration "${instanceName}" is disabled. Enable it in the admin before triggering.`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const integrationType = String(doc['integrationType']);
|
|
48
|
+
try {
|
|
49
|
+
const send = deps.emit ?? ((event) => deps.inngest.send(event).then(() => undefined));
|
|
50
|
+
if (!deps.emit && !deps.inngest)
|
|
51
|
+
throw new Error('No Inngest client or emit to send the manual sync with.');
|
|
52
|
+
await send({
|
|
53
|
+
name: MANUAL_SYNC_EVENT,
|
|
54
|
+
data: {
|
|
55
|
+
integrationId: integrationType,
|
|
56
|
+
instanceId: args.instanceId,
|
|
57
|
+
triggeredBy: args.triggeredBy ?? null,
|
|
58
|
+
reason: args.reason ?? null,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
/*
|
|
64
|
+
A failed send used to escape as an unhandled rejection, which the MCP
|
|
65
|
+
transport turned into a generic tool error and a button would have turned
|
|
66
|
+
into nothing at all — the worst outcome, because a sync that was never
|
|
67
|
+
requested looks exactly like one that has not finished yet.
|
|
68
|
+
*/
|
|
69
|
+
return {
|
|
70
|
+
ok: false,
|
|
71
|
+
code: 'send-failed',
|
|
72
|
+
message: `Could not reach Inngest to queue the sync: ${error instanceof Error ? error.message : String(error)}`,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
// A `date` field comes back as an ISO string over REST and as a Date from
|
|
76
|
+
// the local API, and this function is called from both.
|
|
77
|
+
const rawLastSyncAt = doc['lastSyncAt'];
|
|
78
|
+
const lastSyncAt = rawLastSyncAt instanceof Date
|
|
79
|
+
? rawLastSyncAt.toISOString()
|
|
80
|
+
: typeof rawLastSyncAt === 'string'
|
|
81
|
+
? rawLastSyncAt
|
|
82
|
+
: null;
|
|
83
|
+
return {
|
|
84
|
+
ok: true,
|
|
85
|
+
instanceId: args.instanceId,
|
|
86
|
+
instanceName,
|
|
87
|
+
integrationType,
|
|
88
|
+
lastSyncAt,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=manual-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manual-sync.js","sourceRoot":"","sources":["../../../src/integrations/sync/manual-sync.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,CAAA;AA+C1D;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAA2B,EAC3B,IAA2B;IAE3B,IAAI,GAAmC,CAAA;IACvC,IAAI,CAAC;QACH,GAAG,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YACjC,UAAU,EAAE,IAAI,CAAC,cAAc;YAC/B,EAAE,EAAE,IAAI,CAAC,UAAU;SACpB,CAAC,CAAmC,CAAA;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,GAAG,GAAG,IAAI,CAAA;IACZ,CAAC;IAED,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO;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AAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE;SACH,CAAA;IACH,CAAC;IAED,0EAA0E;IAC1E,wDAAwD;IACxD,MAAM,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC,CAAA;IACvC,MAAM,UAAU,GACd,aAAa,YAAY,IAAI;QAC3B,CAAC,CAAC,aAAa,CAAC,WAAW,EAAE;QAC7B,CAAC,CAAC,OAAO,aAAa,KAAK,QAAQ;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,IAAI,CAAA;IAEZ,OAAO;QACL,EAAE,EAAE,IAAI;QACR,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,YAAY;QACZ,eAAe;QACf,UAAU;KACX,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IntegrationStatusUpdate } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The longest {@link problemReport} returns by default. Long enough for a
|
|
4
|
+
* handful of reasons; past that, the count says how many more there were.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_PROBLEM_REPORT_LENGTH = 500;
|
|
7
|
+
export interface ProblemReportOptions {
|
|
8
|
+
/** The longest the report may be, suffix included. Defaults to 500. */
|
|
9
|
+
maxLength?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* One line per thing a run left undone, joined into the single string that
|
|
13
|
+
* `lastError` and an audit `errorMessage` can share. `undefined` when the list
|
|
14
|
+
* is empty.
|
|
15
|
+
*
|
|
16
|
+
* A report longer than `maxLength` is cut at the limit and ends with the total,
|
|
17
|
+
* e.g. `… (40 problems in all)`, so a long run still says how much went wrong.
|
|
18
|
+
*/
|
|
19
|
+
export declare function problemReport(problems: readonly string[], options?: ProblemReportOptions): string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The `updateStatus` arguments for a run that may have left some records
|
|
22
|
+
* behind: `success` when `problems` is empty, otherwise `partial` with the
|
|
23
|
+
* capped {@link problemReport}. The status is derived from the list, so the
|
|
24
|
+
* two cannot disagree.
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* await ctx.updateStatus(instance.id, ...statusFromProblems(problems))
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function statusFromProblems(problems: readonly string[], options?: ProblemReportOptions): IntegrationStatusUpdate;
|
|
31
|
+
//# sourceMappingURL=problems.d.ts.map
|