KeepSafe-web Replacement Call Map
Current non-admin calls made by KeepSafe-web and the intended Entity/facade replacement. Rows marked TBD are not implemented yet. Some calls belong behind other KeepSafe services long-term, but may be proxied by Entity during migration.
| Area | Current KeepSafe-web call | Replacement call | Status | Notes |
|---|---|---|---|---|
| Browser calls to EVENT_AI_ORIGIN | GET /api/event?id={id} | GET https://entity.keepsafe.ai/api/event?id={id} or GET https://entity.keepsafe.ai/v1/events/{id} | Implemented | Used by event details page and event query. |
| Browser calls to EVENT_AI_ORIGIN | GET /api/event?email={email} | GET https://entity.keepsafe.ai/api/event?email={email} | Implemented | Returns events affecting assets owned by the email. |
| Browser calls to EVENT_AI_ORIGIN | GET /api/getEventsByAssetWithGeoJson?monitored_site={assetId} | GET https://entity.keepsafe.ai/api/getEventsByAssetWithGeoJson?monitored_site={assetId} or GET https://entity.keepsafe.ai/v1/assets/{id}/events | Implemented | GeoJSON URL passthrough exists when events contain geometry URLs. |
| Browser calls to EVENT_AI_ORIGIN | POST /alerts/email/bulk | POST https://alerts.keepsafe.ai/v1/alerts and POST https://alerts.keepsafe.ai/v1/alerts/{id}/send | Partial | Alerting now owns contact-alert fan-out and calls Messenger for email transport. KeepSafe-web still needs to replace the raw bulk email payload with Alerting alert/message/recipient calls. |
| Browser calls to EVENT_AI_ORIGIN | POST /alerts/push/bulk | POST https://alerts.keepsafe.ai/v1/alerts and POST https://alerts.keepsafe.ai/v1/alerts/{id}/send | Partial | Alerting now owns contact-alert fan-out and calls Messenger for push transport. KeepSafe-web still needs to replace the raw bulk push payload with Alerting alert/message/recipient calls. |
| Browser calls to EVENT_AI_ORIGIN | POST /alerts/sms/bulk | POST https://alerts.keepsafe.ai/v1/alerts and POST https://alerts.keepsafe.ai/v1/alerts/{id}/send | Partial | Alerting now owns contact-alert fan-out and calls Messenger for SMS transport. KeepSafe-web still needs to replace the raw bulk SMS payload with Alerting alert/message/recipient calls. |
| KeepSafe-web server routes / TypeORM replacement | GET/PUT /api/users?id={id} | GET/PATCH https://entity.keepsafe.ai/v1/users/{id} | Implemented | Replace direct User repository reads/writes with Entity user API calls; admin-only user list/create/delete calls are omitted from this non-admin map. |
| KeepSafe-web server routes / TypeORM replacement | GET/PUT /api/users/settings | GET/PUT https://entity.keepsafe.ai/v1/users/{id}/settings | Implemented | Replace direct UserSetting repository reads/writes with Entity user-settings API calls. |
| KeepSafe-web server routes / TypeORM replacement | POST /api/assets | POST https://entity.keepsafe.ai/v1/assets | Partial | Entity can create assets one at a time today; bulk import can start as a KeepSafe-web loop, with a future bulk endpoint if needed. |
| KeepSafe-web server routes / TypeORM replacement | GET/POST/PUT /api/assets/settings | GET/PATCH https://entity.keepsafe.ai/v1/assets/{id} | Partial | Entity stores asset settings on asset records; KeepSafe-web needs shape/ownership parity for the current asset-settings UI. |
| KeepSafe-web server routes / TypeORM replacement | GET/POST /api/events/dismissed | GET/POST https://entity.keepsafe.ai/v1/users/{id}/dismissed-events | TBD | Needs dismissed-event model keyed by user and event before TypeORM can be removed for this route. |
| KeepSafe-web server routes / TypeORM replacement | GET/POST/PUT/DELETE /api/contacts | GET/POST/PATCH/DELETE https://alerts.keepsafe.ai/v1/contacts | Implemented | Moved to KeepSafe Alerting. Legacy contacts have been imported; KeepSafe-web still needs its local route cutover from TypeORM to Alerting. |
| KeepSafe-web server routes / TypeORM replacement | GET/PUT/DELETE /api/contacts/groups | GET/POST/PATCH/DELETE https://alerts.keepsafe.ai/v1/contact-groups | Implemented | Moved to KeepSafe Alerting. Legacy contact groups and memberships have been imported; KeepSafe-web route shape still needs cutover. |
| KeepSafe-web server routes / TypeORM replacement | GET/POST/PUT/DELETE /api/notifications | GET/POST/PATCH/DELETE https://alerts.keepsafe.ai/v1/alerts plus POST https://alerts.keepsafe.ai/v1/alerts/{id}/send | Implemented | Moved to KeepSafe Alerting as alerts, alert messages, alert recipients, and delivery attempts. Alerting calls Messenger for email/SMS/push. |
| KeepSafe-web server routes / TypeORM replacement | POST /api/notifications/dismiss | PATCH https://alerts.keepsafe.ai/v1/alerts/{id} | Implemented | Moved to KeepSafe Alerting. Set alert status/dismissed state on the Alerting alert record. |
| KeepSafe-web server routes / TypeORM replacement | GET /api/notifications/confirm | POST https://alerts.keepsafe.ai/v1/alert-recipients/{id}/confirm | Implemented | Moved to KeepSafe Alerting as recipient confirmation state. Confirmation endpoint is public by recipient id/code. |
| KeepSafe-web server routes / TypeORM replacement | POST /api/email and POST /api/email/bulk | POST https://messenger.keepsafe.ai/api/email/register and POST https://messenger.keepsafe.ai/api/email/send | Partial | Move ad hoc SendGrid calls to Messenger; KeepSafe-web needs a recipient-registration shim where it currently sends raw email addresses. |
| KeepSafe-web server routes / TypeORM replacement | /api/auth/* | https://identity.keepsafe.ai/authorize plus /token and /userinfo | Partial | KeepSafe Identity is live and should replace Auth.js DB-backed login/session tables for KeepSafe-web, but the KeepSafe-web auth client/session cutover still needs implementation. |
| External services used by KeepSafe-web | Mapbox geocoding/static/map tiles | Keep external | External | Not part of Entity replacement. |
Generated by KeepSafe Entity Service. Keep this page updated when new compatibility routes or proxy/delegation routes are implemented.