@ikas/storefront 2.0.68 → 2.0.69
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/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy4.js +1 -1
- package/build/api/cart/index.d.ts +3 -1
- package/build/api/cart/index.js +1 -1
- package/build/ikas.js +1 -1
- package/build/models/ui/product-list/index.js +1 -1
- package/build/store/cart.d.ts +24 -2
- package/build/store/cart.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'../ext/
|
|
1
|
+
import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IkasSaveItemToCartInput, IkasCart } from "../../models/data/cart";
|
|
2
|
+
import { GraphQLError } from "graphql";
|
|
3
|
+
export declare type SaveItemToCartCallbackType = (errors?: readonly GraphQLError[]) => void;
|
|
2
4
|
export declare class IkasCartAPI {
|
|
3
|
-
static saveItemToCart(input: IkasSaveItemToCartInput): Promise<IkasCart | undefined>;
|
|
5
|
+
static saveItemToCart(input: IkasSaveItemToCartInput, callback?: SaveItemToCartCallbackType): Promise<IkasCart | undefined>;
|
|
4
6
|
static getCart(cartId?: string, customerId?: string): Promise<IkasCart | undefined>;
|
|
5
7
|
}
|
package/build/api/cart/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as n,__generator as t,__makeTemplateObject as e}from'../../ext/tslib/tslib.es6.js';import{IkasCart as r}from"../../models/data/cart/index.js";import a from'../../ext/graphql-tag/src/index.js';import{apollo as o}from"../apollo.js";import{IkasStorefrontConfig as i}from"../../storefront/index.js";var d,u,s=function(){function s(){}return s.saveItemToCart=function(i){return n(this,void 0,void 0,(function(){var n,
|
|
1
|
+
import{__awaiter as n,__generator as t,__makeTemplateObject as e}from'../../ext/tslib/tslib.es6.js';import{IkasCart as r}from"../../models/data/cart/index.js";import a from'../../ext/graphql-tag/src/index.js';import{apollo as o}from"../apollo.js";import{IkasStorefrontConfig as i}from"../../storefront/index.js";var d,u,s=function(){function s(){}return s.saveItemToCart=function(i,u){return n(this,void 0,void 0,(function(){var n,s,c,I,m,l;return t(this,(function(t){switch(t.label){case 0:n=a(d||(d=e(["\n mutation saveItemToCart($input: SaveItemToCartInput!) {\n saveItemToCart(input: $input) {\n id\n createdAt\n updatedAt\n dueDate\n currencyCode\n customerId\n merchantId\n itemCount\n totalPrice\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n deleted\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n options {\n name\n productOptionsSetId\n productOptionId\n type\n values {\n name\n price\n value\n }\n }\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n id\n name\n sku\n slug\n barcodeList\n mainImageId\n productId\n prices {\n buyPrice\n currency\n discountPrice\n sellPrice\n }\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n }\n }\n "],["\n mutation saveItemToCart($input: SaveItemToCartInput!) {\n saveItemToCart(input: $input) {\n id\n createdAt\n updatedAt\n dueDate\n currencyCode\n customerId\n merchantId\n itemCount\n totalPrice\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n deleted\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n options {\n name\n productOptionsSetId\n productOptionId\n type\n values {\n name\n price\n value\n }\n }\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n id\n name\n sku\n slug\n barcodeList\n mainImageId\n productId\n prices {\n buyPrice\n currency\n discountPrice\n sellPrice\n }\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,o.getClient().mutate({mutation:n,variables:{input:i}})];case 2:return s=t.sent(),c=s.data,(I=s.errors)&&I.length&&console.log(I),u&&u(I),c?[2,new r(c.saveItemToCart)]:[3,4];case 3:return m=t.sent(),console.log(m),u&&(l=null==m?void 0:m.graphQLErrors,u(l)),[3,4];case 4:return[2]}}))}))},s.getCart=function(d,s){return n(this,void 0,void 0,(function(){var n,c,I,m,l;return t(this,(function(t){switch(t.label){case 0:n=a(u||(u=e(["\n query getCart(\n $cartId: String\n $customerId: String\n $storefrontRoutingId: String\n ) {\n getCart(\n id: $cartId\n customerId: $customerId\n storefrontRoutingId: $storefrontRoutingId\n ) {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n slug\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n }\n "],["\n query getCart(\n $cartId: String\n $customerId: String\n $storefrontRoutingId: String\n ) {\n getCart(\n id: $cartId\n customerId: $customerId\n storefrontRoutingId: $storefrontRoutingId\n ) {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n salesChannelId\n storefrontId\n storefrontRoutingId\n storefrontThemeId\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n slug\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,o.getClient().query({query:n,variables:{cartId:d,customerId:s,storefrontRoutingId:i.storefrontRoutingId}})];case 2:return c=t.sent(),I=c.data,(m=c.errors)&&m.length&&console.log(m),I&&I.getCart?[2,new r(I.getCart)]:[3,4];case 3:return l=t.sent(),console.log(l),[3,4];case 4:return[2]}}))}))},s}();export{s as IkasCartAPI};
|