@forumone/throughline 0.0.0-stage → 1.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +584 -0
- package/LICENSE +21 -0
- package/README.md +351 -2
- package/bin/payload-cli.mjs +443 -0
- package/bin/throughline-payload.mjs +6 -0
- package/dist/access/coreCollections.d.ts +18 -0
- package/dist/access/coreCollections.d.ts.map +1 -0
- package/dist/access/coreCollections.js +56 -0
- package/dist/access/coreCollections.js.map +1 -0
- package/dist/approvals/collection.d.ts +21 -0
- package/dist/approvals/collection.d.ts.map +1 -0
- package/dist/approvals/collection.js +99 -0
- package/dist/approvals/collection.js.map +1 -0
- package/dist/approvals/endpoints/action.d.ts +31 -0
- package/dist/approvals/endpoints/action.d.ts.map +1 -0
- package/dist/approvals/endpoints/action.js +205 -0
- package/dist/approvals/endpoints/action.js.map +1 -0
- package/dist/approvals/index.d.ts +19 -0
- package/dist/approvals/index.d.ts.map +1 -0
- package/dist/approvals/index.js +13 -0
- package/dist/approvals/index.js.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts +14 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.js +101 -0
- package/dist/approvals/jobs/expire-stale-approvals.js.map +1 -0
- package/dist/approvals/options.d.ts +76 -0
- package/dist/approvals/options.d.ts.map +1 -0
- package/dist/approvals/options.js +47 -0
- package/dist/approvals/options.js.map +1 -0
- package/dist/approvals/plugin.d.ts +4 -0
- package/dist/approvals/plugin.d.ts.map +1 -0
- package/dist/approvals/plugin.js +92 -0
- package/dist/approvals/plugin.js.map +1 -0
- package/dist/approvals/resolver.d.ts +18 -0
- package/dist/approvals/resolver.d.ts.map +1 -0
- package/dist/approvals/resolver.js +57 -0
- package/dist/approvals/resolver.js.map +1 -0
- package/dist/approvals/symbol.d.ts +12 -0
- package/dist/approvals/symbol.d.ts.map +1 -0
- package/dist/approvals/symbol.js +12 -0
- package/dist/approvals/symbol.js.map +1 -0
- package/dist/approvals/tokens.d.ts +48 -0
- package/dist/approvals/tokens.d.ts.map +1 -0
- package/dist/approvals/tokens.js +123 -0
- package/dist/approvals/tokens.js.map +1 -0
- package/dist/approvals/tools/descriptors.d.ts +26 -0
- package/dist/approvals/tools/descriptors.d.ts.map +1 -0
- package/dist/approvals/tools/descriptors.js +35 -0
- package/dist/approvals/tools/descriptors.js.map +1 -0
- package/dist/approvals/tools/get-approval-status.d.ts +11 -0
- package/dist/approvals/tools/get-approval-status.d.ts.map +1 -0
- package/dist/approvals/tools/get-approval-status.js +94 -0
- package/dist/approvals/tools/get-approval-status.js.map +1 -0
- package/dist/approvals/tools/index.d.ts +7 -0
- package/dist/approvals/tools/index.d.ts.map +1 -0
- package/dist/approvals/tools/index.js +7 -0
- package/dist/approvals/tools/index.js.map +1 -0
- package/dist/approvals/tools/list-my-requests.d.ts +11 -0
- package/dist/approvals/tools/list-my-requests.d.ts.map +1 -0
- package/dist/approvals/tools/list-my-requests.js +55 -0
- package/dist/approvals/tools/list-my-requests.js.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts +11 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.js +53 -0
- package/dist/approvals/tools/list-pending-approvals.js.map +1 -0
- package/dist/approvals/tools/request-approval.d.ts +13 -0
- package/dist/approvals/tools/request-approval.d.ts.map +1 -0
- package/dist/approvals/tools/request-approval.js +123 -0
- package/dist/approvals/tools/request-approval.js.map +1 -0
- package/dist/approvals/tools/respond-to-approval.d.ts +13 -0
- package/dist/approvals/tools/respond-to-approval.d.ts.map +1 -0
- package/dist/approvals/tools/respond-to-approval.js +98 -0
- package/dist/approvals/tools/respond-to-approval.js.map +1 -0
- package/dist/audit/collection.d.ts +22 -0
- package/dist/audit/collection.d.ts.map +1 -0
- package/dist/audit/collection.js +109 -0
- package/dist/audit/collection.js.map +1 -0
- package/dist/audit/index.d.ts +16 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +11 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/jobs/audit-event-echo.d.ts +14 -0
- package/dist/audit/jobs/audit-event-echo.d.ts.map +1 -0
- package/dist/audit/jobs/audit-event-echo.js +61 -0
- package/dist/audit/jobs/audit-event-echo.js.map +1 -0
- package/dist/audit/plugin.d.ts +20 -0
- package/dist/audit/plugin.d.ts.map +1 -0
- package/dist/audit/plugin.js +55 -0
- package/dist/audit/plugin.js.map +1 -0
- package/dist/audit/query/formatting/index.d.ts +40 -0
- package/dist/audit/query/formatting/index.d.ts.map +1 -0
- package/dist/audit/query/formatting/index.js +73 -0
- package/dist/audit/query/formatting/index.js.map +1 -0
- package/dist/audit/query/options.d.ts +34 -0
- package/dist/audit/query/options.d.ts.map +1 -0
- package/dist/audit/query/options.js +8 -0
- package/dist/audit/query/options.js.map +1 -0
- package/dist/audit/query/plugin.d.ts +11 -0
- package/dist/audit/query/plugin.d.ts.map +1 -0
- package/dist/audit/query/plugin.js +68 -0
- package/dist/audit/query/plugin.js.map +1 -0
- package/dist/audit/query/tools/access.d.ts +9 -0
- package/dist/audit/query/tools/access.d.ts.map +1 -0
- package/dist/audit/query/tools/access.js +14 -0
- package/dist/audit/query/tools/access.js.map +1 -0
- package/dist/audit/query/tools/descriptors.d.ts +26 -0
- package/dist/audit/query/tools/descriptors.d.ts.map +1 -0
- package/dist/audit/query/tools/descriptors.js +35 -0
- package/dist/audit/query/tools/descriptors.js.map +1 -0
- package/dist/audit/query/tools/get-change-history.d.ts +23 -0
- package/dist/audit/query/tools/get-change-history.d.ts.map +1 -0
- package/dist/audit/query/tools/get-change-history.js +44 -0
- package/dist/audit/query/tools/get-change-history.js.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts +23 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.js +56 -0
- package/dist/audit/query/tools/get-recent-failures.js.map +1 -0
- package/dist/audit/query/tools/index.d.ts +13 -0
- package/dist/audit/query/tools/index.d.ts.map +1 -0
- package/dist/audit/query/tools/index.js +8 -0
- package/dist/audit/query/tools/index.js.map +1 -0
- package/dist/audit/query/tools/query-audit.d.ts +53 -0
- package/dist/audit/query/tools/query-audit.d.ts.map +1 -0
- package/dist/audit/query/tools/query-audit.js +78 -0
- package/dist/audit/query/tools/query-audit.js.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts +23 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.js +86 -0
- package/dist/audit/query/tools/what-changed-in-range.js.map +1 -0
- package/dist/audit/query/tools/who-changed-what.d.ts +38 -0
- package/dist/audit/query/tools/who-changed-what.d.ts.map +1 -0
- package/dist/audit/query/tools/who-changed-what.js +66 -0
- package/dist/audit/query/tools/who-changed-what.js.map +1 -0
- package/dist/audit/types.d.ts +11 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +45 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/audit/writer.d.ts +50 -0
- package/dist/audit/writer.d.ts.map +1 -0
- package/dist/audit/writer.js +101 -0
- package/dist/audit/writer.js.map +1 -0
- package/dist/cache-tags.d.ts +31 -0
- package/dist/cache-tags.d.ts.map +1 -0
- package/dist/cache-tags.js +53 -0
- package/dist/cache-tags.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/manifest-source.d.ts +17 -0
- package/dist/components/manifest-source.d.ts.map +1 -0
- package/dist/components/manifest-source.js +60 -0
- package/dist/components/manifest-source.js.map +1 -0
- package/dist/components/matching/index.d.ts +3 -0
- package/dist/components/matching/index.d.ts.map +1 -0
- package/dist/components/matching/index.js +2 -0
- package/dist/components/matching/index.js.map +1 -0
- package/dist/components/matching/tfidf.d.ts +13 -0
- package/dist/components/matching/tfidf.d.ts.map +1 -0
- package/dist/components/matching/tfidf.js +118 -0
- package/dist/components/matching/tfidf.js.map +1 -0
- package/dist/components/matching/types.d.ts +22 -0
- package/dist/components/matching/types.d.ts.map +1 -0
- package/dist/components/matching/types.js +2 -0
- package/dist/components/matching/types.js.map +1 -0
- package/dist/components/options.d.ts +136 -0
- package/dist/components/options.d.ts.map +1 -0
- package/dist/components/options.js +40 -0
- package/dist/components/options.js.map +1 -0
- package/dist/components/plugin.d.ts +4 -0
- package/dist/components/plugin.d.ts.map +1 -0
- package/dist/components/plugin.js +95 -0
- package/dist/components/plugin.js.map +1 -0
- package/dist/components/tools/descriptors.d.ts +34 -0
- package/dist/components/tools/descriptors.d.ts.map +1 -0
- package/dist/components/tools/descriptors.js +43 -0
- package/dist/components/tools/descriptors.js.map +1 -0
- package/dist/components/tools/find-anti-pattern.d.ts +9 -0
- package/dist/components/tools/find-anti-pattern.d.ts.map +1 -0
- package/dist/components/tools/find-anti-pattern.js +31 -0
- package/dist/components/tools/find-anti-pattern.js.map +1 -0
- package/dist/components/tools/get-contract.d.ts +4 -0
- package/dist/components/tools/get-contract.d.ts.map +1 -0
- package/dist/components/tools/get-contract.js +19 -0
- package/dist/components/tools/get-contract.js.map +1 -0
- package/dist/components/tools/get-tokens.d.ts +4 -0
- package/dist/components/tools/get-tokens.d.ts.map +1 -0
- package/dist/components/tools/get-tokens.js +19 -0
- package/dist/components/tools/get-tokens.js.map +1 -0
- package/dist/components/tools/get-variants.d.ts +4 -0
- package/dist/components/tools/get-variants.d.ts.map +1 -0
- package/dist/components/tools/get-variants.js +19 -0
- package/dist/components/tools/get-variants.js.map +1 -0
- package/dist/components/tools/index.d.ts +9 -0
- package/dist/components/tools/index.d.ts.map +1 -0
- package/dist/components/tools/index.js +9 -0
- package/dist/components/tools/index.js.map +1 -0
- package/dist/components/tools/list-components.d.ts +4 -0
- package/dist/components/tools/list-components.d.ts.map +1 -0
- package/dist/components/tools/list-components.js +25 -0
- package/dist/components/tools/list-components.js.map +1 -0
- package/dist/components/tools/suggest-for-intent.d.ts +12 -0
- package/dist/components/tools/suggest-for-intent.d.ts.map +1 -0
- package/dist/components/tools/suggest-for-intent.js +83 -0
- package/dist/components/tools/suggest-for-intent.js.map +1 -0
- package/dist/components/tools/validate-composition.d.ts +9 -0
- package/dist/components/tools/validate-composition.d.ts.map +1 -0
- package/dist/components/tools/validate-composition.js +31 -0
- package/dist/components/tools/validate-composition.js.map +1 -0
- package/dist/components/validation/composition.d.ts +38 -0
- package/dist/components/validation/composition.d.ts.map +1 -0
- package/dist/components/validation/composition.js +135 -0
- package/dist/components/validation/composition.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts +9 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.js +47 -0
- package/dist/editorial/calendar/ContentCalendarReport.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts +3 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.js +36 -0
- package/dist/editorial/calendar/ContentCalendarView.js.map +1 -0
- package/dist/editorial/calendar/calendar.d.ts +30 -0
- package/dist/editorial/calendar/calendar.d.ts.map +1 -0
- package/dist/editorial/calendar/calendar.js +23 -0
- package/dist/editorial/calendar/calendar.js.map +1 -0
- package/dist/editorial/calendar/find.d.ts +41 -0
- package/dist/editorial/calendar/find.d.ts.map +1 -0
- package/dist/editorial/calendar/find.js +108 -0
- package/dist/editorial/calendar/find.js.map +1 -0
- package/dist/editorial/calendar/month.d.ts +45 -0
- package/dist/editorial/calendar/month.d.ts.map +1 -0
- package/dist/editorial/calendar/month.js +120 -0
- package/dist/editorial/calendar/month.js.map +1 -0
- package/dist/editorial/calendar/tool.d.ts +50 -0
- package/dist/editorial/calendar/tool.d.ts.map +1 -0
- package/dist/editorial/calendar/tool.js +68 -0
- package/dist/editorial/calendar/tool.js.map +1 -0
- package/dist/editorial/config.d.ts +25 -0
- package/dist/editorial/config.d.ts.map +1 -0
- package/dist/editorial/config.js +12 -0
- package/dist/editorial/config.js.map +1 -0
- package/dist/editorial/health/ContentHealthReport.d.ts +7 -0
- package/dist/editorial/health/ContentHealthReport.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthReport.js +29 -0
- package/dist/editorial/health/ContentHealthReport.js.map +1 -0
- package/dist/editorial/health/ContentHealthView.d.ts +3 -0
- package/dist/editorial/health/ContentHealthView.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthView.js +29 -0
- package/dist/editorial/health/ContentHealthView.js.map +1 -0
- package/dist/editorial/health/HealthSummary.d.ts +6 -0
- package/dist/editorial/health/HealthSummary.d.ts.map +1 -0
- package/dist/editorial/health/HealthSummary.js +39 -0
- package/dist/editorial/health/HealthSummary.js.map +1 -0
- package/dist/editorial/health/checks.d.ts +104 -0
- package/dist/editorial/health/checks.d.ts.map +1 -0
- package/dist/editorial/health/checks.js +188 -0
- package/dist/editorial/health/checks.js.map +1 -0
- package/dist/editorial/health/find.d.ts +43 -0
- package/dist/editorial/health/find.d.ts.map +1 -0
- package/dist/editorial/health/find.js +97 -0
- package/dist/editorial/health/find.js.map +1 -0
- package/dist/editorial/health/tool.d.ts +53 -0
- package/dist/editorial/health/tool.d.ts.map +1 -0
- package/dist/editorial/health/tool.js +80 -0
- package/dist/editorial/health/tool.js.map +1 -0
- package/dist/editorial/index.d.ts +25 -0
- package/dist/editorial/index.d.ts.map +1 -0
- package/dist/editorial/index.js +15 -0
- package/dist/editorial/index.js.map +1 -0
- package/dist/editorial/palette/CommandPalette.d.ts +15 -0
- package/dist/editorial/palette/CommandPalette.d.ts.map +1 -0
- package/dist/editorial/palette/CommandPalette.js +319 -0
- package/dist/editorial/palette/CommandPalette.js.map +1 -0
- package/dist/editorial/palette/ReportsNav.d.ts +5 -0
- package/dist/editorial/palette/ReportsNav.d.ts.map +1 -0
- package/dist/editorial/palette/ReportsNav.js +31 -0
- package/dist/editorial/palette/ReportsNav.js.map +1 -0
- package/dist/editorial/palette/search.d.ts +18 -0
- package/dist/editorial/palette/search.d.ts.map +1 -0
- package/dist/editorial/palette/search.js +41 -0
- package/dist/editorial/palette/search.js.map +1 -0
- package/dist/editorial/palette/sources.d.ts +64 -0
- package/dist/editorial/palette/sources.d.ts.map +1 -0
- package/dist/editorial/palette/sources.js +103 -0
- package/dist/editorial/palette/sources.js.map +1 -0
- package/dist/editorial/palette/styles.d.ts +2 -0
- package/dist/editorial/palette/styles.d.ts.map +1 -0
- package/dist/editorial/palette/styles.js +76 -0
- package/dist/editorial/palette/styles.js.map +1 -0
- package/dist/editorial/palette/tool.d.ts +31 -0
- package/dist/editorial/palette/tool.d.ts.map +1 -0
- package/dist/editorial/palette/tool.js +63 -0
- package/dist/editorial/palette/tool.js.map +1 -0
- package/dist/editorial/plugin.d.ts +76 -0
- package/dist/editorial/plugin.d.ts.map +1 -0
- package/dist/editorial/plugin.js +186 -0
- package/dist/editorial/plugin.js.map +1 -0
- package/dist/editorial/relativeTime.d.ts +3 -0
- package/dist/editorial/relativeTime.d.ts.map +1 -0
- package/dist/editorial/relativeTime.js +27 -0
- package/dist/editorial/relativeTime.js.map +1 -0
- package/dist/editorial/styles.d.ts +2 -0
- package/dist/editorial/styles.d.ts.map +1 -0
- package/dist/editorial/styles.js +191 -0
- package/dist/editorial/styles.js.map +1 -0
- package/dist/editorial/work/YourWork.d.ts +13 -0
- package/dist/editorial/work/YourWork.d.ts.map +1 -0
- package/dist/editorial/work/YourWork.js +40 -0
- package/dist/editorial/work/YourWork.js.map +1 -0
- package/dist/editorial/work/tool.d.ts +45 -0
- package/dist/editorial/work/tool.d.ts.map +1 -0
- package/dist/editorial/work/tool.js +54 -0
- package/dist/editorial/work/tool.js.map +1 -0
- package/dist/editorial/work/work.d.ts +31 -0
- package/dist/editorial/work/work.d.ts.map +1 -0
- package/dist/editorial/work/work.js +68 -0
- package/dist/editorial/work/work.js.map +1 -0
- package/dist/email/client.d.ts +78 -0
- package/dist/email/client.d.ts.map +1 -0
- package/dist/email/client.js +63 -0
- package/dist/email/client.js.map +1 -0
- package/dist/email/functions/_shared.d.ts +17 -0
- package/dist/email/functions/_shared.d.ts.map +1 -0
- package/dist/email/functions/_shared.js +40 -0
- package/dist/email/functions/_shared.js.map +1 -0
- package/dist/email/functions/index.d.ts +7 -0
- package/dist/email/functions/index.d.ts.map +1 -0
- package/dist/email/functions/index.js +4 -0
- package/dist/email/functions/index.js.map +1 -0
- package/dist/email/functions/notify-approval-decision.d.ts +34 -0
- package/dist/email/functions/notify-approval-decision.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-decision.js +77 -0
- package/dist/email/functions/notify-approval-decision.js.map +1 -0
- package/dist/email/functions/notify-approval-expired.d.ts +32 -0
- package/dist/email/functions/notify-approval-expired.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-expired.js +54 -0
- package/dist/email/functions/notify-approval-expired.js.map +1 -0
- package/dist/email/functions/notify-approval-request.d.ts +35 -0
- package/dist/email/functions/notify-approval-request.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-request.js +89 -0
- package/dist/email/functions/notify-approval-request.js.map +1 -0
- package/dist/email/index.d.ts +17 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +12 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/options.d.ts +100 -0
- package/dist/email/options.d.ts.map +1 -0
- package/dist/email/options.js +55 -0
- package/dist/email/options.js.map +1 -0
- package/dist/email/plugin.d.ts +28 -0
- package/dist/email/plugin.d.ts.map +1 -0
- package/dist/email/plugin.js +113 -0
- package/dist/email/plugin.js.map +1 -0
- package/dist/email/templates/ApprovalDecision.d.ts +15 -0
- package/dist/email/templates/ApprovalDecision.d.ts.map +1 -0
- package/dist/email/templates/ApprovalDecision.js +56 -0
- package/dist/email/templates/ApprovalDecision.js.map +1 -0
- package/dist/email/templates/ApprovalExpired.d.ts +10 -0
- package/dist/email/templates/ApprovalExpired.d.ts.map +1 -0
- package/dist/email/templates/ApprovalExpired.js +8 -0
- package/dist/email/templates/ApprovalExpired.js.map +1 -0
- package/dist/email/templates/ApprovalRequest.d.ts +24 -0
- package/dist/email/templates/ApprovalRequest.d.ts.map +1 -0
- package/dist/email/templates/ApprovalRequest.js +58 -0
- package/dist/email/templates/ApprovalRequest.js.map +1 -0
- package/dist/email/templates/_layout.d.ts +17 -0
- package/dist/email/templates/_layout.d.ts.map +1 -0
- package/dist/email/templates/_layout.js +39 -0
- package/dist/email/templates/_layout.js.map +1 -0
- package/dist/email/templates/index.d.ts +9 -0
- package/dist/email/templates/index.d.ts.map +1 -0
- package/dist/email/templates/index.js +5 -0
- package/dist/email/templates/index.js.map +1 -0
- package/dist/email/tokens.d.ts +39 -0
- package/dist/email/tokens.d.ts.map +1 -0
- package/dist/email/tokens.js +17 -0
- package/dist/email/tokens.js.map +1 -0
- package/dist/env/index.d.ts +54 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +113 -0
- package/dist/env/index.js.map +1 -0
- package/dist/events/inngest.d.ts +24 -0
- package/dist/events/inngest.d.ts.map +1 -0
- package/dist/events/inngest.js +24 -0
- package/dist/events/inngest.js.map +1 -0
- package/dist/events/taxonomy.d.ts +84 -0
- package/dist/events/taxonomy.d.ts.map +1 -0
- package/dist/events/taxonomy.js +10 -0
- package/dist/events/taxonomy.js.map +1 -0
- package/dist/events/vercel.d.ts +47 -0
- package/dist/events/vercel.d.ts.map +1 -0
- package/dist/events/vercel.js +69 -0
- package/dist/events/vercel.js.map +1 -0
- package/dist/exports/client.d.ts +24 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +21 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/rsc.d.ts +17 -0
- package/dist/exports/rsc.d.ts.map +1 -0
- package/dist/exports/rsc.js +19 -0
- package/dist/exports/rsc.js.map +1 -0
- package/dist/fields/CharacterCountField.d.ts +4 -0
- package/dist/fields/CharacterCountField.d.ts.map +1 -0
- package/dist/fields/CharacterCountField.js +94 -0
- package/dist/fields/CharacterCountField.js.map +1 -0
- package/dist/fields/characterCount.d.ts +15 -0
- package/dist/fields/characterCount.d.ts.map +1 -0
- package/dist/fields/characterCount.js +92 -0
- package/dist/fields/characterCount.js.map +1 -0
- package/dist/fields/checkSlug.d.ts +62 -0
- package/dist/fields/checkSlug.d.ts.map +1 -0
- package/dist/fields/checkSlug.js +119 -0
- package/dist/fields/checkSlug.js.map +1 -0
- package/dist/fields/index.d.ts +9 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.js +9 -0
- package/dist/fields/index.js.map +1 -0
- package/dist/fields/mapFields.d.ts +13 -0
- package/dist/fields/mapFields.d.ts.map +1 -0
- package/dist/fields/mapFields.js +32 -0
- package/dist/fields/mapFields.js.map +1 -0
- package/dist/fields/publishing.d.ts +33 -0
- package/dist/fields/publishing.d.ts.map +1 -0
- package/dist/fields/publishing.js +81 -0
- package/dist/fields/publishing.js.map +1 -0
- package/dist/fields/revisedAt.d.ts +15 -0
- package/dist/fields/revisedAt.d.ts.map +1 -0
- package/dist/fields/revisedAt.js +79 -0
- package/dist/fields/revisedAt.js.map +1 -0
- package/dist/fields/slug.d.ts +21 -0
- package/dist/fields/slug.d.ts.map +1 -0
- package/dist/fields/slug.js +102 -0
- package/dist/fields/slug.js.map +1 -0
- package/dist/fields/unlisted.d.ts +13 -0
- package/dist/fields/unlisted.d.ts.map +1 -0
- package/dist/fields/unlisted.js +35 -0
- package/dist/fields/unlisted.js.map +1 -0
- package/dist/fields/usedBy.d.ts +12 -0
- package/dist/fields/usedBy.d.ts.map +1 -0
- package/dist/fields/usedBy.js +36 -0
- package/dist/fields/usedBy.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/admin/SyncButton.d.ts +27 -0
- package/dist/integrations/admin/SyncButton.d.ts.map +1 -0
- package/dist/integrations/admin/SyncButton.js +134 -0
- package/dist/integrations/admin/SyncButton.js.map +1 -0
- package/dist/integrations/admin/sync-client.d.ts +83 -0
- package/dist/integrations/admin/sync-client.d.ts.map +1 -0
- package/dist/integrations/admin/sync-client.js +121 -0
- package/dist/integrations/admin/sync-client.js.map +1 -0
- package/dist/integrations/collection.d.ts +26 -0
- package/dist/integrations/collection.d.ts.map +1 -0
- package/dist/integrations/collection.js +193 -0
- package/dist/integrations/collection.js.map +1 -0
- package/dist/integrations/endpoints/sync.d.ts +27 -0
- package/dist/integrations/endpoints/sync.d.ts.map +1 -0
- package/dist/integrations/endpoints/sync.js +90 -0
- package/dist/integrations/endpoints/sync.js.map +1 -0
- package/dist/integrations/index.d.ts +22 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +15 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/index.d.ts +3 -0
- package/dist/integrations/integrations/index.d.ts.map +1 -0
- package/dist/integrations/integrations/index.js +2 -0
- package/dist/integrations/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts +33 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.js +54 -0
- package/dist/integrations/integrations/webhook/config-fields.js.map +1 -0
- package/dist/integrations/integrations/webhook/functions.d.ts +24 -0
- package/dist/integrations/integrations/webhook/functions.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/functions.js +139 -0
- package/dist/integrations/integrations/webhook/functions.js.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts +10 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.js +26 -0
- package/dist/integrations/integrations/webhook/healthcheck.js.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts +11 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.js +25 -0
- package/dist/integrations/integrations/webhook/hmac.js.map +1 -0
- package/dist/integrations/integrations/webhook/index.d.ts +6 -0
- package/dist/integrations/integrations/webhook/index.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/index.js +47 -0
- package/dist/integrations/integrations/webhook/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/payload.d.ts +9 -0
- package/dist/integrations/integrations/webhook/payload.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/payload.js +19 -0
- package/dist/integrations/integrations/webhook/payload.js.map +1 -0
- package/dist/integrations/jobs/healthcheck.d.ts +24 -0
- package/dist/integrations/jobs/healthcheck.d.ts.map +1 -0
- package/dist/integrations/jobs/healthcheck.js +133 -0
- package/dist/integrations/jobs/healthcheck.js.map +1 -0
- package/dist/integrations/options.d.ts +54 -0
- package/dist/integrations/options.d.ts.map +1 -0
- package/dist/integrations/options.js +8 -0
- package/dist/integrations/options.js.map +1 -0
- package/dist/integrations/plugin.d.ts +51 -0
- package/dist/integrations/plugin.d.ts.map +1 -0
- package/dist/integrations/plugin.js +215 -0
- package/dist/integrations/plugin.js.map +1 -0
- package/dist/integrations/registry.d.ts +27 -0
- package/dist/integrations/registry.d.ts.map +1 -0
- package/dist/integrations/registry.js +39 -0
- package/dist/integrations/registry.js.map +1 -0
- package/dist/integrations/sync/manual-sync.d.ts +70 -0
- package/dist/integrations/sync/manual-sync.d.ts.map +1 -0
- package/dist/integrations/sync/manual-sync.js +91 -0
- package/dist/integrations/sync/manual-sync.js.map +1 -0
- package/dist/integrations/sync/problems.d.ts +31 -0
- package/dist/integrations/sync/problems.d.ts.map +1 -0
- package/dist/integrations/sync/problems.js +40 -0
- package/dist/integrations/sync/problems.js.map +1 -0
- package/dist/integrations/sync/status.d.ts +15 -0
- package/dist/integrations/sync/status.d.ts.map +1 -0
- package/dist/integrations/sync/status.js +31 -0
- package/dist/integrations/sync/status.js.map +1 -0
- package/dist/integrations/tools/access.d.ts +5 -0
- package/dist/integrations/tools/access.d.ts.map +1 -0
- package/dist/integrations/tools/access.js +14 -0
- package/dist/integrations/tools/access.js.map +1 -0
- package/dist/integrations/tools/descriptors.d.ts +26 -0
- package/dist/integrations/tools/descriptors.d.ts.map +1 -0
- package/dist/integrations/tools/descriptors.js +35 -0
- package/dist/integrations/tools/descriptors.js.map +1 -0
- package/dist/integrations/tools/get-integration-status.d.ts +17 -0
- package/dist/integrations/tools/get-integration-status.d.ts.map +1 -0
- package/dist/integrations/tools/get-integration-status.js +41 -0
- package/dist/integrations/tools/get-integration-status.js.map +1 -0
- package/dist/integrations/tools/index.d.ts +13 -0
- package/dist/integrations/tools/index.d.ts.map +1 -0
- package/dist/integrations/tools/index.js +8 -0
- package/dist/integrations/tools/index.js.map +1 -0
- package/dist/integrations/tools/list-integration-types.d.ts +10 -0
- package/dist/integrations/tools/list-integration-types.d.ts.map +1 -0
- package/dist/integrations/tools/list-integration-types.js +22 -0
- package/dist/integrations/tools/list-integration-types.js.map +1 -0
- package/dist/integrations/tools/list-integrations.d.ts +20 -0
- package/dist/integrations/tools/list-integrations.d.ts.map +1 -0
- package/dist/integrations/tools/list-integrations.js +49 -0
- package/dist/integrations/tools/list-integrations.js.map +1 -0
- package/dist/integrations/tools/test-integration.d.ts +19 -0
- package/dist/integrations/tools/test-integration.d.ts.map +1 -0
- package/dist/integrations/tools/test-integration.js +51 -0
- package/dist/integrations/tools/test-integration.js.map +1 -0
- package/dist/integrations/tools/trigger-sync.d.ts +26 -0
- package/dist/integrations/tools/trigger-sync.d.ts.map +1 -0
- package/dist/integrations/tools/trigger-sync.js +44 -0
- package/dist/integrations/tools/trigger-sync.js.map +1 -0
- package/dist/integrations/types.d.ts +183 -0
- package/dist/integrations/types.d.ts.map +1 -0
- package/dist/integrations/types.js +2 -0
- package/dist/integrations/types.js.map +1 -0
- package/dist/jobs/define.d.ts +17 -0
- package/dist/jobs/define.d.ts.map +1 -0
- package/dist/jobs/define.js +39 -0
- package/dist/jobs/define.js.map +1 -0
- package/dist/jobs/failure-handler.d.ts +39 -0
- package/dist/jobs/failure-handler.d.ts.map +1 -0
- package/dist/jobs/failure-handler.js +62 -0
- package/dist/jobs/failure-handler.js.map +1 -0
- package/dist/jobs/index.d.ts +28 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +7 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/inngest/adapter.d.ts +39 -0
- package/dist/jobs/inngest/adapter.d.ts.map +1 -0
- package/dist/jobs/inngest/adapter.js +81 -0
- package/dist/jobs/inngest/adapter.js.map +1 -0
- package/dist/jobs/inngest/index.d.ts +15 -0
- package/dist/jobs/inngest/index.d.ts.map +1 -0
- package/dist/jobs/inngest/index.js +13 -0
- package/dist/jobs/inngest/index.js.map +1 -0
- package/dist/jobs/options.d.ts +18 -0
- package/dist/jobs/options.d.ts.map +1 -0
- package/dist/jobs/options.js +12 -0
- package/dist/jobs/options.js.map +1 -0
- package/dist/jobs/payload/adapter.d.ts +33 -0
- package/dist/jobs/payload/adapter.d.ts.map +1 -0
- package/dist/jobs/payload/adapter.js +257 -0
- package/dist/jobs/payload/adapter.js.map +1 -0
- package/dist/jobs/payload/index.d.ts +8 -0
- package/dist/jobs/payload/index.d.ts.map +1 -0
- package/dist/jobs/payload/index.js +7 -0
- package/dist/jobs/payload/index.js.map +1 -0
- package/dist/jobs/sender.d.ts +4 -0
- package/dist/jobs/sender.d.ts.map +1 -0
- package/dist/jobs/sender.js +19 -0
- package/dist/jobs/sender.js.map +1 -0
- package/dist/jobs/types.d.ts +105 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/workflow-types.d.ts +280 -0
- package/dist/jobs/workflow-types.d.ts.map +1 -0
- package/dist/jobs/workflow-types.js +22 -0
- package/dist/jobs/workflow-types.js.map +1 -0
- package/dist/logger/index.d.ts +9 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +41 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/mcp/api-key-access.d.ts +50 -0
- package/dist/mcp/api-key-access.d.ts.map +1 -0
- package/dist/mcp/api-key-access.js +94 -0
- package/dist/mcp/api-key-access.js.map +1 -0
- package/dist/mcp/audit-context.d.ts +39 -0
- package/dist/mcp/audit-context.d.ts.map +1 -0
- package/dist/mcp/audit-context.js +36 -0
- package/dist/mcp/audit-context.js.map +1 -0
- package/dist/mcp/audit-server.d.ts +13 -0
- package/dist/mcp/audit-server.d.ts.map +1 -0
- package/dist/mcp/audit-server.js +68 -0
- package/dist/mcp/audit-server.js.map +1 -0
- package/dist/mcp/collector.d.ts +51 -0
- package/dist/mcp/collector.d.ts.map +1 -0
- package/dist/mcp/collector.js +96 -0
- package/dist/mcp/collector.js.map +1 -0
- package/dist/mcp/envelope.d.ts +22 -0
- package/dist/mcp/envelope.d.ts.map +1 -0
- package/dist/mcp/envelope.js +22 -0
- package/dist/mcp/envelope.js.map +1 -0
- package/dist/mcp/index.d.ts +12 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/meta.d.ts +74 -0
- package/dist/mcp/meta.d.ts.map +1 -0
- package/dist/mcp/meta.js +27 -0
- package/dist/mcp/meta.js.map +1 -0
- package/dist/mcp/payload-mcp.d.ts +68 -0
- package/dist/mcp/payload-mcp.d.ts.map +1 -0
- package/dist/mcp/payload-mcp.js +175 -0
- package/dist/mcp/payload-mcp.js.map +1 -0
- package/dist/media/hooks.d.ts +70 -0
- package/dist/media/hooks.d.ts.map +1 -0
- package/dist/media/hooks.js +200 -0
- package/dist/media/hooks.js.map +1 -0
- package/dist/media/index.d.ts +8 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +7 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/svg.d.ts +17 -0
- package/dist/media/svg.d.ts.map +1 -0
- package/dist/media/svg.js +241 -0
- package/dist/media/svg.js.map +1 -0
- package/dist/media/uploadKey.d.ts +25 -0
- package/dist/media/uploadKey.d.ts.map +1 -0
- package/dist/media/uploadKey.js +70 -0
- package/dist/media/uploadKey.js.map +1 -0
- package/dist/observability/collection.d.ts +13 -0
- package/dist/observability/collection.d.ts.map +1 -0
- package/dist/observability/collection.js +76 -0
- package/dist/observability/collection.js.map +1 -0
- package/dist/observability/index.d.ts +10 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +6 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/plugin.d.ts +24 -0
- package/dist/observability/plugin.d.ts.map +1 -0
- package/dist/observability/plugin.js +59 -0
- package/dist/observability/plugin.js.map +1 -0
- package/dist/observability/report.d.ts +175 -0
- package/dist/observability/report.d.ts.map +1 -0
- package/dist/observability/report.js +274 -0
- package/dist/observability/report.js.map +1 -0
- package/dist/observability/tool.d.ts +33 -0
- package/dist/observability/tool.d.ts.map +1 -0
- package/dist/observability/tool.js +75 -0
- package/dist/observability/tool.js.map +1 -0
- package/dist/observability/writer.d.ts +24 -0
- package/dist/observability/writer.d.ts.map +1 -0
- package/dist/observability/writer.js +72 -0
- package/dist/observability/writer.js.map +1 -0
- package/dist/plugin-contract/admin.d.ts +45 -0
- package/dist/plugin-contract/admin.d.ts.map +1 -0
- package/dist/plugin-contract/admin.js +12 -0
- package/dist/plugin-contract/admin.js.map +1 -0
- package/dist/plugin-contract/env.d.ts +29 -0
- package/dist/plugin-contract/env.d.ts.map +1 -0
- package/dist/plugin-contract/env.js +2 -0
- package/dist/plugin-contract/env.js.map +1 -0
- package/dist/plugin-contract/index.d.ts +39 -0
- package/dist/plugin-contract/index.d.ts.map +1 -0
- package/dist/plugin-contract/index.js +5 -0
- package/dist/plugin-contract/index.js.map +1 -0
- package/dist/plugin-contract/mcp.d.ts +51 -0
- package/dist/plugin-contract/mcp.d.ts.map +1 -0
- package/dist/plugin-contract/mcp.js +2 -0
- package/dist/plugin-contract/mcp.js.map +1 -0
- package/dist/plugin-contract/registry.d.ts +23 -0
- package/dist/plugin-contract/registry.d.ts.map +1 -0
- package/dist/plugin-contract/registry.js +51 -0
- package/dist/plugin-contract/registry.js.map +1 -0
- package/dist/publishing/admin/PublishButton.d.ts +22 -0
- package/dist/publishing/admin/PublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/PublishButton.js +164 -0
- package/dist/publishing/admin/PublishButton.js.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts +24 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.js +160 -0
- package/dist/publishing/admin/SchedulePublishField.js.map +1 -0
- package/dist/publishing/admin/UnpublishButton.d.ts +15 -0
- package/dist/publishing/admin/UnpublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/UnpublishButton.js +90 -0
- package/dist/publishing/admin/UnpublishButton.js.map +1 -0
- package/dist/publishing/admin/publishing-client.d.ts +105 -0
- package/dist/publishing/admin/publishing-client.d.ts.map +1 -0
- package/dist/publishing/admin/publishing-client.js +139 -0
- package/dist/publishing/admin/publishing-client.js.map +1 -0
- package/dist/publishing/admin/schedule-state.d.ts +30 -0
- package/dist/publishing/admin/schedule-state.d.ts.map +1 -0
- package/dist/publishing/admin/schedule-state.js +39 -0
- package/dist/publishing/admin/schedule-state.js.map +1 -0
- package/dist/publishing/checks/alt-text.d.ts +17 -0
- package/dist/publishing/checks/alt-text.d.ts.map +1 -0
- package/dist/publishing/checks/alt-text.js +63 -0
- package/dist/publishing/checks/alt-text.js.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts +11 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.js +32 -0
- package/dist/publishing/checks/heading-hierarchy.js.map +1 -0
- package/dist/publishing/checks/index.d.ts +6 -0
- package/dist/publishing/checks/index.d.ts.map +1 -0
- package/dist/publishing/checks/index.js +13 -0
- package/dist/publishing/checks/index.js.map +1 -0
- package/dist/publishing/checks/link-labels.d.ts +9 -0
- package/dist/publishing/checks/link-labels.d.ts.map +1 -0
- package/dist/publishing/checks/link-labels.js +44 -0
- package/dist/publishing/checks/link-labels.js.map +1 -0
- package/dist/publishing/endpoints/admin.d.ts +19 -0
- package/dist/publishing/endpoints/admin.d.ts.map +1 -0
- package/dist/publishing/endpoints/admin.js +112 -0
- package/dist/publishing/endpoints/admin.js.map +1 -0
- package/dist/publishing/events.d.ts +16 -0
- package/dist/publishing/events.d.ts.map +1 -0
- package/dist/publishing/events.js +30 -0
- package/dist/publishing/events.js.map +1 -0
- package/dist/publishing/hooks/block-status-writes.d.ts +52 -0
- package/dist/publishing/hooks/block-status-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/block-status-writes.js +242 -0
- package/dist/publishing/hooks/block-status-writes.js.map +1 -0
- package/dist/publishing/hooks/draft-writes.d.ts +32 -0
- package/dist/publishing/hooks/draft-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/draft-writes.js +76 -0
- package/dist/publishing/hooks/draft-writes.js.map +1 -0
- package/dist/publishing/hooks/schedule-events.d.ts +26 -0
- package/dist/publishing/hooks/schedule-events.d.ts.map +1 -0
- package/dist/publishing/hooks/schedule-events.js +54 -0
- package/dist/publishing/hooks/schedule-events.js.map +1 -0
- package/dist/publishing/index.d.ts +35 -0
- package/dist/publishing/index.d.ts.map +1 -0
- package/dist/publishing/index.js +32 -0
- package/dist/publishing/index.js.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts +24 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js +114 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js.map +1 -0
- package/dist/publishing/jobs/next-revalidate.d.ts +43 -0
- package/dist/publishing/jobs/next-revalidate.d.ts.map +1 -0
- package/dist/publishing/jobs/next-revalidate.js +42 -0
- package/dist/publishing/jobs/next-revalidate.js.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts +24 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js +136 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts +24 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.js +78 -0
- package/dist/publishing/jobs/revalidate-on-publish.js.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts +80 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js +116 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js.map +1 -0
- package/dist/publishing/options.d.ts +100 -0
- package/dist/publishing/options.d.ts.map +1 -0
- package/dist/publishing/options.js +56 -0
- package/dist/publishing/options.js.map +1 -0
- package/dist/publishing/pipeline/index.d.ts +20 -0
- package/dist/publishing/pipeline/index.d.ts.map +1 -0
- package/dist/publishing/pipeline/index.js +88 -0
- package/dist/publishing/pipeline/index.js.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts +13 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.js +37 -0
- package/dist/publishing/pipeline/steps/accessibility.js.map +1 -0
- package/dist/publishing/pipeline/steps/approval.d.ts +14 -0
- package/dist/publishing/pipeline/steps/approval.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/approval.js +54 -0
- package/dist/publishing/pipeline/steps/approval.js.map +1 -0
- package/dist/publishing/pipeline/steps/composition.d.ts +14 -0
- package/dist/publishing/pipeline/steps/composition.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/composition.js +63 -0
- package/dist/publishing/pipeline/steps/composition.js.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts +12 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.js +41 -0
- package/dist/publishing/pipeline/steps/embargo.js.map +1 -0
- package/dist/publishing/pipeline/steps/execute.d.ts +52 -0
- package/dist/publishing/pipeline/steps/execute.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/execute.js +161 -0
- package/dist/publishing/pipeline/steps/execute.js.map +1 -0
- package/dist/publishing/pipeline/steps/exist.d.ts +9 -0
- package/dist/publishing/pipeline/steps/exist.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/exist.js +31 -0
- package/dist/publishing/pipeline/steps/exist.js.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts +9 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.js +63 -0
- package/dist/publishing/pipeline/steps/required-fields.js.map +1 -0
- package/dist/publishing/pipeline/types.d.ts +72 -0
- package/dist/publishing/pipeline/types.d.ts.map +1 -0
- package/dist/publishing/pipeline/types.js +2 -0
- package/dist/publishing/pipeline/types.js.map +1 -0
- package/dist/publishing/plugin.d.ts +4 -0
- package/dist/publishing/plugin.d.ts.map +1 -0
- package/dist/publishing/plugin.js +196 -0
- package/dist/publishing/plugin.js.map +1 -0
- package/dist/publishing/service.d.ts +149 -0
- package/dist/publishing/service.d.ts.map +1 -0
- package/dist/publishing/service.js +474 -0
- package/dist/publishing/service.js.map +1 -0
- package/dist/publishing/tools/actor.d.ts +32 -0
- package/dist/publishing/tools/actor.d.ts.map +1 -0
- package/dist/publishing/tools/actor.js +40 -0
- package/dist/publishing/tools/actor.js.map +1 -0
- package/dist/publishing/tools/descriptors.d.ts +26 -0
- package/dist/publishing/tools/descriptors.d.ts.map +1 -0
- package/dist/publishing/tools/descriptors.js +38 -0
- package/dist/publishing/tools/descriptors.js.map +1 -0
- package/dist/publishing/tools/get-publish-status.d.ts +12 -0
- package/dist/publishing/tools/get-publish-status.d.ts.map +1 -0
- package/dist/publishing/tools/get-publish-status.js +45 -0
- package/dist/publishing/tools/get-publish-status.js.map +1 -0
- package/dist/publishing/tools/index.d.ts +7 -0
- package/dist/publishing/tools/index.d.ts.map +1 -0
- package/dist/publishing/tools/index.js +7 -0
- package/dist/publishing/tools/index.js.map +1 -0
- package/dist/publishing/tools/publish.d.ts +14 -0
- package/dist/publishing/tools/publish.d.ts.map +1 -0
- package/dist/publishing/tools/publish.js +35 -0
- package/dist/publishing/tools/publish.js.map +1 -0
- package/dist/publishing/tools/rollback.d.ts +11 -0
- package/dist/publishing/tools/rollback.d.ts.map +1 -0
- package/dist/publishing/tools/rollback.js +98 -0
- package/dist/publishing/tools/rollback.js.map +1 -0
- package/dist/publishing/tools/schedule-publish.d.ts +20 -0
- package/dist/publishing/tools/schedule-publish.d.ts.map +1 -0
- package/dist/publishing/tools/schedule-publish.js +49 -0
- package/dist/publishing/tools/schedule-publish.js.map +1 -0
- package/dist/publishing/tools/unpublish.d.ts +14 -0
- package/dist/publishing/tools/unpublish.d.ts.map +1 -0
- package/dist/publishing/tools/unpublish.js +29 -0
- package/dist/publishing/tools/unpublish.js.map +1 -0
- package/dist/references/UsedOnPanel.d.ts +3 -0
- package/dist/references/UsedOnPanel.d.ts.map +1 -0
- package/dist/references/UsedOnPanel.js +47 -0
- package/dist/references/UsedOnPanel.js.map +1 -0
- package/dist/references/find.d.ts +46 -0
- package/dist/references/find.d.ts.map +1 -0
- package/dist/references/find.js +142 -0
- package/dist/references/find.js.map +1 -0
- package/dist/references/guards.d.ts +32 -0
- package/dist/references/guards.d.ts.map +1 -0
- package/dist/references/guards.js +76 -0
- package/dist/references/guards.js.map +1 -0
- package/dist/references/index.d.ts +11 -0
- package/dist/references/index.d.ts.map +1 -0
- package/dist/references/index.js +6 -0
- package/dist/references/index.js.map +1 -0
- package/dist/references/plugin.d.ts +51 -0
- package/dist/references/plugin.d.ts.map +1 -0
- package/dist/references/plugin.js +111 -0
- package/dist/references/plugin.js.map +1 -0
- package/dist/references/tools.d.ts +54 -0
- package/dist/references/tools.d.ts.map +1 -0
- package/dist/references/tools.js +124 -0
- package/dist/references/tools.js.map +1 -0
- package/dist/references/walk.d.ts +43 -0
- package/dist/references/walk.d.ts.map +1 -0
- package/dist/references/walk.js +214 -0
- package/dist/references/walk.js.map +1 -0
- package/dist/testing/anonymousAccess.d.ts +111 -0
- package/dist/testing/anonymousAccess.d.ts.map +1 -0
- package/dist/testing/anonymousAccess.js +185 -0
- package/dist/testing/anonymousAccess.js.map +1 -0
- package/dist/testing/describeAnonymousAccess.d.ts +26 -0
- package/dist/testing/describeAnonymousAccess.d.ts.map +1 -0
- package/dist/testing/describeAnonymousAccess.js +76 -0
- package/dist/testing/describeAnonymousAccess.js.map +1 -0
- package/dist/testing/index.d.ts +11 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +9 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/utils/content-hash.d.ts +31 -0
- package/dist/utils/content-hash.d.ts.map +1 -0
- package/dist/utils/content-hash.js +94 -0
- package/dist/utils/content-hash.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/relationships.d.ts +17 -0
- package/dist/utils/relationships.d.ts.map +1 -0
- package/dist/utils/relationships.js +26 -0
- package/dist/utils/relationships.js.map +1 -0
- package/dist/utils/sha256.d.ts +10 -0
- package/dist/utils/sha256.d.ts.map +1 -0
- package/dist/utils/sha256.js +16 -0
- package/dist/utils/sha256.js.map +1 -0
- package/dist/utils/zod-issues.d.ts +19 -0
- package/dist/utils/zod-issues.d.ts.map +1 -0
- package/dist/utils/zod-issues.js +22 -0
- package/dist/utils/zod-issues.js.map +1 -0
- package/package.json +180 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-my-requests.d.ts","sourceRoot":"","sources":["../../../src/approvals/tools/list-my-requests.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAG3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,sBAAsB,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1D;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,CAmDpF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { withMeta } from '../../mcp/meta.js';
|
|
3
|
+
import { DEFAULT_APPROVALS_SLUG } from '../collection.js';
|
|
4
|
+
import { APPROVALS_TOOLS } from './descriptors.js';
|
|
5
|
+
export function createListMyRequestsTool(deps) {
|
|
6
|
+
const inputSchema = withMeta({
|
|
7
|
+
status: z
|
|
8
|
+
.enum(['pending', 'granted', 'declined', 'changes-requested', 'expired'])
|
|
9
|
+
.optional()
|
|
10
|
+
.describe('Filter by status. Defaults to all.'),
|
|
11
|
+
limit: z
|
|
12
|
+
.number()
|
|
13
|
+
.int()
|
|
14
|
+
.positive()
|
|
15
|
+
.max(100)
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('Max results. Default: 25'),
|
|
18
|
+
});
|
|
19
|
+
return {
|
|
20
|
+
...APPROVALS_TOOLS.listMyRequests,
|
|
21
|
+
inputSchema,
|
|
22
|
+
handler: async (input, ctx) => {
|
|
23
|
+
if (!ctx.user)
|
|
24
|
+
return { error: 'Must be authenticated to list approval requests' };
|
|
25
|
+
const result = await deps.payload.find({
|
|
26
|
+
collection: deps.options.collectionSlug ?? DEFAULT_APPROVALS_SLUG,
|
|
27
|
+
where: input.status
|
|
28
|
+
? {
|
|
29
|
+
and: [
|
|
30
|
+
{ requestedBy: { equals: ctx.user.id } },
|
|
31
|
+
{ status: { equals: input.status } },
|
|
32
|
+
],
|
|
33
|
+
}
|
|
34
|
+
: { requestedBy: { equals: ctx.user.id } },
|
|
35
|
+
limit: input.limit ?? 25,
|
|
36
|
+
sort: '-requestedAt',
|
|
37
|
+
});
|
|
38
|
+
const docs = result.docs;
|
|
39
|
+
return {
|
|
40
|
+
requests: docs.map((doc) => ({
|
|
41
|
+
approvalId: String(doc['id']),
|
|
42
|
+
status: doc['status'],
|
|
43
|
+
targetCollection: doc['targetCollection'],
|
|
44
|
+
targetId: doc['targetId'],
|
|
45
|
+
targetTitle: doc['targetTitle'],
|
|
46
|
+
requestedAt: doc['requestedAt'],
|
|
47
|
+
decidedAt: doc['decidedAt'],
|
|
48
|
+
decisionNotes: doc['decisionNotes'],
|
|
49
|
+
expiresAt: doc['expiresAt'],
|
|
50
|
+
})),
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=list-my-requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-my-requests.js","sourceRoot":"","sources":["../../../src/approvals/tools/list-my-requests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAOlD,MAAM,UAAU,wBAAwB,CAAC,IAAwB;IAC/D,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC3B,MAAM,EAAE,CAAC;aACN,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC;aACxE,QAAQ,EAAE;aACV,QAAQ,CAAC,oCAAoC,CAAC;QACjD,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE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,WAAW,EAAE,GAAG,CAAC,aAAa,CAAC;oBAC/B,WAAW,EAAE,GAAG,CAAC,aAAa,CAAC;oBAC/B,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC;oBAC3B,aAAa,EAAE,GAAG,CAAC,eAAe,CAAC;oBACnC,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC;iBAC5B,CAAC,CAAC;aACJ,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Payload } from 'payload';
|
|
2
|
+
import type { McpToolDefinition } from '../../plugin-contract/mcp.js';
|
|
3
|
+
import type { ApprovalsPluginOptions } from '../options.js';
|
|
4
|
+
export interface ListPendingApprovalsDeps {
|
|
5
|
+
payload: Payload;
|
|
6
|
+
options: ApprovalsPluginOptions & {
|
|
7
|
+
tokenSecret: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare function createListPendingApprovalsTool(deps: ListPendingApprovalsDeps): McpToolDefinition;
|
|
11
|
+
//# sourceMappingURL=list-pending-approvals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-pending-approvals.d.ts","sourceRoot":"","sources":["../../../src/approvals/tools/list-pending-approvals.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAGtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAG3D,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,sBAAsB,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1D;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,wBAAwB,GAC7B,iBAAiB,CA+CnB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { unwrapRelationshipId } from '../../utils/relationships.js';
|
|
3
|
+
import { withMeta } from '../../mcp/meta.js';
|
|
4
|
+
import { DEFAULT_APPROVALS_SLUG } from '../collection.js';
|
|
5
|
+
import { APPROVALS_TOOLS } from './descriptors.js';
|
|
6
|
+
export function createListPendingApprovalsTool(deps) {
|
|
7
|
+
const inputSchema = withMeta({
|
|
8
|
+
limit: z
|
|
9
|
+
.number()
|
|
10
|
+
.int()
|
|
11
|
+
.positive()
|
|
12
|
+
.max(100)
|
|
13
|
+
.optional()
|
|
14
|
+
.describe('Max results. Default: 25'),
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
...APPROVALS_TOOLS.listPendingApprovals,
|
|
18
|
+
inputSchema,
|
|
19
|
+
handler: async (input, ctx) => {
|
|
20
|
+
if (!ctx.user)
|
|
21
|
+
return { error: 'Must be authenticated to list pending approvals' };
|
|
22
|
+
const userGroups = ctx.user.groups;
|
|
23
|
+
if (userGroups.length === 0)
|
|
24
|
+
return { pending: [] };
|
|
25
|
+
const result = await deps.payload.find({
|
|
26
|
+
collection: deps.options.collectionSlug ?? DEFAULT_APPROVALS_SLUG,
|
|
27
|
+
where: {
|
|
28
|
+
and: [
|
|
29
|
+
{ status: { equals: 'pending' } },
|
|
30
|
+
{ approverGroups: { in: userGroups } },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
limit: input.limit ?? 25,
|
|
34
|
+
sort: '-requestedAt',
|
|
35
|
+
});
|
|
36
|
+
const docs = result.docs;
|
|
37
|
+
return {
|
|
38
|
+
pending: docs.map((doc) => ({
|
|
39
|
+
approvalId: String(doc['id']),
|
|
40
|
+
targetCollection: doc['targetCollection'],
|
|
41
|
+
targetId: doc['targetId'],
|
|
42
|
+
targetTitle: doc['targetTitle'],
|
|
43
|
+
changesSummary: doc['changesSummary'],
|
|
44
|
+
requestedBy: unwrapRelationshipId(doc['requestedBy']),
|
|
45
|
+
requestedAt: doc['requestedAt'],
|
|
46
|
+
expiresAt: doc['expiresAt'],
|
|
47
|
+
previewUrl: doc['previewUrl'],
|
|
48
|
+
})),
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=list-pending-approvals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-pending-approvals.js","sourceRoot":"","sources":["../../../src/approvals/tools/list-pending-approvals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAOlD,MAAM,UAAU,8BAA8B,CAC5C,IAA8B;IAE9B,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC3B,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,EAAE;aACV,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,0BAA0B,CAAC;KACxC,CAAC,CAAA;IAEF,OAAO;QACL,GAAG,eAAe,CAAC,oBAAoB;QACvC,WAAW;QACX,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,IAAI;gBAAE,OAAO,EAAE,KAAK,EAAE,iDAAiD,EAAE,CAAA;YAClF,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAA;YAClC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;YAEnD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gBACrC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,cAAc,IAAI,sBAAsB;gBACjE,KAAK,EAAE;oBACL,GAAG,EAAE;wBACH,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;wBACjC,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE;qBACvC;iBACF;gBACD,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE;gBACxB,IAAI,EAAE,cAAc;aACrB,CAAC,CAAA;YAEF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAsC,CAAA;YAC1D,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBAC1B,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBAC7B,gBAAgB,EAAE,GAAG,CAAC,kBAAkB,CAAC;oBACzC,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC;oBACzB,WAAW,EAAE,GAAG,CAAC,aAAa,CAAC;oBAC/B,cAAc,EAAE,GAAG,CAAC,gBAAgB,CAAC;oBACrC,WAAW,EAAE,oBAAoB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;oBACrD,WAAW,EAAE,GAAG,CAAC,aAAa,CAAC;oBAC/B,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC;oBAC3B,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC;iBAC9B,CAAC,CAAC;aACJ,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Payload } from 'payload';
|
|
2
|
+
import { type AuditWriter } from '../../audit/writer.js';
|
|
3
|
+
import type { McpToolDefinition } from '../../plugin-contract/mcp.js';
|
|
4
|
+
import type { ApprovalsPluginOptions } from '../options.js';
|
|
5
|
+
export interface RequestApprovalDeps {
|
|
6
|
+
payload: Payload;
|
|
7
|
+
options: ApprovalsPluginOptions & {
|
|
8
|
+
tokenSecret: string;
|
|
9
|
+
};
|
|
10
|
+
auditWriter: AuditWriter;
|
|
11
|
+
}
|
|
12
|
+
export declare function createRequestApprovalTool(deps: RequestApprovalDeps): McpToolDefinition;
|
|
13
|
+
//# sourceMappingURL=request-approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-approval.d.ts","sourceRoot":"","sources":["../../../src/approvals/tools/request-approval.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAG3D,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,sBAAsB,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;IACzD,WAAW,EAAE,WAAW,CAAA;CACzB;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,GAAG,iBAAiB,CA+HtF"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { auditContext } from '../../mcp/audit-context.js';
|
|
3
|
+
import { documentContentHash } from '../../utils/content-hash.js';
|
|
4
|
+
import { withMeta } from '../../mcp/meta.js';
|
|
5
|
+
import { DEFAULT_APPROVALS_SLUG } from '../collection.js';
|
|
6
|
+
import { APPROVALS_TOOLS } from './descriptors.js';
|
|
7
|
+
export function createRequestApprovalTool(deps) {
|
|
8
|
+
const inputSchema = withMeta({
|
|
9
|
+
collection: z.string(),
|
|
10
|
+
id: z.string(),
|
|
11
|
+
changesSummary: z
|
|
12
|
+
.string()
|
|
13
|
+
.min(20)
|
|
14
|
+
.describe('Clear description of what is changing and why, shown to approvers in notifications'),
|
|
15
|
+
requestReason: z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Optional context about why the change is being made'),
|
|
19
|
+
approverGroups: z
|
|
20
|
+
.array(z.string())
|
|
21
|
+
.min(1)
|
|
22
|
+
.describe('Group slugs the request should be routed to'),
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
...APPROVALS_TOOLS.requestApproval,
|
|
26
|
+
requiredScope: 'approvals.request',
|
|
27
|
+
inputSchema,
|
|
28
|
+
handler: async (input, ctx) => {
|
|
29
|
+
if (!ctx.user) {
|
|
30
|
+
return { error: 'Approval requests must be made by an authenticated user' };
|
|
31
|
+
}
|
|
32
|
+
const approverGroups = input.approverGroups;
|
|
33
|
+
const validGroupSlugs = new Set(deps.options.groups.map((g) => g.slug));
|
|
34
|
+
const unknownGroups = approverGroups.filter((g) => !validGroupSlugs.has(g));
|
|
35
|
+
if (unknownGroups.length > 0) {
|
|
36
|
+
return { error: `Unknown approver groups: ${unknownGroups.join(', ')}` };
|
|
37
|
+
}
|
|
38
|
+
const document = (await deps.payload.findByID({
|
|
39
|
+
collection: input.collection,
|
|
40
|
+
id: input.id,
|
|
41
|
+
draft: true,
|
|
42
|
+
}));
|
|
43
|
+
if (!document)
|
|
44
|
+
return { error: 'Document not found' };
|
|
45
|
+
const approvers = await deps.options.groupResolver.resolveUsers(approverGroups);
|
|
46
|
+
if (approvers.length === 0) {
|
|
47
|
+
return {
|
|
48
|
+
error: `No approvers found in groups: ${approverGroups.join(', ')}`,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/*
|
|
52
|
+
What the approval is bound to. A hash of the document's content, not of
|
|
53
|
+
its `updatedAt` — so a save that changed nothing leaves a granted
|
|
54
|
+
approval standing, and one that changed something invalidates it.
|
|
55
|
+
|
|
56
|
+
Publishing's approval step hashes the same document the same way, with
|
|
57
|
+
the same function, from a `findByID` with the same arguments. That is
|
|
58
|
+
the only reason the two agree; see `documentContentHash`.
|
|
59
|
+
*/
|
|
60
|
+
const targetVersion = await documentContentHash(document);
|
|
61
|
+
const targetTitle = typeof document['title'] === 'string' ? document['title'] : input.id;
|
|
62
|
+
const slug = typeof document['slug'] === 'string' ? document['slug'] : input.id;
|
|
63
|
+
const previewUrl = buildPreviewUrl(deps.options, input.collection, slug);
|
|
64
|
+
const expiresAt = new Date(Date.now() + (deps.options.expirationDays ?? 7) * 24 * 60 * 60 * 1000).toISOString();
|
|
65
|
+
const created = (await deps.payload.create({
|
|
66
|
+
collection: deps.options.collectionSlug ?? DEFAULT_APPROVALS_SLUG,
|
|
67
|
+
data: {
|
|
68
|
+
targetCollection: input.collection,
|
|
69
|
+
targetId: input.id,
|
|
70
|
+
targetTitle,
|
|
71
|
+
targetVersion,
|
|
72
|
+
previewUrl,
|
|
73
|
+
requestedBy: ctx.user.id,
|
|
74
|
+
requestedAt: new Date().toISOString(),
|
|
75
|
+
...(input.requestReason ? { requestReason: input.requestReason } : {}),
|
|
76
|
+
changesSummary: input.changesSummary,
|
|
77
|
+
approverGroups: approverGroups,
|
|
78
|
+
status: 'pending',
|
|
79
|
+
expiresAt,
|
|
80
|
+
notifiedApprovers: approvers.map((a) => a.id),
|
|
81
|
+
consumedTokens: [],
|
|
82
|
+
},
|
|
83
|
+
}));
|
|
84
|
+
const approvalId = String(created.id);
|
|
85
|
+
await deps.options.inngest.send({
|
|
86
|
+
name: 'approval/requested',
|
|
87
|
+
data: {
|
|
88
|
+
approvalId,
|
|
89
|
+
targetCollection: input.collection,
|
|
90
|
+
targetId: input.id,
|
|
91
|
+
targetTitle,
|
|
92
|
+
requestedBy: ctx.user.id,
|
|
93
|
+
approverIds: approvers.map((a) => a.id),
|
|
94
|
+
expiresAt,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
await deps.auditWriter({
|
|
98
|
+
...auditContext(ctx, input._meta),
|
|
99
|
+
action: 'approval.requested',
|
|
100
|
+
mcpServer: 'approvals',
|
|
101
|
+
mcpTool: 'request_approval',
|
|
102
|
+
targetCollection: input.collection,
|
|
103
|
+
targetId: input.id,
|
|
104
|
+
targetTitle,
|
|
105
|
+
changesSummary: input.changesSummary,
|
|
106
|
+
approvalRequestId: approvalId,
|
|
107
|
+
success: true,
|
|
108
|
+
});
|
|
109
|
+
return {
|
|
110
|
+
approvalId,
|
|
111
|
+
status: 'pending',
|
|
112
|
+
expiresAt,
|
|
113
|
+
approvers: approvers.map((a) => ({ id: a.id, name: a.name ?? a.email })),
|
|
114
|
+
previewUrl,
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function buildPreviewUrl(options, collection, slug) {
|
|
120
|
+
const baseUrl = options.publicUrl ?? process.env['NEXT_PUBLIC_SERVER_URL'] ?? '';
|
|
121
|
+
return `${baseUrl.replace(/\/$/, '')}/api/preview?collection=${encodeURIComponent(collection)}&slug=${encodeURIComponent(slug)}`;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=request-approval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-approval.js","sourceRoot":"","sources":["../../../src/approvals/tools/request-approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAQlD,MAAM,UAAU,yBAAyB,CAAC,IAAyB;IACjE,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC3B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;QACtB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,cAAc,EAAE,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EAAE,kBAAkB;gBAC3B,gBAAgB,EAAE,KAAK,CAAC,UAAU;gBAClC,QAAQ,EAAE,KAAK,CAAC,EAAE;gBAClB,WAAW;gBACX,cAAc,EAAE,KAAK,CAAC,cAAc;gBACpC,iBAAiB,EAAE,UAAU;gBAC7B,OAAO,EAAE,IAAI;aACd,CAAC,CAAA;YAEF,OAAO;gBACL,UAAU;gBACV,MAAM,EAAE,SAAS;gBACjB,SAAS;gBACT,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;gBACxE,UAAU;aACX,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CACtB,OAA+B,EAC/B,UAAkB,EAClB,IAAY;IAEZ,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,EAAE,CAAA;IAChF,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,2BAA2B,kBAAkB,CAAC,UAAU,CAAC,SAAS,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAA;AAClI,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Payload } from 'payload';
|
|
2
|
+
import { type AuditWriter } from '../../audit/writer.js';
|
|
3
|
+
import type { McpToolDefinition } from '../../plugin-contract/mcp.js';
|
|
4
|
+
import type { ApprovalsPluginOptions } from '../options.js';
|
|
5
|
+
export interface RespondToApprovalDeps {
|
|
6
|
+
payload: Payload;
|
|
7
|
+
options: ApprovalsPluginOptions & {
|
|
8
|
+
tokenSecret: string;
|
|
9
|
+
};
|
|
10
|
+
auditWriter: AuditWriter;
|
|
11
|
+
}
|
|
12
|
+
export declare function createRespondToApprovalTool(deps: RespondToApprovalDeps): McpToolDefinition;
|
|
13
|
+
//# sourceMappingURL=respond-to-approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"respond-to-approval.d.ts","sourceRoot":"","sources":["../../../src/approvals/tools/respond-to-approval.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAItC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAG3D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,sBAAsB,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;IACzD,WAAW,EAAE,WAAW,CAAA;CACzB;AAcD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,qBAAqB,GAAG,iBAAiB,CA2F1F"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { auditContext } from '../../mcp/audit-context.js';
|
|
3
|
+
import { unwrapRelationshipId } from '../../utils/relationships.js';
|
|
4
|
+
import { withMeta } from '../../mcp/meta.js';
|
|
5
|
+
import { DEFAULT_APPROVALS_SLUG } from '../collection.js';
|
|
6
|
+
import { APPROVALS_TOOLS } from './descriptors.js';
|
|
7
|
+
const decisionToStatus = {
|
|
8
|
+
approve: 'granted',
|
|
9
|
+
decline: 'declined',
|
|
10
|
+
request_changes: 'changes-requested',
|
|
11
|
+
};
|
|
12
|
+
const decisionToAuditAction = {
|
|
13
|
+
approve: 'approval.granted',
|
|
14
|
+
decline: 'approval.declined',
|
|
15
|
+
request_changes: 'approval.changes_requested',
|
|
16
|
+
};
|
|
17
|
+
export function createRespondToApprovalTool(deps) {
|
|
18
|
+
const inputSchema = withMeta({
|
|
19
|
+
approvalId: z.string(),
|
|
20
|
+
decision: z.enum(['approve', 'decline', 'request_changes']),
|
|
21
|
+
notes: z
|
|
22
|
+
.string()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe('Decision rationale, shown to the requester (optional but encouraged for declines)'),
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
...APPROVALS_TOOLS.respondToApproval,
|
|
28
|
+
requiredScope: 'approvals.decide',
|
|
29
|
+
inputSchema,
|
|
30
|
+
handler: async (input, ctx) => {
|
|
31
|
+
if (!ctx.user) {
|
|
32
|
+
return { error: 'Must be authenticated to respond to approvals' };
|
|
33
|
+
}
|
|
34
|
+
const collectionSlug = deps.options.collectionSlug ?? DEFAULT_APPROVALS_SLUG;
|
|
35
|
+
const approval = (await deps.payload.findByID({
|
|
36
|
+
collection: collectionSlug,
|
|
37
|
+
id: input.approvalId,
|
|
38
|
+
}));
|
|
39
|
+
if (!approval)
|
|
40
|
+
return { error: 'Approval not found' };
|
|
41
|
+
if (approval['status'] !== 'pending') {
|
|
42
|
+
return { error: `Approval is already ${String(approval['status'])}` };
|
|
43
|
+
}
|
|
44
|
+
const requesterId = unwrapRelationshipId(approval['requestedBy']);
|
|
45
|
+
if (requesterId === ctx.user.id) {
|
|
46
|
+
return { error: 'You cannot approve your own request' };
|
|
47
|
+
}
|
|
48
|
+
const approverGroups = approval['approverGroups'] ?? [];
|
|
49
|
+
const userGroups = ctx.user.groups;
|
|
50
|
+
const hasAccess = approverGroups.some((g) => userGroups.includes(g));
|
|
51
|
+
if (!hasAccess) {
|
|
52
|
+
return { error: 'You are not in an approver group for this request' };
|
|
53
|
+
}
|
|
54
|
+
const decision = input.decision;
|
|
55
|
+
const newStatus = decisionToStatus[decision];
|
|
56
|
+
const decidedAt = new Date().toISOString();
|
|
57
|
+
await deps.payload.update({
|
|
58
|
+
collection: collectionSlug,
|
|
59
|
+
id: input.approvalId,
|
|
60
|
+
data: {
|
|
61
|
+
status: newStatus,
|
|
62
|
+
decidedBy: ctx.user.id,
|
|
63
|
+
decidedAt,
|
|
64
|
+
...(input.notes ? { decisionNotes: input.notes } : {}),
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
await deps.options.inngest.send({
|
|
68
|
+
name: 'approval/decided',
|
|
69
|
+
data: {
|
|
70
|
+
approvalId: input.approvalId,
|
|
71
|
+
decision: newStatus,
|
|
72
|
+
decidedBy: ctx.user.id,
|
|
73
|
+
decidedAt,
|
|
74
|
+
targetCollection: String(approval['targetCollection']),
|
|
75
|
+
targetId: String(approval['targetId']),
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
await deps.auditWriter({
|
|
79
|
+
...auditContext(ctx, input._meta),
|
|
80
|
+
action: decisionToAuditAction[decision],
|
|
81
|
+
mcpServer: 'approvals',
|
|
82
|
+
mcpTool: 'respond_to_approval',
|
|
83
|
+
targetCollection: String(approval['targetCollection']),
|
|
84
|
+
targetId: String(approval['targetId']),
|
|
85
|
+
targetTitle: typeof approval['targetTitle'] === 'string'
|
|
86
|
+
? approval['targetTitle']
|
|
87
|
+
: String(approval['targetId']),
|
|
88
|
+
// The decision notes are the reasoning when there are any: they are
|
|
89
|
+
// what the approver actually wrote.
|
|
90
|
+
reasoning: input.notes ?? input._meta?.reasoning,
|
|
91
|
+
approvalRequestId: input.approvalId,
|
|
92
|
+
success: true,
|
|
93
|
+
});
|
|
94
|
+
return { success: true, status: newStatus, decidedAt };
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=respond-to-approval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"respond-to-approval.js","sourceRoot":"","sources":["../../../src/approvals/tools/respond-to-approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CA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M,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA;QACxD,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Access, CollectionConfig } from 'payload';
|
|
2
|
+
import { type PluginAdminOptions } from '../plugin-contract/index.js';
|
|
3
|
+
export interface AuditCollectionOptions {
|
|
4
|
+
/** Override the collection slug. Default: `'audit-events'`. */
|
|
5
|
+
slug?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Read access function. Receives the standard Payload access args.
|
|
8
|
+
* Defaults to admin/editor roles.
|
|
9
|
+
*/
|
|
10
|
+
readAccess?: Access;
|
|
11
|
+
/** Sidebar placement. Default: the `'Throughline'` group; `group: false` leaves it ungrouped. */
|
|
12
|
+
admin?: PluginAdminOptions;
|
|
13
|
+
}
|
|
14
|
+
export declare const DEFAULT_AUDIT_SLUG = "audit-events";
|
|
15
|
+
/**
|
|
16
|
+
* Builds the audit-events collection config. The collection is read-only
|
|
17
|
+
* from outside the writer: `create`, `update`, and `delete` are denied
|
|
18
|
+
* for all callers; the writer uses Payload's local API which bypasses
|
|
19
|
+
* these checks.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createAuditCollection(options?: AuditCollectionOptions): CollectionConfig;
|
|
22
|
+
//# sourceMappingURL=collection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/audit/collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,6BAA6B,CAAA;AAGxF,MAAM,WAAW,sBAAsB;IACrC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iGAAiG;IACjG,KAAK,CAAC,EAAE,kBAAkB,CAAA;CAC3B;AAED,eAAO,MAAM,kBAAkB,iBAAiB,CAAA;AAOhD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,GAAG,gBAAgB,CAgG5F"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { resolveAdminGroup } from '../plugin-contract/index.js';
|
|
2
|
+
import { AUDIT_ACTIONS, AUDIT_MCP_SERVERS } from './types.js';
|
|
3
|
+
export const DEFAULT_AUDIT_SLUG = 'audit-events';
|
|
4
|
+
const defaultReadAccess = ({ req }) => {
|
|
5
|
+
const roles = req.user?.['roles'] ?? [];
|
|
6
|
+
return roles.includes('admin') || roles.includes('editor');
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Builds the audit-events collection config. The collection is read-only
|
|
10
|
+
* from outside the writer: `create`, `update`, and `delete` are denied
|
|
11
|
+
* for all callers; the writer uses Payload's local API which bypasses
|
|
12
|
+
* these checks.
|
|
13
|
+
*/
|
|
14
|
+
export function createAuditCollection(options = {}) {
|
|
15
|
+
const slug = options.slug ?? DEFAULT_AUDIT_SLUG;
|
|
16
|
+
return {
|
|
17
|
+
slug,
|
|
18
|
+
admin: {
|
|
19
|
+
...resolveAdminGroup(options.admin),
|
|
20
|
+
useAsTitle: 'summary',
|
|
21
|
+
defaultColumns: ['createdAt', 'actor', 'action', 'targetCollection', 'targetId'],
|
|
22
|
+
description: 'Immutable record of every consequential action in the system. Read-only through the admin.',
|
|
23
|
+
},
|
|
24
|
+
access: {
|
|
25
|
+
read: options.readAccess ?? defaultReadAccess,
|
|
26
|
+
create: () => false,
|
|
27
|
+
update: () => false,
|
|
28
|
+
delete: () => false,
|
|
29
|
+
},
|
|
30
|
+
fields: [
|
|
31
|
+
{
|
|
32
|
+
name: 'createdAt',
|
|
33
|
+
type: 'date',
|
|
34
|
+
required: true,
|
|
35
|
+
defaultValue: () => new Date().toISOString(),
|
|
36
|
+
admin: { position: 'sidebar', readOnly: true },
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'actor',
|
|
40
|
+
type: 'group',
|
|
41
|
+
fields: [
|
|
42
|
+
{
|
|
43
|
+
name: 'type',
|
|
44
|
+
type: 'select',
|
|
45
|
+
required: true,
|
|
46
|
+
options: [
|
|
47
|
+
{ label: 'User', value: 'user' },
|
|
48
|
+
{ label: 'System', value: 'system' },
|
|
49
|
+
{ label: 'Integration', value: 'integration' },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{ name: 'userId', type: 'text' },
|
|
53
|
+
{ name: 'userName', type: 'text' },
|
|
54
|
+
{ name: 'apiKeyName', type: 'text' },
|
|
55
|
+
{ name: 'apiKeyId', type: 'text' },
|
|
56
|
+
{ name: 'sessionId', type: 'text' },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'action',
|
|
61
|
+
type: 'select',
|
|
62
|
+
required: true,
|
|
63
|
+
options: AUDIT_ACTIONS.map((value) => ({ label: value, value })),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'mcpServer',
|
|
67
|
+
type: 'select',
|
|
68
|
+
required: true,
|
|
69
|
+
options: AUDIT_MCP_SERVERS.map((value) => ({ label: value, value })),
|
|
70
|
+
},
|
|
71
|
+
{ name: 'mcpTool', type: 'text', required: true },
|
|
72
|
+
{ name: 'targetCollection', type: 'text' },
|
|
73
|
+
{ name: 'targetId', type: 'text' },
|
|
74
|
+
{ name: 'targetTitle', type: 'text' },
|
|
75
|
+
{
|
|
76
|
+
name: 'prompt',
|
|
77
|
+
type: 'textarea',
|
|
78
|
+
admin: { description: "The user's natural-language prompt, if surfaced via _meta." },
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'reasoning',
|
|
82
|
+
type: 'textarea',
|
|
83
|
+
admin: { description: "Claude's reasoning, if surfaced via _meta." },
|
|
84
|
+
},
|
|
85
|
+
{ name: 'changesSummary', type: 'textarea' },
|
|
86
|
+
{ name: 'summary', type: 'text', required: true },
|
|
87
|
+
{
|
|
88
|
+
name: 'diff',
|
|
89
|
+
type: 'json',
|
|
90
|
+
admin: {
|
|
91
|
+
description: 'Before/after fields for update operations; null for reads.',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{ name: 'success', type: 'checkbox', defaultValue: true },
|
|
95
|
+
{ name: 'errorMessage', type: 'text' },
|
|
96
|
+
{ name: 'approvalRequestId', type: 'text' },
|
|
97
|
+
{ name: 'integrationId', type: 'text' },
|
|
98
|
+
],
|
|
99
|
+
indexes: [
|
|
100
|
+
{ fields: ['createdAt'] },
|
|
101
|
+
{ fields: ['actor.userId', 'createdAt'] },
|
|
102
|
+
{ fields: ['targetCollection', 'targetId', 'createdAt'] },
|
|
103
|
+
{ fields: ['action', 'createdAt'] },
|
|
104
|
+
{ fields: ['mcpServer', 'createdAt'] },
|
|
105
|
+
],
|
|
106
|
+
timestamps: false,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/audit/collection.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAc7D,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAA;AAEhD,MAAM,iBAAiB,GAAW,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IAC5C,MAAM,KAAK,GAAI,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAA0B,IAAI,EAAE,CAAA;IACjE,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAC5D,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAkC,EAAE;IACxE,MAAM,IAAI,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AE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;YACjD;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE;oBACL,WAAW,EAAE,4DAA4D;iBAC1E;aACF;YACD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,EAAE;YACzD,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE;YACtC,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE;YAC3C,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE;SACxC;QACD,OAAO,EAAE;YACP,EAAE,MAAM,EAAE,CAAC,WAAW,CAAC,EAAE;YACzB,EAAE,MAAM,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC,EAAE;YACzC,EAAE,MAAM,EAAE,CAAC,kBAAkB,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE;YACzD,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE;YACnC,EAAE,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE;SACvC;QACD,UAAU,EAAE,KAAK;KAClB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { auditPlugin, getAuditWriter } from './plugin.js';
|
|
2
|
+
export type { AuditPluginOptions } from './plugin.js';
|
|
3
|
+
export { createAuditCollection, DEFAULT_AUDIT_SLUG } from './collection.js';
|
|
4
|
+
export type { AuditCollectionOptions } from './collection.js';
|
|
5
|
+
export { createAuditWriter } from './writer.js';
|
|
6
|
+
export type { AuditWriter, AuditWriterOptions, AuditEventInput, AuditActor } from './writer.js';
|
|
7
|
+
export { AUDIT_ACTIONS, AUDIT_MCP_SERVERS } from './types.js';
|
|
8
|
+
export type { AuditAction, AuditMcpServer } from './types.js';
|
|
9
|
+
export { auditEventEchoJob } from './jobs/audit-event-echo.js';
|
|
10
|
+
export type { AuditEchoEvent, AuditEchoHandler, AuditEventEchoOptions, } from '../jobs/workflow-types.js';
|
|
11
|
+
export { auditQueryPlugin } from './query/plugin.js';
|
|
12
|
+
export type { AuditQueryPluginOptions } from './query/options.js';
|
|
13
|
+
export { formatAuditEvent, formatRelativeTime } from './query/formatting/index.js';
|
|
14
|
+
export type { FormattedAuditEvent } from './query/formatting/index.js';
|
|
15
|
+
export { createQueryAuditTool, createGetChangeHistoryTool, createWhoChangedWhatTool, createWhatChangedInRangeTool, createGetRecentFailuresTool, } from './query/tools/index.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACzD,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC3E,YAAY,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE/F,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC7D,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAG7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAEjE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAClF,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { auditPlugin, getAuditWriter } from './plugin.js';
|
|
2
|
+
export { createAuditCollection, DEFAULT_AUDIT_SLUG } from './collection.js';
|
|
3
|
+
export { createAuditWriter } from './writer.js';
|
|
4
|
+
export { AUDIT_ACTIONS, AUDIT_MCP_SERVERS } from './types.js';
|
|
5
|
+
// The job that fans an audit event out to its follow-ons (approval emails).
|
|
6
|
+
export { auditEventEchoJob } from './jobs/audit-event-echo.js';
|
|
7
|
+
// The query plugin and its MCP tools, which were `@forumone/throughline-audit`.
|
|
8
|
+
export { auditQueryPlugin } from './query/plugin.js';
|
|
9
|
+
export { formatAuditEvent, formatRelativeTime } from './query/formatting/index.js';
|
|
10
|
+
export { createQueryAuditTool, createGetChangeHistoryTool, createWhoChangedWhatTool, createWhatChangedInRangeTool, createGetRecentFailuresTool, } from './query/tools/index.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAGzD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAG3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAG/C,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAG7D,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAO9D,gFAAgF;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAGpD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAGlF,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Job } from '../../jobs/types.js';
|
|
2
|
+
import type { AuditEventEchoOptions } from '../../jobs/workflow-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Subscribes to `audit/event.recorded` and fans out to notification
|
|
5
|
+
* workflows. The built-in handlers cover the approval lifecycle (which
|
|
6
|
+
* the email package in C11 subscribes to); custom handlers in
|
|
7
|
+
* `options.handlers` add other fan-outs (e.g. "post integration.failed
|
|
8
|
+
* to a #alerts Slack channel").
|
|
9
|
+
*
|
|
10
|
+
* Each handler runs in its own `step.run` so a failure in one fan-out
|
|
11
|
+
* does not affect the others.
|
|
12
|
+
*/
|
|
13
|
+
export declare function auditEventEchoJob(options: AuditEventEchoOptions): Job;
|
|
14
|
+
//# sourceMappingURL=audit-event-echo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-event-echo.d.ts","sourceRoot":"","sources":["../../../src/audit/jobs/audit-event-echo.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAiBzE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,GAAG,CAgDrE"}
|