import { MonetizeEnums } from '../monetize_api'; export declare enum TierType { MANUAL = "manual", SORT_BY_CPM = "sortByCpm", OPTIMIZED = "optimized", BIDDERS = "bidding" } export declare class MediationGroupTier { private _instances; private _tierType; /** * * @param {TierType} tierType - the type of tier */ constructor(tierType: TierType); /** * Adds an instance to the tier. * @param {MonetizeEnums.Networks} network - Network name * @param {number} instanceId - ID of the instance for the network (see MonetizeAPI().getInstanceIds()) * @param {object} optionalParams - Optional parameters * @param {number} optionalParams.rate - Optional: overrides the cpm of the instance with rate * @param {number} optionalParams.position - Optional: The position of the instance in the waterfall, only for Manual tier type * @param {number} optionalParams.capping - Optional: Set capping for the instance per session * */ addInstances(network: MonetizeEnums.Networks, instanceId: number, optionalParams?: { rate?: number; position?: number; capping?: number; }): void; /** * Returns list of instances in the tier */ getInstanceList(): any; /** * Removes instance from the tier. * @param {MonetizeEnums.Networks} network - The network of the instance to remove. * @param {number} instanceID - Instance ID to remove. */ removeInstance(network: MonetizeEnums.Networks, instanceID: number): void; /** * returns the position of the instance in a given array of instances * @hidden * @ignore * @param array - Array of instances * @param instanceId - Instance ID * @param network - Network * * @returns - location of the instance in the array */ private _checkIfExists; /** * returns the tier type * @returns {TierType} */ getTierType(): TierType; /** * building tier object for sending to the API. */ toString(): any; } export declare class MediationGroupPriority { private _tierArray; private _bidders; /** * set the mediation group with a tier. * @param {MediationGroupTier} groupTier - MediationGroupTier to be added to the group tier list * @param {number} position - The Position of the tier (0-2), Ignored in case of bidding tier. * * @returns - true upon successful addition of the tier to the group list. */ setMediationGroupTier(groupTier: MediationGroupTier, position: number): boolean; /** * Removes tier from the group * @param {number} position - position of the tier to be removed (0-2) */ removeTier(position: number): void; /** * Removes bidders from the group */ removeBidders(): void; /** * Returns groups bidders list * @returns {MediationGroupTier} or undefined. */ getBidders(): MediationGroupTier | undefined; /** * Returns groups tiers list * @returns {MediationGroupTier} or undefined. */ getTiers(): Array; /** * @hidden * @ignore * Validates that the instances in the given tier do not exist already on another tier in the group * @param groupTier - The tier to be check against * @param position - The new position of the tier - We ignore comparison in that position/ * * @returns {Object} - In case of duplicates instances returns an object with list of duplicates and tier position, * otherwise returns object with position of -1 and empty list. */ private _validateTier; /** * @hidden * @ignore * Creates and returns an object to send to the API call. * */ toString(): any; }