Fake Mirrors
    Preparing search index...

    Class FullTargetModel

    Represents the full target model.

    Hierarchy (View Summary)

    • Creates a new full 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.

      • connectTimeout: number

        The connection timeout in milliseconds.

      • simpleTimeout: number

        The simple request timeout in milliseconds.

      • streamTimeout: number

        The streaming request timeout in milliseconds.

      • headersSizeLimit: number

        The maximum headers size in bytes.

      • bodySizeLimit: number

        The maximum body size in bytes.

      • mainPage: string

        The custom main page content.

      • notFoundPage: string

        The custom not-found page content.

      • faviconIco: string

        The custom favicon.ico content.

      • robotsTxt: string

        The custom robots.txt content.

      • sitemapXml: string

        The custom sitemap.xml content.

      • allowWebSockets: boolean

        The flag indicating if WebSocket connections allowed.

      • 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 FullTargetModel

    accessLevel: "transparent" | "landing"

    The type of access level.

    allowWebSockets: boolean

    The flag indicating if WebSocket connections allowed.

    bodySizeLimit: number

    The maximum body size in bytes.

    campaignId: string

    The ID of the campaign this target belongs to.

    connectTimeout: number

    The connection timeout in milliseconds.

    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.

    faviconIco: string

    The custom favicon.ico content.

    headersSizeLimit: number

    The maximum headers size in bytes.

    isEnabled: boolean

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

    label: string

    The label for categorization.

    mainPage: string

    The custom main page content.

    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.

    notFoundPage: string

    The custom not-found page content.

    robotsTxt: string

    The custom robots.txt content.

    simpleTimeout: number

    The simple request timeout in milliseconds.

    sitemapXml: string

    The custom sitemap.xml content.

    streamTimeout: number

    The streaming request timeout in milliseconds.

    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 flags(): string[]

      The flags associated to the target.

      An ephemeral field; in reality, the data is not stored in the database.

      Returns string[]

    • 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.

    • Appends a specific flag to the target.

      Parameters

      • flag: string

        The flag to append.

      Returns void

    • Checks if the target has a specific flag.

      Parameters

      • flag: string

        The flag to check.

      Returns boolean

      true if the flag exists, false otherwise.

    • Removes a specific flag from the target.

      Parameters

      • flag: string

        The flag to remove.

      Returns void

    • 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.