amliq-dashboard 2.0.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/.env.example +3 -0
- package/.env.production +1 -0
- package/Dockerfile +26 -0
- package/QUICK_START.md +267 -0
- package/README.md +161 -0
- package/TESTING_GUIDE.md +322 -0
- package/dist/.well-known/ai-plugin.json +15 -0
- package/dist/_headers +8 -0
- package/dist/_redirects +1 -0
- package/dist/assets/APIKeys-BvwFauIs.js +6 -0
- package/dist/assets/APIKeys-DaMSBZQL.js +1 -0
- package/dist/assets/AdverseMedia-DckXfMzS.js +4 -0
- package/dist/assets/AlertDetailPage-Bc2_zwu_.js +1 -0
- package/dist/assets/AlertQueue-DFtBiRoM.js +8 -0
- package/dist/assets/Analytics-DtruB5lQ.js +1 -0
- package/dist/assets/AuditTrail-BK68ePu0.js +1 -0
- package/dist/assets/AuthDivider-gRHEt7gx.js +1 -0
- package/dist/assets/Badge-B9VFkofy.js +1 -0
- package/dist/assets/BatchJobs-Bz6KFnXD.js +6 -0
- package/dist/assets/BillingPage-R9nQ5nFb.js +11 -0
- package/dist/assets/Card-Cw-T_-oU.js +1 -0
- package/dist/assets/CaseDetail-DYs7Zg_y.js +7 -0
- package/dist/assets/CaseManagement-B1Q4Dp1Y.js +1 -0
- package/dist/assets/ComplianceReport-Dhssqc9T.js +1 -0
- package/dist/assets/Configuration-B92kl9T0.js +1 -0
- package/dist/assets/CryptoScreening-C7yFlskC.js +1 -0
- package/dist/assets/Dashboard-w4-Nhv9q.js +17 -0
- package/dist/assets/DataSources-u3-Ri_5_.js +3 -0
- package/dist/assets/EDDWorkflow-CFzlEO0e.js +1 -0
- package/dist/assets/EmptyState-Do0xJAT9.js +6 -0
- package/dist/assets/ForgotPassword-BPYyQFQp.js +1 -0
- package/dist/assets/LandingPage-CjaP0zw4.js +41 -0
- package/dist/assets/ListsMarketplace-CG6KkT9B.js +6 -0
- package/dist/assets/Login-677LEGP1.js +1 -0
- package/dist/assets/MFASetup-BxqCPvui.js +1 -0
- package/dist/assets/Monitoring-9TN9MK4y.js +1 -0
- package/dist/assets/Onboarding-Cf0Y83lX.js +1 -0
- package/dist/assets/Operations-CcXwc2xw.js +10 -0
- package/dist/assets/Overview-B_Ky0VWV.js +1 -0
- package/dist/assets/PEPScreening-pUQjTH9c.js +1 -0
- package/dist/assets/PageHeader-BObHFn0i.js +1 -0
- package/dist/assets/PrivacyPolicy-DZ2xrKir.js +1 -0
- package/dist/assets/ResetPassword-AtxtpIG1.js +1 -0
- package/dist/assets/RiskAssessment-Dzuh1Usv.js +1 -0
- package/dist/assets/SARForm-D8w2ZGe-.js +1 -0
- package/dist/assets/SanctionsLists-CPA3UH2v.js +1 -0
- package/dist/assets/ScheduledTasks-Dsjk-6UR.js +1 -0
- package/dist/assets/ScreenEntity-D1U0YL7v.js +3 -0
- package/dist/assets/ScreeningProgress-BW49PzoB.js +66 -0
- package/dist/assets/SearchField-CulFKdiI.js +1 -0
- package/dist/assets/Signup-C0FmFOo_.js +1 -0
- package/dist/assets/SystemHealth-B_8u4eva.js +1 -0
- package/dist/assets/TaskHistory-BCmEM89q.js +3 -0
- package/dist/assets/Team-CUo_FlU7.js +1 -0
- package/dist/assets/TenantDetail-CgZQHUY8.js +1 -0
- package/dist/assets/Tenants-RB9E9ick.js +2 -0
- package/dist/assets/TermsOfService-BfL-kndX.js +1 -0
- package/dist/assets/TransactionMonitoring-DGh_T22s.js +14 -0
- package/dist/assets/TxnScreening-B7cm2-eh.js +1 -0
- package/dist/assets/UBOChain-falXAsCo.js +1 -0
- package/dist/assets/Users-Doakpg9c.js +1 -0
- package/dist/assets/Webhooks-BZpAfaxv.js +1 -0
- package/dist/assets/alert-triangle-YCFVm7B_.js +6 -0
- package/dist/assets/alerts-COUnTwWY.js +1 -0
- package/dist/assets/arrow-left-9ApLqP95.js +6 -0
- package/dist/assets/check-VTcvVtIU.js +6 -0
- package/dist/assets/check-circle-2-Dn-lG5YQ.js +6 -0
- package/dist/assets/code-DIJRWFVv.js +6 -0
- package/dist/assets/fingerprint-C0MGVtax.js +6 -0
- package/dist/assets/flag-B8_Gwxh6.js +6 -0
- package/dist/assets/index-CfdYcqRM.js +289 -0
- package/dist/assets/index-HPU_Rhdu.css +1 -0
- package/dist/assets/layers-zHz2o4vo.js +6 -0
- package/dist/assets/loader-B9_dNihg.js +6 -0
- package/dist/assets/mail-BijL2qwp.js +6 -0
- package/dist/assets/plus-i0oBIIPS.js +6 -0
- package/dist/assets/refresh-cw-CSuAwutt.js +6 -0
- package/dist/assets/useAnalytics-Bj8IONcw.js +72 -0
- package/dist/assets/x-circle-DLGKvijE.js +6 -0
- package/dist/favicon.svg +15 -0
- package/dist/index.html +51 -0
- package/dist/llms.txt +28 -0
- package/dist/logo.png +0 -0
- package/dist/logo.svg +17 -0
- package/dist/manifest.json +44 -0
- package/dist/robots.txt +15 -0
- package/dist/schema.json +13 -0
- package/dist/sitemap.xml +28 -0
- package/dist/sw.js +67 -0
- package/e2e/auth-setup.ts +20 -0
- package/e2e/billing.spec.ts +50 -0
- package/e2e/cases.spec.ts +53 -0
- package/e2e/compliance.spec.ts +65 -0
- package/e2e/config.spec.ts +56 -0
- package/e2e/dashboard.spec.ts +47 -0
- package/e2e/fixtures.ts +33 -0
- package/e2e/lists.spec.ts +43 -0
- package/e2e/login.spec.ts +64 -0
- package/e2e/media.spec.ts +48 -0
- package/e2e/mocks.ts +51 -0
- package/e2e/monitoring.spec.ts +44 -0
- package/e2e/navigation.spec.ts +56 -0
- package/e2e/onboarding.spec.ts +49 -0
- package/e2e/responsive.spec.ts +40 -0
- package/e2e/risk.spec.ts +61 -0
- package/e2e/screening.spec.ts +76 -0
- package/e2e/team.spec.ts +53 -0
- package/index.html +50 -0
- package/package.json +47 -0
- package/playwright.config.ts +35 -0
- package/postcss.config.js +6 -0
- package/public/.well-known/ai-plugin.json +15 -0
- package/public/_headers +8 -0
- package/public/_redirects +1 -0
- package/public/favicon.svg +15 -0
- package/public/llms.txt +28 -0
- package/public/logo.png +0 -0
- package/public/logo.svg +17 -0
- package/public/manifest.json +44 -0
- package/public/robots.txt +15 -0
- package/public/schema.json +13 -0
- package/public/sitemap.xml +28 -0
- package/public/sw.js +67 -0
- package/scripts/test-runner.sh +152 -0
- package/src/App.tsx +48 -0
- package/src/api/alerts.ts +19 -0
- package/src/api/analytics.ts +6 -0
- package/src/api/audit.ts +11 -0
- package/src/api/auth.ts +26 -0
- package/src/api/billing.ts +54 -0
- package/src/api/cases.ts +48 -0
- package/src/api/client.ts +50 -0
- package/src/api/config.ts +30 -0
- package/src/api/edd.ts +25 -0
- package/src/api/enforcement.ts +33 -0
- package/src/api/lists.ts +24 -0
- package/src/api/monitoring.ts +82 -0
- package/src/api/pep.ts +30 -0
- package/src/api/risk.ts +26 -0
- package/src/api/screening.ts +37 -0
- package/src/api/team.ts +27 -0
- package/src/api/transactions.ts +37 -0
- package/src/components/admin/TenantCards.tsx +51 -0
- package/src/components/alerts/AlertActions.test.tsx +80 -0
- package/src/components/alerts/AlertActions.tsx +68 -0
- package/src/components/alerts/AlertCard.test.tsx +86 -0
- package/src/components/alerts/AlertCard.tsx +60 -0
- package/src/components/alerts/AlertDetailSidebar.tsx +63 -0
- package/src/components/alerts/AlertFilters.test.tsx +73 -0
- package/src/components/alerts/AlertFilters.tsx +88 -0
- package/src/components/alerts/EntityDetailsCard.test.tsx +61 -0
- package/src/components/alerts/EntityDetailsCard.tsx +37 -0
- package/src/components/alerts/NotesCard.test.tsx +39 -0
- package/src/components/alerts/NotesCard.tsx +28 -0
- package/src/components/auth/AuthDivider.tsx +18 -0
- package/src/components/auth/LoginForm.tsx +62 -0
- package/src/components/auth/LoginLeftPanel.tsx +43 -0
- package/src/components/auth/PasswordStrength.tsx +26 -0
- package/src/components/auth/SignInButtons.tsx +46 -0
- package/src/components/auth/SignupLeftPanel.tsx +35 -0
- package/src/components/auth/countries.ts +17 -0
- package/src/components/charts/AreaChart.tsx +45 -0
- package/src/components/charts/BarChart.tsx +48 -0
- package/src/components/charts/DonutChart.tsx +47 -0
- package/src/components/compliance/CaseActions.tsx +74 -0
- package/src/components/compliance/CaseTimeline.tsx +68 -0
- package/src/components/compliance/MediaResultCard.tsx +87 -0
- package/src/components/compliance/PEPResultCard.tsx +78 -0
- package/src/components/config/MatchingModesCard.test.tsx +75 -0
- package/src/components/config/MatchingModesCard.tsx +40 -0
- package/src/components/config/ScreeningLayersCard.test.tsx +57 -0
- package/src/components/config/ScreeningLayersCard.tsx +36 -0
- package/src/components/config/ThresholdsCard.test.tsx +79 -0
- package/src/components/config/ThresholdsCard.tsx +51 -0
- package/src/components/dashboard/ActivityFeed.tsx +93 -0
- package/src/components/dashboard/DashboardGreeting.tsx +23 -0
- package/src/components/dashboard/DashboardSkeleton.tsx +35 -0
- package/src/components/dashboard/QuickActions.tsx +52 -0
- package/src/components/dashboard/TopEntitiesTable.tsx +63 -0
- package/src/components/data/ComplianceMetrics.test.tsx +32 -0
- package/src/components/data/ComplianceMetrics.tsx +40 -0
- package/src/components/data/ConfidenceScore.test.tsx +62 -0
- package/src/components/data/ConfidenceScore.tsx +27 -0
- package/src/components/data/StatCard.test.tsx +72 -0
- package/src/components/data/StatCard.tsx +63 -0
- package/src/components/data/StatusBadge.test.tsx +63 -0
- package/src/components/data/StatusBadge.tsx +39 -0
- package/src/components/layout/AppShell.tsx +48 -0
- package/src/components/layout/Breadcrumbs.tsx +48 -0
- package/src/components/layout/CommandPalette.tsx +81 -0
- package/src/components/layout/DashboardLayout.tsx +19 -0
- package/src/components/layout/MobileHeader.tsx +30 -0
- package/src/components/layout/NavGroup.test.tsx +63 -0
- package/src/components/layout/NavGroup.tsx +64 -0
- package/src/components/layout/NotificationBell.tsx +89 -0
- package/src/components/layout/PageHeader.test.tsx +61 -0
- package/src/components/layout/PageHeader.tsx +19 -0
- package/src/components/layout/ProtectedRoute.tsx +31 -0
- package/src/components/layout/PublicLayout.tsx +17 -0
- package/src/components/layout/Sidebar.test.tsx +67 -0
- package/src/components/layout/Sidebar.tsx +92 -0
- package/src/components/layout/Toolbar.test.tsx +47 -0
- package/src/components/layout/Toolbar.tsx +68 -0
- package/src/components/layout/navItems.ts +94 -0
- package/src/components/lists/ListCard.tsx +78 -0
- package/src/components/lists/ListMarketplaceCard.tsx +77 -0
- package/src/components/screening/CircularConfidence.tsx +38 -0
- package/src/components/screening/LimitReachedBanner.tsx +31 -0
- package/src/components/screening/ListSelector.tsx +64 -0
- package/src/components/screening/MatchDetailHeader.tsx +64 -0
- package/src/components/screening/MatchEntityInfo.tsx +56 -0
- package/src/components/screening/MatchEvidenceBars.tsx +65 -0
- package/src/components/screening/MatchMetadata.tsx +95 -0
- package/src/components/screening/ScreenResults.tsx +49 -0
- package/src/components/screening/ScreeningForm.test.tsx +83 -0
- package/src/components/screening/ScreeningForm.tsx +100 -0
- package/src/components/screening/ScreeningLayersList.test.tsx +33 -0
- package/src/components/screening/ScreeningLayersList.tsx +46 -0
- package/src/components/screening/ScreeningProgress.tsx +91 -0
- package/src/components/screening/ScreeningQuotaBanner.tsx +64 -0
- package/src/components/screening/ScreeningResultCard.tsx +47 -0
- package/src/components/screening/ScreeningResultRow.tsx +45 -0
- package/src/components/screening/ScreeningResults.test.tsx +37 -0
- package/src/components/screening/ScreeningResults.tsx +33 -0
- package/src/components/screening/ShareResults.tsx +103 -0
- package/src/components/screening/ThresholdSlider.tsx +23 -0
- package/src/components/transactions/WebhookCTA.tsx +63 -0
- package/src/components/ui/Avatar.test.tsx +47 -0
- package/src/components/ui/Avatar.tsx +35 -0
- package/src/components/ui/Badge.test.tsx +49 -0
- package/src/components/ui/Badge.tsx +33 -0
- package/src/components/ui/Button.test.tsx +56 -0
- package/src/components/ui/Button.tsx +46 -0
- package/src/components/ui/Card.test.tsx +61 -0
- package/src/components/ui/Card.tsx +29 -0
- package/src/components/ui/ConfirmModal.tsx +67 -0
- package/src/components/ui/Divider.test.tsx +24 -0
- package/src/components/ui/Divider.tsx +5 -0
- package/src/components/ui/EmptyState.test.tsx +49 -0
- package/src/components/ui/EmptyState.tsx +22 -0
- package/src/components/ui/ErrorBoundary.tsx +44 -0
- package/src/components/ui/ExportMenu.tsx +71 -0
- package/src/components/ui/LanguageSwitcher.tsx +37 -0
- package/src/components/ui/LoadingSpinner.test.tsx +41 -0
- package/src/components/ui/LoadingSpinner.tsx +21 -0
- package/src/components/ui/MetricCard.tsx +63 -0
- package/src/components/ui/ScoreRing.tsx +51 -0
- package/src/components/ui/SearchField.test.tsx +55 -0
- package/src/components/ui/SearchField.tsx +31 -0
- package/src/components/ui/SeverityBadge.tsx +57 -0
- package/src/components/ui/ThemeToggle.tsx +37 -0
- package/src/components/ui/Toast.test.tsx +79 -0
- package/src/components/ui/Toast.tsx +75 -0
- package/src/components/ui/Toggle.test.tsx +85 -0
- package/src/components/ui/Toggle.tsx +46 -0
- package/src/context/AuthContext.tsx +71 -0
- package/src/data/pepProfiles.ts +76 -0
- package/src/data/pepProfilesExtra.ts +58 -0
- package/src/hooks/useAlerts.ts +36 -0
- package/src/hooks/useAnalytics.ts +23 -0
- package/src/hooks/useApi.test.ts +79 -0
- package/src/hooks/useApi.ts +33 -0
- package/src/hooks/useAudit.ts +28 -0
- package/src/hooks/useBilling.ts +38 -0
- package/src/hooks/useConfig.ts +35 -0
- package/src/hooks/useDebounce.test.ts +84 -0
- package/src/hooks/useDebounce.ts +15 -0
- package/src/hooks/useDirection.ts +15 -0
- package/src/hooks/useLists.ts +34 -0
- package/src/hooks/useMediaQuery.test.ts +97 -0
- package/src/hooks/useMediaQuery.ts +28 -0
- package/src/hooks/useScreening.ts +33 -0
- package/src/hooks/useSidebar.ts +18 -0
- package/src/hooks/useUsage.ts +27 -0
- package/src/i18n/config.ts +33 -0
- package/src/i18n/locales/ar/admin.json +19 -0
- package/src/i18n/locales/ar/alerts.json +52 -0
- package/src/i18n/locales/ar/analytics.json +9 -0
- package/src/i18n/locales/ar/audit.json +12 -0
- package/src/i18n/locales/ar/auth.json +60 -0
- package/src/i18n/locales/ar/batch.json +5 -0
- package/src/i18n/locales/ar/billing.json +41 -0
- package/src/i18n/locales/ar/common.json +65 -0
- package/src/i18n/locales/ar/compliance.json +83 -0
- package/src/i18n/locales/ar/config.json +13 -0
- package/src/i18n/locales/ar/dashboard.json +19 -0
- package/src/i18n/locales/ar/errors.json +9 -0
- package/src/i18n/locales/ar/index.ts +29 -0
- package/src/i18n/locales/ar/legal.json +10 -0
- package/src/i18n/locales/ar/lists.json +6 -0
- package/src/i18n/locales/ar/marketing.json +110 -0
- package/src/i18n/locales/ar/monitoring.json +15 -0
- package/src/i18n/locales/ar/nav.json +35 -0
- package/src/i18n/locales/ar/onboarding.json +25 -0
- package/src/i18n/locales/ar/platform.json +23 -0
- package/src/i18n/locales/ar/screening.json +26 -0
- package/src/i18n/locales/ar/team.json +11 -0
- package/src/i18n/locales/en/admin.json +21 -0
- package/src/i18n/locales/en/alerts.json +52 -0
- package/src/i18n/locales/en/analytics.json +9 -0
- package/src/i18n/locales/en/audit.json +12 -0
- package/src/i18n/locales/en/auth.json +60 -0
- package/src/i18n/locales/en/batch.json +5 -0
- package/src/i18n/locales/en/billing.json +87 -0
- package/src/i18n/locales/en/common.json +65 -0
- package/src/i18n/locales/en/compliance.json +83 -0
- package/src/i18n/locales/en/config.json +29 -0
- package/src/i18n/locales/en/dashboard.json +23 -0
- package/src/i18n/locales/en/errors.json +9 -0
- package/src/i18n/locales/en/index.ts +29 -0
- package/src/i18n/locales/en/legal.json +114 -0
- package/src/i18n/locales/en/lists.json +6 -0
- package/src/i18n/locales/en/marketing.json +174 -0
- package/src/i18n/locales/en/monitoring.json +15 -0
- package/src/i18n/locales/en/nav.json +35 -0
- package/src/i18n/locales/en/onboarding.json +31 -0
- package/src/i18n/locales/en/platform.json +25 -0
- package/src/i18n/locales/en/screening.json +26 -0
- package/src/i18n/locales/en/team.json +12 -0
- package/src/i18n/locales/he/admin.json +19 -0
- package/src/i18n/locales/he/alerts.json +52 -0
- package/src/i18n/locales/he/analytics.json +9 -0
- package/src/i18n/locales/he/audit.json +12 -0
- package/src/i18n/locales/he/auth.json +60 -0
- package/src/i18n/locales/he/batch.json +5 -0
- package/src/i18n/locales/he/billing.json +41 -0
- package/src/i18n/locales/he/common.json +65 -0
- package/src/i18n/locales/he/compliance.json +83 -0
- package/src/i18n/locales/he/config.json +13 -0
- package/src/i18n/locales/he/dashboard.json +19 -0
- package/src/i18n/locales/he/errors.json +9 -0
- package/src/i18n/locales/he/index.ts +29 -0
- package/src/i18n/locales/he/legal.json +10 -0
- package/src/i18n/locales/he/lists.json +6 -0
- package/src/i18n/locales/he/marketing.json +110 -0
- package/src/i18n/locales/he/monitoring.json +15 -0
- package/src/i18n/locales/he/nav.json +35 -0
- package/src/i18n/locales/he/onboarding.json +25 -0
- package/src/i18n/locales/he/platform.json +23 -0
- package/src/i18n/locales/he/screening.json +26 -0
- package/src/i18n/locales/he/team.json +11 -0
- package/src/index.css +112 -0
- package/src/main.tsx +15 -0
- package/src/pages/APIKeys.tsx +120 -0
- package/src/pages/AddMonitorModal.tsx +30 -0
- package/src/pages/AdverseMedia.test.tsx +18 -0
- package/src/pages/AdverseMedia.tsx +89 -0
- package/src/pages/AlertDetailPage.tsx +64 -0
- package/src/pages/AlertQueue.test.tsx +48 -0
- package/src/pages/AlertQueue.tsx +63 -0
- package/src/pages/Analytics.tsx +50 -0
- package/src/pages/AuditTrail.tsx +64 -0
- package/src/pages/BatchJobs.tsx +79 -0
- package/src/pages/CaseDetail.tsx +72 -0
- package/src/pages/CaseManagement.test.tsx +31 -0
- package/src/pages/CaseManagement.tsx +92 -0
- package/src/pages/Configuration.test.tsx +96 -0
- package/src/pages/Configuration.tsx +123 -0
- package/src/pages/CryptoScreening.tsx +109 -0
- package/src/pages/Dashboard.test.tsx +51 -0
- package/src/pages/Dashboard.tsx +66 -0
- package/src/pages/EDDWorkflow.test.tsx +29 -0
- package/src/pages/EDDWorkflow.tsx +73 -0
- package/src/pages/ForgotPassword.test.tsx +49 -0
- package/src/pages/ForgotPassword.tsx +67 -0
- package/src/pages/ListsMarketplace.tsx +102 -0
- package/src/pages/Login.test.tsx +100 -0
- package/src/pages/Login.tsx +57 -0
- package/src/pages/MFASetup.tsx +114 -0
- package/src/pages/MonitorProfileCard.tsx +27 -0
- package/src/pages/Monitoring.tsx +68 -0
- package/src/pages/Onboarding.test.tsx +36 -0
- package/src/pages/Onboarding.tsx +60 -0
- package/src/pages/PEPScreening.test.tsx +15 -0
- package/src/pages/PEPScreening.tsx +100 -0
- package/src/pages/ResetPassword.tsx +81 -0
- package/src/pages/RiskAssessment.test.tsx +15 -0
- package/src/pages/RiskAssessment.tsx +108 -0
- package/src/pages/SanctionsLists.tsx +74 -0
- package/src/pages/ScreenEntity.test.tsx +82 -0
- package/src/pages/ScreenEntity.tsx +76 -0
- package/src/pages/Signup.test.tsx +98 -0
- package/src/pages/Signup.tsx +92 -0
- package/src/pages/TaskHistory.tsx +183 -0
- package/src/pages/Team.test.tsx +15 -0
- package/src/pages/Team.tsx +140 -0
- package/src/pages/TransactionMonitoring.test.tsx +18 -0
- package/src/pages/TransactionMonitoring.tsx +118 -0
- package/src/pages/TxnScreening.tsx +125 -0
- package/src/pages/UBOChain.test.tsx +35 -0
- package/src/pages/UBOChain.tsx +65 -0
- package/src/pages/Webhooks.tsx +137 -0
- package/src/pages/admin/DataSources.tsx +230 -0
- package/src/pages/admin/Operations.tsx +103 -0
- package/src/pages/admin/ScheduledTasks.tsx +155 -0
- package/src/pages/admin/SystemHealth.tsx +58 -0
- package/src/pages/admin/TenantDetail.tsx +62 -0
- package/src/pages/admin/Tenants.test.tsx +20 -0
- package/src/pages/admin/Tenants.tsx +63 -0
- package/src/pages/admin/opsRunners.ts +81 -0
- package/src/pages/admin/opsTerminal.tsx +63 -0
- package/src/pages/billing/ActiveSubscriptions.tsx +41 -0
- package/src/pages/billing/AddProductModal.tsx +99 -0
- package/src/pages/billing/BillingPage.test.tsx +30 -0
- package/src/pages/billing/BillingPage.tsx +67 -0
- package/src/pages/billing/CurrentPlan.tsx +50 -0
- package/src/pages/billing/InvoiceList.tsx +104 -0
- package/src/pages/billing/InvoiceRow.tsx +37 -0
- package/src/pages/billing/LemonSqueezySetup.tsx +51 -0
- package/src/pages/billing/PaymentAlert.tsx +33 -0
- package/src/pages/billing/PlanComparison.tsx +53 -0
- package/src/pages/billing/ProductUsage.tsx +43 -0
- package/src/pages/billing/PromoCodeInput.tsx +58 -0
- package/src/pages/billing/SeatManager.tsx +80 -0
- package/src/pages/billing/SeatRow.tsx +32 -0
- package/src/pages/billing/SubscriptionCard.tsx +73 -0
- package/src/pages/billing/UpgradeModal.tsx +53 -0
- package/src/pages/billing/UsageHistory.tsx +37 -0
- package/src/pages/billing/UsageMeter.tsx +26 -0
- package/src/pages/billing/UsageOverview.tsx +38 -0
- package/src/pages/legal/PrivacyPolicy.tsx +25 -0
- package/src/pages/legal/TermsOfService.tsx +25 -0
- package/src/pages/marketing/BundleCallout.tsx +24 -0
- package/src/pages/marketing/CTASection.tsx +48 -0
- package/src/pages/marketing/CaseStudy.tsx +37 -0
- package/src/pages/marketing/ComparisonTable.tsx +66 -0
- package/src/pages/marketing/CompetitiveEdge.tsx +55 -0
- package/src/pages/marketing/DataCoverage.tsx +54 -0
- package/src/pages/marketing/DataRain.tsx +30 -0
- package/src/pages/marketing/EnterpriseCTA.tsx +26 -0
- package/src/pages/marketing/FAQItem.tsx +27 -0
- package/src/pages/marketing/FAQSchema.tsx +43 -0
- package/src/pages/marketing/FAQSection.tsx +19 -0
- package/src/pages/marketing/FeatureDetail.tsx +19 -0
- package/src/pages/marketing/FeaturesGrid.tsx +60 -0
- package/src/pages/marketing/FeaturesSpotlight.tsx +68 -0
- package/src/pages/marketing/FooterSection.tsx +92 -0
- package/src/pages/marketing/GradientOrbs.tsx +26 -0
- package/src/pages/marketing/HeroSearch.tsx +113 -0
- package/src/pages/marketing/HeroSection.tsx +72 -0
- package/src/pages/marketing/LandingPage.tsx +45 -0
- package/src/pages/marketing/LogoCloud.tsx +31 -0
- package/src/pages/marketing/LogoMarquee.tsx +45 -0
- package/src/pages/marketing/MarketingNav.tsx +80 -0
- package/src/pages/marketing/MatchingLayers.tsx +78 -0
- package/src/pages/marketing/MobileMenu.tsx +45 -0
- package/src/pages/marketing/PricingCard.tsx +57 -0
- package/src/pages/marketing/PricingFeatureRow.tsx +16 -0
- package/src/pages/marketing/PricingSection.tsx +103 -0
- package/src/pages/marketing/PricingToggle.tsx +40 -0
- package/src/pages/marketing/ProductPricingCards.tsx +23 -0
- package/src/pages/marketing/ProductShowcase.tsx +81 -0
- package/src/pages/marketing/ProductTabs.tsx +45 -0
- package/src/pages/marketing/QuoteRotator.tsx +56 -0
- package/src/pages/marketing/StatsBar.tsx +81 -0
- package/src/pages/marketing/StatsSection.tsx +44 -0
- package/src/pages/marketing/TestimonialCard.tsx +38 -0
- package/src/pages/marketing/TestimonialsSection.tsx +32 -0
- package/src/pages/marketing/animations.tsx +56 -0
- package/src/pages/onboarding/CountryStep.tsx +38 -0
- package/src/pages/onboarding/ListsStep.tsx +44 -0
- package/src/pages/onboarding/StepIndicator.tsx +34 -0
- package/src/pages/onboarding/ThresholdStep.tsx +49 -0
- package/src/pages/platform/APIKeys.tsx +102 -0
- package/src/pages/platform/Overview.tsx +58 -0
- package/src/pages/platform/Users.tsx +110 -0
- package/src/pages/reporting/ComplianceReport.tsx +99 -0
- package/src/pages/reporting/SARForm.tsx +99 -0
- package/src/routes/appRoutes.tsx +60 -0
- package/src/routes/compliance.tsx +28 -0
- package/src/routes/lazyCompliance.ts +34 -0
- package/src/routes/lazyPages.ts +35 -0
- package/src/routes/lazyPlatform.ts +5 -0
- package/src/routes/platform.tsx +15 -0
- package/src/styles/effects.css +76 -0
- package/src/test/setup.ts +25 -0
- package/src/test/utils.tsx +49 -0
- package/src/types/alert.ts +31 -0
- package/src/types/analytics.ts +16 -0
- package/src/types/audit.ts +11 -0
- package/src/types/billing.ts +60 -0
- package/src/types/common.ts +15 -0
- package/src/types/config.ts +19 -0
- package/src/types/entity.ts +34 -0
- package/src/types/index.ts +8 -0
- package/src/types/list.ts +15 -0
- package/src/types/screening.ts +32 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +65 -0
- package/tsconfig.json +22 -0
- package/vite.config.ts +11 -0
- package/vitest.config.ts +19 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
import type { Product, Subscription, UsageRecord, Seat, Invoice } from '../types/billing';
|
|
3
|
+
|
|
4
|
+
export async function getProducts(): Promise<Product[]> {
|
|
5
|
+
return api.get<Product[]>('/billing/products');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export async function getSubscriptions(): Promise<Subscription[]> {
|
|
9
|
+
return api.get<Subscription[]>('/billing/subscriptions');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export async function createCheckout(
|
|
13
|
+
product: string,
|
|
14
|
+
planId: string,
|
|
15
|
+
promoCode?: string,
|
|
16
|
+
billingPeriod: 'monthly' | 'annual' = 'monthly',
|
|
17
|
+
): Promise<{ checkoutUrl: string }> {
|
|
18
|
+
return api.post('/billing/checkout', { product, planId, promoCode, billingPeriod });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function getSeats(): Promise<Seat[]> {
|
|
22
|
+
return api.get<Seat[]>('/billing/seats');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function addSeat(email: string, role: string): Promise<Seat> {
|
|
26
|
+
return api.post<Seat>('/billing/seats', { email, role });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export async function removeSeat(userId: string): Promise<void> {
|
|
30
|
+
return api.del(`/billing/seats/${userId}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export async function getUsage(product: string): Promise<UsageRecord | null> {
|
|
34
|
+
return api.get<UsageRecord | null>(`/billing/usage?product=${product}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function applyPromoCode(code: string): Promise<{ discountPercent: number; message: string }> {
|
|
38
|
+
return api.post('/billing/promo', { code });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export async function getInvoices(): Promise<Invoice[]> {
|
|
42
|
+
return api.get<Invoice[]>('/billing/invoices');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface BillingHealth {
|
|
46
|
+
status: string;
|
|
47
|
+
mode: string;
|
|
48
|
+
ls_configured: boolean;
|
|
49
|
+
webhook_enabled: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export async function getBillingHealth(): Promise<BillingHealth> {
|
|
53
|
+
return api.get<BillingHealth>('/billing/health');
|
|
54
|
+
}
|
package/src/api/cases.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface ComplianceCase {
|
|
4
|
+
id: string;
|
|
5
|
+
alert_id: string;
|
|
6
|
+
status: 'open' | 'assigned' | 'escalated' | 'resolved';
|
|
7
|
+
assigned_to: string;
|
|
8
|
+
created_at: string;
|
|
9
|
+
updated_at: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface CaseDetail extends ComplianceCase {
|
|
13
|
+
comments: CaseComment[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CaseComment {
|
|
17
|
+
id: string;
|
|
18
|
+
case_id: string;
|
|
19
|
+
author: string;
|
|
20
|
+
body: string;
|
|
21
|
+
created_at: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface CaseListResponse {
|
|
25
|
+
data: ComplianceCase[];
|
|
26
|
+
total: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const casesApi = {
|
|
30
|
+
list: (status?: string) => {
|
|
31
|
+
const qs = status ? `?status=${status}` : '';
|
|
32
|
+
return api.get<CaseListResponse>(`/cases${qs}`);
|
|
33
|
+
},
|
|
34
|
+
get: (id: string) =>
|
|
35
|
+
api.get<CaseDetail>(`/cases/${id}`),
|
|
36
|
+
assign: (id: string, userId: string) =>
|
|
37
|
+
api.put<ComplianceCase>(`/cases/${id}/assign`, { user_id: userId }),
|
|
38
|
+
escalate: (id: string, reason: string) =>
|
|
39
|
+
api.put<ComplianceCase>(`/cases/${id}/escalate`, { reason }),
|
|
40
|
+
resolve: (id: string, resolution: string, notes: string) =>
|
|
41
|
+
api.put<ComplianceCase>(`/cases/${id}/resolve`, { resolution, notes }),
|
|
42
|
+
review: (id: string, disposition: string, justification: string) =>
|
|
43
|
+
api.put<{ status: string; message: string }>(`/cases/${id}/review`, { disposition, justification }),
|
|
44
|
+
bulkResolve: (caseIds: string[], disposition: string, justification: string) =>
|
|
45
|
+
api.post<{ resolved: number; total: number }>('/cases/bulk-resolve', {
|
|
46
|
+
case_ids: caseIds, disposition, justification,
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:8080';
|
|
2
|
+
|
|
3
|
+
export class ApiError extends Error {
|
|
4
|
+
constructor(public code: string, message: string, public status: number) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.name = 'ApiError';
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function getAuthHeaders(): Record<string, string> {
|
|
11
|
+
const token = localStorage.getItem('amliq_token');
|
|
12
|
+
if (!token) return {};
|
|
13
|
+
return { Authorization: `Bearer ${token}` };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function fetchApi<T>(
|
|
17
|
+
endpoint: string,
|
|
18
|
+
options: RequestInit = {},
|
|
19
|
+
): Promise<T> {
|
|
20
|
+
const url = `${API_BASE}/api/v1${endpoint}`;
|
|
21
|
+
const headers: Record<string, string> = {
|
|
22
|
+
'Content-Type': 'application/json',
|
|
23
|
+
...getAuthHeaders(),
|
|
24
|
+
...(options.headers as Record<string, string>),
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const resp = await fetch(url, { ...options, headers });
|
|
28
|
+
if (resp.status === 401) {
|
|
29
|
+
localStorage.removeItem('amliq_token');
|
|
30
|
+
if (!endpoint.endsWith('/auth/me')) {
|
|
31
|
+
window.location.href = '/login';
|
|
32
|
+
}
|
|
33
|
+
throw new ApiError('UNAUTHORIZED', 'Session expired', 401);
|
|
34
|
+
}
|
|
35
|
+
if (!resp.ok) {
|
|
36
|
+
const body = await resp.json().catch(() => ({}));
|
|
37
|
+
throw new ApiError(body.code || 'ERROR', body.message || resp.statusText, resp.status);
|
|
38
|
+
}
|
|
39
|
+
const json = await resp.json();
|
|
40
|
+
return (json.data != null ? json.data : json) as T;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const api = {
|
|
44
|
+
get: <T,>(ep: string) => fetchApi<T>(ep),
|
|
45
|
+
post: <T,>(ep: string, body: unknown) =>
|
|
46
|
+
fetchApi<T>(ep, { method: 'POST', body: JSON.stringify(body) }),
|
|
47
|
+
put: <T,>(ep: string, body: unknown) =>
|
|
48
|
+
fetchApi<T>(ep, { method: 'PUT', body: JSON.stringify(body) }),
|
|
49
|
+
del: <T,>(ep: string) => fetchApi<T>(ep, { method: 'DELETE' }),
|
|
50
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface TenantConfigResponse {
|
|
4
|
+
country: string;
|
|
5
|
+
regulation_framework: string[];
|
|
6
|
+
enabled_lists: ListConfigItem[];
|
|
7
|
+
default_threshold: number;
|
|
8
|
+
match_weights: Record<string, number>;
|
|
9
|
+
auto_dismiss_below: number;
|
|
10
|
+
auto_escalate_above: number;
|
|
11
|
+
screening_mode: string;
|
|
12
|
+
batch_schedule: string;
|
|
13
|
+
max_batch_size: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ListConfigItem {
|
|
17
|
+
list_id: string;
|
|
18
|
+
source_url: string;
|
|
19
|
+
custom_source_url: string;
|
|
20
|
+
parser_type: string;
|
|
21
|
+
sync_schedule: string;
|
|
22
|
+
sync_enabled: boolean;
|
|
23
|
+
threshold: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const configApi = {
|
|
27
|
+
get: () => api.get<TenantConfigResponse>('/config'),
|
|
28
|
+
update: (data: Partial<TenantConfigResponse>) =>
|
|
29
|
+
api.put<TenantConfigResponse>('/config', data),
|
|
30
|
+
};
|
package/src/api/edd.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface EDDReport {
|
|
4
|
+
id: string;
|
|
5
|
+
entity_name: string;
|
|
6
|
+
entity_type: string;
|
|
7
|
+
status: 'pending' | 'in_progress' | 'completed';
|
|
8
|
+
risk_level: string;
|
|
9
|
+
findings: string;
|
|
10
|
+
created_at: string;
|
|
11
|
+
completed_at: string | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface CreateEDDPayload {
|
|
15
|
+
entity_name: string;
|
|
16
|
+
entity_type?: string;
|
|
17
|
+
reason: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const eddApi = {
|
|
21
|
+
create: (payload: CreateEDDPayload) =>
|
|
22
|
+
api.post<EDDReport>('/edd', payload),
|
|
23
|
+
get: (id: string) =>
|
|
24
|
+
api.get<EDDReport>(`/edd/${id}`),
|
|
25
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface EnforcementAction {
|
|
4
|
+
id: string;
|
|
5
|
+
entity_name: string;
|
|
6
|
+
regulator: string;
|
|
7
|
+
action_type: string;
|
|
8
|
+
amount?: number;
|
|
9
|
+
currency?: string;
|
|
10
|
+
date: string;
|
|
11
|
+
description: string;
|
|
12
|
+
url: string;
|
|
13
|
+
jurisdiction: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface EnforcementSearchResponse {
|
|
17
|
+
query: string;
|
|
18
|
+
results: EnforcementAction[];
|
|
19
|
+
total: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface EnforcementEntityResponse {
|
|
23
|
+
entity_id: string;
|
|
24
|
+
actions: EnforcementAction[];
|
|
25
|
+
total: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const enforcementApi = {
|
|
29
|
+
search: (query: string) =>
|
|
30
|
+
api.get<EnforcementSearchResponse>(`/enforcement/search?q=${encodeURIComponent(query)}`),
|
|
31
|
+
getByEntity: (entityId: string) =>
|
|
32
|
+
api.get<EnforcementEntityResponse>(`/enforcement/entity/${entityId}`),
|
|
33
|
+
};
|
package/src/api/lists.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
interface ListMeta {
|
|
4
|
+
id: string;
|
|
5
|
+
source_url: string;
|
|
6
|
+
custom_url: string;
|
|
7
|
+
parser_type: string;
|
|
8
|
+
entity_count: number;
|
|
9
|
+
last_synced: number;
|
|
10
|
+
sync_enabled: boolean;
|
|
11
|
+
threshold: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ListsResponse {
|
|
15
|
+
lists: ListMeta[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const listsApi = {
|
|
19
|
+
list: () => api.get<ListsResponse>('/lists'),
|
|
20
|
+
get: (id: string) => api.get<ListMeta>(`/lists/${id}`),
|
|
21
|
+
sync: (id: string) => api.post(`/lists/${id}/sync`, {}),
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type { ListMeta };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface MonitorProfile {
|
|
4
|
+
id: string;
|
|
5
|
+
entity_name: string;
|
|
6
|
+
entity_type: string;
|
|
7
|
+
risk_level: 'low' | 'medium' | 'high' | 'critical';
|
|
8
|
+
lists_to_screen: string[];
|
|
9
|
+
frequency: 'realtime' | 'daily' | 'weekly';
|
|
10
|
+
status: 'active' | 'paused' | 'expired';
|
|
11
|
+
last_screened_at: string | null;
|
|
12
|
+
next_screen_at: string;
|
|
13
|
+
match_count: number;
|
|
14
|
+
created_at: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface MonitorAlert {
|
|
18
|
+
id: string;
|
|
19
|
+
profile_id: string;
|
|
20
|
+
alert_type: string;
|
|
21
|
+
match_score: number;
|
|
22
|
+
matched_entity: string;
|
|
23
|
+
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
24
|
+
reviewed_by: string;
|
|
25
|
+
reviewed_at: string | null;
|
|
26
|
+
disposition: string;
|
|
27
|
+
created_at: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface MonitorDashboard {
|
|
31
|
+
active_profiles: number;
|
|
32
|
+
total_profiles: number;
|
|
33
|
+
pending_alerts: number;
|
|
34
|
+
total_alerts: number;
|
|
35
|
+
by_severity: Record<string, number>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface ProfileListResponse {
|
|
39
|
+
profiles: MonitorProfile[];
|
|
40
|
+
total: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface AlertListResponse {
|
|
44
|
+
alerts: MonitorAlert[];
|
|
45
|
+
total: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface CreateProfilePayload {
|
|
49
|
+
entity_name: string;
|
|
50
|
+
entity_type: string;
|
|
51
|
+
risk_level: string;
|
|
52
|
+
frequency?: string;
|
|
53
|
+
lists?: string[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface UpdateProfilePayload {
|
|
57
|
+
frequency?: string;
|
|
58
|
+
lists?: string[];
|
|
59
|
+
status?: 'active' | 'paused';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const monitoringApi = {
|
|
63
|
+
listProfiles: () =>
|
|
64
|
+
api.get<ProfileListResponse>('/monitor'),
|
|
65
|
+
addProfile: (payload: CreateProfilePayload) =>
|
|
66
|
+
api.post<MonitorProfile>('/monitor', payload),
|
|
67
|
+
updateProfile: (id: string, payload: UpdateProfilePayload) =>
|
|
68
|
+
api.put<MonitorProfile>(`/monitor/${id}`, payload),
|
|
69
|
+
deleteProfile: (id: string) =>
|
|
70
|
+
api.del<{ status: string }>(`/monitor/${id}`),
|
|
71
|
+
listAlerts: (params?: { severity?: string; status?: string }) => {
|
|
72
|
+
const qs = new URLSearchParams(params as Record<string, string>).toString();
|
|
73
|
+
return api.get<AlertListResponse>(`/monitor/alerts${qs ? `?${qs}` : ''}`);
|
|
74
|
+
},
|
|
75
|
+
reviewAlert: (id: string, disposition: string, reviewedBy: string) =>
|
|
76
|
+
api.put<MonitorAlert>(`/monitor/alerts/${id}/review`, {
|
|
77
|
+
disposition,
|
|
78
|
+
reviewed_by: reviewedBy,
|
|
79
|
+
}),
|
|
80
|
+
getDashboard: () =>
|
|
81
|
+
api.get<MonitorDashboard>('/monitor/dashboard'),
|
|
82
|
+
};
|
package/src/api/pep.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface PEPProfile {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
country: string;
|
|
7
|
+
position: string;
|
|
8
|
+
level: 'head_of_state' | 'senior_official' | 'regional' | 'family' | 'associate';
|
|
9
|
+
active: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface PEPScreenResult {
|
|
13
|
+
is_pep: boolean;
|
|
14
|
+
confidence: number;
|
|
15
|
+
matches: PEPProfile[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface PEPListResponse {
|
|
19
|
+
profiles: PEPProfile[];
|
|
20
|
+
total: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const pepApi = {
|
|
24
|
+
screen: (name: string, country?: string) =>
|
|
25
|
+
api.post<PEPScreenResult>('/pep/screen', { name, country }),
|
|
26
|
+
listByCountry: (country?: string) => {
|
|
27
|
+
const qs = country ? `?country=${country}` : '';
|
|
28
|
+
return api.get<PEPListResponse>(`/pep${qs}`);
|
|
29
|
+
},
|
|
30
|
+
};
|
package/src/api/risk.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface RiskScoreRequest {
|
|
4
|
+
entity_name: string;
|
|
5
|
+
entity_type?: string;
|
|
6
|
+
country?: string;
|
|
7
|
+
factors?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface RiskScoreResult {
|
|
11
|
+
score: number;
|
|
12
|
+
level: 'low' | 'medium' | 'high' | 'critical';
|
|
13
|
+
factors: RiskFactor[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface RiskFactor {
|
|
17
|
+
name: string;
|
|
18
|
+
weight: number;
|
|
19
|
+
contribution: number;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const riskApi = {
|
|
24
|
+
score: (payload: RiskScoreRequest) =>
|
|
25
|
+
api.post<RiskScoreResult>('/risk/score', payload),
|
|
26
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
import type { ScreenResponse } from '../types';
|
|
3
|
+
|
|
4
|
+
export interface ScreenPayload {
|
|
5
|
+
entity_name: string;
|
|
6
|
+
entity_type?: string;
|
|
7
|
+
dob?: string;
|
|
8
|
+
nationality?: string;
|
|
9
|
+
lists?: string[];
|
|
10
|
+
threshold?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface FastScreenResult {
|
|
14
|
+
match: boolean;
|
|
15
|
+
confidence: number;
|
|
16
|
+
matched_name?: string;
|
|
17
|
+
list_id?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ScreeningQuota {
|
|
21
|
+
used: number;
|
|
22
|
+
limit: number;
|
|
23
|
+
remaining: number;
|
|
24
|
+
plan_name: string;
|
|
25
|
+
has_subscription: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const screeningApi = {
|
|
29
|
+
screen: (data: ScreenPayload) =>
|
|
30
|
+
api.post<ScreenResponse>('/screen', data),
|
|
31
|
+
screenFast: (name: string) =>
|
|
32
|
+
api.post<FastScreenResult>('/screen/fast', { name }),
|
|
33
|
+
getResult: (id: string) =>
|
|
34
|
+
api.get<ScreenResponse>(`/screen/${id}`),
|
|
35
|
+
getQuota: () =>
|
|
36
|
+
api.get<ScreeningQuota>('/screening/quota'),
|
|
37
|
+
};
|
package/src/api/team.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface TeamMember {
|
|
4
|
+
id: string;
|
|
5
|
+
email: string;
|
|
6
|
+
role: 'admin' | 'analyst' | 'auditor' | 'viewer';
|
|
7
|
+
status: 'active' | 'invited' | 'disabled';
|
|
8
|
+
joined_at: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface TeamListResponse {
|
|
12
|
+
members: TeamMember[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface InvitePayload {
|
|
16
|
+
email: string;
|
|
17
|
+
role: TeamMember['role'];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const teamApi = {
|
|
21
|
+
list: () =>
|
|
22
|
+
api.get<TeamListResponse>('/team'),
|
|
23
|
+
invite: (payload: InvitePayload) =>
|
|
24
|
+
api.post<TeamMember>('/team/invite', payload),
|
|
25
|
+
updateRole: (id: string, role: TeamMember['role']) =>
|
|
26
|
+
api.put<TeamMember>(`/team/${id}/role`, { role }),
|
|
27
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { api } from './client';
|
|
2
|
+
|
|
3
|
+
export interface Transaction {
|
|
4
|
+
id: string;
|
|
5
|
+
sender: string;
|
|
6
|
+
receiver: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
currency: string;
|
|
9
|
+
submitted_at: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TxnAlert {
|
|
13
|
+
id: string;
|
|
14
|
+
transaction_id: string;
|
|
15
|
+
rule: string;
|
|
16
|
+
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
17
|
+
created_at: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface TxnAlertListResponse {
|
|
21
|
+
alerts: TxnAlert[];
|
|
22
|
+
total: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface TxnAlertSummary {
|
|
26
|
+
total: number;
|
|
27
|
+
by_severity: Record<string, number>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const transactionsApi = {
|
|
31
|
+
submit: (txn: Omit<Transaction, 'id' | 'submitted_at'>) =>
|
|
32
|
+
api.post<Transaction>('/transactions', txn),
|
|
33
|
+
listAlerts: () =>
|
|
34
|
+
api.get<TxnAlertListResponse>('/transactions/alerts'),
|
|
35
|
+
alertSummary: () =>
|
|
36
|
+
api.get<TxnAlertSummary>('/transactions/alerts/summary'),
|
|
37
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { TFunction } from 'i18next'
|
|
2
|
+
|
|
3
|
+
interface ScreeningSectionProps {
|
|
4
|
+
label: string
|
|
5
|
+
count: number
|
|
6
|
+
t: TFunction
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function ScreeningSection({ label, count, t }: ScreeningSectionProps) {
|
|
10
|
+
return (
|
|
11
|
+
<div className="card-vibrancy p-xl">
|
|
12
|
+
<h2 className="sf-headline mb-md">{label}</h2>
|
|
13
|
+
<p className="sf-body">
|
|
14
|
+
{t('tenant_detail.total_screenings', { count })}
|
|
15
|
+
</p>
|
|
16
|
+
</div>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface ConfigSectionProps {
|
|
21
|
+
threshold: string
|
|
22
|
+
setThreshold: (v: string) => void
|
|
23
|
+
onSave: () => void
|
|
24
|
+
t: TFunction
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function ConfigSection({
|
|
28
|
+
threshold, setThreshold, onSave, t,
|
|
29
|
+
}: ConfigSectionProps) {
|
|
30
|
+
return (
|
|
31
|
+
<div className="card-vibrancy p-xl">
|
|
32
|
+
<h2 className="sf-headline mb-md">
|
|
33
|
+
{t('tenant_detail.config_override')}
|
|
34
|
+
</h2>
|
|
35
|
+
<div className="flex items-center gap-md">
|
|
36
|
+
<label htmlFor="threshold-input" className="sf-body">
|
|
37
|
+
{t('tenant_detail.match_threshold')}
|
|
38
|
+
</label>
|
|
39
|
+
<input id="threshold-input" type="number" min="50" max="99"
|
|
40
|
+
value={threshold}
|
|
41
|
+
aria-label={t('tenant_detail.match_threshold')}
|
|
42
|
+
onChange={e => setThreshold(e.target.value)}
|
|
43
|
+
className="input-field w-20" />
|
|
44
|
+
<button onClick={onSave} className="button-primary"
|
|
45
|
+
aria-label={t('tenant_detail.save')}>
|
|
46
|
+
{t('tenant_detail.save')}
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react'
|
|
2
|
+
import userEvent from '@testing-library/user-event'
|
|
3
|
+
import { describe, it, expect, vi } from 'vitest'
|
|
4
|
+
import { AlertActions } from './AlertActions'
|
|
5
|
+
|
|
6
|
+
describe('AlertActions', () => {
|
|
7
|
+
it('renders actions card title', () => {
|
|
8
|
+
render(<AlertActions />)
|
|
9
|
+
expect(screen.getByText('Actions')).toBeInTheDocument()
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
it('renders confirm button', () => {
|
|
13
|
+
render(<AlertActions />)
|
|
14
|
+
const buttons = screen.getAllByRole('button')
|
|
15
|
+
expect(buttons.length).toBeGreaterThanOrEqual(1)
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('calls onConfirm when confirm button clicked', async () => {
|
|
19
|
+
const handler = vi.fn()
|
|
20
|
+
render(<AlertActions onConfirm={handler} />)
|
|
21
|
+
const buttons = screen.getAllByRole('button')
|
|
22
|
+
await userEvent.click(buttons[0])
|
|
23
|
+
expect(handler).toHaveBeenCalledOnce()
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it('calls onFalsePositive when false positive button clicked', async () => {
|
|
27
|
+
const handler = vi.fn()
|
|
28
|
+
render(<AlertActions onFalsePositive={handler} />)
|
|
29
|
+
const buttons = screen.getAllByRole('button')
|
|
30
|
+
await userEvent.click(buttons[1])
|
|
31
|
+
expect(handler).toHaveBeenCalledOnce()
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it('calls onEscalate when escalate button clicked', async () => {
|
|
35
|
+
const handler = vi.fn()
|
|
36
|
+
render(<AlertActions onEscalate={handler} />)
|
|
37
|
+
const buttons = screen.getAllByRole('button')
|
|
38
|
+
await userEvent.click(buttons[2])
|
|
39
|
+
expect(handler).toHaveBeenCalledOnce()
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it('calls onDraftAI when AI draft button clicked', async () => {
|
|
43
|
+
const handler = vi.fn()
|
|
44
|
+
render(<AlertActions onDraftAI={handler} />)
|
|
45
|
+
const buttons = screen.getAllByRole('button')
|
|
46
|
+
await userEvent.click(buttons[3])
|
|
47
|
+
expect(handler).toHaveBeenCalledOnce()
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it('disables all buttons when disabled prop is true', () => {
|
|
51
|
+
render(<AlertActions disabled={true} />)
|
|
52
|
+
const buttons = screen.getAllByRole('button')
|
|
53
|
+
buttons.forEach(btn => {
|
|
54
|
+
expect(btn).toBeDisabled()
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('renders 4 action buttons', () => {
|
|
59
|
+
render(<AlertActions />)
|
|
60
|
+
const buttons = screen.getAllByRole('button')
|
|
61
|
+
expect(buttons.length).toBe(4)
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
it('only disables buttons when disabled true and handlers exist', async () => {
|
|
65
|
+
const handler = vi.fn()
|
|
66
|
+
render(
|
|
67
|
+
<AlertActions
|
|
68
|
+
onConfirm={handler}
|
|
69
|
+
onFalsePositive={handler}
|
|
70
|
+
onEscalate={handler}
|
|
71
|
+
onDraftAI={handler}
|
|
72
|
+
disabled={false}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
75
|
+
const buttons = screen.getAllByRole('button')
|
|
76
|
+
buttons.forEach(btn => {
|
|
77
|
+
expect(btn).not.toBeDisabled()
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
})
|