Repository URL to install this package:
|
Version:
1.1.13 ▾
|
import querystring from 'query-string'
// import { campaignId, appid, storeId } from '../../bootstrapper/api/config'
const HARDCODED_HORRIBLE_API_FIXTURE_FOR_FAVORITES = {
skuid: 'device02',
name: 'wind%207i',
properties: {
identifier: 'device02',
img: '//d16rliti0tklvn.cloudfront.net/2495/1501070019064.1856079641.png',
link:
'http://demo.skavaone.com/skavastream/studio/reader/skava_store/ska_product?navParam=device02',
regPrice: '',
salePrice: '$85.40',
price: '$85.40',
quantity: '',
giftitem: '',
shippingAddress: '',
additionalInfo: {
image: 'http://d16rliti0tklvn.cloudfront.net/2495/1501070019064.1856079641.png',
identifier: 'device02',
navtype: 'identifier',
children: {
skus: [
{
image: 'http://d16rliti0tklvn.cloudfront.net/2495/1501070953835.79440945.png',
identifier: 'sdevice02',
navtype: 'identifier',
name: 'Wind 7i Black',
type: 'product',
properties: {
buyinfo: {
inventorystatus: 'IN STOCK',
pricing: {
currencycode: '$',
prices: [
{
label: 'sale',
type: 'Sale',
value: '85.40',
},
{
label: 'reg',
type: 'Reg',
value: '85.40',
},
],
},
},
iteminfo: {
flags: [
{
label: 'ghost',
value: 'true',
},
],
description: [
{
label: 'Description',
value:
'• 12.7 cm (5) HD IPS display • Multiple gesture controls for easy operations • 8MP 5MP',
},
],
additionalinfo: [
{
label: 'assets',
value:
'{\\"details\\":{\\"Black\\":\\"http://d16rliti0tklvn.cloudfront.net/2495/1501223683157.1073129348.png\\"},\\"primary\\":\\"http://d16rliti0tklvn.cloudfront.net/2495/1501223558391.1166978707.png\\"}',
},
],
},
state: {
starttime: '1483228800000',
},
skuinfo: {
color: {
name: 'Black',
},
},
},
},
],
},
name: 'Wind 7i',
type: 'product',
properties: {
buyinfo: {
pricing: {
currencycode: '$',
prices: [
{
label: 'sale',
type: 'Sale',
value: '85.40',
},
{
label: 'reg',
type: 'Reg',
value: '85.40',
},
],
},
},
iteminfo: {
categoryids: [
{
label: 'devices',
value: 'Devices',
},
{
label: 'parent category',
value: 'devices',
},
],
flags: [
{
label: 'ghost',
value: 'false',
},
],
description: [
{
label: 'Description',
value:
'• 12.7 cm (5) HD IPS display • Multiple gesture control for easy operations • 8MP Rear 5MP Front',
},
],
additionalinfo: [
{
label: 'assets',
value:
'{\\"details\\":{\\"Black\\":\\"http://d16rliti0tklvn.cloudfront.net/2495/1501222341299.1261048600.png\\"},\\"primary\\":\\"http://d16rliti0tklvn.cloudfront.net/2495/1501222326308.44141284.png\\"}',
},
],
},
state: {
starttime: '1506582797730',
},
},
},
isFromFavorites: true,
reviewCount: '',
rating: '',
},
}
const addItemParams = {
// campaignId,
// added
// storeId,
// appid: 'skavareact',
// appid: 'toms',
// appid: 'skreact',
// item: HARDCODED_HORRIBLE_API_FIXTURE_FOR_FAVORITES,
// item: {
// skuid: 'FOOM1',
// name: 'Cole%20Haan%20Men',
// properties: {
// identifier: 'mencp3',
// img:
// 'https://images-na.ssl-images-amazon.com/images/I/81Cdh8g4xAL._UX500_.jpg',
// link:
// 'https://demo.skavaone.com/skavastream/studio/reader/prod/skava_store/ska_product?navParam=mencp3',
// regPrice: '$53.58',
// salePrice: '$38.58',
// price: '$53.58',
// quantity: '',
// giftitem: '',
// shippingAddress: '',
// additionalInfo: '',
// isFromFavorites: true,
// reviewCount: '',
// rating: '',
// },
// },
// item: querystring.stringify({
// skuid: 'FOOM1',
// name: 'Cole%20Haan%20Men',
// properties: {
// identifier: 'mencp3',
// img:
// 'https://images-na.ssl-images-amazon.com/images/I/81Cdh8g4xAL._UX500_.jpg',
// link:
// 'https://demo.skavaone.com/skavastream/studio/reader/prod/skava_store/ska_product?navParam=mencp3',
// regPrice: '$53.58',
// salePrice: '$38.58',
// price: '$53.58',
// quantity: '',
// giftitem: '',
// shippingAddress: '',
// additionalInfo: '',
// isFromFavorites: true,
// reviewCount: '',
// rating: '',
// },
// }),
}
const createListParams = {
// campaignId,
// storeId,
}
const createListPostParams = {
properties: JSON.stringify({ listname: 'WishList' }),
ispublic: true,
// appid,
}
const deleteItemParams = {
// campaignId,
// storeId,
}
const deleteItemPOSTParams = {
skuid: 'FOOM1',
name: '_wishlist_template_',
// appid,
}
const getItemsParams = {
// campaignId,
// storeId,
}
const getItemsPOSTParams = {
offset: 0,
limit: 50,
// appid,
}
const getListParams = {
// campaignId,
// storeId,
}
const getListPOSTParams = {
offset: 0,
limit: 10,
// appid,
}
const registerParams = {
username: 'createorgetuser',
customparams: querystring.stringify({ locale: 'en_US' }),
// appid,
// storeId,
// campaignId,
userinfo: querystring.stringify({
customParams: { createIfNecessary: ['true'], useFP: ['false'] },
}),
}
const saveForLaterCreateListParams = {
// campaignId,
properties: querystring.stringify({ listname: 'SaveForLater' }),
ispublic: true,
// appid,
}
export {
addItemParams,
createListParams,
deleteItemParams,
getItemsParams,
getListParams,
registerParams,
saveForLaterCreateListParams,
getItemsPOSTParams,
createListPostParams,
getListPOSTParams,
}
export default {
addItemParams,
createListParams,
deleteItemParams,
getItemsParams,
getListParams,
registerParams,
saveForLaterCreateListParams,
getItemsPOSTParams,
createListPostParams,
getListPOSTParams,
}