@cosmicdrift/kumiko-samples 0.413.1 → 0.415.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/bundled-features/package.json +16 -1
- package/packages/bundled-features/src/admin-shell/changes.json +6 -0
- package/packages/bundled-features/src/admin-shell/feature.ts +8 -7
- package/packages/bundled-features/src/agent-tools/agent-doc-lint.ts +5 -1
- package/packages/bundled-features/src/agent-tools/agent-manifest.ts +36 -27
- package/packages/bundled-features/src/agent-tools/api-docs/collect-events.ts +8 -1
- package/packages/bundled-features/src/agent-tools/api-docs/collect.ts +3 -2
- package/packages/bundled-features/src/agent-tools/api-docs/generate.ts +6 -0
- package/packages/bundled-features/src/agent-tools/api-docs/index.ts +1 -0
- package/packages/bundled-features/src/agent-tools/api-docs/problems.ts +38 -1
- package/packages/bundled-features/src/agent-tools/api-docs/render-openapi.ts +1 -0
- package/packages/bundled-features/src/agent-tools/api-docs/resolve-config.ts +17 -0
- package/packages/bundled-features/src/agent-tools/api-docs/scope-slug-collisions.ts +17 -0
- package/packages/bundled-features/src/agent-tools/api-docs/translation-gaps.ts +42 -0
- package/packages/bundled-features/src/agent-tools/api-docs/webhook-example-problems.ts +30 -0
- package/packages/bundled-features/src/agent-tools/changes.json +12 -0
- package/packages/bundled-features/src/agent-tools/index.ts +1 -0
- package/packages/bundled-features/src/agent-tools/labels.ts +19 -6
- package/packages/bundled-features/src/agent-tools/tool-catalog.ts +18 -7
- package/packages/bundled-features/src/agent-tools/tool-dispatch.ts +14 -1
- package/packages/bundled-features/src/agent-tools/types.ts +4 -0
- package/packages/bundled-features/src/audit/event-classification.ts +6 -0
- package/packages/bundled-features/src/audit/web/i18n.ts +1 -0
- package/packages/bundled-features/src/auth-email-password/changes.json +18 -0
- package/packages/bundled-features/src/auth-email-password/errors.ts +0 -13
- package/packages/bundled-features/src/auth-email-password/handlers/invite-signup-complete.write.ts +147 -121
- package/packages/bundled-features/src/auth-email-password/handlers/login-options.query.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/handlers/request-account-unlock.write.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/handlers/request-email-verification.write.ts +0 -1
- package/packages/bundled-features/src/auth-email-password/handlers/request-password-reset.write.ts +0 -1
- package/packages/bundled-features/src/auth-email-password/handlers/self-registration-status.query.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/reset-token.ts +0 -2
- package/packages/bundled-features/src/auth-email-password/seeding.ts +39 -7
- package/packages/bundled-features/src/auth-email-password/signup-token-store.ts +2 -3
- package/packages/bundled-features/src/auth-email-password/unlock-token.ts +0 -2
- package/packages/bundled-features/src/auth-email-password/verification-token.ts +0 -2
- package/packages/bundled-features/src/auth-email-password/web/auth-form-primitives.tsx +2 -2
- package/packages/bundled-features/src/auth-email-password/web/auth-gate.tsx +2 -2
- package/packages/bundled-features/src/auth-email-password/web/auth-redirect.ts +5 -0
- package/packages/bundled-features/src/auth-email-password/web/forgot-password-screen.tsx +1 -6
- package/packages/bundled-features/src/auth-email-password/web/invite-accept-screen.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/return-path.ts +2 -1
- package/packages/bundled-features/src/auth-email-password/web/session.tsx +12 -13
- package/packages/bundled-features/src/auth-email-password/web/signup-screen.tsx +1 -6
- package/packages/bundled-features/src/auth-email-password/web/static-account.ts +6 -1
- package/packages/bundled-features/src/auth-email-password/web/tenant-switcher.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/token-confirm-screen.tsx +4 -5
- package/packages/bundled-features/src/auth-email-password/web/user-menu.tsx +1 -1
- package/packages/bundled-features/src/auth-mfa/changes.json +6 -0
- package/packages/bundled-features/src/auth-mfa/web/mfa-code-or-recovery-field.tsx +17 -1
- package/packages/bundled-features/src/auth-mfa/web/mfa-disable-dialog.tsx +1 -1
- package/packages/bundled-features/src/auth-mfa/web/mfa-regenerate-recovery-dialog.tsx +1 -1
- package/packages/bundled-features/src/auth-mfa/web/mfa-setup-preauth-screen.tsx +1 -1
- package/packages/bundled-features/src/auth-mfa/web/mfa-verify-screen.tsx +16 -47
- package/packages/bundled-features/src/auth-mfa-user-data/index.ts +5 -6
- package/packages/bundled-features/src/billing-foundation/aggregate-id.ts +0 -4
- package/packages/bundled-features/src/billing-foundation/changes.json +61 -0
- package/packages/bundled-features/src/billing-foundation/checkout-core.ts +19 -1
- package/packages/bundled-features/src/billing-foundation/checkout-ledger.ts +67 -0
- package/packages/bundled-features/src/billing-foundation/consumer-protection/consent-gate.ts +2 -1
- package/packages/bundled-features/src/billing-foundation/consumer-protection/consent-text.ts +49 -2
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-open-cancels.ts +5 -0
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-provider-timeout.ts +23 -0
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-record.ts +12 -7
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-revoke.ts +1 -1
- package/packages/bundled-features/src/billing-foundation/events.ts +51 -10
- package/packages/bundled-features/src/billing-foundation/feature.ts +15 -1
- package/packages/bundled-features/src/billing-foundation/handlers/billing-plans.query.ts +47 -14
- package/packages/bundled-features/src/billing-foundation/handlers/create-checkout-session.write.ts +9 -1
- package/packages/bundled-features/src/billing-foundation/handlers/process-event.write.ts +183 -17
- package/packages/bundled-features/src/billing-foundation/handlers/process-payment-event.write.ts +35 -10
- package/packages/bundled-features/src/billing-foundation/handlers/record-checkout-opened.write.ts +25 -0
- package/packages/bundled-features/src/billing-foundation/handlers/start-plan-checkout.write.ts +9 -1
- package/packages/bundled-features/src/billing-foundation/handlers/switch-plan.write.ts +16 -4
- package/packages/bundled-features/src/billing-foundation/i18n.ts +3 -0
- package/packages/bundled-features/src/billing-foundation/pending-plan-switch.ts +80 -0
- package/packages/bundled-features/src/billing-foundation/scrub-raw-payload-headers.ts +50 -0
- package/packages/bundled-features/src/billing-foundation/types.ts +47 -30
- package/packages/bundled-features/src/billing-foundation/validate-options.ts +18 -0
- package/packages/bundled-features/src/billing-foundation/web/billing-plans-panel.tsx +10 -5
- package/packages/bundled-features/src/billing-foundation/web/cancel-contract-dialog.tsx +1 -1
- package/packages/bundled-features/src/billing-foundation/web/checkout-consent-dialog.tsx +1 -1
- package/packages/bundled-features/src/billing-foundation/web/constants.ts +5 -2
- package/packages/bundled-features/src/billing-foundation/web/plan-switch-confirm-dialog.tsx +1 -1
- package/packages/bundled-features/src/billing-foundation/webhook-handler.ts +65 -17
- package/packages/bundled-features/src/cap-counter/aggregate-id.ts +0 -2
- package/packages/bundled-features/src/cap-counter/changes.json +6 -0
- package/packages/bundled-features/src/cap-counter/stock-cap-guard.ts +19 -4
- package/packages/bundled-features/src/cap-overview/changes.json +6 -0
- package/packages/bundled-features/src/cap-overview/handlers/tenant-caps-list.query.ts +22 -6
- package/packages/bundled-features/src/cap-overview/i18n.ts +1 -0
- package/packages/bundled-features/src/cap-overview/index.ts +1 -0
- package/packages/bundled-features/src/cap-overview/types.ts +11 -1
- package/packages/bundled-features/src/cap-overview/web/cap-cards-panel.tsx +6 -2
- package/packages/bundled-features/src/cap-overview/web/cap-usage-bar.tsx +10 -1
- package/packages/bundled-features/src/cap-overview/web/usage-math.ts +5 -0
- package/packages/bundled-features/src/channel-in-app/changes.json +6 -0
- package/packages/bundled-features/src/channel-in-app/handlers/read-state-by-keys.query.ts +2 -2
- package/packages/bundled-features/src/channel-whatsapp/aggregate-id.ts +29 -0
- package/packages/bundled-features/src/channel-whatsapp/changes.json +32 -0
- package/packages/bundled-features/src/channel-whatsapp/constants.ts +46 -0
- package/packages/bundled-features/src/channel-whatsapp/events.ts +94 -0
- package/packages/bundled-features/src/channel-whatsapp/feature.ts +72 -0
- package/packages/bundled-features/src/channel-whatsapp/graph-client.ts +398 -0
- package/packages/bundled-features/src/channel-whatsapp/in-memory-meta.ts +300 -0
- package/packages/bundled-features/src/channel-whatsapp/inbound-handlers.ts +210 -0
- package/packages/bundled-features/src/channel-whatsapp/index.ts +66 -0
- package/packages/bundled-features/src/channel-whatsapp/meta-signature.ts +26 -0
- package/packages/bundled-features/src/channel-whatsapp/options.ts +149 -0
- package/packages/bundled-features/src/channel-whatsapp/pii.ts +109 -0
- package/packages/bundled-features/src/channel-whatsapp/webhook-normalize.ts +247 -0
- package/packages/bundled-features/src/channel-whatsapp/webhook-routes.ts +185 -0
- package/packages/bundled-features/src/compliance-profiles/changes.json +5 -0
- package/packages/bundled-features/src/compliance-profiles/handlers/set-profile.write.ts +2 -0
- package/packages/bundled-features/src/compliance-profiles/handlers/sub-processors.query.ts +1 -1
- package/packages/bundled-features/src/config/changes.json +12 -0
- package/packages/bundled-features/src/config/handlers/set.write.ts +7 -0
- package/packages/bundled-features/src/config/handlers/values.query.ts +8 -1
- package/packages/bundled-features/src/config/index.ts +1 -0
- package/packages/bundled-features/src/config/read-redaction.ts +6 -3
- package/packages/bundled-features/src/config/table.ts +1 -0
- package/packages/bundled-features/src/config/write-helpers.ts +3 -2
- package/packages/bundled-features/src/crypto-shredding/changes.json +18 -0
- package/packages/bundled-features/src/crypto-shredding/constants.ts +2 -0
- package/packages/bundled-features/src/crypto-shredding/handlers/forget-subject.write.ts +38 -18
- package/packages/bundled-features/src/crypto-shredding/index.ts +4 -0
- package/packages/bundled-features/src/crypto-shredding/subject-forget-after-delete-hook.ts +49 -0
- package/packages/bundled-features/src/custom-fields/aggregate-id.ts +0 -1
- package/packages/bundled-features/src/custom-fields/entity.ts +1 -0
- package/packages/bundled-features/src/custom-fields/wire-for-entity.ts +0 -1
- package/packages/bundled-features/src/data-retention/changes.json +12 -0
- package/packages/bundled-features/src/data-retention/erase-notes-of-deleted-row.ts +23 -0
- package/packages/bundled-features/src/data-retention/feature.ts +2 -5
- package/packages/bundled-features/src/data-retention/run-retention-cleanup.ts +38 -18
- package/packages/bundled-features/src/data-retention/tenant-destruction-hold.ts +9 -0
- package/packages/bundled-features/src/delivery/attempt-log-factory.ts +11 -0
- package/packages/bundled-features/src/delivery/attempt-log.ts +3 -3
- package/packages/bundled-features/src/delivery/changes.json +12 -0
- package/packages/bundled-features/src/delivery/channel-context.ts +6 -3
- package/packages/bundled-features/src/delivery/db/queries/preferences.ts +0 -1
- package/packages/bundled-features/src/delivery/delivery-service.ts +3 -0
- package/packages/bundled-features/src/delivery/feature.ts +4 -13
- package/packages/bundled-features/src/delivery/handlers/opted-in-user-ids.query.ts +54 -0
- package/packages/bundled-features/src/delivery/handlers/preferences.query.ts +2 -20
- package/packages/bundled-features/src/delivery/handlers/resubscribe-user.write.ts +2 -25
- package/packages/bundled-features/src/delivery/handlers/unsubscribe-page-chrome.query.ts +2 -0
- package/packages/bundled-features/src/delivery/handlers/unsubscribe-user.write.ts +2 -27
- package/packages/bundled-features/src/delivery/index.ts +3 -1
- package/packages/bundled-features/src/delivery/options.ts +11 -0
- package/packages/bundled-features/src/delivery/preference-rows.ts +33 -0
- package/packages/bundled-features/src/delivery/set-preference-enabled.ts +40 -0
- package/packages/bundled-features/src/delivery/testing.ts +3 -1
- package/packages/bundled-features/src/delivery/types.ts +1 -0
- package/packages/bundled-features/src/delivery/unsubscribe-page.ts +7 -1
- package/packages/bundled-features/src/delivery/upsert-preference.ts +0 -1
- package/packages/bundled-features/src/delivery/web/public-names.ts +1 -0
- package/packages/bundled-features/src/derivatives-sharp/render.ts +9 -9
- package/packages/bundled-features/src/document-ingest-foundation/aggregate-id.ts +0 -1
- package/packages/bundled-features/src/document-ingest-foundation/append-missing-extract-event.ts +37 -25
- package/packages/bundled-features/src/document-ingest-foundation/changes.json +6 -0
- package/packages/bundled-features/src/document-ingest-foundation/feature.ts +1 -0
- package/packages/bundled-features/src/document-ingest-foundation/report-ingest-progress.ts +34 -14
- package/packages/bundled-features/src/documents/aggregate-id.ts +0 -2
- package/packages/bundled-features/src/documents/changes.json +24 -0
- package/packages/bundled-features/src/documents/constants.ts +10 -2
- package/packages/bundled-features/src/documents/ensure-link.ts +3 -4
- package/packages/bundled-features/src/documents/feature.ts +33 -6
- package/packages/bundled-features/src/documents/handlers/import.write.ts +2 -2
- package/packages/bundled-features/src/documents/queries/expiry-overview.query.ts +2 -1
- package/packages/bundled-features/src/documents/queries/for-record.query.ts +3 -4
- package/packages/bundled-features/src/documents/queries/list-page.ts +11 -3
- package/packages/bundled-features/src/documents/queries/overview.query.ts +2 -2
- package/packages/bundled-features/src/documents/screens.ts +8 -3
- package/packages/bundled-features/src/documents/tab.ts +1 -1
- package/packages/bundled-features/src/feature-toggles/toggle-sync-signal.ts +6 -3
- package/packages/bundled-features/src/file-derivatives/handlers/public-variant-by-file-ref.query.ts +1 -1
- package/packages/bundled-features/src/file-derivatives/handlers/public-variant.query.ts +1 -1
- package/packages/bundled-features/src/file-foundation/probe.ts +9 -3
- package/packages/bundled-features/src/file-foundation/read-file-ref-content.ts +24 -11
- package/packages/bundled-features/src/file-provider-inmemory/feature.ts +1 -1
- package/packages/bundled-features/src/file-provider-s3/changes.json +14 -0
- package/packages/bundled-features/src/file-provider-s3/env-feature.ts +1 -1
- package/packages/bundled-features/src/file-provider-s3/env-named-feature.ts +1 -1
- package/packages/bundled-features/src/file-provider-s3/env-schema.ts +24 -7
- package/packages/bundled-features/src/file-provider-s3/feature.ts +1 -1
- package/packages/bundled-features/src/file-provider-s3/index.ts +7 -1
- package/packages/bundled-features/src/file-provider-s3/lib/env-helper.ts +21 -13
- package/packages/bundled-features/src/file-provider-s3/lib/s3-provider.ts +8 -1
- package/packages/bundled-features/src/files/changes.json +7 -0
- package/packages/bundled-features/src/folders/aggregate-id.ts +0 -1
- package/packages/bundled-features/src/folders/web/folder-manager.tsx +6 -6
- package/packages/bundled-features/src/folders-user-data/index.ts +12 -14
- package/packages/bundled-features/src/form-draft/feature.ts +1 -0
- package/packages/bundled-features/src/helpdesk/changes.json +56 -0
- package/packages/bundled-features/src/helpdesk/entity.ts +4 -1
- package/packages/bundled-features/src/helpdesk/feature.ts +42 -0
- package/packages/bundled-features/src/helpdesk/handlers/access.ts +0 -10
- package/packages/bundled-features/src/helpdesk/handlers/attempts.ts +7 -14
- package/packages/bundled-features/src/helpdesk/handlers/challenge.query.ts +1 -2
- package/packages/bundled-features/src/helpdesk/handlers/reply.write.ts +5 -12
- package/packages/bundled-features/src/helpdesk/handlers/report.write.ts +4 -10
- package/packages/bundled-features/src/helpdesk/handlers/submit.write.ts +5 -12
- package/packages/bundled-features/src/helpdesk/index.ts +1 -0
- package/packages/bundled-features/src/helpdesk/legacy-contact-config.ts +61 -0
- package/packages/bundled-features/src/helpdesk/legacy-contact-erasure.ts +45 -0
- package/packages/bundled-features/src/helpdesk/legacy-contact-retention.ts +65 -0
- package/packages/bundled-features/src/helpdesk/legacy-contact-streams.ts +187 -0
- package/packages/bundled-features/src/helpdesk/legacy-contact-user-data.ts +84 -0
- package/packages/bundled-features/src/helpdesk/lib.ts +55 -37
- package/packages/bundled-features/src/helpdesk/user-data-hooks.ts +89 -48
- package/packages/bundled-features/src/helpdesk/web/constants.ts +0 -1
- package/packages/bundled-features/src/inbound-mail-foundation/account-health.ts +1 -1
- package/packages/bundled-features/src/inbound-mail-foundation/account-poll.ts +9 -2
- package/packages/bundled-features/src/inbound-mail-foundation/aggregate-id.ts +0 -2
- package/packages/bundled-features/src/inbound-mail-foundation/changes.json +54 -0
- package/packages/bundled-features/src/inbound-mail-foundation/constants.ts +6 -0
- package/packages/bundled-features/src/inbound-mail-foundation/content-refetch.ts +23 -2
- package/packages/bundled-features/src/inbound-mail-foundation/entities.ts +73 -15
- package/packages/bundled-features/src/inbound-mail-foundation/events.ts +24 -16
- package/packages/bundled-features/src/inbound-mail-foundation/feature.ts +3 -1
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/account-address.ts +16 -2
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/attach-message-content.write.ts +10 -3
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/connect-account.write.ts +23 -9
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/forget-message.write.ts +79 -0
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/ingest-message-schema.ts +18 -5
- package/packages/bundled-features/src/inbound-mail-foundation/i18n.ts +3 -0
- package/packages/bundled-features/src/inbound-mail-foundation/index.ts +1 -0
- package/packages/bundled-features/src/inbound-mail-foundation/normalize-inbound-message.ts +22 -8
- package/packages/bundled-features/src/inbound-mail-foundation/oauth-access-token.ts +1 -1
- package/packages/bundled-features/src/inbound-mail-foundation/outbound-mail.ts +2 -0
- package/packages/bundled-features/src/inbound-mail-foundation/personal-address.ts +20 -0
- package/packages/bundled-features/src/inbound-mail-foundation/purge-messages.ts +54 -0
- package/packages/bundled-features/src/inbound-mail-foundation/quarantine.ts +15 -5
- package/packages/bundled-features/src/inbound-mail-foundation/retention-job.ts +1 -5
- package/packages/bundled-features/src/inbound-mail-foundation/retention-sweep.ts +21 -34
- package/packages/bundled-features/src/inbound-mail-foundation/sanitize-inbound-html.ts +2 -5
- package/packages/bundled-features/src/inbound-mail-foundation/send-from-account.ts +9 -1
- package/packages/bundled-features/src/inbound-mail-foundation/supervisor-ingest.ts +7 -1
- package/packages/bundled-features/src/inbound-mail-foundation/sync-account-now.ts +1 -1
- package/packages/bundled-features/src/inbound-mail-foundation/tenant-destroy-hook.ts +14 -17
- package/packages/bundled-features/src/inbound-mail-foundation/watch-supervisor.ts +1 -1
- package/packages/bundled-features/src/inbound-provider-imap/byte-budget.ts +80 -0
- package/packages/bundled-features/src/inbound-provider-imap/changes.json +13 -0
- package/packages/bundled-features/src/inbound-provider-imap/connect-mailbox.ts +8 -4
- package/packages/bundled-features/src/inbound-provider-imap/connect-my-mailbox.ts +23 -6
- package/packages/bundled-features/src/inbound-provider-imap/connect-target-rate-limit.ts +46 -0
- package/packages/bundled-features/src/inbound-provider-imap/download-batch.ts +47 -10
- package/packages/bundled-features/src/inbound-provider-imap/feature.ts +7 -4
- package/packages/bundled-features/src/inbound-provider-imap/fetch-content.ts +43 -29
- package/packages/bundled-features/src/inbound-provider-imap/i18n.ts +2 -2
- package/packages/bundled-features/src/inbound-provider-imap/parse-message.ts +14 -0
- package/packages/bundled-features/src/inbound-provider-imap/reconnect-mailbox.ts +5 -4
- package/packages/bundled-features/src/inbound-provider-imap/send-mail.ts +39 -7
- package/packages/bundled-features/src/inbound-provider-imap/smtp-client.ts +19 -4
- package/packages/bundled-features/src/inbound-provider-imap/watch-mailbox.ts +8 -23
- package/packages/bundled-features/src/inbound-provider-inmemory/feature.ts +1 -1
- package/packages/bundled-features/src/jobs/events.ts +10 -0
- package/packages/bundled-features/src/jobs/feature.ts +2 -0
- package/packages/bundled-features/src/jobs/handlers/consumer.write.ts +41 -16
- package/packages/bundled-features/src/jobs/web/constants.ts +4 -0
- package/packages/bundled-features/src/mail-foundation/changes.json +6 -0
- package/packages/bundled-features/src/mail-transport-inmemory/feature.ts +1 -1
- package/packages/bundled-features/src/mail-transport-smtp/feature.ts +3 -2
- package/packages/bundled-features/src/managed-pages/changes.json +12 -0
- package/packages/bundled-features/src/managed-pages/handlers/branding.query.ts +1 -1
- package/packages/bundled-features/src/managed-pages/handlers/by-slug.query.ts +1 -1
- package/packages/bundled-features/src/managed-pages/handlers/by-tenant-published.query.ts +1 -1
- package/packages/bundled-features/src/managed-pages/render-page-body.ts +18 -10
- package/packages/bundled-features/src/managed-pages/screens/page-screens.ts +18 -38
- package/packages/bundled-features/src/managed-pages/table.ts +1 -0
- package/packages/bundled-features/src/managed-pages/web/client-plugin.tsx +8 -6
- package/packages/bundled-features/src/managed-pages/web/constants.ts +8 -1
- package/packages/bundled-features/src/managed-pages/web/i18n.ts +11 -3
- package/packages/bundled-features/src/managed-pages/web/markdown-to-document.ts +1 -1
- package/packages/bundled-features/src/managed-pages/web/page-edit-draft.ts +108 -0
- package/packages/bundled-features/src/managed-pages/web/page-edit-screen.tsx +204 -0
- package/packages/bundled-features/src/managed-pages/web/page-settings-rail.tsx +117 -0
- package/packages/bundled-features/src/notes-history-user-data/index.ts +8 -14
- package/packages/bundled-features/src/personal-access-tokens/boot-rules.ts +5 -0
- package/packages/bundled-features/src/personal-access-tokens/handlers/create.write.ts +0 -1
- package/packages/bundled-features/src/personal-access-tokens/scope-events-check.ts +31 -5
- package/packages/bundled-features/src/presence/changes.json +6 -0
- package/packages/bundled-features/src/presence/handlers/list.query.ts +28 -11
- package/packages/bundled-features/src/presence/room.ts +21 -7
- package/packages/bundled-features/src/presence/store.ts +79 -21
- package/packages/bundled-features/src/readiness/changes.json +25 -0
- package/packages/bundled-features/src/readiness/handlers/latest-summary.query.ts +11 -6
- package/packages/bundled-features/src/readiness/handlers/run-probes.write.ts +35 -5
- package/packages/bundled-features/src/readiness/handlers/run-tone.ts +3 -2
- package/packages/bundled-features/src/readiness/handlers/status.query.ts +15 -1
- package/packages/bundled-features/src/readiness/probe-context.ts +11 -10
- package/packages/bundled-features/src/readiness/screens.ts +4 -4
- package/packages/bundled-features/src/readiness/visible-results.ts +5 -3
- package/packages/bundled-features/src/renderer-foundation/api.ts +6 -13
- package/packages/bundled-features/src/renderer-foundation/types.ts +2 -2
- package/packages/bundled-features/src/secrets/changes.json +7 -0
- package/packages/bundled-features/src/secrets/db/queries/read.ts +18 -4
- package/packages/bundled-features/src/secrets/handlers/list.query.ts +8 -2
- package/packages/bundled-features/src/secrets/secret-scope.ts +2 -3
- package/packages/bundled-features/src/secrets/secrets-context.ts +6 -4
- package/packages/bundled-features/src/secrets/write-gate.ts +4 -2
- package/packages/bundled-features/src/seo/handlers/seo-config.query.ts +1 -1
- package/packages/bundled-features/src/shared/acknowledged-system-db.ts +20 -0
- package/packages/bundled-features/src/shared/assert-billing-live.ts +9 -2
- package/packages/bundled-features/src/shared/changes.json +12 -0
- package/packages/bundled-features/src/shared/hmac-signature.ts +4 -2
- package/packages/bundled-features/src/shared/index.ts +7 -1
- package/packages/bundled-features/src/shared/normalize-email.ts +3 -0
- package/packages/bundled-features/src/shared/parent-visibility.ts +25 -1
- package/packages/bundled-features/src/shared/password-hashing.ts +0 -1
- package/packages/bundled-features/src/shared/price-env-shape.ts +1 -4
- package/packages/bundled-features/src/shared/register-user-data-hooks.ts +29 -0
- package/packages/bundled-features/src/shared/require-bootstrap-extension.ts +26 -0
- package/packages/bundled-features/src/shared/send-best-effort.ts +29 -0
- package/packages/bundled-features/src/shared/stream-tenant-backfill.ts +22 -1
- package/packages/bundled-features/src/shared/stream-tenant-derived-state.ts +31 -1
- package/packages/bundled-features/src/step-dispatcher/changes.json +18 -0
- package/packages/bundled-features/src/step-dispatcher/constants.ts +13 -0
- package/packages/bundled-features/src/step-dispatcher/deliver-dispatch-request.ts +50 -2
- package/packages/bundled-features/src/step-dispatcher/feature.ts +42 -1
- package/packages/bundled-features/src/step-dispatcher/mail-runner.ts +0 -1
- package/packages/bundled-features/src/step-dispatcher/sweep-abandoned.ts +61 -0
- package/packages/bundled-features/src/subscription-mollie/changes.json +7 -0
- package/packages/bundled-features/src/subscription-mollie/plugin-methods.ts +5 -3
- package/packages/bundled-features/src/subscription-mollie/verify-webhook.ts +5 -5
- package/packages/bundled-features/src/subscription-paddle/backfill-checkout-ledger.ts +161 -0
- package/packages/bundled-features/src/subscription-paddle/changes.json +19 -0
- package/packages/bundled-features/src/subscription-paddle/checkout-config.query.ts +1 -1
- package/packages/bundled-features/src/subscription-paddle/checkout-methods.ts +2 -8
- package/packages/bundled-features/src/subscription-paddle/constants.ts +1 -2
- package/packages/bundled-features/src/subscription-paddle/feature.ts +26 -24
- package/packages/bundled-features/src/subscription-paddle/ledger-backfill-marker.ts +70 -0
- package/packages/bundled-features/src/subscription-paddle/plan-switch-methods.ts +2 -8
- package/packages/bundled-features/src/subscription-paddle/redeliver-legacy-checkout.ts +57 -0
- package/packages/bundled-features/src/subscription-paddle/runtime.ts +13 -24
- package/packages/bundled-features/src/subscription-paddle/subscription-state.ts +1 -0
- package/packages/bundled-features/src/subscription-paddle/webhook-events.ts +68 -21
- package/packages/bundled-features/src/subscription-stripe/changes.json +13 -0
- package/packages/bundled-features/src/subscription-stripe/feature.ts +5 -0
- package/packages/bundled-features/src/subscription-stripe/plugin-methods.ts +6 -6
- package/packages/bundled-features/src/subscription-stripe/runtime.ts +8 -7
- package/packages/bundled-features/src/subscription-stripe/verify-webhook.ts +38 -6
- package/packages/bundled-features/src/tags/aggregate-id.ts +0 -1
- package/packages/bundled-features/src/tags/web/tag-chip.tsx +4 -5
- package/packages/bundled-features/src/tags/web/tag-manager.tsx +2 -1
- package/packages/bundled-features/src/template-resolver/api.ts +6 -13
- package/packages/bundled-features/src/template-resolver/changes.json +48 -0
- package/packages/bundled-features/src/template-resolver/document-sanitizer.ts +25 -0
- package/packages/bundled-features/src/template-resolver/feature.ts +2 -0
- package/packages/bundled-features/src/template-resolver/handlers/body-preview.query.ts +41 -0
- package/packages/bundled-features/src/template-resolver/handlers/by-slug.query.ts +1 -1
- package/packages/bundled-features/src/template-resolver/handlers/by-tenant.query.ts +1 -1
- package/packages/bundled-features/src/template-resolver/handlers/collection-shared.ts +5 -11
- package/packages/bundled-features/src/template-resolver/handlers/overview.query.ts +3 -2
- package/packages/bundled-features/src/template-resolver/handlers/send-test.write.ts +37 -8
- package/packages/bundled-features/src/template-resolver/linked-resources.ts +2 -5
- package/packages/bundled-features/src/template-resolver/seeding.ts +107 -0
- package/packages/bundled-features/src/template-resolver/table.ts +1 -0
- package/packages/bundled-features/src/template-resolver/template-draft.ts +2 -1
- package/packages/bundled-features/src/template-resolver/template-preview.ts +14 -3
- package/packages/bundled-features/src/template-resolver/testing.ts +0 -2
- package/packages/bundled-features/src/template-resolver/web/client-plugin.tsx +3 -0
- package/packages/bundled-features/src/template-resolver/web/collection-entry-create-form.tsx +33 -33
- package/packages/bundled-features/src/template-resolver/web/constants.ts +7 -0
- package/packages/bundled-features/src/template-resolver/web/content-tree-provider.ts +0 -1
- package/packages/bundled-features/src/template-resolver/web/content-workbench.tsx +142 -0
- package/packages/bundled-features/src/template-resolver/web/document-insert-model.ts +3 -8
- package/packages/bundled-features/src/template-resolver/web/document-link-policy.ts +58 -0
- package/packages/bundled-features/src/template-resolver/web/document-schema.ts +11 -57
- package/packages/bundled-features/src/template-resolver/web/document-tiptap-bubble.tsx +2 -4
- package/packages/bundled-features/src/template-resolver/web/document-tiptap-context.ts +4 -5
- package/packages/bundled-features/src/template-resolver/web/document-tiptap-editor.tsx +2 -2
- package/packages/bundled-features/src/template-resolver/web/document-tiptap-helpers.ts +6 -3
- package/packages/bundled-features/src/template-resolver/web/document-tiptap-toolbar-groups.tsx +2 -3
- package/packages/bundled-features/src/template-resolver/web/editor-handle.ts +1 -0
- package/packages/bundled-features/src/template-resolver/web/fill-document-variables.ts +24 -0
- package/packages/bundled-features/src/template-resolver/web/i18n.ts +14 -0
- package/packages/bundled-features/src/template-resolver/web/index.ts +3 -0
- package/packages/bundled-features/src/template-resolver/web/preview-targets.ts +25 -0
- package/packages/bundled-features/src/template-resolver/web/qualified-names.ts +1 -0
- package/packages/bundled-features/src/template-resolver/web/snippet-preview-renderer.tsx +24 -0
- package/packages/bundled-features/src/template-resolver/web/string-values.ts +7 -0
- package/packages/bundled-features/src/template-resolver/web/text-block-editor.tsx +38 -50
- package/packages/bundled-features/src/template-resolver/web/use-collection-entry-create.ts +7 -0
- package/packages/bundled-features/src/template-resolver/web/use-content-write.ts +1 -3
- package/packages/bundled-features/src/template-resolver/web/use-document-tiptap-model.ts +1 -2
- package/packages/bundled-features/src/template-resolver/web/use-text-block-editor.ts +28 -7
- package/packages/bundled-features/src/template-resolver/web/web-preview-renderer.tsx +132 -0
- package/packages/bundled-features/src/template-resolver-user-data/index.ts +11 -10
- package/packages/bundled-features/src/tenant/changes.json +6 -0
- package/packages/bundled-features/src/tenant/handlers/create.write.ts +7 -8
- package/packages/bundled-features/src/tenant/handlers/list.query.ts +7 -9
- package/packages/bundled-features/src/tenant/handlers/member-directory.query.ts +10 -4
- package/packages/bundled-features/src/tenant/handlers/toggle-enabled.write.ts +1 -1
- package/packages/bundled-features/src/tenant/invited-membership.ts +10 -1
- package/packages/bundled-features/src/tenant/seeding.ts +4 -2
- package/packages/bundled-features/src/tenant/stream-tenant-backfill.ts +5 -1
- package/packages/bundled-features/src/tenant/testing.ts +1 -1
- package/packages/bundled-features/src/tenant-inactivity/changes.json +6 -0
- package/packages/bundled-features/src/tenant-inactivity/check-inactive-tenants.ts +36 -17
- package/packages/bundled-features/src/tenant-inactivity/constants.ts +1 -2
- package/packages/bundled-features/src/tenant-inactivity/handlers/keep-account.write.ts +7 -2
- package/packages/bundled-features/src/tenant-inactivity/state-store.ts +22 -2
- package/packages/bundled-features/src/tenant-lifecycle/changes.json +24 -0
- package/packages/bundled-features/src/tenant-lifecycle/constants.ts +4 -0
- package/packages/bundled-features/src/tenant-lifecycle/feature.ts +1 -0
- package/packages/bundled-features/src/tenant-lifecycle/run-tenant-destroy.ts +43 -6
- package/packages/bundled-features/src/tenant-lifecycle/stages.ts +15 -2
- package/packages/bundled-features/src/tier-engine/aggregate-id.ts +0 -1
- package/packages/bundled-features/src/tier-engine/changes.json +6 -0
- package/packages/bundled-features/src/tier-engine/feature.ts +8 -2
- package/packages/bundled-features/src/user/changes.json +6 -0
- package/packages/bundled-features/src/user/db/queries/stream-tenant-backfill.ts +2 -1
- package/packages/bundled-features/src/user/handlers/me.query.ts +3 -1
- package/packages/bundled-features/src/user/index.ts +1 -0
- package/packages/bundled-features/src/user/resolve-verified-user-email.ts +17 -0
- package/packages/bundled-features/src/user-data-rights/db/queries/export-jobs.ts +0 -1
- package/packages/bundled-features/src/user-data-rights/feature.ts +1 -0
- package/packages/bundled-features/src/user-data-rights/handlers/confirm-deletion-by-token.write.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/handlers/download-by-token.query.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/handlers/request-deletion-by-email.write.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/run-export-jobs.ts +0 -2
- package/packages/bundled-features/src/user-data-rights/run-forget-cleanup.ts +3 -3
- package/packages/bundled-features/src/user-data-rights/schema/download-attempt.ts +3 -2
- package/packages/bundled-features/src/user-data-rights/web/confirm-deletion-screen.tsx +1 -1
- package/packages/bundled-features/src/user-data-rights/web/privacy-center-screen.tsx +1 -1
- package/packages/bundled-features/src/user-data-rights/web/request-deletion-screen.tsx +1 -1
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/api-token.userdata-hook.ts +5 -5
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/hard-delete-own-rows-hook.ts +17 -0
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/in-app-message.userdata-hook.ts +5 -5
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/job-run.userdata-hook.ts +2 -1
- package/packages/bundled-features/src/user-data-rights-defaults/hooks/user-session.userdata-hook.ts +5 -5
- package/packages/bundled-features/src/user-profile/handlers/change-email.write.ts +0 -1
- package/packages/bundled-features/src/waitlist/changes.json +6 -0
- package/packages/bundled-features/src/waitlist/handlers/reject.write.ts +1 -1
- package/packages/bundled-features/src/waitlist/handlers/submit.write.ts +5 -29
- package/packages/bundled-features/src/waitlist/import.ts +2 -1
- package/packages/bundled-features/src/waitlist/lib.ts +2 -11
- package/packages/bundled-features/src/waitlist/link-on-signup.ts +2 -2
- package/packages/bundled-features/src/waitlist/user-data-hooks.ts +6 -19
- package/packages/bundled-features/src/workflow-runner/aggregate-id.ts +0 -1
- package/packages/bundled-features/src/workflow-runner/changes.json +6 -0
- package/packages/bundled-features/src/workflow-runner/event-trigger.ts +6 -2
- package/packages/bundled-features/src/workflow-runner/feature.ts +1 -5
- package/packages/bundled-features/src/workflow-runner/handlers/resume-run.write.ts +7 -4
- package/packages/bundled-features/src/workflow-runner/runner.ts +2 -0
- package/samples/apps/admin-console/src/app/shell.tsx +1 -0
- package/samples/apps/showcase/src/features/demos/web/pages/dialog.tsx +0 -1
- package/samples/apps/showcase/src/features/demos/web/pages/layout.tsx +1 -1
- package/samples/apps/showcase/src/features/demos/web/pages/sidebar-panel.tsx +0 -1
- package/samples/apps/styleguide/src/features/gallery/web/Gallery.tsx +1 -4
- package/samples/apps/ui-walkthrough/src/features/subscription-plans/feature.ts +6 -2
- package/samples/apps/use-all-bundled/e2e-billing-gallery/gallery-features.ts +12 -14
- package/samples/apps/use-all-bundled/feature-manifest.json +60 -29
- package/samples/apps/use-all-bundled/playwright.billing-docs.config.ts +1 -1
- package/samples/apps/use-all-bundled/playwright.config.ts +1 -0
- package/samples/apps/use-all-bundled/src/app/seed.ts +1 -1
- package/samples/apps/use-all-bundled/src/run-config.ts +2 -1
- package/samples/recipes/auth-mfa/src/web/confirmation-code-step.tsx +32 -10
- package/samples/recipes/chat-channels/README.md +2 -0
- package/samples/recipes/crypto-shredding-hr/README.md +11 -0
- package/samples/recipes/crypto-shredding-hr/src/feature.ts +27 -0
- package/samples/recipes/currencies-global/src/entities/currency.ts +1 -0
- package/samples/recipes/managed-pages/README.md +5 -1
- package/samples/recipes/managed-pages/package.json +3 -2
- package/samples/recipes/managed-pages/src/web/branded-preview.tsx +21 -0
- package/samples/recipes/managed-pages/tsconfig.json +8 -0
- package/samples/recipes/pwa-shell/README.md +52 -0
- package/samples/recipes/pwa-shell/bin/server.ts +12 -0
- package/samples/recipes/pwa-shell/package.json +13 -0
- package/samples/recipes/pwa-shell/src/app.ts +34 -0
- package/samples/recipes/rate-limiting/README.md +3 -3
- package/samples/recipes/record-detail-layout/README.md +33 -0
- package/samples/recipes/record-detail-layout/src/feature.ts +556 -44
- package/samples/recipes/record-detail-layout/src/order-board.ts +529 -0
- package/packages/bundled-features/src/managed-pages/web/page-body-section.tsx +0 -72
- package/packages/bundled-features/src/subscription-paddle/tenant-binding.ts +0 -34
- package/packages/bundled-features/src/template-resolver/web/content-field.tsx +0 -61
|
@@ -1,53 +1,137 @@
|
|
|
1
|
-
// Record Detail Layout Showcase — a
|
|
2
|
-
// "Akte" (case file) layout:
|
|
1
|
+
// Record Detail Layout Showcase — a work queue, a briefing dashboard and a
|
|
2
|
+
// projectionDetail screen with the "Akte" (case file) layout:
|
|
3
3
|
// 1. `header` renders the query row's customer/order/status columns above
|
|
4
4
|
// the layout — the identity a support agent scans first.
|
|
5
|
-
// 2. `metrics` renders a labeled band of key numbers from the same row
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// 3. `layout.mode: "tabs"` splits the record into four tabs: two
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
// parity check — every tab kind must sit in the same Card padding, no
|
|
13
|
-
// section carries extra chrome of its own).
|
|
5
|
+
// 2. `metrics` renders a labeled band of key numbers from the same row; each metric
|
|
6
|
+
// carries its own i18n `label`, there is no fallback to the raw column name. Tiles take a
|
|
7
|
+
// fixed `tone` or a per-record `toneField` and can jump to a tab with `navigate`.
|
|
8
|
+
// 3. `layout.mode: "tabs"` splits the record into four tabs: two `relatedList`
|
|
9
|
+
// sections (own query, own pagination, mounts only when active, badge via `countField`),
|
|
10
|
+
// one `fields` section (master data) and one `extension` section (plugin-mounted component;
|
|
11
|
+
// every tab kind sits in the same Card padding, no extra chrome).
|
|
14
12
|
// 4. The payments tab's emptyState picks its text from the order record through `variants`.
|
|
15
13
|
// 5. A screen-level `actions` entry (fw#3234) renders next to the header,
|
|
16
14
|
// not inside any tab's Card. `inlineActions` keeps download-invoice a visible
|
|
17
15
|
// button next to it where the page header would otherwise fold it into the menu.
|
|
18
|
-
//
|
|
19
16
|
// 6. `showOnTabs` limits the record-payment action to the payments tab.
|
|
17
|
+
// 7. Guidance: the `orders` projectionList tints rows via `rowToneField`, shows a
|
|
18
|
+
// "to do" hint column (sentence, detail, tone, a "Why?" reason), a badge column and
|
|
19
|
+
// per-row button actions (send a reminder, or open the record). Named filters sit in one select with hit counts,
|
|
20
|
+
// each with its own sort and empty state; the summary row totals the rows. The detail screen adds
|
|
21
|
+
// `breadcrumb`, `summary`, `banner` and `steps`, each reading a query field; empty values drop out.
|
|
22
|
+
// 8. The `today` dashboard composes a lead briefing, count tiles that link into the filtered
|
|
23
|
+
// list, a headerless "Now" list and two narrow lists on a 12-column grid.
|
|
24
|
+
// 9. Phone variants: `hideOnNarrow` drops panels, a list panel's `narrow` turns it into limited cards or a
|
|
25
|
+
// one-line link, `narrowBlocks` shortens the briefing, `showOnNarrowOnly` adds card-only meta, and the
|
|
26
|
+
// detail shows `summary.narrowField`, `steps.narrowLimit` and no `progress` chain under sm.
|
|
27
|
+
// 10. `focus: true` gives the detail a focused shell; phones get a top bar with the
|
|
28
|
+
// record title, a back arrow to the list and the page-header overflow menu.
|
|
29
|
+
//
|
|
30
|
+
// 11. Phone card values: two `showOnNarrowOnly` columns with `narrowInline` stand side by side on one line.
|
|
31
|
+
// The named-filter select sits behind the filter icon on phones (`narrowPlacement: "behind-filter"`),
|
|
32
|
+
// and the "reminder due" empty state fills its description from a query (`emptyState.paramsQuery`).
|
|
20
33
|
//
|
|
21
|
-
// projectionDetail
|
|
22
|
-
//
|
|
23
|
-
// query's row, not an entity field.
|
|
34
|
+
// projectionDetail binds to an explicit query, not an entity: every field name below
|
|
35
|
+
// (header, metrics, fields) is a column of that query's row.
|
|
24
36
|
|
|
25
37
|
import { defineFeature, type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
26
38
|
import { z } from "zod";
|
|
39
|
+
import {
|
|
40
|
+
answerBriefing,
|
|
41
|
+
answerCustomers,
|
|
42
|
+
answerDeadlines,
|
|
43
|
+
answerMoney,
|
|
44
|
+
answerNextReminder,
|
|
45
|
+
answerNowList,
|
|
46
|
+
answerOrderDetail,
|
|
47
|
+
answerOrderList,
|
|
48
|
+
answerOrderSummary,
|
|
49
|
+
orderListSchema,
|
|
50
|
+
orderSummarySchema,
|
|
51
|
+
} from "./order-board.ts";
|
|
27
52
|
|
|
28
53
|
const rowIdSchema = z.object({ id: z.string() });
|
|
54
|
+
const noPayloadSchema = z.object({});
|
|
55
|
+
const accessRoles = { roles: ["Support", "Admin"] } as const;
|
|
56
|
+
|
|
57
|
+
export const ORDER_LIST_QUERY = "order-desk:query:order:list";
|
|
29
58
|
|
|
30
59
|
export function createOrderDeskFeature(): FeatureDefinition {
|
|
31
60
|
return defineFeature("order-desk", (r) => {
|
|
32
61
|
r.systemScope();
|
|
33
62
|
|
|
63
|
+
r.queryHandler({
|
|
64
|
+
name: "order:list",
|
|
65
|
+
schema: orderListSchema,
|
|
66
|
+
handler: async (query) => answerOrderList(query.payload),
|
|
67
|
+
access: accessRoles,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
r.queryHandler({
|
|
71
|
+
name: "order:summary",
|
|
72
|
+
schema: orderSummarySchema,
|
|
73
|
+
handler: async (query) => answerOrderSummary(query.payload),
|
|
74
|
+
access: accessRoles,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
r.queryHandler({
|
|
78
|
+
name: "order:now",
|
|
79
|
+
schema: noPayloadSchema,
|
|
80
|
+
handler: async () => answerNowList(),
|
|
81
|
+
access: accessRoles,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
r.queryHandler({
|
|
85
|
+
name: "order:next-reminder",
|
|
86
|
+
schema: noPayloadSchema,
|
|
87
|
+
handler: async () => answerNextReminder(),
|
|
88
|
+
access: accessRoles,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
r.queryHandler({
|
|
92
|
+
name: "order:briefing",
|
|
93
|
+
schema: noPayloadSchema,
|
|
94
|
+
handler: async () => answerBriefing(),
|
|
95
|
+
access: accessRoles,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
r.queryHandler({
|
|
99
|
+
name: "order:deadlines",
|
|
100
|
+
schema: noPayloadSchema,
|
|
101
|
+
handler: async () => answerDeadlines(),
|
|
102
|
+
outputSchema: z.object({
|
|
103
|
+
rows: z.array(
|
|
104
|
+
z.object({
|
|
105
|
+
id: z.string(),
|
|
106
|
+
due: z.string(),
|
|
107
|
+
title: z.string(),
|
|
108
|
+
screen: z.string(),
|
|
109
|
+
params: z.object({ entityId: z.string() }),
|
|
110
|
+
}),
|
|
111
|
+
),
|
|
112
|
+
}),
|
|
113
|
+
access: accessRoles,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
r.queryHandler({
|
|
117
|
+
name: "order:customers",
|
|
118
|
+
schema: noPayloadSchema,
|
|
119
|
+
handler: async () => answerCustomers(),
|
|
120
|
+
access: accessRoles,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
r.queryHandler({
|
|
124
|
+
name: "order:money",
|
|
125
|
+
schema: noPayloadSchema,
|
|
126
|
+
handler: async () => answerMoney(),
|
|
127
|
+
access: accessRoles,
|
|
128
|
+
});
|
|
129
|
+
|
|
34
130
|
r.queryHandler({
|
|
35
131
|
name: "order:detail",
|
|
36
132
|
schema: rowIdSchema,
|
|
37
|
-
handler: async (query) => (
|
|
38
|
-
|
|
39
|
-
customerName: "Aiko Tanaka",
|
|
40
|
-
orderNumber: "SO-10482",
|
|
41
|
-
status: "processing",
|
|
42
|
-
totalAmount: "€ 1,248.00",
|
|
43
|
-
outstandingAmount: "€ 312.00",
|
|
44
|
-
itemCount: "3",
|
|
45
|
-
placedAt: "2026-08-21",
|
|
46
|
-
shippingAddress: "Karl-Marx-Straße 12, 12043 Berlin",
|
|
47
|
-
billingAddress: "Karl-Marx-Straße 12, 12043 Berlin",
|
|
48
|
-
salesRep: "Jonas Weber",
|
|
49
|
-
}),
|
|
50
|
-
access: { roles: ["Support", "Admin"] },
|
|
133
|
+
handler: async (query) => answerOrderDetail(query.payload.id),
|
|
134
|
+
access: accessRoles,
|
|
51
135
|
});
|
|
52
136
|
|
|
53
137
|
r.queryHandler({
|
|
@@ -60,7 +144,7 @@ export function createOrderDeskFeature(): FeatureDefinition {
|
|
|
60
144
|
{ sku: "PAD-01", description: "Desk mat", quantity: 1, unitPrice: 22 },
|
|
61
145
|
],
|
|
62
146
|
}),
|
|
63
|
-
access:
|
|
147
|
+
access: accessRoles,
|
|
64
148
|
});
|
|
65
149
|
|
|
66
150
|
r.queryHandler({
|
|
@@ -72,27 +156,445 @@ export function createOrderDeskFeature(): FeatureDefinition {
|
|
|
72
156
|
{ paidAt: "2026-08-25", amount: 312, method: "invoice", status: "pending" },
|
|
73
157
|
],
|
|
74
158
|
}),
|
|
75
|
-
access:
|
|
159
|
+
access: accessRoles,
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
r.writeHandler({
|
|
163
|
+
name: "order:remind",
|
|
164
|
+
schema: rowIdSchema,
|
|
165
|
+
handler: async (event) => ({ isSuccess: true as const, data: { id: event.payload.id } }),
|
|
166
|
+
access: accessRoles,
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
r.translations({
|
|
170
|
+
keys: {
|
|
171
|
+
"screen:orders.title": { en: "Orders" },
|
|
172
|
+
"screen:order-detail.title": { en: "Order" },
|
|
173
|
+
"screen:today.title": { en: "Today" },
|
|
174
|
+
"order-desk.orders.todo": { en: "To do" },
|
|
175
|
+
"order-desk.orders.nothing-open": { en: "Nothing to do" },
|
|
176
|
+
"order-desk.orders.all-done": { en: "All done" },
|
|
177
|
+
"order-desk.orders.all-done-hint": { en: "No order needs you right now." },
|
|
178
|
+
"order-desk.orders.next-reminder": { en: "Next reminder: {customer}, due {due}." },
|
|
179
|
+
"order-desk.filter.action-needed": { en: "Needs action" },
|
|
180
|
+
"order-desk.filter.reminder-due": { en: "Reminder due" },
|
|
181
|
+
"order-desk.filter.ending-soon": { en: "Ending soon" },
|
|
182
|
+
"order-desk.col.order": { en: "Order" },
|
|
183
|
+
"order-desk.col.customer": { en: "Customer" },
|
|
184
|
+
"order-desk.col.urgency": { en: "Urgency" },
|
|
185
|
+
"order-desk.col.todo": { en: "To do" },
|
|
186
|
+
"order-desk.col.open-amount": { en: "Open" },
|
|
187
|
+
"order-desk.col.sku": { en: "SKU" },
|
|
188
|
+
"order-desk.col.description": { en: "Description" },
|
|
189
|
+
"order-desk.col.quantity": { en: "Quantity" },
|
|
190
|
+
"order-desk.col.unit-price": { en: "Unit price" },
|
|
191
|
+
"order-desk.col.paid-at": { en: "Paid on" },
|
|
192
|
+
"order-desk.col.amount": { en: "Amount" },
|
|
193
|
+
"order-desk.col.method": { en: "Method" },
|
|
194
|
+
"order-desk.col.status": { en: "Status" },
|
|
195
|
+
"order-desk.sort.urgency": { en: "Urgency" },
|
|
196
|
+
"order-desk.sort.customer": { en: "Customer A-Z" },
|
|
197
|
+
"order-desk.today.now": { en: "Now" },
|
|
198
|
+
"order-desk.today.now-all": { en: "All orders needing action" },
|
|
199
|
+
"order-desk.today.inbox": { en: "Inbox" },
|
|
200
|
+
"order-desk.today.inbox-sub": { en: "Orders waiting for you" },
|
|
201
|
+
"order-desk.today.inbox-link": { en: "All orders" },
|
|
202
|
+
"order-desk.today.deadlines": { en: "Deadlines" },
|
|
203
|
+
"order-desk.today.deadlines-all": { en: "All deadlines" },
|
|
204
|
+
"order-desk.col.narrow-open": { en: "Open amount" },
|
|
205
|
+
"order-desk.col.narrow-status": { en: "Status" },
|
|
206
|
+
"order-desk.today.customers": { en: "Customers" },
|
|
207
|
+
"order-desk.today.money": { en: "Money" },
|
|
208
|
+
"order-desk.today.money-sub": { en: "Across all open orders" },
|
|
209
|
+
"order-desk.today.stat.action-needed": { en: "Need action" },
|
|
210
|
+
"order-desk.today.stat.reminder-due": { en: "Reminders due" },
|
|
211
|
+
"order-desk.today.stat.ending-soon": { en: "Ending soon" },
|
|
212
|
+
"order-desk.today.now-total": { en: "The {shown} most urgent of {total} orders" },
|
|
213
|
+
"order-desk.today.now-total-narrow": { en: "{shown} of {total}" },
|
|
214
|
+
"order-desk.today.deadlines-more": { en: "{count} more deadlines" },
|
|
215
|
+
"order-desk.today.deadlines-more-narrow": { en: "{count} more" },
|
|
216
|
+
"order-desk.action.record-short": { en: "Record" },
|
|
217
|
+
"order-desk.today.stat.open": { en: "Open" },
|
|
218
|
+
"order-desk.today.stat.overdue": { en: "Overdue" },
|
|
219
|
+
"order-desk.today.stat.collected": { en: "Collected" },
|
|
220
|
+
"order-desk.action.open": { en: "Open" },
|
|
221
|
+
"order-desk.action.remind": { en: "Send reminder" },
|
|
222
|
+
"order-desk.action.open-order": { en: "Open order" },
|
|
223
|
+
"order-desk.action.prepare": { en: "Let the assistant prepare" },
|
|
224
|
+
"order-desk.action.recordPayment": { en: "Record payment" },
|
|
225
|
+
"order-desk.action.refreshOrder": { en: "Refresh" },
|
|
226
|
+
"order-desk.action.downloadInvoice": { en: "Download invoice" },
|
|
227
|
+
"order-desk.steps.title": { en: "Next steps" },
|
|
228
|
+
"order-desk.steps.empty": { en: "Nothing left to do" },
|
|
229
|
+
"order-desk.metric.totalAmount": { en: "Total" },
|
|
230
|
+
"order-desk.metric.outstandingAmount": { en: "Outstanding" },
|
|
231
|
+
"order-desk.metric.itemCount": { en: "Items" },
|
|
232
|
+
"order-desk.metric.placedAt": { en: "Placed" },
|
|
233
|
+
"order-desk.tab.items": { en: "Items" },
|
|
234
|
+
"order-desk.tab.payments": { en: "Payments" },
|
|
235
|
+
"order-desk.tab.details": { en: "Details" },
|
|
236
|
+
"order-desk.tab.internalNote": { en: "Internal note" },
|
|
237
|
+
"order-desk.payments.empty": { en: "No payments yet" },
|
|
238
|
+
"order-desk.payments.empty-pending": { en: "A payment is pending" },
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
r.screen({
|
|
243
|
+
id: "orders",
|
|
244
|
+
type: "projectionList",
|
|
245
|
+
query: ORDER_LIST_QUERY,
|
|
246
|
+
rowToneField: "tone",
|
|
247
|
+
columns: [
|
|
248
|
+
{ field: "orderNumber", label: "order-desk.col.order" },
|
|
249
|
+
{ field: "customerName", label: "order-desk.col.customer", hideOnNarrow: true },
|
|
250
|
+
{
|
|
251
|
+
field: "urgencyLabel",
|
|
252
|
+
label: "order-desk.col.urgency",
|
|
253
|
+
display: "badge",
|
|
254
|
+
badgeToneField: "urgencyTone",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
field: "nextStep",
|
|
258
|
+
label: "order-desk.col.todo",
|
|
259
|
+
hint: {
|
|
260
|
+
detailField: "nextStepDue",
|
|
261
|
+
narrowDetailField: "nextStepShort",
|
|
262
|
+
reasonField: "nextStepReason",
|
|
263
|
+
reasonTitleField: "nextStepReasonTitle",
|
|
264
|
+
reasonOpenField: "nextStepReasonOpen",
|
|
265
|
+
emptyLabel: "order-desk.orders.nothing-open",
|
|
266
|
+
},
|
|
267
|
+
width: 320,
|
|
268
|
+
minWidth: 240,
|
|
269
|
+
},
|
|
270
|
+
{ field: "openAmount", label: "order-desk.col.open-amount", hideOnNarrow: true },
|
|
271
|
+
{
|
|
272
|
+
field: "narrowOpen",
|
|
273
|
+
label: "order-desk.col.narrow-open",
|
|
274
|
+
showOnNarrowOnly: true,
|
|
275
|
+
narrowInline: true,
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
field: "narrowStatus",
|
|
279
|
+
label: "order-desk.col.narrow-status",
|
|
280
|
+
showOnNarrowOnly: true,
|
|
281
|
+
narrowInline: true,
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
defaultSort: { field: "urgency", dir: "desc" },
|
|
285
|
+
sortOptions: [
|
|
286
|
+
{ field: "urgency", dir: "desc", label: "order-desk.sort.urgency" },
|
|
287
|
+
{ field: "customerName", dir: "asc", label: "order-desk.sort.customer" },
|
|
288
|
+
],
|
|
289
|
+
namedFilters: [
|
|
290
|
+
{
|
|
291
|
+
id: "action-needed",
|
|
292
|
+
label: "order-desk.filter.action-needed",
|
|
293
|
+
sort: { field: "urgency", dir: "desc" },
|
|
294
|
+
emptyState: {
|
|
295
|
+
title: "order-desk.orders.all-done",
|
|
296
|
+
description: "order-desk.orders.all-done-hint",
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
id: "reminder-due",
|
|
301
|
+
label: "order-desk.filter.reminder-due",
|
|
302
|
+
emptyState: {
|
|
303
|
+
title: "order-desk.orders.all-done",
|
|
304
|
+
description: "order-desk.orders.next-reminder",
|
|
305
|
+
paramsQuery: "order-desk:query:order:next-reminder",
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
{ id: "ending-soon", label: "order-desk.filter.ending-soon" },
|
|
309
|
+
],
|
|
310
|
+
namedFilterFacet: {
|
|
311
|
+
display: "select",
|
|
312
|
+
showCounts: true,
|
|
313
|
+
label: "order-desk.orders.todo",
|
|
314
|
+
narrowPlacement: "behind-filter",
|
|
315
|
+
},
|
|
316
|
+
narrowFacets: "pills",
|
|
317
|
+
table: {
|
|
318
|
+
frame: "card",
|
|
319
|
+
summaryRow: { query: "order-desk:query:order:summary" },
|
|
320
|
+
},
|
|
321
|
+
rowActions: [
|
|
322
|
+
{
|
|
323
|
+
kind: "navigate",
|
|
324
|
+
id: "open",
|
|
325
|
+
label: "order-desk.action.open",
|
|
326
|
+
screen: "order-detail",
|
|
327
|
+
rowClick: true,
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
id: "remind",
|
|
331
|
+
label: "order-desk.action.remind",
|
|
332
|
+
handler: "order-desk:write:order:remind",
|
|
333
|
+
display: "button",
|
|
334
|
+
visible: { field: "canRemind", eq: true },
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
kind: "navigate",
|
|
338
|
+
id: "open-order",
|
|
339
|
+
label: "order-desk.action.open-order",
|
|
340
|
+
screen: "order-detail",
|
|
341
|
+
display: "button",
|
|
342
|
+
visible: { field: "canRemind", eq: false },
|
|
343
|
+
},
|
|
344
|
+
],
|
|
345
|
+
access: accessRoles,
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
r.screen({
|
|
349
|
+
id: "today",
|
|
350
|
+
type: "dashboard",
|
|
351
|
+
panels: [
|
|
352
|
+
{
|
|
353
|
+
kind: "text",
|
|
354
|
+
id: "briefing",
|
|
355
|
+
span: "two-thirds",
|
|
356
|
+
narrowOrder: 1,
|
|
357
|
+
query: "order-desk:query:order:briefing",
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
kind: "stat-group",
|
|
361
|
+
id: "queue-counts",
|
|
362
|
+
label: "order-desk.today.inbox",
|
|
363
|
+
subtitle: "order-desk.today.inbox-sub",
|
|
364
|
+
span: "full",
|
|
365
|
+
layout: "strip",
|
|
366
|
+
icon: { react: { __component: "OrderInboxIcon" } },
|
|
367
|
+
link: { label: "order-desk.today.inbox-link", screen: "orders" },
|
|
368
|
+
stats: [
|
|
369
|
+
{
|
|
370
|
+
kind: "stat",
|
|
371
|
+
id: "action-needed",
|
|
372
|
+
label: "order-desk.today.stat.action-needed",
|
|
373
|
+
query: ORDER_LIST_QUERY,
|
|
374
|
+
valueField: "total",
|
|
375
|
+
params: { namedFilter: "action-needed", limit: 1, totalCount: true },
|
|
376
|
+
tone: "negative",
|
|
377
|
+
navigate: { screen: "orders", namedFilter: "action-needed" },
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
kind: "stat",
|
|
381
|
+
id: "reminder-due",
|
|
382
|
+
label: "order-desk.today.stat.reminder-due",
|
|
383
|
+
query: ORDER_LIST_QUERY,
|
|
384
|
+
valueField: "total",
|
|
385
|
+
params: { namedFilter: "reminder-due", limit: 1, totalCount: true },
|
|
386
|
+
tone: "warn",
|
|
387
|
+
navigate: { screen: "orders", namedFilter: "reminder-due" },
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
kind: "stat",
|
|
391
|
+
id: "ending-soon",
|
|
392
|
+
label: "order-desk.today.stat.ending-soon",
|
|
393
|
+
query: ORDER_LIST_QUERY,
|
|
394
|
+
valueField: "total",
|
|
395
|
+
params: { namedFilter: "ending-soon", limit: 1, totalCount: true },
|
|
396
|
+
navigate: { screen: "orders", namedFilter: "ending-soon" },
|
|
397
|
+
},
|
|
398
|
+
],
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
kind: "list",
|
|
402
|
+
id: "now",
|
|
403
|
+
label: "order-desk.today.now",
|
|
404
|
+
span: "two-thirds",
|
|
405
|
+
showHeader: false,
|
|
406
|
+
showTotal: {
|
|
407
|
+
text: "order-desk.today.now-total",
|
|
408
|
+
narrowText: "order-desk.today.now-total-narrow",
|
|
409
|
+
},
|
|
410
|
+
narrow: { layout: "cards", limit: 3 },
|
|
411
|
+
footerLink: {
|
|
412
|
+
label: "order-desk.today.now-all",
|
|
413
|
+
screen: "orders",
|
|
414
|
+
namedFilter: "action-needed",
|
|
415
|
+
},
|
|
416
|
+
query: "order-desk:query:order:now",
|
|
417
|
+
rowToneField: "tone",
|
|
418
|
+
columns: [
|
|
419
|
+
{ field: "urgencyLabel", display: "badge", badgeToneField: "urgencyTone" },
|
|
420
|
+
{
|
|
421
|
+
field: "nextStep",
|
|
422
|
+
hint: {
|
|
423
|
+
detailField: "nextStepDue",
|
|
424
|
+
narrowDetailField: "nextStepShort",
|
|
425
|
+
reasonField: "nextStepReason",
|
|
426
|
+
reasonTitleField: "nextStepReasonTitle",
|
|
427
|
+
reasonOpenField: "nextStepReasonOpen",
|
|
428
|
+
plainSentence: true,
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
field: "actionLabel",
|
|
433
|
+
display: "button",
|
|
434
|
+
linkScreenField: "actionScreen",
|
|
435
|
+
linkParamsField: "actionParams",
|
|
436
|
+
},
|
|
437
|
+
],
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
kind: "list",
|
|
441
|
+
id: "deadlines",
|
|
442
|
+
label: "order-desk.today.deadlines",
|
|
443
|
+
span: "third",
|
|
444
|
+
showHeader: false,
|
|
445
|
+
icon: { react: { __component: "DeadlinesIcon" } },
|
|
446
|
+
narrow: {
|
|
447
|
+
layout: "line",
|
|
448
|
+
field: "title",
|
|
449
|
+
moreText: "order-desk.today.deadlines-more-narrow",
|
|
450
|
+
},
|
|
451
|
+
rowLink: { screenField: "screen", paramsField: "params", icon: "chevron" },
|
|
452
|
+
footerLink: {
|
|
453
|
+
narrowOnly: true,
|
|
454
|
+
label: "order-desk.today.deadlines-all",
|
|
455
|
+
moreText: "order-desk.today.deadlines-more",
|
|
456
|
+
narrowMoreText: "order-desk.today.deadlines-more-narrow",
|
|
457
|
+
screen: "orders",
|
|
458
|
+
},
|
|
459
|
+
query: "order-desk:query:order:deadlines",
|
|
460
|
+
columns: [{ field: "due", display: "datetime" }, { field: "title" }],
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
kind: "list",
|
|
464
|
+
id: "customers",
|
|
465
|
+
label: "order-desk.today.customers",
|
|
466
|
+
span: "third",
|
|
467
|
+
showHeader: false,
|
|
468
|
+
hideOnNarrow: true,
|
|
469
|
+
rowLink: { screen: "order-detail", paramField: "params" },
|
|
470
|
+
query: "order-desk:query:order:customers",
|
|
471
|
+
rowToneField: "tone",
|
|
472
|
+
rowToneMarker: "dot",
|
|
473
|
+
columns: [
|
|
474
|
+
{ field: "customerName" },
|
|
475
|
+
{ field: "openCount", display: "badge", badgeToneField: "openTone" },
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
kind: "stat-group",
|
|
480
|
+
id: "money",
|
|
481
|
+
label: "order-desk.today.money",
|
|
482
|
+
subtitle: "order-desk.today.money-sub",
|
|
483
|
+
span: "two-thirds",
|
|
484
|
+
layout: "cards",
|
|
485
|
+
columns: 3,
|
|
486
|
+
hideOnNarrow: true,
|
|
487
|
+
stats: [
|
|
488
|
+
{
|
|
489
|
+
kind: "stat",
|
|
490
|
+
id: "open",
|
|
491
|
+
label: "order-desk.today.stat.open",
|
|
492
|
+
query: "order-desk:query:order:money",
|
|
493
|
+
valueField: "open",
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
kind: "stat",
|
|
497
|
+
id: "overdue",
|
|
498
|
+
label: "order-desk.today.stat.overdue",
|
|
499
|
+
query: "order-desk:query:order:money",
|
|
500
|
+
valueField: "overdue",
|
|
501
|
+
tone: "negative",
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
kind: "stat",
|
|
505
|
+
id: "collected",
|
|
506
|
+
label: "order-desk.today.stat.collected",
|
|
507
|
+
query: "order-desk:query:order:money",
|
|
508
|
+
valueField: "collected",
|
|
509
|
+
tone: "positive",
|
|
510
|
+
},
|
|
511
|
+
],
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
access: accessRoles,
|
|
76
515
|
});
|
|
77
516
|
|
|
78
517
|
r.screen({
|
|
79
518
|
id: "order-detail",
|
|
80
519
|
type: "projectionDetail",
|
|
81
520
|
query: "order-desk:query:order:detail",
|
|
521
|
+
focus: true,
|
|
522
|
+
listScreenId: "orders",
|
|
82
523
|
header: {
|
|
83
524
|
title: "customerName",
|
|
525
|
+
shortTitle: "shortTitle",
|
|
84
526
|
// Parts are joined by a separator; `format` formats the raw field value.
|
|
527
|
+
narrowSubtitle: "narrowSubtitle",
|
|
85
528
|
subtitle: [
|
|
86
529
|
"orderNumber",
|
|
87
530
|
{ field: "placedAt", format: { format: "date", dateStyle: "medium" } },
|
|
88
531
|
],
|
|
89
532
|
status: "status",
|
|
90
533
|
},
|
|
534
|
+
breadcrumb: { field: "path" },
|
|
535
|
+
summary: { field: "summaryLine", narrowField: "summaryShort", toneField: "summaryTone" },
|
|
536
|
+
banner: {
|
|
537
|
+
field: "notice",
|
|
538
|
+
actions: [
|
|
539
|
+
{
|
|
540
|
+
kind: "navigate",
|
|
541
|
+
id: "banner-open",
|
|
542
|
+
label: "order-desk.action.recordPayment",
|
|
543
|
+
screen: "order-detail",
|
|
544
|
+
icon: "plus",
|
|
545
|
+
hideIcon: true,
|
|
546
|
+
narrowLabel: "order-desk.action.record-short",
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
},
|
|
550
|
+
progress: { field: "progress", placement: "beside-steps", hideOnNarrow: true },
|
|
551
|
+
steps: {
|
|
552
|
+
field: "steps",
|
|
553
|
+
narrowLimit: 3,
|
|
554
|
+
title: "order-desk.steps.title",
|
|
555
|
+
emptyLabel: "order-desk.steps.empty",
|
|
556
|
+
actions: [
|
|
557
|
+
{
|
|
558
|
+
kind: "navigate",
|
|
559
|
+
id: "step-open",
|
|
560
|
+
label: "order-desk.action.refreshOrder",
|
|
561
|
+
screen: "order-detail",
|
|
562
|
+
icon: "refresh",
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
kind: "navigate",
|
|
566
|
+
id: "prepare",
|
|
567
|
+
label: "order-desk.action.prepare",
|
|
568
|
+
screen: "order-detail",
|
|
569
|
+
display: "link",
|
|
570
|
+
icon: "sparkles",
|
|
571
|
+
visible: { field: "canPrepare", eq: true },
|
|
572
|
+
},
|
|
573
|
+
],
|
|
574
|
+
},
|
|
575
|
+
metricsStyle: "tiles",
|
|
576
|
+
metricsPlacement: { narrow: "after-guidance" },
|
|
91
577
|
metrics: [
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
578
|
+
{
|
|
579
|
+
field: "totalAmount",
|
|
580
|
+
label: "order-desk.metric.totalAmount",
|
|
581
|
+
subField: "totalNote",
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
field: "outstandingAmount",
|
|
585
|
+
label: "order-desk.metric.outstandingAmount",
|
|
586
|
+
labelField: "outstandingLabel",
|
|
587
|
+
subField: "outstandingNote",
|
|
588
|
+
tone: "warn",
|
|
589
|
+
toneField: "outstandingTone",
|
|
590
|
+
navigate: { tab: "payments" },
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
field: "itemCount",
|
|
594
|
+
label: "order-desk.metric.itemCount",
|
|
595
|
+
navigate: { tab: "items" },
|
|
596
|
+
},
|
|
597
|
+
{ field: "placedAt", label: "order-desk.metric.placedAt", hideOnNarrow: true },
|
|
96
598
|
],
|
|
97
599
|
layout: {
|
|
98
600
|
mode: "tabs",
|
|
@@ -101,24 +603,34 @@ export function createOrderDeskFeature(): FeatureDefinition {
|
|
|
101
603
|
id: "items",
|
|
102
604
|
kind: "relatedList",
|
|
103
605
|
title: "order-desk.tab.items",
|
|
606
|
+
countField: "itemsCount",
|
|
104
607
|
query: "order-desk:query:order:items",
|
|
105
608
|
columns: [
|
|
106
|
-
"sku",
|
|
107
|
-
"description",
|
|
108
|
-
"quantity",
|
|
109
|
-
{
|
|
609
|
+
{ field: "sku", label: "order-desk.col.sku" },
|
|
610
|
+
{ field: "description", label: "order-desk.col.description" },
|
|
611
|
+
{ field: "quantity", label: "order-desk.col.quantity" },
|
|
612
|
+
{
|
|
613
|
+
field: "unitPrice",
|
|
614
|
+
label: "order-desk.col.unit-price",
|
|
615
|
+
renderer: { format: "currency", symbol: "€" },
|
|
616
|
+
},
|
|
110
617
|
],
|
|
111
618
|
},
|
|
112
619
|
{
|
|
113
620
|
id: "payments",
|
|
114
621
|
kind: "relatedList",
|
|
115
622
|
title: "order-desk.tab.payments",
|
|
623
|
+
countField: "paymentsCount",
|
|
116
624
|
query: "order-desk:query:order:payments",
|
|
117
625
|
columns: [
|
|
118
|
-
"paidAt",
|
|
119
|
-
{
|
|
120
|
-
|
|
121
|
-
|
|
626
|
+
{ field: "paidAt", label: "order-desk.col.paid-at" },
|
|
627
|
+
{
|
|
628
|
+
field: "amount",
|
|
629
|
+
label: "order-desk.col.amount",
|
|
630
|
+
renderer: { format: "currency", symbol: "€" },
|
|
631
|
+
},
|
|
632
|
+
{ field: "method", label: "order-desk.col.method" },
|
|
633
|
+
{ field: "status", label: "order-desk.col.status" },
|
|
122
634
|
],
|
|
123
635
|
emptyState: {
|
|
124
636
|
title: "order-desk.payments.empty",
|
|
@@ -170,7 +682,7 @@ export function createOrderDeskFeature(): FeatureDefinition {
|
|
|
170
682
|
},
|
|
171
683
|
],
|
|
172
684
|
inlineActions: ["download-invoice"],
|
|
173
|
-
access:
|
|
685
|
+
access: accessRoles,
|
|
174
686
|
});
|
|
175
687
|
});
|
|
176
688
|
}
|