UNPKG

@shopgate/engage

Version:
11 lines 1.07 kB
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import{AppCommandRequest}from'@shopgate/engage/core/classes';/** * @typedef {Object} AnalyticsSetConsentResponse * @property {string} status Update status * @property {string} error Update error message */ /** * Sends cookie consent settings to the app * @param {Object} params Command params * @param {boolean} [params.statistics=false] Setting for statistics consent * @param {boolean} [params.comfort=false] Setting for comfort consent * @returns {Promise<AnalyticsSetConsentResponse>} */var analyticsSetConsent=function analyticsSetConsent(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return new AppCommandRequest('analyticsSetConsent').setCommandParams(_extends({statistics:false,comfort:false},params)).dispatch();};export default analyticsSetConsent;