@bolttech/server-side-next
Version:
This library was generated with [Nx](https://nx.dev).
3 lines (2 loc) • 3.4 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./voucher.service-18daae54.js"),r=require("./logger.service-16a2faf9.js"),t=require("./_rollupPluginBabelHelpers-41c00fec.js"),n=require("./_tslib-0e64cda4.js"),a=require("axios"),o=require("@bolttech/essentials"),s=require("./index-775f264f.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("url"),require("querystring"),require("lodash/fp");var c=i(a),u=new(function(){return t._createClass((function e(){t._classCallCheck(this,e)}),[{key:"getPlans",value:function(e){return n.__awaiter(this,void 0,void 0,t._regeneratorRuntime().mark((function r(){var n,a,o,s;return t._regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n="/getsessioncomparedata/".concat(e),r.prev=1,r.next=4,c.default.get(n);case 4:return a=r.sent,o=a.data,r.abrupt("return",o);case 9:throw r.prev=9,r.t0=r.catch(1),s="[SessionCompareService.getPlans] Unable to fetch session compare data",console.error(s,r.t0),new Error("".concat(s,"\n ").concat(r.t0));case 14:case"end":return r.stop()}}),r,null,[[1,9]])})))}},{key:"addPlans",value:function(e,r){return n.__awaiter(this,void 0,void 0,t._regeneratorRuntime().mark((function n(){return t._regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateSession({operation:"add",plans:e,vertical:r},"Unable to add plans to session compare data");case 2:case"end":return t.stop()}}),n,this)})))}},{key:"removePlans",value:function(e,r){return n.__awaiter(this,void 0,void 0,t._regeneratorRuntime().mark((function n(){return t._regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateSession({operation:"remove",plans:e,vertical:r},"Unable to remove plans from session compare data");case 2:case"end":return t.stop()}}),n,this)})))}},{key:"updatePlans",value:function(e,r){return n.__awaiter(this,void 0,void 0,t._regeneratorRuntime().mark((function n(){return t._regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateSession({operation:"update",plans:e,vertical:r},"Unable to update plans in session compare data");case 2:case"end":return t.stop()}}),n,this)})))}},{key:"updateSession",value:function(e,r){return n.__awaiter(this,void 0,void 0,t._regeneratorRuntime().mark((function n(){return t._regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/updatesessioncomparedata",t.prev=1,t.next=4,c.default.put("/updatesessioncomparedata",e);case 4:t.next=10;break;case 6:throw t.prev=6,t.t0=t.catch(1),console.error(r,t.t0),new Error("".concat(r,"\n ").concat(t.t0));case 10:case"end":return t.stop()}}),n,null,[[1,6]])})))}}])}());exports.VoucherService=e.VoucherService,exports.checkoutService=e.checkoutService,exports.voucherService=e.voucherService,exports.ConfigService=r.ConfigService,exports.configService=r.configService,exports.loggerService=r.loggerService,Object.defineProperty(exports,"VerticalComponentMapper",{enumerable:!0,get:function(){return o.VerticalComponentMapper}}),exports.getFlowAndPartnerByPath=s.getFlowAndPartnerByPath,exports.getPage=s.getPage,exports.getPageNameAndVerticalByPath=s.getPageNameAndVerticalByPath,exports.getUrl=s.getUrl,exports.parseUtms=s.parseUtms,exports.sessionCompareService=u;
//# sourceMappingURL=sharedServices.js.map