@ikas/storefront 2.0.73 → 3.0.0-alpha.1
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/__generated__/global-types.d.ts +15 -72
- package/build/__generated__/global-types.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
- package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
- package/build/analytics/analytics.d.ts +2 -3
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/events.d.ts +1 -2
- package/build/analytics/events.js +1 -1
- package/build/analytics/googleTagManager.d.ts +0 -2
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.js +1 -1
- package/build/api/blog/__generated__/getBlog.d.ts +5 -1
- package/build/api/blog/__generated__/listBlog.d.ts +5 -1
- package/build/api/blog/__generated__/listBlogCategory.d.ts +5 -1
- package/build/api/blog/__generated__/listBlogMetaData.d.ts +5 -3
- package/build/api/blog/index.js +1 -1
- package/build/api/brand/index.js +1 -1
- package/build/api/cart/__generated__/getCart.d.ts +4 -2
- package/build/api/cart/__generated__/saveItemToCart.d.ts +4 -25
- package/build/api/cart/index.d.ts +1 -3
- package/build/api/cart/index.js +1 -1
- package/build/api/category/__generated__/listCategoryPaths.d.ts +0 -19
- package/build/api/category/index.js +1 -1
- package/build/api/checkout/__generated__/addCouponCodeToCheckout.d.ts +1 -1
- package/build/api/checkout/__generated__/getCheckoutById.d.ts +4 -2
- package/build/api/checkout/__generated__/getOrder.d.ts +12 -6
- package/build/api/checkout/index.d.ts +1 -7
- package/build/api/checkout/index.js +1 -1
- package/build/api/contact-form/__generated__/sendContactFormToMerchant.d.ts +0 -1
- package/build/api/contact-form/index.d.ts +1 -2
- package/build/api/contact-form/index.js +1 -1
- package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +13 -7
- package/build/api/customer/__generated__/customerLogin.d.ts +2 -8
- package/build/api/customer/__generated__/customerSocialLogin.d.ts +2 -8
- package/build/api/customer/__generated__/getCustomerOrders.d.ts +12 -6
- package/build/api/customer/__generated__/getMyCustomer.d.ts +3 -13
- package/build/api/customer/__generated__/registerCustomer.d.ts +3 -14
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +3 -13
- package/build/api/customer/index.d.ts +1 -3
- package/build/api/customer/index.js +1 -1
- package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +5 -1
- package/build/api/customer-review/index.js +1 -1
- package/build/api/favorite-product/index.js +1 -1
- package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +0 -8
- package/build/api/html-meta-data/index.js +1 -1
- package/build/api/index.d.ts +0 -1
- package/build/api/merchant/__generated__/listMerchantSettings.d.ts +0 -11
- package/build/api/merchant/index.js +1 -1
- package/build/api/product-option-set/__generated__/ListProductOptionSet.d.ts +0 -6
- package/build/api/product-search/__generated__/getProductFilterData.d.ts +0 -1
- package/build/api/product-search/index.d.ts +1 -19
- package/build/api/product-search/index.js +1 -1
- package/build/api/raffle/__generated__/listRaffle.d.ts +5 -1
- package/build/api/raffle/__generated__/listRaffleMetaData.d.ts +0 -2
- package/build/api/raffle/__generated__/saveRaffleParticipant.d.ts +6 -46
- package/build/api/raffle/index.d.ts +3 -7
- package/build/api/raffle/index.js +1 -1
- package/build/api/storefront/__generated__/getStorefront.d.ts +0 -3
- package/build/api/storefront/index.js +1 -1
- package/build/api/variant-type/__generated__/listVariantType.d.ts +6 -2
- package/build/assets/translations/checkout/en.js +1 -1
- package/build/assets/translations/checkout/tr.js +1 -1
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +0 -3
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/error/index.js +1 -1
- package/build/components/checkout/components/error/no-shipping-error/index.d.ts +5 -3
- package/build/components/checkout/components/error/no-shipping-error/index.js +1 -1
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/form-item/model.js +1 -1
- package/build/components/checkout/components/form-item/style.module.scss.js +1 -1
- package/build/components/checkout/index.d.ts +0 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +3 -5
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/checkout/steps/step-payment/index.js +1 -1
- package/build/components/checkout/steps/step-shipping/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/image/index.d.ts +3 -29
- package/build/components/page/head.d.ts +0 -3
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.d.ts +0 -3
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/ikas.js +7 -7
- package/build/index.js +1 -1
- package/build/models/data/blog/index.d.ts +0 -2
- package/build/models/data/blog/index.js +1 -1
- package/build/models/data/category/index.d.ts +0 -2
- package/build/models/data/category/index.js +1 -1
- package/build/models/data/checkout/index.d.ts +1 -1
- package/build/models/data/checkout/index.js +1 -1
- package/build/models/data/customer/index.d.ts +0 -2
- package/build/models/data/customer/index.js +1 -1
- package/build/models/data/html-meta-data/index.d.ts +0 -2
- package/build/models/data/html-meta-data/index.js +1 -1
- package/build/models/data/image/index.d.ts +12 -3
- package/build/models/data/image/index.js +1 -1
- package/build/models/data/index.d.ts +1 -6
- package/build/models/data/merchant-settings/index.d.ts +0 -14
- package/build/models/data/merchant-settings/index.js +1 -1
- package/build/models/data/order/line-item/index.js +1 -1
- package/build/models/data/order/line-item/variant/index.d.ts +0 -7
- package/build/models/data/order/line-item/variant/index.js +1 -1
- package/build/models/data/product/index.d.ts +1 -1
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/product/variant/index.d.ts +1 -0
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/product/variant-type/index.d.ts +0 -1
- package/build/models/data/product/variant-type/index.js +1 -1
- package/build/models/data/product-filter/index.d.ts +1 -3
- package/build/models/data/product-filter/index.js +1 -1
- package/build/models/data/product-option-set/index.js +1 -1
- package/build/models/data/raffle/index.d.ts +4 -12
- package/build/models/data/raffle/index.js +1 -1
- package/build/models/data/simple-product/index.d.ts +1 -1
- package/build/models/data/storefront/index.d.ts +0 -3
- package/build/models/data/storefront/index.js +1 -1
- package/build/models/data/storefront/theme-localization/index.js +1 -1
- package/build/models/theme/page/component/prop-value/product-list.d.ts +1 -2
- package/build/models/theme/page/component/prop-value/product-list.js +1 -1
- package/build/models/theme/page/index.d.ts +0 -2
- package/build/models/theme/page/index.js +1 -1
- package/build/models/theme/theme.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/index.d.ts +1 -2
- package/build/models/ui/product-detail/index.d.ts +3 -10
- package/build/models/ui/product-detail/index.js +1 -1
- package/build/models/ui/product-list/index.d.ts +1 -47
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/account-info.d.ts +0 -2
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.d.ts +0 -3
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/contact-form.js +1 -1
- package/build/models/ui/validator/form/raffle-form.d.ts +0 -2
- package/build/models/ui/validator/form/raffle-form.js +1 -1
- package/build/models/ui/validator/form/register.d.ts +0 -4
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/models/ui/validator/rules/index.d.ts +0 -5
- package/build/models/ui/validator/rules/index.js +1 -1
- package/build/pages/404.js +1 -1
- package/build/pages/_slug_/index.js +1 -1
- package/build/pages/account/addresses.js +1 -1
- package/build/pages/account/favorite-products.js +1 -1
- package/build/pages/account/forgot-password.js +1 -1
- package/build/pages/account/index.js +1 -1
- package/build/pages/account/login.js +1 -1
- package/build/pages/account/orders/_id_.js +1 -1
- package/build/pages/account/orders/index.js +1 -1
- package/build/pages/account/raffles.js +1 -1
- package/build/pages/account/recover-password.js +1 -1
- package/build/pages/account/register.js +1 -1
- package/build/pages/blog/_slug_.js +1 -1
- package/build/pages/blog/index.js +1 -1
- package/build/pages/cart.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/pages/editor.js +1 -1
- package/build/pages/home.js +1 -1
- package/build/pages/pages/_slug_.js +1 -1
- package/build/pages/raffle/_slug_.js +1 -1
- package/build/pages/raffle/index.js +1 -1
- package/build/pages/search.js +1 -1
- package/build/providers/helpers/raffles.js +1 -1
- package/build/providers/page-data-get.d.ts +1 -9
- package/build/providers/page-data-get.js +1 -1
- package/build/providers/page-data-init.js +1 -1
- package/build/providers/page-data-next.d.ts +0 -36
- package/build/providers/page-data-next.js +1 -1
- package/build/providers/placeholders.js +1 -1
- package/build/providers/prop-value/attribute-list.js +1 -1
- package/build/providers/prop-value/attribute.js +1 -1
- package/build/providers/prop-value/blog-category-list.js +1 -1
- package/build/providers/prop-value/blog-category.js +1 -1
- package/build/providers/prop-value/blog-list.js +1 -1
- package/build/providers/prop-value/blog.js +1 -1
- package/build/providers/prop-value/brand-list.js +1 -1
- package/build/providers/prop-value/brand.js +1 -1
- package/build/providers/prop-value/category-list.js +1 -1
- package/build/providers/prop-value/category.js +1 -1
- package/build/providers/prop-value/custom.js +1 -1
- package/build/providers/prop-value/image-list.js +1 -1
- package/build/providers/prop-value/image.js +1 -1
- package/build/providers/prop-value/link.js +1 -1
- package/build/providers/prop-value/product-detail.js +1 -1
- package/build/providers/prop-value/product-list.d.ts +0 -6
- package/build/providers/prop-value/product-list.js +1 -1
- package/build/providers/prop-value/raffle-list.js +1 -1
- package/build/providers/prop-value/raffle.js +1 -1
- package/build/scripts/generators/types/index.js +1 -1
- package/build/store/base.d.ts +0 -2
- package/build/store/base.js +1 -1
- package/build/store/cart.d.ts +2 -24
- package/build/store/cart.js +1 -1
- package/build/store/customer.d.ts +3 -7
- package/build/store/customer.js +1 -1
- package/build/storefront/index.d.ts +2 -9
- package/build/storefront/index.js +1 -1
- package/build/utils/currency.d.ts +2 -2
- package/build/utils/currency.js +1 -1
- package/build/utils/helper.d.ts +0 -1
- package/build/utils/helper.js +1 -1
- package/build/utils/i18n.js +1 -1
- package/package.json +3 -1
- package/build/analytics/googleAnalytics.d.ts +0 -13
- package/build/analytics/googleAnalytics.js +0 -1
- package/build/analytics/googleUniversal.d.ts +0 -9
- package/build/analytics/googleUniversal.js +0 -1
- package/build/analytics/tiktokPixel.d.ts +0 -13
- package/build/analytics/tiktokPixel.js +0 -1
- package/build/api/customer/__generated__/getOrderByEmail.d.ts +0 -615
- package/build/api/customer-attribute/__generated__/listCustomerAttribute.d.ts +0 -44
- package/build/api/customer-attribute/index.d.ts +0 -4
- package/build/api/customer-attribute/index.js +0 -1
- package/build/api/customer-review-summary/__generated__/listCustomerReviewSummary.d.ts +0 -55
- package/build/api/customer-review-summary/index.d.ts +0 -21
- package/build/api/customer-review-summary/index.js +0 -1
- package/build/api/product-search/__generated__/getRelatedProducts.d.ts +0 -14
- package/build/api/raffle/__generated__/listRaffleParticipants.d.ts +0 -67
- package/build/api/raffle/__generated__/listStorefrontRaffle.d.ts +0 -82
- package/build/assets/translations/checkout/de.js +0 -1
- package/build/models/data/customer/attribute-value/index.d.ts +0 -9
- package/build/models/data/customer/attribute-value/index.js +0 -1
- package/build/models/data/customer-attribute/customer-attribute-option/index.d.ts +0 -5
- package/build/models/data/customer-attribute/customer-attribute-option/index.js +0 -1
- package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.d.ts +0 -17
- package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.js +0 -1
- package/build/models/data/customer-attribute/index.d.ts +0 -35
- package/build/models/data/customer-attribute/index.js +0 -1
- package/build/models/data/customer-review-summary/index.d.ts +0 -16
- package/build/models/data/customer-review-summary/index.js +0 -1
- package/build/models/ui/customer-review-summary-list/index.d.ts +0 -43
- package/build/models/ui/customer-review-summary-list/index.js +0 -1
- package/build/utils/constants.d.ts +0 -2
- package/build/utils/constants.js +0 -1
package/build/api/blog/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as n,__generator as t,__makeTemplateObject as e}from'../../ext/tslib/tslib.es6.js';import a from'../../ext/graphql-tag/src/index.js';import{apollo as i}from"../apollo.js";import{IkasBlog as d,IkasBlogMetaData as r,IkasBlogCategory as o}from"../../models/data/blog/index.js";import{IkasStorefrontConfig as g}from"../../storefront/index.js";var l,s,u,p,c=function(){function c(){}return c.listBlog=function(r){return n(this,void 0,void 0,(function(){var n,o,s,u,p;return t(this,(function(t){switch(t.label){case 0:n=a(l||(l=e(["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $search: String\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n search: $search\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n tags {\n createdAt\n id\n name\n deleted\n updatedAt\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "],["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $search: String\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n search: $search\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n tags {\n createdAt\n id\n name\n deleted\n updatedAt\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{id:r.idList?{in:r.idList}:void 0,categoryId:r.categoryId?{eq:r.categoryId}:void 0,pagination:{page:r.page,limit:r.limit},tagId:r.tagId?{eq:r.tagId}:void 0,search:r.title,storefrontId:{eq:g.storefrontId}}})];case 2:return o=t.sent(),s=o.data,(u=o.errors)&&u.length?[2,{blogs:[],count:0}]:[2,{blogs:s.listBlog.data.map((function(n){return new d(n)})),count:s.listBlog.count}];case 3:return p=t.sent(),console.log(p),[2,{blogs:[],count:0}];case 4:return[2]}}))}))},c.getBlog=function(r){return n(this,void 0,void 0,(function(){var n,o,l,u,p,c;return t(this,(function(t){switch(t.label){case 0:n=a(s||(s=e(["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "],["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{id:r.id?{eq:r.id}:void 0,pagination:{page:1,limit:1},storefrontId:{eq:g.storefrontId}}})];case 2:return o=t.sent(),l=o.data,(u=o.errors)&&u.length?[2]:(p=l.listBlog.data.map((function(n){return new d(n)}))).length?[2,p[0]]:[3,4];case 3:return c=t.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},c.listBlogMetaData=function(d,o,g,l,s){return void 0===l&&(l=1),void 0===s&&(s=200),n(this,void 0,void 0,(function(){var n,p,c,I,m;return t(this,(function(t){switch(t.label){case 0:n=a(u||(u=e(["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n canonicals\n disableIndex\n }\n hasNext\n limit\n page\n }\n }\n "],["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n canonicals\n disableIndex\n }\n hasNext\n limit\n page\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{slug:d?{eq:d}:void 0,targetId:o?{in:o}:void 0,targetType:g?{in:g}:void 0,pagination:{page:l,limit:s}}})];case 2:return p=t.sent(),c=p.data,(I=p.errors)&&I.length?[2,[]]:[2,c.listBlogMetadata.data.map((function(n){return new r(n)}))];case 3:return m=t.sent(),console.log(m),[2,[]];case 4:return[2]}}))}))},c.listBlogCategory=function(d){return n(this,void 0,void 0,(function(){var n,r,g,l;return t(this,(function(t){switch(t.label){case 0:n=a(p||(p=e(["\n query listBlogCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n ) {\n listBlogCategory(id: $id, pagination: $pagination) {\n count\n data {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "],["\n query listBlogCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n ) {\n listBlogCategory(id: $id, pagination: $pagination) {\n count\n data {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{id:d.idList?{in:d.idList}:void 0,pagination:{page:d.page,limit:d.limit}}})];case 2:return r=t.sent(),g=r.data,(l=r.errors)&&l.length?[2,{blogCategories:[],count:0,hasNext:!1}]:[2,{blogCategories:g.listBlogCategory.data.map((function(n){return new o(n)})),count:g.listBlogCategory.count,hasNext:g.listBlogCategory.hasNext}];case 3:return t.sent(),[2,{blogCategories:[],count:0,hasNext:!1}];case 4:return[2]}}))}))},c}();export{c as IkasBlogAPI};
|
|
1
|
+
import{__awaiter as n,__generator as t,__makeTemplateObject as e}from'../../ext/tslib/tslib.es6.js';import a from'../../ext/graphql-tag/src/index.js';import{apollo as i}from"../apollo.js";import{IkasBlog as d,IkasBlogMetaData as r,IkasBlogCategory as o}from"../../models/data/blog/index.js";import{IkasStorefrontConfig as g}from"../../storefront/index.js";var l,s,u,p,c=function(){function c(){}return c.listBlog=function(r){return n(this,void 0,void 0,(function(){var n,o,s,u,p;return t(this,(function(t){switch(t.label){case 0:n=a(l||(l=e(["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $search: String\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n search: $search\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n tags {\n createdAt\n id\n name\n deleted\n updatedAt\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "],["\n query listBlog(\n $id: StringFilterInput\n $categoryId: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n $tagId: StringFilterInput\n $search: String\n ) {\n listBlog(\n id: $id\n categoryId: $categoryId\n pagination: $pagination\n storefrontId: $storefrontId\n tagId: $tagId\n search: $search\n ) {\n count\n data {\n title\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n tags {\n createdAt\n id\n name\n deleted\n updatedAt\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{id:r.idList?{in:r.idList}:void 0,categoryId:r.categoryId?{eq:r.categoryId}:void 0,pagination:{page:r.page,limit:r.limit},tagId:r.tagId?{eq:r.tagId}:void 0,search:r.title,storefrontId:{eq:g.storefrontId}}})];case 2:return o=t.sent(),s=o.data,(u=o.errors)&&u.length?[2,{blogs:[],count:0}]:[2,{blogs:s.listBlog.data.map((function(n){return new d(n)})),count:s.listBlog.count}];case 3:return p=t.sent(),console.log(p),[2,{blogs:[],count:0}];case 4:return[2]}}))}))},c.getBlog=function(r){return n(this,void 0,void 0,(function(){var n,o,l,u,p,c;return t(this,(function(t){switch(t.label){case 0:n=a(s||(s=e(["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "],["\n query getBlog(\n $id: StringFilterInput\n $pagination: PaginationInput\n $storefrontId: StringFilterInput\n ) {\n listBlog(\n id: $id\n pagination: $pagination\n storefrontId: $storefrontId\n ) {\n count\n data {\n title\n blogContent {\n content\n createdAt\n deleted\n id\n updatedAt\n }\n categoryId\n category {\n createdAt\n updatedAt\n deleted\n id\n name\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n createdAt\n deleted\n id\n imageId\n isPublished\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n writer {\n firstName\n lastName\n }\n publishedAt\n shortDescription\n storefrontId\n tagIds\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{id:r.id?{eq:r.id}:void 0,pagination:{page:1,limit:1},storefrontId:{eq:g.storefrontId}}})];case 2:return o=t.sent(),l=o.data,(u=o.errors)&&u.length?[2]:(p=l.listBlog.data.map((function(n){return new d(n)}))).length?[2,p[0]]:[3,4];case 3:return c=t.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},c.listBlogMetaData=function(d,o,g,l,s){return void 0===l&&(l=1),void 0===s&&(s=200),n(this,void 0,void 0,(function(){var n,p,c,I,m;return t(this,(function(t){switch(t.label){case 0:n=a(u||(u=e(["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "],["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{slug:d?{eq:d}:void 0,targetId:o?{in:o}:void 0,targetType:g?{in:g}:void 0,pagination:{page:l,limit:s}}})];case 2:return p=t.sent(),c=p.data,(I=p.errors)&&I.length?[2,[]]:[2,c.listBlogMetadata.data.map((function(n){return new r(n)}))];case 3:return m=t.sent(),console.log(m),[2,[]];case 4:return[2]}}))}))},c.listBlogCategory=function(d){return n(this,void 0,void 0,(function(){var n,r,g,l;return t(this,(function(t){switch(t.label){case 0:n=a(p||(p=e(["\n query listBlogCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n ) {\n listBlogCategory(id: $id, pagination: $pagination) {\n count\n data {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "],["\n query listBlogCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n ) {\n listBlogCategory(id: $id, pagination: $pagination) {\n count\n data {\n createdAt\n deleted\n id\n imageId\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{id:d.idList?{in:d.idList}:void 0,pagination:{page:d.page,limit:d.limit}}})];case 2:return r=t.sent(),g=r.data,(l=r.errors)&&l.length?[2,{blogCategories:[],count:0,hasNext:!1}]:[2,{blogCategories:g.listBlogCategory.data.map((function(n){return new o(n)})),count:g.listBlogCategory.count,hasNext:g.listBlogCategory.hasNext}];case 3:return t.sent(),[2,{blogCategories:[],count:0,hasNext:!1}];case 4:return[2]}}))}))},c}();export{c as IkasBlogAPI};
|
package/build/api/brand/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as i,__makeTemplateObject as
|
|
1
|
+
import{__awaiter as t,__generator as i,__makeTemplateObject as o}from'../../ext/tslib/tslib.es6.js';import e from'../../ext/graphql-tag/src/index.js';import{apollo as n}from"../apollo.js";import"../../models/data/blog/index.js";import{IkasBrand as r}from"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import{IkasImage as a}from"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";var d,s=function(){function s(){}return s.listBrands=function(s){return t(this,void 0,void 0,(function(){var t,m,l,p,u,c;return i(this,(function(i){switch(i.label){case 0:t=e(d||(d=o(["\n query listProductBrand(\n $id: StringFilterInput\n $pagination: PaginationInput\n $search: String\n $sort: String\n ) {\n listProductBrand(\n id: $id\n pagination: $pagination\n search: $search\n sort: $sort\n ) {\n data {\n id\n name\n description\n imageId\n orderType\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n translations {\n description\n locale\n pageTitle\n }\n }\n translations {\n description\n locale\n name\n }\n }\n count\n }\n }\n "],["\n query listProductBrand(\n $id: StringFilterInput\n $pagination: PaginationInput\n $search: String\n $sort: String\n ) {\n listProductBrand(\n id: $id\n pagination: $pagination\n search: $search\n sort: $sort\n ) {\n data {\n id\n name\n description\n imageId\n orderType\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n translations {\n description\n locale\n pageTitle\n }\n }\n translations {\n description\n locale\n name\n }\n }\n count\n }\n }\n "]))),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n.getClient().query({query:t,variables:{id:(null==s?void 0:s.idList)&&s.idList.length?{in:s.idList}:void 0,pagination:(null==s?void 0:s.page)?{page:s.page,limit:s.limit||10}:void 0,search:null==s?void 0:s.search,sort:(null==s?void 0:s.sort)||null}})];case 2:return m=i.sent(),l=m.data,(p=m.errors)&&p.length?(console.log(p),[2,{brands:[],count:0}]):(u=l.listProductBrand.count,[2,{brands:l.listProductBrand.data.map((function(t){return new r({id:t.id,name:t.name,description:t.description,metaData:t.metaData||void 0,translations:t.translations,image:t.imageId?new a(t.imageId):void 0,orderType:t.orderType})})),count:u}]);case 3:return c=i.sent(),console.log(c),[2,{brands:[],count:0}];case 4:return[2]}}))}))},s}();export{s as IkasBrandAPI};
|
|
@@ -105,7 +105,8 @@ export interface getCart_getCart_items {
|
|
|
105
105
|
*/
|
|
106
106
|
discountPrice: number | null;
|
|
107
107
|
/**
|
|
108
|
-
* It is the final price of the order line item. If the discount price is less
|
|
108
|
+
* It is the final price of the order line item. If the discount price is less
|
|
109
|
+
* than the sell price, the final price is equal to the discount price.
|
|
109
110
|
*/
|
|
110
111
|
finalPrice: number | null;
|
|
111
112
|
id: string;
|
|
@@ -114,7 +115,8 @@ export interface getCart_getCart_items {
|
|
|
114
115
|
*/
|
|
115
116
|
options: getCart_getCart_items_options[] | null;
|
|
116
117
|
/**
|
|
117
|
-
* It is the original order line item id of the line item. If the line item is
|
|
118
|
+
* It is the original order line item id of the line item. If the line item is
|
|
119
|
+
* derived from another line item, this field is filled.
|
|
118
120
|
*/
|
|
119
121
|
originalOrderLineItemId: string | null;
|
|
120
122
|
/**
|
|
@@ -42,25 +42,6 @@ export interface saveItemToCart_saveItemToCart_items_options {
|
|
|
42
42
|
type: ProductOptionTypeEnum;
|
|
43
43
|
values: saveItemToCart_saveItemToCart_items_options_values[];
|
|
44
44
|
}
|
|
45
|
-
export interface saveItemToCart_saveItemToCart_items_variant_prices {
|
|
46
|
-
__typename: "OrderLineVariantPrice";
|
|
47
|
-
/**
|
|
48
|
-
* It is the buy price of variant.
|
|
49
|
-
*/
|
|
50
|
-
buyPrice: number | null;
|
|
51
|
-
/**
|
|
52
|
-
* It is the currency code of variant.
|
|
53
|
-
*/
|
|
54
|
-
currency: string | null;
|
|
55
|
-
/**
|
|
56
|
-
* It is the discount price of variant.
|
|
57
|
-
*/
|
|
58
|
-
discountPrice: number | null;
|
|
59
|
-
/**
|
|
60
|
-
* It is the sell price of variant.
|
|
61
|
-
*/
|
|
62
|
-
sellPrice: number;
|
|
63
|
-
}
|
|
64
45
|
export interface saveItemToCart_saveItemToCart_items_variant_variantValues {
|
|
65
46
|
__typename: "OrderLineVariantVariantValues";
|
|
66
47
|
/**
|
|
@@ -114,10 +95,6 @@ export interface saveItemToCart_saveItemToCart_items_variant {
|
|
|
114
95
|
* It is the product id of the variant.
|
|
115
96
|
*/
|
|
116
97
|
productId: string | null;
|
|
117
|
-
/**
|
|
118
|
-
* It is the price list of the variant. Different price lists may have different pricing.
|
|
119
|
-
*/
|
|
120
|
-
prices: saveItemToCart_saveItemToCart_items_variant_prices[] | null;
|
|
121
98
|
/**
|
|
122
99
|
* It is the variant values of the variant.
|
|
123
100
|
*/
|
|
@@ -140,7 +117,8 @@ export interface saveItemToCart_saveItemToCart_items {
|
|
|
140
117
|
*/
|
|
141
118
|
discountPrice: number | null;
|
|
142
119
|
/**
|
|
143
|
-
* It is the final price of the order line item. If the discount price is less
|
|
120
|
+
* It is the final price of the order line item. If the discount price is less
|
|
121
|
+
* than the sell price, the final price is equal to the discount price.
|
|
144
122
|
*/
|
|
145
123
|
finalPrice: number | null;
|
|
146
124
|
id: string;
|
|
@@ -149,7 +127,8 @@ export interface saveItemToCart_saveItemToCart_items {
|
|
|
149
127
|
*/
|
|
150
128
|
options: saveItemToCart_saveItemToCart_items_options[] | null;
|
|
151
129
|
/**
|
|
152
|
-
* It is the original order line item id of the line item. If the line item is
|
|
130
|
+
* It is the original order line item id of the line item. If the line item is
|
|
131
|
+
* derived from another line item, this field is filled.
|
|
153
132
|
*/
|
|
154
133
|
originalOrderLineItemId: string | null;
|
|
155
134
|
/**
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { IkasSaveItemToCartInput, IkasCart } from "../../models/data/cart";
|
|
2
|
-
import { GraphQLError } from "graphql";
|
|
3
|
-
export declare type SaveItemToCartCallbackType = (errors?: readonly GraphQLError[]) => void;
|
|
4
2
|
export declare class IkasCartAPI {
|
|
5
|
-
static saveItemToCart(input: IkasSaveItemToCartInput
|
|
3
|
+
static saveItemToCart(input: IkasSaveItemToCartInput): Promise<IkasCart | undefined>;
|
|
6
4
|
static getCart(cartId?: string, customerId?: string): Promise<IkasCart | undefined>;
|
|
7
5
|
}
|
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
|
|
1
|
+
import{__awaiter as n,__generator as t,__makeTemplateObject as e}from'../../ext/tslib/tslib.es6.js';import{IkasCart as a}from"../../models/data/cart/index.js";import r from'../../ext/graphql-tag/src/index.js';import{apollo as o}from"../apollo.js";import{IkasStorefrontConfig as d}from"../../storefront/index.js";var i,u,s=function(){function s(){}return s.saveItemToCart=function(d){return n(this,void 0,void 0,(function(){var n,u,s,c,I;return t(this,(function(t){switch(t.label){case 0:n=r(i||(i=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 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 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:d}})];case 2:return u=t.sent(),s=u.data,(c=u.errors)&&c.length&&console.log(c),s?[2,new a(s.saveItemToCart)]:[3,4];case 3:return I=t.sent(),console.log(I),[3,4];case 4:return[2]}}))}))},s.getCart=function(i,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=r(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:i,customerId:s,storefrontRoutingId:d.storefrontRoutingId}})];case 2:return c=t.sent(),I=c.data,(m=c.errors)&&m.length&&console.log(m),I&&I.getCart?[2,new a(I.getCart)]:[3,4];case 3:return l=t.sent(),console.log(l),[3,4];case 4:return[2]}}))}))},s}();export{s as IkasCartAPI};
|
|
@@ -6,21 +6,6 @@ export interface listCategoryPaths_listCategory_data_metaData {
|
|
|
6
6
|
*/
|
|
7
7
|
slug: string;
|
|
8
8
|
}
|
|
9
|
-
export interface listCategoryPaths_listCategory_data_translations {
|
|
10
|
-
__typename: "CategoryTranslation";
|
|
11
|
-
/**
|
|
12
|
-
* It is the name information of the translation.
|
|
13
|
-
*/
|
|
14
|
-
locale: string;
|
|
15
|
-
/**
|
|
16
|
-
* It is the information in which language the translation is saved.
|
|
17
|
-
*/
|
|
18
|
-
name: string | null;
|
|
19
|
-
/**
|
|
20
|
-
* It is the description information of the translation.
|
|
21
|
-
*/
|
|
22
|
-
description: string | null;
|
|
23
|
-
}
|
|
24
9
|
export interface listCategoryPaths_listCategory_data {
|
|
25
10
|
__typename: "Category";
|
|
26
11
|
id: string;
|
|
@@ -32,10 +17,6 @@ export interface listCategoryPaths_listCategory_data {
|
|
|
32
17
|
* It is the metadata information of the product category.
|
|
33
18
|
*/
|
|
34
19
|
metaData: listCategoryPaths_listCategory_data_metaData | null;
|
|
35
|
-
/**
|
|
36
|
-
* It is the translation information of the product category.
|
|
37
|
-
*/
|
|
38
|
-
translations: listCategoryPaths_listCategory_data_translations[] | null;
|
|
39
20
|
}
|
|
40
21
|
export interface listCategoryPaths_listCategory {
|
|
41
22
|
__typename: "CategoryPaginationResponse";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__makeTemplateObject as n}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasCategory as i,IkasCategoryPath as a}from"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"
|
|
1
|
+
import{__awaiter as t,__generator as e,__makeTemplateObject as n}from'../../ext/tslib/tslib.es6.js';import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasCategory as i,IkasCategoryPath as a}from"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import{IkasImage as o}from"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import r from'../../ext/graphql-tag/src/index.js';import{apollo as s}from"../apollo.js";var d,l,m=function(){function m(){}return m.listCategories=function(a){return t(this,void 0,void 0,(function(){var t,l,m,p,u,c,g,j,h,v,f;return e(this,(function(x){switch(x.label){case 0:t=r(d||(d=n(["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $search: String\n $sort: String\n ) {\n listCategory(\n id: $id\n pagination: $pagination\n search: $search\n sort: $sort\n ) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n parentId\n imageId\n orderType\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n translations {\n description\n locale\n pageTitle\n }\n }\n translations {\n description\n locale\n name\n }\n categoryPath\n }\n count\n }\n }\n "],["\n query listCategory(\n $id: StringFilterInput\n $pagination: PaginationInput\n $search: String\n $sort: String\n ) {\n listCategory(\n id: $id\n pagination: $pagination\n search: $search\n sort: $sort\n ) {\n data {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n parentId\n imageId\n orderType\n metaData {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n translations {\n description\n locale\n pageTitle\n }\n }\n translations {\n description\n locale\n name\n }\n categoryPath\n }\n count\n }\n }\n "]))),x.label=1;case 1:return x.trys.push([1,10,,11]),[4,s.getClient().query({query:t,variables:{id:(null==a?void 0:a.idList)&&a.idList.length?{in:a.idList}:void 0,pagination:(null==a?void 0:a.page)?{page:a.page,limit:a.limit||10}:void 0,search:null==a?void 0:a.search,sort:(null==a?void 0:a.sort)||null}})];case 2:if(l=x.sent(),m=l.data,(p=l.errors)&&p.length)return[2,{categories:[],count:0}];u=m.listCategory.count,c=m.listCategory.data.map((function(t){return new i({id:t.id,name:t.name,description:t.description,parentId:t.parentId,metaData:t.metaData||void 0,translations:t.translations,image:t.imageId?new o(t.imageId):void 0,orderType:t.orderType})})),x.label=3;case 3:x.trys.push([3,8,,9]),g=function(t){var n,i,a;return e(this,(function(e){switch(e.label){case 0:return(n=m.listCategory.data[t].categoryPath)&&n.length?(i=[],[4,j.listCategoryPaths({idList:n})]):[3,2];case 1:a=e.sent(),n.forEach((function(t){var e=a.find((function(e){return e.id===t}));e&&i.push(e)})),c[t].path=i,e.label=2;case 2:return[2]}}))},j=this,h=0,x.label=4;case 4:return h<m.listCategory.data.length?[5,g(h)]:[3,7];case 5:x.sent(),x.label=6;case 6:return h++,[3,4];case 7:return[3,9];case 8:return v=x.sent(),console.log(v),[3,9];case 9:return[2,{categories:c,count:u}];case 10:return f=x.sent(),console.log(f),[2,{categories:[],count:0}];case 11:return[2]}}))}))},m.listCategoryPaths=function(i){return t(this,void 0,void 0,(function(){var t,o,d,m,p,u;return e(this,(function(e){switch(e.label){case 0:t=r(l||(l=n(["\n query listCategoryPaths(\n $id: StringFilterInput\n $pagination: PaginationInput\n $search: String\n ) {\n listCategory(id: $id, pagination: $pagination, search: $search) {\n data {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "],["\n query listCategoryPaths(\n $id: StringFilterInput\n $pagination: PaginationInput\n $search: String\n ) {\n listCategory(id: $id, pagination: $pagination, search: $search) {\n data {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,s.getClient().query({query:t,variables:{id:(null==i?void 0:i.idList)&&i.idList.length?{in:i.idList}:void 0,pagination:(null==i?void 0:i.page)?{page:i.page,limit:i.limit||10}:void 0,search:null==i?void 0:i.search}})];case 2:return o=e.sent(),d=o.data,(m=o.errors)&&m.length?[2,[]]:(p=d.listCategory.data.map((function(t){var e;return new a({id:t.id,name:t.name,slug:null===(e=t.metaData)||void 0===e?void 0:e.slug})})),[2,p]);case 3:return u=e.sent(),console.log(u),[2,[]];case 4:return[2]}}))}))},m}();export{m as IkasCategoryAPI};
|
|
@@ -425,12 +425,14 @@ export interface getCheckoutById_getCheckoutById_cart_items {
|
|
|
425
425
|
*/
|
|
426
426
|
discountPrice: number | null;
|
|
427
427
|
/**
|
|
428
|
-
* It is the final price of the order line item. If the discount price is less
|
|
428
|
+
* It is the final price of the order line item. If the discount price is less
|
|
429
|
+
* than the sell price, the final price is equal to the discount price.
|
|
429
430
|
*/
|
|
430
431
|
finalPrice: number | null;
|
|
431
432
|
id: string;
|
|
432
433
|
/**
|
|
433
|
-
* It is the original order line item id of the line item. If the line item is
|
|
434
|
+
* It is the original order line item id of the line item. If the line item is
|
|
435
|
+
* derived from another line item, this field is filled.
|
|
434
436
|
*/
|
|
435
437
|
originalOrderLineItemId: string | null;
|
|
436
438
|
/**
|
|
@@ -276,12 +276,14 @@ export interface getOrder_getOrder_orderLineItems {
|
|
|
276
276
|
*/
|
|
277
277
|
discountPrice: number | null;
|
|
278
278
|
/**
|
|
279
|
-
* It is the final price of the order line item. If the discount price is less
|
|
279
|
+
* It is the final price of the order line item. If the discount price is less
|
|
280
|
+
* than the sell price, the final price is equal to the discount price.
|
|
280
281
|
*/
|
|
281
282
|
finalPrice: number | null;
|
|
282
283
|
id: string;
|
|
283
284
|
/**
|
|
284
|
-
* It is the original order line item id of the line item. If the line item is
|
|
285
|
+
* It is the original order line item id of the line item. If the line item is
|
|
286
|
+
* derived from another line item, this field is filled.
|
|
285
287
|
*/
|
|
286
288
|
originalOrderLineItemId: string | null;
|
|
287
289
|
/**
|
|
@@ -329,7 +331,8 @@ export interface getOrder_getOrder_orderPackages_trackingInfo {
|
|
|
329
331
|
*/
|
|
330
332
|
trackingLink: string | null;
|
|
331
333
|
/**
|
|
332
|
-
* Indicates whether the notification is sent to the customer after the cargo is
|
|
334
|
+
* Indicates whether the notification is sent to the customer after the cargo is
|
|
335
|
+
* delivered. **isSendNotification** returns true if the notification is sent.
|
|
333
336
|
*/
|
|
334
337
|
isSendNotification: boolean | null;
|
|
335
338
|
/**
|
|
@@ -511,7 +514,7 @@ export interface getOrder_getOrder_taxLines {
|
|
|
511
514
|
price: number;
|
|
512
515
|
}
|
|
513
516
|
export interface getOrder_getOrder {
|
|
514
|
-
__typename: "
|
|
517
|
+
__typename: "Order";
|
|
515
518
|
/**
|
|
516
519
|
* It is the billing address of the order.
|
|
517
520
|
*/
|
|
@@ -534,7 +537,8 @@ export interface getOrder_getOrder {
|
|
|
534
537
|
*/
|
|
535
538
|
currencyRates: getOrder_getOrder_currencyRates[];
|
|
536
539
|
/**
|
|
537
|
-
* Information about the customer. The order does not have to be a customer
|
|
540
|
+
* Information about the customer. The order does not have to be a customer
|
|
541
|
+
* information. If the order was created by ikasPOS, the customer information may be null.
|
|
538
542
|
*/
|
|
539
543
|
customer: getOrder_getOrder_customer | null;
|
|
540
544
|
deleted: boolean | null;
|
|
@@ -597,7 +601,9 @@ export interface getOrder_getOrder {
|
|
|
597
601
|
*/
|
|
598
602
|
taxLines: getOrder_getOrder_taxLines[] | null;
|
|
599
603
|
/**
|
|
600
|
-
* The total final price of the order resulting from the apply of
|
|
604
|
+
* The total final price of the order resulting from the apply of
|
|
605
|
+
* `orderAdjustments` , `shippingLines`, and `giftPackageLines` pricing to the
|
|
606
|
+
* order total price.
|
|
601
607
|
*/
|
|
602
608
|
totalFinalPrice: number;
|
|
603
609
|
/**
|
|
@@ -14,13 +14,7 @@ export declare class IkasCheckoutAPI {
|
|
|
14
14
|
static retrieveInstallmentInfo(input: IkasInstallmentInfoInput): Promise<IkasInstallmentInfo | undefined>;
|
|
15
15
|
static checkStocks(lines: CheckStocksLineInput[], stockLocationIdList: string[]): Promise<CheckStocksTypes.checkStocks_checkStocks | undefined>;
|
|
16
16
|
static listCheckoutSettings(): Promise<IkasCheckoutSettings[] | undefined>;
|
|
17
|
-
static addCouponCodeToCheckout(checkoutId: string, couponCode: string
|
|
18
|
-
data: string;
|
|
19
|
-
errors: readonly GraphQLError[] | undefined;
|
|
20
|
-
} | {
|
|
21
|
-
data: undefined;
|
|
22
|
-
errors: any;
|
|
23
|
-
} | undefined>;
|
|
17
|
+
static addCouponCodeToCheckout(checkoutId: string, couponCode: string): Promise<true | undefined>;
|
|
24
18
|
}
|
|
25
19
|
declare type CheckStocksLineInput = {
|
|
26
20
|
quantity: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as n,__generator as e,__makeTemplateObject as t}from'../../ext/tslib/tslib.es6.js';import i from'../../ext/graphql-tag/src/index.js';import{apollo as a}from"../apollo.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import{IkasCheckout as r}from"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/merchant-settings/index.js";import{IkasOrder as o}from"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/data/customer-attribute/index.js";import"../../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasPaymentGateway as d}from"../../models/data/payment-gateway/index.js";import{IkasStorefrontConfig as s}from"../../storefront/index.js";import{IkasCheckoutSettings as c}from"../../models/data/checkout-settings/index.js";var u,l,m,p,g,h,y,I,f,v,C=function(){function C(){}return C.getCheckoutId=function(r){return n(this,void 0,void 0,(function(){var n,o,d,s,c;return e(this,(function(e){switch(e.label){case 0:n=i(u||(u=t(["\n query getCheckoutByCartId($cartId: String!) {\n getCheckoutByCartId(cartId: $cartId) {\n id\n }\n }\n "],["\n query getCheckoutByCartId($cartId: String!) {\n getCheckoutByCartId(cartId: $cartId) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{cartId:r}})];case 2:return o=e.sent(),d=o.data,(s=o.errors)&&s.length&&console.log(s),d?[2,d.getCheckoutByCartId.id]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.getCheckoutById=function(o){return n(this,void 0,void 0,(function(){var n,d,s,c,u;return e(this,(function(e){switch(e.label){case 0:n=i(l||(l=t(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n iso2\n iso3\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "],["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n iso2\n iso3\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{id:o}})];case 2:return d=e.sent(),s=d.data,(c=d.errors)&&c.length&&console.log(c),s?[2,new r(s.getCheckoutById)]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.getOrder=function(r){return n(this,void 0,void 0,(function(){var n,d,s;return e(this,(function(e){switch(e.label){case 0:n=i(m||(m=t(["\n query getOrder($orderId: String!) {\n getOrder(orderId: $orderId) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "],["\n query getOrder($orderId: String!) {\n getOrder(orderId: $orderId) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{orderId:r}})];case 2:return d=e.sent(),(s=d.data)&&s.getOrder?[2,new o(s.getOrder)]:[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},C.saveCheckout=function(r){var o,d,s,c;return n(this,void 0,void 0,(function(){var n,u,l,m,g;return e(this,(function(e){switch(e.label){case 0:n=i(p||(p=t(["\n mutation saveCheckout($input: SaveCheckoutInput!) {\n saveCheckout(input: $input) {\n id\n }\n }\n "],["\n mutation saveCheckout($input: SaveCheckoutInput!) {\n saveCheckout(input: $input) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().mutate({mutation:n,variables:{input:{id:r.id,cartId:r.cartId,shippingMethod:r.shippingMethod,shippingSettingsId:r.shippingSettingsId,shippingZoneRateId:r.shippingZoneRateId,billingAddress:r.billingAddress&&r.billingAddress.addressLine1?{id:r.billingAddress.id,addressLine1:r.billingAddress.addressLine1||"",addressLine2:r.billingAddress.addressLine2||null,city:r.billingAddress.city,country:r.billingAddress.country,state:r.billingAddress.state,district:r.billingAddress.district||null,firstName:r.billingAddress.firstName,lastName:r.billingAddress.lastName,postalCode:r.billingAddress.postalCode,company:r.billingAddress.company||null,phone:r.billingAddress.phone||null,taxNumber:r.billingAddress.taxNumber||null,taxOffice:r.billingAddress.taxOffice||null,isDefault:r.billingAddress.isDefault||!1,identityNumber:r.billingAddress.identityNumber||null}:null,shippingAddress:r.shippingAddress&&r.shippingAddress.addressLine1?{id:r.shippingAddress.id,addressLine1:r.shippingAddress.addressLine1||"",addressLine2:r.shippingAddress.addressLine2||null,city:r.shippingAddress.city,country:r.shippingAddress.country,state:r.shippingAddress.state,district:r.shippingAddress.district||null,firstName:r.shippingAddress.firstName,lastName:r.shippingAddress.lastName,postalCode:r.shippingAddress.postalCode,company:r.shippingAddress.company||null,phone:r.shippingAddress.phone||null,taxNumber:r.shippingAddress.taxNumber||null,taxOffice:r.shippingAddress.taxOffice||null,isDefault:r.shippingAddress.isDefault||!1,identityNumber:r.shippingAddress.identityNumber||null}:null,couponCode:r.couponCode||null,customer:r.customer?{id:null===(o=r.customer)||void 0===o?void 0:o.id,email:null===(d=r.customer)||void 0===d?void 0:d.email,firstName:null===(s=r.customer)||void 0===s?void 0:s.firstName,lastName:null===(c=r.customer)||void 0===c?void 0:c.lastName,notificationsAccepted:r.customer.notificationsAccepted||!1}:null,note:r.note,isGiftPackage:r.isGiftPackage,giftPackageNote:r.giftPackageNote}}})];case 2:return u=e.sent(),l=u.data,m=u.errors,[2,{data:(null==l?void 0:l.saveCheckout.id)||void 0,errors:m}];case 3:return g=e.sent(),console.log(g),g&&g.graphQLErrors?[2,{data:void 0,errors:g.graphQLErrors}]:[3,4];case 4:return[2]}}))}))},C.createSaleTransactionWithCheckout=function(r,o,d){return n(this,void 0,void 0,(function(){var n,s,c,u,l;return e(this,(function(e){switch(e.label){case 0:n=i(g||(g=t(["\n mutation createSaleTransactionWithCheckout(\n $input: CreateSaleTransactionWithCheckoutInput!\n ) {\n createSaleTransactionWithCheckout(input: $input) {\n orderId\n orderNumber\n transactionId\n transactionStatus\n returnSlug\n error {\n code\n declineCode\n message\n }\n }\n }\n "],["\n mutation createSaleTransactionWithCheckout(\n $input: CreateSaleTransactionWithCheckoutInput!\n ) {\n createSaleTransactionWithCheckout(input: $input) {\n orderId\n orderNumber\n transactionId\n transactionStatus\n returnSlug\n error {\n code\n declineCode\n message\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().mutate({mutation:n,variables:{input:{checkoutId:r,paymentGatewayId:o,paymentMethodDetail:d}}})];case 2:return s=e.sent(),c=s.data,(u=s.errors)&&u.length?[2]:c?[2,c.createSaleTransactionWithCheckout]:[3,4];case 3:return l=e.sent(),console.log(l),[3,4];case 4:return[2]}}))}))},C.listPaymentGateway=function(r){return n(this,void 0,void 0,(function(){var n,o,c,u,l;return e(this,(function(e){switch(e.label){case 0:n=i(h||(h=t(["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n supportedCurrencies\n availableCountries\n }\n }\n "],["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n supportedCurrencies\n availableCountries\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{id:r?{in:r}:void 0,locale:s.getCurrentLocale()}})];case 2:return o=e.sent(),c=o.data,(u=o.errors)&&u.length&&console.log(u),c?[2,c.listPaymentGateway.map((function(n){return new d(n)}))]:[3,4];case 3:return l=e.sent(),console.log(l),[3,4];case 4:return[2]}}))}))},C.retrieveInstallmentInfo=function(r){return n(this,void 0,void 0,(function(){var n,o,d,s,c;return e(this,(function(e){switch(e.label){case 0:n=i(y||(y=t(["\n mutation retrieveInstallmentInfo($input: RetrieveInstallmentInfoInput!) {\n retrieveInstallmentInfo(input: $input) {\n bankName\n binNumber\n cardAssociation\n cardFamily\n cardType\n installmentPrices {\n totalPrice\n installmentPrice\n installmentCount\n }\n price\n }\n }\n "],["\n mutation retrieveInstallmentInfo($input: RetrieveInstallmentInfoInput!) {\n retrieveInstallmentInfo(input: $input) {\n bankName\n binNumber\n cardAssociation\n cardFamily\n cardType\n installmentPrices {\n totalPrice\n installmentPrice\n installmentCount\n }\n price\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().mutate({mutation:n,variables:{input:r}})];case 2:return o=e.sent(),d=o.data,(s=o.errors)&&s.length&&console.log(s),d?[2,d.retrieveInstallmentInfo]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.checkStocks=function(r,o){return n(this,void 0,void 0,(function(){var n,d,s,c,u;return e(this,(function(e){switch(e.label){case 0:n=i(I||(I=t(["\n query checkStocks(\n $lines: [CheckStocksLineInput!]!\n $stockLocationIdList: [String!]\n ) {\n checkStocks(lines: $lines, stockLocationIdList: $stockLocationIdList) {\n lines {\n stockCount\n isAvailable\n variantId\n }\n }\n }\n "],["\n query checkStocks(\n $lines: [CheckStocksLineInput!]!\n $stockLocationIdList: [String!]\n ) {\n checkStocks(lines: $lines, stockLocationIdList: $stockLocationIdList) {\n lines {\n stockCount\n isAvailable\n variantId\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{lines:r,stockLocationIdList:o.length?o:null}})];case 2:return d=e.sent(),s=d.data,(c=d.errors)&&c.length&&console.log(c),s?[2,s.checkStocks]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.listCheckoutSettings=function(){return n(this,void 0,void 0,(function(){var n,r,o,d,u;return e(this,(function(e){switch(e.label){case 0:n=i(f||(f=t(["\n query listCheckoutSettings($storefrontId: StringFilterInput!) {\n listCheckoutSettings(storefrontId: $storefrontId) {\n createdAt\n id\n identityNumberRequirement\n isAccountRequired\n isTermsAndConditionsDefaultChecked\n options {\n name\n required\n }\n phoneRequirement\n showCheckoutNote\n showTermsAndConditionsCheckbox\n storefrontId\n updatedAt\n isGiftPackageEnabled\n giftPackagePriceList {\n currencyCode\n price\n }\n postalCodeRequirement\n }\n }\n "],["\n query listCheckoutSettings($storefrontId: StringFilterInput!) {\n listCheckoutSettings(storefrontId: $storefrontId) {\n createdAt\n id\n identityNumberRequirement\n isAccountRequired\n isTermsAndConditionsDefaultChecked\n options {\n name\n required\n }\n phoneRequirement\n showCheckoutNote\n showTermsAndConditionsCheckbox\n storefrontId\n updatedAt\n isGiftPackageEnabled\n giftPackagePriceList {\n currencyCode\n price\n }\n postalCodeRequirement\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{storefrontId:{eq:s.storefrontId}}})];case 2:return r=e.sent(),o=r.data,(d=r.errors)&&d.length&&console.log(d),o?[2,o.listCheckoutSettings.map((function(n){return new c(n)}))]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.addCouponCodeToCheckout=function(r,o){return n(this,void 0,void 0,(function(){var n,d,s,c,u;return e(this,(function(e){switch(e.label){case 0:n=i(v||(v=t(["\n mutation addCouponCodeToCheckout(\n $checkoutId: String!\n $couponCode: String\n ) {\n addCouponCodeToCheckout(\n checkoutId: $checkoutId\n couponCode: $couponCode\n ) {\n id\n }\n }\n "],["\n mutation addCouponCodeToCheckout(\n $checkoutId: String!\n $couponCode: String\n ) {\n addCouponCodeToCheckout(\n checkoutId: $checkoutId\n couponCode: $couponCode\n ) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{checkoutId:r,couponCode:o}})];case 2:return d=e.sent(),s=d.data,c=d.errors,[2,{data:s.addCouponCodeToCheckout.id,errors:c}];case 3:return u=e.sent(),console.log(u),u&&u.graphQLErrors?[2,{data:void 0,errors:u.graphQLErrors}]:[3,4];case 4:return[2]}}))}))},C}();export{C as IkasCheckoutAPI};
|
|
1
|
+
import{__awaiter as n,__generator as e,__makeTemplateObject as t}from'../../ext/tslib/tslib.es6.js';import i from'../../ext/graphql-tag/src/index.js';import{apollo as a}from"../apollo.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import{IkasCheckout as r}from"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import{IkasOrder as o}from"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasPaymentGateway as d}from"../../models/data/payment-gateway/index.js";import{IkasStorefrontConfig as s}from"../../storefront/index.js";import{IkasCheckoutSettings as c}from"../../models/data/checkout-settings/index.js";var u,l,m,p,g,h,y,I,f,v,C=function(){function C(){}return C.getCheckoutId=function(r){return n(this,void 0,void 0,(function(){var n,o,d,s,c;return e(this,(function(e){switch(e.label){case 0:n=i(u||(u=t(["\n query getCheckoutByCartId($cartId: String!) {\n getCheckoutByCartId(cartId: $cartId) {\n id\n }\n }\n "],["\n query getCheckoutByCartId($cartId: String!) {\n getCheckoutByCartId(cartId: $cartId) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{cartId:r}})];case 2:return o=e.sent(),d=o.data,(s=o.errors)&&s.length&&console.log(s),d?[2,d.getCheckoutByCartId.id]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.getCheckoutById=function(o){return n(this,void 0,void 0,(function(){var n,d,s,c,u;return e(this,(function(e){switch(e.label){case 0:n=i(l||(l=t(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n iso2\n iso3\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "],["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n iso2\n iso3\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{id:o}})];case 2:return d=e.sent(),s=d.data,(c=d.errors)&&c.length&&console.log(c),s?[2,new r(s.getCheckoutById)]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.getOrder=function(r){return n(this,void 0,void 0,(function(){var n,d,s;return e(this,(function(e){switch(e.label){case 0:n=i(m||(m=t(["\n query getOrder($orderId: String!) {\n getOrder(orderId: $orderId) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "],["\n query getOrder($orderId: String!) {\n getOrder(orderId: $orderId) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{orderId:r}})];case 2:return d=e.sent(),(s=d.data)&&s.getOrder?[2,new o(s.getOrder)]:[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},C.saveCheckout=function(r){var o,d,s,c;return n(this,void 0,void 0,(function(){var n,u,l,m,g;return e(this,(function(e){switch(e.label){case 0:n=i(p||(p=t(["\n mutation saveCheckout($input: SaveCheckoutInput!) {\n saveCheckout(input: $input) {\n id\n }\n }\n "],["\n mutation saveCheckout($input: SaveCheckoutInput!) {\n saveCheckout(input: $input) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().mutate({mutation:n,variables:{input:{id:r.id,cartId:r.cartId,shippingMethod:r.shippingMethod,shippingSettingsId:r.shippingSettingsId,shippingZoneRateId:r.shippingZoneRateId,billingAddress:r.billingAddress&&r.billingAddress.addressLine1?{id:r.billingAddress.id,addressLine1:r.billingAddress.addressLine1||"",addressLine2:r.billingAddress.addressLine2||null,city:r.billingAddress.city,country:r.billingAddress.country,state:r.billingAddress.state,district:r.billingAddress.district||null,firstName:r.billingAddress.firstName,lastName:r.billingAddress.lastName,postalCode:r.billingAddress.postalCode,company:r.billingAddress.company||null,phone:r.billingAddress.phone||null,taxNumber:r.billingAddress.taxNumber||null,taxOffice:r.billingAddress.taxOffice||null,isDefault:r.billingAddress.isDefault||!1,identityNumber:r.billingAddress.identityNumber||null}:null,shippingAddress:r.shippingAddress&&r.shippingAddress.addressLine1?{id:r.shippingAddress.id,addressLine1:r.shippingAddress.addressLine1||"",addressLine2:r.shippingAddress.addressLine2||null,city:r.shippingAddress.city,country:r.shippingAddress.country,state:r.shippingAddress.state,district:r.shippingAddress.district||null,firstName:r.shippingAddress.firstName,lastName:r.shippingAddress.lastName,postalCode:r.shippingAddress.postalCode,company:r.shippingAddress.company||null,phone:r.shippingAddress.phone||null,taxNumber:r.shippingAddress.taxNumber||null,taxOffice:r.shippingAddress.taxOffice||null,isDefault:r.shippingAddress.isDefault||!1,identityNumber:r.shippingAddress.identityNumber||null}:null,couponCode:r.couponCode||null,customer:r.customer?{id:null===(o=r.customer)||void 0===o?void 0:o.id,email:null===(d=r.customer)||void 0===d?void 0:d.email,firstName:null===(s=r.customer)||void 0===s?void 0:s.firstName,lastName:null===(c=r.customer)||void 0===c?void 0:c.lastName,notificationsAccepted:r.customer.notificationsAccepted||!1}:null,note:r.note,isGiftPackage:r.isGiftPackage,giftPackageNote:r.giftPackageNote}}})];case 2:return u=e.sent(),l=u.data,m=u.errors,[2,{data:(null==l?void 0:l.saveCheckout.id)||void 0,errors:m}];case 3:return g=e.sent(),console.log(g),g&&g.graphQLErrors?[2,{data:void 0,errors:g.graphQLErrors}]:[3,4];case 4:return[2]}}))}))},C.createSaleTransactionWithCheckout=function(r,o,d){return n(this,void 0,void 0,(function(){var n,s,c,u,l;return e(this,(function(e){switch(e.label){case 0:n=i(g||(g=t(["\n mutation createSaleTransactionWithCheckout(\n $input: CreateSaleTransactionWithCheckoutInput!\n ) {\n createSaleTransactionWithCheckout(input: $input) {\n orderId\n orderNumber\n transactionId\n transactionStatus\n returnSlug\n error {\n code\n declineCode\n message\n }\n }\n }\n "],["\n mutation createSaleTransactionWithCheckout(\n $input: CreateSaleTransactionWithCheckoutInput!\n ) {\n createSaleTransactionWithCheckout(input: $input) {\n orderId\n orderNumber\n transactionId\n transactionStatus\n returnSlug\n error {\n code\n declineCode\n message\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().mutate({mutation:n,variables:{input:{checkoutId:r,paymentGatewayId:o,paymentMethodDetail:d}}})];case 2:return s=e.sent(),c=s.data,(u=s.errors)&&u.length?[2]:c?[2,c.createSaleTransactionWithCheckout]:[3,4];case 3:return l=e.sent(),console.log(l),[3,4];case 4:return[2]}}))}))},C.listPaymentGateway=function(r){return n(this,void 0,void 0,(function(){var n,o,c,u,l;return e(this,(function(e){switch(e.label){case 0:n=i(h||(h=t(["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n supportedCurrencies\n availableCountries\n }\n }\n "],["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n supportedCurrencies\n availableCountries\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{id:r?{in:r}:void 0,locale:s.getCurrentLocale()}})];case 2:return o=e.sent(),c=o.data,(u=o.errors)&&u.length&&console.log(u),c?[2,c.listPaymentGateway.map((function(n){return new d(n)}))]:[3,4];case 3:return l=e.sent(),console.log(l),[3,4];case 4:return[2]}}))}))},C.retrieveInstallmentInfo=function(r){return n(this,void 0,void 0,(function(){var n,o,d,s,c;return e(this,(function(e){switch(e.label){case 0:n=i(y||(y=t(["\n mutation retrieveInstallmentInfo($input: RetrieveInstallmentInfoInput!) {\n retrieveInstallmentInfo(input: $input) {\n bankName\n binNumber\n cardAssociation\n cardFamily\n cardType\n installmentPrices {\n totalPrice\n installmentPrice\n installmentCount\n }\n price\n }\n }\n "],["\n mutation retrieveInstallmentInfo($input: RetrieveInstallmentInfoInput!) {\n retrieveInstallmentInfo(input: $input) {\n bankName\n binNumber\n cardAssociation\n cardFamily\n cardType\n installmentPrices {\n totalPrice\n installmentPrice\n installmentCount\n }\n price\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().mutate({mutation:n,variables:{input:r}})];case 2:return o=e.sent(),d=o.data,(s=o.errors)&&s.length&&console.log(s),d?[2,d.retrieveInstallmentInfo]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.checkStocks=function(r,o){return n(this,void 0,void 0,(function(){var n,d,s,c,u;return e(this,(function(e){switch(e.label){case 0:n=i(I||(I=t(["\n query checkStocks(\n $lines: [CheckStocksLineInput!]!\n $stockLocationIdList: [String!]\n ) {\n checkStocks(lines: $lines, stockLocationIdList: $stockLocationIdList) {\n lines {\n stockCount\n isAvailable\n variantId\n }\n }\n }\n "],["\n query checkStocks(\n $lines: [CheckStocksLineInput!]!\n $stockLocationIdList: [String!]\n ) {\n checkStocks(lines: $lines, stockLocationIdList: $stockLocationIdList) {\n lines {\n stockCount\n isAvailable\n variantId\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{lines:r,stockLocationIdList:o.length?o:null}})];case 2:return d=e.sent(),s=d.data,(c=d.errors)&&c.length&&console.log(c),s?[2,s.checkStocks]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.listCheckoutSettings=function(){return n(this,void 0,void 0,(function(){var n,r,o,d,u;return e(this,(function(e){switch(e.label){case 0:n=i(f||(f=t(["\n query listCheckoutSettings($storefrontId: StringFilterInput!) {\n listCheckoutSettings(storefrontId: $storefrontId) {\n createdAt\n id\n identityNumberRequirement\n isAccountRequired\n isTermsAndConditionsDefaultChecked\n options {\n name\n required\n }\n phoneRequirement\n showCheckoutNote\n showTermsAndConditionsCheckbox\n storefrontId\n updatedAt\n isGiftPackageEnabled\n giftPackagePriceList {\n currencyCode\n price\n }\n postalCodeRequirement\n }\n }\n "],["\n query listCheckoutSettings($storefrontId: StringFilterInput!) {\n listCheckoutSettings(storefrontId: $storefrontId) {\n createdAt\n id\n identityNumberRequirement\n isAccountRequired\n isTermsAndConditionsDefaultChecked\n options {\n name\n required\n }\n phoneRequirement\n showCheckoutNote\n showTermsAndConditionsCheckbox\n storefrontId\n updatedAt\n isGiftPackageEnabled\n giftPackagePriceList {\n currencyCode\n price\n }\n postalCodeRequirement\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{storefrontId:{eq:s.storefrontId}}})];case 2:return r=e.sent(),o=r.data,(d=r.errors)&&d.length&&console.log(d),o?[2,o.listCheckoutSettings.map((function(n){return new c(n)}))]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.addCouponCodeToCheckout=function(r,o){return n(this,void 0,void 0,(function(){var n,d;return e(this,(function(e){switch(e.label){case 0:n=i(v||(v=t(["\n mutation addCouponCodeToCheckout(\n $checkoutId: String!\n $couponCode: String!\n ) {\n addCouponCodeToCheckout(\n checkoutId: $checkoutId\n couponCode: $couponCode\n ) {\n id\n }\n }\n "],["\n mutation addCouponCodeToCheckout(\n $checkoutId: String!\n $couponCode: String!\n ) {\n addCouponCodeToCheckout(\n checkoutId: $checkoutId\n couponCode: $couponCode\n ) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.getClient().query({query:n,variables:{checkoutId:r,couponCode:o}})];case 2:return(d=e.sent().data)&&d.addCouponCodeToCheckout.id?[2,!0]:[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},C}();export{C as IkasCheckoutAPI};
|
|
@@ -3,9 +3,8 @@ declare type SaveContactForm = {
|
|
|
3
3
|
lastName: string;
|
|
4
4
|
email: string;
|
|
5
5
|
message: string;
|
|
6
|
-
referer: string;
|
|
7
6
|
};
|
|
8
7
|
export declare class IkasContactFormAPI {
|
|
9
|
-
static sendContactFormToMerchant(input: SaveContactForm): Promise<boolean>;
|
|
8
|
+
static sendContactFormToMerchant(input: SaveContactForm): Promise<boolean | undefined>;
|
|
10
9
|
}
|
|
11
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as n,__generator as e,__makeTemplateObject as t}from'../../ext/tslib/tslib.es6.js';import a from'../../ext/graphql-tag/src/index.js';import{apollo as s}from"../apollo.js";var r,m=function(){function m(){}return m.sendContactFormToMerchant=function(m){return n(this,void 0,void 0,(function(){var n,o,i,l,c;return e(this,(function(e){switch(e.label){case 0:n=a(r||(r=t(["\n mutation sendContactFormToMerchant(\n $email: String!\n $message: String!\n $firstName: String!\n $lastName: String!\n ) {\n sendContactFormToMerchant(\n email: $email\n message: $message\n firstName: $firstName\n lastName: $lastName\n )\n }\n "],["\n mutation sendContactFormToMerchant(\n $email: String!\n $message: String!\n $firstName: String!\n $lastName: String!\n ) {\n sendContactFormToMerchant(\n email: $email\n message: $message\n firstName: $firstName\n lastName: $lastName\n )\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,s.getClient().mutate({mutation:n,variables:{email:m.email,message:m.message,firstName:m.firstName,lastName:m.lastName}})];case 2:return o=e.sent(),i=o.data,(l=o.errors)&&l.length&&console.log(l),[2,null==i?void 0:i.sendContactFormToMerchant];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},m}();export{m as IkasContactFormAPI};
|