@ikas/storefront-api 4.13.18 → 4.14.0
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
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};
|
|
@@ -2,7 +2,7 @@ import { APIResponse } from "@ikas/fe-api-client";
|
|
|
2
2
|
import { IkasCategory } from "@ikas/storefront-models";
|
|
3
3
|
import { QueryParams as ListCategoryQueryParams } from "../../__api/queries/listCategory";
|
|
4
4
|
export type { ListCategoryQueryParams };
|
|
5
|
-
export declare function listCategory(params: ListCategoryQueryParams): Promise<APIResponse<{
|
|
5
|
+
export declare function listCategory(params: ListCategoryQueryParams, excludedFieldsCategory?: string[] | null): Promise<APIResponse<{
|
|
6
6
|
data: IkasCategory[] | undefined;
|
|
7
7
|
count?: number | undefined;
|
|
8
8
|
hasNext?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as t,__generator as r,__assign as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as n}from"@ikas/fe-api-client";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{initIkasCategory as o}from"@ikas/storefront-models";function s(s,u){var c;return t(this,void 0,void 0,(function(){var t,f,l,d,p;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCategory.js")];case 1:return t=r.sent().default,l=t,d=[s],[4,a(u)];case 2:return[4,l.apply(void 0,d.concat([r.sent()]))];case 3:return f=r.sent(),null==(p=null===(c=f.data)||void 0===c?void 0:c.data)||p.forEach((function(t){return o(t,i.getCurrentLocale())})),[2,new n(e(e({},f.data),{data:p}),f.graphQLErrors)]}}))}))}function a(e){return t(this,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCategory.js")];case 1:return t=r.sent().ResponseField,n=[],e&&e.length&&e.map((function(r){var e=Object.keys(t).filter((function(t){return t.startsWith(r)}));n=e})),[2,Object.entries(t).filter((function(t){var r=t[0];return!n.includes(r)})).map((function(t){return t[1]}))]}}))}))}export{s as listCategory};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-api",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.0",
|
|
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.
|
|
21
|
-
"@ikas/storefront-models": "^4.
|
|
20
|
+
"@ikas/storefront-config": "^4.14.0",
|
|
21
|
+
"@ikas/storefront-models": "^4.14.0",
|
|
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.
|
|
38
|
-
"@ikas/storefront-models": "^4.
|
|
37
|
+
"@ikas/storefront-config": "^4.14.0",
|
|
38
|
+
"@ikas/storefront-models": "^4.14.0",
|
|
39
39
|
"@ikas/fe-api-client": "^1.0.18",
|
|
40
40
|
"axios": "^0.26.0",
|
|
41
41
|
"ts-essentials": "^7.0.1"
|