Fake Mirrors
    Preparing search index...

    Class TargetModel

    Represents the target model.

    Hierarchy (View Summary)

    • Creates a new target model instance.

      Parameters

      • campaignId: string

        The ID of the campaign this target belongs to.

      • targetId: string

        The unique identifier for the target.

      • accessLevel: "transparent" | "landing"

        The type of access level.

      • donorSecure: boolean

        The flag indicating if the donor server uses HTTPS.

      • donorSub: string

        The donor subdomain.

      • donorDomain: string

        The donor domain name.

      • donorPort: number

        The donor server port.

      • mirrorSecure: boolean

        The flag indicating if the mirror server uses HTTPS.

      • mirrorSub: string

        The mirror subdomain.

      • mirrorDomain: string

        The mirror domain.

      • mirrorPort: number

        The mirror server port.

      • label: string

        The label for categorization.

      • isEnabled: boolean

        The flag indicating if the target is currently active for traffic routing.

      • messageCount: number

        The total number of messages processed for this target.

      • createdAt: Date

        The date and time when the target was created.

      Returns TargetModel

    accessLevel: "transparent" | "landing"

    The type of access level.

    campaignId: string

    The ID of the campaign this target belongs to.

    createdAt: Date

    The date and time when the target was created.

    donorDomain: string

    The donor domain name.

    donorPort: number

    The donor server port.

    donorSecure: boolean

    The flag indicating if the donor server uses HTTPS.

    donorSub: string

    The donor subdomain.

    isEnabled: boolean

    The flag indicating if the target is currently active for traffic routing.

    label: string

    The label for categorization.

    messageCount: number

    The total number of messages processed for this target.

    mirrorDomain: string

    The mirror domain.

    mirrorPort: number

    The mirror server port.

    mirrorSecure: boolean

    The flag indicating if the mirror server uses HTTPS.

    mirrorSub: string

    The mirror subdomain.

    targetId: string

    The unique identifier for the target.

    • get donorHost(): string

      The donor host.

      Returns string

      The concatenation of donor sub-domain, domain and port.

    • get donorHostname(): string

      The donor hostname.

      Returns string

      The concatenation of donor sub-domain and domain.

    • get donorProtocol(): string

      The donor protocol.

      Returns string

      The 'https:' if donor is secure, 'http:' otherwise.

    • get donorUrl(): string

      The full donor URL.

      Returns string

      The concatenation of donor protocol and host.

    • get mirrorHost(): string

      The mirror host.

      Returns string

      The concatenation of mirror sub-domain, domain and port.

    • get mirrorHostname(): string

      The mirror hostname.

      Returns string

      The concatenation of mirror sub-domain and domain.

    • get mirrorProtocol(): string

      The mirror protocol.

      Returns string

      The 'https:' if mirror is secure, 'http:' otherwise.

    • get mirrorUrl(): string

      The full mirror URL.

      Returns string

      The concatenation of mirror protocol and host.

    • Type guard to check if a model is enabled.

      Type Parameters

      Parameters

      • model: T

        The model to check.

      Returns model is T & { isEnabled: true }

      true if the model is enabled, false otherwise.

    • Type guard to filter out null models from a list.

      Type Parameters

      Parameters

      • model: T | null

        The model to check.

      Returns model is T

      true if the model is not null, false otherwise.