bitbadgesjs-sdk - v0.22.7
    Preparing search index...

    Interface iListingViewsDoc<T>

    interface iListingViewsDoc<T extends NumberType> {
        _docId: string;
        _id?: string;
        lastUpdated: T;
        listingId: string;
        viewCount: T;
        viewsByPeriod?: {
            daily: number;
            hourly: number;
            monthly: number;
            weekly: number;
        };
    }

    Type Parameters

    Hierarchy (View Summary)

    • Doc
      • iListingViewsDoc

    Implemented by

    Index

    Properties

    _docId: string

    A unique stringified document ID

    _id?: string

    A unique document ID (Mongo DB ObjectID)

    lastUpdated: T

    The last time this view count was updated

    listingId: string

    The listing ID this view count is for

    viewCount: T

    The total number of views

    viewsByPeriod?: {
        daily: number;
        hourly: number;
        monthly: number;
        weekly: number;
    }

    Optional breakdown of views by time period for trending calculations

    Type Declaration

    • daily: number

      Views in the last 24 hours

    • hourly: number

      Views in the last hour

    • monthly: number

      Views in the last 30 days

    • weekly: number

      Views in the last 7 days