DataHolderScanSummary

public struct DataHolderScanSummary : Equatable, Sendable

Email interaction metrics captured during a single scan for a specific data holder.

A scan summary aggregates the emails observed from a data holder within a single scan’s date range, along with read and marketing engagement rates and a per-category breakdown.

  • Identifier of the data holder these metrics were captured for.

    Declaration

    Swift

    public let dataHolderId: String
  • Identifier of the Sudo that owns this scan summary.

    Declaration

    Swift

    public let owner: String
  • Time the scan that produced this summary was performed.

    Declaration

    Swift

    public let scannedAt: Date
  • Start of the date range covered by the scan.

    Declaration

    Swift

    public let scanRangeFrom: Date
  • End of the date range covered by the scan.

    Declaration

    Swift

    public let scanRangeTo: Date
  • Total number of emails observed from the data holder during the scan.

    Declaration

    Swift

    public let emailCount: Int
  • Number of observed emails that had been read.

    Declaration

    Swift

    public let readCount: Int
  • Proportion of observed emails that had been read (0…1).

    Declaration

    Swift

    public let readRate: Double
  • Number of observed emails classified as marketing.

    Declaration

    Swift

    public let marketingEmailCount: Int
  • Number of marketing emails that were opened.

    Declaration

    Swift

    public let marketingEmailOpened: Int
  • Proportion of marketing emails that were opened (0…1).

    Declaration

    Swift

    public let marketingOpenRate: Double
  • Per-category breakdown of the observed emails, keyed by category, as a JSON string.

    Declaration

    Swift

    public let categoryBreakdown: String
  • Number of observed emails that could not be categorized.

    Declaration

    Swift

    public let uncategorizedCount: Int
  • Declaration

    Swift

    public init(
        dataHolderId: String,
        owner: String,
        scannedAt: Date,
        scanRangeFrom: Date,
        scanRangeTo: Date,
        emailCount: Int,
        readCount: Int,
        readRate: Double,
        marketingEmailCount: Int,
        marketingEmailOpened: Int,
        marketingOpenRate: Double,
        categoryBreakdown: String,
        uncategorizedCount: Int
    )