@ikas/storefront-api 4.12.0-beta.53 → 4.12.0-beta.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api/cart/index.js +1 -1
- package/package.json +5 -5
package/build/api/cart/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n,__spreadArray as r,__assign as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as a}from"@ikas/fe-api-client";function
|
|
1
|
+
import{__awaiter as t,__generator as n,__spreadArray as r,__assign as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as a}from"@ikas/fe-api-client";import{initIkasCampaignOffer as i}from"@ikas/storefront-models";import{IkasStorefrontConfig as s}from"@ikas/storefront-config";function u(t){return e(e({},t),{cancelReason:null})}function o(r){var e;return t(this,void 0,void 0,(function(){var t,o,c,l,_;return n(this,(function(n){switch(n.label){case 0:return[4,import("../../__api/queries/getCartById.js")];case 1:return t=n.sent().default,c=t,l=[r],[4,d()];case 2:return[4,c.apply(void 0,l.concat([n.sent()]))];case 3:return o=n.sent(),_=o.data?u(o.data):null,null===(e=null==_?void 0:_.campaignOffers)||void 0===e||e.forEach((function(t){t.campaignOffer&&i(t.campaignOffer,s.getCurrentLocale())})),[2,new a(_||null,o.graphQLErrors)]}}))}))}function c(r){return t(this,void 0,void 0,(function(){var t,e,i,s,o;return n(this,(function(n){switch(n.label){case 0:return[4,import("../../__api/mutations/saveCart.js")];case 1:return t=n.sent().default,i=t,s=[r],[4,d()];case 2:return[4,i.apply(void 0,s.concat([n.sent()]))];case 3:return e=n.sent(),o=e.data?u(e.data):null,[2,new a(o||null,e.graphQLErrors)]}}))}))}function l(r){return t(this,void 0,void 0,(function(){var t,e,i,s,o;return n(this,(function(n){switch(n.label){case 0:return[4,import("../../__api/mutations/saveCartCouponCode.js")];case 1:return t=n.sent().default,i=t,s=[r],[4,d()];case 2:return[4,i.apply(void 0,s.concat([n.sent()]))];case 3:return e=n.sent(),o=e.data?u(e.data):null,[2,new a(o||null,e.graphQLErrors)]}}))}))}function _(r){return t(this,void 0,void 0,(function(){var t,e,i,s,o;return n(this,(function(n){switch(n.label){case 0:return[4,import("../../__api/mutations/addItemToCart.js")];case 1:return t=n.sent().default,i=t,s=[r],[4,d()];case 2:return[4,i.apply(void 0,s.concat([n.sent()]))];case 3:return e=n.sent(),o=e.data?u(e.data):null,[2,new a(o||null,e.graphQLErrors)]}}))}))}function f(r){return t(this,void 0,void 0,(function(){var t,e,i,s,o;return n(this,(function(n){switch(n.label){case 0:return[4,import("../../__api/mutations/updateCartCampaignOffer.js")];case 1:return t=n.sent().default,i=t,s=[r],[4,d()];case 2:return[4,i.apply(void 0,s.concat([n.sent()]))];case 3:return e=n.sent(),o=e.data?u(e.data):null,[2,new a(o||null,e.graphQLErrors)]}}))}))}function d(){return t(this,void 0,void 0,(function(){var t,e;return n(this,(function(n){switch(n.label){case 0:return[4,import("../../__api/queries/getCartById.js")];case 1:return t=n.sent().ResponseField,e=r(r(["MERCHANT_ID","ORDER_LINE_ITEMS__VARIANT__TAG_IDS","BILLING_ADDRESS__REGION__CREATED_AT","BILLING_ADDRESS__REGION__DELETED","BILLING_ADDRESS__REGION__UPDATED_AT","SHIPPING_ADDRESS__REGION__CREATED_AT","SHIPPING_ADDRESS__REGION__DELETED","SHIPPING_ADDRESS__REGION__UPDATED_AT"],Object.keys(t).filter((function(t){return t.startsWith("CURRENCY_RATES")})),!0),Object.keys(t).filter((function(t){return t.startsWith("ABANDONED_CART_FLOWS")})),!0),[2,Object.entries(t).filter((function(t){var n=t[0];return!e.includes(n)})).map((function(t){return t[1]}))]}}))}))}export{_ as addItemToCart,o as getCartById,c as saveCart,l as saveCartCouponCode,f as updateCartCampaignOffer};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-api",
|
|
3
|
-
"version": "4.12.0-beta.
|
|
3
|
+
"version": "4.12.0-beta.55",
|
|
4
4
|
"author": "ikas",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "API functions that returns models from the ikas-storefront-models package.",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
20
|
-
"@ikas/storefront-config": "^4.12.0-beta.
|
|
21
|
-
"@ikas/storefront-models": "^4.12.0-beta.
|
|
20
|
+
"@ikas/storefront-config": "^4.12.0-beta.55",
|
|
21
|
+
"@ikas/storefront-models": "^4.12.0-beta.55",
|
|
22
22
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
23
23
|
"rollup-plugin-rename-node-modules": "^1.2.0",
|
|
24
24
|
"prettier": "^2.2.1",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@ikas/fe-api-client": "^1.0.19"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@ikas/storefront-config": "^4.12.0-beta.
|
|
38
|
-
"@ikas/storefront-models": "^4.12.0-beta.
|
|
37
|
+
"@ikas/storefront-config": "^4.12.0-beta.55",
|
|
38
|
+
"@ikas/storefront-models": "^4.12.0-beta.55",
|
|
39
39
|
"@ikas/fe-api-client": "^1.0.18",
|
|
40
40
|
"axios": "^0.26.0",
|
|
41
41
|
"ts-essentials": "^7.0.1"
|