Command & Query Catalog
Complete reference of all MediatR commands and queries in the Alert.CA.Frontend.Application project. Commands modify state; queries read state. All are dispatched by controllers via the Mediator property inherited from ApiControllerBase.
For an overview of the CQRS pattern and the services these commands coordinate with, see Application Services.
Camera Commands
| Command | Handler Action |
|---|---|
PanTiltCameraCommand | Calls CameraControlService.PanTiltZoomCamera(), then LeaseCameraAfterMove() on callback |
MoveCameraHomeCommand | Calls CameraControlService.MoveCameraHome() |
FocusCameraCommand | Calls CameraControlService.SetCameraFocus() |
BrightnessCommand | Calls CameraControlService.SetCameraBrightness() |
TogglePatrolModeCommand | Calls CameraControlService.GuardTourToggle() |
ActivateTurboModeCommand | Sends turbo mode request to Image Acquisition API |
CloseLeaseCommand | Calls CameraControlService.CloseLease() |
LeaseCameraAfterMoveCommand | Calls CameraControlService.LeaseCameraAfterMove() (internal callback) |
ExtendMovementExpirationCommand | Updates movement expiration date in Cosmos DB |
EndMovementExpirationCommand | Clears movement expiration for a camera |
Camera Queries
| Query | Returns |
|---|---|
GetStaticMetadataByCameraIdsQuery | Static camera metadata (combines Cosmos, SQL, and Acquisition device data) |
GetAllStaticCameraMetadataQuery | All static camera metadata, optionally filtered by user access |
GetOperationalCameraMetadataQuery | Operational metadata with optional time filter, images, and patrol mode |
GetCamerasByEntraUserIdQuery | Camera names the user has access to |
GetCameraStateQuery | Current device state from Cosmos DB |
GetLatestCameraMovementWithUserQuery | Latest movement record with user information |
GetLatestLeaseAndMoveByCameraQuery | Active lease and movement reason, if exists |
Image Queries
| Query | Returns |
|---|---|
GetImageMetadataForCamerasQuery | Latest image metadata for multiple cameras |
GetLatestImageByCameraIdQuery | Latest single image for one camera |
GetTimelapseForCameraQuery | Image metadata within a time range (max 6 hours) |
GetPanoramaImagesForCameraQuery | Panorama images within a time range |
GetLatestPanoramaMetadataForCameraQuery | Latest panorama for one camera |
Alert & Notification Commands
| Command | Description |
|---|---|
CreateAlertMessageCommand | Creates an alert with optional map image (PNG) |
CreateSubscriptionCommand | Creates a new notification subscription |
UpdateSubscriptionCommand | Updates an existing subscription |
PauseSubscriptionCommand | Pauses a subscription |
DeleteSubscriptionCommand | Soft-deletes a subscription |
Notification Queries
| Query | Returns |
|---|---|
GetSubscriptionByEntraUserIdQuery | User's subscriptions |
GetLocationsQuery | Available subscription locations |
User Commands & Queries
| Command / Query | Description |
|---|---|
UISettingsQuery | Gets UI settings from Cosmos DB for the user |
UpdateActivityLogReadDateCommand | Updates the user's last activity log read date |
UpdateCameraPinHideCommand | Updates pinned and hidden camera lists |
UpdateLayerVisibilityCommand | Updates map layer visibility preferences |
UpdateCameraOptionsCommand | Updates camera display options |
Activity Log
| Command / Query | Description |
|---|---|
AddMessageCommand | Inserts an activity log record into SQL Server |
GetLatestMessagesByCameraQuery | Retrieves latest messages for a camera (with optional count limit) |
Shared Views & Feature Flags
| Command / Query | Description |
|---|---|
CreateSharedViewCommand | Creates a shared view, returns the generated ID |
GetSharedViewByIdQuery | Retrieves a shared view by ID |
GetAllFeatureFlagsQuery | Retrieves all feature flags from App Configuration |