package platform import "time" type Page[T any] struct { Items []T `json:"items"` Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` } type MonitorSummary struct { TotalVehicles int `json:"totalVehicles"` LocationVehicles int `json:"locationVehicles"` NoLocationVehicles int `json:"noLocationVehicles"` OnlineVehicles int `json:"onlineVehicles"` OfflineVehicles int `json:"offlineVehicles"` DrivingVehicles int `json:"drivingVehicles"` IdleVehicles int `json:"idleVehicles"` AlertVehicles int `json:"alertVehicles"` UnknownVehicles int `json:"unknownVehicles"` ActiveToday int `json:"activeToday"` FrameToday int `json:"frameToday"` AlertDataAvailable bool `json:"alertDataAvailable"` Truncated bool `json:"truncated"` AsOf string `json:"asOf"` } type MonitorMapResponse struct { Mode string `json:"mode"` Zoom int `json:"zoom"` Total int `json:"total"` Truncated bool `json:"truncated"` Points []MonitorMapPoint `json:"points"` Clusters []MonitorMapCluster `json:"clusters"` ProvincePoints []MonitorMapProvincePoint `json:"provincePoints"` AsOf string `json:"asOf"` } type MonitorWorkspaceResponse struct { Summary MonitorSummary `json:"summary"` Vehicles Page[VehicleRealtimeRow] `json:"vehicles"` Map MonitorMapResponse `json:"map"` } type MonitorMapPoint struct { VIN string `json:"vin"` Plate string `json:"plate"` Protocol string `json:"protocol"` Protocols []string `json:"protocols"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` SpeedKmh float64 `json:"speedKmh"` SOCPercent float64 `json:"socPercent"` TotalMileageKm float64 `json:"totalMileageKm"` LastSeen string `json:"lastSeen"` ReportIntervalMs *int64 `json:"reportIntervalMs,omitempty"` LocationSource string `json:"locationSource"` LocationConflict bool `json:"locationConflict"` Status string `json:"status"` } type MonitorMapCluster struct { ID string `json:"id"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` Count int `json:"count"` Online int `json:"online"` Offline int `json:"offline"` Driving int `json:"driving"` Idle int `json:"idle"` Unknown int `json:"unknown"` } // MonitorMapProvincePoint is deliberately compact and identity-free. At the // nationwide zoom the browser groups these already-scoped coordinates with // AMap's cached administrative boundary node, while Clusters remain available // as a no-blank-map fallback if the boundary resource cannot be loaded. type MonitorMapProvincePoint struct { Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` Status string `json:"status"` } type TrackPlaybackResponse struct { VIN string `json:"vin"` Plate string `json:"plate"` Points []HistoryLocationRow `json:"points"` Events []TrackPlaybackEvent `json:"events"` Sources []TrackPlaybackSource `json:"sources"` Segments []TrackSegment `json:"segments"` Stops []TrackStop `json:"stops"` Summary TrackPlaybackSummary `json:"summary"` Coverage TrackCoverage `json:"coverage"` Quality TrackQuality `json:"quality"` Total int `json:"total"` Truncated bool `json:"truncated"` Sampled bool `json:"sampled"` AsOf string `json:"asOf"` } type TrackPlaybackSummary struct { StartTime string `json:"startTime"` EndTime string `json:"endTime"` DistanceKm float64 `json:"distanceKm"` DistanceMethod string `json:"distanceMethod"` DurationSeconds int64 `json:"durationSeconds"` AverageSpeedKmh float64 `json:"averageSpeedKmh"` MaximumSpeedKmh float64 `json:"maximumSpeedKmh"` PointCount int `json:"pointCount"` MovingSeconds int64 `json:"movingSeconds"` StoppedSeconds int64 `json:"stoppedSeconds"` StopCount int `json:"stopCount"` SegmentCount int `json:"segmentCount"` } type TrackPlaybackEvent struct { Index int `json:"index"` SampledIndex int `json:"sampledIndex"` Type string `json:"type"` Title string `json:"title"` Time string `json:"time"` SpeedKmh float64 `json:"speedKmh"` SOCPercent float64 `json:"socPercent"` SOCAvailable bool `json:"socAvailable"` DirectionDeg *int64 `json:"directionDeg,omitempty"` AlarmFlag *int64 `json:"alarmFlag,omitempty"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` } type TrackPlaybackSource struct { Protocol string `json:"protocol"` PointCount int `json:"pointCount"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` } // TrackCoverage makes a bounded replay query explicit. Complete=false means // summaries describe only the fetched slice, never the whole requested range. type TrackCoverage struct { RequestedStart string `json:"requestedStart"` RequestedEnd string `json:"requestedEnd"` ActualStart string `json:"actualStart"` ActualEnd string `json:"actualEnd"` TotalPoints int `json:"totalPoints"` FetchedPoints int `json:"fetchedPoints"` ProcessedPoints int `json:"processedPoints"` ReturnedPoints int `json:"returnedPoints"` Complete bool `json:"complete"` LimitReasons []string `json:"limitReasons"` Evidence string `json:"evidence"` } // TrackSegment is inferred from GPS movement and gaps. It deliberately does // not claim ignition state because vehicle_locations does not contain it. type TrackSegment struct { Index int `json:"index"` Type string `json:"type"` Title string `json:"title"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` DurationSeconds int64 `json:"durationSeconds"` DistanceKm float64 `json:"distanceKm"` PointCount int `json:"pointCount"` StartIndex int `json:"startIndex"` EndIndex int `json:"endIndex"` SampledStartIndex int `json:"sampledStartIndex"` SampledEndIndex int `json:"sampledEndIndex"` } type TrackStop struct { Index int `json:"index"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` DurationSeconds int64 `json:"durationSeconds"` PointCount int `json:"pointCount"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` SampledIndex int `json:"sampledIndex"` Evidence string `json:"evidence"` startIndex int endIndex int } type TrackQuality struct { Status string `json:"status"` SelectedProtocol string `json:"selectedProtocol"` RawPoints int `json:"rawPoints"` ValidPoints int `json:"validPoints"` AlternateSourcePoints int `json:"alternateSourcePoints"` InvalidCoordinatePoints int `json:"invalidCoordinatePoints"` DuplicatePoints int `json:"duplicatePoints"` DriftPoints int `json:"driftPoints"` SourceSwitches int `json:"sourceSwitches"` LargeGapCount int `json:"largeGapCount"` MaximumGapSeconds int64 `json:"maximumGapSeconds"` Evidence string `json:"evidence"` } type HistoryMetricCatalog struct { Categories []HistoryDataCategory `json:"categories"` Metrics []HistoryMetricDefinition `json:"metrics"` } type MetricCatalog struct { Metrics []MetricDefinition `json:"metrics"` AsOf string `json:"asOf"` } type MetricDefinition struct { Key string `json:"key"` Label string `json:"label"` Description string `json:"description"` Unit string `json:"unit"` Category string `json:"category"` ValueType string `json:"valueType"` Protocols []string `json:"protocols"` SourceFields map[string]string `json:"sourceFields"` ValueMappings []MetricValueMapping `json:"valueMappings,omitempty"` Searchable bool `json:"searchable"` Chartable bool `json:"chartable"` Alertable bool `json:"alertable"` } type MetricValueMapping struct { Value string `json:"value"` Label string `json:"label"` Description string `json:"description,omitempty"` } type HistoryDataCategory struct { Key string `json:"key"` Label string `json:"label"` } type HistoryMetricDefinition struct { Key string `json:"key"` Label string `json:"label"` Description string `json:"description,omitempty"` Unit string `json:"unit"` Category string `json:"category"` ValueType string `json:"valueType"` ValueMappings []MetricValueMapping `json:"valueMappings,omitempty"` DefaultVisible bool `json:"defaultVisible"` } type HistoryDataResponse struct { Category string `json:"category"` Columns []HistoryMetricDefinition `json:"columns"` Segments []LatestTelemetryCategory `json:"segments,omitempty"` SegmentCountsExact bool `json:"segmentCountsExact,omitempty"` AllTotal int `json:"allTotal,omitempty"` Rows []HistoryDataRow `json:"rows"` Summary HistoryDataSummary `json:"summary"` Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` AsOf string `json:"asOf"` } type HistoryDataSummary struct { ResultRows int `json:"resultRows"` VehicleCount int `json:"vehicleCount"` RequestedVehicleCount int `json:"requestedVehicleCount"` Vehicles []HistoryQueryVehicleResult `json:"vehicles"` Sources []string `json:"sources"` QueryDuration int64 `json:"queryDurationMs"` } type HistoryQueryVehicleResult struct { Keyword string `json:"keyword"` VIN string `json:"vin,omitempty"` Plate string `json:"plate,omitempty"` RowCount int `json:"rowCount"` Status string `json:"status"` } type HistoryDataRow struct { ID string `json:"id"` VIN string `json:"vin"` Plate string `json:"plate"` Protocol string `json:"protocol"` DeviceTime string `json:"deviceTime"` ServerTime string `json:"serverTime"` Quality string `json:"quality"` QualityReason string `json:"qualityReason"` EvidenceID string `json:"evidenceId,omitempty"` Values map[string]any `json:"values"` } type HistorySeriesResponse struct { Metrics []HistoryMetricDefinition `json:"metrics"` Series []HistorySeries `json:"series"` Summary HistorySeriesSummary `json:"summary"` DateFrom string `json:"dateFrom"` DateTo string `json:"dateTo"` AsOf string `json:"asOf"` } type HistorySeries struct { VIN string `json:"vin"` Plate string `json:"plate"` Protocol string `json:"protocol"` Metric string `json:"metric"` Label string `json:"label"` Unit string `json:"unit"` Aggregation string `json:"aggregation"` Points []HistorySeriesPoint `json:"points"` } type HistorySeriesPoint struct { Time string `json:"time"` Value *float64 `json:"value"` Min *float64 `json:"min"` Max *float64 `json:"max"` Count int64 `json:"count"` } type HistorySeriesSummary struct { RawPointCount int64 `json:"rawPointCount"` BucketCount int `json:"bucketCount"` ReturnedPointCount int `json:"returnedPointCount"` SeriesCount int `json:"seriesCount"` GrainSeconds int `json:"grainSeconds"` TargetPoints int `json:"targetPoints"` ExpectedBucketCount int `json:"expectedBucketCount"` MissingBucketCount int `json:"missingBucketCount"` QueryDuration int64 `json:"queryDurationMs"` Complete bool `json:"complete"` Evidence string `json:"evidence"` } type HistoryLocationSeriesQuery struct { VIN string Protocol string DateFrom string DateTo string GrainSeconds int } type HistoryLocationSeriesBucket struct { Time string Protocol string Count int64 SpeedAverage *float64 SpeedMinimum *float64 SpeedMaximum *float64 SpeedLast *float64 MileageAverage *float64 MileageMinimum *float64 MileageMaximum *float64 MileageLast *float64 } type HistoryExportRequest struct { Keywords []string `json:"keywords"` Category string `json:"category"` Protocol string `json:"protocol"` DateFrom string `json:"dateFrom"` DateTo string `json:"dateTo"` Metrics []string `json:"metrics"` Format string `json:"format"` RetentionDays int `json:"retentionDays,omitempty"` } type HistoryExportVehicleScope struct { VIN string `json:"vin"` DateFrom string `json:"dateFrom"` DateTo string `json:"dateTo"` } type HistoryExportJob struct { ID string `json:"id"` Name string `json:"name"` Status string `json:"status"` Progress int `json:"progress"` Format string `json:"format"` Category string `json:"category"` Protocol string `json:"protocol,omitempty"` Keywords []string `json:"keywords"` Metrics []string `json:"metrics,omitempty"` VehicleVINs []string `json:"vehicleVins"` VehicleScopes []HistoryExportVehicleScope `json:"vehicleScopes"` DateFrom string `json:"dateFrom"` DateTo string `json:"dateTo"` OwnerID string `json:"ownerId"` OwnerSubjectID string `json:"ownerSubjectId,omitempty"` OwnerName string `json:"ownerName"` OwnerUsername string `json:"ownerUsername"` OwnerRole string `json:"ownerRole"` OwnerUserType string `json:"ownerUserType"` AuthProvider string `json:"authProvider"` CustomerRef string `json:"customerRef,omitempty"` TenantRef string `json:"tenantRef,omitempty"` RowCount int `json:"rowCount"` TotalRows int64 `json:"totalRows"` ProcessedRows int64 `json:"processedRows"` FileSizeBytes int64 `json:"fileSizeBytes"` Error string `json:"error,omitempty"` DownloadURL string `json:"downloadUrl,omitempty"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` CompletedAt string `json:"completedAt,omitempty"` ExpiresAt string `json:"expiresAt,omitempty"` ExpiredAt string `json:"expiredAt,omitempty"` RebuiltFrom string `json:"rebuiltFrom,omitempty"` CancelledAt string `json:"cancelledAt,omitempty"` CancelledBy string `json:"cancelledBy,omitempty"` ArchivedAt string `json:"archivedAt,omitempty"` ArchivedBy string `json:"archivedBy,omitempty"` CleanupProtectedAt string `json:"cleanupProtectedAt,omitempty"` CleanupProtectedBy string `json:"cleanupProtectedBy,omitempty"` CleanupProtectionReason string `json:"cleanupProtectionReason,omitempty"` RetentionDays int `json:"retentionDays"` Evidence string `json:"evidence"` filePath string } type HistoryExportQuery struct { Search string Status string Scope string OwnerScope string Sort string Limit int Offset int } type HistoryExportSummary struct { Total int `json:"total"` Active int `json:"active"` Completed int `json:"completed"` Expiring int `json:"expiring"` Recoverable int `json:"recoverable"` Cancelled int `json:"cancelled"` Current int `json:"current"` Archived int `json:"archived"` } type HistoryExportPage struct { Items []HistoryExportJob `json:"items"` Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` Summary HistoryExportSummary `json:"summary"` } type HistoryFieldView struct { ID string `json:"id"` Name string `json:"name"` Category string `json:"category"` Keys []string `json:"keys"` } type HistoryPreferences struct { Revision int64 `json:"revision"` RetentionDays int `json:"retentionDays"` FieldViews []HistoryFieldView `json:"fieldViews"` UpdatedAt string `json:"updatedAt,omitempty"` } type HistoryExportBatchRequest struct { IDs []string `json:"ids"` Action string `json:"action"` } type HistoryExportBatchSkipped struct { ID string `json:"id"` Code string `json:"code"` Message string `json:"message"` } type HistoryExportBatchResult struct { Action string `json:"action"` Succeeded []HistoryExportJob `json:"succeeded"` Skipped []HistoryExportBatchSkipped `json:"skipped"` Requested int `json:"requested"` } type HistoryExportCleanupQuery struct { OlderThanDays int OwnerScope string } type HistoryExportCleanupCandidate struct { ID string `json:"id"` Name string `json:"name"` OwnerUsername string `json:"ownerUsername"` Status string `json:"status"` ArchivedAt string `json:"archivedAt"` FileSizeBytes int64 `json:"fileSizeBytes"` ProtectedAt string `json:"protectedAt,omitempty"` ProtectedBy string `json:"protectedBy,omitempty"` ProtectionReason string `json:"protectionReason,omitempty"` } type HistoryExportCleanupPreview struct { OlderThanDays int `json:"olderThanDays"` OwnerScope string `json:"ownerScope"` Cutoff string `json:"cutoff"` GeneratedAt string `json:"generatedAt"` ArchivedCount int `json:"archivedCount"` CandidateCount int `json:"candidateCount"` PlannedCount int `json:"plannedCount"` ProtectedCount int `json:"protectedCount"` FileCount int `json:"fileCount"` FileSizeBytes int64 `json:"fileSizeBytes"` Candidates []HistoryExportCleanupCandidate `json:"candidates"` Protected []HistoryExportCleanupCandidate `json:"protected"` PreviewToken string `json:"previewToken"` } type HistoryExportCleanupRequest struct { OlderThanDays int `json:"olderThanDays"` OwnerScope string `json:"ownerScope"` PreviewToken string `json:"previewToken"` } type HistoryExportCleanupRecord struct { ID string `json:"id"` Actor string `json:"actor"` OwnerScope string `json:"ownerScope"` OlderThanDays int `json:"olderThanDays"` Cutoff string `json:"cutoff"` Requested int `json:"requested"` Cleaned int `json:"cleaned"` Protected int `json:"protected"` FileCount int `json:"fileCount"` FileSizeBytes int64 `json:"fileSizeBytes"` CandidateDigest string `json:"candidateDigest"` ExecutedAt string `json:"executedAt"` } type HistoryExportCleanupResult struct { Record HistoryExportCleanupRecord `json:"record"` Deleted []HistoryExportCleanupCandidate `json:"deleted"` } type HistoryExportCleanupAutomationPolicy struct { Enabled bool `json:"enabled"` OlderThanDays int `json:"olderThanDays"` IntervalDays int `json:"intervalDays"` ApprovalWindowHours int `json:"approvalWindowHours"` NextReviewAt string `json:"nextReviewAt,omitempty"` Revision int64 `json:"revision"` UpdatedAt string `json:"updatedAt,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` } type HistoryExportCleanupAutomationRun struct { ID string `json:"id"` Status string `json:"status"` Revision int64 `json:"revision"` PolicyRevision int64 `json:"policyRevision"` OlderThanDays int `json:"olderThanDays"` Cutoff string `json:"cutoff"` CandidateCount int `json:"candidateCount"` PlannedCount int `json:"plannedCount"` ProtectedCount int `json:"protectedCount"` FileCount int `json:"fileCount"` FileSizeBytes int64 `json:"fileSizeBytes"` PreviewToken string `json:"previewToken"` CreatedAt string `json:"createdAt"` ApprovalDeadline string `json:"approvalDeadline,omitempty"` ApprovedAt string `json:"approvedAt,omitempty"` ApprovedBy string `json:"approvedBy,omitempty"` ApprovalReason string `json:"approvalReason,omitempty"` RejectedAt string `json:"rejectedAt,omitempty"` RejectedBy string `json:"rejectedBy,omitempty"` RejectionReason string `json:"rejectionReason,omitempty"` StartedAt string `json:"startedAt,omitempty"` CompletedAt string `json:"completedAt,omitempty"` LeaseOwner string `json:"leaseOwner,omitempty"` LeaseExpiresAt string `json:"leaseExpiresAt,omitempty"` AttemptCount int `json:"attemptCount"` MaxAttempts int `json:"maxAttempts"` NextRetryAt string `json:"nextRetryAt,omitempty"` Error string `json:"error,omitempty"` CleanupRecordID string `json:"cleanupRecordId,omitempty"` CleanedCount int `json:"cleanedCount,omitempty"` ExecutionWarning string `json:"executionWarning,omitempty"` LastActionAt string `json:"lastActionAt,omitempty"` LastActionBy string `json:"lastActionBy,omitempty"` LastActionReason string `json:"lastActionReason,omitempty"` } type HistoryExportCleanupAutomationState struct { Policy HistoryExportCleanupAutomationPolicy `json:"policy"` Runs []HistoryExportCleanupAutomationRun `json:"runs"` ServerTime string `json:"serverTime"` } type HistoryExportCleanupAutomationPolicyRequest struct { Enabled bool `json:"enabled"` OlderThanDays int `json:"olderThanDays"` IntervalDays int `json:"intervalDays"` ApprovalWindowHours int `json:"approvalWindowHours"` ExpectedRevision int64 `json:"expectedRevision"` } type HistoryExportCleanupAutomationActionRequest struct { ExpectedRevision int64 `json:"expectedRevision"` Reason string `json:"reason"` } type HistoryExportCleanupProtectionRequest struct { Protected bool `json:"protected"` Reason string `json:"reason"` } type HistoryExportStoreQuery struct { Category string VIN string Protocol string DateFrom string DateTo string Metrics []string } type HistoryExportCursor struct { Time string Protocol string ID string Offset int } type AccessQuery struct { Keyword string `json:"keyword"` Protocol string `json:"protocol"` OEM string `json:"oem"` Model string `json:"model"` Provider string `json:"provider"` FirstSeenFrom string `json:"firstSeenFrom"` FirstSeenTo string `json:"firstSeenTo"` LatestSeenFrom string `json:"latestSeenFrom"` LatestSeenTo string `json:"latestSeenTo"` OnlineState string `json:"onlineState"` DelayState string `json:"delayState"` ConnectionState string `json:"connectionState"` Limit int `json:"limit"` Offset int `json:"offset"` } type AccessEvidenceRow struct { VIN string Plate string OEM string Model string Company string Protocol string Provider string Source string FirstSeenAt string LatestEventAt string LatestReceivedAt string LatestUpdatedAt string ReportIntervalSec *int LatestMessageType string LatestEventID string LatestError string FirstSeenEvidence string FirstSeenSource string ReportIntervalProof string ReportSampleCount int64 Longitude float64 Latitude float64 SpeedKmh float64 SOCPercent float64 TotalMileageKm float64 DailyMileageKm float64 } type AccessVehicleRow struct { VIN string `json:"vin"` Plate string `json:"plate"` OEM string `json:"oem"` Model string `json:"model"` Company string `json:"company"` Protocol string `json:"protocol"` Provider string `json:"provider"` Source string `json:"source"` FirstSeenAt string `json:"firstSeenAt"` LatestEventAt string `json:"latestEventAt"` LatestReceivedAt string `json:"latestReceivedAt"` ReportIntervalSec *int `json:"reportIntervalSec"` DataDelaySec *int `json:"dataDelaySec"` FreshnessSec *int `json:"freshnessSec"` OnlineState string `json:"onlineState"` ThresholdSec int `json:"thresholdSec"` LatestMessageType string `json:"latestMessageType"` LatestEventID string `json:"latestEventId"` LatestError string `json:"latestError"` DelayAbnormal bool `json:"delayAbnormal"` FirstSeenEvidence string `json:"firstSeenEvidence"` FirstSeenSource string `json:"firstSeenSource"` ReportIntervalProof string `json:"reportIntervalEvidence"` ReportSampleCount int64 `json:"reportSampleCount"` ExpectedProtocols []string `json:"expectedProtocols"` ActualProtocols []string `json:"actualProtocols"` MissingProtocols []string `json:"missingProtocols"` ProtocolStatuses []AccessProtocolStatus `json:"protocolStatuses"` MasterDataIssues []string `json:"masterDataIssues"` ConnectionState string `json:"connectionState"` ExpectationEvidence string `json:"expectationEvidence"` } type AccessProtocolStatus struct { Protocol string `json:"protocol"` Expected bool `json:"expected"` Connected bool `json:"connected"` Provider string `json:"provider"` FirstSeenAt string `json:"firstSeenAt"` LatestEventAt string `json:"latestEventAt"` LatestReceivedAt string `json:"latestReceivedAt"` ReportIntervalSec *int `json:"reportIntervalSec"` DataDelaySec *int `json:"dataDelaySec"` FreshnessSec *int `json:"freshnessSec"` OnlineState string `json:"onlineState"` ThresholdSec int `json:"thresholdSec"` DelayAbnormal bool `json:"delayAbnormal"` FirstSeenEvidence string `json:"firstSeenEvidence"` ReportIntervalEvidence string `json:"reportIntervalEvidence"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` SpeedKmh float64 `json:"speedKmh"` SOCPercent float64 `json:"socPercent"` TotalMileageKm float64 `json:"totalMileageKm"` DailyMileageKm float64 `json:"dailyMileageKm"` } type AccessUnresolvedIdentityQuery struct { Keyword string `json:"keyword"` Protocol string `json:"protocol"` Limit int `json:"limit"` Offset int `json:"offset"` } type AccessUnresolvedIdentity struct { ID string `json:"id"` Protocol string `json:"protocol"` IdentifierMasked string `json:"identifierMasked"` Plate string `json:"plate"` Manufacturer string `json:"manufacturer"` SourceEndpoint string `json:"sourceEndpoint"` FirstRegisteredAt string `json:"firstRegisteredAt"` LatestRegisteredAt string `json:"latestRegisteredAt"` LatestAuthenticatedAt string `json:"latestAuthenticatedAt"` LatestSeenAt string `json:"latestSeenAt"` FreshnessSec int `json:"freshnessSec"` IssueCode string `json:"issueCode"` RecommendedAction string `json:"recommendedAction"` } type AccessIdentityClaimInput struct { VIN string `json:"vin"` Actor string `json:"actor"` Note string `json:"note"` } type AccessIdentityClaimResult struct { IdentityID string `json:"identityId"` Protocol string `json:"protocol"` IdentifierMasked string `json:"identifierMasked"` VIN string `json:"vin"` Plate string `json:"plate"` ProfileComplete bool `json:"profileComplete"` ProfileMissingFields []string `json:"profileMissingFields"` ClaimedBy string `json:"claimedBy"` ClaimedAt string `json:"claimedAt"` AuditID int64 `json:"auditId"` } type AccessDistribution struct { Name string `json:"name"` Total int `json:"total"` Online int `json:"online"` OnlineRate float64 `json:"onlineRate"` } type AccessSummary struct { TotalVehicles int `json:"totalVehicles"` OnlineVehicles int `json:"onlineVehicles"` OfflineVehicles int `json:"offlineVehicles"` LongOfflineVehicles int `json:"longOfflineVehicles"` NeverReported int `json:"neverReported"` UnknownVehicles int `json:"unknownVehicles"` DelayAbnormal int `json:"delayAbnormal"` ReportedToday int `json:"reportedToday"` HealthyVehicles int `json:"healthyVehicles"` IncompleteVehicles int `json:"incompleteVehicles"` DegradedVehicles int `json:"degradedVehicles"` MasterDataIncompleteVehicles int `json:"masterDataIncompleteVehicles"` OnlineRate float64 `json:"onlineRate"` Protocols []AccessDistribution `json:"protocols"` OEMs []AccessDistribution `json:"oems"` AsOf string `json:"asOf"` ThresholdVersion int `json:"thresholdVersion"` } type AccessProtocolThreshold struct { Protocol string `json:"protocol"` ThresholdSec int `json:"thresholdSec"` } type AccessThresholdAudit struct { Version int `json:"version"` Actor string `json:"actor"` ChangedAt string `json:"changedAt"` Summary string `json:"summary"` } type AccessThresholdConfig struct { Version int `json:"version"` DefaultThresholdSec int `json:"defaultThresholdSec"` DelayThresholdSec int `json:"delayThresholdSec"` LongOfflineSec int `json:"longOfflineSec"` Protocols []AccessProtocolThreshold `json:"protocols"` UpdatedBy string `json:"updatedBy"` UpdatedAt string `json:"updatedAt"` Audit []AccessThresholdAudit `json:"audit"` } type AccessThresholdUpdate struct { Version int `json:"version"` DefaultThresholdSec int `json:"defaultThresholdSec"` DelayThresholdSec int `json:"delayThresholdSec"` LongOfflineSec int `json:"longOfflineSec"` Protocols []AccessProtocolThreshold `json:"protocols"` Actor string `json:"actor"` } type AlertQuery struct { Keyword string `json:"keyword"` Severity string `json:"severity"` Status string `json:"status"` RuleID string `json:"ruleId"` Protocol string `json:"protocol"` DateFrom string `json:"dateFrom"` DateTo string `json:"dateTo"` Limit int `json:"limit"` Offset int `json:"offset"` } type AlertSummary struct { Active int `json:"active"` Unprocessed int `json:"unprocessed"` Processing int `json:"processing"` Recovered int `json:"recovered"` Closed int `json:"closed"` Ignored int `json:"ignored"` UnreadNotifications int `json:"unreadNotifications"` AsOf string `json:"asOf"` } type AlertRule struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` TriggerType string `json:"triggerType"` FenceName string `json:"fenceName"` FenceLongitude float64 `json:"fenceLongitude"` FenceLatitude float64 `json:"fenceLatitude"` FenceRadiusM float64 `json:"fenceRadiusM"` Severity string `json:"severity"` ValueType string `json:"valueType"` Metric string `json:"metric"` Operator string `json:"operator"` Threshold float64 `json:"threshold"` ThresholdHigh float64 `json:"thresholdHigh"` BooleanThreshold *bool `json:"booleanThreshold,omitempty"` DurationSec int `json:"durationSec"` RecoveryOperator string `json:"recoveryOperator"` RecoveryThreshold float64 `json:"recoveryThreshold"` RepeatIntervalSec int `json:"repeatIntervalSec"` ScopeProtocols []string `json:"scopeProtocols"` ScopeVINs []string `json:"scopeVins"` ScopeOEMs []string `json:"scopeOems"` ScopeModels []string `json:"scopeModels"` ScopeCompanies []string `json:"scopeCompanies"` NotificationChannels []string `json:"notificationChannels"` NotificationTargets []AlertNotificationTarget `json:"notificationTargets"` Enabled bool `json:"enabled"` Version int `json:"version"` CreatedBy string `json:"createdBy"` UpdatedBy string `json:"updatedBy"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` ArchivedBy string `json:"archivedBy,omitempty"` ArchivedAt string `json:"archivedAt,omitempty"` ArchiveReason string `json:"archiveReason,omitempty"` } type AlertRuleQuery struct { Keyword string `json:"keyword"` Status string `json:"status"` Protocol string `json:"protocol"` Lifecycle string `json:"lifecycle"` Limit int `json:"limit"` Offset int `json:"offset"` } type AlertRuleLibrarySummary struct { Current int `json:"current"` Enabled int `json:"enabled"` Disabled int `json:"disabled"` Archived int `json:"archived"` } type AlertRulePage struct { Items []AlertRule `json:"items"` Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` Summary AlertRuleLibrarySummary `json:"summary"` } type AlertRuleInput struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` TriggerType string `json:"triggerType"` FenceName string `json:"fenceName"` FenceLongitude float64 `json:"fenceLongitude"` FenceLatitude float64 `json:"fenceLatitude"` FenceRadiusM float64 `json:"fenceRadiusM"` Severity string `json:"severity"` ValueType string `json:"valueType"` Metric string `json:"metric"` Operator string `json:"operator"` Threshold float64 `json:"threshold"` ThresholdHigh float64 `json:"thresholdHigh"` BooleanThreshold *bool `json:"booleanThreshold,omitempty"` DurationSec int `json:"durationSec"` RecoveryOperator string `json:"recoveryOperator"` RecoveryThreshold float64 `json:"recoveryThreshold"` RepeatIntervalSec int `json:"repeatIntervalSec"` ScopeProtocols []string `json:"scopeProtocols"` ScopeVINs []string `json:"scopeVins"` ScopeOEMs []string `json:"scopeOems"` ScopeModels []string `json:"scopeModels"` ScopeCompanies []string `json:"scopeCompanies"` NotificationChannels []string `json:"notificationChannels"` NotificationTargets []AlertNotificationTarget `json:"notificationTargets"` Enabled bool `json:"enabled"` Version int `json:"version"` Actor string `json:"actor"` AuditAction string `json:"-"` } type AlertNotificationTarget struct { Channel string `json:"channel"` RecipientID string `json:"recipientId"` Label string `json:"label"` } type AlertNotificationTargetOption struct { ID string `json:"id"` Label string `json:"label"` Channels []string `json:"channels"` } type AlertNotificationChannelCapability struct { Channel string `json:"channel"` Label string `json:"label"` Configured bool `json:"configured"` } type AlertNotificationConfig struct { Targets []AlertNotificationTargetOption `json:"targets"` Channels []AlertNotificationChannelCapability `json:"channels"` } type AlertRuleRevision struct { RuleID string `json:"ruleId"` Version int `json:"version"` Actor string `json:"actor"` Action string `json:"action"` Reason string `json:"reason,omitempty"` CreatedAt string `json:"createdAt"` Snapshot AlertRule `json:"snapshot"` } type AlertRuleRollbackRequest struct { TargetVersion int `json:"targetVersion"` CurrentVersion int `json:"currentVersion"` Actor string `json:"actor"` } type AlertRuleEnabledUpdate struct { Version int `json:"version"` Enabled bool `json:"enabled"` Actor string `json:"actor"` } type AlertRuleLifecycleRequest struct { Version int `json:"version"` Reason string `json:"reason"` Actor string `json:"actor"` } type AlertEvent struct { ID string `json:"id"` EventType string `json:"eventType"` EventCategory string `json:"eventCategory"` ExecutionState string `json:"executionState"` RuleID string `json:"ruleId"` RuleName string `json:"ruleName"` RuleVersion int `json:"ruleVersion"` Severity string `json:"severity"` TriggerType string `json:"triggerType"` Status string `json:"status"` VIN string `json:"vin"` Plate string `json:"plate"` Protocol string `json:"protocol"` Metric string `json:"metric"` Operator string `json:"operator"` TriggerValue float64 `json:"triggerValue"` Threshold float64 `json:"threshold"` ThresholdHigh float64 `json:"thresholdHigh"` Unit string `json:"unit"` DurationSec int `json:"durationSec"` Location string `json:"location"` Longitude *float64 `json:"longitude,omitempty"` Latitude *float64 `json:"latitude,omitempty"` SourceEventID string `json:"sourceEventId"` EventAt string `json:"eventAt"` ReceivedAt string `json:"receivedAt"` TriggeredAt string `json:"triggeredAt"` RecoveredAt string `json:"recoveredAt"` Handler string `json:"handler"` Version int `json:"version"` Actions []AlertAction `json:"actions,omitempty"` } type AlertAction struct { ID int64 `json:"id"` Action string `json:"action"` FromStatus string `json:"fromStatus"` ToStatus string `json:"toStatus"` Actor string `json:"actor"` Note string `json:"note"` CreatedAt string `json:"createdAt"` } type AlertActionRequest struct { Version int `json:"version"` Action string `json:"action"` Actor string `json:"actor"` Note string `json:"note"` } type AlertNotification struct { ID int64 `json:"id"` EventID string `json:"eventId"` Title string `json:"title"` Content string `json:"content"` Severity string `json:"severity"` Channel string `json:"channel"` Recipient string `json:"recipient"` RecipientID string `json:"recipientId"` DeliveryStatus string `json:"deliveryStatus"` AttemptCount int `json:"attemptCount"` ProviderMessageID string `json:"providerMessageId"` VehiclePlate string `json:"vehiclePlate"` VehicleVIN string `json:"vehicleVin"` Protocol string `json:"protocol"` Read bool `json:"read"` CreatedAt string `json:"createdAt"` DeliveredAt string `json:"deliveredAt"` ReadAt string `json:"readAt"` LastError string `json:"lastError"` LastAttemptAt string `json:"lastAttemptAt"` RetryRequestedBy string `json:"retryRequestedBy"` RetryRequestedAt string `json:"retryRequestedAt"` RetryAvailable bool `json:"retryAvailable"` MaxAttempts int `json:"maxAttempts"` } type AlertNotificationChannelHealth struct { Channel string `json:"channel"` Label string `json:"label"` Configured bool `json:"configured"` Queued int `json:"queued"` Failed int `json:"failed"` DeadLetter int `json:"deadLetter"` ActiveLeases int `json:"activeLeases"` OldestQueuedAt string `json:"oldestQueuedAt"` } type AlertNotificationDeliveryHealth struct { Queued int `json:"queued"` Failed int `json:"failed"` DeadLetter int `json:"deadLetter"` ActiveLeases int `json:"activeLeases"` OldestQueuedAt string `json:"oldestQueuedAt"` Channels []AlertNotificationChannelHealth `json:"channels"` AsOf string `json:"asOf"` } type AlertNotificationQuery struct { UnreadOnly bool `json:"unreadOnly"` Search string `json:"search"` DeliveryStatus string `json:"deliveryStatus"` Limit int `json:"limit"` Offset int `json:"offset"` AllowedVINs []string `json:"-"` } type AlertNotificationReadRequest struct { IDs []int64 `json:"ids"` Actor string `json:"actor"` AllowedVINs []string `json:"-"` } type AlertNotificationRetryRequest struct { ExpectedAttemptCount int `json:"expectedAttemptCount"` Reason string `json:"reason"` IdempotencyKey string `json:"idempotencyKey"` Actor string `json:"actor"` } type AlertNotificationRetryAudit struct { ID int64 `json:"id"` NotificationID int64 `json:"notificationId"` IdempotencyKey string `json:"-"` Actor string `json:"actor"` Reason string `json:"reason"` PreviousStatus string `json:"previousStatus"` NextStatus string `json:"nextStatus"` AttemptCount int `json:"attemptCount"` RequestedAt string `json:"requestedAt"` } type AlertNotificationRetryResult struct { Notification AlertNotification `json:"notification"` Receipt AlertNotificationRetryAudit `json:"receipt"` Idempotent bool `json:"idempotent"` } type ReconciliationQuery struct { Keyword string `json:"keyword"` Scope string `json:"scope"` RuleCode string `json:"ruleCode"` Category string `json:"category"` Severity string `json:"severity"` Status string `json:"status"` Owner string `json:"owner"` SLA string `json:"sla"` Limit int `json:"limit"` Offset int `json:"offset"` } type ReconciliationAssignee struct { Name string `json:"name"` Username string `json:"username,omitempty"` Source string `json:"source"` ActiveCount int `json:"activeCount"` LastAssignedAt string `json:"lastAssignedAt,omitempty"` Current bool `json:"current,omitempty"` } type ReconciliationIssue struct { ID string `json:"id"` RuleCode string `json:"ruleCode"` Category string `json:"category"` Severity string `json:"severity"` Status string `json:"status"` VIN string `json:"vin"` Plate string `json:"plate"` ProtocolA string `json:"protocolA"` ProtocolB string `json:"protocolB"` Title string `json:"title"` Summary string `json:"summary"` Evidence map[string]any `json:"evidence"` FirstSeenAt string `json:"firstSeenAt"` LastSeenAt string `json:"lastSeenAt"` OccurrenceCount int64 `json:"occurrenceCount"` RecoveredAt string `json:"recoveredAt"` ResolutionNote string `json:"resolutionNote"` ResolvedBy string `json:"resolvedBy"` Assignee string `json:"assignee"` AssignedBy string `json:"assignedBy"` AssignedAt string `json:"assignedAt"` DueAt string `json:"dueAt"` ArchivedAt string `json:"archivedAt"` ArchivedBy string `json:"archivedBy"` ArchiveReason string `json:"archiveReason"` Version int `json:"version"` Actions []ReconciliationAction `json:"actions,omitempty"` } type ReconciliationAssignmentRequest struct { Version int `json:"version"` Assignee string `json:"assignee"` DueAt string `json:"dueAt"` Actor string `json:"actor"` } type ReconciliationBatchAssignmentRequest struct { Items []ReconciliationBatchActionItem `json:"items"` Assignee string `json:"assignee"` DueAt string `json:"dueAt"` } type ReconciliationAction struct { ID int64 `json:"id"` Action string `json:"action"` FromStatus string `json:"fromStatus"` ToStatus string `json:"toStatus"` Actor string `json:"actor"` Note string `json:"note"` CreatedAt string `json:"createdAt"` } type ReconciliationActionRequest struct { Version int `json:"version"` Status string `json:"status"` Note string `json:"note"` Actor string `json:"actor"` } type ReconciliationBatchActionItem struct { ID string `json:"id"` Version int `json:"version"` } type ReconciliationBatchActionRequest struct { Items []ReconciliationBatchActionItem `json:"items"` Status string `json:"status"` Note string `json:"note"` } type ReconciliationLifecycleRequest struct { Version int `json:"version"` Reason string `json:"reason"` Actor string `json:"actor"` } type ReconciliationBatchLifecycleRequest struct { Items []ReconciliationBatchActionItem `json:"items"` Reason string `json:"reason"` } type ReconciliationBatchActionFailure struct { ID string `json:"id"` Code string `json:"code"` Message string `json:"message"` } type ReconciliationBatchActionResult struct { Requested int `json:"requested"` Succeeded []ReconciliationIssue `json:"succeeded"` Skipped []ReconciliationBatchActionFailure `json:"skipped"` } type ReconciliationBucket struct { Name string `json:"name"` Count int `json:"count"` } type ReconciliationTrendPoint struct { Date string `json:"date"` Detected int `json:"detected"` New int `json:"new"` Active int `json:"active"` Recovered int `json:"recovered"` } type ReconciliationSummary struct { Current int `json:"current"` Archived int `json:"archived"` Active int `json:"active"` Pending int `json:"pending"` Confirmed int `json:"confirmed"` Recovered int `json:"recovered"` OverSLA int `json:"overSla"` ByRule []ReconciliationBucket `json:"byRule"` BySeverity []ReconciliationBucket `json:"bySeverity"` Trend []ReconciliationTrendPoint `json:"trend"` LastRunAt string `json:"lastRunAt"` AsOf string `json:"asOf"` } type ReconciliationEvaluationResult struct { RunID string `json:"runId"` Detected int `json:"detected"` New int `json:"new"` Active int `json:"active"` Recovered int `json:"recovered"` RuleCounts map[string]int `json:"ruleCounts"` AsOf string `json:"asOf"` } type AlertEvaluationResult struct { RulesEvaluated int `json:"rulesEvaluated"` VehiclesScanned int `json:"vehiclesScanned"` CandidatesAdvanced int `json:"candidatesAdvanced"` DuplicateObservations int `json:"duplicateObservations"` LateObservations int `json:"lateObservations"` StaleEvidenceSkipped int `json:"staleEvidenceSkipped"` Opened int `json:"opened"` Recovered int `json:"recovered"` AsOf string `json:"asOf"` } type DashboardSummary struct { OnlineVehicles int `json:"onlineVehicles"` ActiveToday int `json:"activeToday"` FrameToday int `json:"frameToday"` IssueVehicles int `json:"issueVehicles"` KafkaLag *int `json:"kafkaLag"` Protocols []ProtocolStat `json:"protocols"` ServiceStatuses []ServiceStatusStat `json:"serviceStatuses"` LinkHealth []LinkHealth `json:"linkHealth"` } type ProtocolStat struct { Protocol string `json:"protocol"` Online int `json:"online"` Total int `json:"total"` } type ServiceStatusStat struct { Status string `json:"status"` Title string `json:"title"` Count int `json:"count"` } type LinkHealth struct { Name string `json:"name"` Status string `json:"status"` Detail string `json:"detail,omitempty"` } type VehicleRow struct { VIN string `json:"vin"` Plate string `json:"plate"` Phone string `json:"phone"` OEM string `json:"oem"` Protocol string `json:"protocol"` Online bool `json:"online"` LastSeen string `json:"lastSeen"` LocationText string `json:"locationText"` BindingScore int `json:"bindingScore"` ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"` } type VehicleCoverageRow struct { VIN string `json:"vin"` Plate string `json:"plate"` Phone string `json:"phone"` OEM string `json:"oem"` Protocols []string `json:"protocols"` MissingProtocols []string `json:"missingProtocols"` SourceStatus []VehicleSourceStatus `json:"sourceStatus"` SourceCount int `json:"sourceCount"` OnlineSourceCount int `json:"onlineSourceCount"` Online bool `json:"online"` LastSeen string `json:"lastSeen"` BindingStatus string `json:"bindingStatus"` ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"` SourceConsistency *VehicleSourceConsistency `json:"sourceConsistency,omitempty"` } type VehicleCoverageSummary struct { TotalVehicles int `json:"totalVehicles"` OnlineVehicles int `json:"onlineVehicles"` SingleSourceVehicles int `json:"singleSourceVehicles"` MultiSourceVehicles int `json:"multiSourceVehicles"` NoDataVehicles int `json:"noDataVehicles"` UnboundVehicles int `json:"unboundVehicles"` ArchiveIncompleteVehicles int `json:"archiveIncompleteVehicles"` MissingSources []MissingSourceStat `json:"missingSources"` ArchiveMissingFields []ArchiveMissingFieldStat `json:"archiveMissingFields"` } type VehicleBusinessFilterOption struct { Value string `json:"value"` Label string `json:"label"` Count int `json:"count"` } type VehicleBusinessFilters struct { Departments []VehicleBusinessFilterOption `json:"departments"` ResponsibleUsers []VehicleBusinessFilterOption `json:"responsibleUsers"` Customers []VehicleBusinessFilterOption `json:"customers"` Statuses []VehicleBusinessFilterOption `json:"statuses"` } type VehicleIdentityResolution struct { LookupKey string `json:"lookupKey"` Resolved bool `json:"resolved"` VIN string `json:"vin"` Plate string `json:"plate"` Phone string `json:"phone"` OEM string `json:"oem"` Protocols []string `json:"protocols"` Online bool `json:"online"` LastSeen string `json:"lastSeen"` ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"` } type VehicleDetail struct { VIN string `json:"vin"` LookupKey string `json:"lookupKey"` LookupResolved bool `json:"lookupResolved"` Resolution *VehicleIdentityResolution `json:"resolution,omitempty"` Identity *VehicleRow `json:"identity,omitempty"` Profile *VehicleProfile `json:"profile,omitempty"` BusinessRelation *VehicleBusinessRelation `json:"businessRelation,omitempty"` RealtimeSummary *VehicleRealtimeRow `json:"realtimeSummary,omitempty"` ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"` ServiceOverview *VehicleServiceOverview `json:"serviceOverview,omitempty"` SourceConsistency *VehicleSourceConsistency `json:"sourceConsistency,omitempty"` Sources []string `json:"sources"` SourceStatus []VehicleSourceStatus `json:"sourceStatus"` Realtime []RealtimeLocationRow `json:"realtime"` History Page[HistoryLocationRow] `json:"history"` Raw Page[RawFrameRow] `json:"raw"` Mileage Page[DailyMileageRow] `json:"mileage"` Quality Page[QualityIssueRow] `json:"quality"` } // VehicleBusinessRelation is the active, read-only OneOS business projection // for a vehicle. IDs are serialized as strings because OneOS uses BIGINT keys // that may exceed JavaScript's safe integer range. type VehicleBusinessRelation struct { SourceSystem string `json:"sourceSystem"` SourceVersion string `json:"sourceVersion"` VehicleID string `json:"vehicleId"` VIN string `json:"vin"` PlateNumber string `json:"plateNumber"` CustomerID string `json:"customerId"` CustomerName string `json:"customerName"` ContractID string `json:"contractId"` ContractCode string `json:"contractCode"` ProjectName string `json:"projectName"` DepartmentID string `json:"departmentId"` DepartmentName string `json:"departmentName"` ResponsibleUserID string `json:"responsibleUserId"` ResponsibleUserName string `json:"responsibleUserName"` OperationStatus string `json:"operationStatus"` ScopeStartAt string `json:"scopeStartAt"` SourceUpdatedAt string `json:"sourceUpdatedAt"` PublishedAt string `json:"publishedAt"` } type VehicleProfile struct { VIN string `json:"vin"` BrandName string `json:"brandName"` ModelName string `json:"modelName"` VehicleType string `json:"vehicleType"` CompanyName string `json:"companyName"` OperationStatus string `json:"operationStatus"` AccessProvider string `json:"accessProvider"` FirstAccessAt string `json:"firstAccessAt"` RuntimeSeconds *int64 `json:"runtimeSeconds"` SourceSystem string `json:"sourceSystem"` SourceVersion string `json:"sourceVersion"` SyncedAt string `json:"syncedAt"` Version int `json:"version"` UpdatedBy string `json:"updatedBy"` UpdatedAt string `json:"updatedAt"` Completeness int `json:"completeness"` MissingFields []string `json:"missingFields"` } type VehicleProfileInput struct { BrandName string `json:"brandName"` ModelName string `json:"modelName"` VehicleType string `json:"vehicleType"` CompanyName string `json:"companyName"` OperationStatus string `json:"operationStatus"` AccessProvider string `json:"accessProvider"` FirstAccessAt string `json:"firstAccessAt"` RuntimeSeconds *int64 `json:"runtimeSeconds"` Version int `json:"version"` Actor string `json:"actor"` } type VehicleProfileSyncItem struct { VIN string `json:"vin"` BrandName string `json:"brandName"` ModelName string `json:"modelName"` VehicleType string `json:"vehicleType"` CompanyName string `json:"companyName"` OperationStatus string `json:"operationStatus"` AccessProvider string `json:"accessProvider"` FirstAccessAt string `json:"firstAccessAt"` RuntimeSeconds *int64 `json:"runtimeSeconds"` } type VehicleProfileSyncRequest struct { SourceSystem string `json:"sourceSystem"` SourceVersion string `json:"sourceVersion"` ConflictPolicy string `json:"conflictPolicy"` DryRun bool `json:"dryRun"` Items []VehicleProfileSyncItem `json:"items"` Actor string `json:"actor"` } type VehicleProfileSyncItemResult struct { VIN string `json:"vin"` Status string `json:"status"` PreviousSource string `json:"previousSource,omitempty"` PreviousVersion string `json:"previousVersion,omitempty"` ProfileVersion int `json:"profileVersion,omitempty"` } type VehicleProfileSyncResult struct { SourceSystem string `json:"sourceSystem"` SourceVersion string `json:"sourceVersion"` DryRun bool `json:"dryRun"` Received int `json:"received"` Created int `json:"created"` Updated int `json:"updated"` Unchanged int `json:"unchanged"` Conflicted int `json:"conflicted"` Missing int `json:"missing"` Items []VehicleProfileSyncItemResult `json:"items"` } type VehicleSourceConsistency struct { SourceCount int `json:"sourceCount"` OnlineSourceCount int `json:"onlineSourceCount"` LocatedSourceCount int `json:"locatedSourceCount"` MissingProtocols []string `json:"missingProtocols"` MileageDeltaKm float64 `json:"mileageDeltaKm"` SourceTimeDeltaSeconds float64 `json:"sourceTimeDeltaSeconds"` Scope string `json:"scope"` Status string `json:"status"` Severity string `json:"severity"` Title string `json:"title"` Detail string `json:"detail"` } type VehicleSourceEvidence struct { VIN string `json:"vin"` Plate string `json:"plate"` MileageDate string `json:"mileageDate"` RecommendedLocationProtocol string `json:"recommendedLocationProtocol"` RecommendedLocationLabel string `json:"recommendedLocationLabel"` LocationConflict bool `json:"locationConflict"` ConflictDistanceM *float64 `json:"conflictDistanceM,omitempty"` LocationSources []VehicleLocationSourceEvidence `json:"locationSources"` MileageSources []VehicleMileageSourceEvidence `json:"mileageSources"` Comparison VehicleSourceEvidenceComparison `json:"comparison"` AsOf string `json:"asOf"` } type VehicleLocationSourceEvidence struct { Protocol string `json:"protocol"` SourceLabel string `json:"sourceLabel"` ProviderOverride string `json:"providerOverride"` TerminalLabel string `json:"terminalLabel"` SourceKind string `json:"sourceKind"` SourceRef string `json:"sourceRef,omitempty"` SelectedWithinProtocol bool `json:"selectedWithinProtocol"` Recommended bool `json:"recommended"` Enabled bool `json:"enabled"` Priority int `json:"priority"` PolicyRemark string `json:"policyRemark"` Online bool `json:"online"` QualityStatus string `json:"qualityStatus"` QualityReason string `json:"qualityReason"` Longitude *float64 `json:"longitude,omitempty"` Latitude *float64 `json:"latitude,omitempty"` SpeedKmh *float64 `json:"speedKmh,omitempty"` TotalMileageKm *float64 `json:"totalMileageKm,omitempty"` SOCPercent *float64 `json:"socPercent,omitempty"` EventTime string `json:"eventTime"` ReceivedAt string `json:"receivedAt"` FirstSeenAt string `json:"firstSeenAt,omitempty"` ReportIntervalSec *int `json:"reportIntervalSec,omitempty"` ReportSampleCount int64 `json:"reportSampleCount,omitempty"` SelectionReason string `json:"selectionReason,omitempty"` sourceKey string } type VehicleMileageSourceEvidence struct { Protocol string `json:"protocol"` SourceLabel string `json:"sourceLabel"` TerminalLabel string `json:"terminalLabel"` SourceKind string `json:"sourceKind"` SelectedWithinProtocol bool `json:"selectedWithinProtocol"` Recommended bool `json:"recommended"` Enabled bool `json:"enabled"` Priority int `json:"priority"` QualityStatus string `json:"qualityStatus"` QualityReason string `json:"qualityReason"` FirstTotalMileageKm *float64 `json:"firstTotalMileageKm,omitempty"` LatestTotalMileageKm *float64 `json:"latestTotalMileageKm,omitempty"` DailyMileageKm *float64 `json:"dailyMileageKm,omitempty"` SampleCount int64 `json:"sampleCount"` FirstEventTime string `json:"firstEventTime"` LatestEventTime string `json:"latestEventTime"` sourceKey string } type VehicleSourceEvidenceComparison struct { LocationMaxDistanceM float64 `json:"locationMaxDistanceM"` TotalMileageDeltaKm float64 `json:"totalMileageDeltaKm"` DailyMileageDeltaKm float64 `json:"dailyMileageDeltaKm"` ReportTimeDeltaSeconds float64 `json:"reportTimeDeltaSeconds"` } type VehicleSourceDiagnostic struct { Evidence VehicleSourceEvidence `json:"evidence"` Access *AccessVehicleRow `json:"access,omitempty"` Policy VehicleSourcePolicyConfig `json:"policy"` RecommendationReason string `json:"recommendationReason"` RefreshHint string `json:"refreshHint"` } type VehicleSourcePolicyConfig struct { VIN string `json:"vin"` Version int `json:"version"` UpdatedBy string `json:"updatedBy"` UpdatedAt string `json:"updatedAt"` Audit []VehicleSourcePolicyAudit `json:"audit"` } type VehicleSourcePolicyAudit struct { Version int `json:"version"` ChangeType string `json:"changeType"` Protocol string `json:"protocol"` SourceRef string `json:"sourceRef"` SourceLabel string `json:"sourceLabel"` Actor string `json:"actor"` ChangedAt string `json:"changedAt"` Summary string `json:"summary"` } type VehicleSourcePolicyUpdate struct { Version int `json:"version"` SourceRef string `json:"sourceRef"` ProviderName string `json:"providerName"` ProviderEvidence string `json:"providerEvidence"` Enabled bool `json:"enabled"` Priority int `json:"priority"` Remark string `json:"remark"` Actor string `json:"actor"` } type vehicleSourcePolicyStoreUpdate struct { VehicleSourcePolicyUpdate VIN string Protocol string SourceKey string SourceLabel string CurrentEnabled bool CurrentPriority int CurrentRemark string CurrentProvider string PolicyConfigurable bool } type vehicleLocationSourceHistory struct { Protocol string sourceKey string FirstSeenAt string LastSeenAt string ReportSampleCount int64 } type VehicleServiceOverview struct { VIN string `json:"vin"` Plate string `json:"plate"` Phone string `json:"phone"` OEM string `json:"oem"` Protocols []string `json:"protocols"` PrimaryProtocol string `json:"primaryProtocol"` CoverageStatus string `json:"coverageStatus"` SourceCount int `json:"sourceCount"` OnlineSourceCount int `json:"onlineSourceCount"` LastSeen string `json:"lastSeen"` RealtimeCount int `json:"realtimeCount"` HistoryCount int `json:"historyCount"` RawCount int `json:"rawCount"` MileageCount int `json:"mileageCount"` QualityIssueCount int `json:"qualityIssueCount"` ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"` SourceConsistency *VehicleSourceConsistency `json:"sourceConsistency,omitempty"` } type VehicleServiceSummary struct { TotalVehicles int `json:"totalVehicles"` BoundVehicles int `json:"boundVehicles"` OnlineVehicles int `json:"onlineVehicles"` SingleSourceVehicles int `json:"singleSourceVehicles"` MultiSourceVehicles int `json:"multiSourceVehicles"` NoDataVehicles int `json:"noDataVehicles"` IdentityRequiredVehicles int `json:"identityRequiredVehicles"` ArchiveIncompleteVehicles int `json:"archiveIncompleteVehicles"` ServiceStatuses []ServiceStatusStat `json:"serviceStatuses"` Protocols []ProtocolStat `json:"protocols"` MissingSources []MissingSourceStat `json:"missingSources"` ArchiveMissingFields []ArchiveMissingFieldStat `json:"archiveMissingFields"` } type VehicleServiceStatus struct { Status string `json:"status"` Severity string `json:"severity"` Title string `json:"title"` Detail string `json:"detail"` SourceCount int `json:"sourceCount"` OnlineSourceCount int `json:"onlineSourceCount"` } type MissingSourceStat struct { Protocol string `json:"protocol"` Count int `json:"count"` } type SourceReadinessPlan struct { TotalVehicles int `json:"totalVehicles"` BoundVehicles int `json:"boundVehicles"` IdentityRequiredVehicles int `json:"identityRequiredVehicles"` OnlineVehicles int `json:"onlineVehicles"` KafkaLag *int `json:"kafkaLag"` ActiveConnections *int `json:"activeConnections"` RedisOnlineKeys *int `json:"redisOnlineKeys"` PlatformRelease string `json:"platformRelease"` Sources []SourceReadinessRow `json:"sources"` } type SourceReadinessRow struct { Protocol string `json:"protocol"` Role string `json:"role"` Online int `json:"online"` Total int `json:"total"` OnlineRate float64 `json:"onlineRate"` MissingVehicles int `json:"missingVehicles"` Severity string `json:"severity"` Status string `json:"status"` Evidence string `json:"evidence"` Action string `json:"action"` Acceptance string `json:"acceptance"` VehiclesHash string `json:"vehiclesHash"` RealtimeHash string `json:"realtimeHash"` HistoryHash string `json:"historyHash"` AlertHash string `json:"alertHash"` } type ArchiveMissingFieldStat struct { Field string `json:"field"` Title string `json:"title"` Count int `json:"count"` } type VehicleSourceStatus struct { Protocol string `json:"protocol"` Online bool `json:"online"` LastSeen string `json:"lastSeen"` HasRealtime bool `json:"hasRealtime"` HasHistory bool `json:"hasHistory"` HasRaw bool `json:"hasRaw"` HasMileage bool `json:"hasMileage"` } type RealtimeLocationRow struct { VIN string `json:"vin"` Plate string `json:"plate"` Protocol string `json:"protocol"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` SpeedKmh float64 `json:"speedKmh"` SOCPercent float64 `json:"socPercent"` TotalMileageKm float64 `json:"totalMileageKm"` LastSeen string `json:"lastSeen"` } type VehicleRealtimeRow struct { VIN string `json:"vin"` Plate string `json:"plate"` Phone string `json:"phone"` OEM string `json:"oem"` Protocols []string `json:"protocols"` SourceStatus []VehicleSourceStatus `json:"sourceStatus"` SourceCount int `json:"sourceCount"` OnlineSourceCount int `json:"onlineSourceCount"` Online bool `json:"online"` BindingStatus string `json:"bindingStatus"` ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"` PrimaryProtocol string `json:"primaryProtocol"` LocationSource string `json:"locationSource"` LocationConflict bool `json:"locationConflict"` ConflictDistanceM *float64 `json:"conflictDistanceM,omitempty"` LocationAvailable bool `json:"locationAvailable"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` SpeedAvailable bool `json:"speedAvailable"` SpeedKmh float64 `json:"speedKmh"` SOCAvailable bool `json:"socAvailable"` SOCPercent float64 `json:"socPercent"` MileageAvailable bool `json:"mileageAvailable"` TotalMileageKm float64 `json:"totalMileageKm"` TodayMileageAvailable bool `json:"todayMileageAvailable"` TodayMileageKm float64 `json:"todayMileageKm"` LastSeen string `json:"lastSeen"` ReportIntervalMs *int64 `json:"reportIntervalMs,omitempty"` } type HistoryLocationRow struct { VIN string `json:"vin"` Plate string `json:"plate"` Protocol string `json:"protocol"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` SpeedKmh float64 `json:"speedKmh"` SOCPercent float64 `json:"socPercent"` SOCAvailable bool `json:"socAvailable"` DirectionDeg *int64 `json:"directionDeg,omitempty"` AlarmFlag *int64 `json:"alarmFlag,omitempty"` TotalMileageKm float64 `json:"totalMileageKm"` MileageAvailable bool `json:"mileageAvailable"` DeviceTime string `json:"deviceTime"` ServerTime string `json:"serverTime"` } type RawFrameRow struct { ID string `json:"id"` VIN string `json:"vin"` Plate string `json:"plate"` Protocol string `json:"protocol"` FrameType string `json:"frameType"` DeviceTime string `json:"deviceTime"` ServerTime string `json:"serverTime"` RawSizeBytes int `json:"rawSizeBytes"` ParseStatus string `json:"parseStatus,omitempty"` ParseError string `json:"parseError,omitempty"` SourceEndpoint string `json:"sourceEndpoint,omitempty"` ParsedFields map[string]any `json:"parsedFields"` } type LatestTelemetryCategory struct { Key string `json:"key"` Label string `json:"label"` Count int `json:"count"` } type LatestTelemetryValue struct { Key string `json:"key"` SourceField string `json:"sourceField"` Label string `json:"label"` Description string `json:"description,omitempty"` Unit string `json:"unit"` Category string `json:"category"` ValueType string `json:"valueType"` Value any `json:"value"` DisplayValue string `json:"displayValue,omitempty"` Protocol string `json:"protocol"` SourceEndpoint string `json:"sourceEndpoint,omitempty"` FrameID string `json:"frameId"` DeviceTime string `json:"deviceTime"` ServerTime string `json:"serverTime"` Quality string `json:"quality"` QualityReason string `json:"qualityReason"` FreshnessSeconds int64 `json:"freshnessSeconds"` DataDelaySeconds *int64 `json:"dataDelaySeconds,omitempty"` } type LatestTelemetryResponse struct { VIN string `json:"vin"` Categories []LatestTelemetryCategory `json:"categories"` Values []LatestTelemetryValue `json:"values"` AsOf string `json:"asOf"` StaleAfterSeconds int64 `json:"staleAfterSeconds"` ScannedFrames int `json:"scannedFrames"` Evidence string `json:"evidence"` } type DailyMileageRow struct { VIN string `json:"vin"` Plate string `json:"plate"` Date string `json:"date"` StartMileageKm float64 `json:"startMileageKm"` EndMileageKm float64 `json:"endMileageKm"` DailyMileageKm float64 `json:"dailyMileageKm"` PureHydrogenMileageKm float64 `json:"pureHydrogenMileageKm,omitempty"` HydrogenConsumptionKg *float64 `json:"hydrogenConsumptionKg,omitempty"` HydrogenConsumptionKgPer100Km *float64 `json:"hydrogenConsumptionKgPer100Km,omitempty"` Source string `json:"source"` AnomalySeverity string `json:"anomalySeverity,omitempty"` } // MileageQuery is the POST contract used by mileage statistics and daily // mileage queries. Array fields keep large vehicle selections out of the URL // and avoid ambiguity when clients submit thousands of VINs. type MileageQuery struct { DateFrom string `json:"dateFrom"` DateTo string `json:"dateTo"` Keyword string `json:"keyword"` VINs []string `json:"vins"` VehicleScope string `json:"vehicleScope"` Protocol string `json:"protocol"` Protocols []string `json:"protocols"` Deduplicate bool `json:"deduplicate"` Limit int `json:"limit"` Offset int `json:"offset"` } type MileageSummary struct { VehicleCount int `json:"vehicleCount"` RecordCount int `json:"recordCount"` SourceCount int `json:"sourceCount"` TotalMileageKm float64 `json:"totalMileageKm"` TotalPureHydrogenMileageKm float64 `json:"totalPureHydrogenMileageKm,omitempty"` AverageMileagePerVIN float64 `json:"averageMileagePerVin"` } type MileageTrendPoint struct { Date string `json:"date"` MileageKm float64 `json:"mileageKm"` PureHydrogenMileageKm float64 `json:"pureHydrogenMileageKm,omitempty"` HydrogenMatchedMileageKm float64 `json:"hydrogenMatchedMileageKm,omitempty"` HydrogenDataDays int `json:"hydrogenDataDays,omitempty"` HydrogenConsumptionKg *float64 `json:"hydrogenConsumptionKg,omitempty"` HydrogenConsumptionKgPer100Km *float64 `json:"hydrogenConsumptionKgPer100Km,omitempty"` Vehicles int `json:"vehicles"` } type MileageVehicleRank struct { VIN string `json:"vin"` Plate string `json:"plate"` MileageKm float64 `json:"mileageKm"` LatestMileageKm float64 `json:"latestMileageKm"` ActiveDays int `json:"activeDays"` } type MileageStatistics struct { DateFrom string `json:"dateFrom"` DateTo string `json:"dateTo"` VehicleCount int `json:"vehicleCount"` RecordCount int `json:"recordCount"` SourceCount int `json:"sourceCount"` PeriodMileageKm float64 `json:"periodMileageKm"` PeriodPureHydrogenMileageKm float64 `json:"periodPureHydrogenMileageKm,omitempty"` HydrogenMatchedMileageKm float64 `json:"hydrogenMatchedMileageKm,omitempty"` HydrogenDataDays int `json:"hydrogenDataDays,omitempty"` PeriodHydrogenConsumptionKg float64 `json:"periodHydrogenConsumptionKg,omitempty"` HydrogenConsumptionKgPer100Km *float64 `json:"hydrogenConsumptionKgPer100Km,omitempty"` FleetLatestMileageKm float64 `json:"fleetLatestMileageKm"` AverageMileagePerVIN float64 `json:"averageMileagePerVin"` AverageDailyMileageKm float64 `json:"averageDailyMileageKm"` Trend []MileageTrendPoint `json:"trend"` Ranking []MileageVehicleRank `json:"ranking"` AsOf string `json:"asOf"` Evidence string `json:"evidence"` } type OnlineStatisticsSummary struct { VehicleCount int `json:"vehicleCount"` OnlineVehicleCount int `json:"onlineVehicleCount"` OfflineVehicleCount int `json:"offlineVehicleCount"` OnlineRatePercent float64 `json:"onlineRatePercent"` RedisOnlineKeys *int `json:"redisOnlineKeys"` ProtocolStats []ProtocolStat `json:"protocolStats"` Evidence string `json:"evidence"` } type OnlineVehicleStatusRow struct { VIN string `json:"vin"` Plate string `json:"plate"` Phone string `json:"phone"` OEM string `json:"oem"` Protocols []string `json:"protocols"` Online bool `json:"online"` LastSeen string `json:"lastSeen"` OfflineDurationMinutes *int `json:"offlineDurationMinutes"` SourceCount int `json:"sourceCount"` OnlineSourceCount int `json:"onlineSourceCount"` BindingStatus string `json:"bindingStatus"` } type QualityIssueRow struct { VIN string `json:"vin"` Plate string `json:"plate"` Phone string `json:"phone"` SourceEndpoint string `json:"sourceEndpoint"` Protocol string `json:"protocol"` IssueType string `json:"issueType"` Severity string `json:"severity"` LastSeen string `json:"lastSeen"` Detail string `json:"detail"` } type QualitySummary struct { IssueVehicleCount int `json:"issueVehicleCount"` IssueRecordCount int `json:"issueRecordCount"` ErrorCount int `json:"errorCount"` WarningCount int `json:"warningCount"` Protocols []QualityBucketStat `json:"protocols"` IssueTypes []QualityBucketStat `json:"issueTypes"` } type QualityBucketStat struct { Name string `json:"name"` Count int `json:"count"` } type QualityNotificationPlan struct { Summary QualitySummary `json:"summary"` Rules []QualityAlertRule `json:"rules"` Policies []QualityNotificationPolicy `json:"policies"` PriorityIssues []QualityPriorityIssue `json:"priorityIssues"` ActiveRuleCount int `json:"activeRuleCount"` P0RuleCount int `json:"p0RuleCount"` } type QualityAlertRule struct { IssueType string `json:"issueType"` Title string `json:"title"` Level string `json:"level"` Owner string `json:"owner"` Trigger string `json:"trigger"` Notify string `json:"notify"` SLA string `json:"sla"` Count int `json:"count"` } type QualityNotificationPolicy struct { Name string `json:"name"` Target string `json:"target"` Channel string `json:"channel"` Condition string `json:"condition"` EscalationMinutes int `json:"escalationMinutes"` AcceptanceCriteria string `json:"acceptanceCriteria"` } type QualityPriorityIssue struct { QualityIssueRow Priority string `json:"priority"` ActionLabel string `json:"actionLabel"` ActionDetail string `json:"actionDetail"` SLA string `json:"sla"` VehicleLabel string `json:"vehicleLabel"` RealtimeHash string `json:"realtimeHash"` HistoryHash string `json:"historyHash"` RawHash string `json:"rawHash"` VehicleHash string `json:"vehicleHash"` NotificationText string `json:"notificationText"` } type OpsHealth struct { LinkHealth []LinkHealth `json:"linkHealth"` KafkaLag *int `json:"kafkaLag"` ActiveConnections *int `json:"activeConnections"` CapacityMetrics CapacityMetrics `json:"capacityMetrics"` CapacityFindings []string `json:"capacityFindings"` RedisOnlineKeys *int `json:"redisOnlineKeys"` TDengineWritable bool `json:"tdengineWritable"` MySQLWritable bool `json:"mysqlWritable"` AlertStream AlertStreamHealth `json:"alertStream"` Runtime RuntimeInfo `json:"runtime"` } type AlertStreamHealth struct { Mode string `json:"mode"` ConsumerGroup string `json:"consumerGroup"` Partitions int `json:"partitions"` Lag int64 `json:"lag"` Processed int64 `json:"processed"` Valid int64 `json:"valid"` Invalid int64 `json:"invalid"` Late int64 `json:"late"` ReplaySkipped int64 `json:"replaySkipped"` UpdatedAt string `json:"updatedAt"` LastInvalidCode string `json:"lastInvalidCode"` LastInvalidAt string `json:"lastInvalidAt"` } type CapacityMetrics struct { ActiveConnections int `json:"activeConnections"` KafkaLag int `json:"kafkaLag"` BridgeConsumerPending int `json:"bridgeConsumerPending"` BridgeAckPending int `json:"bridgeAckPending"` BridgeBatchPendingMessages int `json:"bridgeBatchPendingMessages"` FastWriterConsumerPending int `json:"fastWriterConsumerPending"` FastWriterAckPending int `json:"fastWriterAckPending"` FastWriterBatchPending int `json:"fastWriterBatchPending"` HistoryBatchPending int `json:"historyBatchPending"` HistoryRowsPending int `json:"historyRowsPending"` } type RuntimeInfo struct { DataMode string `json:"dataMode"` ExportDir string `json:"-"` RequestTimeoutMs int `json:"requestTimeoutMs"` AMapWebJSConfigured bool `json:"amapWebJsConfigured"` AMapAPIConfigured bool `json:"amapApiConfigured"` AMapSecurityProxyEnabled bool `json:"amapSecurityProxyEnabled"` AMapSecurityCodeExposed bool `json:"amapSecurityCodeExposed"` AMapSecurityServiceHost string `json:"amapSecurityServiceHost"` PlatformRelease string `json:"platformRelease"` AlertStreamMode string `json:"alertStreamMode"` AlertStreamConsumerGroup string `json:"alertStreamConsumerGroup"` AlertNotificationConfig AlertNotificationConfig `json:"-"` HistoryCleanupAutomation bool `json:"historyCleanupAutomation"` HistoryCleanupPoll time.Duration `json:"-"` HistoryCleanupLease time.Duration `json:"-"` HistoryCleanupWorkerID string `json:"-"` }