import * as wrapper from './proto/proto-generated';
var DealerOffersDebug = wrapper.wix.dealerOffersServing.api.v1.DealerOffersDebug;
var DealerOffersServing = wrapper.wix.dealerOffersServing.api.v1.DealerOffersServing;
/**
 * Debug offer in a given context.
 * Will return the offer and its audience result.
 * Only for permitted users.
 * Context is always explicit and can contains information such as userId, siteId, loggedInAccounnt etc.
 */
export function debugOffer(payload) {
    var serviceArtifactId = 'com.wixpress.dealer-offers-serving-service';
    var serviceProtoClass = DealerOffersDebug;
    var methodName = 'debugOffer';
    var requestData = payload;
    return {
        serviceProtoClass: serviceProtoClass,
        serviceArtifactId: serviceArtifactId,
        methodName: methodName,
        requestData: requestData,
    };
}
/** Get a single offer with creative. */
export function getOffer(payload) {
    var serviceArtifactId = 'com.wixpress.dealer-offers-serving-service';
    var serviceProtoClass = DealerOffersDebug;
    var methodName = 'getOffer';
    var requestData = payload;
    return {
        serviceProtoClass: serviceProtoClass,
        serviceArtifactId: serviceArtifactId,
        methodName: methodName,
        requestData: requestData,
    };
}
/**
 * Get all offers the user or site are eligible for.
 * A realEstateId (placementId) defines the product location of the offers and is always required,
 * Context is taken implicitly from request with authorization header and wix session.
 */
export function listOffers(payload) {
    var serviceArtifactId = 'com.wixpress.dealer-offers-serving-service';
    var serviceProtoClass = DealerOffersServing;
    var methodName = 'listOffers';
    var requestData = payload;
    return {
        serviceProtoClass: serviceProtoClass,
        serviceArtifactId: serviceArtifactId,
        methodName: methodName,
        requestData: requestData,
    };
}
/**
 * Get a single offer if the user or site are eligible for.
 * Context is taken implicitly from request with authorization header and wix session.
 */
export function resolveOffer(payload) {
    var serviceArtifactId = 'com.wixpress.dealer-offers-serving-service';
    var serviceProtoClass = DealerOffersServing;
    var methodName = 'resolveOffer';
    var requestData = payload;
    return {
        serviceProtoClass: serviceProtoClass,
        serviceArtifactId: serviceArtifactId,
        methodName: methodName,
        requestData: requestData,
    };
}
/**
 * Get all offers the user or site are eligible for.
 * This is a bulk request for more then one realEstate (placement),
 * max limit of 30 offers is applied for each placement.
 * Context is taken implicitly from request with authorization header and wix session.
 */
export function listOffersBulk(payload) {
    var serviceArtifactId = 'com.wixpress.dealer-offers-serving-service';
    var serviceProtoClass = DealerOffersServing;
    var methodName = 'listOffersBulk';
    var requestData = payload;
    return {
        serviceProtoClass: serviceProtoClass,
        serviceArtifactId: serviceArtifactId,
        methodName: methodName,
        requestData: requestData,
    };
}
//# sourceMappingURL=rpc.impl.js.map