Fake Mirrors
    Preparing search index...

    Class TargetService

    Represents the target service.

    • Appends a label to the target.

      Parameters

      • data: { campaignId: string; label: string; lockSecret: string; targetId: string }

        The data object.

      Returns Promise<void>

    • Creates a new target.

      Parameters

      • data: {
            accessLevel: "transparent" | "landing";
            allowWebSockets: boolean;
            bodySizeLimit: number;
            campaignId: string;
            connectTimeout: number;
            donorDomain: string;
            donorPort: number;
            donorSecure: boolean;
            donorSub: string;
            faviconIco: string;
            headersSizeLimit: number;
            lockSecret: string;
            mainPage: string;
            mirrorPort: number;
            mirrorSecure: boolean;
            mirrorSub: string;
            notFoundPage: string;
            robotsTxt: string;
            simpleTimeout: number;
            sitemapXml: string;
            streamTimeout: number;
            targetId: string;
        }

        The data object.

      Returns Promise<FullTargetModel>

      The created target model.

    • Deletes the target by its ID.

      Parameters

      • data: { campaignId: string; lockSecret: string; targetId: string }

        The data object.

      Returns Promise<void>

    • Disables the target, stopping traffic routing.

      Parameters

      • data: { campaignId: string; lockSecret: string; targetId: string }

        The data object.

      Returns Promise<void>

    • Enables the target, making it available for traffic routing.

      Parameters

      • data: { campaignId: string; lockSecret: string; targetId: string }

        The data object.

      Returns Promise<void>

    • Reads the target by its ID.

      Parameters

      • data: { campaignId: string; targetId: string }

        The data object.

      Returns Promise<FullTargetModel>

      The target model.

      ReplServerError If the target is not found.

    • Removes a label from the target.

      Parameters

      • data: { campaignId: string; label: string; lockSecret: string; targetId: string }

        The data object.

      Returns Promise<void>

    • Updates the target specific fields.

      Parameters

      • data: {
            allowWebSockets: boolean | null | undefined;
            bodySizeLimit: number | null | undefined;
            campaignId: string;
            connectTimeout: number | null | undefined;
            faviconIco: string | null | undefined;
            headersSizeLimit: number | null | undefined;
            lockSecret: string;
            mainPage: string | null | undefined;
            notFoundPage: string | null | undefined;
            robotsTxt: string | null | undefined;
            simpleTimeout: number | null | undefined;
            sitemapXml: string | null | undefined;
            streamTimeout: number | null | undefined;
            targetId: string;
        }

        The data object.

      Returns Promise<void>