create-freeholder 0.0.0-bootstrap.0 → 0.2.0-beta.2
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/README.md +30 -2
- package/dist/index.d.ts +72 -0
- package/dist/index.js +672 -0
- package/dist/template/.changeset/README.md +8 -0
- package/dist/template/.changeset/access-from-grants.md +14 -0
- package/dist/template/.changeset/accounting-exports.md +32 -0
- package/dist/template/.changeset/ad-creatives.md +33 -0
- package/dist/template/.changeset/ad-inventory.md +19 -0
- package/dist/template/.changeset/ad-measurement.md +10 -0
- package/dist/template/.changeset/ad-third-party.md +9 -0
- package/dist/template/.changeset/admin-ads.md +9 -0
- package/dist/template/.changeset/admin-documents.md +7 -0
- package/dist/template/.changeset/admin-loyalty.md +9 -0
- package/dist/template/.changeset/admin-referrals.md +9 -0
- package/dist/template/.changeset/admin-shell.md +16 -0
- package/dist/template/.changeset/adversarial-cms-boundaries.md +8 -0
- package/dist/template/.changeset/adversarial-customer-invariants.md +7 -0
- package/dist/template/.changeset/adversarial-customer-privacy.md +13 -0
- package/dist/template/.changeset/adversarial-platform-safety.md +15 -0
- package/dist/template/.changeset/agent-approval-inbox.md +5 -0
- package/dist/template/.changeset/agent-autonomy-writes.md +5 -0
- package/dist/template/.changeset/agent-budgets.md +5 -0
- package/dist/template/.changeset/agent-catalogue.md +22 -0
- package/dist/template/.changeset/agent-f04.md +6 -0
- package/dist/template/.changeset/agent-injection-hardening.md +5 -0
- package/dist/template/.changeset/agent-pause-kill-switch.md +5 -0
- package/dist/template/.changeset/agent-playbooks.md +5 -0
- package/dist/template/.changeset/agent-run-live.md +5 -0
- package/dist/template/.changeset/agent-work-board.md +5 -0
- package/dist/template/.changeset/agents-inbound.md +31 -0
- package/dist/template/.changeset/agents-model.md +27 -0
- package/dist/template/.changeset/alt-text-suggestions.md +8 -0
- package/dist/template/.changeset/analytics-governance.md +7 -0
- package/dist/template/.changeset/analytics-proxy-origin.md +8 -0
- package/dist/template/.changeset/analytics.md +10 -0
- package/dist/template/.changeset/apache-license.md +15 -0
- package/dist/template/.changeset/api-keys.md +19 -0
- package/dist/template/.changeset/arabic-rtl-catalog.md +23 -0
- package/dist/template/.changeset/assistant-grounding.md +10 -0
- package/dist/template/.changeset/assistant-guardrails.md +11 -0
- package/dist/template/.changeset/attested-facts-and-corrections.md +11 -0
- package/dist/template/.changeset/audit-search-and-proof.md +34 -0
- package/dist/template/.changeset/autofill-safety.md +22 -0
- package/dist/template/.changeset/automation-guardrails.md +9 -0
- package/dist/template/.changeset/automation-runtime.md +9 -0
- package/dist/template/.changeset/automations-builder.md +9 -0
- package/dist/template/.changeset/availability-resolver.md +29 -0
- package/dist/template/.changeset/availability.md +23 -0
- package/dist/template/.changeset/booking-audiences.md +24 -0
- package/dist/template/.changeset/booking-race-message.md +15 -0
- package/dist/template/.changeset/bookings.md +28 -0
- package/dist/template/.changeset/boot-in-request-graph.md +7 -0
- package/dist/template/.changeset/bot-detection.md +9 -0
- package/dist/template/.changeset/briefing-delivery.md +21 -0
- package/dist/template/.changeset/briefing-sections.md +22 -0
- package/dist/template/.changeset/browser-journeys.md +8 -0
- package/dist/template/.changeset/builder-code-lane.md +25 -0
- package/dist/template/.changeset/business-presets.md +8 -0
- package/dist/template/.changeset/business-settings-and-csrf.md +17 -0
- package/dist/template/.changeset/c11-08-restore-drill.md +20 -0
- package/dist/template/.changeset/c11-12-f04-axe.md +8 -0
- package/dist/template/.changeset/c11-14-retention.md +8 -0
- package/dist/template/.changeset/c11-14-search.md +11 -0
- package/dist/template/.changeset/c11-journeys.md +7 -0
- package/dist/template/.changeset/c11-ops.md +8 -0
- package/dist/template/.changeset/c11-quality.md +8 -0
- package/dist/template/.changeset/c1111-reference-acceptance.md +8 -0
- package/dist/template/.changeset/c1111-reference-target-closure.md +8 -0
- package/dist/template/.changeset/c224-inline-canvas.md +13 -0
- package/dist/template/.changeset/c224-merchandising-blocks.md +19 -0
- package/dist/template/.changeset/c225-canvas-caret-swap.md +5 -0
- package/dist/template/.changeset/c225-canvas-drag-drop.md +5 -0
- package/dist/template/.changeset/c225-canvas-media-tools.md +5 -0
- package/dist/template/.changeset/c225-store-sections.md +5 -0
- package/dist/template/.changeset/c313-live-paradise-acceptance.md +8 -0
- package/dist/template/.changeset/c324-storefront-parity.md +5 -0
- package/dist/template/.changeset/c6-11-events-evidence.md +14 -0
- package/dist/template/.changeset/caddy-domain-env.md +7 -0
- package/dist/template/.changeset/calculators-and-coverage.md +13 -0
- package/dist/template/.changeset/calculators-localized-evidence.md +11 -0
- package/dist/template/.changeset/calendar-oauth.md +5 -0
- package/dist/template/.changeset/calendars.md +26 -0
- package/dist/template/.changeset/campaign-broadcasts.md +34 -0
- package/dist/template/.changeset/canonical-two-factor-envelope.md +7 -0
- package/dist/template/.changeset/capture-chunk-integrity.md +5 -0
- package/dist/template/.changeset/cart-capability-authorization.md +10 -0
- package/dist/template/.changeset/cart-contact-authority.md +5 -0
- package/dist/template/.changeset/catalog-checkout-milestones.md +8 -0
- package/dist/template/.changeset/catalog-quality-rtl.md +12 -0
- package/dist/template/.changeset/change-password.md +8 -0
- package/dist/template/.changeset/ci-minio-quay.md +6 -0
- package/dist/template/.changeset/client-documents.md +11 -0
- package/dist/template/.changeset/client-galleries.md +7 -0
- package/dist/template/.changeset/client-gallery-delivery-audit.md +9 -0
- package/dist/template/.changeset/client-readiness-security.md +7 -0
- package/dist/template/.changeset/close-world-class-storefront.md +27 -0
- package/dist/template/.changeset/cms-a11y-hints.md +5 -0
- package/dist/template/.changeset/cms-author-history.md +8 -0
- package/dist/template/.changeset/cms-blocks.md +8 -0
- package/dist/template/.changeset/cms-cache-budgets.md +5 -0
- package/dist/template/.changeset/cms-chrome-sections.md +8 -0
- package/dist/template/.changeset/cms-collab-presence-comments.md +7 -0
- package/dist/template/.changeset/cms-content-lifecycle.md +9 -0
- package/dist/template/.changeset/cms-design-tokens.md +5 -0
- package/dist/template/.changeset/cms-editor.md +8 -0
- package/dist/template/.changeset/cms-email-editor.md +5 -0
- package/dist/template/.changeset/cms-entity-layouts.md +5 -0
- package/dist/template/.changeset/cms-experiment-reporting.md +5 -0
- package/dist/template/.changeset/cms-experiments.md +5 -0
- package/dist/template/.changeset/cms-locale-workflow.md +5 -0
- package/dist/template/.changeset/cms-plugin-proof.md +5 -0
- package/dist/template/.changeset/cms-rich-editor-foundations.md +8 -0
- package/dist/template/.changeset/cms-section-instances.md +5 -0
- package/dist/template/.changeset/cms-surface-blocks.md +9 -0
- package/dist/template/.changeset/cms-templates.md +5 -0
- package/dist/template/.changeset/collections-taxonomy.md +5 -0
- package/dist/template/.changeset/commerce-advanced-money.md +16 -0
- package/dist/template/.changeset/commerce-carts-orders.md +9 -0
- package/dist/template/.changeset/commerce-catalog-merchandising.md +5 -0
- package/dist/template/.changeset/commerce-edge-contracts.md +5 -0
- package/dist/template/.changeset/commerce-fulfillment.md +9 -0
- package/dist/template/.changeset/commerce-inventory-ledger.md +9 -0
- package/dist/template/.changeset/commerce-invoice-admin.md +5 -0
- package/dist/template/.changeset/commerce-money-foundation.md +5 -0
- package/dist/template/.changeset/commerce-payment-providers.md +8 -0
- package/dist/template/.changeset/commerce-pos.md +8 -0
- package/dist/template/.changeset/commerce-procurement.md +9 -0
- package/dist/template/.changeset/commerce-product-lifecycle.md +16 -0
- package/dist/template/.changeset/commerce-promotions.md +8 -0
- package/dist/template/.changeset/commerce-provider-parity.md +10 -0
- package/dist/template/.changeset/commerce-relations-breaks.md +5 -0
- package/dist/template/.changeset/commerce-service-offerings.md +11 -0
- package/dist/template/.changeset/commerce-shipping-rates.md +9 -0
- package/dist/template/.changeset/commerce-tax-templates.md +5 -0
- package/dist/template/.changeset/commerce-variant-matrices.md +5 -0
- package/dist/template/.changeset/community-rooms.md +7 -0
- package/dist/template/.changeset/complete-demo-scenarios.md +10 -0
- package/dist/template/.changeset/completion-honesty.md +10 -0
- package/dist/template/.changeset/config.json +11 -0
- package/dist/template/.changeset/connection-grants.md +5 -0
- package/dist/template/.changeset/consent-gated-media.md +13 -0
- package/dist/template/.changeset/consent-is-evidence.md +13 -0
- package/dist/template/.changeset/contact-data-depth.md +16 -0
- package/dist/template/.changeset/contact-duplicate-review.md +17 -0
- package/dist/template/.changeset/contact-import.md +26 -0
- package/dist/template/.changeset/contact-merge-ui.md +8 -0
- package/dist/template/.changeset/contact-privacy-rights.md +18 -0
- package/dist/template/.changeset/contacts-admin.md +15 -0
- package/dist/template/.changeset/contacts-create-human-only.md +5 -0
- package/dist/template/.changeset/content-security-policy.md +8 -0
- package/dist/template/.changeset/contract-templates.md +22 -0
- package/dist/template/.changeset/contribute-channel.md +5 -0
- package/dist/template/.changeset/contribute-status-replies.md +5 -0
- package/dist/template/.changeset/conversations.md +20 -0
- package/dist/template/.changeset/core-jobs.md +9 -0
- package/dist/template/.changeset/core-runs.md +7 -0
- package/dist/template/.changeset/core-seo.md +10 -0
- package/dist/template/.changeset/create-freeholder-setup.md +8 -0
- package/dist/template/.changeset/credential-encryption.md +26 -0
- package/dist/template/.changeset/custom-field-options-default.md +8 -0
- package/dist/template/.changeset/customer-booking-screens.md +9 -0
- package/dist/template/.changeset/customer-dependency-security.md +5 -0
- package/dist/template/.changeset/customer-gallery-foundation.md +8 -0
- package/dist/template/.changeset/customer-invoice-payments.md +5 -0
- package/dist/template/.changeset/customer-magic-links.md +12 -0
- package/dist/template/.changeset/customer-mobile-contracts.md +6 -0
- package/dist/template/.changeset/customer-reply-and-account.md +7 -0
- package/dist/template/.changeset/customer-self-service.md +12 -0
- package/dist/template/.changeset/customization-seams.md +7 -0
- package/dist/template/.changeset/daily-briefing.md +27 -0
- package/dist/template/.changeset/daily-private-rooms.md +8 -0
- package/dist/template/.changeset/daily-update-check.md +6 -0
- package/dist/template/.changeset/danger-token-integrity.md +5 -0
- package/dist/template/.changeset/demo-same-droplet.md +12 -0
- package/dist/template/.changeset/dependency-security-policy.md +7 -0
- package/dist/template/.changeset/deploy-script-stdin.md +5 -0
- package/dist/template/.changeset/design-system-and-setup.md +17 -0
- package/dist/template/.changeset/deterministic-demo-scenarios.md +5 -0
- package/dist/template/.changeset/digitalocean-droplet-recipe.md +15 -0
- package/dist/template/.changeset/doc-claim-mapping.md +5 -0
- package/dist/template/.changeset/docs-availability.md +7 -0
- package/dist/template/.changeset/doctor.md +9 -0
- package/dist/template/.changeset/done.md +8 -0
- package/dist/template/.changeset/droplet-backup-cron-env.md +10 -0
- package/dist/template/.changeset/dunning.md +10 -0
- package/dist/template/.changeset/durable-provider-work.md +10 -0
- package/dist/template/.changeset/editor-preview-local-draft.md +5 -0
- package/dist/template/.changeset/editor-publish-autosave-race.md +5 -0
- package/dist/template/.changeset/embeds-with-backlinks.md +7 -0
- package/dist/template/.changeset/enforced-service-area-coverage.md +5 -0
- package/dist/template/.changeset/events-newsletters-seo.md +5 -0
- package/dist/template/.changeset/executable-tier-one-portability.md +5 -0
- package/dist/template/.changeset/expo-customer-app.md +10 -0
- package/dist/template/.changeset/external-calendar-sync.md +20 -0
- package/dist/template/.changeset/f-matrix-2026-09-16.md +17 -0
- package/dist/template/.changeset/f-matrix.md +9 -0
- package/dist/template/.changeset/f04-journey-screens.md +11 -0
- package/dist/template/.changeset/faceted-browse-storefront-search.md +5 -0
- package/dist/template/.changeset/first-party-plugin-surfaces.md +8 -0
- package/dist/template/.changeset/fork-lane.md +11 -0
- package/dist/template/.changeset/form-builder.md +26 -0
- package/dist/template/.changeset/forms-get-public-projection.md +13 -0
- package/dist/template/.changeset/forms-module.md +10 -0
- package/dist/template/.changeset/freeholder-app-init.md +10 -0
- package/dist/template/.changeset/front-site-assistant.md +29 -0
- package/dist/template/.changeset/gallery-approval-rounds.md +8 -0
- package/dist/template/.changeset/gallery-archive-delivery.md +13 -0
- package/dist/template/.changeset/gallery-download-policy.md +8 -0
- package/dist/template/.changeset/gallery-partner-share.md +8 -0
- package/dist/template/.changeset/gallery-proofing.md +9 -0
- package/dist/template/.changeset/gallery-sales.md +11 -0
- package/dist/template/.changeset/gate-hardening.md +5 -0
- package/dist/template/.changeset/generate-alt-text-without-open-transactions.md +9 -0
- package/dist/template/.changeset/graceful-job-shutdown.md +8 -0
- package/dist/template/.changeset/help-centre.md +16 -0
- package/dist/template/.changeset/honest-error-states.md +5 -0
- package/dist/template/.changeset/host-executor-drills.md +5 -0
- package/dist/template/.changeset/host-image-identity.md +5 -0
- package/dist/template/.changeset/host-updater-migration-lane.md +5 -0
- package/dist/template/.changeset/http-api.md +23 -0
- package/dist/template/.changeset/http-edge-auth-routes.md +14 -0
- package/dist/template/.changeset/ics-and-calendar-writeback.md +19 -0
- package/dist/template/.changeset/ics-feed-500.md +7 -0
- package/dist/template/.changeset/import-replace-rollback.md +5 -0
- package/dist/template/.changeset/inbox.md +24 -0
- package/dist/template/.changeset/intake-waivers-and-reminders.md +26 -0
- package/dist/template/.changeset/internal-service-boundary.md +9 -0
- package/dist/template/.changeset/job-operations.md +14 -0
- package/dist/template/.changeset/job-runtime-health.md +9 -0
- package/dist/template/.changeset/leftover-f04.md +8 -0
- package/dist/template/.changeset/light-and-dark.md +12 -0
- package/dist/template/.changeset/living-contract.md +5 -0
- package/dist/template/.changeset/locale-driven-customer-surfaces.md +14 -0
- package/dist/template/.changeset/locale-routing.md +10 -0
- package/dist/template/.changeset/locations-and-nap.md +29 -0
- package/dist/template/.changeset/loyalty-points.md +17 -0
- package/dist/template/.changeset/loyalty-tiers-rewards.md +20 -0
- package/dist/template/.changeset/mail-adapter-completion.md +20 -0
- package/dist/template/.changeset/mail-and-reset.md +10 -0
- package/dist/template/.changeset/mail-contacts.md +28 -0
- package/dist/template/.changeset/mail-delivery-boundary.md +10 -0
- package/dist/template/.changeset/managed-agent-loop.md +5 -0
- package/dist/template/.changeset/marketplace-channel-sync.md +7 -0
- package/dist/template/.changeset/mcp-server.md +20 -0
- package/dist/template/.changeset/media-and-canvas.md +8 -0
- package/dist/template/.changeset/media-capture-review.md +8 -0
- package/dist/template/.changeset/media-capture-sessions.md +5 -0
- package/dist/template/.changeset/media-delete-and-inline-editing.md +7 -0
- package/dist/template/.changeset/media-lifecycle.md +9 -0
- package/dist/template/.changeset/media-phone-ingest.md +8 -0
- package/dist/template/.changeset/memberships.md +37 -0
- package/dist/template/.changeset/message-templates.md +9 -0
- package/dist/template/.changeset/mobile-app-package.md +10 -0
- package/dist/template/.changeset/mobile-capture-batches.md +9 -0
- package/dist/template/.changeset/mobile-dependency-security.md +5 -0
- package/dist/template/.changeset/mobile-screens.md +10 -0
- package/dist/template/.changeset/mobile-store-ci.md +11 -0
- package/dist/template/.changeset/mobile-v2-deferral.md +12 -0
- package/dist/template/.changeset/n1-schema.md +6 -0
- package/dist/template/.changeset/named-roles-grants.md +10 -0
- package/dist/template/.changeset/native-customer-invoices.md +9 -0
- package/dist/template/.changeset/native-gallery-proofing.md +6 -0
- package/dist/template/.changeset/next-critical-advisories.md +6 -0
- package/dist/template/.changeset/no-double-booking.md +13 -0
- package/dist/template/.changeset/no-live-phone-example.md +5 -0
- package/dist/template/.changeset/note-task-recovery.md +9 -0
- package/dist/template/.changeset/notes.md +22 -0
- package/dist/template/.changeset/notification-fanout-inbox.md +17 -0
- package/dist/template/.changeset/on-danger-token.md +9 -0
- package/dist/template/.changeset/one-answer-to-who.md +24 -0
- package/dist/template/.changeset/open-source-demo-only.md +7 -0
- package/dist/template/.changeset/order-read-authorization.md +10 -0
- package/dist/template/.changeset/outbox-dead-letters.md +13 -0
- package/dist/template/.changeset/owner-agent-launch.md +4 -0
- package/dist/template/.changeset/owner-authored-assessments.md +15 -0
- package/dist/template/.changeset/owner-companion.md +10 -0
- package/dist/template/.changeset/owner-content-builder.md +21 -0
- package/dist/template/.changeset/owner-facing-helper.md +5 -0
- package/dist/template/.changeset/owner-storage-recording-import.md +8 -0
- package/dist/template/.changeset/ownership-recovery.md +5 -0
- package/dist/template/.changeset/ownership.md +8 -0
- package/dist/template/.changeset/package-artifact-integrity.md +9 -0
- package/dist/template/.changeset/paradise-comms-adapter.md +5 -0
- package/dist/template/.changeset/patch-uuid-buffer-advisory.md +7 -0
- package/dist/template/.changeset/paywalls.md +10 -0
- package/dist/template/.changeset/perf-harness-windows.md +11 -0
- package/dist/template/.changeset/perf-measurement-families.md +8 -0
- package/dist/template/.changeset/phase-0-foundations.md +7 -0
- package/dist/template/.changeset/pipelines.md +21 -0
- package/dist/template/.changeset/plan-evidence-gate.md +7 -0
- package/dist/template/.changeset/plan-proof-clause.md +9 -0
- package/dist/template/.changeset/plan-provider-pivot-2026-09-27.md +20 -0
- package/dist/template/.changeset/plan-world-class-commerce-editor-2026-09-29.md +21 -0
- package/dist/template/.changeset/playbook-schedules.md +21 -0
- package/dist/template/.changeset/playground-hardening.md +5 -0
- package/dist/template/.changeset/plugin-contract.md +5 -0
- package/dist/template/.changeset/popups.md +37 -0
- package/dist/template/.changeset/portable-plugins.md +5 -0
- package/dist/template/.changeset/portal-rooms.md +16 -0
- package/dist/template/.changeset/portal-shell.md +11 -0
- package/dist/template/.changeset/print-on-demand-fulfillment.md +7 -0
- package/dist/template/.changeset/printify-live-fulfillment.md +11 -0
- package/dist/template/.changeset/private-location-access.md +10 -0
- package/dist/template/.changeset/private-mobile-cache.md +6 -0
- package/dist/template/.changeset/private-note-access.md +8 -0
- package/dist/template/.changeset/privileged-two-factor.md +11 -0
- package/dist/template/.changeset/product-completion-plan.md +10 -0
- package/dist/template/.changeset/product-gift-share.md +7 -0
- package/dist/template/.changeset/project-case-studies.md +7 -0
- package/dist/template/.changeset/projects.md +24 -0
- package/dist/template/.changeset/provider-recording-erasure.md +8 -0
- package/dist/template/.changeset/provider-workflows-without-open-transactions.md +15 -0
- package/dist/template/.changeset/public-beta-2.md +4 -0
- package/dist/template/.changeset/public-beta-preparation.md +4 -0
- package/dist/template/.changeset/public-cart-checkout-confirmation.md +5 -0
- package/dist/template/.changeset/public-entity-drafts.md +6 -0
- package/dist/template/.changeset/public-gates.md +9 -0
- package/dist/template/.changeset/public-playground-host-updates.md +10 -0
- package/dist/template/.changeset/public-project-portfolios.md +7 -0
- package/dist/template/.changeset/publish-image.md +7 -0
- package/dist/template/.changeset/purge-without-open-transactions.md +9 -0
- package/dist/template/.changeset/push-notifications.md +11 -0
- package/dist/template/.changeset/queue-performance-clock.md +8 -0
- package/dist/template/.changeset/quote-conversion.md +22 -0
- package/dist/template/.changeset/quote-partner-share.md +7 -0
- package/dist/template/.changeset/quotes.md +22 -0
- package/dist/template/.changeset/real-browser-accessibility.md +7 -0
- package/dist/template/.changeset/recipe-bootstrap-fixes.md +9 -0
- package/dist/template/.changeset/recipe-update-backup-gate.md +5 -0
- package/dist/template/.changeset/recipient-messaging-policy.md +8 -0
- package/dist/template/.changeset/record-search-orders-subscriptions-gifts.md +8 -0
- package/dist/template/.changeset/record-studio-permissions.md +7 -0
- package/dist/template/.changeset/record-trash-every-row.md +9 -0
- package/dist/template/.changeset/recurring-invoices.md +24 -0
- package/dist/template/.changeset/referral-attribution.md +20 -0
- package/dist/template/.changeset/referral-commissions.md +11 -0
- package/dist/template/.changeset/register-stored-original-without-open-transactions.md +7 -0
- package/dist/template/.changeset/release-channels.md +7 -0
- package/dist/template/.changeset/remove-forced-builder-credit.md +5 -0
- package/dist/template/.changeset/rentals.md +22 -0
- package/dist/template/.changeset/reports-you-will-read.md +31 -0
- package/dist/template/.changeset/rescan-without-open-transactions.md +9 -0
- package/dist/template/.changeset/retire-stale-handoffs.md +7 -0
- package/dist/template/.changeset/reviews.md +11 -0
- package/dist/template/.changeset/rich-link-url-allowlist.md +5 -0
- package/dist/template/.changeset/role-guidance.md +5 -0
- package/dist/template/.changeset/rule-strong-token.md +13 -0
- package/dist/template/.changeset/saved-views.md +19 -0
- package/dist/template/.changeset/schema-baseline.md +12 -0
- package/dist/template/.changeset/scoring.md +23 -0
- package/dist/template/.changeset/security-parsing-and-recovery.md +8 -0
- package/dist/template/.changeset/seed-demo.md +8 -0
- package/dist/template/.changeset/seeded-development-home.md +5 -0
- package/dist/template/.changeset/segments.md +21 -0
- package/dist/template/.changeset/self-building-scope.md +12 -0
- package/dist/template/.changeset/seo-riba-surface.md +11 -0
- package/dist/template/.changeset/service-output-schemas.md +5 -0
- package/dist/template/.changeset/session-device-management.md +11 -0
- package/dist/template/.changeset/sharing-in-the-dna.md +32 -0
- package/dist/template/.changeset/ship-replit-storage-sdk.md +5 -0
- package/dist/template/.changeset/shopify-live-channel.md +12 -0
- package/dist/template/.changeset/shopify-refund-reconciliation.md +8 -0
- package/dist/template/.changeset/signed-candidate-history.md +4 -0
- package/dist/template/.changeset/signed-release-feed.md +6 -0
- package/dist/template/.changeset/signup-contact-import.md +5 -0
- package/dist/template/.changeset/site-live-chat.md +5 -0
- package/dist/template/.changeset/sms-consent-boundary.md +8 -0
- package/dist/template/.changeset/sms-registration.md +25 -0
- package/dist/template/.changeset/sms-templates-keywords-mms.md +5 -0
- package/dist/template/.changeset/sms.md +27 -0
- package/dist/template/.changeset/social-composer.md +9 -0
- package/dist/template/.changeset/social-connections.md +10 -0
- package/dist/template/.changeset/social-gbp.md +7 -0
- package/dist/template/.changeset/social-ingest.md +8 -0
- package/dist/template/.changeset/social-onboarding.md +8 -0
- package/dist/template/.changeset/source-first-start.md +5 -0
- package/dist/template/.changeset/source-map-security-floor.md +4 -0
- package/dist/template/.changeset/source-provenance.md +16 -0
- package/dist/template/.changeset/spine-and-service-registry.md +21 -0
- package/dist/template/.changeset/stable-release-publication.md +10 -0
- package/dist/template/.changeset/staff-invitations.md +13 -0
- package/dist/template/.changeset/standalone-artifact-boundary.md +5 -0
- package/dist/template/.changeset/standing-debts-1.md +10 -0
- package/dist/template/.changeset/storage-adapters.md +12 -0
- package/dist/template/.changeset/subscription-billing.md +12 -0
- package/dist/template/.changeset/supplier-agreement-search.md +8 -0
- package/dist/template/.changeset/supply-chain-release-gate.md +11 -0
- package/dist/template/.changeset/tasks.md +20 -0
- package/dist/template/.changeset/tax-adapter-seam.md +5 -0
- package/dist/template/.changeset/third-party-batch-2.md +28 -0
- package/dist/template/.changeset/third-party-findings-batch-1.md +27 -0
- package/dist/template/.changeset/tidy-sites-drop.md +9 -0
- package/dist/template/.changeset/time-entries.md +24 -0
- package/dist/template/.changeset/transaction-composition-integrity.md +22 -0
- package/dist/template/.changeset/transactional-jobs.md +15 -0
- package/dist/template/.changeset/translation-admin.md +26 -0
- package/dist/template/.changeset/translation-draft-honesty.md +5 -0
- package/dist/template/.changeset/typed-sdk.md +7 -0
- package/dist/template/.changeset/unified-calendar.md +23 -0
- package/dist/template/.changeset/update-admin.md +12 -0
- package/dist/template/.changeset/update-apply.md +6 -0
- package/dist/template/.changeset/update-cli.md +10 -0
- package/dist/template/.changeset/update-escalation.md +11 -0
- package/dist/template/.changeset/update-policy.md +6 -0
- package/dist/template/.changeset/update-preflight.md +6 -0
- package/dist/template/.changeset/update-status.md +10 -0
- package/dist/template/.changeset/update-targets.md +10 -0
- package/dist/template/.changeset/upgrade-gates.md +9 -0
- package/dist/template/.changeset/uploads-without-open-transactions.md +9 -0
- package/dist/template/.changeset/versioned-release.md +10 -0
- package/dist/template/.changeset/visit-to-paid-funnel.md +27 -0
- package/dist/template/.changeset/visual-drag.md +6 -0
- package/dist/template/.changeset/voice-video-rooms.md +8 -0
- package/dist/template/.changeset/voicevideo-credential-expiry.md +8 -0
- package/dist/template/.changeset/waitlists-groups-and-policy.md +27 -0
- package/dist/template/.changeset/watermark-backfill-without-open-transactions.md +9 -0
- package/dist/template/.changeset/watermarked-proof-renditions.md +8 -0
- package/dist/template/.changeset/webauthn-14.md +7 -0
- package/dist/template/.changeset/webhook-pinned-transport.md +5 -0
- package/dist/template/.changeset/webhooks.md +22 -0
- package/dist/template/.changeset/wevibesites-colophon.md +7 -0
- package/dist/template/.changeset/workflow-record-search.md +8 -0
- package/dist/template/.changeset/workforce-adapter-family.md +5 -0
- package/dist/template/.changeset/www-canonical-redirect.md +7 -0
- package/dist/template/.dockerignore +16 -0
- package/dist/template/.env.example +215 -0
- package/dist/template/.github/PULL_REQUEST_TEMPLATE.md +19 -0
- package/dist/template/.github/actions/setup-project/action.yml +15 -0
- package/dist/template/.github/dependabot.yml +27 -0
- package/dist/template/.github/workflows/ci.yml +501 -0
- package/dist/template/.github/workflows/eas.yml +51 -0
- package/dist/template/.github/workflows/mirror-ci-images.yml +62 -0
- package/dist/template/.github/workflows/publish-image.yml +214 -0
- package/dist/template/.github/workflows/publish-packages.yml +75 -0
- package/dist/template/.github/workflows/security-scheduled.yml +47 -0
- package/dist/template/.node-version +1 -0
- package/dist/template/.railway/railway.ts +43 -0
- package/dist/template/.replit +15 -0
- package/dist/template/AGENTS.md +34 -0
- package/dist/template/CLAUDE.md +62 -0
- package/dist/template/CODE_OF_CONDUCT.md +134 -0
- package/dist/template/CONTRIBUTING.md +100 -0
- package/dist/template/DCO.md +42 -0
- package/dist/template/Dockerfile +48 -0
- package/dist/template/LICENSE +202 -0
- package/dist/template/LICENSING.md +61 -0
- package/dist/template/MASTER.md +10261 -0
- package/dist/template/README.md +122 -0
- package/dist/template/SECURITY.md +152 -0
- package/dist/template/app/(admin)/action-helpers.ts +21 -0
- package/dist/template/app/(admin)/actions.ts +1529 -0
- package/dist/template/app/(admin)/admin/AdminGuidanceHelp.tsx +38 -0
- package/dist/template/app/(admin)/admin/AdminNav.tsx +303 -0
- package/dist/template/app/(admin)/admin/BlockEditor.tsx +2993 -0
- package/dist/template/app/(admin)/admin/ConversationsPanel.tsx +124 -0
- package/dist/template/app/(admin)/admin/NotesPanel.tsx +161 -0
- package/dist/template/app/(admin)/admin/PreviewCanvas.tsx +583 -0
- package/dist/template/app/(admin)/admin/RichField.tsx +107 -0
- package/dist/template/app/(admin)/admin/ScorePanel.tsx +117 -0
- package/dist/template/app/(admin)/admin/SignOutButton.tsx +19 -0
- package/dist/template/app/(admin)/admin/ViewBar.tsx +162 -0
- package/dist/template/app/(admin)/admin/access/page.tsx +214 -0
- package/dist/template/app/(admin)/admin/ads/page.tsx +827 -0
- package/dist/template/app/(admin)/admin/agreements/[id]/page.tsx +148 -0
- package/dist/template/app/(admin)/admin/agreements/page.tsx +288 -0
- package/dist/template/app/(admin)/admin/appointments/[id]/page.tsx +522 -0
- package/dist/template/app/(admin)/admin/appointments/page.tsx +215 -0
- package/dist/template/app/(admin)/admin/assessments/BandEditor.tsx +295 -0
- package/dist/template/app/(admin)/admin/assessments/EscalationEditor.tsx +229 -0
- package/dist/template/app/(admin)/admin/assessments/PublishControls.tsx +76 -0
- package/dist/template/app/(admin)/admin/assessments/QuestionBuilder.tsx +489 -0
- package/dist/template/app/(admin)/admin/assessments/[id]/edit/page.tsx +64 -0
- package/dist/template/app/(admin)/admin/assessments/[id]/page.tsx +166 -0
- package/dist/template/app/(admin)/admin/assessments/labels.ts +106 -0
- package/dist/template/app/(admin)/admin/assessments/new/page.tsx +42 -0
- package/dist/template/app/(admin)/admin/assessments/page.tsx +95 -0
- package/dist/template/app/(admin)/admin/assistant/page.tsx +741 -0
- package/dist/template/app/(admin)/admin/automations/[id]/page.tsx +595 -0
- package/dist/template/app/(admin)/admin/automations/page.tsx +153 -0
- package/dist/template/app/(admin)/admin/blog/actions.ts +21 -0
- package/dist/template/app/(admin)/admin/blog/page.tsx +13 -0
- package/dist/template/app/(admin)/admin/briefing/page.tsx +179 -0
- package/dist/template/app/(admin)/admin/builder/page.tsx +205 -0
- package/dist/template/app/(admin)/admin/builder/proposals/[id]/page.tsx +88 -0
- package/dist/template/app/(admin)/admin/calculators/CalculatorBuilder.tsx +573 -0
- package/dist/template/app/(admin)/admin/calculators/CalculatorPublish.tsx +65 -0
- package/dist/template/app/(admin)/admin/calculators/[id]/page.tsx +75 -0
- package/dist/template/app/(admin)/admin/calculators/labels.ts +51 -0
- package/dist/template/app/(admin)/admin/calculators/new/page.tsx +35 -0
- package/dist/template/app/(admin)/admin/calculators/page.tsx +87 -0
- package/dist/template/app/(admin)/admin/calendar/page.tsx +326 -0
- package/dist/template/app/(admin)/admin/calendars/[id]/page.tsx +255 -0
- package/dist/template/app/(admin)/admin/calendars/audiences/page.tsx +256 -0
- package/dist/template/app/(admin)/admin/calendars/page.tsx +261 -0
- package/dist/template/app/(admin)/admin/calendars/waitlist/page.tsx +236 -0
- package/dist/template/app/(admin)/admin/carts/[id]/page.tsx +219 -0
- package/dist/template/app/(admin)/admin/carts/page.tsx +107 -0
- package/dist/template/app/(admin)/admin/collections/[id]/page.tsx +259 -0
- package/dist/template/app/(admin)/admin/collections/page.tsx +134 -0
- package/dist/template/app/(admin)/admin/community/page.tsx +293 -0
- package/dist/template/app/(admin)/admin/connect/ConnectForm.tsx +52 -0
- package/dist/template/app/(admin)/admin/connect/actions.ts +29 -0
- package/dist/template/app/(admin)/admin/connect/page.tsx +17 -0
- package/dist/template/app/(admin)/admin/contacts/ContactForm.tsx +287 -0
- package/dist/template/app/(admin)/admin/contacts/CustomFieldInputs.tsx +101 -0
- package/dist/template/app/(admin)/admin/contacts/[id]/MergePanel.tsx +113 -0
- package/dist/template/app/(admin)/admin/contacts/[id]/RelationshipPanel.tsx +234 -0
- package/dist/template/app/(admin)/admin/contacts/[id]/page.tsx +388 -0
- package/dist/template/app/(admin)/admin/contacts/contactLabels.ts +112 -0
- package/dist/template/app/(admin)/admin/contacts/duplicates/DuplicateReview.tsx +335 -0
- package/dist/template/app/(admin)/admin/contacts/duplicates/page.tsx +196 -0
- package/dist/template/app/(admin)/admin/contacts/fields/CustomFieldManager.tsx +199 -0
- package/dist/template/app/(admin)/admin/contacts/fields/page.tsx +58 -0
- package/dist/template/app/(admin)/admin/contacts/new/page.tsx +51 -0
- package/dist/template/app/(admin)/admin/contacts/organizations/OrganizationForm.tsx +144 -0
- package/dist/template/app/(admin)/admin/contacts/organizations/[id]/page.tsx +80 -0
- package/dist/template/app/(admin)/admin/contacts/organizations/labels.ts +26 -0
- package/dist/template/app/(admin)/admin/contacts/organizations/new/page.tsx +35 -0
- package/dist/template/app/(admin)/admin/contacts/organizations/page.tsx +140 -0
- package/dist/template/app/(admin)/admin/contacts/page.tsx +341 -0
- package/dist/template/app/(admin)/admin/contacts/privacy/PrivacyActionForm.tsx +59 -0
- package/dist/template/app/(admin)/admin/contacts/privacy/[id]/page.tsx +188 -0
- package/dist/template/app/(admin)/admin/contacts/privacy/page.tsx +241 -0
- package/dist/template/app/(admin)/admin/contribute/ContributeForms.tsx +190 -0
- package/dist/template/app/(admin)/admin/contribute/[id]/page.tsx +111 -0
- package/dist/template/app/(admin)/admin/contribute/page.tsx +114 -0
- package/dist/template/app/(admin)/admin/demos/page.tsx +174 -0
- package/dist/template/app/(admin)/admin/describeAction.ts +38 -0
- package/dist/template/app/(admin)/admin/design/DesignForm.tsx +206 -0
- package/dist/template/app/(admin)/admin/design/page.tsx +79 -0
- package/dist/template/app/(admin)/admin/documents/[id]/page.tsx +331 -0
- package/dist/template/app/(admin)/admin/documents/page.tsx +127 -0
- package/dist/template/app/(admin)/admin/editorLabels.ts +288 -0
- package/dist/template/app/(admin)/admin/events/[id]/page.tsx +192 -0
- package/dist/template/app/(admin)/admin/events/page.tsx +75 -0
- package/dist/template/app/(admin)/admin/experiments/page.tsx +71 -0
- package/dist/template/app/(admin)/admin/facts/FactForms.tsx +223 -0
- package/dist/template/app/(admin)/admin/facts/[key]/page.tsx +145 -0
- package/dist/template/app/(admin)/admin/facts/labels.ts +32 -0
- package/dist/template/app/(admin)/admin/facts/page.tsx +97 -0
- package/dist/template/app/(admin)/admin/forms/FieldBuilder.tsx +410 -0
- package/dist/template/app/(admin)/admin/forms/[id]/edit/page.tsx +87 -0
- package/dist/template/app/(admin)/admin/forms/[id]/page.tsx +198 -0
- package/dist/template/app/(admin)/admin/forms/builderLabels.ts +55 -0
- package/dist/template/app/(admin)/admin/forms/new/page.tsx +47 -0
- package/dist/template/app/(admin)/admin/forms/page.tsx +104 -0
- package/dist/template/app/(admin)/admin/fulfillment/page.tsx +87 -0
- package/dist/template/app/(admin)/admin/galleries/[id]/page.tsx +457 -0
- package/dist/template/app/(admin)/admin/galleries/page.tsx +132 -0
- package/dist/template/app/(admin)/admin/gifts/page.tsx +152 -0
- package/dist/template/app/(admin)/admin/guard.ts +59 -0
- package/dist/template/app/(admin)/admin/guidance/page.tsx +58 -0
- package/dist/template/app/(admin)/admin/health/page.tsx +141 -0
- package/dist/template/app/(admin)/admin/hire/page.tsx +228 -0
- package/dist/template/app/(admin)/admin/imports/ImportForms.tsx +167 -0
- package/dist/template/app/(admin)/admin/imports/[id]/page.tsx +65 -0
- package/dist/template/app/(admin)/admin/imports/contacts/[id]/page.tsx +273 -0
- package/dist/template/app/(admin)/admin/imports/contacts/page.tsx +212 -0
- package/dist/template/app/(admin)/admin/imports/page.tsx +68 -0
- package/dist/template/app/(admin)/admin/inbox/[id]/page.tsx +232 -0
- package/dist/template/app/(admin)/admin/inbox/page.tsx +306 -0
- package/dist/template/app/(admin)/admin/inventory/page.tsx +273 -0
- package/dist/template/app/(admin)/admin/invitations/InvitationManager.tsx +369 -0
- package/dist/template/app/(admin)/admin/invitations/page.tsx +102 -0
- package/dist/template/app/(admin)/admin/invoices/[id]/page.tsx +474 -0
- package/dist/template/app/(admin)/admin/invoices/format.ts +43 -0
- package/dist/template/app/(admin)/admin/invoices/new/page.tsx +206 -0
- package/dist/template/app/(admin)/admin/invoices/page.tsx +136 -0
- package/dist/template/app/(admin)/admin/invoices/recurring/page.tsx +227 -0
- package/dist/template/app/(admin)/admin/invoices/tax/page.tsx +378 -0
- package/dist/template/app/(admin)/admin/jobs/JobActionForm.tsx +54 -0
- package/dist/template/app/(admin)/admin/jobs/[name]/[id]/page.tsx +183 -0
- package/dist/template/app/(admin)/admin/jobs/outbox/[id]/page.tsx +130 -0
- package/dist/template/app/(admin)/admin/jobs/outbox/page.tsx +145 -0
- package/dist/template/app/(admin)/admin/jobs/page.tsx +221 -0
- package/dist/template/app/(admin)/admin/layout.tsx +194 -0
- package/dist/template/app/(admin)/admin/locations/DeleteButton.tsx +47 -0
- package/dist/template/app/(admin)/admin/locations/HoursForm.tsx +122 -0
- package/dist/template/app/(admin)/admin/locations/LocationForm.tsx +249 -0
- package/dist/template/app/(admin)/admin/locations/PrimaryButton.tsx +30 -0
- package/dist/template/app/(admin)/admin/locations/ServiceAreaForm.tsx +223 -0
- package/dist/template/app/(admin)/admin/locations/[id]/page.tsx +142 -0
- package/dist/template/app/(admin)/admin/locations/labels.ts +112 -0
- package/dist/template/app/(admin)/admin/locations/page.tsx +121 -0
- package/dist/template/app/(admin)/admin/loyalty/page.tsx +496 -0
- package/dist/template/app/(admin)/admin/marketplace/page.tsx +158 -0
- package/dist/template/app/(admin)/admin/media/AltTextForm.tsx +160 -0
- package/dist/template/app/(admin)/admin/media/DeleteAssetButton.tsx +74 -0
- package/dist/template/app/(admin)/admin/media/FocalPointForm.tsx +64 -0
- package/dist/template/app/(admin)/admin/media/RecordStudio.tsx +326 -0
- package/dist/template/app/(admin)/admin/media/TrashActions.tsx +100 -0
- package/dist/template/app/(admin)/admin/media/UploadForm.tsx +164 -0
- package/dist/template/app/(admin)/admin/media/page.tsx +415 -0
- package/dist/template/app/(admin)/admin/media/record/page.tsx +145 -0
- package/dist/template/app/(admin)/admin/media/upload-client.ts +313 -0
- package/dist/template/app/(admin)/admin/messaging/page.tsx +426 -0
- package/dist/template/app/(admin)/admin/newsletters/[id]/page.tsx +149 -0
- package/dist/template/app/(admin)/admin/newsletters/broadcasts/[id]/page.tsx +250 -0
- package/dist/template/app/(admin)/admin/newsletters/broadcasts/page.tsx +192 -0
- package/dist/template/app/(admin)/admin/newsletters/page.tsx +78 -0
- package/dist/template/app/(admin)/admin/newsletters/templates/page.tsx +254 -0
- package/dist/template/app/(admin)/admin/notifications/NotificationControls.tsx +197 -0
- package/dist/template/app/(admin)/admin/notifications/page.tsx +334 -0
- package/dist/template/app/(admin)/admin/orders/[id]/page.tsx +318 -0
- package/dist/template/app/(admin)/admin/orders/page.tsx +64 -0
- package/dist/template/app/(admin)/admin/page.tsx +159 -0
- package/dist/template/app/(admin)/admin/pages/SeedSiteButton.tsx +20 -0
- package/dist/template/app/(admin)/admin/pages/[id]/CopyPreviewLink.tsx +45 -0
- package/dist/template/app/(admin)/admin/pages/[id]/PageComments.tsx +242 -0
- package/dist/template/app/(admin)/admin/pages/[id]/PageEditor.tsx +105 -0
- package/dist/template/app/(admin)/admin/pages/[id]/PageLifecycle.tsx +210 -0
- package/dist/template/app/(admin)/admin/pages/[id]/PagePresence.tsx +63 -0
- package/dist/template/app/(admin)/admin/pages/[id]/PublishToggle.tsx +27 -0
- package/dist/template/app/(admin)/admin/pages/[id]/RevisionList.tsx +115 -0
- package/dist/template/app/(admin)/admin/pages/[id]/page.tsx +337 -0
- package/dist/template/app/(admin)/admin/pages/new/NewPageForm.tsx +65 -0
- package/dist/template/app/(admin)/admin/pages/new/page.tsx +45 -0
- package/dist/template/app/(admin)/admin/pages/page.tsx +171 -0
- package/dist/template/app/(admin)/admin/payments/page.tsx +203 -0
- package/dist/template/app/(admin)/admin/paywalls/page.tsx +199 -0
- package/dist/template/app/(admin)/admin/pipeline/page.tsx +313 -0
- package/dist/template/app/(admin)/admin/plugins/PluginForms.tsx +158 -0
- package/dist/template/app/(admin)/admin/plugins/page.tsx +150 -0
- package/dist/template/app/(admin)/admin/popups/[id]/PopupEditor.tsx +39 -0
- package/dist/template/app/(admin)/admin/popups/[id]/page.tsx +430 -0
- package/dist/template/app/(admin)/admin/popups/page.tsx +230 -0
- package/dist/template/app/(admin)/admin/pos/page.tsx +153 -0
- package/dist/template/app/(admin)/admin/price-lists/page.tsx +150 -0
- package/dist/template/app/(admin)/admin/print-on-demand/page.tsx +144 -0
- package/dist/template/app/(admin)/admin/procurement/page.tsx +208 -0
- package/dist/template/app/(admin)/admin/products/[id]/ProductEditor.tsx +61 -0
- package/dist/template/app/(admin)/admin/products/[id]/page.tsx +807 -0
- package/dist/template/app/(admin)/admin/products/new/page.tsx +55 -0
- package/dist/template/app/(admin)/admin/products/page.tsx +108 -0
- package/dist/template/app/(admin)/admin/projects/[id]/ProjectEditor.tsx +41 -0
- package/dist/template/app/(admin)/admin/projects/[id]/page.tsx +785 -0
- package/dist/template/app/(admin)/admin/projects/collections/[id]/page.tsx +166 -0
- package/dist/template/app/(admin)/admin/projects/collections/page.tsx +101 -0
- package/dist/template/app/(admin)/admin/projects/page.tsx +156 -0
- package/dist/template/app/(admin)/admin/promotions/page.tsx +206 -0
- package/dist/template/app/(admin)/admin/quotes/[id]/ConvertQuoteForm.tsx +34 -0
- package/dist/template/app/(admin)/admin/quotes/[id]/page.tsx +265 -0
- package/dist/template/app/(admin)/admin/quotes/page.tsx +193 -0
- package/dist/template/app/(admin)/admin/redirects/page.tsx +114 -0
- package/dist/template/app/(admin)/admin/referrals/page.tsx +464 -0
- package/dist/template/app/(admin)/admin/referrals/payouts/[id]/csv/route.ts +42 -0
- package/dist/template/app/(admin)/admin/reports/exports/[runId]/download/route.ts +41 -0
- package/dist/template/app/(admin)/admin/reports/exports/page.tsx +524 -0
- package/dist/template/app/(admin)/admin/reports/page.tsx +423 -0
- package/dist/template/app/(admin)/admin/retention/page.tsx +148 -0
- package/dist/template/app/(admin)/admin/returns/page.tsx +141 -0
- package/dist/template/app/(admin)/admin/reviews/page.tsx +250 -0
- package/dist/template/app/(admin)/admin/roles/RoleManager.tsx +381 -0
- package/dist/template/app/(admin)/admin/roles/page.tsx +78 -0
- package/dist/template/app/(admin)/admin/scoring/page.tsx +236 -0
- package/dist/template/app/(admin)/admin/search/page.tsx +137 -0
- package/dist/template/app/(admin)/admin/sections/[key]/SectionEditor.tsx +35 -0
- package/dist/template/app/(admin)/admin/sections/[key]/page.tsx +72 -0
- package/dist/template/app/(admin)/admin/sections/page.tsx +129 -0
- package/dist/template/app/(admin)/admin/segments/page.tsx +272 -0
- package/dist/template/app/(admin)/admin/settings/ApiKeysCard.tsx +268 -0
- package/dist/template/app/(admin)/admin/settings/MailSettingsCard.tsx +796 -0
- package/dist/template/app/(admin)/admin/settings/PasswordForm.tsx +86 -0
- package/dist/template/app/(admin)/admin/settings/SettingsForm.tsx +206 -0
- package/dist/template/app/(admin)/admin/settings/WebhooksCard.tsx +292 -0
- package/dist/template/app/(admin)/admin/settings/page.tsx +483 -0
- package/dist/template/app/(admin)/admin/sharing/page.tsx +426 -0
- package/dist/template/app/(admin)/admin/shipping/page.tsx +144 -0
- package/dist/template/app/(admin)/admin/social/page.tsx +544 -0
- package/dist/template/app/(admin)/admin/subscriptions/[id]/page.tsx +41 -0
- package/dist/template/app/(admin)/admin/subscriptions/page.tsx +491 -0
- package/dist/template/app/(admin)/admin/tasks/page.tsx +312 -0
- package/dist/template/app/(admin)/admin/templates/[key]/CreateFromTemplateForm.tsx +47 -0
- package/dist/template/app/(admin)/admin/templates/[key]/EmailInboxPreview.tsx +65 -0
- package/dist/template/app/(admin)/admin/templates/[key]/TemplateEditor.tsx +37 -0
- package/dist/template/app/(admin)/admin/templates/[key]/page.tsx +128 -0
- package/dist/template/app/(admin)/admin/templates/page.tsx +63 -0
- package/dist/template/app/(admin)/admin/time/page.tsx +328 -0
- package/dist/template/app/(admin)/admin/traffic/funnel/page.tsx +184 -0
- package/dist/template/app/(admin)/admin/traffic/page.tsx +409 -0
- package/dist/template/app/(admin)/admin/translations/TranslationEditor.tsx +166 -0
- package/dist/template/app/(admin)/admin/translations/[locale]/[id]/page.tsx +151 -0
- package/dist/template/app/(admin)/admin/translations/page.tsx +189 -0
- package/dist/template/app/(admin)/admin/trash/page.tsx +108 -0
- package/dist/template/app/(admin)/admin/updates/UpdateActionForm.tsx +72 -0
- package/dist/template/app/(admin)/admin/updates/page.tsx +520 -0
- package/dist/template/app/(admin)/admin/voice-video/GuestInvite.tsx +39 -0
- package/dist/template/app/(admin)/admin/voice-video/HostJoin.tsx +26 -0
- package/dist/template/app/(admin)/admin/voice-video/VerifyConnection.tsx +28 -0
- package/dist/template/app/(admin)/admin/voice-video/page.tsx +372 -0
- package/dist/template/app/(admin)/admin/work/LiveRun.tsx +112 -0
- package/dist/template/app/(admin)/admin/work/WorkForms.tsx +310 -0
- package/dist/template/app/(admin)/admin/work/[id]/page.tsx +248 -0
- package/dist/template/app/(admin)/admin/work/approvals/page.tsx +151 -0
- package/dist/template/app/(admin)/admin/work/page.tsx +349 -0
- package/dist/template/app/(admin)/admin/work/playbooks/PlaybookForms.tsx +139 -0
- package/dist/template/app/(admin)/admin/work/playbooks/page.tsx +285 -0
- package/dist/template/app/(admin)/admin/work/spend/page.tsx +126 -0
- package/dist/template/app/(admin)/ads-actions.ts +355 -0
- package/dist/template/app/(admin)/advanced-money-actions.ts +163 -0
- package/dist/template/app/(admin)/analytics-actions.ts +70 -0
- package/dist/template/app/(admin)/approval-actions.ts +57 -0
- package/dist/template/app/(admin)/assessments-actions.ts +224 -0
- package/dist/template/app/(admin)/assistant-actions.ts +184 -0
- package/dist/template/app/(admin)/audience-actions.ts +139 -0
- package/dist/template/app/(admin)/automation-actions.ts +347 -0
- package/dist/template/app/(admin)/availability-actions.ts +99 -0
- package/dist/template/app/(admin)/booking-actions.ts +295 -0
- package/dist/template/app/(admin)/briefing-actions.ts +46 -0
- package/dist/template/app/(admin)/broadcast-actions.ts +155 -0
- package/dist/template/app/(admin)/builder-actions.ts +92 -0
- package/dist/template/app/(admin)/calculators-actions.ts +127 -0
- package/dist/template/app/(admin)/calendar-actions.ts +96 -0
- package/dist/template/app/(admin)/capture-actions.ts +191 -0
- package/dist/template/app/(admin)/catalog-actions.ts +1054 -0
- package/dist/template/app/(admin)/cms-actions.ts +637 -0
- package/dist/template/app/(admin)/connection-actions.ts +72 -0
- package/dist/template/app/(admin)/contact-import-actions.ts +158 -0
- package/dist/template/app/(admin)/contract-actions.ts +138 -0
- package/dist/template/app/(admin)/contribute-actions.ts +145 -0
- package/dist/template/app/(admin)/demo-actions.ts +49 -0
- package/dist/template/app/(admin)/design-actions.ts +71 -0
- package/dist/template/app/(admin)/document-actions.ts +153 -0
- package/dist/template/app/(admin)/entitlement-actions.ts +92 -0
- package/dist/template/app/(admin)/event-actions.ts +109 -0
- package/dist/template/app/(admin)/export-actions.ts +122 -0
- package/dist/template/app/(admin)/facts-actions.ts +135 -0
- package/dist/template/app/(admin)/first-party-plugin-actions.ts +475 -0
- package/dist/template/app/(admin)/forgot/ForgotForm.tsx +54 -0
- package/dist/template/app/(admin)/forgot/page.tsx +78 -0
- package/dist/template/app/(admin)/forms-actions.ts +108 -0
- package/dist/template/app/(admin)/gallery-actions.ts +227 -0
- package/dist/template/app/(admin)/guidance-actions.ts +55 -0
- package/dist/template/app/(admin)/import-actions.ts +142 -0
- package/dist/template/app/(admin)/inbox-actions.ts +146 -0
- package/dist/template/app/(admin)/invitation-actions.ts +139 -0
- package/dist/template/app/(admin)/invite/AcceptInvitationForm.tsx +71 -0
- package/dist/template/app/(admin)/invite/page.tsx +110 -0
- package/dist/template/app/(admin)/invoice-actions.ts +357 -0
- package/dist/template/app/(admin)/login/PasskeySignIn.tsx +32 -0
- package/dist/template/app/(admin)/login/SignInForm.tsx +61 -0
- package/dist/template/app/(admin)/login/page.tsx +96 -0
- package/dist/template/app/(admin)/login/verify/VerifyLogin.tsx +80 -0
- package/dist/template/app/(admin)/login/verify/page.tsx +46 -0
- package/dist/template/app/(admin)/loyalty-actions.ts +208 -0
- package/dist/template/app/(admin)/media-actions.ts +203 -0
- package/dist/template/app/(admin)/messaging-actions.ts +173 -0
- package/dist/template/app/(admin)/newsletter-actions.ts +98 -0
- package/dist/template/app/(admin)/note-actions.ts +114 -0
- package/dist/template/app/(admin)/notification-actions.ts +113 -0
- package/dist/template/app/(admin)/payment-actions.ts +118 -0
- package/dist/template/app/(admin)/paywall-actions.ts +77 -0
- package/dist/template/app/(admin)/pipeline-actions.ts +123 -0
- package/dist/template/app/(admin)/playbook-actions.ts +202 -0
- package/dist/template/app/(admin)/plugin-actions.ts +112 -0
- package/dist/template/app/(admin)/popup-actions.ts +169 -0
- package/dist/template/app/(admin)/project-actions.ts +476 -0
- package/dist/template/app/(admin)/quote-actions.ts +148 -0
- package/dist/template/app/(admin)/read-helpers.ts +21 -0
- package/dist/template/app/(admin)/recurring-actions.ts +116 -0
- package/dist/template/app/(admin)/referral-actions.ts +187 -0
- package/dist/template/app/(admin)/rental-actions.ts +75 -0
- package/dist/template/app/(admin)/report-actions.ts +63 -0
- package/dist/template/app/(admin)/reset/ResetForm.tsx +68 -0
- package/dist/template/app/(admin)/reset/page.tsx +74 -0
- package/dist/template/app/(admin)/reset-actions.ts +59 -0
- package/dist/template/app/(admin)/retention-actions.ts +64 -0
- package/dist/template/app/(admin)/review-actions.ts +83 -0
- package/dist/template/app/(admin)/scoring-actions.ts +109 -0
- package/dist/template/app/(admin)/security/SecurityControls.tsx +240 -0
- package/dist/template/app/(admin)/security/labels.ts +24 -0
- package/dist/template/app/(admin)/security/page.tsx +51 -0
- package/dist/template/app/(admin)/security/verify/StepUpForm.tsx +69 -0
- package/dist/template/app/(admin)/security/verify/page.tsx +44 -0
- package/dist/template/app/(admin)/security-actions.ts +285 -0
- package/dist/template/app/(admin)/segment-actions.ts +144 -0
- package/dist/template/app/(admin)/seo-actions.ts +61 -0
- package/dist/template/app/(admin)/settings-module-actions.ts +37 -0
- package/dist/template/app/(admin)/share-actions.ts +116 -0
- package/dist/template/app/(admin)/social-actions.ts +211 -0
- package/dist/template/app/(admin)/subscription-actions.ts +154 -0
- package/dist/template/app/(admin)/task-actions.ts +118 -0
- package/dist/template/app/(admin)/template-actions.ts +92 -0
- package/dist/template/app/(admin)/time-actions.ts +175 -0
- package/dist/template/app/(admin)/translation-actions.ts +107 -0
- package/dist/template/app/(admin)/trash-actions.ts +89 -0
- package/dist/template/app/(admin)/view-actions.ts +111 -0
- package/dist/template/app/(admin)/work-actions.ts +274 -0
- package/dist/template/app/(preview)/canvas-bridge.ts +885 -0
- package/dist/template/app/(preview)/layout.tsx +193 -0
- package/dist/template/app/(preview)/preview/page/[id]/page.tsx +63 -0
- package/dist/template/app/(preview)/preview/popup/[id]/page.tsx +59 -0
- package/dist/template/app/(preview)/preview/product/[id]/page.tsx +41 -0
- package/dist/template/app/(preview)/preview/project/[id]/page.tsx +41 -0
- package/dist/template/app/(preview)/preview/section/[key]/page.tsx +63 -0
- package/dist/template/app/(preview)/preview/share/[token]/page.tsx +48 -0
- package/dist/template/app/(preview)/preview/template/[key]/page.tsx +57 -0
- package/dist/template/app/(public)/AnalyticsConsentControl.tsx +92 -0
- package/dist/template/app/(public)/AnalyticsRuntime.tsx +85 -0
- package/dist/template/app/(public)/NativeShare.tsx +48 -0
- package/dist/template/app/(public)/ShareBar.tsx +101 -0
- package/dist/template/app/(public)/[[...slug]]/alternates.ts +59 -0
- package/dist/template/app/(public)/[[...slug]]/page.tsx +541 -0
- package/dist/template/app/(public)/[[...slug]]/pageview.ts +88 -0
- package/dist/template/app/(public)/assessment-actions.ts +86 -0
- package/dist/template/app/(public)/book/actions.ts +38 -0
- package/dist/template/app/(public)/book/page.tsx +64 -0
- package/dist/template/app/(public)/browse/FacetPanel.tsx +285 -0
- package/dist/template/app/(public)/browse/SearchBox.tsx +42 -0
- package/dist/template/app/(public)/browse/SortLinks.tsx +58 -0
- package/dist/template/app/(public)/browse-params.ts +336 -0
- package/dist/template/app/(public)/buy/AddToCart.tsx +123 -0
- package/dist/template/app/(public)/buy/buy-actions.ts +96 -0
- package/dist/template/app/(public)/c/[slug]/CollectionGrid.tsx +130 -0
- package/dist/template/app/(public)/c/[slug]/page.tsx +344 -0
- package/dist/template/app/(public)/cart/cart-actions.ts +103 -0
- package/dist/template/app/(public)/cart/page.tsx +235 -0
- package/dist/template/app/(public)/checkout/DeliveryMethods.tsx +109 -0
- package/dist/template/app/(public)/checkout/checkout-actions.ts +183 -0
- package/dist/template/app/(public)/checkout/page.tsx +363 -0
- package/dist/template/app/(public)/community/[slug]/page.tsx +261 -0
- package/dist/template/app/(public)/community-actions.ts +108 -0
- package/dist/template/app/(public)/contribute/page.tsx +153 -0
- package/dist/template/app/(public)/contribute-actions.ts +48 -0
- package/dist/template/app/(public)/form-actions.ts +69 -0
- package/dist/template/app/(public)/gift-actions.ts +33 -0
- package/dist/template/app/(public)/gifts/[slug]/page.tsx +102 -0
- package/dist/template/app/(public)/inbound-actions.ts +114 -0
- package/dist/template/app/(public)/layout.tsx +225 -0
- package/dist/template/app/(public)/memberships/actions.ts +23 -0
- package/dist/template/app/(public)/memberships/page.tsx +27 -0
- package/dist/template/app/(public)/newsletter-actions.ts +32 -0
- package/dist/template/app/(public)/orders/confirm/page.tsx +173 -0
- package/dist/template/app/(public)/search/page.tsx +233 -0
- package/dist/template/app/(public)/share-actions.ts +70 -0
- package/dist/template/app/(public)/shopper-cart.ts +98 -0
- package/dist/template/app/.well-known/freeholder/route.ts +94 -0
- package/dist/template/app/README.md +30 -0
- package/dist/template/app/ads.txt/route.ts +18 -0
- package/dist/template/app/api/ads/third-party-consent/route.ts +64 -0
- package/dist/template/app/api/ads/view/route.ts +58 -0
- package/dist/template/app/api/analytics/consent/route.ts +168 -0
- package/dist/template/app/api/analytics/export/route.ts +36 -0
- package/dist/template/app/api/analytics/vitals/route.ts +62 -0
- package/dist/template/app/api/auth/login/route.ts +31 -0
- package/dist/template/app/api/auth/login/verify/route.ts +66 -0
- package/dist/template/app/api/auth/logout/route.ts +18 -0
- package/dist/template/app/api/auth/session/route.ts +57 -0
- package/dist/template/app/api/chat/assistant/route.ts +51 -0
- package/dist/template/app/api/chat/route.ts +82 -0
- package/dist/template/app/api/cms/defaults/route.ts +20 -0
- package/dist/template/app/api/connections/calendar/[provider]/callback/route.ts +117 -0
- package/dist/template/app/api/connections/mail-read/[provider]/callback/route.ts +114 -0
- package/dist/template/app/api/connections/signup-contacts/[provider]/callback/route.ts +58 -0
- package/dist/template/app/api/doctor/route.ts +34 -0
- package/dist/template/app/api/health/live/route.ts +11 -0
- package/dist/template/app/api/health/route.ts +56 -0
- package/dist/template/app/api/mail/oauth/[provider]/callback/route.ts +80 -0
- package/dist/template/app/api/mail/webhooks/postmark/route.ts +7 -0
- package/dist/template/app/api/mail/webhooks/resend/route.ts +7 -0
- package/dist/template/app/api/mail/webhooks/ses/route.ts +7 -0
- package/dist/template/app/api/mcp/route.ts +42 -0
- package/dist/template/app/api/media/route.ts +58 -0
- package/dist/template/app/api/media/uploads/abort/route.ts +6 -0
- package/dist/template/app/api/media/uploads/complete/route.ts +6 -0
- package/dist/template/app/api/media/uploads/parts/route.ts +6 -0
- package/dist/template/app/api/media/uploads/route.ts +7 -0
- package/dist/template/app/api/openapi.json/route.ts +38 -0
- package/dist/template/app/api/payments/webhooks/flutterwave/route.ts +6 -0
- package/dist/template/app/api/payments/webhooks/mollie/route.ts +6 -0
- package/dist/template/app/api/payments/webhooks/paypal/route.ts +6 -0
- package/dist/template/app/api/payments/webhooks/paystack/route.ts +6 -0
- package/dist/template/app/api/payments/webhooks/razorpay/route.ts +6 -0
- package/dist/template/app/api/payments/webhooks/square/route.ts +6 -0
- package/dist/template/app/api/payments/webhooks/stripe/route.ts +6 -0
- package/dist/template/app/api/plugins/voice-video/webhooks/paradise/route.ts +45 -0
- package/dist/template/app/api/popups/route.ts +141 -0
- package/dist/template/app/api/security/csp-report/route.ts +50 -0
- package/dist/template/app/api/setup/owner/route.ts +19 -0
- package/dist/template/app/api/sms/webhooks/twilio/route.ts +6 -0
- package/dist/template/app/api/social/[provider]/callback/route.ts +70 -0
- package/dist/template/app/api/v1/[service]/route.ts +22 -0
- package/dist/template/app/app-ads.txt/route.ts +18 -0
- package/dist/template/app/capture/[token]/page.tsx +71 -0
- package/dist/template/app/embed/booking/page.tsx +7 -0
- package/dist/template/app/embed/gallery/[slug]/page.tsx +52 -0
- package/dist/template/app/embed/layout.tsx +13 -0
- package/dist/template/app/embed/newsletter/[id]/page.tsx +65 -0
- package/dist/template/app/embed/newsletter/actions.ts +25 -0
- package/dist/template/app/embed/reviews/page.tsx +51 -0
- package/dist/template/app/feeds/[kind]/route.ts +39 -0
- package/dist/template/app/g/[slug]/archive/route.ts +41 -0
- package/dist/template/app/g/[slug]/download/[itemId]/route.ts +39 -0
- package/dist/template/app/g/[slug]/page.tsx +331 -0
- package/dist/template/app/g/[slug]/view/[itemId]/route.ts +51 -0
- package/dist/template/app/g/actions.ts +211 -0
- package/dist/template/app/gift/[token]/page.tsx +61 -0
- package/dist/template/app/globals.css +148 -0
- package/dist/template/app/go/ad/route.ts +113 -0
- package/dist/template/app/i18n.ts +73 -0
- package/dist/template/app/ics/bookings/[token]/route.ts +42 -0
- package/dist/template/app/ics/calendars/[token]/route.ts +44 -0
- package/dist/template/app/ics/events/[slug]/route.ts +23 -0
- package/dist/template/app/indexnow-key/route.ts +25 -0
- package/dist/template/app/layout.tsx +66 -0
- package/dist/template/app/llms-full.txt/route.ts +14 -0
- package/dist/template/app/llms.txt/route.ts +102 -0
- package/dist/template/app/manifest.ts +69 -0
- package/dist/template/app/media/[...key]/route.ts +48 -0
- package/dist/template/app/media/download/[id]/route.ts +48 -0
- package/dist/template/app/newsletters/confirm/route.ts +26 -0
- package/dist/template/app/not-found.tsx +29 -0
- package/dist/template/app/og/[[...slug]]/route.tsx +54 -0
- package/dist/template/app/og/og-template.tsx +81 -0
- package/dist/template/app/playground/actions.ts +18 -0
- package/dist/template/app/playground/page.tsx +29 -0
- package/dist/template/app/portal/(account)/[section]/page.tsx +113 -0
- package/dist/template/app/portal/(account)/layout.tsx +108 -0
- package/dist/template/app/portal/(account)/messages/[id]/page.tsx +120 -0
- package/dist/template/app/portal/(account)/page.tsx +112 -0
- package/dist/template/app/portal/(account)/profile/page.tsx +139 -0
- package/dist/template/app/portal/(account)/records/[section]/[id]/actions.ts +25 -0
- package/dist/template/app/portal/(account)/records/[section]/[id]/page.tsx +24 -0
- package/dist/template/app/portal/(account)/subscriptions/[id]/page.tsx +169 -0
- package/dist/template/app/portal/PortalLocaleChooser.tsx +69 -0
- package/dist/template/app/portal/actions.ts +323 -0
- package/dist/template/app/portal/agreements/[token]/page.tsx +151 -0
- package/dist/template/app/portal/agreements/actions.ts +81 -0
- package/dist/template/app/portal/appointments/[token]/intake/page.tsx +98 -0
- package/dist/template/app/portal/appointments/[token]/page.tsx +210 -0
- package/dist/template/app/portal/appointments/actions.ts +131 -0
- package/dist/template/app/portal/appointments/moved/page.tsx +30 -0
- package/dist/template/app/portal/contact-import/DeviceContactPicker.tsx +119 -0
- package/dist/template/app/portal/contact-import/[id]/page.tsx +170 -0
- package/dist/template/app/portal/contact-import/actions.ts +193 -0
- package/dist/template/app/portal/contact-import/page.tsx +298 -0
- package/dist/template/app/portal/files/[id]/route.ts +50 -0
- package/dist/template/app/portal/invoices/InvoiceView.tsx +64 -0
- package/dist/template/app/portal/invoices/PaymentButton.tsx +10 -0
- package/dist/template/app/portal/invoices/[id]/page.tsx +37 -0
- package/dist/template/app/portal/invoices/actions.ts +52 -0
- package/dist/template/app/portal/invoices/confirmation/[token]/page.tsx +41 -0
- package/dist/template/app/portal/invoices/loading.tsx +7 -0
- package/dist/template/app/portal/login/MagicLinkForm.tsx +30 -0
- package/dist/template/app/portal/login/page.tsx +76 -0
- package/dist/template/app/portal/magic/confirm/ConfirmMagicLink.tsx +24 -0
- package/dist/template/app/portal/magic/confirm/page.tsx +46 -0
- package/dist/template/app/portal/magic/route.ts +36 -0
- package/dist/template/app/portal/message-actions.ts +51 -0
- package/dist/template/app/portal/privacy/PortalPrivacyCentre.tsx +209 -0
- package/dist/template/app/portal/privacy/page.tsx +147 -0
- package/dist/template/app/portal/quotes/[token]/page.tsx +324 -0
- package/dist/template/app/portal/quotes/accepted/page.tsx +30 -0
- package/dist/template/app/portal/quotes/actions.ts +145 -0
- package/dist/template/app/portal/quotes/partner/[token]/page.tsx +128 -0
- package/dist/template/app/portal/registry/actions.ts +34 -0
- package/dist/template/app/portal/registry/page.tsx +81 -0
- package/dist/template/app/portal/subscription-actions.ts +69 -0
- package/dist/template/app/privacy/artifacts/[id]/route.ts +38 -0
- package/dist/template/app/registry/[token]/page.tsx +67 -0
- package/dist/template/app/report-exports/[token]/route.ts +45 -0
- package/dist/template/app/robots.txt/route.ts +18 -0
- package/dist/template/app/s/[ref]/route.ts +41 -0
- package/dist/template/app/setup/OwnerForm.tsx +87 -0
- package/dist/template/app/setup/Steps.tsx +55 -0
- package/dist/template/app/setup/access.ts +15 -0
- package/dist/template/app/setup/actions.ts +203 -0
- package/dist/template/app/setup/business/BusinessForm.tsx +170 -0
- package/dist/template/app/setup/business/page.tsx +41 -0
- package/dist/template/app/setup/businessLabels.ts +113 -0
- package/dist/template/app/setup/done/DoneForm.tsx +33 -0
- package/dist/template/app/setup/done/MailReadiness.tsx +137 -0
- package/dist/template/app/setup/done/page.tsx +90 -0
- package/dist/template/app/setup/layout.tsx +48 -0
- package/dist/template/app/setup/location/LocationStepForm.tsx +110 -0
- package/dist/template/app/setup/location/page.tsx +61 -0
- package/dist/template/app/setup/page.tsx +50 -0
- package/dist/template/app/setup/security/page.tsx +29 -0
- package/dist/template/app/share/route.ts +60 -0
- package/dist/template/app/sitemap.xml/route.ts +31 -0
- package/dist/template/app/sitemaps/[locale]/route.ts +56 -0
- package/dist/template/app/source/route.ts +67 -0
- package/dist/template/app/theme.ts +54 -0
- package/dist/template/app/themeLabels.ts +26 -0
- package/dist/template/app/unsubscribe/route.ts +49 -0
- package/dist/template/db/README.md +21 -0
- package/dist/template/db/migrations/0000_reviewed-baseline.sql +7342 -0
- package/dist/template/db/migrations/0001_community_rooms.sql +46 -0
- package/dist/template/db/migrations/0002_voice_video_rooms.sql +41 -0
- package/dist/template/db/migrations/0003_print_on_demand_fulfillment.sql +21 -0
- package/dist/template/db/migrations/0004_marketplace_channel_sync.sql +23 -0
- package/dist/template/db/migrations/0005_retention_policies.sql +14 -0
- package/dist/template/db/migrations/0006_contact_pagination.sql +5 -0
- package/dist/template/db/migrations/0007_marketplace_sync_lease.sql +6 -0
- package/dist/template/db/migrations/0008_printify_live_fulfillment.sql +21 -0
- package/dist/template/db/migrations/0009_daily_voice_video.sql +14 -0
- package/dist/template/db/migrations/0010_note_task_trash.sql +10 -0
- package/dist/template/db/migrations/0011_record_trash.sql +22 -0
- package/dist/template/db/migrations/0012_owner_storage_refunds.sql +41 -0
- package/dist/template/db/migrations/0013_assessments.sql +119 -0
- package/dist/template/db/migrations/0014_attestations.sql +67 -0
- package/dist/template/db/migrations/0015_media_consents.sql +108 -0
- package/dist/template/db/migrations/0016_calculators.sql +31 -0
- package/dist/template/db/migrations/0017_postal_service_areas.sql +22 -0
- package/dist/template/db/migrations/0018_area_delivery_windows.sql +17 -0
- package/dist/template/db/migrations/0019_paradise_voice_video.sql +15 -0
- package/dist/template/db/migrations/0020_collections.sql +54 -0
- package/dist/template/db/migrations/0021_order_payment_milestones.sql +21 -0
- package/dist/template/db/migrations/0022_customer_surfaces.sql +31 -0
- package/dist/template/db/migrations/0023_gallery_private_delivery.sql +13 -0
- package/dist/template/db/migrations/0024_broadcast_unsubscribe.sql +11 -0
- package/dist/template/db/migrations/meta/0000_snapshot.json +53876 -0
- package/dist/template/db/migrations/meta/_journal.json +181 -0
- package/dist/template/deploy/README.md +130 -0
- package/dist/template/deploy/accessibility-testing.md +77 -0
- package/dist/template/deploy/agent-launch.md +129 -0
- package/dist/template/deploy/alt-text-suggestions.md +75 -0
- package/dist/template/deploy/analytics-governance.md +81 -0
- package/dist/template/deploy/app-store-privacy.md +82 -0
- package/dist/template/deploy/background-jobs.md +229 -0
- package/dist/template/deploy/browser-journeys.md +78 -0
- package/dist/template/deploy/c11-08-restore-drill-2026-09-28.log +41 -0
- package/dist/template/deploy/c11-08-restore-summary.md +113 -0
- package/dist/template/deploy/c224-editor-ux-audit-2026-09-29.md +120 -0
- package/dist/template/deploy/c313-live-acceptance-2026-09-28.log +219 -0
- package/dist/template/deploy/c313-live-acceptance-2026-09-28.md +83 -0
- package/dist/template/deploy/c324-storefront-parity-2026-09-29.md +168 -0
- package/dist/template/deploy/catalog-cart-access.md +35 -0
- package/dist/template/deploy/catalog-checkout-milestones.md +56 -0
- package/dist/template/deploy/ci-release-gate.md +83 -0
- package/dist/template/deploy/client-readiness.md +49 -0
- package/dist/template/deploy/commerce-catalog.md +119 -0
- package/dist/template/deploy/commerce-money.md +191 -0
- package/dist/template/deploy/commerce-payments.md +226 -0
- package/dist/template/deploy/content-security-policy.md +84 -0
- package/dist/template/deploy/contribute.md +37 -0
- package/dist/template/deploy/customer-locales.md +82 -0
- package/dist/template/deploy/customer-surfaces-2026-10-07.md +90 -0
- package/dist/template/deploy/customization-seams.md +18 -0
- package/dist/template/deploy/demo-scenarios.md +96 -0
- package/dist/template/deploy/digitalocean-app/.env.example +15 -0
- package/dist/template/deploy/digitalocean-app/README.md +26 -0
- package/dist/template/deploy/digitalocean-app/infra/app.yaml +75 -0
- package/dist/template/deploy/digitalocean-app/migrate.md +10 -0
- package/dist/template/deploy/digitalocean-app/recipe.yaml +40 -0
- package/dist/template/deploy/digitalocean-app/verify.md +10 -0
- package/dist/template/deploy/digitalocean-droplet/.env.example +21 -0
- package/dist/template/deploy/digitalocean-droplet/README.md +145 -0
- package/dist/template/deploy/digitalocean-droplet/deploy.md +89 -0
- package/dist/template/deploy/digitalocean-droplet/infra/Caddyfile +12 -0
- package/dist/template/deploy/digitalocean-droplet/infra/backup.sh +52 -0
- package/dist/template/deploy/digitalocean-droplet/infra/cloud-init.yml +46 -0
- package/dist/template/deploy/digitalocean-droplet/infra/compose.yml +65 -0
- package/dist/template/deploy/digitalocean-droplet/migrate.md +9 -0
- package/dist/template/deploy/digitalocean-droplet/recipe.yaml +47 -0
- package/dist/template/deploy/digitalocean-droplet/verify.md +117 -0
- package/dist/template/deploy/doc-claim-mapping.md +261 -0
- package/dist/template/deploy/docker-selfhost/.env.example +15 -0
- package/dist/template/deploy/docker-selfhost/README.md +28 -0
- package/dist/template/deploy/docker-selfhost/docker-updater/Caddyfile +9 -0
- package/dist/template/deploy/docker-selfhost/docker-updater/README.md +121 -0
- package/dist/template/deploy/docker-selfhost/docker-updater/compose.yml +64 -0
- package/dist/template/deploy/docker-selfhost/docker-updater/config.example.json +10 -0
- package/dist/template/deploy/docker-selfhost/docker-updater/freeholder-update-check.service +11 -0
- package/dist/template/deploy/docker-selfhost/docker-updater/freeholder-update-check.timer +10 -0
- package/dist/template/deploy/docker-selfhost/docker-updater/freeholder-updater.service +20 -0
- package/dist/template/deploy/docker-selfhost/infra/compose.yml +41 -0
- package/dist/template/deploy/docker-selfhost/migrate.md +9 -0
- package/dist/template/deploy/docker-selfhost/playground/README.md +76 -0
- package/dist/template/deploy/docker-selfhost/playground/compose.proxy-overlay.yml +14 -0
- package/dist/template/deploy/docker-selfhost/playground/compose.yml +59 -0
- package/dist/template/deploy/docker-selfhost/playground/demo.freeholder.ai.caddy +10 -0
- package/dist/template/deploy/docker-selfhost/playground/freeholder-playground-reset.service +10 -0
- package/dist/template/deploy/docker-selfhost/playground/freeholder-playground-reset.timer +10 -0
- package/dist/template/deploy/docker-selfhost/playground/reset.sh +17 -0
- package/dist/template/deploy/docker-selfhost/recipe.yaml +42 -0
- package/dist/template/deploy/docker-selfhost/verify.md +9 -0
- package/dist/template/deploy/edge-adapters.md +58 -0
- package/dist/template/deploy/event-outbox.md +80 -0
- package/dist/template/deploy/f-criteria-matrix.md +4649 -0
- package/dist/template/deploy/first-party-plugins.md +219 -0
- package/dist/template/deploy/fork-lane.md +93 -0
- package/dist/template/deploy/host-updater.example.json +23 -0
- package/dist/template/deploy/host-updater.md +107 -0
- package/dist/template/deploy/mail-delivery.md +205 -0
- package/dist/template/deploy/media-lifecycle.md +129 -0
- package/dist/template/deploy/migration-runbook.md +117 -0
- package/dist/template/deploy/n1-schema.md +34 -0
- package/dist/template/deploy/notification-fanout.md +92 -0
- package/dist/template/deploy/ownership-recovery.md +193 -0
- package/dist/template/deploy/perf-reference-run-2026-09-27.log +432 -0
- package/dist/template/deploy/performance-measurements.md +234 -0
- package/dist/template/deploy/play-data-safety.md +73 -0
- package/dist/template/deploy/privacy-rights.md +148 -0
- package/dist/template/deploy/provider-recording-erasure.md +102 -0
- package/dist/template/deploy/push-notifications.md +92 -0
- package/dist/template/deploy/railway/.env.example +15 -0
- package/dist/template/deploy/railway/README.md +24 -0
- package/dist/template/deploy/railway/migrate.md +10 -0
- package/dist/template/deploy/railway/recipe.yaml +35 -0
- package/dist/template/deploy/railway/verify.md +9 -0
- package/dist/template/deploy/recipe-verification.md +23 -0
- package/dist/template/deploy/record-trash.md +115 -0
- package/dist/template/deploy/release-channels.md +27 -0
- package/dist/template/deploy/release-feed.md +53 -0
- package/dist/template/deploy/release-notes-2026-09-14.md +86 -0
- package/dist/template/deploy/release-notes-2026-09-15.md +52 -0
- package/dist/template/deploy/release-notes-2026-09-16.md +114 -0
- package/dist/template/deploy/release-notes-2026-09-26.md +209 -0
- package/dist/template/deploy/release-notes-2026-09-27.md +47 -0
- package/dist/template/deploy/release-notes-2026-09-28.md +142 -0
- package/dist/template/deploy/release-notes-2026-09-29.md +138 -0
- package/dist/template/deploy/release-notes-2026-09-30.md +50 -0
- package/dist/template/deploy/release-notes-2026-10-01.md +112 -0
- package/dist/template/deploy/release-readiness.md +46 -0
- package/dist/template/deploy/render/.env.example +15 -0
- package/dist/template/deploy/render/README.md +22 -0
- package/dist/template/deploy/render/migrate.md +10 -0
- package/dist/template/deploy/render/recipe.yaml +40 -0
- package/dist/template/deploy/render/verify.md +9 -0
- package/dist/template/deploy/replit/.env.example +10 -0
- package/dist/template/deploy/replit/README.md +29 -0
- package/dist/template/deploy/replit/migrate.md +10 -0
- package/dist/template/deploy/replit/recipe.yaml +40 -0
- package/dist/template/deploy/replit/verify.md +10 -0
- package/dist/template/deploy/role-guidance.md +77 -0
- package/dist/template/deploy/spec-reconciliation.md +188 -0
- package/dist/template/deploy/stable-acceptance-2026-10-05.md +168 -0
- package/dist/template/deploy/update-admin.md +83 -0
- package/dist/template/deploy/update-apply.md +48 -0
- package/dist/template/deploy/update-checks.md +27 -0
- package/dist/template/deploy/update-escalation.md +71 -0
- package/dist/template/deploy/update-policy.md +20 -0
- package/dist/template/deploy/update-preflight.md +19 -0
- package/dist/template/deploy/update-status.md +78 -0
- package/dist/template/deploy/update-targets.md +90 -0
- package/dist/template/deploy/webhook-delivery.md +36 -0
- package/dist/template/drizzle.config.ts +24 -0
- package/dist/template/eslint.config.mjs +241 -0
- package/dist/template/freeholder.config.ts +11 -0
- package/dist/template/gitignore.template +48 -0
- package/dist/template/instrumentation.node.ts +113 -0
- package/dist/template/instrumentation.ts +23 -0
- package/dist/template/locales/README.md +68 -0
- package/dist/template/locales/ar.json +7090 -0
- package/dist/template/locales/en.json +7090 -0
- package/dist/template/locales/es.json +7090 -0
- package/dist/template/locales/fr.json +7090 -0
- package/dist/template/next.config.ts +166 -0
- package/dist/template/package.json +98 -0
- package/dist/template/packages/README.md +31 -0
- package/dist/template/packages/cli/LICENSE +202 -0
- package/dist/template/packages/cli/README.md +63 -0
- package/dist/template/packages/cli/package.json +29 -0
- package/dist/template/packages/cli/src/index.ts +355 -0
- package/dist/template/packages/cli/tsconfig.json +15 -0
- package/dist/template/packages/create-freeholder/LICENSE +202 -0
- package/dist/template/packages/create-freeholder/README.md +31 -0
- package/dist/template/packages/create-freeholder/package.json +29 -0
- package/dist/template/packages/create-freeholder/scripts/build.mjs +151 -0
- package/dist/template/packages/create-freeholder/src/index.ts +789 -0
- package/dist/template/packages/create-freeholder/tsconfig.json +15 -0
- package/dist/template/packages/freeholder-app/LICENSE +202 -0
- package/dist/template/packages/freeholder-app/README.md +72 -0
- package/dist/template/packages/freeholder-app/package.json +29 -0
- package/dist/template/packages/freeholder-app/src/assets.ts +320 -0
- package/dist/template/packages/freeholder-app/src/branding.ts +134 -0
- package/dist/template/packages/freeholder-app/src/config.ts +163 -0
- package/dist/template/packages/freeholder-app/src/index.ts +158 -0
- package/dist/template/packages/freeholder-app/src/init.ts +230 -0
- package/dist/template/packages/freeholder-app/src/png.ts +214 -0
- package/dist/template/packages/freeholder-app/tsconfig.json +15 -0
- package/dist/template/packages/mobile-app/LICENSE +202 -0
- package/dist/template/packages/mobile-app/README.md +137 -0
- package/dist/template/packages/mobile-app/package.json +34 -0
- package/dist/template/packages/mobile-app/src/branding.ts +91 -0
- package/dist/template/packages/mobile-app/src/cached-discovery.ts +36 -0
- package/dist/template/packages/mobile-app/src/capture-batches.ts +558 -0
- package/dist/template/packages/mobile-app/src/capture.ts +262 -0
- package/dist/template/packages/mobile-app/src/deep-links.ts +246 -0
- package/dist/template/packages/mobile-app/src/discovery.ts +195 -0
- package/dist/template/packages/mobile-app/src/format.ts +10 -0
- package/dist/template/packages/mobile-app/src/index.ts +122 -0
- package/dist/template/packages/mobile-app/src/messages.generated.ts +677 -0
- package/dist/template/packages/mobile-app/src/offline.ts +183 -0
- package/dist/template/packages/mobile-app/src/private-cache.ts +113 -0
- package/dist/template/packages/mobile-app/src/screens.ts +411 -0
- package/dist/template/packages/mobile-app/src/session.ts +317 -0
- package/dist/template/packages/mobile-app/src/strings.ts +11 -0
- package/dist/template/packages/mobile-app/src/transport.ts +50 -0
- package/dist/template/packages/mobile-app/tsconfig.json +15 -0
- package/dist/template/packages/plugin-kit/LICENSE +202 -0
- package/dist/template/packages/plugin-kit/README.md +11 -0
- package/dist/template/packages/plugin-kit/package.json +37 -0
- package/dist/template/packages/plugin-kit/src/contract.ts +169 -0
- package/dist/template/packages/plugin-kit/src/harness.ts +40 -0
- package/dist/template/packages/plugin-kit/src/importer.ts +37 -0
- package/dist/template/packages/plugin-kit/src/index.ts +41 -0
- package/dist/template/packages/plugin-kit/src/scaffold.ts +54 -0
- package/dist/template/packages/plugin-kit/src/semver.ts +78 -0
- package/dist/template/packages/plugin-kit/tsconfig.json +15 -0
- package/dist/template/packages/sdk/LICENSE +202 -0
- package/dist/template/packages/sdk/README.md +38 -0
- package/dist/template/packages/sdk/package.json +37 -0
- package/dist/template/packages/sdk/src/generated.ts +8557 -0
- package/dist/template/packages/sdk/src/index.ts +178 -0
- package/dist/template/packages/sdk/src/version.ts +4 -0
- package/dist/template/packages/sdk/test/generated.test.mjs +20 -0
- package/dist/template/packages/sdk/tsconfig.json +15 -0
- package/dist/template/packages/templates/LICENSE +202 -0
- package/dist/template/packages/templates/README.md +17 -0
- package/dist/template/packages/templates/package.json +37 -0
- package/dist/template/packages/templates/src/presets.ts +377 -0
- package/dist/template/packages/templates/tsconfig.json +14 -0
- package/dist/template/playwright.a11y.config.ts +109 -0
- package/dist/template/plugins/community/manifest.ts +19 -0
- package/dist/template/plugins/community/plugin.json +10 -0
- package/dist/template/plugins/community/schema.ts +116 -0
- package/dist/template/plugins/community/service.ts +996 -0
- package/dist/template/plugins/community/tables.ts +9 -0
- package/dist/template/plugins/gift-registry/manifest.ts +16 -0
- package/dist/template/plugins/gift-registry/plugin.json +10 -0
- package/dist/template/plugins/gift-registry/schema.ts +44 -0
- package/dist/template/plugins/gift-registry/service.ts +347 -0
- package/dist/template/plugins/gift-registry/tables.ts +3 -0
- package/dist/template/plugins/marketplace/adapter.ts +159 -0
- package/dist/template/plugins/marketplace/jobs.ts +37 -0
- package/dist/template/plugins/marketplace/manifest.ts +20 -0
- package/dist/template/plugins/marketplace/plugin.json +10 -0
- package/dist/template/plugins/marketplace/schema.ts +75 -0
- package/dist/template/plugins/marketplace/service.ts +642 -0
- package/dist/template/plugins/marketplace/shopify.ts +174 -0
- package/dist/template/plugins/marketplace/tables.ts +3 -0
- package/dist/template/plugins/print-on-demand/adapter.ts +86 -0
- package/dist/template/plugins/print-on-demand/jobs.ts +29 -0
- package/dist/template/plugins/print-on-demand/manifest.ts +21 -0
- package/dist/template/plugins/print-on-demand/plugin.json +10 -0
- package/dist/template/plugins/print-on-demand/printify.ts +139 -0
- package/dist/template/plugins/print-on-demand/schema.ts +54 -0
- package/dist/template/plugins/print-on-demand/service.ts +531 -0
- package/dist/template/plugins/print-on-demand/tables.ts +3 -0
- package/dist/template/plugins/social-fixture/adapter.ts +35 -0
- package/dist/template/plugins/social-fixture/manifest.ts +18 -0
- package/dist/template/plugins/social-fixture/plugin.json +10 -0
- package/dist/template/plugins/social-fixture/service.ts +9 -0
- package/dist/template/plugins/voice-video/adapter.ts +183 -0
- package/dist/template/plugins/voice-video/daily.ts +262 -0
- package/dist/template/plugins/voice-video/erasure.ts +93 -0
- package/dist/template/plugins/voice-video/jobs.ts +79 -0
- package/dist/template/plugins/voice-video/manifest.ts +34 -0
- package/dist/template/plugins/voice-video/paradise-provider.ts +157 -0
- package/dist/template/plugins/voice-video/paradise.ts +325 -0
- package/dist/template/plugins/voice-video/plugin.json +10 -0
- package/dist/template/plugins/voice-video/schema.ts +105 -0
- package/dist/template/plugins/voice-video/service.ts +1019 -0
- package/dist/template/plugins/voice-video/settings.ts +128 -0
- package/dist/template/plugins/voice-video/tables.ts +3 -0
- package/dist/template/plugins/voice-video/webhook.ts +134 -0
- package/dist/template/pnpm-lock.yaml +5386 -0
- package/dist/template/pnpm-workspace.yaml +81 -0
- package/dist/template/postcss.config.mjs +7 -0
- package/dist/template/proxy.ts +284 -0
- package/dist/template/public/fonts/OFL-JetBrains-Mono.txt +93 -0
- package/dist/template/public/fonts/OFL-Schibsted-Grotesk.txt +93 -0
- package/dist/template/public/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
- package/dist/template/public/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/dist/template/public/fonts/schibsted-grotesk-latin-ext.woff2 +0 -0
- package/dist/template/public/fonts/schibsted-grotesk-latin.woff2 +0 -0
- package/dist/template/render.yaml +46 -0
- package/dist/template/replit.nix +9 -0
- package/dist/template/scripts/README.md +69 -0
- package/dist/template/scripts/a11y-smoke.d.mts +24 -0
- package/dist/template/scripts/a11y-smoke.mjs +163 -0
- package/dist/template/scripts/changelog-gate.mjs +63 -0
- package/dist/template/scripts/contract-evidence.d.mts +8 -0
- package/dist/template/scripts/contract-evidence.mjs +18 -0
- package/dist/template/scripts/dependency-audit.d.mts +18 -0
- package/dist/template/scripts/dependency-audit.mjs +315 -0
- package/dist/template/scripts/deploy-droplet-remote.sh +138 -0
- package/dist/template/scripts/deploy-droplet.d.mts +59 -0
- package/dist/template/scripts/deploy-droplet.mjs +322 -0
- package/dist/template/scripts/docker-updater.py +524 -0
- package/dist/template/scripts/doctor.d.mts +3 -0
- package/dist/template/scripts/doctor.mjs +199 -0
- package/dist/template/scripts/f-matrix.d.mts +53 -0
- package/dist/template/scripts/f-matrix.mjs +298 -0
- package/dist/template/scripts/fast-gates.mjs +128 -0
- package/dist/template/scripts/generate-changelog.d.mts +16 -0
- package/dist/template/scripts/generate-changelog.mjs +95 -0
- package/dist/template/scripts/generate-mobile-messages.mjs +12 -0
- package/dist/template/scripts/generate-sdk.mjs +54 -0
- package/dist/template/scripts/host-updater.py +365 -0
- package/dist/template/scripts/launch-prepare.d.mts +14 -0
- package/dist/template/scripts/launch-prepare.mjs +93 -0
- package/dist/template/scripts/license-headers.mjs +169 -0
- package/dist/template/scripts/media-transfer.d.mts +19 -0
- package/dist/template/scripts/media-transfer.mjs +144 -0
- package/dist/template/scripts/mobile-store-gate.d.mts +72 -0
- package/dist/template/scripts/mobile-store-gate.mjs +569 -0
- package/dist/template/scripts/owner-password.mjs +107 -0
- package/dist/template/scripts/ownership-drill.d.mts +20 -0
- package/dist/template/scripts/ownership-drill.mjs +237 -0
- package/dist/template/scripts/ownership-export.mjs +46 -0
- package/dist/template/scripts/package-artifact-gate.mjs +291 -0
- package/dist/template/scripts/performance-budgets.d.mts +53 -0
- package/dist/template/scripts/performance-budgets.mjs +311 -0
- package/dist/template/scripts/plan-gate.d.mts +38 -0
- package/dist/template/scripts/plan-gate.mjs +515 -0
- package/dist/template/scripts/playground-gate.sh +47 -0
- package/dist/template/scripts/prepare-do-app-spec.d.mts +6 -0
- package/dist/template/scripts/prepare-do-app-spec.mjs +70 -0
- package/dist/template/scripts/public-gates.sh +186 -0
- package/dist/template/scripts/recipe-matrix.sh +141 -0
- package/dist/template/scripts/recipe-update-actions.mjs +157 -0
- package/dist/template/scripts/release-feed.d.mts +49 -0
- package/dist/template/scripts/release-feed.mjs +215 -0
- package/dist/template/scripts/release-history.d.mts +3 -0
- package/dist/template/scripts/release-history.mjs +27 -0
- package/dist/template/scripts/release-packages.d.mts +13 -0
- package/dist/template/scripts/release-packages.mjs +153 -0
- package/dist/template/scripts/release-publication.d.mts +7 -0
- package/dist/template/scripts/release-publication.mjs +58 -0
- package/dist/template/scripts/resolve-append-conflicts.mjs +132 -0
- package/dist/template/scripts/runtime-balanced-sequencer.ts +178 -0
- package/dist/template/scripts/schema-baseline-identity.d.mts +35 -0
- package/dist/template/scripts/schema-baseline-identity.mjs +373 -0
- package/dist/template/scripts/schema-compat-gate.d.mts +44 -0
- package/dist/template/scripts/schema-compat-gate.mjs +264 -0
- package/dist/template/scripts/seo-gate.d.mts +31 -0
- package/dist/template/scripts/seo-gate.mjs +326 -0
- package/dist/template/scripts/standalone-artifact-gate.mjs +163 -0
- package/dist/template/scripts/start-browser-server.mjs +29 -0
- package/dist/template/scripts/start-replit.mjs +16 -0
- package/dist/template/scripts/start.mjs +7 -0
- package/dist/template/scripts/upgrade-gate.sh +134 -0
- package/dist/template/scripts/verify-dependency-attestation.d.mts +13 -0
- package/dist/template/scripts/verify-dependency-attestation.mjs +93 -0
- package/dist/template/scripts/workflow-integrity-gate.d.mts +6 -0
- package/dist/template/scripts/workflow-integrity-gate.mjs +190 -0
- package/dist/template/security/adversarial-audit-2026-10-08.md +111 -0
- package/dist/template/security/client-readiness-audit-2026-09-21.md +273 -0
- package/dist/template/security/dependency-audit-exceptions.json +3 -0
- package/dist/template/security/independent-review-packet.md +369 -0
- package/dist/template/security/project-audit-2026-09-13.md +127 -0
- package/dist/template/seed/README.md +86 -0
- package/dist/template/seed/demo/content.ts +812 -0
- package/dist/template/src/README.md +19 -0
- package/dist/template/src/adapters/agent/index.ts +35 -0
- package/dist/template/src/adapters/agent/pm-brain.ts +125 -0
- package/dist/template/src/adapters/agent/types.ts +39 -0
- package/dist/template/src/adapters/agent/workforce-anthropic.ts +191 -0
- package/dist/template/src/adapters/agent/workforce-openai.ts +182 -0
- package/dist/template/src/adapters/agent/workforce-types.ts +80 -0
- package/dist/template/src/adapters/agent/workforce.ts +93 -0
- package/dist/template/src/adapters/ai/anthropic.ts +176 -0
- package/dist/template/src/adapters/ai/index.ts +41 -0
- package/dist/template/src/adapters/ai/none.ts +14 -0
- package/dist/template/src/adapters/ai/openai.ts +132 -0
- package/dist/template/src/adapters/ai/types.ts +28 -0
- package/dist/template/src/adapters/alt-text/index.ts +77 -0
- package/dist/template/src/adapters/alt-text/openai.ts +143 -0
- package/dist/template/src/adapters/alt-text/types.ts +30 -0
- package/dist/template/src/adapters/calendar/index.ts +12 -0
- package/dist/template/src/adapters/calendar/none.ts +18 -0
- package/dist/template/src/adapters/calendar/types.ts +43 -0
- package/dist/template/src/adapters/carrier/index.ts +12 -0
- package/dist/template/src/adapters/carrier/none.ts +18 -0
- package/dist/template/src/adapters/carrier/types.ts +60 -0
- package/dist/template/src/adapters/git/github.ts +82 -0
- package/dist/template/src/adapters/mail/console.ts +46 -0
- package/dist/template/src/adapters/mail/gmail.ts +44 -0
- package/dist/template/src/adapters/mail/http.ts +88 -0
- package/dist/template/src/adapters/mail/index.ts +255 -0
- package/dist/template/src/adapters/mail/mime.ts +57 -0
- package/dist/template/src/adapters/mail/none.ts +18 -0
- package/dist/template/src/adapters/mail/outlook.ts +71 -0
- package/dist/template/src/adapters/mail/postmark.ts +105 -0
- package/dist/template/src/adapters/mail/resend.ts +86 -0
- package/dist/template/src/adapters/mail/ses.ts +114 -0
- package/dist/template/src/adapters/mail/smtp.ts +85 -0
- package/dist/template/src/adapters/mail/types.ts +79 -0
- package/dist/template/src/adapters/malware/clamav.ts +90 -0
- package/dist/template/src/adapters/malware/index.ts +43 -0
- package/dist/template/src/adapters/malware/none.ts +16 -0
- package/dist/template/src/adapters/malware/types.ts +28 -0
- package/dist/template/src/adapters/notifications/index.ts +27 -0
- package/dist/template/src/adapters/notifications/none.ts +27 -0
- package/dist/template/src/adapters/notifications/types.ts +36 -0
- package/dist/template/src/adapters/payments/currency.ts +50 -0
- package/dist/template/src/adapters/payments/flutterwave.ts +239 -0
- package/dist/template/src/adapters/payments/http.ts +82 -0
- package/dist/template/src/adapters/payments/index.ts +42 -0
- package/dist/template/src/adapters/payments/manual.ts +59 -0
- package/dist/template/src/adapters/payments/mollie.ts +239 -0
- package/dist/template/src/adapters/payments/none.ts +38 -0
- package/dist/template/src/adapters/payments/paypal.ts +518 -0
- package/dist/template/src/adapters/payments/paystack.ts +206 -0
- package/dist/template/src/adapters/payments/provider-helpers.ts +122 -0
- package/dist/template/src/adapters/payments/providers.ts +31 -0
- package/dist/template/src/adapters/payments/razorpay.ts +246 -0
- package/dist/template/src/adapters/payments/square.ts +251 -0
- package/dist/template/src/adapters/payments/stripe.ts +462 -0
- package/dist/template/src/adapters/payments/types.ts +244 -0
- package/dist/template/src/adapters/point-of-sale/index.ts +21 -0
- package/dist/template/src/adapters/point-of-sale/manual.ts +35 -0
- package/dist/template/src/adapters/point-of-sale/none.ts +18 -0
- package/dist/template/src/adapters/point-of-sale/stripe.ts +112 -0
- package/dist/template/src/adapters/point-of-sale/types.ts +43 -0
- package/dist/template/src/adapters/registry.ts +46 -0
- package/dist/template/src/adapters/sms/index.ts +30 -0
- package/dist/template/src/adapters/sms/none.ts +24 -0
- package/dist/template/src/adapters/sms/twilio.ts +410 -0
- package/dist/template/src/adapters/sms/types.ts +140 -0
- package/dist/template/src/adapters/social/factory.ts +370 -0
- package/dist/template/src/adapters/social/http.ts +109 -0
- package/dist/template/src/adapters/social/index.ts +15 -0
- package/dist/template/src/adapters/social/media.ts +53 -0
- package/dist/template/src/adapters/social/networks.ts +174 -0
- package/dist/template/src/adapters/social/none.ts +37 -0
- package/dist/template/src/adapters/social/types.ts +130 -0
- package/dist/template/src/adapters/storage/index.ts +82 -0
- package/dist/template/src/adapters/storage/local.ts +164 -0
- package/dist/template/src/adapters/storage/replit.ts +114 -0
- package/dist/template/src/adapters/storage/s3.ts +298 -0
- package/dist/template/src/adapters/storage/types.ts +138 -0
- package/dist/template/src/adapters/tax/index.ts +10 -0
- package/dist/template/src/adapters/tax/none.ts +14 -0
- package/dist/template/src/adapters/tax/types.ts +60 -0
- package/dist/template/src/adapters/types.ts +60 -0
- package/dist/template/src/core/agents/budget-alerts.ts +73 -0
- package/dist/template/src/core/agents/budget.ts +162 -0
- package/dist/template/src/core/agents/cron.ts +77 -0
- package/dist/template/src/core/agents/envelope.ts +68 -0
- package/dist/template/src/core/agents/execution.ts +639 -0
- package/dist/template/src/core/agents/managed.ts +586 -0
- package/dist/template/src/core/agents/playbook-events.ts +77 -0
- package/dist/template/src/core/agents/playbook-params.ts +121 -0
- package/dist/template/src/core/agents/playbook-schedule.ts +305 -0
- package/dist/template/src/core/agents/playbooks.ts +579 -0
- package/dist/template/src/core/agents/previews.ts +86 -0
- package/dist/template/src/core/agents/pricing.ts +111 -0
- package/dist/template/src/core/agents/schema.ts +329 -0
- package/dist/template/src/core/agents/service.ts +1382 -0
- package/dist/template/src/core/agents/writes.ts +407 -0
- package/dist/template/src/core/api/dispatch.ts +131 -0
- package/dist/template/src/core/api/openapi.ts +246 -0
- package/dist/template/src/core/apikeys/profiles.ts +24 -0
- package/dist/template/src/core/apikeys/schema.ts +87 -0
- package/dist/template/src/core/apikeys/service.ts +245 -0
- package/dist/template/src/core/apikeys/tokens.ts +130 -0
- package/dist/template/src/core/attestations/schema.ts +118 -0
- package/dist/template/src/core/attestations/service.ts +354 -0
- package/dist/template/src/core/auth/bootstrap.ts +22 -0
- package/dist/template/src/core/auth/magic-links/service.ts +272 -0
- package/dist/template/src/core/auth/passwords.ts +52 -0
- package/dist/template/src/core/auth/reset.ts +238 -0
- package/dist/template/src/core/auth/schema.ts +318 -0
- package/dist/template/src/core/auth/service.ts +345 -0
- package/dist/template/src/core/auth/session-management/service.ts +314 -0
- package/dist/template/src/core/auth/sessions.ts +280 -0
- package/dist/template/src/core/auth/two-factor-crypto.ts +172 -0
- package/dist/template/src/core/auth/two-factor.ts +863 -0
- package/dist/template/src/core/automations/core-verbs.ts +86 -0
- package/dist/template/src/core/automations/verbs.ts +121 -0
- package/dist/template/src/core/boot.ts +231 -0
- package/dist/template/src/core/briefing/contributors.ts +288 -0
- package/dist/template/src/core/briefing/playbook-section.ts +136 -0
- package/dist/template/src/core/briefing/registry.ts +155 -0
- package/dist/template/src/core/briefing/schema.ts +124 -0
- package/dist/template/src/core/briefing/service.ts +425 -0
- package/dist/template/src/core/briefing/update.ts +24 -0
- package/dist/template/src/core/catalogue/schema.ts +136 -0
- package/dist/template/src/core/catalogue/service.ts +724 -0
- package/dist/template/src/core/config.test.ts +62 -0
- package/dist/template/src/core/config.ts +69 -0
- package/dist/template/src/core/connections/busy.ts +190 -0
- package/dist/template/src/core/connections/calendar-oauth.ts +323 -0
- package/dist/template/src/core/connections/calendar-providers.ts +352 -0
- package/dist/template/src/core/connections/calendar-sync.ts +558 -0
- package/dist/template/src/core/connections/calendar-write.ts +194 -0
- package/dist/template/src/core/connections/crypto.ts +200 -0
- package/dist/template/src/core/connections/grants.ts +322 -0
- package/dist/template/src/core/connections/mail-import.ts +380 -0
- package/dist/template/src/core/connections/mail-providers.ts +184 -0
- package/dist/template/src/core/connections/mail-read-oauth.ts +296 -0
- package/dist/template/src/core/connections/oauth-core.ts +472 -0
- package/dist/template/src/core/connections/schema.ts +250 -0
- package/dist/template/src/core/connections/service.ts +606 -0
- package/dist/template/src/core/contacts/custom-fields.ts +287 -0
- package/dist/template/src/core/contacts/duplicates.ts +359 -0
- package/dist/template/src/core/contacts/funnel.ts +30 -0
- package/dist/template/src/core/contacts/lifecycle.ts +91 -0
- package/dist/template/src/core/contacts/organizations.ts +214 -0
- package/dist/template/src/core/contacts/relationships.ts +477 -0
- package/dist/template/src/core/contacts/schema.ts +300 -0
- package/dist/template/src/core/contacts/service.ts +1401 -0
- package/dist/template/src/core/contract/json-schema.ts +39 -0
- package/dist/template/src/core/contract/projections.ts +58 -0
- package/dist/template/src/core/contract/sdk.ts +287 -0
- package/dist/template/src/core/contract.ts +20 -0
- package/dist/template/src/core/contribute/deliver.ts +274 -0
- package/dist/template/src/core/contribute/schema.ts +163 -0
- package/dist/template/src/core/contribute/service.ts +1072 -0
- package/dist/template/src/core/dates/cadence.ts +73 -0
- package/dist/template/src/core/db/columns.ts +32 -0
- package/dist/template/src/core/db/errors.ts +66 -0
- package/dist/template/src/core/db/index.ts +90 -0
- package/dist/template/src/core/demo/fixtures.ts +441 -0
- package/dist/template/src/core/demo/handler.ts +89 -0
- package/dist/template/src/core/demo/playground-policy.ts +73 -0
- package/dist/template/src/core/demo/playground.ts +55 -0
- package/dist/template/src/core/demo/schema.ts +135 -0
- package/dist/template/src/core/demo/service.ts +673 -0
- package/dist/template/src/core/design/read.ts +9 -0
- package/dist/template/src/core/design/schema.ts +33 -0
- package/dist/template/src/core/design/service.ts +280 -0
- package/dist/template/src/core/design/theme.ts +45 -0
- package/dist/template/src/core/design/tokens.ts +355 -0
- package/dist/template/src/core/discovery.ts +116 -0
- package/dist/template/src/core/doctor/index.ts +1169 -0
- package/dist/template/src/core/doctor/service.ts +44 -0
- package/dist/template/src/core/entitlements/access.ts +478 -0
- package/dist/template/src/core/entitlements/schema.ts +163 -0
- package/dist/template/src/core/entitlements/service.ts +590 -0
- package/dist/template/src/core/env.test.ts +148 -0
- package/dist/template/src/core/env.ts +442 -0
- package/dist/template/src/core/events/catalogue.ts +61 -0
- package/dist/template/src/core/events/index.ts +138 -0
- package/dist/template/src/core/events/outbox-service.ts +198 -0
- package/dist/template/src/core/events/outbox.ts +474 -0
- package/dist/template/src/core/events/schema.ts +152 -0
- package/dist/template/src/core/events/service.ts +37 -0
- package/dist/template/src/core/funnel/stages.ts +106 -0
- package/dist/template/src/core/guidance/definitions.ts +276 -0
- package/dist/template/src/core/guidance/schema.ts +107 -0
- package/dist/template/src/core/guidance/service.ts +530 -0
- package/dist/template/src/core/http/actor.ts +115 -0
- package/dist/template/src/core/http/body.ts +96 -0
- package/dist/template/src/core/http/cookies.ts +88 -0
- package/dist/template/src/core/http/csp.ts +118 -0
- package/dist/template/src/core/http/csrf.ts +89 -0
- package/dist/template/src/core/http/headers.ts +33 -0
- package/dist/template/src/core/http/inline-json.ts +20 -0
- package/dist/template/src/core/http/pinned-download.ts +118 -0
- package/dist/template/src/core/http/request-metadata.ts +48 -0
- package/dist/template/src/core/http/respond.ts +82 -0
- package/dist/template/src/core/http/route.ts +83 -0
- package/dist/template/src/core/i18n/customer.ts +187 -0
- package/dist/template/src/core/i18n/index.ts +286 -0
- package/dist/template/src/core/i18n/schema.ts +59 -0
- package/dist/template/src/core/i18n/service.ts +339 -0
- package/dist/template/src/core/i18n/zoned.ts +96 -0
- package/dist/template/src/core/ics.ts +260 -0
- package/dist/template/src/core/import/contacts-schema.ts +237 -0
- package/dist/template/src/core/import/contacts-service.ts +923 -0
- package/dist/template/src/core/import/contract.ts +135 -0
- package/dist/template/src/core/import/csv.ts +190 -0
- package/dist/template/src/core/import/parsers.ts +217 -0
- package/dist/template/src/core/import/service.ts +606 -0
- package/dist/template/src/core/import/signup-contact-providers.ts +219 -0
- package/dist/template/src/core/import/signup-contact-service.ts +1077 -0
- package/dist/template/src/core/import/vcard.ts +77 -0
- package/dist/template/src/core/invitations/service.ts +656 -0
- package/dist/template/src/core/jobs/core-jobs.ts +1000 -0
- package/dist/template/src/core/jobs/health.ts +264 -0
- package/dist/template/src/core/jobs/index.ts +926 -0
- package/dist/template/src/core/jobs/schema.ts +111 -0
- package/dist/template/src/core/jobs/service.ts +269 -0
- package/dist/template/src/core/locations/coverage.ts +152 -0
- package/dist/template/src/core/locations/jsonld.ts +155 -0
- package/dist/template/src/core/locations/nap.ts +159 -0
- package/dist/template/src/core/locations/read.ts +15 -0
- package/dist/template/src/core/locations/schema.ts +257 -0
- package/dist/template/src/core/locations/service.ts +667 -0
- package/dist/template/src/core/mail/link-confirmation.ts +31 -0
- package/dist/template/src/core/mail/oauth.ts +351 -0
- package/dist/template/src/core/mail/outbox-crypto.ts +73 -0
- package/dist/template/src/core/mail/route.ts +27 -0
- package/dist/template/src/core/mail/schema.ts +359 -0
- package/dist/template/src/core/mail/service.ts +1407 -0
- package/dist/template/src/core/mail/webhooks.ts +735 -0
- package/dist/template/src/core/manifest.ts +173 -0
- package/dist/template/src/core/media/capture.ts +1191 -0
- package/dist/template/src/core/media/framing.ts +265 -0
- package/dist/template/src/core/media/schema.ts +388 -0
- package/dist/template/src/core/media/service.ts +3321 -0
- package/dist/template/src/core/media/validation.ts +264 -0
- package/dist/template/src/core/media/variants.ts +213 -0
- package/dist/template/src/core/media/watermark.ts +158 -0
- package/dist/template/src/core/messaging/chat-cookie.ts +30 -0
- package/dist/template/src/core/messaging/chat.ts +424 -0
- package/dist/template/src/core/messaging/consent.ts +390 -0
- package/dist/template/src/core/messaging/inbox.ts +602 -0
- package/dist/template/src/core/messaging/keywords.ts +540 -0
- package/dist/template/src/core/messaging/numbers-schema.ts +126 -0
- package/dist/template/src/core/messaging/policy-schema.ts +84 -0
- package/dist/template/src/core/messaging/policy.ts +575 -0
- package/dist/template/src/core/messaging/portal.ts +30 -0
- package/dist/template/src/core/messaging/purpose.ts +12 -0
- package/dist/template/src/core/messaging/registration.ts +235 -0
- package/dist/template/src/core/messaging/schema.ts +433 -0
- package/dist/template/src/core/messaging/service.ts +805 -0
- package/dist/template/src/core/messaging/sms.ts +1052 -0
- package/dist/template/src/core/messaging/webhook-route.ts +118 -0
- package/dist/template/src/core/migrate.ts +57 -0
- package/dist/template/src/core/module.ts +105 -0
- package/dist/template/src/core/notes/schema.ts +140 -0
- package/dist/template/src/core/notes/service.ts +513 -0
- package/dist/template/src/core/notifications/devices.ts +149 -0
- package/dist/template/src/core/notifications/schema.ts +389 -0
- package/dist/template/src/core/notifications/service.ts +1863 -0
- package/dist/template/src/core/onboarding/contract.ts +130 -0
- package/dist/template/src/core/onboarding/index.ts +213 -0
- package/dist/template/src/core/onboarding/registry.ts +295 -0
- package/dist/template/src/core/paywalls/evaluate.ts +266 -0
- package/dist/template/src/core/paywalls/schema.ts +105 -0
- package/dist/template/src/core/paywalls/service.ts +223 -0
- package/dist/template/src/core/platform.ts +19 -0
- package/dist/template/src/core/plugin.ts +68 -0
- package/dist/template/src/core/plugins/integrity.ts +51 -0
- package/dist/template/src/core/plugins/isolate.ts +49 -0
- package/dist/template/src/core/plugins/registry.ts +70 -0
- package/dist/template/src/core/plugins/schema.ts +96 -0
- package/dist/template/src/core/plugins/service.ts +472 -0
- package/dist/template/src/core/plugins/spine.ts +172 -0
- package/dist/template/src/core/portability/archive.ts +77 -0
- package/dist/template/src/core/portability/ownership-export.d.mts +56 -0
- package/dist/template/src/core/portability/ownership-export.mjs +548 -0
- package/dist/template/src/core/portability/service.ts +119 -0
- package/dist/template/src/core/portal/record-service.ts +38 -0
- package/dist/template/src/core/portal/return-path.ts +9 -0
- package/dist/template/src/core/portal/sections.ts +101 -0
- package/dist/template/src/core/portal/service.ts +202 -0
- package/dist/template/src/core/portal/sign-in.ts +30 -0
- package/dist/template/src/core/privacy/media-consent.ts +328 -0
- package/dist/template/src/core/privacy/publish-veto.ts +59 -0
- package/dist/template/src/core/privacy/schema.ts +320 -0
- package/dist/template/src/core/privacy/service.ts +1935 -0
- package/dist/template/src/core/provenance/service.ts +174 -0
- package/dist/template/src/core/recipes.ts +15 -0
- package/dist/template/src/core/reporting/csv.ts +102 -0
- package/dist/template/src/core/reporting/dimensions.ts +114 -0
- package/dist/template/src/core/retention/apply.ts +47 -0
- package/dist/template/src/core/retention/holds.ts +45 -0
- package/dist/template/src/core/retention/registry.ts +190 -0
- package/dist/template/src/core/retention/schema.ts +34 -0
- package/dist/template/src/core/retention/service.ts +109 -0
- package/dist/template/src/core/retention/sources.ts +42 -0
- package/dist/template/src/core/rewards/issue.ts +100 -0
- package/dist/template/src/core/roles/defaults.ts +161 -0
- package/dist/template/src/core/roles/service.ts +375 -0
- package/dist/template/src/core/runs/schema.ts +290 -0
- package/dist/template/src/core/runs/spine.ts +72 -0
- package/dist/template/src/core/runtime/shutdown.ts +55 -0
- package/dist/template/src/core/runtime.ts +45 -0
- package/dist/template/src/core/scheduling/audience-schema.ts +179 -0
- package/dist/template/src/core/scheduling/audiences.ts +504 -0
- package/dist/template/src/core/scheduling/availability-service.ts +354 -0
- package/dist/template/src/core/scheduling/availability.ts +213 -0
- package/dist/template/src/core/scheduling/bookings.ts +1252 -0
- package/dist/template/src/core/scheduling/funnel.ts +30 -0
- package/dist/template/src/core/scheduling/ics-service.ts +355 -0
- package/dist/template/src/core/scheduling/policy.ts +253 -0
- package/dist/template/src/core/scheduling/portal.ts +50 -0
- package/dist/template/src/core/scheduling/reminders.ts +352 -0
- package/dist/template/src/core/scheduling/requirements.ts +307 -0
- package/dist/template/src/core/scheduling/resolver-service.ts +206 -0
- package/dist/template/src/core/scheduling/resolver.ts +564 -0
- package/dist/template/src/core/scheduling/schema.ts +618 -0
- package/dist/template/src/core/scheduling/service.ts +474 -0
- package/dist/template/src/core/scheduling/waitlist.ts +678 -0
- package/dist/template/src/core/scheduling/writeback.ts +213 -0
- package/dist/template/src/core/scoring/schema.ts +147 -0
- package/dist/template/src/core/scoring/service.ts +602 -0
- package/dist/template/src/core/search/registry.ts +155 -0
- package/dist/template/src/core/search/service.ts +81 -0
- package/dist/template/src/core/search/sources.ts +195 -0
- package/dist/template/src/core/security/csp-reports.ts +256 -0
- package/dist/template/src/core/security/rate-limit.ts +117 -0
- package/dist/template/src/core/security/schema.ts +60 -0
- package/dist/template/src/core/segments/fields.ts +376 -0
- package/dist/template/src/core/segments/schema.ts +112 -0
- package/dist/template/src/core/segments/service.ts +731 -0
- package/dist/template/src/core/seo/classify.ts +56 -0
- package/dist/template/src/core/seo/entities.ts +61 -0
- package/dist/template/src/core/seo/feeds.ts +77 -0
- package/dist/template/src/core/seo/indexnow.ts +110 -0
- package/dist/template/src/core/seo/jsonld.ts +307 -0
- package/dist/template/src/core/seo/meta.ts +84 -0
- package/dist/template/src/core/seo/origin.ts +55 -0
- package/dist/template/src/core/seo/schema.ts +41 -0
- package/dist/template/src/core/seo/service.ts +171 -0
- package/dist/template/src/core/seo/sitemap.ts +185 -0
- package/dist/template/src/core/service.ts +747 -0
- package/dist/template/src/core/services.ts +242 -0
- package/dist/template/src/core/settings/defaults.ts +129 -0
- package/dist/template/src/core/settings/read.ts +24 -0
- package/dist/template/src/core/settings/schema.ts +81 -0
- package/dist/template/src/core/settings/service.ts +407 -0
- package/dist/template/src/core/settings/setup.ts +41 -0
- package/dist/template/src/core/spine/facts.ts +141 -0
- package/dist/template/src/core/subjects.ts +95 -0
- package/dist/template/src/core/tables.ts +180 -0
- package/dist/template/src/core/tasks/schema.ts +174 -0
- package/dist/template/src/core/tasks/service.ts +634 -0
- package/dist/template/src/core/trash.ts +278 -0
- package/dist/template/src/core/update/apply.ts +58 -0
- package/dist/template/src/core/update/catalog.ts +222 -0
- package/dist/template/src/core/update/channels.ts +39 -0
- package/dist/template/src/core/update/check.ts +107 -0
- package/dist/template/src/core/update/escalate-job.ts +111 -0
- package/dist/template/src/core/update/escalation.ts +131 -0
- package/dist/template/src/core/update/feed.ts +80 -0
- package/dist/template/src/core/update/fork-delivery.ts +102 -0
- package/dist/template/src/core/update/fork-merge.ts +195 -0
- package/dist/template/src/core/update/fork.ts +217 -0
- package/dist/template/src/core/update/host.ts +59 -0
- package/dist/template/src/core/update/integrity.ts +118 -0
- package/dist/template/src/core/update/keys.ts +29 -0
- package/dist/template/src/core/update/policy.ts +111 -0
- package/dist/template/src/core/update/preflight.ts +258 -0
- package/dist/template/src/core/update/release-declaration.json +19 -0
- package/dist/template/src/core/update/release-validation.d.mts +5 -0
- package/dist/template/src/core/update/release-validation.mjs +29 -0
- package/dist/template/src/core/update/release-version.d.mts +4 -0
- package/dist/template/src/core/update/release-version.mjs +36 -0
- package/dist/template/src/core/update/release.ts +97 -0
- package/dist/template/src/core/update/schema.ts +172 -0
- package/dist/template/src/core/update/seams.ts +70 -0
- package/dist/template/src/core/update/service.ts +1075 -0
- package/dist/template/src/core/update/targets.ts +425 -0
- package/dist/template/src/core/update/this-release.ts +12 -0
- package/dist/template/src/core/update/trusted-release-keys.json +7 -0
- package/dist/template/src/core/views/entities.ts +48 -0
- package/dist/template/src/core/views/registry.ts +121 -0
- package/dist/template/src/core/views/schema.ts +82 -0
- package/dist/template/src/core/views/service.ts +388 -0
- package/dist/template/src/core/webhooks/address.ts +57 -0
- package/dist/template/src/core/webhooks/deliver.ts +255 -0
- package/dist/template/src/core/webhooks/schema.ts +128 -0
- package/dist/template/src/core/webhooks/service.ts +532 -0
- package/dist/template/src/core/webhooks/sign.ts +169 -0
- package/dist/template/src/core/webhooks/transport.ts +180 -0
- package/dist/template/src/mcp/server.ts +372 -0
- package/dist/template/src/mcp/tools.ts +182 -0
- package/dist/template/src/modules/ads/AdBeacon.tsx +76 -0
- package/dist/template/src/modules/ads/ThirdPartyConsent.tsx +45 -0
- package/dist/template/src/modules/ads/ads-txt.ts +60 -0
- package/dist/template/src/modules/ads/blocks.tsx +246 -0
- package/dist/template/src/modules/ads/clicks.ts +162 -0
- package/dist/template/src/modules/ads/jobs.ts +17 -0
- package/dist/template/src/modules/ads/manifest.ts +48 -0
- package/dist/template/src/modules/ads/pacing.ts +47 -0
- package/dist/template/src/modules/ads/schema.ts +360 -0
- package/dist/template/src/modules/ads/select.ts +235 -0
- package/dist/template/src/modules/ads/service.ts +2082 -0
- package/dist/template/src/modules/ads/stats.ts +209 -0
- package/dist/template/src/modules/ads/tables.ts +13 -0
- package/dist/template/src/modules/ads/tags.ts +98 -0
- package/dist/template/src/modules/ads/targeting.ts +0 -0
- package/dist/template/src/modules/ads/viewability.ts +39 -0
- package/dist/template/src/modules/analytics/classify.ts +128 -0
- package/dist/template/src/modules/analytics/experiments.ts +197 -0
- package/dist/template/src/modules/analytics/funnel-service.ts +201 -0
- package/dist/template/src/modules/analytics/funnel.ts +40 -0
- package/dist/template/src/modules/analytics/manifest.ts +37 -0
- package/dist/template/src/modules/analytics/read.ts +17 -0
- package/dist/template/src/modules/analytics/schema.ts +142 -0
- package/dist/template/src/modules/analytics/service.ts +1380 -0
- package/dist/template/src/modules/analytics/settings.ts +44 -0
- package/dist/template/src/modules/analytics/tables.ts +4 -0
- package/dist/template/src/modules/analytics/visitor.ts +91 -0
- package/dist/template/src/modules/assessments/block.tsx +200 -0
- package/dist/template/src/modules/assessments/blocks.ts +11 -0
- package/dist/template/src/modules/assessments/manifest.ts +27 -0
- package/dist/template/src/modules/assessments/onboarding.ts +45 -0
- package/dist/template/src/modules/assessments/questions.ts +134 -0
- package/dist/template/src/modules/assessments/schema.ts +201 -0
- package/dist/template/src/modules/assessments/scoring.ts +99 -0
- package/dist/template/src/modules/assessments/service.ts +1225 -0
- package/dist/template/src/modules/assessments/tables.ts +9 -0
- package/dist/template/src/modules/assistant/actions.ts +191 -0
- package/dist/template/src/modules/assistant/contract.ts +48 -0
- package/dist/template/src/modules/assistant/corpus.ts +137 -0
- package/dist/template/src/modules/assistant/embed.ts +40 -0
- package/dist/template/src/modules/assistant/guardrails.ts +220 -0
- package/dist/template/src/modules/assistant/jobs.ts +17 -0
- package/dist/template/src/modules/assistant/limits.ts +219 -0
- package/dist/template/src/modules/assistant/manifest.ts +43 -0
- package/dist/template/src/modules/assistant/prompt.ts +168 -0
- package/dist/template/src/modules/assistant/provider.ts +100 -0
- package/dist/template/src/modules/assistant/retrieve.ts +67 -0
- package/dist/template/src/modules/assistant/schema.ts +336 -0
- package/dist/template/src/modules/assistant/service.ts +1276 -0
- package/dist/template/src/modules/assistant/tables.ts +11 -0
- package/dist/template/src/modules/assistant/text.ts +42 -0
- package/dist/template/src/modules/automations/engine.ts +350 -0
- package/dist/template/src/modules/automations/graph.ts +325 -0
- package/dist/template/src/modules/automations/guardrail-service.ts +68 -0
- package/dist/template/src/modules/automations/guardrails.ts +211 -0
- package/dist/template/src/modules/automations/manifest.ts +37 -0
- package/dist/template/src/modules/automations/runtime.ts +771 -0
- package/dist/template/src/modules/automations/schema.ts +192 -0
- package/dist/template/src/modules/automations/service.ts +584 -0
- package/dist/template/src/modules/automations/tables.ts +8 -0
- package/dist/template/src/modules/builder/code-delivery.ts +131 -0
- package/dist/template/src/modules/builder/code-gates.ts +374 -0
- package/dist/template/src/modules/builder/code-service.ts +508 -0
- package/dist/template/src/modules/builder/manifest.ts +14 -0
- package/dist/template/src/modules/builder/schema.ts +135 -0
- package/dist/template/src/modules/builder/service.ts +758 -0
- package/dist/template/src/modules/builder/tables.ts +3 -0
- package/dist/template/src/modules/calculators/formula.ts +197 -0
- package/dist/template/src/modules/calculators/manifest.ts +19 -0
- package/dist/template/src/modules/calculators/schema.ts +65 -0
- package/dist/template/src/modules/calculators/service.ts +455 -0
- package/dist/template/src/modules/calculators/tables.ts +4 -0
- package/dist/template/src/modules/catalog/browse.ts +835 -0
- package/dist/template/src/modules/catalog/cart-access.ts +37 -0
- package/dist/template/src/modules/catalog/cart.ts +1066 -0
- package/dist/template/src/modules/catalog/checkout-policy.ts +80 -0
- package/dist/template/src/modules/catalog/collections.ts +856 -0
- package/dist/template/src/modules/catalog/contract.ts +180 -0
- package/dist/template/src/modules/catalog/cookies.ts +14 -0
- package/dist/template/src/modules/catalog/demo.ts +108 -0
- package/dist/template/src/modules/catalog/fulfillment.ts +978 -0
- package/dist/template/src/modules/catalog/funnel.ts +46 -0
- package/dist/template/src/modules/catalog/inventory.ts +900 -0
- package/dist/template/src/modules/catalog/jobs.ts +74 -0
- package/dist/template/src/modules/catalog/manifest.ts +76 -0
- package/dist/template/src/modules/catalog/merchandising.ts +529 -0
- package/dist/template/src/modules/catalog/offerings.ts +735 -0
- package/dist/template/src/modules/catalog/onboarding.ts +33 -0
- package/dist/template/src/modules/catalog/orders.ts +698 -0
- package/dist/template/src/modules/catalog/portal.ts +36 -0
- package/dist/template/src/modules/catalog/price-breaks.ts +144 -0
- package/dist/template/src/modules/catalog/pricing.ts +590 -0
- package/dist/template/src/modules/catalog/procurement.ts +689 -0
- package/dist/template/src/modules/catalog/promo-quote.ts +53 -0
- package/dist/template/src/modules/catalog/promotions.ts +784 -0
- package/dist/template/src/modules/catalog/public-booking.ts +132 -0
- package/dist/template/src/modules/catalog/public-pages.ts +173 -0
- package/dist/template/src/modules/catalog/relations.ts +430 -0
- package/dist/template/src/modules/catalog/reporting.ts +66 -0
- package/dist/template/src/modules/catalog/reward-issuer.ts +73 -0
- package/dist/template/src/modules/catalog/schema.ts +1672 -0
- package/dist/template/src/modules/catalog/segment-fields.ts +52 -0
- package/dist/template/src/modules/catalog/service.ts +1055 -0
- package/dist/template/src/modules/catalog/shipping-quote.ts +205 -0
- package/dist/template/src/modules/catalog/shipping.ts +324 -0
- package/dist/template/src/modules/catalog/storefront.ts +524 -0
- package/dist/template/src/modules/catalog/tables.ts +57 -0
- package/dist/template/src/modules/catalog/tokens.ts +26 -0
- package/dist/template/src/modules/catalog/variants.ts +581 -0
- package/dist/template/src/modules/cms/a11y-hints.ts +258 -0
- package/dist/template/src/modules/cms/blocks/SiteChatClient.tsx +233 -0
- package/dist/template/src/modules/cms/blocks/edit.ts +295 -0
- package/dist/template/src/modules/cms/blocks/fields.ts +208 -0
- package/dist/template/src/modules/cms/blocks/help.tsx +241 -0
- package/dist/template/src/modules/cms/blocks/html.ts +84 -0
- package/dist/template/src/modules/cms/blocks/library.tsx +1226 -0
- package/dist/template/src/modules/cms/blocks/merchandising.tsx +721 -0
- package/dist/template/src/modules/cms/blocks/move.ts +115 -0
- package/dist/template/src/modules/cms/blocks/registry.ts +296 -0
- package/dist/template/src/modules/cms/blocks/rich-render.tsx +44 -0
- package/dist/template/src/modules/cms/blocks/rich.ts +312 -0
- package/dist/template/src/modules/cms/blocks/social.ts +38 -0
- package/dist/template/src/modules/cms/blocks/store-sections.tsx +465 -0
- package/dist/template/src/modules/cms/blocks/surfaces.tsx +1031 -0
- package/dist/template/src/modules/cms/blocks/types.ts +241 -0
- package/dist/template/src/modules/cms/blog.tsx +51 -0
- package/dist/template/src/modules/cms/budgets.ts +52 -0
- package/dist/template/src/modules/cms/cache.ts +49 -0
- package/dist/template/src/modules/cms/chrome-nav.ts +53 -0
- package/dist/template/src/modules/cms/collaboration.ts +433 -0
- package/dist/template/src/modules/cms/defaults.ts +110 -0
- package/dist/template/src/modules/cms/email-render.ts +161 -0
- package/dist/template/src/modules/cms/email-service.ts +112 -0
- package/dist/template/src/modules/cms/experiments.ts +108 -0
- package/dist/template/src/modules/cms/help-service.ts +417 -0
- package/dist/template/src/modules/cms/history.ts +106 -0
- package/dist/template/src/modules/cms/inbound.ts +106 -0
- package/dist/template/src/modules/cms/jobs.ts +28 -0
- package/dist/template/src/modules/cms/layout-service.ts +327 -0
- package/dist/template/src/modules/cms/lifecycle.ts +780 -0
- package/dist/template/src/modules/cms/locations.ts +288 -0
- package/dist/template/src/modules/cms/manifest.ts +76 -0
- package/dist/template/src/modules/cms/onboarding.ts +53 -0
- package/dist/template/src/modules/cms/read.ts +27 -0
- package/dist/template/src/modules/cms/render.tsx +135 -0
- package/dist/template/src/modules/cms/schema.ts +387 -0
- package/dist/template/src/modules/cms/section-instances.ts +96 -0
- package/dist/template/src/modules/cms/section-service.ts +263 -0
- package/dist/template/src/modules/cms/service.ts +1815 -0
- package/dist/template/src/modules/cms/sms-template-service.ts +273 -0
- package/dist/template/src/modules/cms/tables.ts +14 -0
- package/dist/template/src/modules/cms/template-service.ts +374 -0
- package/dist/template/src/modules/cms/templates.ts +320 -0
- package/dist/template/src/modules/cms/translate.ts +212 -0
- package/dist/template/src/modules/cms/translation-workflow.ts +235 -0
- package/dist/template/src/modules/contracts/manifest.ts +27 -0
- package/dist/template/src/modules/contracts/portal.ts +27 -0
- package/dist/template/src/modules/contracts/schema.ts +174 -0
- package/dist/template/src/modules/contracts/service.ts +608 -0
- package/dist/template/src/modules/contracts/tables.ts +3 -0
- package/dist/template/src/modules/contracts/template-service.ts +458 -0
- package/dist/template/src/modules/contracts/templates.ts +83 -0
- package/dist/template/src/modules/crm/manifest.ts +30 -0
- package/dist/template/src/modules/crm/schema.ts +209 -0
- package/dist/template/src/modules/crm/service.ts +918 -0
- package/dist/template/src/modules/crm/tables.ts +3 -0
- package/dist/template/src/modules/documents/manifest.ts +29 -0
- package/dist/template/src/modules/documents/portal.ts +41 -0
- package/dist/template/src/modules/documents/schema.ts +243 -0
- package/dist/template/src/modules/documents/service.ts +879 -0
- package/dist/template/src/modules/documents/tables.ts +9 -0
- package/dist/template/src/modules/documents/tokens.ts +33 -0
- package/dist/template/src/modules/events/blocks.tsx +82 -0
- package/dist/template/src/modules/events/ics.ts +47 -0
- package/dist/template/src/modules/events/manifest.ts +26 -0
- package/dist/template/src/modules/events/onboarding.ts +47 -0
- package/dist/template/src/modules/events/public-pages.ts +140 -0
- package/dist/template/src/modules/events/schema.ts +149 -0
- package/dist/template/src/modules/events/service.ts +907 -0
- package/dist/template/src/modules/events/tables.ts +3 -0
- package/dist/template/src/modules/forms/antispam.ts +163 -0
- package/dist/template/src/modules/forms/block.tsx +275 -0
- package/dist/template/src/modules/forms/blocks.ts +11 -0
- package/dist/template/src/modules/forms/briefing.ts +92 -0
- package/dist/template/src/modules/forms/fieldKey.ts +43 -0
- package/dist/template/src/modules/forms/fields.ts +165 -0
- package/dist/template/src/modules/forms/manifest.ts +46 -0
- package/dist/template/src/modules/forms/onboarding.ts +53 -0
- package/dist/template/src/modules/forms/schema.ts +97 -0
- package/dist/template/src/modules/forms/service.ts +905 -0
- package/dist/template/src/modules/forms/tables.ts +4 -0
- package/dist/template/src/modules/galleries/archive.ts +181 -0
- package/dist/template/src/modules/galleries/cookies.ts +24 -0
- package/dist/template/src/modules/galleries/demo.ts +105 -0
- package/dist/template/src/modules/galleries/jobs.ts +49 -0
- package/dist/template/src/modules/galleries/manifest.ts +33 -0
- package/dist/template/src/modules/galleries/onboarding.ts +33 -0
- package/dist/template/src/modules/galleries/schema.ts +442 -0
- package/dist/template/src/modules/galleries/service.ts +2970 -0
- package/dist/template/src/modules/galleries/tables.ts +13 -0
- package/dist/template/src/modules/galleries/tokens.ts +30 -0
- package/dist/template/src/modules/index.ts +96 -0
- package/dist/template/src/modules/invoicing/advanced-money-service.ts +1071 -0
- package/dist/template/src/modules/invoicing/briefing.ts +73 -0
- package/dist/template/src/modules/invoicing/checkout-requirements.ts +19 -0
- package/dist/template/src/modules/invoicing/contract.ts +541 -0
- package/dist/template/src/modules/invoicing/customer-service.ts +336 -0
- package/dist/template/src/modules/invoicing/customer-tokens.ts +43 -0
- package/dist/template/src/modules/invoicing/demo.ts +114 -0
- package/dist/template/src/modules/invoicing/funnel.ts +67 -0
- package/dist/template/src/modules/invoicing/invoice-service.ts +1467 -0
- package/dist/template/src/modules/invoicing/manifest.ts +58 -0
- package/dist/template/src/modules/invoicing/money.ts +88 -0
- package/dist/template/src/modules/invoicing/onboarding.ts +33 -0
- package/dist/template/src/modules/invoicing/payment-plan-ledger.ts +115 -0
- package/dist/template/src/modules/invoicing/payment-provider-service.ts +873 -0
- package/dist/template/src/modules/invoicing/payment-webhook-route.ts +53 -0
- package/dist/template/src/modules/invoicing/portal.ts +29 -0
- package/dist/template/src/modules/invoicing/pos-service.ts +275 -0
- package/dist/template/src/modules/invoicing/recurring-schema.ts +125 -0
- package/dist/template/src/modules/invoicing/recurring-service.ts +608 -0
- package/dist/template/src/modules/invoicing/reporting.ts +39 -0
- package/dist/template/src/modules/invoicing/schema.ts +862 -0
- package/dist/template/src/modules/invoicing/service.ts +37 -0
- package/dist/template/src/modules/invoicing/tables.ts +33 -0
- package/dist/template/src/modules/invoicing/tax-engine.ts +214 -0
- package/dist/template/src/modules/invoicing/tax-service.ts +716 -0
- package/dist/template/src/modules/invoicing/tax-templates.ts +316 -0
- package/dist/template/src/modules/local-plugins.ts +15 -0
- package/dist/template/src/modules/loyalty/jobs.ts +224 -0
- package/dist/template/src/modules/loyalty/manifest.ts +58 -0
- package/dist/template/src/modules/loyalty/rewards-service.ts +607 -0
- package/dist/template/src/modules/loyalty/schema.ts +333 -0
- package/dist/template/src/modules/loyalty/service.ts +922 -0
- package/dist/template/src/modules/loyalty/spine.ts +97 -0
- package/dist/template/src/modules/loyalty/tables.ts +12 -0
- package/dist/template/src/modules/newsletters/blocks.tsx +128 -0
- package/dist/template/src/modules/newsletters/broadcast-schema.ts +166 -0
- package/dist/template/src/modules/newsletters/broadcast-service.ts +806 -0
- package/dist/template/src/modules/newsletters/jobs.ts +29 -0
- package/dist/template/src/modules/newsletters/manifest.ts +39 -0
- package/dist/template/src/modules/newsletters/public-pages.ts +128 -0
- package/dist/template/src/modules/newsletters/schema.ts +134 -0
- package/dist/template/src/modules/newsletters/service.ts +708 -0
- package/dist/template/src/modules/newsletters/tables.ts +9 -0
- package/dist/template/src/modules/newsletters/template-schema.ts +92 -0
- package/dist/template/src/modules/newsletters/template-service.ts +368 -0
- package/dist/template/src/modules/popups/PopupSurface.tsx +401 -0
- package/dist/template/src/modules/popups/http.ts +26 -0
- package/dist/template/src/modules/popups/manifest.ts +42 -0
- package/dist/template/src/modules/popups/mount.tsx +89 -0
- package/dist/template/src/modules/popups/schema.ts +252 -0
- package/dist/template/src/modules/popups/service.ts +948 -0
- package/dist/template/src/modules/popups/tables.ts +4 -0
- package/dist/template/src/modules/popups/tally.ts +194 -0
- package/dist/template/src/modules/popups/targeting.ts +206 -0
- package/dist/template/src/modules/projects/blocks.tsx +444 -0
- package/dist/template/src/modules/projects/consent-gate.ts +104 -0
- package/dist/template/src/modules/projects/jobs.ts +24 -0
- package/dist/template/src/modules/projects/manifest.ts +33 -0
- package/dist/template/src/modules/projects/portal.ts +32 -0
- package/dist/template/src/modules/projects/portfolio-service.ts +712 -0
- package/dist/template/src/modules/projects/publishing-service.ts +782 -0
- package/dist/template/src/modules/projects/schema.ts +437 -0
- package/dist/template/src/modules/projects/service.ts +1055 -0
- package/dist/template/src/modules/projects/tables.ts +12 -0
- package/dist/template/src/modules/projects/time-schema.ts +166 -0
- package/dist/template/src/modules/projects/time-service.ts +631 -0
- package/dist/template/src/modules/proof/blocks.tsx +34 -0
- package/dist/template/src/modules/proof/manifest.ts +24 -0
- package/dist/template/src/modules/proof/schema.ts +21 -0
- package/dist/template/src/modules/proof/seed.ts +11 -0
- package/dist/template/src/modules/proof/service.ts +74 -0
- package/dist/template/src/modules/proof/tables.ts +3 -0
- package/dist/template/src/modules/quotes/conversion.ts +425 -0
- package/dist/template/src/modules/quotes/cookies.ts +9 -0
- package/dist/template/src/modules/quotes/demo.ts +99 -0
- package/dist/template/src/modules/quotes/funnel.ts +44 -0
- package/dist/template/src/modules/quotes/manifest.ts +34 -0
- package/dist/template/src/modules/quotes/onboarding.ts +33 -0
- package/dist/template/src/modules/quotes/portal.ts +46 -0
- package/dist/template/src/modules/quotes/schema.ts +250 -0
- package/dist/template/src/modules/quotes/service.ts +1554 -0
- package/dist/template/src/modules/quotes/tables.ts +9 -0
- package/dist/template/src/modules/quotes/tokens.ts +28 -0
- package/dist/template/src/modules/quotes/view-entity.ts +20 -0
- package/dist/template/src/modules/referrals/attribution-service.ts +134 -0
- package/dist/template/src/modules/referrals/attribution.ts +99 -0
- package/dist/template/src/modules/referrals/commission-service.ts +1114 -0
- package/dist/template/src/modules/referrals/commission.ts +150 -0
- package/dist/template/src/modules/referrals/jobs.ts +32 -0
- package/dist/template/src/modules/referrals/manifest.ts +53 -0
- package/dist/template/src/modules/referrals/portal.ts +37 -0
- package/dist/template/src/modules/referrals/schema.ts +421 -0
- package/dist/template/src/modules/referrals/service.ts +619 -0
- package/dist/template/src/modules/referrals/spine.ts +92 -0
- package/dist/template/src/modules/referrals/tables.ts +13 -0
- package/dist/template/src/modules/referrals/tokens.ts +28 -0
- package/dist/template/src/modules/rentals/manifest.ts +26 -0
- package/dist/template/src/modules/rentals/portal.ts +34 -0
- package/dist/template/src/modules/rentals/pricing.ts +150 -0
- package/dist/template/src/modules/rentals/schema.ts +210 -0
- package/dist/template/src/modules/rentals/service.ts +759 -0
- package/dist/template/src/modules/rentals/tables.ts +3 -0
- package/dist/template/src/modules/reporting/demo.ts +88 -0
- package/dist/template/src/modules/reporting/export-schema.ts +319 -0
- package/dist/template/src/modules/reporting/export-service.ts +1224 -0
- package/dist/template/src/modules/reporting/export-shapes.ts +429 -0
- package/dist/template/src/modules/reporting/export-tokens.ts +23 -0
- package/dist/template/src/modules/reporting/jobs.ts +117 -0
- package/dist/template/src/modules/reporting/manifest.ts +34 -0
- package/dist/template/src/modules/reporting/onboarding.ts +33 -0
- package/dist/template/src/modules/reporting/schema.ts +48 -0
- package/dist/template/src/modules/reporting/service.ts +540 -0
- package/dist/template/src/modules/reporting/tables.ts +4 -0
- package/dist/template/src/modules/reviews/blocks.tsx +97 -0
- package/dist/template/src/modules/reviews/manifest.ts +26 -0
- package/dist/template/src/modules/reviews/schema.ts +182 -0
- package/dist/template/src/modules/reviews/service.ts +663 -0
- package/dist/template/src/modules/reviews/tables.ts +3 -0
- package/dist/template/src/modules/reviews/tokens.ts +22 -0
- package/dist/template/src/modules/seed/boot.ts +94 -0
- package/dist/template/src/modules/seed/manifest.ts +24 -0
- package/dist/template/src/modules/seed/onboarding.ts +276 -0
- package/dist/template/src/modules/seed/preset-install.ts +181 -0
- package/dist/template/src/modules/seed/service.ts +260 -0
- package/dist/template/src/modules/share/embeds.ts +54 -0
- package/dist/template/src/modules/share/intents.ts +126 -0
- package/dist/template/src/modules/share/links.ts +164 -0
- package/dist/template/src/modules/share/manifest.ts +34 -0
- package/dist/template/src/modules/share/schema.ts +130 -0
- package/dist/template/src/modules/share/service.ts +697 -0
- package/dist/template/src/modules/share/tables.ts +4 -0
- package/dist/template/src/modules/social/capabilities.ts +71 -0
- package/dist/template/src/modules/social/compose.ts +825 -0
- package/dist/template/src/modules/social/contract.ts +59 -0
- package/dist/template/src/modules/social/gbp.ts +570 -0
- package/dist/template/src/modules/social/ingest.ts +727 -0
- package/dist/template/src/modules/social/jobs.ts +125 -0
- package/dist/template/src/modules/social/manifest.ts +34 -0
- package/dist/template/src/modules/social/oauth.ts +300 -0
- package/dist/template/src/modules/social/onboarding.ts +45 -0
- package/dist/template/src/modules/social/policy.ts +48 -0
- package/dist/template/src/modules/social/render.ts +135 -0
- package/dist/template/src/modules/social/schema.ts +322 -0
- package/dist/template/src/modules/social/service.ts +660 -0
- package/dist/template/src/modules/social/tables.ts +13 -0
- package/dist/template/src/modules/subscriptions/billing.ts +1042 -0
- package/dist/template/src/modules/subscriptions/jobs.ts +52 -0
- package/dist/template/src/modules/subscriptions/manifest.ts +34 -0
- package/dist/template/src/modules/subscriptions/portal.ts +34 -0
- package/dist/template/src/modules/subscriptions/public-signup.ts +124 -0
- package/dist/template/src/modules/subscriptions/schema.ts +294 -0
- package/dist/template/src/modules/subscriptions/service.ts +1659 -0
- package/dist/template/src/modules/subscriptions/tables.ts +3 -0
- package/dist/template/src/ui/GuidancePanel.tsx +200 -0
- package/dist/template/src/ui/ShareCopyButton.tsx +28 -0
- package/dist/template/src/ui/SkipLink.tsx +21 -0
- package/dist/template/src/ui/ThemeToggle.tsx +79 -0
- package/dist/template/src/ui/primitives.tsx +269 -0
- package/dist/template/tests/README.md +5 -0
- package/dist/template/tests/adapters/social-conformance.test.ts +71 -0
- package/dist/template/tests/browser/accessibility.spec.ts +793 -0
- package/dist/template/tests/browser/agent-launch.spec.ts +110 -0
- package/dist/template/tests/browser/assessments.spec.ts +188 -0
- package/dist/template/tests/browser/c11-01-visitor-to-paid.spec.ts +281 -0
- package/dist/template/tests/browser/c11-04-capture.spec.ts +80 -0
- package/dist/template/tests/browser/calculators.spec.ts +196 -0
- package/dist/template/tests/browser/cart-access.spec.ts +42 -0
- package/dist/template/tests/browser/customer-surfaces.spec.ts +115 -0
- package/dist/template/tests/browser/database.ts +60 -0
- package/dist/template/tests/browser/demo-scenarios.spec.ts +117 -0
- package/dist/template/tests/browser/editor-drag-drop.spec.ts +259 -0
- package/dist/template/tests/browser/editor-inline-editing.spec.ts +186 -0
- package/dist/template/tests/browser/editor-media-tools.spec.ts +231 -0
- package/dist/template/tests/browser/editor-store-sections.spec.ts +391 -0
- package/dist/template/tests/browser/events.spec.ts +195 -0
- package/dist/template/tests/browser/facts.spec.ts +140 -0
- package/dist/template/tests/browser/first-party-plugins.spec.ts +161 -0
- package/dist/template/tests/browser/guidance.spec.ts +148 -0
- package/dist/template/tests/browser/journeys.spec.ts +662 -0
- package/dist/template/tests/browser/location-access.spec.ts +59 -0
- package/dist/template/tests/browser/media-consent.spec.ts +93 -0
- package/dist/template/tests/browser/owner-session.ts +53 -0
- package/dist/template/tests/browser/playground.spec.ts +151 -0
- package/dist/template/tests/browser/provider-erasure.spec.ts +50 -0
- package/dist/template/tests/browser/record-search.spec.ts +107 -0
- package/dist/template/tests/browser/record-trash.spec.ts +127 -0
- package/dist/template/tests/browser/storefront-checkout.spec.ts +272 -0
- package/dist/template/tests/browser/storefront-merch-blocks.spec.ts +319 -0
- package/dist/template/tests/browser/workflow-search.spec.ts +53 -0
- package/dist/template/tests/core/a11y-smoke.test.ts +92 -0
- package/dist/template/tests/core/admin-journey-screens.test.ts +143 -0
- package/dist/template/tests/core/advanced-money.test.ts +232 -0
- package/dist/template/tests/core/adversarial-gallery-privacy.test.ts +185 -0
- package/dist/template/tests/core/adversarial-portal-privacy.test.ts +93 -0
- package/dist/template/tests/core/agent-launch.test.ts +74 -0
- package/dist/template/tests/core/agents-approvals.test.ts +168 -0
- package/dist/template/tests/core/agents-autonomy.test.ts +364 -0
- package/dist/template/tests/core/agents-board.test.ts +111 -0
- package/dist/template/tests/core/agents-budgets.test.ts +329 -0
- package/dist/template/tests/core/agents-inbound.test.ts +535 -0
- package/dist/template/tests/core/agents-injection.test.ts +351 -0
- package/dist/template/tests/core/agents-managed-loop.test.ts +261 -0
- package/dist/template/tests/core/agents-pause.test.ts +183 -0
- package/dist/template/tests/core/agents-playbooks.test.ts +285 -0
- package/dist/template/tests/core/agents-run.test.ts +119 -0
- package/dist/template/tests/core/agents-schedule.test.ts +231 -0
- package/dist/template/tests/core/agents-workforce-adapter.test.ts +359 -0
- package/dist/template/tests/core/agents.test.ts +436 -0
- package/dist/template/tests/core/alt-text-adapter.test.ts +97 -0
- package/dist/template/tests/core/analytics-consent.test.ts +272 -0
- package/dist/template/tests/core/analytics-experiments.test.ts +63 -0
- package/dist/template/tests/core/analytics-governance-migration.test.ts +28 -0
- package/dist/template/tests/core/analytics.test.ts +660 -0
- package/dist/template/tests/core/api.test.ts +338 -0
- package/dist/template/tests/core/apikeys.test.ts +366 -0
- package/dist/template/tests/core/attestations.test.ts +311 -0
- package/dist/template/tests/core/audit-labels.test.ts +37 -0
- package/dist/template/tests/core/autofill-safety.test.ts +279 -0
- package/dist/template/tests/core/availability.test.ts +389 -0
- package/dist/template/tests/core/booking-audiences.test.ts +334 -0
- package/dist/template/tests/core/booking-concurrency.test.ts +288 -0
- package/dist/template/tests/core/bookings.test.ts +343 -0
- package/dist/template/tests/core/boot.test.ts +195 -0
- package/dist/template/tests/core/bootstrap-security.test.ts +38 -0
- package/dist/template/tests/core/briefing-contributors.test.ts +200 -0
- package/dist/template/tests/core/briefing-playbooks.test.ts +171 -0
- package/dist/template/tests/core/briefing.test.ts +298 -0
- package/dist/template/tests/core/browse-storefront.test.ts +561 -0
- package/dist/template/tests/core/builder-authority.test.ts +205 -0
- package/dist/template/tests/core/builder-code-lane.test.ts +213 -0
- package/dist/template/tests/core/builder-content-lane.test.ts +249 -0
- package/dist/template/tests/core/c11-02-catalog-journey.test.ts +227 -0
- package/dist/template/tests/core/c11-03-booking-journey.test.ts +422 -0
- package/dist/template/tests/core/c11-04-gallery-social-journey.test.ts +310 -0
- package/dist/template/tests/core/c11-05-subscription-journey.test.ts +193 -0
- package/dist/template/tests/core/c11-06-agent-journey.test.ts +208 -0
- package/dist/template/tests/core/c11-07-mail-calendar-journey.test.ts +179 -0
- package/dist/template/tests/core/c11-08-install-update-journey.test.ts +166 -0
- package/dist/template/tests/core/c11-13-failure-drills.test.ts +446 -0
- package/dist/template/tests/core/c11-14-retention.test.ts +320 -0
- package/dist/template/tests/core/c11-14-search.test.ts +527 -0
- package/dist/template/tests/core/calendar-busy.test.ts +198 -0
- package/dist/template/tests/core/calendar-oauth-callback.test.ts +154 -0
- package/dist/template/tests/core/calendar-oauth.test.ts +312 -0
- package/dist/template/tests/core/calendar-sync.test.ts +363 -0
- package/dist/template/tests/core/calendars.test.ts +267 -0
- package/dist/template/tests/core/cart-access.test.ts +107 -0
- package/dist/template/tests/core/cart-storefront.test.ts +507 -0
- package/dist/template/tests/core/catalog-browse.test.ts +587 -0
- package/dist/template/tests/core/catalog-carts.test.ts +150 -0
- package/dist/template/tests/core/catalog-collections.test.ts +454 -0
- package/dist/template/tests/core/catalog-fulfillment.test.ts +191 -0
- package/dist/template/tests/core/catalog-inventory.test.ts +198 -0
- package/dist/template/tests/core/catalog-merchandising.test.ts +107 -0
- package/dist/template/tests/core/catalog-offerings.test.ts +213 -0
- package/dist/template/tests/core/catalog-orders.test.ts +279 -0
- package/dist/template/tests/core/catalog-pricing.test.ts +85 -0
- package/dist/template/tests/core/catalog-procurement.test.ts +154 -0
- package/dist/template/tests/core/catalog-promotions.test.ts +109 -0
- package/dist/template/tests/core/catalog-public-pages.test.ts +73 -0
- package/dist/template/tests/core/catalog-relations.test.ts +79 -0
- package/dist/template/tests/core/catalog-variants.test.ts +113 -0
- package/dist/template/tests/core/catalog.test.ts +233 -0
- package/dist/template/tests/core/catalogue.test.ts +300 -0
- package/dist/template/tests/core/change-password.test.ts +164 -0
- package/dist/template/tests/core/changelog-output.test.ts +33 -0
- package/dist/template/tests/core/checkout-policy.test.ts +34 -0
- package/dist/template/tests/core/client-galleries.test.ts +609 -0
- package/dist/template/tests/core/client-readiness-security.test.ts +136 -0
- package/dist/template/tests/core/cms-a11y.test.ts +157 -0
- package/dist/template/tests/core/cms-blocks.test.ts +283 -0
- package/dist/template/tests/core/cms-cache.test.ts +121 -0
- package/dist/template/tests/core/cms-chrome.test.ts +114 -0
- package/dist/template/tests/core/cms-collaboration.test.ts +196 -0
- package/dist/template/tests/core/cms-drafts.test.ts +78 -0
- package/dist/template/tests/core/cms-email.test.ts +71 -0
- package/dist/template/tests/core/cms-experiments.test.ts +109 -0
- package/dist/template/tests/core/cms-fields.test.ts +137 -0
- package/dist/template/tests/core/cms-history.test.ts +34 -0
- package/dist/template/tests/core/cms-layouts.test.ts +110 -0
- package/dist/template/tests/core/cms-lifecycle.test.ts +267 -0
- package/dist/template/tests/core/cms-move.test.ts +101 -0
- package/dist/template/tests/core/cms-plugin-proof.test.ts +56 -0
- package/dist/template/tests/core/cms-public-boundary.test.ts +85 -0
- package/dist/template/tests/core/cms-rich.test.ts +144 -0
- package/dist/template/tests/core/cms-sections.test.ts +139 -0
- package/dist/template/tests/core/cms-service.test.ts +358 -0
- package/dist/template/tests/core/cms-surfaces.test.ts +117 -0
- package/dist/template/tests/core/cms-templates.test.ts +115 -0
- package/dist/template/tests/core/cms-translation-workflow.test.ts +88 -0
- package/dist/template/tests/core/collections-storefront.test.ts +328 -0
- package/dist/template/tests/core/colour-literals.test.ts +73 -0
- package/dist/template/tests/core/community-rooms.test.ts +324 -0
- package/dist/template/tests/core/connection-grants.test.ts +209 -0
- package/dist/template/tests/core/connections.test.ts +435 -0
- package/dist/template/tests/core/consent-publish-surfaces.test.ts +577 -0
- package/dist/template/tests/core/contact-data-depth.test.ts +426 -0
- package/dist/template/tests/core/contact-duplicate-review.test.ts +357 -0
- package/dist/template/tests/core/contact-import.test.ts +404 -0
- package/dist/template/tests/core/contact-privacy-rights.test.ts +636 -0
- package/dist/template/tests/core/contacts-read.test.ts +165 -0
- package/dist/template/tests/core/contract-evidence.test.ts +43 -0
- package/dist/template/tests/core/contract-projections.test.ts +47 -0
- package/dist/template/tests/core/contract-templates.test.ts +270 -0
- package/dist/template/tests/core/contribute.test.ts +497 -0
- package/dist/template/tests/core/conversations.test.ts +381 -0
- package/dist/template/tests/core/coverage-enforcement.test.ts +296 -0
- package/dist/template/tests/core/coverage.test.ts +308 -0
- package/dist/template/tests/core/create-freeholder.test.ts +307 -0
- package/dist/template/tests/core/csp-migration.test.ts +30 -0
- package/dist/template/tests/core/csp-reports.test.ts +150 -0
- package/dist/template/tests/core/csp.test.ts +194 -0
- package/dist/template/tests/core/csrf.test.ts +139 -0
- package/dist/template/tests/core/customer-galleries.test.ts +137 -0
- package/dist/template/tests/core/customer-invoices.test.ts +235 -0
- package/dist/template/tests/core/customer-locale-migration.test.ts +40 -0
- package/dist/template/tests/core/customer-locale-ui.test.ts +39 -0
- package/dist/template/tests/core/customer-locale.test.ts +85 -0
- package/dist/template/tests/core/customer-magic-links.test.ts +281 -0
- package/dist/template/tests/core/customer-reply.test.ts +155 -0
- package/dist/template/tests/core/customer-return-path.test.ts +11 -0
- package/dist/template/tests/core/daily-adapter.test.ts +185 -0
- package/dist/template/tests/core/daily-flow.test.ts +94 -0
- package/dist/template/tests/core/daily-import.test.ts +206 -0
- package/dist/template/tests/core/dashboard.test.ts +147 -0
- package/dist/template/tests/core/db-errors.test.ts +52 -0
- package/dist/template/tests/core/deferred-erasure.test.ts +124 -0
- package/dist/template/tests/core/demo-migration.test.ts +39 -0
- package/dist/template/tests/core/demo-paths.test.ts +49 -0
- package/dist/template/tests/core/demo-scenarios.test.ts +200 -0
- package/dist/template/tests/core/dependency-attestation.test.ts +84 -0
- package/dist/template/tests/core/dependency-audit.test.ts +124 -0
- package/dist/template/tests/core/deploy-droplet.test.ts +323 -0
- package/dist/template/tests/core/deploy-recipe.test.ts +134 -0
- package/dist/template/tests/core/design-tokens.test.ts +113 -0
- package/dist/template/tests/core/doc-claim-mapping.test.ts +167 -0
- package/dist/template/tests/core/docs-availability.test.ts +94 -0
- package/dist/template/tests/core/doctor-script.test.ts +16 -0
- package/dist/template/tests/core/doctor.test.ts +220 -0
- package/dist/template/tests/core/edge-adapters.test.ts +220 -0
- package/dist/template/tests/core/editor-canvas-drag.test.ts +348 -0
- package/dist/template/tests/core/editor-inline-edit.test.ts +416 -0
- package/dist/template/tests/core/editor-media-tools.test.ts +450 -0
- package/dist/template/tests/core/editor-preview-bridge.test.ts +428 -0
- package/dist/template/tests/core/editor-preview-draft.test.ts +226 -0
- package/dist/template/tests/core/editor-reorder.test.ts +339 -0
- package/dist/template/tests/core/editor-store-sections.test.ts +476 -0
- package/dist/template/tests/core/embeds.test.ts +60 -0
- package/dist/template/tests/core/entitlements.test.ts +312 -0
- package/dist/template/tests/core/events.test.ts +113 -0
- package/dist/template/tests/core/f-matrix.test.ts +206 -0
- package/dist/template/tests/core/f04-remaining-screens.test.ts +258 -0
- package/dist/template/tests/core/first-party-plugins.test.ts +783 -0
- package/dist/template/tests/core/forms.test.ts +446 -0
- package/dist/template/tests/core/freeholder-app-init.test.ts +504 -0
- package/dist/template/tests/core/gallery-archive.test.ts +265 -0
- package/dist/template/tests/core/gallery-delivery-routes.test.ts +72 -0
- package/dist/template/tests/core/gallery-partner-share.test.ts +320 -0
- package/dist/template/tests/core/gallery-proofing.test.ts +311 -0
- package/dist/template/tests/core/gallery-rounds.test.ts +291 -0
- package/dist/template/tests/core/gallery-sales.test.ts +309 -0
- package/dist/template/tests/core/guidance-definitions.test.ts +135 -0
- package/dist/template/tests/core/guidance-ui.test.ts +92 -0
- package/dist/template/tests/core/guidance.test.ts +309 -0
- package/dist/template/tests/core/host-update-socket.test.ts +121 -0
- package/dist/template/tests/core/host-updater-recipe.test.ts +68 -0
- package/dist/template/tests/core/http-auth.test.ts +286 -0
- package/dist/template/tests/core/http-body-boundary.test.ts +69 -0
- package/dist/template/tests/core/http.test.ts +284 -0
- package/dist/template/tests/core/i18n-gate.test.ts +440 -0
- package/dist/template/tests/core/i18n.test.ts +190 -0
- package/dist/template/tests/core/ics-and-writeback.test.ts +446 -0
- package/dist/template/tests/core/importers.test.ts +102 -0
- package/dist/template/tests/core/inbox.test.ts +304 -0
- package/dist/template/tests/core/inline-script-safety.test.ts +41 -0
- package/dist/template/tests/core/instrumentation-boundary.test.ts +16 -0
- package/dist/template/tests/core/intake-waivers-reminders.test.ts +533 -0
- package/dist/template/tests/core/internal-services.test.ts +298 -0
- package/dist/template/tests/core/invitations.test.ts +341 -0
- package/dist/template/tests/core/invoice-admin.test.ts +41 -0
- package/dist/template/tests/core/invoicing-pos.test.ts +107 -0
- package/dist/template/tests/core/invoicing.test.ts +776 -0
- package/dist/template/tests/core/job-runtime-health.test.ts +123 -0
- package/dist/template/tests/core/locale-quality.test.ts +107 -0
- package/dist/template/tests/core/locale-routing.test.ts +321 -0
- package/dist/template/tests/core/locations.test.ts +599 -0
- package/dist/template/tests/core/long-running-service-boundary.test.ts +216 -0
- package/dist/template/tests/core/mail-adapters.test.ts +423 -0
- package/dist/template/tests/core/mail-import.test.ts +325 -0
- package/dist/template/tests/core/mail-migration.test.ts +163 -0
- package/dist/template/tests/core/mail-oauth-callback.test.ts +159 -0
- package/dist/template/tests/core/mail-oauth.test.ts +447 -0
- package/dist/template/tests/core/mail-outbox-crypto.test.ts +88 -0
- package/dist/template/tests/core/mail-read-oauth-callback.test.ts +111 -0
- package/dist/template/tests/core/mail-service.test.ts +644 -0
- package/dist/template/tests/core/mail-ui.test.ts +206 -0
- package/dist/template/tests/core/mail-webhooks.test.ts +454 -0
- package/dist/template/tests/core/malware.test.ts +85 -0
- package/dist/template/tests/core/marketplace-claims.test.ts +68 -0
- package/dist/template/tests/core/mcp-input-schema.test.ts +18 -0
- package/dist/template/tests/core/mcp.test.ts +459 -0
- package/dist/template/tests/core/media-capture.test.ts +345 -0
- package/dist/template/tests/core/media-consent.test.ts +357 -0
- package/dist/template/tests/core/media-framing.test.ts +210 -0
- package/dist/template/tests/core/media-transfer.test.ts +48 -0
- package/dist/template/tests/core/media-watermark.test.ts +308 -0
- package/dist/template/tests/core/media.test.ts +1446 -0
- package/dist/template/tests/core/merch-blocks.test.ts +465 -0
- package/dist/template/tests/core/merge-completeness.test.ts +228 -0
- package/dist/template/tests/core/migrate.test.ts +75 -0
- package/dist/template/tests/core/migration-journal.test.ts +59 -0
- package/dist/template/tests/core/mobile-app-shell.test.ts +238 -0
- package/dist/template/tests/core/mobile-app.test.ts +728 -0
- package/dist/template/tests/core/mobile-capture-batches.test.ts +223 -0
- package/dist/template/tests/core/mobile-private-cache.test.ts +339 -0
- package/dist/template/tests/core/mobile-screens.test.ts +362 -0
- package/dist/template/tests/core/mobile-store-gate.test.ts +310 -0
- package/dist/template/tests/core/module.test.ts +60 -0
- package/dist/template/tests/core/money-arithmetic.test.ts +279 -0
- package/dist/template/tests/core/newsletters.test.ts +178 -0
- package/dist/template/tests/core/notes.test.ts +338 -0
- package/dist/template/tests/core/notification-migration.test.ts +174 -0
- package/dist/template/tests/core/notification-ui.test.ts +97 -0
- package/dist/template/tests/core/notifications.test.ts +510 -0
- package/dist/template/tests/core/onboarding-contract.test.ts +133 -0
- package/dist/template/tests/core/outbound-boundaries.test.ts +29 -0
- package/dist/template/tests/core/outbox.test.ts +407 -0
- package/dist/template/tests/core/owner-password-script.test.ts +106 -0
- package/dist/template/tests/core/ownership-export.test.ts +273 -0
- package/dist/template/tests/core/page-editor-publish.test.ts +94 -0
- package/dist/template/tests/core/paradise-adapter.test.ts +177 -0
- package/dist/template/tests/core/paradise-flow.test.ts +350 -0
- package/dist/template/tests/core/paradise-webhook.test.ts +148 -0
- package/dist/template/tests/core/password-reset.test.ts +289 -0
- package/dist/template/tests/core/passwords.test.ts +57 -0
- package/dist/template/tests/core/payment-adapters.test.ts +604 -0
- package/dist/template/tests/core/payment-provider-service.test.ts +226 -0
- package/dist/template/tests/core/paywalls.test.ts +358 -0
- package/dist/template/tests/core/performance-budgets.test.ts +332 -0
- package/dist/template/tests/core/performance-measurement-families.test.ts +296 -0
- package/dist/template/tests/core/pipelines.test.ts +382 -0
- package/dist/template/tests/core/plan-gate.test.ts +251 -0
- package/dist/template/tests/core/playground.test.ts +412 -0
- package/dist/template/tests/core/plugin-claims.test.ts +41 -0
- package/dist/template/tests/core/plugin-contract.test.ts +149 -0
- package/dist/template/tests/core/plugin-provider-boundary.test.ts +35 -0
- package/dist/template/tests/core/plugin-scaffold.test.ts +27 -0
- package/dist/template/tests/core/plugins-lifecycle.test.ts +196 -0
- package/dist/template/tests/core/portability.test.ts +58 -0
- package/dist/template/tests/core/portal-rooms.test.ts +280 -0
- package/dist/template/tests/core/portal-shell.test.ts +116 -0
- package/dist/template/tests/core/pos-adapters.test.ts +78 -0
- package/dist/template/tests/core/price-breaks.test.ts +63 -0
- package/dist/template/tests/core/printify-adapter.test.ts +85 -0
- package/dist/template/tests/core/printify-fulfillment.test.ts +149 -0
- package/dist/template/tests/core/product-gift-share.test.ts +116 -0
- package/dist/template/tests/core/project-case-studies.test.ts +277 -0
- package/dist/template/tests/core/project-portfolios.test.ts +197 -0
- package/dist/template/tests/core/projects.test.ts +292 -0
- package/dist/template/tests/core/promo-quote.test.ts +51 -0
- package/dist/template/tests/core/proxy-locale.test.ts +55 -0
- package/dist/template/tests/core/public-entity-drafts.test.ts +166 -0
- package/dist/template/tests/core/push-devices.test.ts +147 -0
- package/dist/template/tests/core/quote-conversion.test.ts +291 -0
- package/dist/template/tests/core/quote-partner-share.test.ts +192 -0
- package/dist/template/tests/core/quotes.test.ts +357 -0
- package/dist/template/tests/core/rate-limit.test.ts +216 -0
- package/dist/template/tests/core/recipes.test.ts +212 -0
- package/dist/template/tests/core/record-participation.test.ts +121 -0
- package/dist/template/tests/core/record-trash-families.test.ts +321 -0
- package/dist/template/tests/core/record-trash.test.ts +154 -0
- package/dist/template/tests/core/recurring-invoices.test.ts +284 -0
- package/dist/template/tests/core/registry-completeness.test.ts +143 -0
- package/dist/template/tests/core/release-history.test.ts +47 -0
- package/dist/template/tests/core/release-packages.test.ts +35 -0
- package/dist/template/tests/core/release-publication.test.ts +69 -0
- package/dist/template/tests/core/rentals.test.ts +408 -0
- package/dist/template/tests/core/resolver.test.ts +481 -0
- package/dist/template/tests/core/reviews.test.ts +229 -0
- package/dist/template/tests/core/roles.test.ts +199 -0
- package/dist/template/tests/core/route-boot.test.ts +64 -0
- package/dist/template/tests/core/runtime-balanced-sequencer.test.ts +117 -0
- package/dist/template/tests/core/runtime-shutdown.test.ts +58 -0
- package/dist/template/tests/core/runtime-version-integrity.test.ts +43 -0
- package/dist/template/tests/core/saved-views.test.ts +271 -0
- package/dist/template/tests/core/schema-baseline-identity.test.ts +70 -0
- package/dist/template/tests/core/schema-compat-gate.test.ts +172 -0
- package/dist/template/tests/core/scoring.test.ts +364 -0
- package/dist/template/tests/core/sdk-generation.test.ts +55 -0
- package/dist/template/tests/core/sdk-schema.test.ts +106 -0
- package/dist/template/tests/core/sdk.test.ts +181 -0
- package/dist/template/tests/core/security-headers.test.ts +41 -0
- package/dist/template/tests/core/seed-demo.test.ts +355 -0
- package/dist/template/tests/core/segments.test.ts +528 -0
- package/dist/template/tests/core/seo-gate.test.ts +193 -0
- package/dist/template/tests/core/seo-public-entities.test.ts +105 -0
- package/dist/template/tests/core/seo-surface.test.ts +279 -0
- package/dist/template/tests/core/seo.test.ts +277 -0
- package/dist/template/tests/core/service-composition.test.ts +248 -0
- package/dist/template/tests/core/service-output.test.ts +48 -0
- package/dist/template/tests/core/service.test.ts +394 -0
- package/dist/template/tests/core/session-management.test.ts +223 -0
- package/dist/template/tests/core/settings.test.ts +421 -0
- package/dist/template/tests/core/shipping-quote.test.ts +105 -0
- package/dist/template/tests/core/shopify-adapter.test.ts +121 -0
- package/dist/template/tests/core/shopify-refunds.test.ts +177 -0
- package/dist/template/tests/core/shopify-sync.test.ts +62 -0
- package/dist/template/tests/core/signup-contact-import.test.ts +383 -0
- package/dist/template/tests/core/site-chat.test.ts +250 -0
- package/dist/template/tests/core/sms-consent.test.ts +295 -0
- package/dist/template/tests/core/sms-keywords.test.ts +139 -0
- package/dist/template/tests/core/sms-policy.test.ts +348 -0
- package/dist/template/tests/core/sms-registration.test.ts +304 -0
- package/dist/template/tests/core/sms-templates.test.ts +61 -0
- package/dist/template/tests/core/sms.test.ts +563 -0
- package/dist/template/tests/core/social-http.test.ts +91 -0
- package/dist/template/tests/core/spec-reconciliation.test.ts +62 -0
- package/dist/template/tests/core/spine.test.ts +682 -0
- package/dist/template/tests/core/standalone-artifact.test.ts +40 -0
- package/dist/template/tests/core/storage.test.ts +360 -0
- package/dist/template/tests/core/store-sections.test.ts +466 -0
- package/dist/template/tests/core/storefront-commerce.test.ts +431 -0
- package/dist/template/tests/core/tasks.test.ts +356 -0
- package/dist/template/tests/core/tax-templates.test.ts +129 -0
- package/dist/template/tests/core/templates.test.ts +148 -0
- package/dist/template/tests/core/theme.test.ts +64 -0
- package/dist/template/tests/core/time-entries.test.ts +343 -0
- package/dist/template/tests/core/tokens.test.ts +167 -0
- package/dist/template/tests/core/transactional-jobs.test.ts +590 -0
- package/dist/template/tests/core/two-factor.test.ts +297 -0
- package/dist/template/tests/core/update-admin.test.ts +103 -0
- package/dist/template/tests/core/update-apply.test.ts +34 -0
- package/dist/template/tests/core/update-catalog.test.ts +172 -0
- package/dist/template/tests/core/update-check.test.ts +114 -0
- package/dist/template/tests/core/update-cli.test.ts +119 -0
- package/dist/template/tests/core/update-escalation.test.ts +178 -0
- package/dist/template/tests/core/update-feed.test.ts +104 -0
- package/dist/template/tests/core/update-fork.test.ts +244 -0
- package/dist/template/tests/core/update-policy.test.ts +73 -0
- package/dist/template/tests/core/update-preflight.test.ts +59 -0
- package/dist/template/tests/core/update-release.test.ts +127 -0
- package/dist/template/tests/core/update-seams.test.ts +94 -0
- package/dist/template/tests/core/update-targets.test.ts +325 -0
- package/dist/template/tests/core/upgrade-gate.test.ts +36 -0
- package/dist/template/tests/core/waitlists-and-policy.test.ts +544 -0
- package/dist/template/tests/core/webhooks.test.ts +742 -0
- package/dist/template/tests/core/workflow-integrity.test.ts +142 -0
- package/dist/template/tests/core/zoned.test.ts +84 -0
- package/dist/template/tests/fixtures/c1019-chain.catalog +6597 -0
- package/dist/template/tests/fixtures/locales.ts +55 -0
- package/dist/template/tests/fixtures/sample-plugin/README.md +3 -0
- package/dist/template/tests/fixtures/sample-plugin/plugin.json +10 -0
- package/dist/template/tests/helpers/booking-time.ts +11 -0
- package/dist/template/tests/helpers/database-lock.ts +18 -0
- package/dist/template/tests/helpers/mail.ts +17 -0
- package/dist/template/tests/helpers/performance-boot.ts +194 -0
- package/dist/template/tests/helpers/performance-browser.ts +684 -0
- package/dist/template/tests/helpers/performance-migration.ts +165 -0
- package/dist/template/tests/helpers/performance.ts +203 -0
- package/dist/template/tests/helpers/queue-performance.ts +62 -0
- package/dist/template/tests/helpers/spine.ts +93 -0
- package/dist/template/tests/host/test_docker_updater.py +630 -0
- package/dist/template/tests/host/test_host_updater.py +430 -0
- package/dist/template/tests/modules/ads-measurement.test.ts +360 -0
- package/dist/template/tests/modules/ads-serving.test.ts +694 -0
- package/dist/template/tests/modules/ads-third-party.test.ts +353 -0
- package/dist/template/tests/modules/ads.test.ts +377 -0
- package/dist/template/tests/modules/adversarial-customer-privacy.test.ts +88 -0
- package/dist/template/tests/modules/assessments.test.ts +581 -0
- package/dist/template/tests/modules/assistant-grounding.test.ts +182 -0
- package/dist/template/tests/modules/assistant-guardrails.test.ts +341 -0
- package/dist/template/tests/modules/assistant.test.ts +665 -0
- package/dist/template/tests/modules/automations-guardrails.test.ts +319 -0
- package/dist/template/tests/modules/automations-runtime.test.ts +467 -0
- package/dist/template/tests/modules/automations.test.ts +426 -0
- package/dist/template/tests/modules/broadcasts.test.ts +769 -0
- package/dist/template/tests/modules/calculators.test.ts +407 -0
- package/dist/template/tests/modules/customer-surfaces.test.ts +223 -0
- package/dist/template/tests/modules/documents.test.ts +401 -0
- package/dist/template/tests/modules/form-fields.test.ts +73 -0
- package/dist/template/tests/modules/funnel.test.ts +208 -0
- package/dist/template/tests/modules/help-centre.test.ts +285 -0
- package/dist/template/tests/modules/location-pages.test.ts +232 -0
- package/dist/template/tests/modules/loyalty-rewards.test.ts +490 -0
- package/dist/template/tests/modules/loyalty.test.ts +484 -0
- package/dist/template/tests/modules/one-audience.test.ts +263 -0
- package/dist/template/tests/modules/popups.test.ts +769 -0
- package/dist/template/tests/modules/referrals-commission.test.ts +740 -0
- package/dist/template/tests/modules/referrals.test.ts +349 -0
- package/dist/template/tests/modules/reporting-exports.test.ts +1082 -0
- package/dist/template/tests/modules/reporting.test.ts +384 -0
- package/dist/template/tests/modules/share.test.ts +431 -0
- package/dist/template/tests/modules/social-composer.test.ts +251 -0
- package/dist/template/tests/modules/social-gbp.test.ts +281 -0
- package/dist/template/tests/modules/social-ingest.test.ts +295 -0
- package/dist/template/tests/modules/social-onboarding.test.ts +109 -0
- package/dist/template/tests/modules/social.test.ts +289 -0
- package/dist/template/tests/modules/subscription-billing.test.ts +483 -0
- package/dist/template/tests/modules/subscriptions.test.ts +582 -0
- package/dist/template/tests/modules/templates.test.ts +358 -0
- package/dist/template/tests/modules/translate.test.ts +128 -0
- package/dist/template/tests/setup/migrate.ts +20 -0
- package/dist/template/tsconfig.json +54 -0
- package/dist/template/vitest.config.ts +91 -0
- package/dist/template-manifest.json +12746 -0
- package/package.json +22 -7
|
@@ -0,0 +1,1529 @@
|
|
|
1
|
+
// Copyright (C) 2026 Tony Aly
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
"use server";
|
|
4
|
+
// A file-level directive, unlike app/theme.ts: these are imported by client
|
|
5
|
+
// components, and an inline "use server" is only legal inside a Server
|
|
6
|
+
// Component. Every export here is therefore an action, which is what they are.
|
|
7
|
+
//
|
|
8
|
+
// Admin actions. Like the setup wizard, these go through the same services the
|
|
9
|
+
// REST API and MCP server call (§11) — the admin is a caller, never a
|
|
10
|
+
// shortcut. Next verifies the Origin header for Server Actions, so this path
|
|
11
|
+
// carries its own CSRF defence.
|
|
12
|
+
import { cookies, headers } from "next/headers";
|
|
13
|
+
import { redirect } from "next/navigation";
|
|
14
|
+
import { revalidatePath } from "next/cache";
|
|
15
|
+
import { login, logout } from "@/core/auth/service";
|
|
16
|
+
import { SESSION_COOKIE } from "@/core/auth/sessions";
|
|
17
|
+
import { changePassword } from "@/core/auth/service";
|
|
18
|
+
import { LOGIN_CHALLENGE_COOKIE } from "@/core/auth/two-factor";
|
|
19
|
+
import { getT } from "../i18n";
|
|
20
|
+
import { actorFromToken } from "@/core/http/actor";
|
|
21
|
+
import { CSRF_COOKIE, issueCsrfToken } from "@/core/http/csrf";
|
|
22
|
+
import { requestMetadataFromHeaders } from "@/core/http/request-metadata";
|
|
23
|
+
import {
|
|
24
|
+
applyUpdate,
|
|
25
|
+
checkUpdates,
|
|
26
|
+
getUpdatePolicy,
|
|
27
|
+
openForkUpdate,
|
|
28
|
+
preflightUpdate,
|
|
29
|
+
rollbackUpdate,
|
|
30
|
+
saveUpdatePolicy,
|
|
31
|
+
} from "@/core/update/service";
|
|
32
|
+
import {
|
|
33
|
+
createContact,
|
|
34
|
+
mergeContacts,
|
|
35
|
+
undoContactMerge,
|
|
36
|
+
updateContact,
|
|
37
|
+
} from "@/core/contacts/service";
|
|
38
|
+
import {
|
|
39
|
+
dismissDuplicateCandidate,
|
|
40
|
+
mergeDuplicateCandidate,
|
|
41
|
+
scanDuplicateCandidates,
|
|
42
|
+
} from "@/core/contacts/duplicates";
|
|
43
|
+
import {
|
|
44
|
+
createCustomField,
|
|
45
|
+
updateCustomField,
|
|
46
|
+
} from "@/core/contacts/custom-fields";
|
|
47
|
+
import {
|
|
48
|
+
createOrganization,
|
|
49
|
+
deleteOrganization,
|
|
50
|
+
updateOrganization,
|
|
51
|
+
} from "@/core/contacts/organizations";
|
|
52
|
+
import {
|
|
53
|
+
createRelationship,
|
|
54
|
+
deleteRelationship,
|
|
55
|
+
updateRelationship,
|
|
56
|
+
} from "@/core/contacts/relationships";
|
|
57
|
+
import {
|
|
58
|
+
createLocationService as createLocation,
|
|
59
|
+
deleteLocation,
|
|
60
|
+
setOpeningHours,
|
|
61
|
+
setPrimaryLocation,
|
|
62
|
+
setServiceArea,
|
|
63
|
+
updateLocation,
|
|
64
|
+
} from "@/core/locations/service";
|
|
65
|
+
import { createApiKey, revokeApiKey } from "@/core/apikeys/service";
|
|
66
|
+
import {
|
|
67
|
+
createWebhook,
|
|
68
|
+
deleteWebhook,
|
|
69
|
+
replayDelivery,
|
|
70
|
+
revealWebhookSecret,
|
|
71
|
+
testWebhook,
|
|
72
|
+
updateWebhook,
|
|
73
|
+
} from "@/core/webhooks/service";
|
|
74
|
+
import { patchBusiness } from "@/core/settings/service";
|
|
75
|
+
import {
|
|
76
|
+
assignRole,
|
|
77
|
+
createRole,
|
|
78
|
+
deleteRole,
|
|
79
|
+
updateRole,
|
|
80
|
+
} from "@/core/roles/service";
|
|
81
|
+
import { ServiceError } from "@/core/service";
|
|
82
|
+
import {
|
|
83
|
+
addRetentionException,
|
|
84
|
+
createDataRequest,
|
|
85
|
+
denyDataRequest,
|
|
86
|
+
fulfillDataRequest,
|
|
87
|
+
recordConsent,
|
|
88
|
+
removeRetentionException,
|
|
89
|
+
startDataRequest,
|
|
90
|
+
verifyDataRequest,
|
|
91
|
+
} from "@/core/privacy/service";
|
|
92
|
+
import {
|
|
93
|
+
cancelJobRun,
|
|
94
|
+
redriveJobDeadLetters,
|
|
95
|
+
retryJobRun,
|
|
96
|
+
} from "@/core/jobs/service";
|
|
97
|
+
import { replayOutboxEvent } from "@/core/events/outbox-service";
|
|
98
|
+
import { beginMailOAuth } from "@/core/mail/oauth";
|
|
99
|
+
import {
|
|
100
|
+
registerMailSender,
|
|
101
|
+
releaseMailSuppression,
|
|
102
|
+
setDefaultMailSender,
|
|
103
|
+
testMailSender,
|
|
104
|
+
updateMailSender,
|
|
105
|
+
verifyMailSender,
|
|
106
|
+
} from "@/core/mail/service";
|
|
107
|
+
|
|
108
|
+
export interface ActionState {
|
|
109
|
+
error?: string;
|
|
110
|
+
saved?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* What the caller typed, handed back on failure.
|
|
113
|
+
*
|
|
114
|
+
* React resets a form after its action runs — every time, success or not —
|
|
115
|
+
* so without this an owner who mistypes one field loses the whole record
|
|
116
|
+
* they just filled in. `attempt` changes on each failure so the inputs
|
|
117
|
+
* remount and pick the returned values up.
|
|
118
|
+
*/
|
|
119
|
+
values?: Record<string, string>;
|
|
120
|
+
attempt?: number;
|
|
121
|
+
/** A fully-worded success line, built server-side (see changePasswordAction). */
|
|
122
|
+
message?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function present(error: unknown): ActionState {
|
|
126
|
+
if (error instanceof ServiceError) return { error: error.message };
|
|
127
|
+
console.error("admin action failed", error);
|
|
128
|
+
return { error: "Something went wrong. Try again." };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function field(form: FormData, key: string, fallback = ""): string {
|
|
132
|
+
const value = form.get(key);
|
|
133
|
+
return typeof value === "string" ? value : fallback;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Hand a form's own text back, so a rejected save does not discard it. */
|
|
137
|
+
function echo(
|
|
138
|
+
previous: ActionState,
|
|
139
|
+
form: FormData,
|
|
140
|
+
): Pick<ActionState, "values" | "attempt"> {
|
|
141
|
+
const values: Record<string, string> = {};
|
|
142
|
+
for (const key of form.keys()) {
|
|
143
|
+
// Never a password: echoing one would put it in the rendered HTML.
|
|
144
|
+
if (key === "password") continue;
|
|
145
|
+
values[key] = field(form, key);
|
|
146
|
+
}
|
|
147
|
+
return { values, attempt: (previous.attempt ?? 0) + 1 };
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
async function currentActor() {
|
|
151
|
+
const actor = await actorFromToken(
|
|
152
|
+
(await cookies()).get(SESSION_COOKIE)?.value,
|
|
153
|
+
);
|
|
154
|
+
return {
|
|
155
|
+
...actor,
|
|
156
|
+
request: requestMetadataFromHeaders(await headers()),
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export async function signInAction(
|
|
161
|
+
_previous: ActionState,
|
|
162
|
+
form: FormData,
|
|
163
|
+
): Promise<ActionState> {
|
|
164
|
+
let result: Awaited<ReturnType<typeof login.call>>;
|
|
165
|
+
try {
|
|
166
|
+
result = await login.call(
|
|
167
|
+
{ email: field(form, "email"), password: field(form, "password") },
|
|
168
|
+
{
|
|
169
|
+
kind: "anonymous",
|
|
170
|
+
request: requestMetadataFromHeaders(await headers()),
|
|
171
|
+
},
|
|
172
|
+
);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
// Same reason as the contact form: React resets the form, and retyping an
|
|
175
|
+
// address after a mistyped password is a needless indignity. `echo` never
|
|
176
|
+
// returns the password.
|
|
177
|
+
return { ...present(error), ...echo(_previous, form) };
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const jar = await cookies();
|
|
181
|
+
const secure = process.env.NODE_ENV === "production";
|
|
182
|
+
if (result.twoFactorRequired) {
|
|
183
|
+
jar.set(LOGIN_CHALLENGE_COOKIE, result.challengeToken, {
|
|
184
|
+
httpOnly: true,
|
|
185
|
+
sameSite: "strict",
|
|
186
|
+
path: "/",
|
|
187
|
+
secure,
|
|
188
|
+
expires: new Date(Date.now() + 10 * 60 * 1000),
|
|
189
|
+
});
|
|
190
|
+
redirect("/login/verify");
|
|
191
|
+
}
|
|
192
|
+
jar.set(SESSION_COOKIE, result.token, {
|
|
193
|
+
httpOnly: true,
|
|
194
|
+
sameSite: "lax",
|
|
195
|
+
path: "/",
|
|
196
|
+
secure,
|
|
197
|
+
expires: result.expiresAt,
|
|
198
|
+
});
|
|
199
|
+
jar.set(CSRF_COOKIE, issueCsrfToken(), {
|
|
200
|
+
httpOnly: false,
|
|
201
|
+
sameSite: "lax",
|
|
202
|
+
path: "/",
|
|
203
|
+
secure,
|
|
204
|
+
expires: result.expiresAt,
|
|
205
|
+
});
|
|
206
|
+
redirect("/admin");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Change your own password.
|
|
211
|
+
*
|
|
212
|
+
* The session token travels from the cookie into the service so the screen the
|
|
213
|
+
* owner is looking at is the one session left standing — every other device is
|
|
214
|
+
* signed out, which is the point of changing a password at all.
|
|
215
|
+
*/
|
|
216
|
+
export async function changePasswordAction(
|
|
217
|
+
previous: ActionState,
|
|
218
|
+
form: FormData,
|
|
219
|
+
): Promise<ActionState> {
|
|
220
|
+
const jar = await cookies();
|
|
221
|
+
const token = jar.get(SESSION_COOKIE)?.value;
|
|
222
|
+
try {
|
|
223
|
+
const result = await changePassword.call(
|
|
224
|
+
{
|
|
225
|
+
currentPassword: field(form, "currentPassword"),
|
|
226
|
+
newPassword: field(form, "newPassword"),
|
|
227
|
+
keepSessionToken: token,
|
|
228
|
+
},
|
|
229
|
+
await currentActor(),
|
|
230
|
+
);
|
|
231
|
+
// The wording is decided here rather than handed to the client as a
|
|
232
|
+
// function: a server component may not pass one across that boundary, and
|
|
233
|
+
// the server is where the catalogs and the plural rules live anyway.
|
|
234
|
+
const t = await getT();
|
|
235
|
+
return {
|
|
236
|
+
saved: true,
|
|
237
|
+
message: t("settings.passwordChanged", {
|
|
238
|
+
count: result.otherSessionsRevoked,
|
|
239
|
+
}),
|
|
240
|
+
};
|
|
241
|
+
} catch (error) {
|
|
242
|
+
// Neither password is echoed back: `resubmit` already refuses to return a
|
|
243
|
+
// field called "password", and these are not called that.
|
|
244
|
+
return { ...present(error), attempt: (previous.attempt ?? 0) + 1 };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export async function signOutAction(): Promise<void> {
|
|
249
|
+
const jar = await cookies();
|
|
250
|
+
const token = jar.get(SESSION_COOKIE)?.value;
|
|
251
|
+
if (token) {
|
|
252
|
+
// Through the service, so the session row is actually revoked rather than
|
|
253
|
+
// just forgotten by this browser.
|
|
254
|
+
await logout.call({ token }, await currentActor()).catch(() => undefined);
|
|
255
|
+
}
|
|
256
|
+
jar.delete(SESSION_COOKIE);
|
|
257
|
+
jar.delete(CSRF_COOKIE);
|
|
258
|
+
redirect("/login");
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export async function saveBusinessSettingsAction(
|
|
262
|
+
_previous: ActionState,
|
|
263
|
+
form: FormData,
|
|
264
|
+
): Promise<ActionState> {
|
|
265
|
+
const locales = field(form, "enabledLocales", "en")
|
|
266
|
+
.split(",")
|
|
267
|
+
.map((locale) => locale.trim())
|
|
268
|
+
.filter(Boolean);
|
|
269
|
+
|
|
270
|
+
try {
|
|
271
|
+
await patchBusiness.call(
|
|
272
|
+
{
|
|
273
|
+
name: field(form, "name"),
|
|
274
|
+
tagline: field(form, "tagline") || undefined,
|
|
275
|
+
schemaType: field(form, "schemaType"),
|
|
276
|
+
country: field(form, "country"),
|
|
277
|
+
baseCurrency: field(form, "baseCurrency"),
|
|
278
|
+
timezone: field(form, "timezone"),
|
|
279
|
+
defaultLocale: locales[0] ?? "en",
|
|
280
|
+
enabledLocales: locales,
|
|
281
|
+
units: field(form, "units", "metric") as "metric" | "imperial",
|
|
282
|
+
firstDayOfWeek: Number(field(form, "firstDayOfWeek", "1")),
|
|
283
|
+
},
|
|
284
|
+
await currentActor(),
|
|
285
|
+
);
|
|
286
|
+
} catch (error) {
|
|
287
|
+
return { ...present(error), ...echo(_previous, form) };
|
|
288
|
+
}
|
|
289
|
+
return { saved: true };
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const STAGES = ["lead", "prospect", "customer", "repeat"] as const;
|
|
293
|
+
type Stage = (typeof STAGES)[number];
|
|
294
|
+
|
|
295
|
+
function stageOf(form: FormData): Stage {
|
|
296
|
+
const value = field(form, "lifecycleStage", "lead");
|
|
297
|
+
return (STAGES as readonly string[]).includes(value)
|
|
298
|
+
? (value as Stage)
|
|
299
|
+
: "lead";
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function tagsOf(form: FormData): string[] {
|
|
303
|
+
return field(form, "tags")
|
|
304
|
+
.split(",")
|
|
305
|
+
.map((tag) => tag.trim())
|
|
306
|
+
.filter(Boolean);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
function customFieldsOf(form: FormData): Record<string, unknown> {
|
|
310
|
+
const values: Record<string, unknown> = {};
|
|
311
|
+
for (const descriptor of form.getAll("customField")) {
|
|
312
|
+
if (typeof descriptor !== "string") continue;
|
|
313
|
+
const [key, kind] = descriptor.split("|", 2);
|
|
314
|
+
if (!key || !kind) continue;
|
|
315
|
+
const raw = field(form, `custom:${key}`).trim();
|
|
316
|
+
if (!raw) {
|
|
317
|
+
values[key] = null;
|
|
318
|
+
} else if (kind === "number") {
|
|
319
|
+
const number = Number(raw);
|
|
320
|
+
values[key] = Number.isFinite(number) ? number : raw;
|
|
321
|
+
} else if (kind === "boolean") {
|
|
322
|
+
values[key] = raw === "true" ? true : raw === "false" ? false : raw;
|
|
323
|
+
} else {
|
|
324
|
+
values[key] = raw;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return values;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function optionalId(form: FormData, key: string): string | null {
|
|
331
|
+
return field(form, key).trim() || null;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export async function createContactAction(
|
|
335
|
+
_previous: ActionState,
|
|
336
|
+
form: FormData,
|
|
337
|
+
): Promise<ActionState> {
|
|
338
|
+
let id: string;
|
|
339
|
+
try {
|
|
340
|
+
const contact = await createContact.call(
|
|
341
|
+
{
|
|
342
|
+
name: field(form, "name"),
|
|
343
|
+
email: field(form, "email") || null,
|
|
344
|
+
phone: field(form, "phone") || null,
|
|
345
|
+
orgId: optionalId(form, "orgId"),
|
|
346
|
+
lifecycleStage: stageOf(form),
|
|
347
|
+
tags: tagsOf(form),
|
|
348
|
+
customFields: customFieldsOf(form),
|
|
349
|
+
preferredLocale: field(form, "preferredLocale") || null,
|
|
350
|
+
timezone: field(form, "timezone") || null,
|
|
351
|
+
country: field(form, "country") || null,
|
|
352
|
+
ownerNotes: field(form, "ownerNotes") || null,
|
|
353
|
+
source: "admin",
|
|
354
|
+
},
|
|
355
|
+
await currentActor(),
|
|
356
|
+
);
|
|
357
|
+
id = contact.id;
|
|
358
|
+
} catch (error) {
|
|
359
|
+
return { ...present(error), ...echo(_previous, form) };
|
|
360
|
+
}
|
|
361
|
+
redirect(`/admin/contacts/${id}`);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export async function updateContactAction(
|
|
365
|
+
_previous: ActionState,
|
|
366
|
+
form: FormData,
|
|
367
|
+
): Promise<ActionState> {
|
|
368
|
+
try {
|
|
369
|
+
await updateContact.call(
|
|
370
|
+
{
|
|
371
|
+
id: field(form, "id"),
|
|
372
|
+
name: field(form, "name"),
|
|
373
|
+
email: field(form, "email") || null,
|
|
374
|
+
phone: field(form, "phone") || null,
|
|
375
|
+
orgId: optionalId(form, "orgId"),
|
|
376
|
+
lifecycleStage: stageOf(form),
|
|
377
|
+
tags: tagsOf(form),
|
|
378
|
+
customFields: customFieldsOf(form),
|
|
379
|
+
preferredLocale: field(form, "preferredLocale") || null,
|
|
380
|
+
timezone: field(form, "timezone") || null,
|
|
381
|
+
country: field(form, "country") || null,
|
|
382
|
+
ownerNotes: field(form, "ownerNotes") || null,
|
|
383
|
+
},
|
|
384
|
+
await currentActor(),
|
|
385
|
+
);
|
|
386
|
+
} catch (error) {
|
|
387
|
+
return { ...present(error), ...echo(_previous, form) };
|
|
388
|
+
}
|
|
389
|
+
return { saved: true };
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Fold a duplicate into the contact being viewed. Owner-only at the service,
|
|
394
|
+
* so a staff member who reaches this form still gets a clean refusal.
|
|
395
|
+
*/
|
|
396
|
+
export async function mergeContactAction(
|
|
397
|
+
_previous: ActionState,
|
|
398
|
+
form: FormData,
|
|
399
|
+
): Promise<ActionState> {
|
|
400
|
+
const survivingId = field(form, "survivingId");
|
|
401
|
+
try {
|
|
402
|
+
await mergeContacts.call(
|
|
403
|
+
{ survivingId, duplicateId: field(form, "duplicateId") },
|
|
404
|
+
await currentActor(),
|
|
405
|
+
);
|
|
406
|
+
} catch (error) {
|
|
407
|
+
return present(error);
|
|
408
|
+
}
|
|
409
|
+
redirect(`/admin/contacts/${survivingId}`);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/** One action boundary for every deliberate decision in the duplicate desk. */
|
|
413
|
+
export async function duplicateReviewAction(
|
|
414
|
+
_previous: ActionState,
|
|
415
|
+
form: FormData,
|
|
416
|
+
): Promise<ActionState> {
|
|
417
|
+
const intent = field(form, "intent");
|
|
418
|
+
let messageKey: string;
|
|
419
|
+
try {
|
|
420
|
+
const actor = await currentActor();
|
|
421
|
+
switch (intent) {
|
|
422
|
+
case "scan":
|
|
423
|
+
await scanDuplicateCandidates.call({}, actor);
|
|
424
|
+
messageKey = "contacts.duplicates.scanComplete";
|
|
425
|
+
break;
|
|
426
|
+
case "dismiss":
|
|
427
|
+
await dismissDuplicateCandidate.call(
|
|
428
|
+
{ id: field(form, "candidateId") },
|
|
429
|
+
actor,
|
|
430
|
+
);
|
|
431
|
+
messageKey = "contacts.duplicates.dismissed";
|
|
432
|
+
break;
|
|
433
|
+
case "merge":
|
|
434
|
+
await mergeDuplicateCandidate.call(
|
|
435
|
+
{
|
|
436
|
+
candidateId: field(form, "candidateId"),
|
|
437
|
+
survivingId: field(form, "survivingId"),
|
|
438
|
+
duplicateId: field(form, "duplicateId"),
|
|
439
|
+
},
|
|
440
|
+
actor,
|
|
441
|
+
);
|
|
442
|
+
messageKey = "contacts.duplicates.merged";
|
|
443
|
+
break;
|
|
444
|
+
case "undo":
|
|
445
|
+
await undoContactMerge.call(
|
|
446
|
+
{ operationId: field(form, "operationId") },
|
|
447
|
+
actor,
|
|
448
|
+
);
|
|
449
|
+
messageKey = "contacts.duplicates.undoneMessage";
|
|
450
|
+
break;
|
|
451
|
+
default:
|
|
452
|
+
throw new ServiceError("validation", "Choose a duplicate-review action.");
|
|
453
|
+
}
|
|
454
|
+
} catch (error) {
|
|
455
|
+
return present(error);
|
|
456
|
+
}
|
|
457
|
+
revalidatePath("/admin/contacts");
|
|
458
|
+
revalidatePath("/admin/contacts/duplicates");
|
|
459
|
+
const t = await getT();
|
|
460
|
+
return { saved: true, message: t(messageKey) };
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/* --------------------------------------------- privacy rights (C1.08) */
|
|
464
|
+
|
|
465
|
+
function correctionFrom(form: FormData) {
|
|
466
|
+
const name = field(form, "name").trim();
|
|
467
|
+
const email = field(form, "email").trim();
|
|
468
|
+
const phone = field(form, "phone").trim();
|
|
469
|
+
const preferredLocale = field(form, "preferredLocale").trim();
|
|
470
|
+
const timezone = field(form, "timezone").trim();
|
|
471
|
+
const country = field(form, "country").trim();
|
|
472
|
+
return {
|
|
473
|
+
name: name || undefined,
|
|
474
|
+
email: field(form, "clearEmail") === "on" ? null : email || undefined,
|
|
475
|
+
phone: field(form, "clearPhone") === "on" ? null : phone || undefined,
|
|
476
|
+
preferredLocale: preferredLocale || undefined,
|
|
477
|
+
timezone: timezone || undefined,
|
|
478
|
+
country: country || undefined,
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/** One auditable boundary for the privacy desk's explicit human decisions. */
|
|
483
|
+
export async function privacyDeskAction(
|
|
484
|
+
previous: ActionState,
|
|
485
|
+
form: FormData,
|
|
486
|
+
): Promise<ActionState> {
|
|
487
|
+
const intent = field(form, "intent");
|
|
488
|
+
let messageKey: string;
|
|
489
|
+
try {
|
|
490
|
+
const actor = await currentActor();
|
|
491
|
+
switch (intent) {
|
|
492
|
+
case "consent":
|
|
493
|
+
await recordConsent.call(
|
|
494
|
+
{
|
|
495
|
+
contactId: field(form, "contactId"),
|
|
496
|
+
purpose: field(form, "purpose") as
|
|
497
|
+
| "marketing"
|
|
498
|
+
| "analytics"
|
|
499
|
+
| "data_processing",
|
|
500
|
+
channel: (field(form, "channel") || null) as
|
|
501
|
+
| "email"
|
|
502
|
+
| "sms"
|
|
503
|
+
| "push"
|
|
504
|
+
| "web"
|
|
505
|
+
| null,
|
|
506
|
+
state: field(form, "state") as "granted" | "denied" | "withdrawn",
|
|
507
|
+
method: field(form, "method") as
|
|
508
|
+
| "form"
|
|
509
|
+
| "preference_center"
|
|
510
|
+
| "double_opt_in"
|
|
511
|
+
| "verbal"
|
|
512
|
+
| "written"
|
|
513
|
+
| "contract"
|
|
514
|
+
| "import"
|
|
515
|
+
| "system",
|
|
516
|
+
termsVersion: field(form, "termsVersion") || null,
|
|
517
|
+
sourceUrl: field(form, "sourceUrl") || null,
|
|
518
|
+
expiresAt: field(form, "expiresAt")
|
|
519
|
+
? new Date(field(form, "expiresAt")).toISOString()
|
|
520
|
+
: null,
|
|
521
|
+
evidence: field(form, "evidenceNote")
|
|
522
|
+
? { note: field(form, "evidenceNote") }
|
|
523
|
+
: {},
|
|
524
|
+
},
|
|
525
|
+
actor,
|
|
526
|
+
);
|
|
527
|
+
messageKey = "privacy.message.consentRecorded";
|
|
528
|
+
break;
|
|
529
|
+
case "create": {
|
|
530
|
+
const kind = field(form, "kind") as
|
|
531
|
+
| "access"
|
|
532
|
+
| "export"
|
|
533
|
+
| "correction"
|
|
534
|
+
| "erasure";
|
|
535
|
+
const note = field(form, "note") || undefined;
|
|
536
|
+
await createDataRequest.call(
|
|
537
|
+
{
|
|
538
|
+
contactId: field(form, "contactId"),
|
|
539
|
+
jurisdiction: field(form, "jurisdiction") || null,
|
|
540
|
+
request:
|
|
541
|
+
kind === "correction"
|
|
542
|
+
? { kind, note, changes: correctionFrom(form) }
|
|
543
|
+
: { kind, note },
|
|
544
|
+
},
|
|
545
|
+
actor,
|
|
546
|
+
);
|
|
547
|
+
messageKey = "privacy.message.requestCreated";
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
case "verify":
|
|
551
|
+
await verifyDataRequest.call(
|
|
552
|
+
{ id: field(form, "requestId"), method: field(form, "method") },
|
|
553
|
+
actor,
|
|
554
|
+
);
|
|
555
|
+
messageKey = "privacy.message.verified";
|
|
556
|
+
break;
|
|
557
|
+
case "start":
|
|
558
|
+
await startDataRequest.call({ id: field(form, "requestId") }, actor);
|
|
559
|
+
messageKey = "privacy.message.started";
|
|
560
|
+
break;
|
|
561
|
+
case "retain":
|
|
562
|
+
await addRetentionException.call(
|
|
563
|
+
{
|
|
564
|
+
dataRequestId: field(form, "requestId"),
|
|
565
|
+
scope: field(form, "scope"),
|
|
566
|
+
reason: field(form, "reason") as
|
|
567
|
+
| "legal_obligation"
|
|
568
|
+
| "legal_claim"
|
|
569
|
+
| "contractual_obligation"
|
|
570
|
+
| "accounting_tax"
|
|
571
|
+
| "security_fraud",
|
|
572
|
+
legalBasis: field(form, "legalBasis"),
|
|
573
|
+
notes: field(form, "notes") || null,
|
|
574
|
+
expiresAt: field(form, "expiresAt")
|
|
575
|
+
? new Date(field(form, "expiresAt")).toISOString()
|
|
576
|
+
: null,
|
|
577
|
+
},
|
|
578
|
+
actor,
|
|
579
|
+
);
|
|
580
|
+
messageKey = "privacy.message.exceptionSaved";
|
|
581
|
+
break;
|
|
582
|
+
case "remove-retention":
|
|
583
|
+
await removeRetentionException.call(
|
|
584
|
+
{ id: field(form, "exceptionId") },
|
|
585
|
+
actor,
|
|
586
|
+
);
|
|
587
|
+
messageKey = "privacy.message.exceptionRemoved";
|
|
588
|
+
break;
|
|
589
|
+
case "fulfill":
|
|
590
|
+
await fulfillDataRequest.call(
|
|
591
|
+
{
|
|
592
|
+
id: field(form, "requestId"),
|
|
593
|
+
confirmation: field(form, "confirmation") || undefined,
|
|
594
|
+
},
|
|
595
|
+
actor,
|
|
596
|
+
);
|
|
597
|
+
messageKey = "privacy.message.fulfilled";
|
|
598
|
+
break;
|
|
599
|
+
case "deny":
|
|
600
|
+
await denyDataRequest.call(
|
|
601
|
+
{
|
|
602
|
+
id: field(form, "requestId"),
|
|
603
|
+
resolution: field(form, "resolution"),
|
|
604
|
+
},
|
|
605
|
+
actor,
|
|
606
|
+
);
|
|
607
|
+
messageKey = "privacy.message.denied";
|
|
608
|
+
break;
|
|
609
|
+
default:
|
|
610
|
+
throw new ServiceError("validation", "Choose a privacy-desk action.");
|
|
611
|
+
}
|
|
612
|
+
} catch (error) {
|
|
613
|
+
return { ...present(error), ...echo(previous, form) };
|
|
614
|
+
}
|
|
615
|
+
revalidatePath("/admin/contacts");
|
|
616
|
+
revalidatePath("/admin/contacts/privacy");
|
|
617
|
+
const requestId = field(form, "requestId");
|
|
618
|
+
if (requestId) revalidatePath(`/admin/contacts/privacy/${requestId}`);
|
|
619
|
+
const t = await getT();
|
|
620
|
+
return { saved: true, message: t(messageKey) };
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** High-risk queue recovery stays behind one step-up-protected service boundary. */
|
|
624
|
+
export async function jobControlAction(
|
|
625
|
+
previous: ActionState,
|
|
626
|
+
form: FormData,
|
|
627
|
+
): Promise<ActionState> {
|
|
628
|
+
const intent = field(form, "intent");
|
|
629
|
+
const name = field(form, "name");
|
|
630
|
+
const id = field(form, "id");
|
|
631
|
+
let messageKey: string;
|
|
632
|
+
try {
|
|
633
|
+
const actor = await currentActor();
|
|
634
|
+
switch (intent) {
|
|
635
|
+
case "cancel":
|
|
636
|
+
await cancelJobRun.call(
|
|
637
|
+
{ name, id, confirm: field(form, "confirmation") },
|
|
638
|
+
actor,
|
|
639
|
+
);
|
|
640
|
+
messageKey = "jobs.message.cancelled";
|
|
641
|
+
break;
|
|
642
|
+
case "retry":
|
|
643
|
+
await retryJobRun.call(
|
|
644
|
+
{ name, id, confirm: field(form, "confirmation") },
|
|
645
|
+
actor,
|
|
646
|
+
);
|
|
647
|
+
messageKey = "jobs.message.retried";
|
|
648
|
+
break;
|
|
649
|
+
case "redrive":
|
|
650
|
+
await redriveJobDeadLetters.call(
|
|
651
|
+
{
|
|
652
|
+
sourceName: field(form, "sourceName") || undefined,
|
|
653
|
+
limit: 1,
|
|
654
|
+
confirm: field(form, "confirmation"),
|
|
655
|
+
},
|
|
656
|
+
actor,
|
|
657
|
+
);
|
|
658
|
+
messageKey = "jobs.message.redriven";
|
|
659
|
+
break;
|
|
660
|
+
case "replay":
|
|
661
|
+
await replayOutboxEvent.call(
|
|
662
|
+
{ id, confirm: field(form, "confirmation") },
|
|
663
|
+
actor,
|
|
664
|
+
);
|
|
665
|
+
messageKey = "outbox.message.replayed";
|
|
666
|
+
break;
|
|
667
|
+
default:
|
|
668
|
+
throw new ServiceError("validation", "Choose a background-work action.");
|
|
669
|
+
}
|
|
670
|
+
} catch (error) {
|
|
671
|
+
return { ...present(error), ...echo(previous, form) };
|
|
672
|
+
}
|
|
673
|
+
revalidatePath("/admin");
|
|
674
|
+
revalidatePath("/admin/jobs");
|
|
675
|
+
revalidatePath("/admin/jobs/outbox");
|
|
676
|
+
if (name && id) revalidatePath(`/admin/jobs/${name}/${id}`);
|
|
677
|
+
if (intent === "replay" && id) revalidatePath(`/admin/jobs/outbox/${id}`);
|
|
678
|
+
const t = await getT();
|
|
679
|
+
return { saved: true, message: t(messageKey) };
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/* ------------------------------------------------- platform updates (C10.20) */
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Every §39.10 update action the admin offers, through the same services the
|
|
686
|
+
* CLI and MCP will call. The admin is a caller, never a shortcut.
|
|
687
|
+
*
|
|
688
|
+
* Applying an update is the only one that carries a typed confirmation: it
|
|
689
|
+
* cuts a live site over to a new build, and §39's whole argument is that this
|
|
690
|
+
* is safe *because* it is deliberate, snapshotted and reversible — not because
|
|
691
|
+
* it is easy to trigger by accident.
|
|
692
|
+
*/
|
|
693
|
+
export async function updateControlAction(
|
|
694
|
+
previous: ActionState,
|
|
695
|
+
form: FormData,
|
|
696
|
+
): Promise<ActionState> {
|
|
697
|
+
const intent = field(form, "intent");
|
|
698
|
+
let messageKey = "updates.message.saved";
|
|
699
|
+
try {
|
|
700
|
+
const actor = await currentActor();
|
|
701
|
+
switch (intent) {
|
|
702
|
+
case "hostApply": {
|
|
703
|
+
const { requestHostUpdate } = await import("@/core/update/host");
|
|
704
|
+
await requestHostUpdate.call({}, actor);
|
|
705
|
+
messageKey = "updates.host.queued";
|
|
706
|
+
break;
|
|
707
|
+
}
|
|
708
|
+
case "check": {
|
|
709
|
+
const result = await checkUpdates.call({}, actor);
|
|
710
|
+
messageKey = result.checked
|
|
711
|
+
? "updates.message.checked"
|
|
712
|
+
: result.reason === "off"
|
|
713
|
+
? "updates.message.checksOff"
|
|
714
|
+
: "updates.message.notMySlot";
|
|
715
|
+
break;
|
|
716
|
+
}
|
|
717
|
+
case "preflight":
|
|
718
|
+
await preflightUpdate.call(
|
|
719
|
+
{ targetVersion: field(form, "version") || undefined },
|
|
720
|
+
actor,
|
|
721
|
+
);
|
|
722
|
+
messageKey = "updates.message.preflighted";
|
|
723
|
+
break;
|
|
724
|
+
case "apply":
|
|
725
|
+
await applyUpdate.call(
|
|
726
|
+
{ toVersion: field(form, "version") || undefined },
|
|
727
|
+
actor,
|
|
728
|
+
);
|
|
729
|
+
messageKey = "updates.message.applied";
|
|
730
|
+
break;
|
|
731
|
+
case "pause":
|
|
732
|
+
case "resume":
|
|
733
|
+
case "savePolicy": {
|
|
734
|
+
const current = await getUpdatePolicy.call({}, actor);
|
|
735
|
+
// Pause and resume are the policy save with one field changed, rather
|
|
736
|
+
// than a second write path: two ways to change `pausedUntil` is two
|
|
737
|
+
// places for the snapshot pruning and validation to diverge.
|
|
738
|
+
const pausedUntil =
|
|
739
|
+
intent === "pause"
|
|
740
|
+
? new Date(Date.now() + 7 * 24 * 60 * 60 * 1000)
|
|
741
|
+
: intent === "resume"
|
|
742
|
+
? null
|
|
743
|
+
: field(form, "pausedUntil")
|
|
744
|
+
? new Date(field(form, "pausedUntil"))
|
|
745
|
+
: null;
|
|
746
|
+
const days = form.getAll("windowDays").filter((day): day is string => typeof day === "string");
|
|
747
|
+
await saveUpdatePolicy.call(
|
|
748
|
+
{
|
|
749
|
+
channel: (intent === "savePolicy"
|
|
750
|
+
? field(form, "channel")
|
|
751
|
+
: current.channel) as "security" | "stable" | "edge" | "off",
|
|
752
|
+
applyLevel: (intent === "savePolicy"
|
|
753
|
+
? field(form, "applyLevel")
|
|
754
|
+
: current.applyLevel) as "security" | "patch" | "minor" | "none",
|
|
755
|
+
window:
|
|
756
|
+
intent === "savePolicy" && days.length > 0
|
|
757
|
+
? { days: days as never, start: field(form, "windowStart", "03:00") }
|
|
758
|
+
: (current.window as never),
|
|
759
|
+
drain: intent === "savePolicy" ? field(form, "drain") === "on" : current.drain,
|
|
760
|
+
notifyChannels: (intent === "savePolicy"
|
|
761
|
+
? form.getAll("notifyChannels").filter((c): c is string => typeof c === "string")
|
|
762
|
+
: current.notifyChannels) as ("email" | "sms")[],
|
|
763
|
+
keepSnapshots:
|
|
764
|
+
intent === "savePolicy"
|
|
765
|
+
? Number(field(form, "keepSnapshots", "5"))
|
|
766
|
+
: current.keepSnapshots,
|
|
767
|
+
pausedUntil,
|
|
768
|
+
},
|
|
769
|
+
actor,
|
|
770
|
+
);
|
|
771
|
+
messageKey =
|
|
772
|
+
intent === "pause"
|
|
773
|
+
? "updates.message.paused"
|
|
774
|
+
: intent === "resume"
|
|
775
|
+
? "updates.message.resumed"
|
|
776
|
+
: "updates.message.saved";
|
|
777
|
+
break;
|
|
778
|
+
}
|
|
779
|
+
case "forkUpdate": {
|
|
780
|
+
const result = await openForkUpdate.call({}, actor);
|
|
781
|
+
if (!result.opened) {
|
|
782
|
+
return {
|
|
783
|
+
error: result.refusal ?? "The fork lane could not open a pull request.",
|
|
784
|
+
...echo(previous, form),
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
messageKey = "updates.message.forkOpened";
|
|
788
|
+
break;
|
|
789
|
+
}
|
|
790
|
+
case "rollback":
|
|
791
|
+
await rollbackUpdate.call({}, actor);
|
|
792
|
+
messageKey = "updates.message.rolledBack";
|
|
793
|
+
break;
|
|
794
|
+
default:
|
|
795
|
+
throw new ServiceError("validation", "Choose an update action.");
|
|
796
|
+
}
|
|
797
|
+
} catch (error) {
|
|
798
|
+
return { ...present(error), ...echo(previous, form) };
|
|
799
|
+
}
|
|
800
|
+
revalidatePath("/admin/updates");
|
|
801
|
+
revalidatePath("/admin/health");
|
|
802
|
+
const t = await getT();
|
|
803
|
+
return { saved: true, message: t(messageKey) };
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
/* --------------------------------------------- contact data depth (C1.06) */
|
|
807
|
+
|
|
808
|
+
function optionsOf(form: FormData): string[] {
|
|
809
|
+
return field(form, "options")
|
|
810
|
+
.split(/[\n,]/)
|
|
811
|
+
.map((option) => option.trim())
|
|
812
|
+
.filter(Boolean);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
export async function createOrganizationAction(
|
|
816
|
+
previous: ActionState,
|
|
817
|
+
form: FormData,
|
|
818
|
+
): Promise<ActionState> {
|
|
819
|
+
let id: string;
|
|
820
|
+
try {
|
|
821
|
+
const organization = await createOrganization.call(
|
|
822
|
+
{
|
|
823
|
+
name: field(form, "name"),
|
|
824
|
+
domain: field(form, "domain") || null,
|
|
825
|
+
customFields: customFieldsOf(form),
|
|
826
|
+
},
|
|
827
|
+
await currentActor(),
|
|
828
|
+
);
|
|
829
|
+
id = organization.id;
|
|
830
|
+
} catch (error) {
|
|
831
|
+
return { ...present(error), ...echo(previous, form) };
|
|
832
|
+
}
|
|
833
|
+
redirect(`/admin/contacts/organizations/${id}`);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
export async function updateOrganizationAction(
|
|
837
|
+
previous: ActionState,
|
|
838
|
+
form: FormData,
|
|
839
|
+
): Promise<ActionState> {
|
|
840
|
+
try {
|
|
841
|
+
await updateOrganization.call(
|
|
842
|
+
{
|
|
843
|
+
id: field(form, "id"),
|
|
844
|
+
name: field(form, "name"),
|
|
845
|
+
domain: field(form, "domain") || null,
|
|
846
|
+
customFields: customFieldsOf(form),
|
|
847
|
+
},
|
|
848
|
+
await currentActor(),
|
|
849
|
+
);
|
|
850
|
+
} catch (error) {
|
|
851
|
+
return { ...present(error), ...echo(previous, form) };
|
|
852
|
+
}
|
|
853
|
+
return { saved: true };
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export async function deleteOrganizationAction(
|
|
857
|
+
_previous: ActionState,
|
|
858
|
+
form: FormData,
|
|
859
|
+
): Promise<ActionState> {
|
|
860
|
+
try {
|
|
861
|
+
await deleteOrganization.call({ id: field(form, "id") }, await currentActor());
|
|
862
|
+
} catch (error) {
|
|
863
|
+
return present(error);
|
|
864
|
+
}
|
|
865
|
+
redirect("/admin/contacts/organizations");
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
const FIELD_KINDS = ["text", "number", "boolean", "date", "select"] as const;
|
|
869
|
+
const FIELD_ENTITIES = ["contact", "organization"] as const;
|
|
870
|
+
|
|
871
|
+
export async function createCustomFieldAction(
|
|
872
|
+
previous: ActionState,
|
|
873
|
+
form: FormData,
|
|
874
|
+
): Promise<ActionState> {
|
|
875
|
+
const kind = field(form, "kind");
|
|
876
|
+
const entity = field(form, "entity");
|
|
877
|
+
try {
|
|
878
|
+
await createCustomField.call(
|
|
879
|
+
{
|
|
880
|
+
entity: FIELD_ENTITIES.includes(entity as (typeof FIELD_ENTITIES)[number])
|
|
881
|
+
? (entity as (typeof FIELD_ENTITIES)[number])
|
|
882
|
+
: "contact",
|
|
883
|
+
key: field(form, "key"),
|
|
884
|
+
label: field(form, "label"),
|
|
885
|
+
kind: FIELD_KINDS.includes(kind as (typeof FIELD_KINDS)[number])
|
|
886
|
+
? (kind as (typeof FIELD_KINDS)[number])
|
|
887
|
+
: "text",
|
|
888
|
+
helpText: field(form, "helpText") || null,
|
|
889
|
+
options: optionsOf(form),
|
|
890
|
+
position: Number(field(form, "position", "0")) || 0,
|
|
891
|
+
},
|
|
892
|
+
await currentActor(),
|
|
893
|
+
);
|
|
894
|
+
} catch (error) {
|
|
895
|
+
return { ...present(error), ...echo(previous, form) };
|
|
896
|
+
}
|
|
897
|
+
redirect("/admin/contacts/fields");
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export async function updateCustomFieldAction(
|
|
901
|
+
previous: ActionState,
|
|
902
|
+
form: FormData,
|
|
903
|
+
): Promise<ActionState> {
|
|
904
|
+
try {
|
|
905
|
+
await updateCustomField.call(
|
|
906
|
+
{
|
|
907
|
+
id: field(form, "id"),
|
|
908
|
+
label: field(form, "label"),
|
|
909
|
+
helpText: field(form, "helpText") || null,
|
|
910
|
+
...(field(form, "kind") === "select" ? { options: optionsOf(form) } : {}),
|
|
911
|
+
position: Number(field(form, "position", "0")) || 0,
|
|
912
|
+
active: field(form, "active") === "true",
|
|
913
|
+
},
|
|
914
|
+
await currentActor(),
|
|
915
|
+
);
|
|
916
|
+
} catch (error) {
|
|
917
|
+
return { ...present(error), ...echo(previous, form) };
|
|
918
|
+
}
|
|
919
|
+
redirect("/admin/contacts/fields");
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
const RELATIONSHIP_KINDS = [
|
|
923
|
+
"household",
|
|
924
|
+
"employer",
|
|
925
|
+
"referred_by",
|
|
926
|
+
"partner",
|
|
927
|
+
"guardian",
|
|
928
|
+
"contact_book",
|
|
929
|
+
] as const;
|
|
930
|
+
|
|
931
|
+
function relationshipKindOf(form: FormData): (typeof RELATIONSHIP_KINDS)[number] {
|
|
932
|
+
const value = field(form, "kind");
|
|
933
|
+
return RELATIONSHIP_KINDS.includes(value as (typeof RELATIONSHIP_KINDS)[number])
|
|
934
|
+
? (value as (typeof RELATIONSHIP_KINDS)[number])
|
|
935
|
+
: "household";
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
export async function createRelationshipAction(
|
|
939
|
+
previous: ActionState,
|
|
940
|
+
form: FormData,
|
|
941
|
+
): Promise<ActionState> {
|
|
942
|
+
const contactId = field(form, "contactId");
|
|
943
|
+
try {
|
|
944
|
+
await createRelationship.call(
|
|
945
|
+
{
|
|
946
|
+
fromContactId: contactId,
|
|
947
|
+
toContactId: field(form, "otherContactId"),
|
|
948
|
+
kind: relationshipKindOf(form),
|
|
949
|
+
since: field(form, "since") || null,
|
|
950
|
+
notes: field(form, "notes") || null,
|
|
951
|
+
},
|
|
952
|
+
await currentActor(),
|
|
953
|
+
);
|
|
954
|
+
} catch (error) {
|
|
955
|
+
return { ...present(error), ...echo(previous, form) };
|
|
956
|
+
}
|
|
957
|
+
redirect(`/admin/contacts/${contactId}`);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
export async function updateRelationshipAction(
|
|
961
|
+
previous: ActionState,
|
|
962
|
+
form: FormData,
|
|
963
|
+
): Promise<ActionState> {
|
|
964
|
+
const contactId = field(form, "contactId");
|
|
965
|
+
try {
|
|
966
|
+
await updateRelationship.call(
|
|
967
|
+
{
|
|
968
|
+
id: field(form, "id"),
|
|
969
|
+
fromContactId: contactId,
|
|
970
|
+
toContactId: field(form, "otherContactId"),
|
|
971
|
+
kind: relationshipKindOf(form),
|
|
972
|
+
since: field(form, "since") || null,
|
|
973
|
+
notes: field(form, "notes") || null,
|
|
974
|
+
},
|
|
975
|
+
await currentActor(),
|
|
976
|
+
);
|
|
977
|
+
} catch (error) {
|
|
978
|
+
return { ...present(error), ...echo(previous, form) };
|
|
979
|
+
}
|
|
980
|
+
redirect(`/admin/contacts/${contactId}`);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export async function deleteRelationshipAction(
|
|
984
|
+
_previous: ActionState,
|
|
985
|
+
form: FormData,
|
|
986
|
+
): Promise<ActionState> {
|
|
987
|
+
const contactId = field(form, "contactId");
|
|
988
|
+
try {
|
|
989
|
+
await deleteRelationship.call({ id: field(form, "id") }, await currentActor());
|
|
990
|
+
} catch (error) {
|
|
991
|
+
return present(error);
|
|
992
|
+
}
|
|
993
|
+
revalidatePath(`/admin/contacts/${contactId}`);
|
|
994
|
+
redirect(`/admin/contacts/${contactId}`);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/* ------------------------------------------------------------- locations */
|
|
998
|
+
|
|
999
|
+
/** A number field that may legitimately be blank — coordinates, a radius. */
|
|
1000
|
+
function optionalNumber(form: FormData, key: string): number | undefined {
|
|
1001
|
+
const raw = field(form, key).trim();
|
|
1002
|
+
if (!raw) return undefined;
|
|
1003
|
+
const value = Number(raw);
|
|
1004
|
+
return Number.isFinite(value) ? value : undefined;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
/** A text field where blank means "clear it", not "leave it alone". */
|
|
1008
|
+
function nullable(form: FormData, key: string): string | null {
|
|
1009
|
+
return field(form, key).trim() || null;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Create or change a location (§4.10).
|
|
1014
|
+
*
|
|
1015
|
+
* One action for both, because the form is the same form: a location being
|
|
1016
|
+
* added and a location being edited differ only in whether an id came with
|
|
1017
|
+
* it, and two nearly identical actions is how the create path quietly loses a
|
|
1018
|
+
* field the edit path gained.
|
|
1019
|
+
*/
|
|
1020
|
+
export async function saveLocationAction(
|
|
1021
|
+
previous: ActionState,
|
|
1022
|
+
form: FormData,
|
|
1023
|
+
): Promise<ActionState> {
|
|
1024
|
+
const id = field(form, "id");
|
|
1025
|
+
const shared = {
|
|
1026
|
+
name: field(form, "name"),
|
|
1027
|
+
slug: field(form, "slug"),
|
|
1028
|
+
street: nullable(form, "street"),
|
|
1029
|
+
unit: nullable(form, "unit"),
|
|
1030
|
+
city: nullable(form, "city"),
|
|
1031
|
+
region: nullable(form, "region"),
|
|
1032
|
+
postalCode: nullable(form, "postalCode"),
|
|
1033
|
+
country: field(form, "country"),
|
|
1034
|
+
latitude: optionalNumber(form, "latitude") ?? null,
|
|
1035
|
+
longitude: optionalNumber(form, "longitude") ?? null,
|
|
1036
|
+
phone: nullable(form, "phone"),
|
|
1037
|
+
email: nullable(form, "email"),
|
|
1038
|
+
googleBusinessProfileUrl: nullable(form, "googleBusinessProfileUrl"),
|
|
1039
|
+
priceRange: nullable(form, "priceRange"),
|
|
1040
|
+
schemaType: nullable(form, "schemaType"),
|
|
1041
|
+
status: field(form, "status") === "hidden" ? ("hidden" as const) : ("visible" as const),
|
|
1042
|
+
sameAs: field(form, "sameAs")
|
|
1043
|
+
.split(/[\n,]/)
|
|
1044
|
+
.map((line) => line.trim())
|
|
1045
|
+
.filter(Boolean),
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
// The redirect is deliberately outside the try: `redirect` works by throwing
|
|
1049
|
+
// a signal Next catches, so calling it inside would hand every successful
|
|
1050
|
+
// create to the error branch and show an owner a failure for a location that
|
|
1051
|
+
// saved perfectly. Same shape as mergeContactAction above.
|
|
1052
|
+
let createdId: string | null = null;
|
|
1053
|
+
try {
|
|
1054
|
+
const actor = await currentActor();
|
|
1055
|
+
if (id) {
|
|
1056
|
+
await updateLocation.call({ id, ...shared }, actor);
|
|
1057
|
+
} else {
|
|
1058
|
+
createdId = (await createLocation.call(shared, actor)).id;
|
|
1059
|
+
}
|
|
1060
|
+
} catch (error) {
|
|
1061
|
+
return { ...present(error), ...echo(previous, form) };
|
|
1062
|
+
}
|
|
1063
|
+
if (createdId) redirect(`/admin/locations/${createdId}`);
|
|
1064
|
+
return { saved: true };
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
/** §4.10's primary: the location whose NAP is the business's own. */
|
|
1068
|
+
export async function setPrimaryLocationAction(
|
|
1069
|
+
_previous: ActionState,
|
|
1070
|
+
form: FormData,
|
|
1071
|
+
): Promise<ActionState> {
|
|
1072
|
+
try {
|
|
1073
|
+
await setPrimaryLocation.call({ id: field(form, "id") }, await currentActor());
|
|
1074
|
+
} catch (error) {
|
|
1075
|
+
return present(error);
|
|
1076
|
+
}
|
|
1077
|
+
return { saved: true };
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
export async function deleteLocationAction(
|
|
1081
|
+
_previous: ActionState,
|
|
1082
|
+
form: FormData,
|
|
1083
|
+
): Promise<ActionState> {
|
|
1084
|
+
try {
|
|
1085
|
+
await deleteLocation.call({ id: field(form, "id") }, await currentActor());
|
|
1086
|
+
} catch (error) {
|
|
1087
|
+
return present(error);
|
|
1088
|
+
}
|
|
1089
|
+
redirect("/admin/locations");
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* A whole week of hours in one save.
|
|
1094
|
+
*
|
|
1095
|
+
* The form posts seven rows whatever the owner filled in, and a row with no
|
|
1096
|
+
* times and no closed box is a day nobody has said anything about — dropped
|
|
1097
|
+
* here rather than sent as a half-filled entry the service would reject.
|
|
1098
|
+
*/
|
|
1099
|
+
export async function saveOpeningHoursAction(
|
|
1100
|
+
_previous: ActionState,
|
|
1101
|
+
form: FormData,
|
|
1102
|
+
): Promise<ActionState> {
|
|
1103
|
+
const entries: Array<{
|
|
1104
|
+
weekday: number;
|
|
1105
|
+
opens?: string;
|
|
1106
|
+
closes?: string;
|
|
1107
|
+
closed: boolean;
|
|
1108
|
+
}> = [];
|
|
1109
|
+
|
|
1110
|
+
for (let weekday = 0; weekday < 7; weekday++) {
|
|
1111
|
+
const closed = form.get(`closed-${weekday}`) === "on";
|
|
1112
|
+
const opens = field(form, `opens-${weekday}`).trim();
|
|
1113
|
+
const closes = field(form, `closes-${weekday}`).trim();
|
|
1114
|
+
if (closed) {
|
|
1115
|
+
entries.push({ weekday, closed: true });
|
|
1116
|
+
} else if (opens && closes) {
|
|
1117
|
+
entries.push({ weekday, opens, closes, closed: false });
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
try {
|
|
1122
|
+
await setOpeningHours.call(
|
|
1123
|
+
{ locationId: field(form, "locationId"), entries },
|
|
1124
|
+
await currentActor(),
|
|
1125
|
+
);
|
|
1126
|
+
} catch (error) {
|
|
1127
|
+
return present(error);
|
|
1128
|
+
}
|
|
1129
|
+
return { saved: true };
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/** Where the business will travel to, or nowhere (§4.10's ServiceArea). */
|
|
1133
|
+
export async function saveServiceAreaAction(
|
|
1134
|
+
_previous: ActionState,
|
|
1135
|
+
form: FormData,
|
|
1136
|
+
): Promise<ActionState> {
|
|
1137
|
+
const kind = field(form, "kind");
|
|
1138
|
+
const regions = field(form, "regions")
|
|
1139
|
+
.split(/[\n,]/)
|
|
1140
|
+
.map((line) => line.trim())
|
|
1141
|
+
.filter(Boolean);
|
|
1142
|
+
const postalCodes = field(form, "postalCodes")
|
|
1143
|
+
.split(/[\n,]/)
|
|
1144
|
+
.map((line) => line.trim())
|
|
1145
|
+
.filter(Boolean);
|
|
1146
|
+
const latitude = optionalNumber(form, "centerLatitude");
|
|
1147
|
+
const longitude = optionalNumber(form, "centerLongitude");
|
|
1148
|
+
const radiusKm = optionalNumber(form, "radiusKm");
|
|
1149
|
+
// The delivery window saves as a whole (days + both times); the service
|
|
1150
|
+
// validates the shape, so this only collects what the owner ticked.
|
|
1151
|
+
const deliveryDays = form
|
|
1152
|
+
.getAll("deliveryDays")
|
|
1153
|
+
.filter((value): value is string => typeof value === "string")
|
|
1154
|
+
.map((value) => Number(value))
|
|
1155
|
+
.filter((value) => Number.isInteger(value) && value >= 0 && value <= 6);
|
|
1156
|
+
const deliveryOpens = field(form, "deliveryOpens").trim();
|
|
1157
|
+
const deliveryCloses = field(form, "deliveryCloses").trim();
|
|
1158
|
+
|
|
1159
|
+
let area:
|
|
1160
|
+
| { kind: "radius"; centerLatitude: number; centerLongitude: number; radiusKm: number }
|
|
1161
|
+
| { kind: "regions"; regions: string[] }
|
|
1162
|
+
| { kind: "postal_codes"; postalCodes: string[] }
|
|
1163
|
+
| null = null;
|
|
1164
|
+
if (kind === "radius" && latitude !== undefined && longitude !== undefined && radiusKm) {
|
|
1165
|
+
area = { kind: "radius", centerLatitude: latitude, centerLongitude: longitude, radiusKm };
|
|
1166
|
+
} else if (kind === "regions" && regions.length > 0) {
|
|
1167
|
+
area = { kind: "regions", regions };
|
|
1168
|
+
} else if (kind === "postal_codes" && postalCodes.length > 0) {
|
|
1169
|
+
area = { kind: "postal_codes", postalCodes };
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
const delivery =
|
|
1173
|
+
deliveryDays.length > 0 || deliveryOpens || deliveryCloses
|
|
1174
|
+
? { weekdays: deliveryDays, opens: deliveryOpens, closes: deliveryCloses }
|
|
1175
|
+
: null;
|
|
1176
|
+
|
|
1177
|
+
try {
|
|
1178
|
+
await setServiceArea.call(
|
|
1179
|
+
{ locationId: field(form, "locationId"), area, delivery },
|
|
1180
|
+
await currentActor(),
|
|
1181
|
+
);
|
|
1182
|
+
} catch (error) {
|
|
1183
|
+
return present(error);
|
|
1184
|
+
}
|
|
1185
|
+
return { saved: true };
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
/* -------------------------------------------------------------- api keys */
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Mint a key (§26).
|
|
1192
|
+
*
|
|
1193
|
+
* The token comes back in the action state because it is the only moment it
|
|
1194
|
+
* exists outside the database — only its hash was stored, so a caller who
|
|
1195
|
+
* loses it has to mint another. It is deliberately *not* redirected through,
|
|
1196
|
+
* which would put a credential in a URL.
|
|
1197
|
+
*/
|
|
1198
|
+
export async function createApiKeyAction(
|
|
1199
|
+
previous: ActionState,
|
|
1200
|
+
form: FormData,
|
|
1201
|
+
): Promise<ActionState> {
|
|
1202
|
+
// Each area contributes one value: "none", "read", or "full". The read case
|
|
1203
|
+
// expands to the query services of that area, so least privilege is a
|
|
1204
|
+
// one-click choice rather than a checklist somebody skips.
|
|
1205
|
+
const scopes: string[] = [];
|
|
1206
|
+
for (const [key, value] of form.entries()) {
|
|
1207
|
+
if (!key.startsWith("access-") || typeof value !== "string") continue;
|
|
1208
|
+
const area = key.slice("access-".length);
|
|
1209
|
+
if (value === "full") {
|
|
1210
|
+
scopes.push(`${area}.*`);
|
|
1211
|
+
} else if (value === "read") {
|
|
1212
|
+
const reads = field(form, `reads-${area}`)
|
|
1213
|
+
.split(",")
|
|
1214
|
+
.map((name) => name.trim())
|
|
1215
|
+
.filter(Boolean);
|
|
1216
|
+
scopes.push(...reads);
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
try {
|
|
1221
|
+
const days = Number(field(form, "expiresInDays", ""));
|
|
1222
|
+
const key = await createApiKey.call(
|
|
1223
|
+
{
|
|
1224
|
+
name: field(form, "name"),
|
|
1225
|
+
scopes,
|
|
1226
|
+
expiresInDays: Number.isFinite(days) && days > 0 ? days : undefined,
|
|
1227
|
+
},
|
|
1228
|
+
await currentActor(),
|
|
1229
|
+
);
|
|
1230
|
+
// Without this the server component behind this card re-renders from its
|
|
1231
|
+
// cached result, and an owner who has just minted a key reads "No keys
|
|
1232
|
+
// yet" directly underneath the key they are holding.
|
|
1233
|
+
revalidatePath("/admin/settings");
|
|
1234
|
+
return { saved: true, message: key.token };
|
|
1235
|
+
} catch (error) {
|
|
1236
|
+
return { ...present(error), ...echo(previous, form) };
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
export async function revokeApiKeyAction(
|
|
1241
|
+
_previous: ActionState,
|
|
1242
|
+
form: FormData,
|
|
1243
|
+
): Promise<ActionState> {
|
|
1244
|
+
try {
|
|
1245
|
+
await revokeApiKey.call({ id: field(form, "id") }, await currentActor());
|
|
1246
|
+
} catch (error) {
|
|
1247
|
+
return present(error);
|
|
1248
|
+
}
|
|
1249
|
+
revalidatePath("/admin/settings");
|
|
1250
|
+
return { saved: true };
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
/* --------------------------------------------------------- roles & grants */
|
|
1254
|
+
|
|
1255
|
+
function grantsOf(form: FormData) {
|
|
1256
|
+
const grants: Array<{
|
|
1257
|
+
module: string;
|
|
1258
|
+
access: "view" | "manage";
|
|
1259
|
+
}> = [];
|
|
1260
|
+
for (const [key, value] of form.entries()) {
|
|
1261
|
+
if (!key.startsWith("grant-") || (value !== "view" && value !== "manage")) {
|
|
1262
|
+
continue;
|
|
1263
|
+
}
|
|
1264
|
+
grants.push({ module: key.slice("grant-".length), access: value });
|
|
1265
|
+
}
|
|
1266
|
+
return grants;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
export async function createRoleAction(
|
|
1270
|
+
previous: ActionState,
|
|
1271
|
+
form: FormData,
|
|
1272
|
+
): Promise<ActionState> {
|
|
1273
|
+
try {
|
|
1274
|
+
await createRole.call(
|
|
1275
|
+
{
|
|
1276
|
+
name: field(form, "name"),
|
|
1277
|
+
description: field(form, "description"),
|
|
1278
|
+
grants: grantsOf(form),
|
|
1279
|
+
},
|
|
1280
|
+
await currentActor(),
|
|
1281
|
+
);
|
|
1282
|
+
} catch (error) {
|
|
1283
|
+
return { ...present(error), ...echo(previous, form) };
|
|
1284
|
+
}
|
|
1285
|
+
revalidatePath("/admin/roles");
|
|
1286
|
+
return { saved: true };
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
export async function updateRoleAction(
|
|
1290
|
+
previous: ActionState,
|
|
1291
|
+
form: FormData,
|
|
1292
|
+
): Promise<ActionState> {
|
|
1293
|
+
try {
|
|
1294
|
+
await updateRole.call(
|
|
1295
|
+
{
|
|
1296
|
+
key: field(form, "key"),
|
|
1297
|
+
name: field(form, "name"),
|
|
1298
|
+
description: field(form, "description"),
|
|
1299
|
+
grants: grantsOf(form),
|
|
1300
|
+
},
|
|
1301
|
+
await currentActor(),
|
|
1302
|
+
);
|
|
1303
|
+
} catch (error) {
|
|
1304
|
+
return { ...present(error), ...echo(previous, form) };
|
|
1305
|
+
}
|
|
1306
|
+
revalidatePath("/admin/roles");
|
|
1307
|
+
return { saved: true };
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
export async function deleteRoleAction(
|
|
1311
|
+
_previous: ActionState,
|
|
1312
|
+
form: FormData,
|
|
1313
|
+
): Promise<ActionState> {
|
|
1314
|
+
try {
|
|
1315
|
+
await deleteRole.call({ key: field(form, "key") }, await currentActor());
|
|
1316
|
+
} catch (error) {
|
|
1317
|
+
return present(error);
|
|
1318
|
+
}
|
|
1319
|
+
revalidatePath("/admin/roles");
|
|
1320
|
+
return { saved: true };
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
export async function assignRoleAction(
|
|
1324
|
+
_previous: ActionState,
|
|
1325
|
+
form: FormData,
|
|
1326
|
+
): Promise<ActionState> {
|
|
1327
|
+
try {
|
|
1328
|
+
await assignRole.call(
|
|
1329
|
+
{ userId: field(form, "userId"), roleKey: field(form, "roleKey") },
|
|
1330
|
+
await currentActor(),
|
|
1331
|
+
);
|
|
1332
|
+
} catch (error) {
|
|
1333
|
+
return present(error);
|
|
1334
|
+
}
|
|
1335
|
+
revalidatePath("/admin/roles");
|
|
1336
|
+
return { saved: true };
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
/* -------------------------------------------------------------- webhooks */
|
|
1340
|
+
|
|
1341
|
+
/** Comma- or newline-separated event patterns, as the form collects them. */
|
|
1342
|
+
function patternsOf(form: FormData): string[] {
|
|
1343
|
+
return field(form, "events")
|
|
1344
|
+
.split(/[\n,]/)
|
|
1345
|
+
.map((entry) => entry.trim())
|
|
1346
|
+
.filter(Boolean);
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
export async function createWebhookAction(
|
|
1350
|
+
previous: ActionState,
|
|
1351
|
+
form: FormData,
|
|
1352
|
+
): Promise<ActionState> {
|
|
1353
|
+
try {
|
|
1354
|
+
await createWebhook.call(
|
|
1355
|
+
{
|
|
1356
|
+
name: field(form, "name"),
|
|
1357
|
+
url: field(form, "url"),
|
|
1358
|
+
events: patternsOf(form),
|
|
1359
|
+
},
|
|
1360
|
+
await currentActor(),
|
|
1361
|
+
);
|
|
1362
|
+
} catch (error) {
|
|
1363
|
+
return { ...present(error), ...echo(previous, form) };
|
|
1364
|
+
}
|
|
1365
|
+
revalidatePath("/admin/settings");
|
|
1366
|
+
return { saved: true };
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* Pause, resume, test, reveal or delete — one action, because they are one
|
|
1371
|
+
* row's worth of controls and five near-identical actions is how one of them
|
|
1372
|
+
* ends up forgetting to revalidate.
|
|
1373
|
+
*/
|
|
1374
|
+
export async function webhookAction(
|
|
1375
|
+
_previous: ActionState,
|
|
1376
|
+
form: FormData,
|
|
1377
|
+
): Promise<ActionState> {
|
|
1378
|
+
const id = field(form, "id");
|
|
1379
|
+
const intent = field(form, "intent");
|
|
1380
|
+
try {
|
|
1381
|
+
const actor = await currentActor();
|
|
1382
|
+
switch (intent) {
|
|
1383
|
+
case "pause":
|
|
1384
|
+
await updateWebhook.call({ id, status: "paused" }, actor);
|
|
1385
|
+
break;
|
|
1386
|
+
case "resume":
|
|
1387
|
+
await updateWebhook.call({ id, status: "active" }, actor);
|
|
1388
|
+
break;
|
|
1389
|
+
case "test":
|
|
1390
|
+
await testWebhook.call({ id }, actor);
|
|
1391
|
+
break;
|
|
1392
|
+
case "remove":
|
|
1393
|
+
await deleteWebhook.call({ id }, actor);
|
|
1394
|
+
break;
|
|
1395
|
+
case "reveal": {
|
|
1396
|
+
const { secret } = await revealWebhookSecret.call({ id }, actor);
|
|
1397
|
+
revalidatePath("/admin/settings");
|
|
1398
|
+
return { saved: true, message: secret };
|
|
1399
|
+
}
|
|
1400
|
+
default:
|
|
1401
|
+
return { error: "Unknown action." };
|
|
1402
|
+
}
|
|
1403
|
+
} catch (error) {
|
|
1404
|
+
return present(error);
|
|
1405
|
+
}
|
|
1406
|
+
revalidatePath("/admin/settings");
|
|
1407
|
+
return { saved: true };
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
export async function replayWebhookDeliveryAction(form: FormData): Promise<void> {
|
|
1411
|
+
const id = field(form, "id");
|
|
1412
|
+
try {
|
|
1413
|
+
await replayDelivery.call({ id }, await currentActor());
|
|
1414
|
+
} catch (error) {
|
|
1415
|
+
const message = error instanceof ServiceError ? error.message : "That delivery could not be replayed.";
|
|
1416
|
+
redirect(`/admin/settings?error=${encodeURIComponent(message)}`);
|
|
1417
|
+
}
|
|
1418
|
+
revalidatePath("/admin/settings");
|
|
1419
|
+
redirect("/admin/settings?webhook=replayed");
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
/* ------------------------------------------------------------------- mail */
|
|
1423
|
+
|
|
1424
|
+
export async function connectMailAction(
|
|
1425
|
+
_previous: ActionState,
|
|
1426
|
+
form: FormData,
|
|
1427
|
+
): Promise<ActionState> {
|
|
1428
|
+
const rawProvider = field(form, "provider");
|
|
1429
|
+
if (rawProvider !== "google" && rawProvider !== "microsoft") {
|
|
1430
|
+
return { error: "Choose Google or Microsoft." };
|
|
1431
|
+
}
|
|
1432
|
+
let authorizationUrl: string;
|
|
1433
|
+
try {
|
|
1434
|
+
const result = await beginMailOAuth.call(
|
|
1435
|
+
{
|
|
1436
|
+
provider: rawProvider,
|
|
1437
|
+
returnTo: "/admin/settings?section=mail",
|
|
1438
|
+
},
|
|
1439
|
+
await currentActor(),
|
|
1440
|
+
);
|
|
1441
|
+
authorizationUrl = result.authorizationUrl;
|
|
1442
|
+
} catch (error) {
|
|
1443
|
+
return present(error);
|
|
1444
|
+
}
|
|
1445
|
+
redirect(authorizationUrl);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
export async function registerMailSenderAction(
|
|
1449
|
+
previous: ActionState,
|
|
1450
|
+
form: FormData,
|
|
1451
|
+
): Promise<ActionState> {
|
|
1452
|
+
const purpose = field(form, "purpose");
|
|
1453
|
+
const provider = field(form, "provider");
|
|
1454
|
+
if (
|
|
1455
|
+
(purpose !== "transactional" && purpose !== "bulk") ||
|
|
1456
|
+
!["smtp", "resend", "postmark", "ses"].includes(provider)
|
|
1457
|
+
) {
|
|
1458
|
+
return { error: "That configured mail sender is not available." };
|
|
1459
|
+
}
|
|
1460
|
+
try {
|
|
1461
|
+
await registerMailSender.call(
|
|
1462
|
+
{
|
|
1463
|
+
purpose,
|
|
1464
|
+
provider: provider as "smtp" | "resend" | "postmark" | "ses",
|
|
1465
|
+
email: field(form, "email"),
|
|
1466
|
+
displayName: field(form, "displayName") || undefined,
|
|
1467
|
+
providerIdentity: field(form, "providerIdentity") || undefined,
|
|
1468
|
+
},
|
|
1469
|
+
await currentActor(),
|
|
1470
|
+
);
|
|
1471
|
+
} catch (error) {
|
|
1472
|
+
return { ...present(error), ...echo(previous, form) };
|
|
1473
|
+
}
|
|
1474
|
+
revalidatePath("/admin/settings");
|
|
1475
|
+
return { saved: true };
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
export async function mailSenderAction(
|
|
1479
|
+
_previous: ActionState,
|
|
1480
|
+
form: FormData,
|
|
1481
|
+
): Promise<ActionState> {
|
|
1482
|
+
const id = field(form, "id");
|
|
1483
|
+
const intent = field(form, "intent");
|
|
1484
|
+
try {
|
|
1485
|
+
const actor = await currentActor();
|
|
1486
|
+
switch (intent) {
|
|
1487
|
+
case "verify":
|
|
1488
|
+
await verifyMailSender.call({ id }, actor);
|
|
1489
|
+
break;
|
|
1490
|
+
case "default":
|
|
1491
|
+
await setDefaultMailSender.call({ id }, actor);
|
|
1492
|
+
break;
|
|
1493
|
+
case "pause":
|
|
1494
|
+
await updateMailSender.call({ id, status: "paused" }, actor);
|
|
1495
|
+
break;
|
|
1496
|
+
case "activate":
|
|
1497
|
+
await updateMailSender.call({ id, status: "active" }, actor);
|
|
1498
|
+
break;
|
|
1499
|
+
case "test":
|
|
1500
|
+
await testMailSender.call({ id }, actor);
|
|
1501
|
+
break;
|
|
1502
|
+
default:
|
|
1503
|
+
return { error: "Unknown mail action." };
|
|
1504
|
+
}
|
|
1505
|
+
} catch (error) {
|
|
1506
|
+
return present(error);
|
|
1507
|
+
}
|
|
1508
|
+
revalidatePath("/admin/settings");
|
|
1509
|
+
return { saved: true };
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
export async function releaseMailSuppressionAction(
|
|
1513
|
+
previous: ActionState,
|
|
1514
|
+
form: FormData,
|
|
1515
|
+
): Promise<ActionState> {
|
|
1516
|
+
try {
|
|
1517
|
+
await releaseMailSuppression.call(
|
|
1518
|
+
{
|
|
1519
|
+
email: field(form, "email"),
|
|
1520
|
+
confirmation: field(form, "confirmation"),
|
|
1521
|
+
},
|
|
1522
|
+
await currentActor(),
|
|
1523
|
+
);
|
|
1524
|
+
} catch (error) {
|
|
1525
|
+
return { ...present(error), ...echo(previous, form) };
|
|
1526
|
+
}
|
|
1527
|
+
revalidatePath("/admin/settings");
|
|
1528
|
+
return { saved: true };
|
|
1529
|
+
}
|