@vtex/vtexis-compatibility-layer
Version:
Compatibility layer between intelligent search and VTEX
816 lines (815 loc) • 35.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.biggyProductMock = void 0;
exports.biggyProductMock = {
unitMultiplier: 1,
year: 0,
extraData: [
{
value: '1',
key: 'sellerId',
},
],
release: 772761600000,
discount: 37,
reference: 'xpto123',
collections: [
{
id: '1182',
position: 4,
},
{
id: '1970',
position: 4,
},
{
id: '1967',
position: 2,
},
{
id: '1969',
position: 2,
},
],
price: 375.77,
customSort: 0,
stickers: [
{
image: '',
name: '8% Boleto',
location: 'teaser',
target: '',
},
{
image: 'top-seller',
name: 'Top Seller',
location: 'cluster',
target: '',
},
{
image: 'summer',
name: 'Summer',
location: 'cluster',
target: '',
},
],
id: '3',
stock: 1,
brand: 'New Offers!!',
availableTradePolicies: ['1'],
categoryTrees: [
{
categoryNames: ['Apparel & Accessories', 'Clothing', 'Tops'],
categoryIds: ['25', '47', '48'],
},
{
categoryNames: ['Apparel & Accessories', 'Clothing'],
categoryIds: ['25', '47'],
},
{
categoryNames: ['Apparel & Accessories'],
categoryIds: ['25'],
},
],
images: [
{
value: 'http://storecomponents.vteximg.com.br/arquivos/ids/155642/Frame-1.jpg?v=637411554902130000',
},
],
locationAttributes: [],
tax: 0,
productScore: 2,
storeSplitAttribute: '__PLACEHOLDER__',
brandId: '2000045',
installment: {
interest: false,
count: 6,
paymentGroupName: 'creditCardPaymentGroup',
value: 62.62,
paymentName: 'Visa',
valueText: '$62.62',
},
name: 'Tank',
boost: {
newness: 0,
image: 1,
revenue: 0.03856572706590059,
discount: 0.6800539124377206,
productScore: 0.00020002000200020003,
click: 0.25,
availableSpecsCount: 0.16666666666666666,
promotion: 1,
order: 0.6538461538461539,
},
spotPrice: 375.77,
skus: [
{
images: [
{
value: 'http://storecomponents.vteximg.com.br/arquivos/ids/155642/Frame-1.jpg?v=637411554902130000',
},
],
nameComplete: 'Tank White',
policies: [
{
id: '1',
sellers: [
{
default: true,
name: 'VTEX',
tax: 0,
teasers: [
{
featured: true,
effects: {
parameters: [
{
name: 'PercentualDiscount',
value: '8.0',
},
],
},
teaserType: 'Profiler',
name: '8% Boleto',
id: '40275ef0-cd2a-4eb5-b1cd-1944ca14b5dd',
conditions: {
parameters: [
{
name: 'PaymentMethodId',
value: '6',
},
],
minimumQuantity: 0,
},
},
],
id: '1',
},
],
},
],
videos: ['http://vimeo.com/132789775', 'https://www.youtube.com/watch?v=nmZBaWUN3vc'],
reference: 'whitet',
idWithSplit: '3',
ean: '613468247360',
name: 'White',
attributes: [],
id: '3',
stock: 1,
sellers: [
{
default: true,
name: 'VTEX',
tax: 0,
teasers: [
{
featured: true,
effects: {
parameters: [
{
name: 'PercentualDiscount',
value: '8.0',
},
],
},
teaserType: 'Profiler',
name: '8% Boleto',
id: '40275ef0-cd2a-4eb5-b1cd-1944ca14b5dd',
conditions: {
parameters: [
{
name: 'PaymentMethodId',
value: '6',
},
],
minimumQuantity: 0,
},
},
],
id: '1',
},
],
catalogAttributes: [],
},
{
image: 'http://storecomponents.vteximg.com.br/arquivos/ids/155643-55-55/Frame-2.jpg?v=637411555784670000',
images: [
{
value: 'http://storecomponents.vteximg.com.br/arquivos/ids/155643/Frame-2.jpg?v=637411555784670000',
},
],
spotPrice: 600.3,
nameComplete: 'Tank Black',
oldPrice: 1000.5,
policies: [
{
id: '1',
sellers: [
{
default: true,
installment: {
interest: false,
count: 6,
paymentGroupName: 'creditCardPaymentGroup',
value: 100.05,
paymentName: 'Visa',
},
name: 'VTEX',
tax: 0,
teasers: [
{
featured: true,
effects: {
parameters: [
{
name: 'PercentualDiscount',
value: '8.0',
},
],
},
teaserType: 'Profiler',
name: '8% Boleto',
id: '40275ef0-cd2a-4eb5-b1cd-1944ca14b5dd',
conditions: {
parameters: [
{
name: 'PaymentMethodId',
value: '6',
},
],
minimumQuantity: 0,
},
},
],
id: '1',
},
],
},
],
icon: 'http://storecomponents.vteximg.com.br/arquivos/ids/155643-55-55/Frame-2.jpg?v=637411555784670000',
videos: ['https://vimeo.com/132789775'],
reference: 'code1234',
idWithSplit: '4',
ean: 'code123',
price: 600.3,
name: 'Black',
attributes: [
{
value: 'Black',
key: 'Color',
},
],
id: '4',
stock: 1,
sellers: [
{
default: true,
installment: {
interest: false,
count: 6,
paymentGroupName: 'creditCardPaymentGroup',
value: 100.05,
paymentName: 'Visa',
},
name: 'VTEX',
tax: 0,
teasers: [
{
featured: true,
effects: {
parameters: [
{
name: 'PercentualDiscount',
value: '8.0',
},
],
},
teaserType: 'Profiler',
name: '8% Boleto',
id: '40275ef0-cd2a-4eb5-b1cd-1944ca14b5dd',
conditions: {
parameters: [
{
name: 'PaymentMethodId',
value: '6',
},
],
minimumQuantity: 0,
},
},
],
id: '1',
},
],
oldPriceText: '$1,000.50',
priceText: '$600.30',
spotPriceText: '$600.30',
catalogAttributes: [],
},
],
link: 'tank-top',
wear: 0,
description: 'Show your arms!',
showIfNotAvailable: true,
clusterHighlights: {
'1182': 'Top Seller',
'1970': 'Summer',
},
categories: ['Apparel & Accessories', 'Clothing', 'Tops'],
timestamp: 1641498224995,
product: '3',
oldPrice: 600.3,
productSpecifications: ['On Sale', 'Sleeve type'],
url: '/tank-top/p',
measurementUnit: 'un',
categoryIds: ['25', '47', '48'],
textAttributes: [
{
joinedValue: 'new-offers--@@ Offers!!@@@@@-offers--@@ Offers!!',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: true,
labelValue: 'New Offers!!',
id: ['2000045'],
labelKey: 'Brand',
value: 'new-offers--',
key: 'brand',
joinedValueTranslations: {
spanish: 'new-offers--@@ Offers!!@@@@@-offers--@@ Offers!!',
japanese: 'new-offers--@@ Offers!!@@@@@-offers--@@ Offers!!',
brazilian: 'new-offers--@@ Offers!!@@@@@-offers--@@ Offers!!',
urdu: 'new-offers--@@ Offers!!@@@@@-offers--@@ Offers!!',
},
},
{
valueId: '25',
joinedValue: 'apparel---accessories@@ & Accessories@@@25@@---accessories@@ & Accessories',
isSku: false,
joinedKey: 'text@@-1@@ 1@@-1@@ 1',
joinedKeyTranslations: {
spanish: 'text@@-1@@ 1@@-1@@ 1',
japanese: 'text@@-1@@ 1@@-1@@ 1',
brazilian: 'text@@-1@@ 1@@-1@@ 1',
urdu: 'text@@-1@@ 1@@-1@@ 1',
},
isFilter: true,
labelValue: 'Apparel & Accessories',
id: [],
labelKey: 'Category 1',
value: 'apparel---accessories',
key: 'category-1',
joinedValueTranslations: {
spanish: 'apparel---accessories@@ & Accessories@@@25@@---accessories@@ & Accessories',
japanese: 'apparel---accessories@@ & Accessories@@@25@@---accessories@@ & Accessories',
brazilian: 'apparel---accessories@@ & Accessories@@@25@@---accessories@@ & Accessories',
urdu: 'apparel---accessories@@ & Accessories@@@25@@---accessories@@ & Accessories',
},
},
{
valueId: '47',
joinedValue: 'clothing@@@@@47@@@@',
isSku: false,
joinedKey: 'text@@-2@@ 2@@-2@@ 2',
joinedKeyTranslations: {
spanish: 'text@@-2@@ 2@@-2@@ 2',
japanese: 'text@@-2@@ 2@@-2@@ 2',
brazilian: 'text@@-2@@ 2@@-2@@ 2',
urdu: 'text@@-2@@ 2@@-2@@ 2',
},
isFilter: true,
labelValue: 'Clothing',
id: [],
labelKey: 'Category 2',
value: 'clothing',
key: 'category-2',
joinedValueTranslations: {
spanish: 'clothing@@@@@47@@@@',
japanese: 'clothing@@@@@47@@@@',
brazilian: 'clothing@@@@@47@@@@',
urdu: 'clothing@@@@@47@@@@',
},
},
{
valueId: '48',
joinedValue: 'tops@@@@@48@@@@',
isSku: false,
joinedKey: 'text@@-3@@ 3@@-3@@ 3',
joinedKeyTranslations: {
spanish: 'text@@-3@@ 3@@-3@@ 3',
japanese: 'text@@-3@@ 3@@-3@@ 3',
brazilian: 'text@@-3@@ 3@@-3@@ 3',
urdu: 'text@@-3@@ 3@@-3@@ 3',
},
isFilter: true,
labelValue: 'Tops',
id: [],
labelKey: 'Category 3',
value: 'tops',
key: 'category-3',
joinedValueTranslations: {
spanish: 'tops@@@@@48@@@@',
japanese: 'tops@@@@@48@@@@',
brazilian: 'tops@@@@@48@@@@',
urdu: 'tops@@@@@48@@@@',
},
},
{
joinedValue: '1182@@@1182@@@@@@1182@@@1182',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: false,
labelValue: '1182',
id: [],
labelKey: 'productClusterIds',
value: '1182',
key: 'productclusterids',
joinedValueTranslations: {
spanish: '1182@@@1182@@@@@@1182@@@1182',
japanese: '1182@@@1182@@@@@@1182@@@1182',
brazilian: '1182@@@1182@@@@@@1182@@@1182',
urdu: '1182@@@1182@@@@@@1182@@@1182',
},
},
{
joinedValue: '1967@@@1967@@@@@@1967@@@1967',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: false,
labelValue: '1967',
id: [],
labelKey: 'productClusterIds',
value: '1967',
key: 'productclusterids',
joinedValueTranslations: {
spanish: '1967@@@1967@@@@@@1967@@@1967',
japanese: '1967@@@1967@@@@@@1967@@@1967',
brazilian: '1967@@@1967@@@@@@1967@@@1967',
urdu: '1967@@@1967@@@@@@1967@@@1967',
},
},
{
joinedValue: '1969@@@1969@@@@@@1969@@@1969',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: false,
labelValue: '1969',
id: [],
labelKey: 'productClusterIds',
value: '1969',
key: 'productclusterids',
joinedValueTranslations: {
spanish: '1969@@@1969@@@@@@1969@@@1969',
japanese: '1969@@@1969@@@@@@1969@@@1969',
brazilian: '1969@@@1969@@@@@@1969@@@1969',
urdu: '1969@@@1969@@@@@@1969@@@1969',
},
},
{
joinedValue: '1970@@@1970@@@@@@1970@@@1970',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: false,
labelValue: '1970',
id: [],
labelKey: 'productClusterIds',
value: '1970',
key: 'productclusterids',
joinedValueTranslations: {
spanish: '1970@@@1970@@@@@@1970@@@1970',
japanese: '1970@@@1970@@@@@@1970@@@1970',
brazilian: '1970@@@1970@@@@@@1970@@@1970',
urdu: '1970@@@1970@@@@@@1970@@@1970',
},
},
{
valueId: '1182',
joinedValue: 'top-seller@@ Seller@@@1182@@-seller@@ Seller',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: true,
labelValue: 'Top Seller',
id: [],
labelKey: 'productClusterNames',
value: 'top-seller',
key: 'productclusternames',
joinedValueTranslations: {
spanish: 'top-seller@@ Seller@@@1182@@-seller@@ Seller',
japanese: 'top-seller@@ Seller@@@1182@@-seller@@ Seller',
brazilian: 'top-seller@@ Seller@@@1182@@-seller@@ Seller',
urdu: 'top-seller@@ Seller@@@1182@@-seller@@ Seller',
},
},
{
valueId: '1967',
joinedValue: 'collection-without-highlight@@ without highlight@@@1967@@-without-highlight@@ without highlight',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: true,
labelValue: 'Collection without highlight',
id: [],
labelKey: 'productClusterNames',
value: 'collection-without-highlight',
key: 'productclusternames',
joinedValueTranslations: {
spanish: 'collection-without-highlight@@ without highlight@@@1967@@-without-highlight@@ without highlight',
japanese: 'collection-without-highlight@@ without highlight@@@1967@@-without-highlight@@ without highlight',
brazilian: 'collection-without-highlight@@ without highlight@@@1967@@-without-highlight@@ without highlight',
urdu: 'collection-without-highlight@@ without highlight@@@1967@@-without-highlight@@ without highlight',
},
},
{
valueId: '1969',
joinedValue: 'teste-ultimo-sku@@ Ultimo SKU@@@1969@@-ultimo-sku@@ Ultimo SKU',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: true,
labelValue: 'teste Ultimo SKU',
id: [],
labelKey: 'productClusterNames',
value: 'teste-ultimo-sku',
key: 'productclusternames',
joinedValueTranslations: {
spanish: 'teste-ultimo-sku@@ Ultimo SKU@@@1969@@-ultimo-sku@@ Ultimo SKU',
japanese: 'teste-ultimo-sku@@ Ultimo SKU@@@1969@@-ultimo-sku@@ Ultimo SKU',
brazilian: 'teste-ultimo-sku@@ Ultimo SKU@@@1969@@-ultimo-sku@@ Ultimo SKU',
urdu: 'teste-ultimo-sku@@ Ultimo SKU@@@1969@@-ultimo-sku@@ Ultimo SKU',
},
},
{
valueId: '1970',
joinedValue: 'summer@@@@@1970@@@@',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: true,
labelValue: 'Summer',
id: [],
labelKey: 'productClusterNames',
value: 'summer',
key: 'productclusternames',
joinedValueTranslations: {
spanish: 'summer@@@@@1970@@@@',
japanese: 'summer@@@@@1970@@@@',
brazilian: 'summer@@@@@1970@@@@',
urdu: 'summer@@@@@1970@@@@',
},
},
{
joinedValue: 'false@@@@@@@@@',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: false,
labelValue: 'false',
id: [],
labelKey: 'subscription',
value: 'false',
key: 'subscription',
joinedValueTranslations: {
spanish: 'false@@@@@@@@@',
japanese: 'false@@@@@@@@@',
brazilian: 'false@@@@@@@@@',
urdu: 'false@@@@@@@@@',
},
},
{
joinedValue: '1@@@1@@@@@@1@@@1',
isSku: false,
joinedKey: 'text@@-policy@@ Policy@@-policy@@ Policy',
joinedKeyTranslations: {
spanish: 'text@@-policy@@ Policy@@-policy@@ Policy',
japanese: 'text@@-policy@@ Policy@@-policy@@ Policy',
brazilian: 'text@@-policy@@ Policy@@-policy@@ Policy',
urdu: 'text@@-policy@@ Policy@@-policy@@ Policy',
},
isFilter: false,
labelValue: '1',
id: [],
labelKey: 'Trade Policy',
value: '1',
key: 'trade-policy',
joinedValueTranslations: {
spanish: '1@@@1@@@@@@1@@@1',
japanese: '1@@@1@@@@@@1@@@1',
brazilian: '1@@@1@@@@@@1@@@1',
urdu: '1@@@1@@@@@@1@@@1',
},
},
{
joinedValue: '1@@@1@@@@@@1@@@1',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: false,
labelValue: '1',
id: [],
labelKey: 'Seller',
value: '1',
key: 'seller',
joinedValueTranslations: {
spanish: '1@@@1@@@@@@1@@@1',
japanese: '1@@@1@@@@@@1@@@1',
brazilian: '1@@@1@@@@@@1@@@1',
urdu: '1@@@1@@@@@@1@@@1',
},
},
{
valueId: '1',
joinedValue: 'vtex@@@@@1@@@@',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: true,
labelValue: 'VTEX',
id: [],
labelKey: 'sellerName',
value: 'vtex',
key: 'sellername',
joinedValueTranslations: {
spanish: 'vtex@@@@@1@@@@',
japanese: 'vtex@@@@@1@@@@',
brazilian: 'vtex@@@@@1@@@@',
urdu: 'vtex@@@@@1@@@@',
},
},
{
valueId: '159',
joinedValue: 'true@@@@@159@@@@',
isSku: false,
joinedKey: 'text@@-sale@@ Sale@@-sale@@ Sale',
joinedKeyTranslations: {
spanish: 'text@@-sale@@ Sale@@-sale@@ Sale',
japanese: 'text@@-sale@@ Sale@@-sale@@ Sale',
brazilian: 'text@@-sale@@ Sale@@-sale@@ Sale',
urdu: 'text@@-sale@@ Sale@@-sale@@ Sale',
},
isFilter: false,
labelValue: 'True',
id: ['83'],
labelKey: 'On Sale',
value: 'true',
key: 'on-sale',
joinedValueTranslations: {
spanish: 'true@@@@@159@@@@',
japanese: 'true@@@@@159@@@@',
brazilian: 'true@@@@@159@@@@',
urdu: 'true@@@@@159@@@@',
},
},
{
valueId: '96',
joinedValue: 'sleeveless@@@@@96@@@@',
isSku: false,
joinedKey: 'text@@-type@@ type@@-type@@ type',
joinedKeyTranslations: {
spanish: 'text@@-type@@ type@@-type@@ type',
japanese: 'text@@-type@@ type@@-type@@ type',
brazilian: 'text@@-type@@ type@@-type@@ type',
urdu: 'text@@-type@@ type@@-type@@ type',
},
isFilter: true,
labelValue: 'Sleeveless',
id: ['51'],
labelKey: 'Sleeve type',
value: 'sleeveless',
key: 'sleeve-type',
joinedValueTranslations: {
spanish: 'sleeveless@@@@@96@@@@',
japanese: 'sleeveless@@@@@96@@@@',
brazilian: 'sleeveless@@@@@96@@@@',
urdu: 'sleeveless@@@@@96@@@@',
},
},
{
valueId: '219',
joinedValue: 'black@@@@@219@@@@',
isSku: true,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: true,
labelValue: 'Black',
id: ['52'],
labelKey: 'Color',
value: 'black',
key: 'color',
joinedValueTranslations: {
spanish: 'black@@@@@219@@@@',
japanese: 'black@@@@@219@@@@',
brazilian: 'black@@@@@219@@@@',
urdu: 'black@@@@@219@@@@',
},
},
{
joinedValue: 'yes@@@@@@@@@',
isSku: false,
joinedKey: 'text@@@@@@@@',
joinedKeyTranslations: {
spanish: 'text@@@@@@@@',
japanese: 'text@@@@@@@@',
brazilian: 'text@@@@@@@@',
urdu: 'text@@@@@@@@',
},
isFilter: true,
labelValue: 'Yes',
id: [],
labelKey: 'Promotion',
value: 'yes',
key: 'promotion',
joinedValueTranslations: {
spanish: 'yes@@@@@@@@@',
japanese: 'yes@@@@@@@@@',
brazilian: 'yes@@@@@@@@@',
urdu: 'yes@@@@@@@@@',
},
},
],
numberAttributes: [
{
labelKey: 'Price',
value: 375.77,
key: 'price',
},
],
headSku: '3',
specificationGroups: '{"Specifications":["Sleeve type"],"Group":["On Sale"]}',
extraInfo: {
sellerId: '1',
},
metaTagDescription: 'This is a meta tag description',
oldPriceText: '$600.30',
priceText: '$375.77',
spotPriceText: '$375.77',
};