@mediarithmics/plugins-nodejs-sdk
Version:
This is the mediarithmics nodejs to help plugin developers bootstrapping their plugin without having to deal with most of the plugin boilerplate
20 lines (19 loc) • 1.2 kB
TypeScript
import { ItemProposal, UserCampaignResource, AdRendererRecoTemplateInstanceContext, AdRendererTemplatePlugin } from "../../../index";
export declare abstract class AdRendererRecoTemplatePlugin extends AdRendererTemplatePlugin {
/**
* Helper to fetch the User Campaign
* @param campaignId The campaignId -> should come from the AdRendererRequest
* @param userCampaignId The userCampaignId -> should come from the AdRendererRequest
* @returns A Promise of the User Campaign
*/
fetchUserCampaign(campaignId: string, userCampaignId: string): Promise<UserCampaignResource>;
/**
* Helper to fetch the User recommendations
* @param instanceContext The instanceContext -> contains the recommender_id of the creative
* @param userAgentId The userAgentId as a string -> should come from the AdRendererRequest (recommended) or from the UserCampaign
* @returns A Promise of the Recommendations
*/
fetchRecommendations(instanceContext: AdRendererRecoTemplateInstanceContext, userAgentId: string): Promise<Array<ItemProposal>>;
protected instanceContextBuilder(creativeId: string): Promise<AdRendererRecoTemplateInstanceContext>;
constructor();
}