Class UtilityListingDoc<T>

Type Parameters

Hierarchy (View Summary, Expand)

Implements

Constructors

Properties

_docId: string

A unique stringified document ID

_id?: string

A unique document ID (Mongo DB ObjectID)

approvalStatus: {
    featuredPriority?: number;
    isApproved: boolean;
    isFeatured?: boolean;
    reason?: string;
    rejected?: boolean;
    updatedBy?: string;
}

Approval status - can be used for moderation

categories: string[]

The categories of the listing

The paginated content for the listing

createdAt: T

The time the listing was created

createdBy: string

The BitBadges address of the user who created this listing

directLink?: string

The direct link for the listing. If specified, we will skip the entire content / listing page. Thus, content and links should be empty [].

displayTimes?: UintRange<T>

Optional time range for when the listing should be shown

estimatedCost?: EstimatedCost<T>

The estimated cost for this utility/service

estimatedTime?: string

The estimated time to complete or deliver this utility/service

homePageView?: {
    category: string;
    type: "badges" | "lists" | "claims" | "applications";
}

Home page view

inheritMetadataFrom?: InheritMetadataFrom<T>

Where to inherit metadata from? Only one can be specified.

lastUpdated?: T

The last updated timestamp

linkedTo?: LinkedTo<T>

Linked details

The relevant links for the listing

listingId: string

The listing ID

locale?: string

Locale (ex: es, fr, etc.). If not specified, we assume en.

managedBy: string

The BitBadges address of the user who is currently managing this

metadata: iMetadata<T>

The overall metadata for the listing

type: string

Type of the listing

viewCount?: T

The total view count for this listing. This is updated periodically from the view tracking document.

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

Optional breakdown of views by time period for trending calculations

visibility: "public" | "private" | "unlisted"

Visibility state of the listing

Methods

  • Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.

    If normalizeNumberTypes is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").

    Type Parameters

    Parameters

    • other: undefined | null | CustomType<U>
    • OptionalnormalizeNumberTypes: boolean

    Returns boolean

MMNEPVFCICPMFPCPTTAAATR