Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/graphql / src / bootstrapper / api / STREAMDAO.ts
Size: Mime:
const { clientNamespace, cartNamespace } = require('./config')

const absoluteUrlConfig = {
  getKeyTokenUrl: `https://encrypt-stg.skavaone.com/apiadmin/remote/skavakeystore/getKeyForToken`,
  getServiceToken: `https://encrypt-stg.skavaone.com/apiadmin/v1/token/create`,
}

const configJSON = {
  viewbag: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  createbag: 'xact',
  addtobag: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  deletefrombag: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  deleteallfrombag: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  updatebag: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  topcategory: {
    type: 'core',
    partner: clientNamespace + 'skavastore',
  },
  category: {
    type: 'core',
    partner: clientNamespace + 'skavastore',
  },
  search: {
    type: 'core',
    partner: clientNamespace + 'skavastore',
  },
  searchsuggestion: {
    type: 'core',
    partner: clientNamespace + 'skavastore',
  },
  productlist: {
    type: 'core',
    partner: clientNamespace + 'skavastore',
  },
  product: {
    type: 'core',
    partner: clientNamespace + 'skavastore',
  },
  recommendation: 'marketing',
  recentlyviewed: 'marketing',
  mostviewed: 'marketing',
  recordAction: 'marketing',
  validatecart: 'xact',
  postalLookup: 'xact',
  shippingmethods: 'xact',
  addressverification: 'xact',
  checkaddress: 'xact',
  getbillingaddress: 'xact',
  setbillingaddress: 'xact',
  getshippingaddress: 'xact',
  'setshippingaddress/update': {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  gettaxinfo: 'xact',
  getshippingcost: 'xact',
  getgift: 'xact',
  addgift: 'xact',
  deletegift: 'xact',
  getcoupons: 'xact',
  addcoupon: 'xact',
  deletecoupon: 'xact',
  cardencryption: 'xact',
  setshippingaddress: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  payment: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  submitorder: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  suspendcart: {
    type: 'custom',
    partner: clientNamespace + 'skavastore',
    clientVersion: 'v1',
  },
  removeshippingaddress: 'xact',
  removebillingaddress: 'xact',
  getinventory: 'xact',
  deletecard: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  addcard: 'xact',
  setshippingmethods: 'xact',
  setpaymentmethod: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  estimate: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  updateshippingmethods: {
    type: 'xact',
    partner: cartNamespace + 'cartandcheckout',
  },
  user: {
    type: 'loyalty',
    partner: clientNamespace + 'loyalty',
  },
  orderhistory: 'xact',
  orderdetails: {
    type: 'xact',
    partner: clientNamespace + 'skavaoms',
  },
  'submitorder/return': {
    type: 'xact',
    partner: clientNamespace + 'skavaoms',
  },
  'submitorder/cancel': {
    type: 'xact',
    partner: clientNamespace + 'skavaoms',
  },
  easyreorder: 'xact',
  orderstatus: 'xact',
  favoritelistview: 'xact',
  metadata: 'xact',
  productdetails: 'core',
  login: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  refreshtoken: 'xact',
  checkuserexists: 'xact',
  register: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  logout: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  getprofile: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  updateprofile: 'xact',
  getaddress: 'xact',
  addaddress: 'xact',
  updateaddress: 'xact',
  deleteaddress: 'xact',
  getcreditcard: 'xact',
  addcreditcard: 'xact',
  updatecreditcard: 'xact',
  deletecreditcard: 'xact',
  recoverpwdbyemail: 'xact',
  reminderquestion: 'xact',
  getpasswordauth: 'xact',
  resetpassword: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  getsecurityquestion: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  updatepassword: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  personalization: 'xact',
  profile: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  changerecipient: 'xact',
  loginverificationstatus: 'xact',
  createregister: 'xact',
  createuser: 'xact',
  messagecampaigns: '',
  update: 'xact',
  checkoutauth: {
    type: 'xact',
    partner: clientNamespace + 'skavauser',
  },
  rating: 'ratingreview',
  ratingcount: 'ratingreview',
  reviews: {
    type: 'ratingreview',
    partner: clientNamespace + 'skavastore',
  },
  submitreview: {
    type: 'ratingreview',
    partner: clientNamespace + 'skavastore',
  },
  reviewstats: 'ratingreview',
  reviewsummary: 'ratingreview',
  searchreview: 'ratingreview',
  getstores: {
    type: 'util',
    partner: clientNamespace + 'skavastore',
  },
  storeinfo: 'util',
  event: 'util',
  sendmail: 'util',
  validation: 'util',
  sendemail: 'util',
  createOrGetUser: clientNamespace + 'listv2',
  getlists: {
    type: 'wishlist',
    partner: clientNamespace + 'listv2',
  },
  createlist: {
    type: 'xact',
    partner: clientNamespace + 'listv2',
  },
  additem: {
    type: 'wishlist',
    partner: clientNamespace + 'listv2',
  },
  deleteitem: {
    type: 'wishlist',
    partner: clientNamespace + 'listv2',
  },
  getitems: {
    type: 'wishlist',
    partner: clientNamespace + 'listv2',
  },
  getKeyForToken: {
    isAbsoluteUrl: true,
    absoluteUrl: absoluteUrlConfig['getKeyTokenUrl'],
  },
  'token/create': {
    isAbsoluteUrl: true,
    absoluteUrl: absoluteUrlConfig['getServiceToken'],
  },
  loyalty: {
    type: 'loyalty',
    partner: 'loyalty',
  },
  addEvent: 'events',
  getbalanceforuser: clientNamespace + 'loyalty',
  createtransactionforuser: clientNamespace + 'loyalty',
  canceltransactionbyid: clientNamespace + 'loyalty',
  reconcile: clientNamespace + 'loyalty',
  getCatalog: {
    type: 'studio',
    partner: 'skava',
    clientVersion: 'v1',
  },
  getPages: {
    type: 'studio',
    partner: 'skava',
    clientVersion: 'v1',
  },
}

Object.freeze(configJSON)

function getStreamDataAccessObjType(daoType) {
  return configJSON[daoType] || { '@@empty': true }
}
const dataAccessObj = {
  getStreamDataAccessObjType,
  // @todo @deprecated
  getStreamDAOType: getStreamDataAccessObjType,
}

exports.getStreamDataAccessObjType = getStreamDataAccessObjType
exports.configJSON = configJSON
exports.dataAccessObj = dataAccessObj