@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,33 @@
|
|
|
1
|
+
import type { Field } from 'payload';
|
|
2
|
+
/**
|
|
3
|
+
* The event names the webhook integration can subscribe to. Kept in sync
|
|
4
|
+
* with the core `FrameworkEvents` taxonomy plus the approval/decided event
|
|
5
|
+
* augmented by the approvals package.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WEBHOOK_EVENT_OPTIONS: readonly [{
|
|
8
|
+
readonly label: "Page published";
|
|
9
|
+
readonly value: "content/page.published";
|
|
10
|
+
}, {
|
|
11
|
+
readonly label: "Page unpublished";
|
|
12
|
+
readonly value: "content/page.unpublished";
|
|
13
|
+
}, {
|
|
14
|
+
readonly label: "Page rolled back";
|
|
15
|
+
readonly value: "content/page.rolled_back";
|
|
16
|
+
}, {
|
|
17
|
+
readonly label: "Form submission received";
|
|
18
|
+
readonly value: "form/submission.received";
|
|
19
|
+
}, {
|
|
20
|
+
readonly label: "Approval decided";
|
|
21
|
+
readonly value: "approval/decided";
|
|
22
|
+
}];
|
|
23
|
+
export declare const WEBHOOK_DEFAULT_TIMEOUT_SECONDS = 10;
|
|
24
|
+
export declare const MIN_SIGNING_SECRET_LENGTH = 32;
|
|
25
|
+
export declare const configFields: Field[];
|
|
26
|
+
export interface WebhookConfig {
|
|
27
|
+
targetUrl: string;
|
|
28
|
+
signingSecret: string;
|
|
29
|
+
eventFilter?: string[];
|
|
30
|
+
includeFullPayload?: boolean;
|
|
31
|
+
timeoutSeconds?: number;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=config-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-fields.d.ts","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/config-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAMxB,CAAA;AAEV,eAAO,MAAM,+BAA+B,KAAK,CAAA;AACjD,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C,eAAO,MAAM,YAAY,EAAE,KAAK,EAwC/B,CAAA;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The event names the webhook integration can subscribe to. Kept in sync
|
|
3
|
+
* with the core `FrameworkEvents` taxonomy plus the approval/decided event
|
|
4
|
+
* augmented by the approvals package.
|
|
5
|
+
*/
|
|
6
|
+
export const WEBHOOK_EVENT_OPTIONS = [
|
|
7
|
+
{ label: 'Page published', value: 'content/page.published' },
|
|
8
|
+
{ label: 'Page unpublished', value: 'content/page.unpublished' },
|
|
9
|
+
{ label: 'Page rolled back', value: 'content/page.rolled_back' },
|
|
10
|
+
{ label: 'Form submission received', value: 'form/submission.received' },
|
|
11
|
+
{ label: 'Approval decided', value: 'approval/decided' },
|
|
12
|
+
];
|
|
13
|
+
export const WEBHOOK_DEFAULT_TIMEOUT_SECONDS = 10;
|
|
14
|
+
export const MIN_SIGNING_SECRET_LENGTH = 32;
|
|
15
|
+
export const configFields = [
|
|
16
|
+
{
|
|
17
|
+
name: 'targetUrl',
|
|
18
|
+
type: 'text',
|
|
19
|
+
required: true,
|
|
20
|
+
admin: { description: 'HTTPS URL the integration POSTs events to.' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'signingSecret',
|
|
24
|
+
type: 'text',
|
|
25
|
+
required: true,
|
|
26
|
+
admin: {
|
|
27
|
+
description: `Shared secret for HMAC-SHA256 signatures, at least ${MIN_SIGNING_SECRET_LENGTH} characters. The receiver checks the x-throughline-signature header.`,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'eventFilter',
|
|
32
|
+
type: 'select',
|
|
33
|
+
hasMany: true,
|
|
34
|
+
options: WEBHOOK_EVENT_OPTIONS.map((o) => ({ label: o.label, value: o.value })),
|
|
35
|
+
admin: {
|
|
36
|
+
description: 'Only deliver these event types. Leave empty to deliver every subscribed event.',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'includeFullPayload',
|
|
41
|
+
type: 'checkbox',
|
|
42
|
+
defaultValue: false,
|
|
43
|
+
admin: {
|
|
44
|
+
description: 'If true, send the entire event data block. If false, send only IDs and slugs to keep payloads small.',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'timeoutSeconds',
|
|
49
|
+
type: 'number',
|
|
50
|
+
defaultValue: WEBHOOK_DEFAULT_TIMEOUT_SECONDS,
|
|
51
|
+
admin: { description: `Per-request timeout in seconds. Default ${WEBHOOK_DEFAULT_TIMEOUT_SECONDS}.` },
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
//# sourceMappingURL=config-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-fields.js","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/config-fields.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC5D,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,0BAA0B,EAAE;IAChE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,0BAA0B,EAAE;IAChE,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,0BAA0B,EAAE;IACxE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAE;CAChD,CAAA;AAEV,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,CAAA;AACjD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAY;IACnC;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,EAAE,WAAW,EAAE,4CAA4C,EAAE;KACrE;IACD;QACE,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE;YACL,WAAW,EACT,sDAAsD,yBAAyB,sEAAsE;SACxJ;KACF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;QAC/E,KAAK,EAAE;YACL,WAAW,EAAE,gFAAgF;SAC9F;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,UAAU;QAChB,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE;YACL,WAAW,EACT,sGAAsG;SACzG;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,+BAA+B;QAC7C,KAAK,EAAE,EAAE,WAAW,EAAE,2CAA2C,+BAA+B,GAAG,EAAE;KACtG;CACF,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { InngestFunction } from 'inngest';
|
|
2
|
+
import { type Job, type JobContext } from '../../../jobs/types.js';
|
|
3
|
+
import type { IntegrationContext } from '../../types.js';
|
|
4
|
+
export declare const WEBHOOK_INTEGRATION_ID = "webhook";
|
|
5
|
+
/**
|
|
6
|
+
* Builds the two Inngest functions the webhook integration contributes:
|
|
7
|
+
*
|
|
8
|
+
* - `webhook-deliver` subscribes to the system events configured at the
|
|
9
|
+
* admin layer. For every enabled instance whose `eventFilter` matches,
|
|
10
|
+
* it POSTs an HMAC-signed body to the target URL, retries up to five
|
|
11
|
+
* times on failure, and records audit + status updates.
|
|
12
|
+
* - `webhook-manual-trigger` listens for `integration/manual-sync` events
|
|
13
|
+
* (fired by the `trigger_sync` MCP tool). It delivers a minimal test
|
|
14
|
+
* payload to a single instance so admins can verify connectivity from
|
|
15
|
+
* the conversation surface.
|
|
16
|
+
*
|
|
17
|
+
* Failures are isolated: each delivery is its own `step.run`, so a broken
|
|
18
|
+
* instance retries on its own without affecting the others or the
|
|
19
|
+
* publishing pipeline that fired the originating event.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createWebhookJobs(getContext: (job: JobContext) => IntegrationContext): Job[];
|
|
22
|
+
/** The same two jobs, registered with Inngest exactly as they always were. */
|
|
23
|
+
export declare function createWebhookFunctions(ctx: IntegrationContext): InngestFunction.Any[];
|
|
24
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAKxD,eAAO,MAAM,sBAAsB,YAAY,CAAA;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,kBAAkB,GAAG,GAAG,EAAE,CAiE5F;AAED,8EAA8E;AAC9E,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,kBAAkB,GAAG,eAAe,CAAC,GAAG,EAAE,CAIrF"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { defineJob } from '../../../jobs/define.js';
|
|
2
|
+
import { inngestJobs } from '../../../jobs/inngest/adapter.js';
|
|
3
|
+
import { hmacSha256Hex } from './hmac.js';
|
|
4
|
+
import { extractIds } from './payload.js';
|
|
5
|
+
export const WEBHOOK_INTEGRATION_ID = 'webhook';
|
|
6
|
+
/**
|
|
7
|
+
* Builds the two Inngest functions the webhook integration contributes:
|
|
8
|
+
*
|
|
9
|
+
* - `webhook-deliver` subscribes to the system events configured at the
|
|
10
|
+
* admin layer. For every enabled instance whose `eventFilter` matches,
|
|
11
|
+
* it POSTs an HMAC-signed body to the target URL, retries up to five
|
|
12
|
+
* times on failure, and records audit + status updates.
|
|
13
|
+
* - `webhook-manual-trigger` listens for `integration/manual-sync` events
|
|
14
|
+
* (fired by the `trigger_sync` MCP tool). It delivers a minimal test
|
|
15
|
+
* payload to a single instance so admins can verify connectivity from
|
|
16
|
+
* the conversation surface.
|
|
17
|
+
*
|
|
18
|
+
* Failures are isolated: each delivery is its own `step.run`, so a broken
|
|
19
|
+
* instance retries on its own without affecting the others or the
|
|
20
|
+
* publishing pipeline that fired the originating event.
|
|
21
|
+
*/
|
|
22
|
+
export function createWebhookJobs(getContext) {
|
|
23
|
+
const deliver = defineJob({
|
|
24
|
+
id: 'webhook-deliver',
|
|
25
|
+
retries: 5,
|
|
26
|
+
on: {
|
|
27
|
+
event: [
|
|
28
|
+
'content/page.published',
|
|
29
|
+
'content/page.unpublished',
|
|
30
|
+
'content/page.rolled_back',
|
|
31
|
+
'form/submission.received',
|
|
32
|
+
'approval/decided',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
}, async (job) => {
|
|
36
|
+
const { event, step } = job;
|
|
37
|
+
const ctx = getContext(job);
|
|
38
|
+
const instances = await step.run('load-webhook-instances', () => ctx.loadInstances(WEBHOOK_INTEGRATION_ID));
|
|
39
|
+
for (const instance of instances) {
|
|
40
|
+
const filter = instance.config.eventFilter;
|
|
41
|
+
if (filter && filter.length > 0 && !filter.includes(event.name))
|
|
42
|
+
continue;
|
|
43
|
+
await step.run(`deliver-${instance.id}`, async () => {
|
|
44
|
+
await deliverEvent({ ctx, instance, eventName: event.name, eventData: event.data });
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const manualTrigger = defineJob({
|
|
49
|
+
id: 'webhook-manual-trigger',
|
|
50
|
+
on: { event: 'integration/manual-sync' },
|
|
51
|
+
}, async (job) => {
|
|
52
|
+
const { event, step } = job;
|
|
53
|
+
const ctx = getContext(job);
|
|
54
|
+
const data = (event.data ?? {});
|
|
55
|
+
const targetInstanceId = data.instanceId;
|
|
56
|
+
if (!targetInstanceId)
|
|
57
|
+
return;
|
|
58
|
+
const instances = await step.run('load-target', async () => {
|
|
59
|
+
const all = await ctx.loadInstances(WEBHOOK_INTEGRATION_ID);
|
|
60
|
+
return all.filter((i) => i.id === targetInstanceId);
|
|
61
|
+
});
|
|
62
|
+
for (const instance of instances) {
|
|
63
|
+
await step.run(`deliver-test-${instance.id}`, async () => {
|
|
64
|
+
await deliverEvent({
|
|
65
|
+
ctx,
|
|
66
|
+
instance,
|
|
67
|
+
eventName: 'integration/manual-sync',
|
|
68
|
+
eventData: { instanceId: instance.id, message: 'Manual sync triggered' },
|
|
69
|
+
includeFullPayloadOverride: true,
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return [deliver, manualTrigger];
|
|
75
|
+
}
|
|
76
|
+
/** The same two jobs, registered with Inngest exactly as they always were. */
|
|
77
|
+
export function createWebhookFunctions(ctx) {
|
|
78
|
+
return inngestJobs(ctx.inngest, ctx.onFailure ? { onFailure: ctx.onFailure } : {}).functions(createWebhookJobs(() => ctx));
|
|
79
|
+
}
|
|
80
|
+
async function deliverEvent({ ctx, instance, eventName, eventData, includeFullPayloadOverride, }) {
|
|
81
|
+
const includeFull = includeFullPayloadOverride ?? instance.config.includeFullPayload ?? false;
|
|
82
|
+
const body = JSON.stringify({
|
|
83
|
+
event: eventName,
|
|
84
|
+
data: includeFull ? eventData : extractIds(eventData),
|
|
85
|
+
timestamp: Date.now(),
|
|
86
|
+
instanceId: instance.id,
|
|
87
|
+
});
|
|
88
|
+
const signature = await hmacSha256Hex(body, instance.config.signingSecret);
|
|
89
|
+
const timeoutMs = (instance.config.timeoutSeconds ?? 10) * 1000;
|
|
90
|
+
const controller = new AbortController();
|
|
91
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
92
|
+
let response;
|
|
93
|
+
try {
|
|
94
|
+
response = await fetch(instance.config.targetUrl, {
|
|
95
|
+
method: 'POST',
|
|
96
|
+
headers: {
|
|
97
|
+
'content-type': 'application/json',
|
|
98
|
+
'x-throughline-event': eventName,
|
|
99
|
+
'x-throughline-signature': `sha256=${signature}`,
|
|
100
|
+
'x-throughline-timestamp': String(Date.now()),
|
|
101
|
+
},
|
|
102
|
+
body,
|
|
103
|
+
signal: controller.signal,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
108
|
+
await ctx.updateStatus(instance.id, 'failed', message);
|
|
109
|
+
await ctx.recordAudit({
|
|
110
|
+
integrationId: WEBHOOK_INTEGRATION_ID,
|
|
111
|
+
instanceName: instance.name,
|
|
112
|
+
action: 'integration.failed',
|
|
113
|
+
summary: `Failed to deliver ${eventName} to ${instance.name}: ${message}`,
|
|
114
|
+
errorMessage: message,
|
|
115
|
+
});
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
finally {
|
|
119
|
+
clearTimeout(timer);
|
|
120
|
+
}
|
|
121
|
+
const success = response.ok;
|
|
122
|
+
if (success)
|
|
123
|
+
await ctx.updateStatus(instance.id, 'success');
|
|
124
|
+
else
|
|
125
|
+
await ctx.updateStatus(instance.id, 'failed', `HTTP ${response.status}`);
|
|
126
|
+
await ctx.recordAudit({
|
|
127
|
+
integrationId: WEBHOOK_INTEGRATION_ID,
|
|
128
|
+
instanceName: instance.name,
|
|
129
|
+
action: success ? 'integration.synced' : 'integration.failed',
|
|
130
|
+
summary: success
|
|
131
|
+
? `Delivered ${eventName} to ${instance.name}`
|
|
132
|
+
: `Failed to deliver ${eventName} to ${instance.name} (HTTP ${response.status})`,
|
|
133
|
+
...(success ? {} : { errorMessage: `HTTP ${response.status}` }),
|
|
134
|
+
});
|
|
135
|
+
if (!success) {
|
|
136
|
+
throw new Error(`Webhook delivery failed: HTTP ${response.status}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/functions.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IntegrationHealth } from '../../types.js';
|
|
2
|
+
import type { WebhookConfig } from './config-fields.js';
|
|
3
|
+
/**
|
|
4
|
+
* Light reachability check for the webhook target. Sends a HEAD request and
|
|
5
|
+
* accepts any 2xx, plus 405 (Method Not Allowed) since plenty of webhook
|
|
6
|
+
* receivers only allow POST and reject HEAD with 405. That's healthy enough
|
|
7
|
+
* for a "your endpoint is up" probe.
|
|
8
|
+
*/
|
|
9
|
+
export declare function healthcheck(config: WebhookConfig): Promise<IntegrationHealth>;
|
|
10
|
+
//# sourceMappingURL=healthcheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"healthcheck.d.ts","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/healthcheck.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAIvD;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAgBnF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const HEALTHCHECK_TIMEOUT_MS = 5000;
|
|
2
|
+
/**
|
|
3
|
+
* Light reachability check for the webhook target. Sends a HEAD request and
|
|
4
|
+
* accepts any 2xx, plus 405 (Method Not Allowed) since plenty of webhook
|
|
5
|
+
* receivers only allow POST and reject HEAD with 405. That's healthy enough
|
|
6
|
+
* for a "your endpoint is up" probe.
|
|
7
|
+
*/
|
|
8
|
+
export async function healthcheck(config) {
|
|
9
|
+
try {
|
|
10
|
+
const response = await fetch(config.targetUrl, {
|
|
11
|
+
method: 'HEAD',
|
|
12
|
+
signal: AbortSignal.timeout(HEALTHCHECK_TIMEOUT_MS),
|
|
13
|
+
});
|
|
14
|
+
if (response.ok || response.status === 405) {
|
|
15
|
+
return { ok: true, details: `Reachable (HTTP ${response.status})` };
|
|
16
|
+
}
|
|
17
|
+
return { ok: false, details: `Endpoint returned HTTP ${response.status}` };
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
return {
|
|
21
|
+
ok: false,
|
|
22
|
+
details: error instanceof Error ? error.message : 'Unknown error',
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=healthcheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"healthcheck.js","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/healthcheck.ts"],"names":[],"mappings":"AAGA,MAAM,sBAAsB,GAAG,IAAI,CAAA;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAqB;IACrD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;YAC7C,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,sBAAsB,CAAC;SACpD,CAAC,CAAA;QACF,IAAI,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC3C,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,mBAAmB,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAA;QACrE,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,0BAA0B,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAA;IAC5E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,EAAE,EAAE,KAAK;YACT,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAClE,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HMAC-SHA256 utility used by the webhook integration to sign delivery
|
|
3
|
+
* payloads. The hex-encoded digest is sent in the `x-throughline-signature`
|
|
4
|
+
* header (prefixed with `sha256=`); receivers verify by recomputing with
|
|
5
|
+
* the shared secret.
|
|
6
|
+
*
|
|
7
|
+
* Uses Web Crypto so the same code runs in Node 20+, edge runtimes, and
|
|
8
|
+
* the browser (for tests). No Node-specific imports.
|
|
9
|
+
*/
|
|
10
|
+
export declare function hmacSha256Hex(payload: string, secret: string): Promise<string>;
|
|
11
|
+
//# sourceMappingURL=hmac.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmac.d.ts","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/hmac.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAWpF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HMAC-SHA256 utility used by the webhook integration to sign delivery
|
|
3
|
+
* payloads. The hex-encoded digest is sent in the `x-throughline-signature`
|
|
4
|
+
* header (prefixed with `sha256=`); receivers verify by recomputing with
|
|
5
|
+
* the shared secret.
|
|
6
|
+
*
|
|
7
|
+
* Uses Web Crypto so the same code runs in Node 20+, edge runtimes, and
|
|
8
|
+
* the browser (for tests). No Node-specific imports.
|
|
9
|
+
*/
|
|
10
|
+
const HEX_CHARS = '0123456789abcdef';
|
|
11
|
+
export async function hmacSha256Hex(payload, secret) {
|
|
12
|
+
const encoder = new TextEncoder();
|
|
13
|
+
const key = await crypto.subtle.importKey('raw', encoder.encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
|
|
14
|
+
const signature = await crypto.subtle.sign('HMAC', key, encoder.encode(payload));
|
|
15
|
+
return bytesToHex(new Uint8Array(signature));
|
|
16
|
+
}
|
|
17
|
+
function bytesToHex(bytes) {
|
|
18
|
+
let out = '';
|
|
19
|
+
for (let i = 0; i < bytes.length; i += 1) {
|
|
20
|
+
const byte = bytes[i];
|
|
21
|
+
out += HEX_CHARS[byte >> 4] + HEX_CHARS[byte & 0xf];
|
|
22
|
+
}
|
|
23
|
+
return out;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=hmac.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmac.js","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/hmac.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAe,EAAE,MAAc;IACjE,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;IACjC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,CACvC,KAAK,EACL,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EACtB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EACjC,KAAK,EACL,CAAC,MAAM,CAAC,CACT,CAAA;IACD,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;IAChF,OAAO,UAAU,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAA;AAC9C,CAAC;AAED,SAAS,UAAU,CAAC,KAAiB;IACnC,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAE,CAAA;QACtB,GAAG,IAAI,SAAS,CAAC,IAAI,IAAI,CAAC,CAAE,GAAG,SAAS,CAAC,IAAI,GAAG,GAAG,CAAE,CAAA;IACvD,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Integration } from '../../types.js';
|
|
2
|
+
import { type WebhookConfig } from './config-fields.js';
|
|
3
|
+
export declare const webhookIntegration: Integration<WebhookConfig>;
|
|
4
|
+
export type { WebhookConfig } from './config-fields.js';
|
|
5
|
+
export { WEBHOOK_INTEGRATION_ID } from './functions.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,oBAAoB,CAAA;AAI3B,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,aAAa,CA0CzD,CAAA;AAED,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { configFields, MIN_SIGNING_SECRET_LENGTH, } from './config-fields.js';
|
|
2
|
+
import { createWebhookFunctions, createWebhookJobs, WEBHOOK_INTEGRATION_ID } from './functions.js';
|
|
3
|
+
import { healthcheck } from './healthcheck.js';
|
|
4
|
+
export const webhookIntegration = {
|
|
5
|
+
id: WEBHOOK_INTEGRATION_ID,
|
|
6
|
+
name: 'Generic Webhook',
|
|
7
|
+
description: 'POST system events to an external HTTPS endpoint with HMAC-SHA256 signed payloads. Configurable event filter, retries, and timeout.',
|
|
8
|
+
category: 'webhook',
|
|
9
|
+
configFields,
|
|
10
|
+
async validateConfig(config) {
|
|
11
|
+
if (!config?.targetUrl)
|
|
12
|
+
return { ok: false, reason: 'targetUrl is required' };
|
|
13
|
+
let url;
|
|
14
|
+
try {
|
|
15
|
+
url = new URL(config.targetUrl);
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return { ok: false, reason: 'targetUrl is not a valid URL' };
|
|
19
|
+
}
|
|
20
|
+
if (url.protocol !== 'https:') {
|
|
21
|
+
return { ok: false, reason: 'targetUrl must use https://' };
|
|
22
|
+
}
|
|
23
|
+
if (!config.signingSecret || config.signingSecret.length < MIN_SIGNING_SECRET_LENGTH) {
|
|
24
|
+
return {
|
|
25
|
+
ok: false,
|
|
26
|
+
reason: `signingSecret must be at least ${MIN_SIGNING_SECRET_LENGTH} characters`,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (config.timeoutSeconds !== undefined &&
|
|
30
|
+
(typeof config.timeoutSeconds !== 'number' || config.timeoutSeconds <= 0)) {
|
|
31
|
+
return { ok: false, reason: 'timeoutSeconds must be a positive number' };
|
|
32
|
+
}
|
|
33
|
+
return { ok: true };
|
|
34
|
+
},
|
|
35
|
+
subscribes: [
|
|
36
|
+
{ event: 'content/page.published', purpose: 'Notify external systems when content goes live' },
|
|
37
|
+
{ event: 'content/page.unpublished', purpose: 'Notify when content is taken down' },
|
|
38
|
+
{ event: 'content/page.rolled_back', purpose: 'Notify when content reverts to a prior version' },
|
|
39
|
+
{ event: 'form/submission.received', purpose: 'Forward form submissions to downstream systems' },
|
|
40
|
+
{ event: 'approval/decided', purpose: 'Notify external workflow tools of approval outcomes' },
|
|
41
|
+
],
|
|
42
|
+
createFunctions: createWebhookFunctions,
|
|
43
|
+
createJobs: createWebhookJobs,
|
|
44
|
+
healthcheck,
|
|
45
|
+
};
|
|
46
|
+
export { WEBHOOK_INTEGRATION_ID } from './functions.js';
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,EACZ,yBAAyB,GAC1B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,CAAC,MAAM,kBAAkB,GAA+B;IAC5D,EAAE,EAAE,sBAAsB;IAC1B,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,qIAAqI;IACvI,QAAQ,EAAE,SAAS;IACnB,YAAY;IACZ,KAAK,CAAC,cAAc,CAAC,MAAM;QACzB,IAAI,CAAC,MAAM,EAAE,SAAS;YAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAA;QAC7E,IAAI,GAAQ,CAAA;QACZ,IAAI,CAAC;YACH,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACjC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B,EAAE,CAAA;QAC9D,CAAC;QACD,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAA;QAC7D,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,GAAG,yBAAyB,EAAE,CAAC;YACrF,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,kCAAkC,yBAAyB,aAAa;aACjF,CAAA;QACH,CAAC;QACD,IACE,MAAM,CAAC,cAAc,KAAK,SAAS;YACnC,CAAC,OAAO,MAAM,CAAC,cAAc,KAAK,QAAQ,IAAI,MAAM,CAAC,cAAc,IAAI,CAAC,CAAC,EACzE,CAAC;YACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,0CAA0C,EAAE,CAAA;QAC1E,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;IACrB,CAAC;IACD,UAAU,EAAE;QACV,EAAE,KAAK,EAAE,wBAAwB,EAAE,OAAO,EAAE,gDAAgD,EAAE;QAC9F,EAAE,KAAK,EAAE,0BAA0B,EAAE,OAAO,EAAE,mCAAmC,EAAE;QACnF,EAAE,KAAK,EAAE,0BAA0B,EAAE,OAAO,EAAE,gDAAgD,EAAE;QAChG,EAAE,KAAK,EAAE,0BAA0B,EAAE,OAAO,EAAE,gDAAgD,EAAE;QAChG,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,qDAAqD,EAAE;KAC9F;IACD,eAAe,EAAE,sBAAsB;IACvC,UAAU,EAAE,iBAAiB;IAC7B,WAAW;CACZ,CAAA;AAGD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When a webhook instance is configured with `includeFullPayload=false`,
|
|
3
|
+
* we still want to include enough context to make the event useful: IDs,
|
|
4
|
+
* slugs, and any other field whose name ends in `Id`. Keeps payloads small
|
|
5
|
+
* without requiring the receiver to make a follow-up API call for the
|
|
6
|
+
* common case.
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractIds(data: unknown): Record<string, unknown>;
|
|
9
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/payload.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASjE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When a webhook instance is configured with `includeFullPayload=false`,
|
|
3
|
+
* we still want to include enough context to make the event useful: IDs,
|
|
4
|
+
* slugs, and any other field whose name ends in `Id`. Keeps payloads small
|
|
5
|
+
* without requiring the receiver to make a follow-up API call for the
|
|
6
|
+
* common case.
|
|
7
|
+
*/
|
|
8
|
+
export function extractIds(data) {
|
|
9
|
+
if (!data || typeof data !== 'object')
|
|
10
|
+
return {};
|
|
11
|
+
const result = {};
|
|
12
|
+
for (const [key, value] of Object.entries(data)) {
|
|
13
|
+
if (key === 'id' || key === 'slug' || key.endsWith('Id')) {
|
|
14
|
+
result[key] = value;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/integrations/integrations/webhook/payload.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAa;IACtC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAA;IAChD,MAAM,MAAM,GAA4B,EAAE,CAAA;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACzD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QACrB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Job } from '../../jobs/types.js';
|
|
2
|
+
import { type JobOptions } from '../../jobs/options.js';
|
|
3
|
+
import type { HealthcheckDefinition, HealthcheckOptions } from '../../jobs/workflow-types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Cron healthcheck. Runs every check in its own `step.run` so one
|
|
6
|
+
* misbehaving probe can't take down the rest, collects failures, and
|
|
7
|
+
* routes them to `onFailure` (defaults to `console.error`). Always fires
|
|
8
|
+
* a `system/healthcheck` Inngest event so external dashboards can
|
|
9
|
+
* observe heartbeats independently of failure routing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function healthcheckJob(options: JobOptions<HealthcheckOptions>): Job;
|
|
12
|
+
/**
|
|
13
|
+
* Check that Payload is reachable and able to query a collection. Defaults
|
|
14
|
+
* to `users` because every Payload deployment has it; pass a different
|
|
15
|
+
* slug if `users` isn't always present (rare).
|
|
16
|
+
*/
|
|
17
|
+
export declare function createPayloadReachableCheck(collectionSlug?: string): HealthcheckDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* Check that a manifest URL is reachable. Aimed at the design-system
|
|
20
|
+
* manifest the components server consults, but works for any HTTPS
|
|
21
|
+
* endpoint that responds 2xx to a GET.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createManifestReachableCheck(manifestUrl: string): HealthcheckDefinition;
|
|
24
|
+
//# sourceMappingURL=healthcheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"healthcheck.d.ts","sourceRoot":"","sources":["../../../src/integrations/jobs/healthcheck.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAqB,MAAM,8BAA8B,CAAA;AAKhH;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAyE3E;AAWD;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,cAAc,GAAE,MAAgB,GAC/B,qBAAqB,CAevB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB,CAkBvF"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { failureOptions } from '../../jobs/workflow-types.js';
|
|
2
|
+
import { defineJob } from '../../jobs/define.js';
|
|
3
|
+
import { jobPayload } from '../../jobs/options.js';
|
|
4
|
+
const DEFAULT_SCHEDULE = '*/15 * * * *';
|
|
5
|
+
const REACHABLE_TIMEOUT_MS = 5_000;
|
|
6
|
+
/**
|
|
7
|
+
* Cron healthcheck. Runs every check in its own `step.run` so one
|
|
8
|
+
* misbehaving probe can't take down the rest, collects failures, and
|
|
9
|
+
* routes them to `onFailure` (defaults to `console.error`). Always fires
|
|
10
|
+
* a `system/healthcheck` Inngest event so external dashboards can
|
|
11
|
+
* observe heartbeats independently of failure routing.
|
|
12
|
+
*/
|
|
13
|
+
export function healthcheckJob(options) {
|
|
14
|
+
const schedule = options.schedule ?? DEFAULT_SCHEDULE;
|
|
15
|
+
const onFailure = options.onFailure ?? defaultOnFailure;
|
|
16
|
+
return defineJob({
|
|
17
|
+
id: options.id ?? 'healthcheck',
|
|
18
|
+
/*
|
|
19
|
+
One at a time by default. Two probes running together tell you nothing a
|
|
20
|
+
single one does not, and `onFailure` below fires per run — so overlapping
|
|
21
|
+
runs would report the same outage twice.
|
|
22
|
+
|
|
23
|
+
`HealthcheckOptions.onFailure` is this package's own option and a
|
|
24
|
+
different thing from Inngest's: it is called once per run when a check
|
|
25
|
+
fails, so it reports the *first* bad run rather than waiting for retries
|
|
26
|
+
to exhaust. A probe has no retries. Both are available now, and they
|
|
27
|
+
answer different questions — see the note on `failureOptions`.
|
|
28
|
+
*/
|
|
29
|
+
...failureOptions(options, 1),
|
|
30
|
+
on: { cron: schedule },
|
|
31
|
+
}, async ({ step, logger, emit, payload: contextPayload }) => {
|
|
32
|
+
const payload = jobPayload(options.payload, contextPayload, options.id ?? 'healthcheck');
|
|
33
|
+
const results = [];
|
|
34
|
+
for (const check of options.checks) {
|
|
35
|
+
const outcome = await step.run(`check-${check.name}`, async () => {
|
|
36
|
+
try {
|
|
37
|
+
const result = await check.run({ payload });
|
|
38
|
+
return { name: check.name, ...result };
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
return {
|
|
42
|
+
name: check.name,
|
|
43
|
+
ok: false,
|
|
44
|
+
details: error instanceof Error ? error.message : 'Unknown error',
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
results.push(outcome);
|
|
49
|
+
}
|
|
50
|
+
const failures = results
|
|
51
|
+
.filter((r) => !r.ok)
|
|
52
|
+
.map((r) => {
|
|
53
|
+
const entry = { name: r.name };
|
|
54
|
+
if (r.details)
|
|
55
|
+
entry.details = r.details;
|
|
56
|
+
return entry;
|
|
57
|
+
});
|
|
58
|
+
if (failures.length > 0) {
|
|
59
|
+
await step.run('report-failures', async () => {
|
|
60
|
+
await onFailure(failures);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
await step.run('emit-heartbeat', async () => {
|
|
64
|
+
await emit({
|
|
65
|
+
name: 'system/healthcheck',
|
|
66
|
+
data: {
|
|
67
|
+
source: 'workflow',
|
|
68
|
+
timestamp: new Date().toISOString(),
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
logger.info('Healthcheck complete', {
|
|
73
|
+
totalChecks: results.length,
|
|
74
|
+
failures: failures.length,
|
|
75
|
+
});
|
|
76
|
+
return { results, failureCount: failures.length };
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async function defaultOnFailure(failures) {
|
|
80
|
+
// eslint-disable-next-line no-console
|
|
81
|
+
console.error(`[healthcheck] ${failures.length} check(s) failed: ${failures
|
|
82
|
+
.map((f) => `${f.name}: ${f.details ?? 'no details'}`)
|
|
83
|
+
.join('; ')}`);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Check that Payload is reachable and able to query a collection. Defaults
|
|
87
|
+
* to `users` because every Payload deployment has it; pass a different
|
|
88
|
+
* slug if `users` isn't always present (rare).
|
|
89
|
+
*/
|
|
90
|
+
export function createPayloadReachableCheck(collectionSlug = 'users') {
|
|
91
|
+
return {
|
|
92
|
+
name: 'payload-reachable',
|
|
93
|
+
run: async ({ payload }) => {
|
|
94
|
+
try {
|
|
95
|
+
await payload.find({ collection: collectionSlug, limit: 1 });
|
|
96
|
+
return { ok: true };
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
return {
|
|
100
|
+
ok: false,
|
|
101
|
+
details: error instanceof Error ? error.message : 'Unknown error',
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Check that a manifest URL is reachable. Aimed at the design-system
|
|
109
|
+
* manifest the components server consults, but works for any HTTPS
|
|
110
|
+
* endpoint that responds 2xx to a GET.
|
|
111
|
+
*/
|
|
112
|
+
export function createManifestReachableCheck(manifestUrl) {
|
|
113
|
+
return {
|
|
114
|
+
name: 'manifest-reachable',
|
|
115
|
+
run: async () => {
|
|
116
|
+
try {
|
|
117
|
+
const response = await fetch(manifestUrl, {
|
|
118
|
+
signal: AbortSignal.timeout(REACHABLE_TIMEOUT_MS),
|
|
119
|
+
});
|
|
120
|
+
if (response.ok)
|
|
121
|
+
return { ok: true };
|
|
122
|
+
return { ok: false, details: `HTTP ${response.status}` };
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
return {
|
|
126
|
+
ok: false,
|
|
127
|
+
details: error instanceof Error ? error.message : 'Unknown error',
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=healthcheck.js.map
|