@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
36 lines (35 loc) • 1.14 kB
TypeScript
import { UserPointIdentifierInfo, UserEmailIdentifierInfo, UserAccountIdentifierInfo, UserAgentIdentifierInfo } from "../../../../index";
export interface RecommenderRequest {
recommender_id: string;
datamart_id: string;
user_identifiers: (UserPointIdentifierInfo | UserEmailIdentifierInfo | UserAccountIdentifierInfo | UserAgentIdentifierInfo)[];
[propsName: string]: any;
}
export interface RecommenderResponse {
status: string;
data: RecommandationsWrapper;
}
export interface RecommandationsWrapper {
ts: number;
proposals: ItemProposal[];
}
export declare type ProposalType = "ITEM_PROPOSAL" | "PRODUCT_PROPOSAL" | "CATEGORY_PROPOSAL" | "CONTENT_PROPOSAL";
export interface Proposal {
$type: ProposalType;
$id?: string;
$gid?: string;
[propsName: string]: any;
}
export interface ProductProposal extends Proposal {
$price?: number;
$salePrice?: number;
$discountPercentage?: number;
$currency?: string;
}
export interface ItemProposal extends ProductProposal {
$name?: string;
$brand?: string;
$url?: string;
$description?: string;
$imageUrl?: string;
}