@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,183 @@
|
|
|
1
|
+
import type { Field } from 'payload';
|
|
2
|
+
import type { Inngest } from 'inngest';
|
|
3
|
+
import type { Job, JobContext } from '../jobs/types.js';
|
|
4
|
+
import type { WorkflowFailureHandler } from '../jobs/workflow-types.js';
|
|
5
|
+
import type { McpToolDefinition } from '../plugin-contract/mcp.js';
|
|
6
|
+
export type IntegrationCategory = 'crm' | 'marketing' | 'analytics' | 'webhook' | 'storage' | 'messaging' | 'other';
|
|
7
|
+
export type IntegrationSyncStatus = 'success' | 'partial' | 'failed' | 'never-run';
|
|
8
|
+
/**
|
|
9
|
+
* The status and message arguments of {@link IntegrationContext.updateStatus}.
|
|
10
|
+
*
|
|
11
|
+
* A run that was not clean has to say why: `partial` and `failed` carry a
|
|
12
|
+
* message, and `success` carries none. `never-run` is not here because a run
|
|
13
|
+
* that reports its status has run.
|
|
14
|
+
*/
|
|
15
|
+
export type IntegrationStatusUpdate = [status: 'success'] | [status: 'partial' | 'failed', error: string];
|
|
16
|
+
export interface IntegrationConfigValidation {
|
|
17
|
+
ok: boolean;
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IntegrationHealth {
|
|
21
|
+
ok: boolean;
|
|
22
|
+
details?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The contract every integration module satisfies. Integrations are
|
|
26
|
+
* registered with the plugin and instantiated per-row via the Integrations
|
|
27
|
+
* collection. The contract is intentionally small: every future integration
|
|
28
|
+
* (Salesforce, Mailchimp, etc.) follows the same shape, so the productivity
|
|
29
|
+
* compounding is in keeping it stable.
|
|
30
|
+
*
|
|
31
|
+
* Integrations are events-in, events-out: they subscribe to system events
|
|
32
|
+
* (e.g. `content/page.published`) via Inngest functions returned by
|
|
33
|
+
* {@link Integration.createFunctions} and emit their own results events as
|
|
34
|
+
* needed. They never call other integrations directly.
|
|
35
|
+
*/
|
|
36
|
+
export interface Integration<Config = Record<string, unknown>, Fn = unknown> {
|
|
37
|
+
/** Unique slug. Used as the `integrationType` value in the collection. */
|
|
38
|
+
id: string;
|
|
39
|
+
/** Display name shown in the admin and `list_integration_types`. */
|
|
40
|
+
name: string;
|
|
41
|
+
/** One-line description for the admin and the listing tool. */
|
|
42
|
+
description: string;
|
|
43
|
+
/** Category for organizational grouping. */
|
|
44
|
+
category: IntegrationCategory;
|
|
45
|
+
/**
|
|
46
|
+
* Payload field definitions shown in the admin under each instance's
|
|
47
|
+
* `config` group. Integration authors keep this small and obvious — Claude
|
|
48
|
+
* cannot edit these (admin-only access) so unhelpful labels become support
|
|
49
|
+
* tickets, not chatbot mistakes.
|
|
50
|
+
*/
|
|
51
|
+
configFields: Field[];
|
|
52
|
+
/**
|
|
53
|
+
* Validates a config object against this integration's requirements. Run
|
|
54
|
+
* by the collection's beforeChange hook so the Payload UI surfaces errors
|
|
55
|
+
* inline rather than failing at sync time.
|
|
56
|
+
*/
|
|
57
|
+
validateConfig: (config: Config) => Promise<IntegrationConfigValidation>;
|
|
58
|
+
/** Which system events this integration subscribes to. Documentation only. */
|
|
59
|
+
subscribes: Array<{
|
|
60
|
+
event: string;
|
|
61
|
+
purpose: string;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Factory for the Inngest functions this integration contributes. Called
|
|
65
|
+
* during plugin init; the returned functions are exposed via the registry
|
|
66
|
+
* so the client app's Inngest endpoint can serve them. See
|
|
67
|
+
* `docs/integrations-wiring.md`.
|
|
68
|
+
*
|
|
69
|
+
* **Generic in the function type, and `unknown` by default, on purpose.**
|
|
70
|
+
* This plugin never inspects or invokes what comes back — the one use
|
|
71
|
+
* anywhere is `.length`, for a log line saying how many an integration
|
|
72
|
+
* contributed. The host serves them.
|
|
73
|
+
*
|
|
74
|
+
* Naming `InngestFunction.Any` here instead cost a consumer two casts. A host
|
|
75
|
+
* whose dependency graph resolves a different `inngest` instance — pnpm keys
|
|
76
|
+
* one by its peer set, and `inngest` has optional peers on `express`, `hono`
|
|
77
|
+
* and `next`, so installing anything that pulls one in is enough — got a type
|
|
78
|
+
* that is structurally identical and nominally different. Generic, the host's
|
|
79
|
+
* own `InngestFunction.Any` flows through and the question never arises:
|
|
80
|
+
*
|
|
81
|
+
* ```ts
|
|
82
|
+
* export const myIntegration: Integration<MyConfig, InngestFunction.Any> = { … }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
createFunctions: (ctx: IntegrationContext) => Fn[];
|
|
86
|
+
/**
|
|
87
|
+
* The same work as runner-neutral jobs, for a site on `payloadJobs` (or any
|
|
88
|
+
* jobs adapter). Optional: an integration without it runs on Inngest only.
|
|
89
|
+
*
|
|
90
|
+
* Takes a function rather than a context, because a jobs adapter is handed
|
|
91
|
+
* its jobs while the config is being built, before the context exists. Call
|
|
92
|
+
* `getContext(jobContext)` inside the handler. An integration with both
|
|
93
|
+
* usually derives `createFunctions` from this, as the webhook does:
|
|
94
|
+
*
|
|
95
|
+
* ```ts
|
|
96
|
+
* createFunctions: (ctx) => inngestJobs(ctx.inngest).functions(createJobs(() => ctx)),
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
createJobs?: (getContext: (job: JobContext) => IntegrationContext) => Job[];
|
|
100
|
+
/**
|
|
101
|
+
* Optional MCP tools the integration adds to the integrations server. Most
|
|
102
|
+
* integrations need only the five built-in tools; this is for cases where
|
|
103
|
+
* the integration needs its own purpose-built tool (e.g. Salesforce's
|
|
104
|
+
* "preview field mapping").
|
|
105
|
+
*/
|
|
106
|
+
mcpTools?: (ctx: IntegrationContext) => McpToolDefinition[];
|
|
107
|
+
/**
|
|
108
|
+
* Health check. Called by the `test_integration` MCP tool. Returns
|
|
109
|
+
* `{ ok: true }` for healthy or `{ ok: false, details }` for problems.
|
|
110
|
+
*/
|
|
111
|
+
healthcheck?: (config: Config) => Promise<IntegrationHealth>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Runtime context passed to integrations during initialization. Provides
|
|
115
|
+
* the framework's facilities (Inngest, audit) without coupling the
|
|
116
|
+
* integration to internal implementation details.
|
|
117
|
+
*/
|
|
118
|
+
export interface IntegrationContext {
|
|
119
|
+
/**
|
|
120
|
+
* The Inngest client. On a site that runs integrations as jobs and has no
|
|
121
|
+
* Inngest, any use of it throws, saying so. Send events with `emit`.
|
|
122
|
+
*/
|
|
123
|
+
inngest: Inngest;
|
|
124
|
+
/** Send an event on whichever runner the site uses. */
|
|
125
|
+
emit: (event: {
|
|
126
|
+
name: string;
|
|
127
|
+
data: unknown;
|
|
128
|
+
}) => Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* The site's terminal-failure handler, for an integration's Inngest functions:
|
|
131
|
+
* `inngestJobs(ctx.inngest, { onFailure: ctx.onFailure })`. On Payload Jobs
|
|
132
|
+
* the adapter's own `onFailure` applies instead.
|
|
133
|
+
*/
|
|
134
|
+
onFailure?: WorkflowFailureHandler;
|
|
135
|
+
integrationsCollectionSlug: string;
|
|
136
|
+
/** Loads all enabled instances of an integration by id. */
|
|
137
|
+
loadInstances: <Config = Record<string, unknown>>(integrationId: string) => Promise<Array<IntegrationInstanceLoaded<Config>>>;
|
|
138
|
+
/**
|
|
139
|
+
* Records the outcome of a run on the instance: `lastSyncAt`,
|
|
140
|
+
* `lastSyncStatus`, and `lastError`.
|
|
141
|
+
*
|
|
142
|
+
* `success` takes no message and clears `lastError`. `partial` and `failed`
|
|
143
|
+
* require one, and it replaces `lastError`, so the admin always shows why
|
|
144
|
+
* the run was not clean. For a run with per-record failures, build the
|
|
145
|
+
* arguments from the list of failures with `statusFromProblems`:
|
|
146
|
+
*
|
|
147
|
+
* ```ts
|
|
148
|
+
* await ctx.updateStatus(instance.id, ...statusFromProblems(problems))
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
updateStatus: (instanceId: string, ...update: IntegrationStatusUpdate) => Promise<void>;
|
|
152
|
+
/** Writes an audit event. Thin wrapper over core's audit writer. */
|
|
153
|
+
recordAudit: (event: IntegrationAuditEvent) => Promise<void>;
|
|
154
|
+
}
|
|
155
|
+
export interface IntegrationInstanceLoaded<Config = Record<string, unknown>> {
|
|
156
|
+
id: string;
|
|
157
|
+
name: string;
|
|
158
|
+
config: Config;
|
|
159
|
+
}
|
|
160
|
+
export interface IntegrationAuditEvent {
|
|
161
|
+
/** The integration's id (e.g. 'webhook'). Used as the audit `integrationId`. */
|
|
162
|
+
integrationId: string;
|
|
163
|
+
/** The instance's display name. Surfaces in audit summaries. */
|
|
164
|
+
instanceName: string;
|
|
165
|
+
action: 'integration.synced' | 'integration.failed';
|
|
166
|
+
summary: string;
|
|
167
|
+
errorMessage?: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The shape of a single Integrations-collection row, as returned by Payload.
|
|
171
|
+
* Used by tests and by the helpers that read instances back out.
|
|
172
|
+
*/
|
|
173
|
+
export interface IntegrationInstance {
|
|
174
|
+
id: string;
|
|
175
|
+
name: string;
|
|
176
|
+
integrationType: string;
|
|
177
|
+
enabled: boolean;
|
|
178
|
+
config: Record<string, unknown>;
|
|
179
|
+
lastSyncAt?: string;
|
|
180
|
+
lastSyncStatus?: IntegrationSyncStatus;
|
|
181
|
+
lastError?: string;
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAElE,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,WAAW,GACX,WAAW,GACX,SAAS,GACT,SAAS,GACT,WAAW,GACX,OAAO,CAAA;AAEX,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAA;AAElF;;;;;;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M,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,qBAAqB,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Job, JobDefinition, JobHandler } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Describe a job once, for any runner.
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* export const expireStaleApprovals = defineJob(
|
|
7
|
+
* { id: 'expire-stale-approvals', on: { cron: '0 2 * * *' }, concurrency: 1 },
|
|
8
|
+
* async ({ step }) => step.run('expire', () => expire(payload)),
|
|
9
|
+
* )
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Validates what a runner would otherwise reject at registration, or worse,
|
|
13
|
+
* accept and misbehave on: an empty id, no trigger or two, an idempotency key
|
|
14
|
+
* with no fields, a fractional retry count.
|
|
15
|
+
*/
|
|
16
|
+
export declare function defineJob<TData = unknown, TResult = unknown>(definition: JobDefinition, handler: JobHandler<TData, TResult>): Job<TData, TResult>;
|
|
17
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../src/jobs/define.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEhE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EAC1D,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,GAClC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CA4BrB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describe a job once, for any runner.
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* export const expireStaleApprovals = defineJob(
|
|
6
|
+
* { id: 'expire-stale-approvals', on: { cron: '0 2 * * *' }, concurrency: 1 },
|
|
7
|
+
* async ({ step }) => step.run('expire', () => expire(payload)),
|
|
8
|
+
* )
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* Validates what a runner would otherwise reject at registration, or worse,
|
|
12
|
+
* accept and misbehave on: an empty id, no trigger or two, an idempotency key
|
|
13
|
+
* with no fields, a fractional retry count.
|
|
14
|
+
*/
|
|
15
|
+
export function defineJob(definition, handler) {
|
|
16
|
+
if (!definition.id || definition.id.trim() !== definition.id) {
|
|
17
|
+
throw new Error(`A job needs a non-empty id with no surrounding spaces; got ${JSON.stringify(definition.id)}.`);
|
|
18
|
+
}
|
|
19
|
+
const on = definition.on;
|
|
20
|
+
const hasEvent = typeof on.event === 'string' ||
|
|
21
|
+
(Array.isArray(on.event) && on.event.length > 0 && on.event.every((e) => typeof e === 'string'));
|
|
22
|
+
const hasCron = typeof on.cron === 'string';
|
|
23
|
+
if (hasEvent === hasCron) {
|
|
24
|
+
throw new Error(`Job "${definition.id}" needs exactly one of \`on.event\` or \`on.cron\`.`);
|
|
25
|
+
}
|
|
26
|
+
if (definition.idempotency && definition.idempotency.fields.length === 0) {
|
|
27
|
+
throw new Error(`Job "${definition.id}" declares idempotency with no fields.`);
|
|
28
|
+
}
|
|
29
|
+
for (const [key, value] of [
|
|
30
|
+
['retries', definition.retries],
|
|
31
|
+
['concurrency', definition.concurrency],
|
|
32
|
+
]) {
|
|
33
|
+
if (value !== undefined && (!Number.isInteger(value) || value < 0)) {
|
|
34
|
+
throw new Error(`Job "${definition.id}" has ${key} ${String(value)}; it must be a whole number.`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return Object.freeze({ ...definition, handler });
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=define.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../src/jobs/define.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,SAAS,CACvB,UAAyB,EACzB,OAAmC;IAEnC,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,UAAU,CAAC,EAAE,EAAE,CAAC;QAC7D,MAAM,IAAI,KAAK,CACb,8DAA8D,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,CAC/F,CAAA;IACH,CAAC;IACD,MAAM,EAAE,GAAG,UAAU,CAAC,EAAyC,CAAA;IAC/D,MAAM,QAAQ,GACZ,OAAO,EAAE,CAAC,KAAK,KAAK,QAAQ;QAC5B,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAA;IAClG,MAAM,OAAO,GAAG,OAAO,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAA;IAC3C,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,QAAQ,UAAU,CAAC,EAAE,qDAAqD,CAAC,CAAA;IAC7F,CAAC;IACD,IAAI,UAAU,CAAC,WAAW,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzE,MAAM,IAAI,KAAK,CAAC,QAAQ,UAAU,CAAC,EAAE,wCAAwC,CAAC,CAAA;IAChF,CAAC;IACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI;QACzB,CAAC,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC;QAC/B,CAAC,aAAa,EAAE,UAAU,CAAC,WAAW,CAAC;KAC/B,EAAE,CAAC;QACX,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;YACnE,MAAM,IAAI,KAAK,CACb,QAAQ,UAAU,CAAC,EAAE,SAAS,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,8BAA8B,CACjF,CAAA;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,CAAC,CAAA;AAClD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Payload } from 'payload';
|
|
2
|
+
import type { Logger } from '../plugin-contract/index.js';
|
|
3
|
+
import { type ErrorReporter } from '../observability/report.js';
|
|
4
|
+
import { type JobFailureWriter } from '../observability/writer.js';
|
|
5
|
+
import type { HealthcheckOptions, WorkflowFailureHandler } from './workflow-types.js';
|
|
6
|
+
export interface FailureHandlerOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The Payload instance whose `jobFailuresPlugin` writer receives the row.
|
|
9
|
+
* Without one — or without the plugin — the failure is logged and reported
|
|
10
|
+
* but not recorded.
|
|
11
|
+
*/
|
|
12
|
+
payload?: Payload | undefined;
|
|
13
|
+
/** Replaces the writer found on `payload`. */
|
|
14
|
+
writer?: JobFailureWriter | undefined;
|
|
15
|
+
/** Default: `reportError` from core, which posts to `ERROR_WEBHOOK_URL`. Pass `false` to not report. */
|
|
16
|
+
report?: ErrorReporter | false | undefined;
|
|
17
|
+
/** Default: core's console logger. */
|
|
18
|
+
logger?: Logger | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface HealthcheckFailureHandlerOptions extends FailureHandlerOptions {
|
|
21
|
+
/** The healthcheck function's id, recorded as the failure's source. Default: `'healthcheck'`. */
|
|
22
|
+
functionId?: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* An `onTerminalFailure` handler for any workflow factory here — or for any
|
|
26
|
+
* Inngest function, as its `onFailure`.
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* const onTerminalFailure = createTerminalFailureHandler({ payload })
|
|
30
|
+
* inngestJobs(inngest, { payload, onFailure: onTerminalFailure })
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function createTerminalFailureHandler(options?: FailureHandlerOptions): WorkflowFailureHandler;
|
|
34
|
+
/**
|
|
35
|
+
* A `HealthcheckOptions.onFailure` handler: once per run with failing checks,
|
|
36
|
+
* to the same three places.
|
|
37
|
+
*/
|
|
38
|
+
export declare function createHealthcheckFailureHandler(options?: HealthcheckFailureHandlerOptions): NonNullable<HealthcheckOptions['onFailure']>;
|
|
39
|
+
//# sourceMappingURL=failure-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failure-handler.d.ts","sourceRoot":"","sources":["../../src/jobs/failure-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAKL,KAAK,aAAa,EAGnB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAuBrF,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACrC,wGAAwG;IACxG,MAAM,CAAC,EAAE,aAAa,GAAG,KAAK,GAAG,SAAS,CAAA;IAC1C,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,gCAAiC,SAAQ,qBAAqB;IAC7E,iGAAiG;IACjG,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAChC;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE,qBAA0B,GAClC,sBAAsB,CAgBxB;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,GAAE,gCAAqC,GAC7C,WAAW,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAa9C"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { buildHealthcheckFailureReport, buildJobFailureReport, reportError, summariseReport, } from '../observability/report.js';
|
|
2
|
+
import { getJobFailureWriter } from '../observability/plugin.js';
|
|
3
|
+
import { defaultLogger } from '../logger/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* An `onTerminalFailure` handler for any workflow factory here — or for any
|
|
6
|
+
* Inngest function, as its `onFailure`.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* const onTerminalFailure = createTerminalFailureHandler({ payload })
|
|
10
|
+
* inngestJobs(inngest, { payload, onFailure: onTerminalFailure })
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export function createTerminalFailureHandler(options = {}) {
|
|
14
|
+
return async ({ error, event }) => {
|
|
15
|
+
let report;
|
|
16
|
+
try {
|
|
17
|
+
const data = event?.data;
|
|
18
|
+
report = buildJobFailureReport({
|
|
19
|
+
functionId: data?.function_id,
|
|
20
|
+
runId: data?.run_id,
|
|
21
|
+
triggerEvent: data?.event?.name,
|
|
22
|
+
error,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
await dispatch(report, '[job-failed]', options);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A `HealthcheckOptions.onFailure` handler: once per run with failing checks,
|
|
33
|
+
* to the same three places.
|
|
34
|
+
*/
|
|
35
|
+
export function createHealthcheckFailureHandler(options = {}) {
|
|
36
|
+
return async (failures) => {
|
|
37
|
+
let report;
|
|
38
|
+
try {
|
|
39
|
+
report = buildHealthcheckFailureReport(failures, options.functionId ? { functionId: options.functionId } : {});
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
await dispatch(report, '[healthcheck-failed]', options);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
async function dispatch(report, tag, options) {
|
|
48
|
+
const logger = options.logger ?? defaultLogger;
|
|
49
|
+
try {
|
|
50
|
+
// The stack goes to the log and the webhook; the row keeps the message.
|
|
51
|
+
logger.error(`${tag} ${summariseReport(report)}`, { report });
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
// Carry on to the other two.
|
|
55
|
+
}
|
|
56
|
+
const writer = options.writer ?? (options.payload ? getJobFailureWriter(options.payload) : undefined);
|
|
57
|
+
const reporter = options.report === false ? undefined : (options.report ?? reportError);
|
|
58
|
+
// Core's writer and reporter never reject. These wrappers are for a host's
|
|
59
|
+
// own, which may not keep that promise — or may throw before returning one.
|
|
60
|
+
await Promise.allSettled([(async () => writer?.(report))(), (async () => reporter?.(report))()]);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=failure-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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,CAAC,CAAA;IACzD,CAAC,CAAA;AACH,CAAC;AAED,KAAK,UAAU,QAAQ,CACrB,MAAmD,EACnD,GAAW,EACX,OAA8B;IAE9B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAA;IAC9C,IAAI,CAAC;QACH,wEAAwE;QACxE,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IAC/D,CAAC;IAAC,MAAM,CAAC;QACP,6BAA6B;IAC/B,CAAC;IAED,MAAM,MAAM,GACV,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IACxF,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC,CAAA;IAEvF,2EAA2E;IAC3E,4EAA4E;IAC5E,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAClG,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@forumone/throughline/jobs`: background work written once and run on either
|
|
3
|
+
* adapter, `inngestJobs` (`/jobs/inngest`) or `payloadJobs` (`/jobs/payload`).
|
|
4
|
+
* The platform's own jobs live with their owners: `/publishing`, `/approvals`,
|
|
5
|
+
* `/audit` and `/integrations`.
|
|
6
|
+
*
|
|
7
|
+
* Extend the event taxonomy with module augmentation:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* declare module '@forumone/throughline/jobs' {
|
|
11
|
+
* interface CoreEvents { 'site/thing.happened': { id: string } }
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Nothing here loads a runner: `inngest` appears only as a type.
|
|
16
|
+
*/
|
|
17
|
+
export type { CoreEvents, FrameworkEvents } from '../events/taxonomy.js';
|
|
18
|
+
export { defineJob } from './define.js';
|
|
19
|
+
export { eventSenderFor } from './sender.js';
|
|
20
|
+
export { jobEvents } from './inngest/adapter.js';
|
|
21
|
+
export { jobPayload } from './options.js';
|
|
22
|
+
export type { JobOptions } from './options.js';
|
|
23
|
+
export type { Job, JobContext, JobDefinition, JobEvent, JobHandler, JobIdempotency, JobLogger, JobStep, JobsAdapter, JobTrigger, ReceivedJobEvent, } from './types.js';
|
|
24
|
+
export { failureOptions } from './workflow-types.js';
|
|
25
|
+
export type { BaseWorkflowOptions, FailureAwareOptions, WorkflowFailureHandler, } from './workflow-types.js';
|
|
26
|
+
export { createHealthcheckFailureHandler, createTerminalFailureHandler } from './failure-handler.js';
|
|
27
|
+
export type { FailureHandlerOptions, HealthcheckFailureHandlerOptions } from './failure-handler.js';
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jobs/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EACV,GAAG,EACH,UAAU,EACV,aAAa,EACb,QAAQ,EACR,UAAU,EACV,cAAc,EACd,SAAS,EACT,OAAO,EACP,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA;AACpG,YAAY,EAAE,qBAAqB,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defineJob } from './define.js';
|
|
2
|
+
export { eventSenderFor } from './sender.js';
|
|
3
|
+
export { jobEvents } from './inngest/adapter.js';
|
|
4
|
+
export { jobPayload } from './options.js';
|
|
5
|
+
export { failureOptions } from './workflow-types.js';
|
|
6
|
+
export { createHealthcheckFailureHandler, createTerminalFailureHandler } from './failure-handler.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jobs/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAgBzC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAOpD,OAAO,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Inngest, InngestFunction } from 'inngest';
|
|
2
|
+
import type { Payload } from 'payload';
|
|
3
|
+
import type { WorkflowFailureHandler } from '../workflow-types.js';
|
|
4
|
+
import type { Job, JobIdempotency, JobsAdapter } from '../types.js';
|
|
5
|
+
export interface InngestJobsOptions {
|
|
6
|
+
/** Every job's terminal-failure handler, unless the job declares its own. */
|
|
7
|
+
onFailure?: WorkflowFailureHandler;
|
|
8
|
+
/** Handed to every job as `context.payload`. */
|
|
9
|
+
payload?: Payload;
|
|
10
|
+
}
|
|
11
|
+
export interface InngestJobsAdapter extends JobsAdapter {
|
|
12
|
+
readonly runner: 'inngest';
|
|
13
|
+
/** The Inngest function for one job. */
|
|
14
|
+
toFunction(job: Job): InngestFunction.Any;
|
|
15
|
+
/** The Inngest functions for many, in order, for `serve({ functions })`. */
|
|
16
|
+
functions(jobs: readonly Job[]): InngestFunction.Any[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Inngest's idempotency expression for a field list:
|
|
20
|
+
* `{ fields: ['collection', 'id'], separator: '/' }` becomes
|
|
21
|
+
* `event.data.collection + "/" + event.data.id`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function inngestIdempotency(idempotency: JobIdempotency): string;
|
|
24
|
+
/** The config `createFunction` receives, built once so tests can read it. */
|
|
25
|
+
export declare function inngestFunctionConfig(job: Job, options?: InngestJobsOptions): Record<string, unknown> & {
|
|
26
|
+
id: string;
|
|
27
|
+
};
|
|
28
|
+
/** The event names a job answers, as a list. Empty for a cron job. */
|
|
29
|
+
export declare function jobEvents(job: Job): readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* Run jobs on Inngest.
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* const jobs = inngestJobs(inngest, { onFailure: createTerminalFailureHandler({ payload }) })
|
|
35
|
+
* export const { GET, POST, PUT } = serve({ client: inngest, functions: jobs.functions(allJobs) })
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function inngestJobs(inngest: Inngest, options?: InngestJobsOptions): InngestJobsAdapter;
|
|
39
|
+
//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AE,kBAAuB,GAC/B,kBAAkB,CA2BpB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inngest's idempotency expression for a field list:
|
|
3
|
+
* `{ fields: ['collection', 'id'], separator: '/' }` becomes
|
|
4
|
+
* `event.data.collection + "/" + event.data.id`.
|
|
5
|
+
*/
|
|
6
|
+
export function inngestIdempotency(idempotency) {
|
|
7
|
+
const separator = JSON.stringify(idempotency.separator ?? ':');
|
|
8
|
+
return idempotency.fields.map((field) => `event.data.${field}`).join(` + ${separator} + `);
|
|
9
|
+
}
|
|
10
|
+
/** The config `createFunction` receives, built once so tests can read it. */
|
|
11
|
+
export function inngestFunctionConfig(job, options = {}) {
|
|
12
|
+
const onFailure = job.onFailure ?? options.onFailure;
|
|
13
|
+
return {
|
|
14
|
+
id: job.id,
|
|
15
|
+
// Each key only when set: `exactOptionalPropertyTypes` is on, and Inngest
|
|
16
|
+
// reads the presence of a key, so `undefined` is not the same as absent.
|
|
17
|
+
...(job.retries !== undefined ? { retries: job.retries } : {}),
|
|
18
|
+
...(job.concurrency !== undefined ? { concurrency: job.concurrency } : {}),
|
|
19
|
+
...(job.idempotency ? { idempotency: inngestIdempotency(job.idempotency) } : {}),
|
|
20
|
+
...(onFailure ? { onFailure } : {}),
|
|
21
|
+
triggers: 'event' in job.on ? jobEvents(job).map((event) => ({ event })) : [{ cron: job.on.cron }],
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** The event names a job answers, as a list. Empty for a cron job. */
|
|
25
|
+
export function jobEvents(job) {
|
|
26
|
+
if (!('event' in job.on))
|
|
27
|
+
return [];
|
|
28
|
+
return typeof job.on.event === 'string' ? [job.on.event] : job.on.event;
|
|
29
|
+
}
|
|
30
|
+
/** Inngest's handler arguments, as a job's context. */
|
|
31
|
+
function toContext(args, emit, payload) {
|
|
32
|
+
return {
|
|
33
|
+
event: {
|
|
34
|
+
name: args.event.name,
|
|
35
|
+
data: args.event.data,
|
|
36
|
+
...(typeof args.event.ts === 'number' ? { ts: args.event.ts } : {}),
|
|
37
|
+
},
|
|
38
|
+
step: {
|
|
39
|
+
run: (id, fn) => args.step.run(id, fn),
|
|
40
|
+
sleepUntil: async (id, until) => {
|
|
41
|
+
await args.step.sleepUntil(id, until);
|
|
42
|
+
},
|
|
43
|
+
sendEvent: async (id, event) => {
|
|
44
|
+
await args.step.sendEvent(id, Array.isArray(event) ? [...event] : event);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
runId: args.runId ?? 'unknown',
|
|
48
|
+
logger: args.logger,
|
|
49
|
+
emit,
|
|
50
|
+
...(payload ? { payload } : {}),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Run jobs on Inngest.
|
|
55
|
+
*
|
|
56
|
+
* ```ts
|
|
57
|
+
* const jobs = inngestJobs(inngest, { onFailure: createTerminalFailureHandler({ payload }) })
|
|
58
|
+
* export const { GET, POST, PUT } = serve({ client: inngest, functions: jobs.functions(allJobs) })
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export function inngestJobs(inngest, options = {}) {
|
|
62
|
+
const emit = async (event) => {
|
|
63
|
+
await inngest.send(Array.isArray(event) ? [...event] : event);
|
|
64
|
+
};
|
|
65
|
+
const toFunction = (job) => inngest.createFunction(inngestFunctionConfig(job, options), (args) => job.handler(toContext(args, emit, options.payload)));
|
|
66
|
+
return {
|
|
67
|
+
runner: 'inngest',
|
|
68
|
+
toFunction,
|
|
69
|
+
functions: (jobs) => {
|
|
70
|
+
const seen = new Set();
|
|
71
|
+
for (const job of jobs) {
|
|
72
|
+
if (seen.has(job.id))
|
|
73
|
+
throw new Error(`Two jobs share the id "${job.id}".`);
|
|
74
|
+
seen.add(job.id);
|
|
75
|
+
}
|
|
76
|
+
return jobs.map(toFunction);
|
|
77
|
+
},
|
|
78
|
+
emit,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=adapter.js.map
|
|
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BAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,CAAC,EAAE,IAAI,CAAC,CAAA;gBAC3E,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;YAClB,CAAC;YACD,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAC7B,CAAC;QACD,IAAI;KACL,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@forumone/throughline/jobs/inngest`: jobs on Inngest. `inngestJobs` keeps
|
|
3
|
+
* every platform job's function id, so a run in flight survives an upgrade.
|
|
4
|
+
* Also the Inngest client, and the Vercel environment pinning that keeps a
|
|
5
|
+
* preview from registering crons.
|
|
6
|
+
*
|
|
7
|
+
* Kept off the package root so a site running on Payload Jobs never loads
|
|
8
|
+
* `inngest`.
|
|
9
|
+
*/
|
|
10
|
+
export { inngestFunctionConfig, inngestIdempotency, inngestJobs } from './adapter.js';
|
|
11
|
+
export type { InngestJobsAdapter, InngestJobsOptions } from './adapter.js';
|
|
12
|
+
export { createInngestClient } from '../../events/inngest.js';
|
|
13
|
+
export type { InngestClientOptions } from '../../events/inngest.js';
|
|
14
|
+
export { registersInngestCrons, registrableInngestFunctions, resolveInngestEnv, } from '../../events/vercel.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jobs/inngest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACrF,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@forumone/throughline/jobs/inngest`: jobs on Inngest. `inngestJobs` keeps
|
|
3
|
+
* every platform job's function id, so a run in flight survives an upgrade.
|
|
4
|
+
* Also the Inngest client, and the Vercel environment pinning that keeps a
|
|
5
|
+
* preview from registering crons.
|
|
6
|
+
*
|
|
7
|
+
* Kept off the package root so a site running on Payload Jobs never loads
|
|
8
|
+
* `inngest`.
|
|
9
|
+
*/
|
|
10
|
+
export { inngestFunctionConfig, inngestIdempotency, inngestJobs } from './adapter.js';
|
|
11
|
+
export { createInngestClient } from '../../events/inngest.js';
|
|
12
|
+
export { registersInngestCrons, registrableInngestFunctions, resolveInngestEnv, } from '../../events/vercel.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jobs/inngest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAGrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAE7D,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Payload } from 'payload';
|
|
2
|
+
/**
|
|
3
|
+
* A workflow factory's options, as its job builder takes them: no Inngest
|
|
4
|
+
* client, and Payload optional.
|
|
5
|
+
*
|
|
6
|
+
* Optional because a job may be declared before Payload exists — a jobs
|
|
7
|
+
* adapter like `payloadJobs` is handed its jobs while the config is still being
|
|
8
|
+
* built. Such a job finds Payload on its context when it runs instead.
|
|
9
|
+
*/
|
|
10
|
+
export type JobOptions<T> = Omit<T, 'inngest' | 'payload'> & {
|
|
11
|
+
payload?: Payload;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The Payload a job runs against: the one it was built with, or the one its
|
|
15
|
+
* runner supplies. Throws, naming the job, when there is neither.
|
|
16
|
+
*/
|
|
17
|
+
export declare function jobPayload(fromOptions: Payload | undefined, fromContext: Payload | undefined, jobId: string): Payload;
|
|
18
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/jobs/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAElF;;;GAGG;AACH,wBAAgB,UAAU,CACxB,WAAW,EAAE,OAAO,GAAG,SAAS,EAChC,WAAW,EAAE,OAAO,GAAG,SAAS,EAChC,KAAK,EAAE,MAAM,GACZ,OAAO,CAQT"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Payload a job runs against: the one it was built with, or the one its
|
|
3
|
+
* runner supplies. Throws, naming the job, when there is neither.
|
|
4
|
+
*/
|
|
5
|
+
export function jobPayload(fromOptions, fromContext, jobId) {
|
|
6
|
+
const payload = fromOptions ?? fromContext;
|
|
7
|
+
if (!payload) {
|
|
8
|
+
throw new Error(`Job "${jobId}" needs Payload: pass \`payload\` in its options, or run it on payloadJobs (or inngestJobs given \`payload\`).`);
|
|
9
|
+
}
|
|
10
|
+
return payload;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/jobs/options.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,MAAM,UAAU,UAAU,CACxB,WAAgC,EAChC,WAAgC,EAChC,KAAa;IAEb,MAAM,OAAO,GAAG,WAAW,IAAI,WAAW,CAAA;IAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,QAAQ,KAAK,gHAAgH,CAC9H,CAAA;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|