// ----------------------------------------------------------------------------- // Enum Typedefs // ----------------------------------------------------------------------------- /** * Describes the client where the request for a clickout has originated. * @typedef {"shopr_website" | "shopr_mobile_web" | "shopr_iphone" | "shopr_ipad" | "shopr_android"} ClientOrigin */ // ----------------------------------------------------------------------------- // Model Typedefs // ----------------------------------------------------------------------------- /** * Represents an Offer click-out. It contains all the information needed to properly identify the offer, trace it ot the user navigating from search page, and relevant information about the offer at the click-out moment (e.g.: price, lowest price among other offers, etc.) * @typedef {Object} Clickout * @property {string} productId Product identifier * @property {string} seller Seller/Retailer unique identifier * @property {string} sellerProductId Product as identifier given by the seller/retailer * @property {number} price Offer price at the moment of the click-out * @property {string} deepUrl Full product URL at the retailer side * @property {number} lowestPrice Lowest price among all offers * @property {number} highestPrice Seller/Retailer unique identifier * @property {number} offerCount Number of offers * @property {number} offerPosition Offer position among other offers (e.g.: first, second, etc.) * @property {string} categoryId Category where the product was put into * @property {Tracking} tracking Tracking information * @property {string} creationTime When this click-out happened */ /** * @typedef {Object} ErrorCode * @property {string} code Machine readable code for this specific error message * @property {string} localized_string_code A localized description of the error code */ /** * @typedef {Object} ErrorResponse * @property {string} [message] User-friendly message. * @property {ErrorCode[]} error_codes List of errors that may happened all together. * @property {string} [fingerprint] The request fingerprint associated with this error. */ /** * Response for ping, health check and version * @typedef {Object} Status * @property {string} response */ /** * Series of attributes for tracking purposes * @typedef {Object} Tracking * @property {string} ipAddress * @property {ClientOrigin} origin Client originating the order request essentially any of the values of the client_origin enum. * @property {string} [userAgent] * @property {string} [referrer] Optional page referrer. */ // ----------------------------------------------------------------------------- // Union Typedefs // -----------------------------------------------------------------------------