@ikas/storefront-api 4.0.0-alpha.10
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/package.json +42 -0
- package/src/__api/models/AbandonedCartFlow.ts +34 -0
- package/src/__api/models/AbandonedCartFlowCustomerFilter.ts +25 -0
- package/src/__api/models/AddItemToCartInput.ts +29 -0
- package/src/__api/models/AdditionalPrice.ts +24 -0
- package/src/__api/models/ApplicableProductFilterValue.ts +23 -0
- package/src/__api/models/AppliedProduct.ts +15 -0
- package/src/__api/models/AppliedProductInput.ts +15 -0
- package/src/__api/models/AvailableShippingMethod.ts +24 -0
- package/src/__api/models/Blog.ts +55 -0
- package/src/__api/models/BlogCategory.ts +23 -0
- package/src/__api/models/BlogCategoryPaginationResponse.ts +24 -0
- package/src/__api/models/BlogContent.ts +20 -0
- package/src/__api/models/BlogMetadata.ts +32 -0
- package/src/__api/models/BlogMetadataPaginationResponse.ts +24 -0
- package/src/__api/models/BlogMetadataTargetTypeEnumFilter.ts +22 -0
- package/src/__api/models/BlogPaginationResponse.ts +23 -0
- package/src/__api/models/BlogTag.ts +16 -0
- package/src/__api/models/BlogWriter.ts +15 -0
- package/src/__api/models/BooleanFilterInput.ts +13 -0
- package/src/__api/models/BuyX.ts +20 -0
- package/src/__api/models/BuyXThenGetY.ts +22 -0
- package/src/__api/models/Campaign.ts +75 -0
- package/src/__api/models/CampaignDateRangeField.ts +16 -0
- package/src/__api/models/CampaignFilter.ts +16 -0
- package/src/__api/models/CampaignMinMaxRangeField.ts +16 -0
- package/src/__api/models/CampaignOffer.ts +50 -0
- package/src/__api/models/CampaignOfferProduct.ts +49 -0
- package/src/__api/models/CampaignOfferProductTranslation.ts +19 -0
- package/src/__api/models/CampaignOfferTriggerSettings.ts +19 -0
- package/src/__api/models/Cart.ts +61 -0
- package/src/__api/models/CartCampaignOffer.ts +31 -0
- package/src/__api/models/CartLineItemInput.ts +20 -0
- package/src/__api/models/CartLineOptionInput.ts +17 -0
- package/src/__api/models/CartLineVariantInput.ts +15 -0
- package/src/__api/models/CartStorefrontRouting.ts +28 -0
- package/src/__api/models/CartStorefrontRoutingDynamicCurrencySettings.ts +19 -0
- package/src/__api/models/CartV2.ts +159 -0
- package/src/__api/models/CartV2CampaignOffer.ts +36 -0
- package/src/__api/models/Category.ts +58 -0
- package/src/__api/models/CategoryCondition.ts +17 -0
- package/src/__api/models/CategoryFilterInput.ts +15 -0
- package/src/__api/models/CategoryPaginationResponse.ts +24 -0
- package/src/__api/models/CategoryPathFilterInput.ts +14 -0
- package/src/__api/models/CategoryPathItem.ts +33 -0
- package/src/__api/models/CategoryTranslation.ts +17 -0
- package/src/__api/models/CheckStocksLineInput.ts +17 -0
- package/src/__api/models/CheckStocksLineResponse.ts +18 -0
- package/src/__api/models/CheckStocksResponse.ts +16 -0
- package/src/__api/models/Checkout.ts +102 -0
- package/src/__api/models/CheckoutCustomer.ts +39 -0
- package/src/__api/models/CheckoutCustomerInput.ts +25 -0
- package/src/__api/models/CheckoutOption.ts +15 -0
- package/src/__api/models/CheckoutSettings.ts +62 -0
- package/src/__api/models/CheckoutSettingsPrice.ts +15 -0
- package/src/__api/models/City.ts +29 -0
- package/src/__api/models/Country.ts +41 -0
- package/src/__api/models/CreateCustomerEmailSubscriptionInput.ts +22 -0
- package/src/__api/models/CreateCustomerReviewInput.ts +38 -0
- package/src/__api/models/CreateSaleTransactionMasterPassPaymentMethodDetail.ts +19 -0
- package/src/__api/models/CreateSaleTransactionWithCartInput.ts +29 -0
- package/src/__api/models/CreateSaleTransactionWithCheckoutInput.ts +29 -0
- package/src/__api/models/CreateStripePaymentIntentResponse.ts +21 -0
- package/src/__api/models/CurrencyRate.ts +23 -0
- package/src/__api/models/CurrencyRateData.ts +15 -0
- package/src/__api/models/Customer.ts +81 -0
- package/src/__api/models/CustomerAddress.ts +64 -0
- package/src/__api/models/CustomerAddressCity.ts +17 -0
- package/src/__api/models/CustomerAddressCityInput.ts +18 -0
- package/src/__api/models/CustomerAddressCountry.ts +22 -0
- package/src/__api/models/CustomerAddressCountryInput.ts +23 -0
- package/src/__api/models/CustomerAddressDistrict.ts +18 -0
- package/src/__api/models/CustomerAddressDistrictInput.ts +19 -0
- package/src/__api/models/CustomerAddressState.ts +17 -0
- package/src/__api/models/CustomerAddressStateInput.ts +19 -0
- package/src/__api/models/CustomerAttribute.ts +36 -0
- package/src/__api/models/CustomerAttributeOption.ts +17 -0
- package/src/__api/models/CustomerAttributeOptionTranslation.ts +17 -0
- package/src/__api/models/CustomerAttributeSalesChannel.ts +28 -0
- package/src/__api/models/CustomerAttributeTranslation.ts +24 -0
- package/src/__api/models/CustomerAttributeValue.ts +18 -0
- package/src/__api/models/CustomerAttributeValueInput.ts +19 -0
- package/src/__api/models/CustomerCheckResponse.ts +13 -0
- package/src/__api/models/CustomerFavoriteProduct.ts +19 -0
- package/src/__api/models/CustomerLoginResponse.ts +18 -0
- package/src/__api/models/CustomerRefreshTokenResponse.ts +17 -0
- package/src/__api/models/CustomerReview.ts +43 -0
- package/src/__api/models/CustomerReviewSFPaginationResponse.ts +26 -0
- package/src/__api/models/CustomerReviewSummary.ts +25 -0
- package/src/__api/models/CustomerReviewSummaryPaginationResponse.ts +26 -0
- package/src/__api/models/CustomerReviewSummaryStar.ts +17 -0
- package/src/__api/models/DateFilterInput.ts +27 -0
- package/src/__api/models/District.ts +29 -0
- package/src/__api/models/FixedDiscount.ts +28 -0
- package/src/__api/models/GetAvailableStockLocation.ts +25 -0
- package/src/__api/models/GetAvailableStockLocationAddress.ts +36 -0
- package/src/__api/models/GetAvailableStockLocationAddressCity.ts +19 -0
- package/src/__api/models/GetAvailableStockLocationsResponse.ts +18 -0
- package/src/__api/models/GetOrderLineFile.ts +13 -0
- package/src/__api/models/GetProductCampaignsInput.ts +18 -0
- package/src/__api/models/GetProductCampaignsResponse.ts +20 -0
- package/src/__api/models/GetProductOptionFileUrl.ts +18 -0
- package/src/__api/models/GetVariantStockLocation.ts +21 -0
- package/src/__api/models/GetVariantStockLocationListResponse.ts +18 -0
- package/src/__api/models/GetY.ts +26 -0
- package/src/__api/models/HTMLMetaData.ts +44 -0
- package/src/__api/models/HTMLMetaDataOverride.ts +21 -0
- package/src/__api/models/HTMLMetaDataTargetTypeEnumFilter.ts +22 -0
- package/src/__api/models/HTMLMetaDataTranslation.ts +18 -0
- package/src/__api/models/Invoice.ts +26 -0
- package/src/__api/models/ListCustomerReviewInput.ts +14 -0
- package/src/__api/models/LocationTranslations.ts +15 -0
- package/src/__api/models/MasterPassTokenResponse.ts +18 -0
- package/src/__api/models/MerchantAddress.ts +48 -0
- package/src/__api/models/MerchantAddressCity.ts +17 -0
- package/src/__api/models/MerchantAddressCountry.ts +18 -0
- package/src/__api/models/MerchantAddressDistrict.ts +18 -0
- package/src/__api/models/MerchantAddressState.ts +17 -0
- package/src/__api/models/MerchantSettings.ts +32 -0
- package/src/__api/models/MerchantSettingsCurrencyFormat.ts +27 -0
- package/src/__api/models/OrderAddress.ts +53 -0
- package/src/__api/models/OrderAddressCity.ts +17 -0
- package/src/__api/models/OrderAddressCityInput.ts +17 -0
- package/src/__api/models/OrderAddressCountry.ts +21 -0
- package/src/__api/models/OrderAddressCountryInput.ts +22 -0
- package/src/__api/models/OrderAddressDistrict.ts +17 -0
- package/src/__api/models/OrderAddressDistrictInput.ts +19 -0
- package/src/__api/models/OrderAddressInput.ts +53 -0
- package/src/__api/models/OrderAddressState.ts +17 -0
- package/src/__api/models/OrderAddressStateInput.ts +18 -0
- package/src/__api/models/OrderAdjustment.ts +35 -0
- package/src/__api/models/OrderAdjustmentAppliedOrderLine.ts +24 -0
- package/src/__api/models/OrderAdjustmentInput.ts +26 -0
- package/src/__api/models/OrderCurrencyRate.ts +17 -0
- package/src/__api/models/OrderCustomer.ts +34 -0
- package/src/__api/models/OrderGiftPackageLine.ts +18 -0
- package/src/__api/models/OrderLineDiscount.ts +28 -0
- package/src/__api/models/OrderLineItem.ts +59 -0
- package/src/__api/models/OrderLineOption.ts +25 -0
- package/src/__api/models/OrderLineOptionValue.ts +18 -0
- package/src/__api/models/OrderLineVariant.ts +56 -0
- package/src/__api/models/OrderLineVariantBrand.ts +15 -0
- package/src/__api/models/OrderLineVariantCategory.ts +21 -0
- package/src/__api/models/OrderLineVariantCategoryPath.ts +17 -0
- package/src/__api/models/OrderLineVariantPrice.ts +27 -0
- package/src/__api/models/OrderLineVariantVariantValues.ts +23 -0
- package/src/__api/models/OrderPackage.ts +33 -0
- package/src/__api/models/OrderPaymentMethod.ts +22 -0
- package/src/__api/models/OrderRefundOrderLineInput.ts +17 -0
- package/src/__api/models/OrderRefundRequestInput.ts +21 -0
- package/src/__api/models/OrderRefundSettings.ts +28 -0
- package/src/__api/models/OrderShippingLine.ts +34 -0
- package/src/__api/models/OrderStorefrontRouting.ts +29 -0
- package/src/__api/models/OrderStorefrontRoutingDynamicCurrencySettings.ts +19 -0
- package/src/__api/models/OrderTaxLine.ts +15 -0
- package/src/__api/models/PaginationInput.ts +17 -0
- package/src/__api/models/PaymentGateway.ts +61 -0
- package/src/__api/models/PaymentGatewayPaymentMethod.ts +17 -0
- package/src/__api/models/PaymentGatewaySettings.ts +21 -0
- package/src/__api/models/PaymentGatewayTranslation.ts +19 -0
- package/src/__api/models/PaymentMethodDetailInput.ts +26 -0
- package/src/__api/models/Product.ts +69 -0
- package/src/__api/models/ProductAttribute.ts +36 -0
- package/src/__api/models/ProductAttributeOption.ts +17 -0
- package/src/__api/models/ProductAttributeOptionTranslation.ts +17 -0
- package/src/__api/models/ProductAttributeTableCellData.ts +17 -0
- package/src/__api/models/ProductAttributeTableTemplate.ts +22 -0
- package/src/__api/models/ProductAttributeTranslation.ts +24 -0
- package/src/__api/models/ProductAttributeValue.ts +19 -0
- package/src/__api/models/ProductBackInStockRemind.ts +25 -0
- package/src/__api/models/ProductBackInStockRemindInput.ts +19 -0
- package/src/__api/models/ProductBrand.ts +33 -0
- package/src/__api/models/ProductBrandPaginationResponse.ts +24 -0
- package/src/__api/models/ProductBrandTranslation.ts +18 -0
- package/src/__api/models/ProductFacetCount.ts +18 -0
- package/src/__api/models/ProductFacetCountValue.ts +16 -0
- package/src/__api/models/ProductFilterData.ts +21 -0
- package/src/__api/models/ProductFilterDataFilter.ts +49 -0
- package/src/__api/models/ProductFilterSettings.ts +25 -0
- package/src/__api/models/ProductImage.ts +20 -0
- package/src/__api/models/ProductItem.ts +18 -0
- package/src/__api/models/ProductItemInput.ts +18 -0
- package/src/__api/models/ProductLastViewed.ts +21 -0
- package/src/__api/models/ProductLastViewedInput.ts +22 -0
- package/src/__api/models/ProductOption.ts +62 -0
- package/src/__api/models/ProductOptionDateSettings.ts +29 -0
- package/src/__api/models/ProductOptionFileSettings.ts +25 -0
- package/src/__api/models/ProductOptionSelectSettings.ts +31 -0
- package/src/__api/models/ProductOptionSelectValue.ts +33 -0
- package/src/__api/models/ProductOptionSelectValueOtherPrice.ts +17 -0
- package/src/__api/models/ProductOptionSelectValueTranslations.ts +17 -0
- package/src/__api/models/ProductOptionSet.ts +26 -0
- package/src/__api/models/ProductOptionSetTranslations.ts +20 -0
- package/src/__api/models/ProductOptionTextSettings.ts +17 -0
- package/src/__api/models/ProductOptionTranslations.ts +24 -0
- package/src/__api/models/ProductPaginationResponse.ts +24 -0
- package/src/__api/models/ProductPrice.ts +27 -0
- package/src/__api/models/ProductSearchResponse.ts +31 -0
- package/src/__api/models/ProductStockLocation.ts +22 -0
- package/src/__api/models/ProductTagTranslation.ts +17 -0
- package/src/__api/models/ProductTranslation.ts +17 -0
- package/src/__api/models/ProductVariantType.ts +17 -0
- package/src/__api/models/Raffle.ts +49 -0
- package/src/__api/models/RaffleDateRangeField.ts +15 -0
- package/src/__api/models/RaffleMetadata.ts +32 -0
- package/src/__api/models/RaffleMetadataTargetTypeEnumFilter.ts +22 -0
- package/src/__api/models/RafflePaginationResponse.ts +23 -0
- package/src/__api/models/RaffleParticipants.ts +52 -0
- package/src/__api/models/RaffleParticipantsInput.ts +32 -0
- package/src/__api/models/RaffleParticipantsUpdateInput.ts +24 -0
- package/src/__api/models/RaffleVariantInformation.ts +16 -0
- package/src/__api/models/RetrieveInstallmentInfoInput.ts +19 -0
- package/src/__api/models/RetrieveInstallmentInfoResponse.ts +36 -0
- package/src/__api/models/SaveCartInput.ts +50 -0
- package/src/__api/models/SaveCheckoutInput.ts +56 -0
- package/src/__api/models/SaveItemToCartInput.ts +35 -0
- package/src/__api/models/SaveMyCustomerAddressInput.ts +63 -0
- package/src/__api/models/SaveMyCustomerInput.ts +30 -0
- package/src/__api/models/SearchCategory.ts +27 -0
- package/src/__api/models/SearchCategoryPath.ts +22 -0
- package/src/__api/models/SearchDynamicCurrencySettings.ts +17 -0
- package/src/__api/models/SearchHTMLMetaData.ts +36 -0
- package/src/__api/models/SearchHTMLMetaDataOverride.ts +23 -0
- package/src/__api/models/SearchInput.ts +64 -0
- package/src/__api/models/SearchInputFacetListInput.ts +20 -0
- package/src/__api/models/SearchInputFilterListInput.ts +27 -0
- package/src/__api/models/SearchInputOrderByInput.ts +17 -0
- package/src/__api/models/SearchProduct.ts +72 -0
- package/src/__api/models/SearchProductAttribute.ts +28 -0
- package/src/__api/models/SearchProductAttributeOption.ts +17 -0
- package/src/__api/models/SearchProductAttributeTableCellData.ts +17 -0
- package/src/__api/models/SearchProductAttributeTableTemplate.ts +22 -0
- package/src/__api/models/SearchProductAttributeValue.ts +27 -0
- package/src/__api/models/SearchProductBrand.ts +22 -0
- package/src/__api/models/SearchProductImage.ts +21 -0
- package/src/__api/models/SearchProductPrice.ts +27 -0
- package/src/__api/models/SearchProductStockLocation.ts +17 -0
- package/src/__api/models/SearchProductTag.ts +20 -0
- package/src/__api/models/SearchProductVariantType.ts +21 -0
- package/src/__api/models/SearchVariant.ts +58 -0
- package/src/__api/models/SearchVariantType.ts +27 -0
- package/src/__api/models/SearchVariantValue.ts +19 -0
- package/src/__api/models/SearchVariationValueRelation.ts +17 -0
- package/src/__api/models/SocialLoginSettings.ts +18 -0
- package/src/__api/models/State.ts +20 -0
- package/src/__api/models/StockLocation.ts +36 -0
- package/src/__api/models/StockLocationAddress.ts +35 -0
- package/src/__api/models/StockLocationAddressCity.ts +18 -0
- package/src/__api/models/StockLocationAddressCountry.ts +19 -0
- package/src/__api/models/StockLocationAddressDistrict.ts +19 -0
- package/src/__api/models/StockLocationAddressState.ts +19 -0
- package/src/__api/models/Storefront.ts +66 -0
- package/src/__api/models/StorefrontDomain.ts +25 -0
- package/src/__api/models/StorefrontDynamicCurrencySettings.ts +17 -0
- package/src/__api/models/StorefrontLocalization.ts +21 -0
- package/src/__api/models/StorefrontOrder.ts +116 -0
- package/src/__api/models/StorefrontRouting.ts +29 -0
- package/src/__api/models/StorefrontTheme.ts +25 -0
- package/src/__api/models/StorefrontTransaction.ts +53 -0
- package/src/__api/models/StringFilterInput.ts +21 -0
- package/src/__api/models/Town.ts +21 -0
- package/src/__api/models/TrackingInfo.ts +24 -0
- package/src/__api/models/TransactionError.ts +17 -0
- package/src/__api/models/TransactionInstallmentPrice.ts +36 -0
- package/src/__api/models/TransactionPaymentMethodDetail.ts +39 -0
- package/src/__api/models/TransactionResponse.ts +26 -0
- package/src/__api/models/UpdateCartCampaignOfferInput.ts +25 -0
- package/src/__api/models/Variant.ts +58 -0
- package/src/__api/models/VariantStock.ts +15 -0
- package/src/__api/models/VariantType.ts +29 -0
- package/src/__api/models/VariantTypeTranslation.ts +21 -0
- package/src/__api/models/VariantValue.ts +20 -0
- package/src/__api/models/VariantValueRelation.ts +15 -0
- package/src/__api/models/VariantValueTranslation.ts +16 -0
- package/src/__api/models/_base.ts +26 -0
- package/src/__api/mutations/activateCustomer.ts +38 -0
- package/src/__api/mutations/addCouponCodeToCheckout.ts +259 -0
- package/src/__api/mutations/addItemToCart.ts +284 -0
- package/src/__api/mutations/createCustomerEmailSubscription.ts +111 -0
- package/src/__api/mutations/createCustomerReview.ts +66 -0
- package/src/__api/mutations/createOrderRefundRequest.ts +240 -0
- package/src/__api/mutations/createSaleTransactionWithCart.ts +62 -0
- package/src/__api/mutations/createSaleTransactionWithCheckout.ts +62 -0
- package/src/__api/mutations/createStripePaymentIntent.ts +57 -0
- package/src/__api/mutations/customerForgotPassword.ts +41 -0
- package/src/__api/mutations/customerLogin.ts +113 -0
- package/src/__api/mutations/customerRecoverPassword.ts +44 -0
- package/src/__api/mutations/customerRefreshToken.ts +52 -0
- package/src/__api/mutations/deleteRaffleParticipantsList.ts +38 -0
- package/src/__api/mutations/getOrderLineFile.ts +39 -0
- package/src/__api/mutations/registerCustomer.ts +131 -0
- package/src/__api/mutations/retrieveInstallmentInfo.ts +65 -0
- package/src/__api/mutations/saveCart.ts +284 -0
- package/src/__api/mutations/saveCartCouponCode.ts +287 -0
- package/src/__api/mutations/saveCheckout.ts +256 -0
- package/src/__api/mutations/saveFavoriteProduct.ts +41 -0
- package/src/__api/mutations/saveItemToCart.ts +136 -0
- package/src/__api/mutations/saveLastViewedProducts.ts +62 -0
- package/src/__api/mutations/saveMyCustomer.ts +108 -0
- package/src/__api/mutations/saveProductBackInStockRemind.ts +63 -0
- package/src/__api/mutations/saveRaffleParticipant.ts +69 -0
- package/src/__api/mutations/sendContactFormToMerchant.ts +53 -0
- package/src/__api/mutations/updateCartCampaignOffer.ts +284 -0
- package/src/__api/mutations/updateRaffleParticipant.ts +72 -0
- package/src/__api/queries/checkCustomerEmail.ts +54 -0
- package/src/__api/queries/checkStocks.ts +53 -0
- package/src/__api/queries/customerSocialLogin.ts +113 -0
- package/src/__api/queries/getAvailableShippingCountries.ts +41 -0
- package/src/__api/queries/getAvailableStockLocations.ts +75 -0
- package/src/__api/queries/getCart.ts +142 -0
- package/src/__api/queries/getCartById.ts +287 -0
- package/src/__api/queries/getCheckoutByCartId.ts +256 -0
- package/src/__api/queries/getCheckoutById.ts +256 -0
- package/src/__api/queries/getCurrencyRate.ts +56 -0
- package/src/__api/queries/getCustomerOrders.ts +237 -0
- package/src/__api/queries/getLastViewedProducts.ts +62 -0
- package/src/__api/queries/getMasterPassRequestToken.ts +62 -0
- package/src/__api/queries/getMyCountry.ts +26 -0
- package/src/__api/queries/getMyCustomer.ts +95 -0
- package/src/__api/queries/getOrder.ts +237 -0
- package/src/__api/queries/getOrderByEmail.ts +240 -0
- package/src/__api/queries/getProductCampaigns.ts +92 -0
- package/src/__api/queries/getProductFilterData.ts +211 -0
- package/src/__api/queries/getProductOptionFileUrl.ts +59 -0
- package/src/__api/queries/getRaffleParticipants.ts +59 -0
- package/src/__api/queries/getRafflesByCustomerId.ts +74 -0
- package/src/__api/queries/getRelatedProducts.ts +60 -0
- package/src/__api/queries/getStorefront.ts +103 -0
- package/src/__api/queries/getStorefrontSettings.ts +26 -0
- package/src/__api/queries/getVariantStockLocations.ts +74 -0
- package/src/__api/queries/isFavoriteProduct.ts +38 -0
- package/src/__api/queries/listBlog.ts +136 -0
- package/src/__api/queries/listBlogCategory.ts +92 -0
- package/src/__api/queries/listBlogMetadata.ts +90 -0
- package/src/__api/queries/listCampaignOffer.ts +76 -0
- package/src/__api/queries/listCategory.ts +151 -0
- package/src/__api/queries/listCheckoutSettings.ts +75 -0
- package/src/__api/queries/listCity.ts +74 -0
- package/src/__api/queries/listCountry.ts +80 -0
- package/src/__api/queries/listCustomerAttribute.ts +62 -0
- package/src/__api/queries/listCustomerReviewSummary.ts +71 -0
- package/src/__api/queries/listCustomerReviews.ts +90 -0
- package/src/__api/queries/listDistrict.ts +77 -0
- package/src/__api/queries/listFavoriteProducts.ts +44 -0
- package/src/__api/queries/listHTMLMetaData.ts +88 -0
- package/src/__api/queries/listMerchantSettings.ts +90 -0
- package/src/__api/queries/listOrderRefundSettings.ts +73 -0
- package/src/__api/queries/listOrderTransactions.ts +89 -0
- package/src/__api/queries/listPaymentGateway.ts +85 -0
- package/src/__api/queries/listProduct.ts +156 -0
- package/src/__api/queries/listProductAttribute.ts +81 -0
- package/src/__api/queries/listProductBackInStockRemind.ts +79 -0
- package/src/__api/queries/listProductBrand.ts +110 -0
- package/src/__api/queries/listProductOptionSet.ts +105 -0
- package/src/__api/queries/listProductStockLocation.ts +62 -0
- package/src/__api/queries/listRaffle.ts +108 -0
- package/src/__api/queries/listRaffleMetadata.ts +83 -0
- package/src/__api/queries/listState.ts +67 -0
- package/src/__api/queries/listStockLocation.ts +76 -0
- package/src/__api/queries/listTown.ts +67 -0
- package/src/__api/queries/listVariantType.ts +74 -0
- package/src/__api/queries/searchProducts.ts +171 -0
- package/src/__api/types/index.ts +3047 -0
- package/src/api/blog/index.ts +70 -0
- package/src/api/brand/index.ts +27 -0
- package/src/api/cart/index.ts +113 -0
- package/src/api/category/index.ts +25 -0
- package/src/api/checkout/index.ts +121 -0
- package/src/api/customer/index.ts +380 -0
- package/src/api/file-upload/index.ts +38 -0
- package/src/api/html-meta-data/index.ts +25 -0
- package/src/api/location/index.ts +64 -0
- package/src/api/masterpass/index.ts +12 -0
- package/src/api/merchant/index.ts +24 -0
- package/src/api/product/index.ts +354 -0
- package/src/api/raffle/index.ts +80 -0
- package/src/api/storefront/index.ts +30 -0
- package/src/index.ts +68 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
import {
|
|
4
|
+
CancelledReasonEnum,
|
|
5
|
+
OrderPackageStatusEnum,
|
|
6
|
+
OrderPaymentStatusEnum,
|
|
7
|
+
ShippingMethodEnum,
|
|
8
|
+
OrderStatusEnum,
|
|
9
|
+
} from "../types";
|
|
10
|
+
import { OrderAddressData } from "./OrderAddress";
|
|
11
|
+
import { OrderCurrencyRateData } from "./OrderCurrencyRate";
|
|
12
|
+
import { OrderCustomerData } from "./OrderCustomer";
|
|
13
|
+
import { OrderGiftPackageLineData } from "./OrderGiftPackageLine";
|
|
14
|
+
import { InvoiceData } from "./Invoice";
|
|
15
|
+
import { OrderAdjustmentData } from "./OrderAdjustment";
|
|
16
|
+
import { OrderLineItemData } from "./OrderLineItem";
|
|
17
|
+
import { OrderPackageData } from "./OrderPackage";
|
|
18
|
+
import { OrderPaymentMethodData } from "./OrderPaymentMethod";
|
|
19
|
+
import { OrderShippingLineData } from "./OrderShippingLine";
|
|
20
|
+
import { OrderTaxLineData } from "./OrderTaxLine";
|
|
21
|
+
|
|
22
|
+
export class StorefrontOrderData extends BaseModelData {
|
|
23
|
+
billingAddress: OrderAddressData | null;
|
|
24
|
+
cancelReason: CancelledReasonEnum | null;
|
|
25
|
+
cancelledAt: any | null;
|
|
26
|
+
currencyCode: string;
|
|
27
|
+
currencyRates: OrderCurrencyRateData[];
|
|
28
|
+
customer: OrderCustomerData | null;
|
|
29
|
+
customerId: string | null;
|
|
30
|
+
giftPackageLines: OrderGiftPackageLineData[] | null;
|
|
31
|
+
giftPackageNote: string | null;
|
|
32
|
+
invoices: InvoiceData[] | null;
|
|
33
|
+
isGiftPackage: boolean | null;
|
|
34
|
+
merchantId: string;
|
|
35
|
+
note: string | null;
|
|
36
|
+
orderAdjustments: OrderAdjustmentData[] | null;
|
|
37
|
+
orderLineItems: OrderLineItemData[];
|
|
38
|
+
orderNumber: string | null;
|
|
39
|
+
orderPackageStatus: OrderPackageStatusEnum | null;
|
|
40
|
+
orderPackages: OrderPackageData[] | null;
|
|
41
|
+
orderPaymentStatus: OrderPaymentStatusEnum | null;
|
|
42
|
+
orderTagIds: string[] | null;
|
|
43
|
+
orderedAt: any | null;
|
|
44
|
+
paymentMethods: OrderPaymentMethodData[] | null;
|
|
45
|
+
shippingAddress: OrderAddressData | null;
|
|
46
|
+
shippingLines: OrderShippingLineData[] | null;
|
|
47
|
+
shippingMethod: ShippingMethodEnum;
|
|
48
|
+
status: OrderStatusEnum;
|
|
49
|
+
taxLines: OrderTaxLineData[] | null;
|
|
50
|
+
totalFinalPrice: number;
|
|
51
|
+
totalPrice: number;
|
|
52
|
+
|
|
53
|
+
constructor(data: Partial<StorefrontOrderData> = {}) {
|
|
54
|
+
super(data);
|
|
55
|
+
|
|
56
|
+
this.billingAddress = data.billingAddress
|
|
57
|
+
? new OrderAddressData(data.billingAddress)
|
|
58
|
+
: null;
|
|
59
|
+
this.cancelReason = data.cancelReason || null;
|
|
60
|
+
this.cancelledAt = data.cancelledAt || null;
|
|
61
|
+
this.currencyCode = data.currencyCode || "";
|
|
62
|
+
this.currencyRates = data.currencyRates
|
|
63
|
+
? data.currencyRates.map((o) => new OrderCurrencyRateData(o))
|
|
64
|
+
: [];
|
|
65
|
+
this.customer = data.customer ? new OrderCustomerData(data.customer) : null;
|
|
66
|
+
this.customerId = data.customerId || null;
|
|
67
|
+
this.giftPackageLines = data.giftPackageLines
|
|
68
|
+
? data.giftPackageLines.map((o) => new OrderGiftPackageLineData(o))
|
|
69
|
+
: null;
|
|
70
|
+
this.giftPackageNote = data.giftPackageNote || null;
|
|
71
|
+
this.invoices = data.invoices
|
|
72
|
+
? data.invoices.map((i) => new InvoiceData(i))
|
|
73
|
+
: null;
|
|
74
|
+
this.isGiftPackage =
|
|
75
|
+
data.isGiftPackage !== undefined && data.isGiftPackage !== null
|
|
76
|
+
? data.isGiftPackage
|
|
77
|
+
: null;
|
|
78
|
+
this.merchantId = data.merchantId || "";
|
|
79
|
+
this.note = data.note || null;
|
|
80
|
+
this.orderAdjustments = data.orderAdjustments
|
|
81
|
+
? data.orderAdjustments.map((o) => new OrderAdjustmentData(o))
|
|
82
|
+
: null;
|
|
83
|
+
this.orderLineItems = data.orderLineItems
|
|
84
|
+
? data.orderLineItems.map((o) => new OrderLineItemData(o))
|
|
85
|
+
: [];
|
|
86
|
+
this.orderNumber = data.orderNumber || null;
|
|
87
|
+
this.orderPackageStatus = data.orderPackageStatus || null;
|
|
88
|
+
this.orderPackages = data.orderPackages
|
|
89
|
+
? data.orderPackages.map((o) => new OrderPackageData(o))
|
|
90
|
+
: null;
|
|
91
|
+
this.orderPaymentStatus = data.orderPaymentStatus || null;
|
|
92
|
+
this.orderTagIds = data.orderTagIds || null;
|
|
93
|
+
this.orderedAt = data.orderedAt || null;
|
|
94
|
+
this.paymentMethods = data.paymentMethods
|
|
95
|
+
? data.paymentMethods.map((o) => new OrderPaymentMethodData(o))
|
|
96
|
+
: null;
|
|
97
|
+
this.shippingAddress = data.shippingAddress
|
|
98
|
+
? new OrderAddressData(data.shippingAddress)
|
|
99
|
+
: null;
|
|
100
|
+
this.shippingLines = data.shippingLines
|
|
101
|
+
? data.shippingLines.map((o) => new OrderShippingLineData(o))
|
|
102
|
+
: null;
|
|
103
|
+
this.shippingMethod =
|
|
104
|
+
data.shippingMethod || ShippingMethodEnum.CLICK_AND_COLLECT;
|
|
105
|
+
this.status = data.status || OrderStatusEnum.CANCELLED;
|
|
106
|
+
this.taxLines = data.taxLines
|
|
107
|
+
? data.taxLines.map((o) => new OrderTaxLineData(o))
|
|
108
|
+
: null;
|
|
109
|
+
this.totalFinalPrice = data.totalFinalPrice || 0;
|
|
110
|
+
this.totalPrice = data.totalPrice || 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export class StorefrontOrder extends StorefrontOrderData {}
|
|
115
|
+
export type PartialStorefrontOrder = Partial<StorefrontOrder>;
|
|
116
|
+
export type ReadOnlyStorefrontOrder = DeepReadonly<StorefrontOrder>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
import { StorefrontDynamicCurrencySettingsData } from "./StorefrontDynamicCurrencySettings";
|
|
4
|
+
|
|
5
|
+
export class StorefrontRoutingData extends BaseModelData {
|
|
6
|
+
countryCodes: string[] | null;
|
|
7
|
+
domain: string | null;
|
|
8
|
+
dynamicCurrencySettings: StorefrontDynamicCurrencySettingsData | null;
|
|
9
|
+
locale: string;
|
|
10
|
+
path: string | null;
|
|
11
|
+
priceListId: string | null;
|
|
12
|
+
|
|
13
|
+
constructor(data: Partial<StorefrontRoutingData> = {}) {
|
|
14
|
+
super(data);
|
|
15
|
+
|
|
16
|
+
this.countryCodes = data.countryCodes || null;
|
|
17
|
+
this.domain = data.domain || null;
|
|
18
|
+
this.dynamicCurrencySettings = data.dynamicCurrencySettings
|
|
19
|
+
? new StorefrontDynamicCurrencySettingsData(data.dynamicCurrencySettings)
|
|
20
|
+
: null;
|
|
21
|
+
this.locale = data.locale || "";
|
|
22
|
+
this.path = data.path || null;
|
|
23
|
+
this.priceListId = data.priceListId || null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class StorefrontRouting extends StorefrontRoutingData {}
|
|
28
|
+
export type PartialStorefrontRouting = Partial<StorefrontRouting>;
|
|
29
|
+
export type ReadOnlyStorefrontRouting = DeepReadonly<StorefrontRouting>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
import { StorefrontThemeStatus } from "../types";
|
|
4
|
+
|
|
5
|
+
export class StorefrontThemeData extends BaseModelData {
|
|
6
|
+
isMainTheme: boolean;
|
|
7
|
+
name: string;
|
|
8
|
+
status: StorefrontThemeStatus;
|
|
9
|
+
themeId: string;
|
|
10
|
+
themeVersionId: string;
|
|
11
|
+
|
|
12
|
+
constructor(data: Partial<StorefrontThemeData> = {}) {
|
|
13
|
+
super(data);
|
|
14
|
+
|
|
15
|
+
this.isMainTheme = data.isMainTheme || false;
|
|
16
|
+
this.name = data.name || "";
|
|
17
|
+
this.status = data.status || StorefrontThemeStatus.FAILED;
|
|
18
|
+
this.themeId = data.themeId || "";
|
|
19
|
+
this.themeVersionId = data.themeVersionId || "";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class StorefrontTheme extends StorefrontThemeData {}
|
|
24
|
+
export type PartialStorefrontTheme = Partial<StorefrontTheme>;
|
|
25
|
+
export type ReadOnlyStorefrontTheme = DeepReadonly<StorefrontTheme>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
import {
|
|
4
|
+
PaymentMethodEnum,
|
|
5
|
+
TransactionStatusEnum,
|
|
6
|
+
TransactionTypeEnum,
|
|
7
|
+
} from "../types";
|
|
8
|
+
import { TransactionErrorData } from "./TransactionError";
|
|
9
|
+
import { TransactionPaymentMethodDetailData } from "./TransactionPaymentMethodDetail";
|
|
10
|
+
|
|
11
|
+
export class StorefrontTransactionData extends BaseModelData {
|
|
12
|
+
amount: number;
|
|
13
|
+
checkoutId: string | null;
|
|
14
|
+
currencyCode: string;
|
|
15
|
+
customerId: string | null;
|
|
16
|
+
error: TransactionErrorData | null;
|
|
17
|
+
orderId: string | null;
|
|
18
|
+
paymentGatewayCode: string | null;
|
|
19
|
+
paymentGatewayId: string;
|
|
20
|
+
paymentGatewayName: string;
|
|
21
|
+
paymentMethod: PaymentMethodEnum | null;
|
|
22
|
+
paymentMethodDetail: TransactionPaymentMethodDetailData | null;
|
|
23
|
+
processedAt: any | null;
|
|
24
|
+
refundReason: string | null;
|
|
25
|
+
status: TransactionStatusEnum;
|
|
26
|
+
type: TransactionTypeEnum;
|
|
27
|
+
|
|
28
|
+
constructor(data: Partial<StorefrontTransactionData> = {}) {
|
|
29
|
+
super(data);
|
|
30
|
+
|
|
31
|
+
this.amount = data.amount || 0;
|
|
32
|
+
this.checkoutId = data.checkoutId || null;
|
|
33
|
+
this.currencyCode = data.currencyCode || "";
|
|
34
|
+
this.customerId = data.customerId || null;
|
|
35
|
+
this.error = data.error ? new TransactionErrorData(data.error) : null;
|
|
36
|
+
this.orderId = data.orderId || null;
|
|
37
|
+
this.paymentGatewayCode = data.paymentGatewayCode || null;
|
|
38
|
+
this.paymentGatewayId = data.paymentGatewayId || "";
|
|
39
|
+
this.paymentGatewayName = data.paymentGatewayName || "";
|
|
40
|
+
this.paymentMethod = data.paymentMethod || null;
|
|
41
|
+
this.paymentMethodDetail = data.paymentMethodDetail
|
|
42
|
+
? new TransactionPaymentMethodDetailData(data.paymentMethodDetail)
|
|
43
|
+
: null;
|
|
44
|
+
this.processedAt = data.processedAt || null;
|
|
45
|
+
this.refundReason = data.refundReason || null;
|
|
46
|
+
this.status = data.status || TransactionStatusEnum.AUTHORIZED;
|
|
47
|
+
this.type = data.type || TransactionTypeEnum.REFUND;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export class StorefrontTransaction extends StorefrontTransactionData {}
|
|
52
|
+
export type PartialStorefrontTransaction = Partial<StorefrontTransaction>;
|
|
53
|
+
export type ReadOnlyStorefrontTransaction = DeepReadonly<StorefrontTransaction>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
|
|
3
|
+
export class StringFilterInputData {
|
|
4
|
+
eq: string | null;
|
|
5
|
+
in: string[] | null;
|
|
6
|
+
like: string | null;
|
|
7
|
+
ne: string | null;
|
|
8
|
+
nin: string[] | null;
|
|
9
|
+
|
|
10
|
+
constructor(data: Partial<StringFilterInputData> = {}) {
|
|
11
|
+
this.eq = data.eq || null;
|
|
12
|
+
this.in = data.in || null;
|
|
13
|
+
this.like = data.like || null;
|
|
14
|
+
this.ne = data.ne || null;
|
|
15
|
+
this.nin = data.nin || null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class StringFilterInput extends StringFilterInputData {}
|
|
20
|
+
export type PartialStringFilterInput = Partial<StringFilterInput>;
|
|
21
|
+
export type ReadOnlyStringFilterInput = DeepReadonly<StringFilterInput>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
|
|
4
|
+
export class TownData extends BaseModelData {
|
|
5
|
+
districtId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
order: number | null;
|
|
8
|
+
|
|
9
|
+
constructor(data: Partial<TownData> = {}) {
|
|
10
|
+
super(data);
|
|
11
|
+
|
|
12
|
+
this.districtId = data.districtId || "";
|
|
13
|
+
this.name = data.name || "";
|
|
14
|
+
this.order =
|
|
15
|
+
data.order !== undefined && data.order !== null ? data.order : null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class Town extends TownData {}
|
|
20
|
+
export type PartialTown = Partial<Town>;
|
|
21
|
+
export type ReadOnlyTown = DeepReadonly<Town>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
|
|
3
|
+
export class TrackingInfoData {
|
|
4
|
+
barcode: string | null;
|
|
5
|
+
cargoCompany: string | null;
|
|
6
|
+
isSendNotification: boolean | null;
|
|
7
|
+
trackingLink: string | null;
|
|
8
|
+
trackingNumber: string | null;
|
|
9
|
+
|
|
10
|
+
constructor(data: Partial<TrackingInfoData> = {}) {
|
|
11
|
+
this.barcode = data.barcode || null;
|
|
12
|
+
this.cargoCompany = data.cargoCompany || null;
|
|
13
|
+
this.isSendNotification =
|
|
14
|
+
data.isSendNotification !== undefined && data.isSendNotification !== null
|
|
15
|
+
? data.isSendNotification
|
|
16
|
+
: null;
|
|
17
|
+
this.trackingLink = data.trackingLink || null;
|
|
18
|
+
this.trackingNumber = data.trackingNumber || null;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class TrackingInfo extends TrackingInfoData {}
|
|
23
|
+
export type PartialTrackingInfo = Partial<TrackingInfo>;
|
|
24
|
+
export type ReadOnlyTrackingInfo = DeepReadonly<TrackingInfo>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
|
|
3
|
+
export class TransactionErrorData {
|
|
4
|
+
code: string | null;
|
|
5
|
+
declineCode: string | null;
|
|
6
|
+
message: string | null;
|
|
7
|
+
|
|
8
|
+
constructor(data: Partial<TransactionErrorData> = {}) {
|
|
9
|
+
this.code = data.code || null;
|
|
10
|
+
this.declineCode = data.declineCode || null;
|
|
11
|
+
this.message = data.message || null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class TransactionError extends TransactionErrorData {}
|
|
16
|
+
export type PartialTransactionError = Partial<TransactionError>;
|
|
17
|
+
export type ReadOnlyTransactionError = DeepReadonly<TransactionError>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
|
|
3
|
+
export class TransactionInstallmentPriceData {
|
|
4
|
+
installmentCount: number | null;
|
|
5
|
+
installmentPrice: number | null;
|
|
6
|
+
originalRate: number | null;
|
|
7
|
+
rate: number | null;
|
|
8
|
+
totalPrice: number | null;
|
|
9
|
+
|
|
10
|
+
constructor(data: Partial<TransactionInstallmentPriceData> = {}) {
|
|
11
|
+
this.installmentCount =
|
|
12
|
+
data.installmentCount !== undefined && data.installmentCount !== null
|
|
13
|
+
? data.installmentCount
|
|
14
|
+
: null;
|
|
15
|
+
this.installmentPrice =
|
|
16
|
+
data.installmentPrice !== undefined && data.installmentPrice !== null
|
|
17
|
+
? data.installmentPrice
|
|
18
|
+
: null;
|
|
19
|
+
this.originalRate =
|
|
20
|
+
data.originalRate !== undefined && data.originalRate !== null
|
|
21
|
+
? data.originalRate
|
|
22
|
+
: null;
|
|
23
|
+
this.rate =
|
|
24
|
+
data.rate !== undefined && data.rate !== null ? data.rate : null;
|
|
25
|
+
this.totalPrice =
|
|
26
|
+
data.totalPrice !== undefined && data.totalPrice !== null
|
|
27
|
+
? data.totalPrice
|
|
28
|
+
: null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class TransactionInstallmentPrice extends TransactionInstallmentPriceData {}
|
|
33
|
+
export type PartialTransactionInstallmentPrice =
|
|
34
|
+
Partial<TransactionInstallmentPrice>;
|
|
35
|
+
export type ReadOnlyTransactionInstallmentPrice =
|
|
36
|
+
DeepReadonly<TransactionInstallmentPrice>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import {
|
|
3
|
+
TransactionCardAssociationEnum,
|
|
4
|
+
TransactionCardTypeEnum,
|
|
5
|
+
} from "../types";
|
|
6
|
+
import { TransactionInstallmentPriceData } from "./TransactionInstallmentPrice";
|
|
7
|
+
|
|
8
|
+
export class TransactionPaymentMethodDetailData {
|
|
9
|
+
bankName: string | null;
|
|
10
|
+
binNumber: string;
|
|
11
|
+
cardAssociation: TransactionCardAssociationEnum | null;
|
|
12
|
+
cardFamily: string | null;
|
|
13
|
+
cardType: TransactionCardTypeEnum | null;
|
|
14
|
+
installment: TransactionInstallmentPriceData | null;
|
|
15
|
+
lastFourDigits: string;
|
|
16
|
+
threeDSecure: boolean | null;
|
|
17
|
+
|
|
18
|
+
constructor(data: Partial<TransactionPaymentMethodDetailData> = {}) {
|
|
19
|
+
this.bankName = data.bankName || null;
|
|
20
|
+
this.binNumber = data.binNumber || "";
|
|
21
|
+
this.cardAssociation = data.cardAssociation || null;
|
|
22
|
+
this.cardFamily = data.cardFamily || null;
|
|
23
|
+
this.cardType = data.cardType || null;
|
|
24
|
+
this.installment = data.installment
|
|
25
|
+
? new TransactionInstallmentPriceData(data.installment)
|
|
26
|
+
: null;
|
|
27
|
+
this.lastFourDigits = data.lastFourDigits || "";
|
|
28
|
+
this.threeDSecure =
|
|
29
|
+
data.threeDSecure !== undefined && data.threeDSecure !== null
|
|
30
|
+
? data.threeDSecure
|
|
31
|
+
: null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class TransactionPaymentMethodDetail extends TransactionPaymentMethodDetailData {}
|
|
36
|
+
export type PartialTransactionPaymentMethodDetail =
|
|
37
|
+
Partial<TransactionPaymentMethodDetail>;
|
|
38
|
+
export type ReadOnlyTransactionPaymentMethodDetail =
|
|
39
|
+
DeepReadonly<TransactionPaymentMethodDetail>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import { TransactionStatusEnum } from "../types";
|
|
3
|
+
import { TransactionErrorData } from "./TransactionError";
|
|
4
|
+
|
|
5
|
+
export class TransactionResponseData {
|
|
6
|
+
error: TransactionErrorData | null;
|
|
7
|
+
orderId: string | null;
|
|
8
|
+
orderNumber: string | null;
|
|
9
|
+
returnSlug: string | null;
|
|
10
|
+
transactionId: string | null;
|
|
11
|
+
transactionStatus: TransactionStatusEnum;
|
|
12
|
+
|
|
13
|
+
constructor(data: Partial<TransactionResponseData> = {}) {
|
|
14
|
+
this.error = data.error ? new TransactionErrorData(data.error) : null;
|
|
15
|
+
this.orderId = data.orderId || null;
|
|
16
|
+
this.orderNumber = data.orderNumber || null;
|
|
17
|
+
this.returnSlug = data.returnSlug || null;
|
|
18
|
+
this.transactionId = data.transactionId || null;
|
|
19
|
+
this.transactionStatus =
|
|
20
|
+
data.transactionStatus || TransactionStatusEnum.AUTHORIZED;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class TransactionResponse extends TransactionResponseData {}
|
|
25
|
+
export type PartialTransactionResponse = Partial<TransactionResponse>;
|
|
26
|
+
export type ReadOnlyTransactionResponse = DeepReadonly<TransactionResponse>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
|
|
3
|
+
export class UpdateCartCampaignOfferInputData {
|
|
4
|
+
accepted: boolean;
|
|
5
|
+
campaignOfferId: string;
|
|
6
|
+
campaignOfferProductId: string;
|
|
7
|
+
cartId: string;
|
|
8
|
+
productId: string;
|
|
9
|
+
variantId: string;
|
|
10
|
+
|
|
11
|
+
constructor(data: Partial<UpdateCartCampaignOfferInputData> = {}) {
|
|
12
|
+
this.accepted = data.accepted || false;
|
|
13
|
+
this.campaignOfferId = data.campaignOfferId || "";
|
|
14
|
+
this.campaignOfferProductId = data.campaignOfferProductId || "";
|
|
15
|
+
this.cartId = data.cartId || "";
|
|
16
|
+
this.productId = data.productId || "";
|
|
17
|
+
this.variantId = data.variantId || "";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class UpdateCartCampaignOfferInput extends UpdateCartCampaignOfferInputData {}
|
|
22
|
+
export type PartialUpdateCartCampaignOfferInput =
|
|
23
|
+
Partial<UpdateCartCampaignOfferInput>;
|
|
24
|
+
export type ReadOnlyUpdateCartCampaignOfferInput =
|
|
25
|
+
DeepReadonly<UpdateCartCampaignOfferInput>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
import { ProductAttributeValueData } from "./ProductAttributeValue";
|
|
4
|
+
import { ProductImageData } from "./ProductImage";
|
|
5
|
+
import { ProductPriceData } from "./ProductPrice";
|
|
6
|
+
import { VariantStockData } from "./VariantStock";
|
|
7
|
+
import { VariantValueRelationData } from "./VariantValueRelation";
|
|
8
|
+
|
|
9
|
+
export class VariantData extends BaseModelData {
|
|
10
|
+
attributes: ProductAttributeValueData[] | null;
|
|
11
|
+
barcodeList: string[] | null;
|
|
12
|
+
hsCode: string | null;
|
|
13
|
+
images: ProductImageData[] | null;
|
|
14
|
+
isActive: boolean | null;
|
|
15
|
+
prices: ProductPriceData[];
|
|
16
|
+
sellIfOutOfStock: boolean | null;
|
|
17
|
+
sku: string | null;
|
|
18
|
+
stocks: VariantStockData[] | null;
|
|
19
|
+
variantValueIds: VariantValueRelationData[] | null;
|
|
20
|
+
weight: number | null;
|
|
21
|
+
|
|
22
|
+
constructor(data: Partial<VariantData> = {}) {
|
|
23
|
+
super(data);
|
|
24
|
+
|
|
25
|
+
this.attributes = data.attributes
|
|
26
|
+
? data.attributes.map((p) => new ProductAttributeValueData(p))
|
|
27
|
+
: null;
|
|
28
|
+
this.barcodeList = data.barcodeList || null;
|
|
29
|
+
this.hsCode = data.hsCode || null;
|
|
30
|
+
this.images = data.images
|
|
31
|
+
? data.images.map((p) => new ProductImageData(p))
|
|
32
|
+
: null;
|
|
33
|
+
this.isActive =
|
|
34
|
+
data.isActive !== undefined && data.isActive !== null
|
|
35
|
+
? data.isActive
|
|
36
|
+
: null;
|
|
37
|
+
this.prices = data.prices
|
|
38
|
+
? data.prices.map((p) => new ProductPriceData(p))
|
|
39
|
+
: [];
|
|
40
|
+
this.sellIfOutOfStock =
|
|
41
|
+
data.sellIfOutOfStock !== undefined && data.sellIfOutOfStock !== null
|
|
42
|
+
? data.sellIfOutOfStock
|
|
43
|
+
: null;
|
|
44
|
+
this.sku = data.sku || null;
|
|
45
|
+
this.stocks = data.stocks
|
|
46
|
+
? data.stocks.map((v) => new VariantStockData(v))
|
|
47
|
+
: null;
|
|
48
|
+
this.variantValueIds = data.variantValueIds
|
|
49
|
+
? data.variantValueIds.map((v) => new VariantValueRelationData(v))
|
|
50
|
+
: null;
|
|
51
|
+
this.weight =
|
|
52
|
+
data.weight !== undefined && data.weight !== null ? data.weight : null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export class Variant extends VariantData {}
|
|
57
|
+
export type PartialVariant = Partial<Variant>;
|
|
58
|
+
export type ReadOnlyVariant = DeepReadonly<Variant>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
|
|
3
|
+
export class VariantStockData {
|
|
4
|
+
stockCount: number;
|
|
5
|
+
stockLocationId: string;
|
|
6
|
+
|
|
7
|
+
constructor(data: Partial<VariantStockData> = {}) {
|
|
8
|
+
this.stockCount = data.stockCount || 0;
|
|
9
|
+
this.stockLocationId = data.stockLocationId || "";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class VariantStock extends VariantStockData {}
|
|
14
|
+
export type PartialVariantStock = Partial<VariantStock>;
|
|
15
|
+
export type ReadOnlyVariantStock = DeepReadonly<VariantStock>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
import { VariantSelectionTypeEnum } from "../types";
|
|
4
|
+
import { VariantTypeTranslationData } from "./VariantTypeTranslation";
|
|
5
|
+
import { VariantValueData } from "./VariantValue";
|
|
6
|
+
|
|
7
|
+
export class VariantTypeData extends BaseModelData {
|
|
8
|
+
name: string;
|
|
9
|
+
selectionType: VariantSelectionTypeEnum;
|
|
10
|
+
translations: VariantTypeTranslationData[] | null;
|
|
11
|
+
values: VariantValueData[];
|
|
12
|
+
|
|
13
|
+
constructor(data: Partial<VariantTypeData> = {}) {
|
|
14
|
+
super(data);
|
|
15
|
+
|
|
16
|
+
this.name = data.name || "";
|
|
17
|
+
this.selectionType = data.selectionType || VariantSelectionTypeEnum.CHOICE;
|
|
18
|
+
this.translations = data.translations
|
|
19
|
+
? data.translations.map((v) => new VariantTypeTranslationData(v))
|
|
20
|
+
: null;
|
|
21
|
+
this.values = data.values
|
|
22
|
+
? data.values.map((v) => new VariantValueData(v))
|
|
23
|
+
: [];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class VariantType extends VariantTypeData {}
|
|
28
|
+
export type PartialVariantType = Partial<VariantType>;
|
|
29
|
+
export type ReadOnlyVariantType = DeepReadonly<VariantType>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import { VariantValueTranslationData } from "./VariantValueTranslation";
|
|
3
|
+
|
|
4
|
+
export class VariantTypeTranslationData {
|
|
5
|
+
locale: string;
|
|
6
|
+
name: string | null;
|
|
7
|
+
values: VariantValueTranslationData[] | null;
|
|
8
|
+
|
|
9
|
+
constructor(data: Partial<VariantTypeTranslationData> = {}) {
|
|
10
|
+
this.locale = data.locale || "";
|
|
11
|
+
this.name = data.name || null;
|
|
12
|
+
this.values = data.values
|
|
13
|
+
? data.values.map((v) => new VariantValueTranslationData(v))
|
|
14
|
+
: null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class VariantTypeTranslation extends VariantTypeTranslationData {}
|
|
19
|
+
export type PartialVariantTypeTranslation = Partial<VariantTypeTranslation>;
|
|
20
|
+
export type ReadOnlyVariantTypeTranslation =
|
|
21
|
+
DeepReadonly<VariantTypeTranslation>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
|
|
4
|
+
export class VariantValueData extends BaseModelData {
|
|
5
|
+
colorCode: string | null;
|
|
6
|
+
name: string;
|
|
7
|
+
thumbnailImageId: string | null;
|
|
8
|
+
|
|
9
|
+
constructor(data: Partial<VariantValueData> = {}) {
|
|
10
|
+
super(data);
|
|
11
|
+
|
|
12
|
+
this.colorCode = data.colorCode || null;
|
|
13
|
+
this.name = data.name || "";
|
|
14
|
+
this.thumbnailImageId = data.thumbnailImageId || null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class VariantValue extends VariantValueData {}
|
|
19
|
+
export type PartialVariantValue = Partial<VariantValue>;
|
|
20
|
+
export type ReadOnlyVariantValue = DeepReadonly<VariantValue>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
|
|
3
|
+
export class VariantValueRelationData {
|
|
4
|
+
variantTypeId: string;
|
|
5
|
+
variantValueId: string;
|
|
6
|
+
|
|
7
|
+
constructor(data: Partial<VariantValueRelationData> = {}) {
|
|
8
|
+
this.variantTypeId = data.variantTypeId || "";
|
|
9
|
+
this.variantValueId = data.variantValueId || "";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class VariantValueRelation extends VariantValueRelationData {}
|
|
14
|
+
export type PartialVariantValueRelation = Partial<VariantValueRelation>;
|
|
15
|
+
export type ReadOnlyVariantValueRelation = DeepReadonly<VariantValueRelation>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
|
|
3
|
+
export class VariantValueTranslationData {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string | null;
|
|
6
|
+
|
|
7
|
+
constructor(data: Partial<VariantValueTranslationData> = {}) {
|
|
8
|
+
this.id = data.id || "";
|
|
9
|
+
this.name = data.name || null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class VariantValueTranslation extends VariantValueTranslationData {}
|
|
14
|
+
export type PartialVariantValueTranslation = Partial<VariantValueTranslation>;
|
|
15
|
+
export type ReadOnlyVariantValueTranslation =
|
|
16
|
+
DeepReadonly<VariantValueTranslation>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default class BaseModelData {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: number;
|
|
4
|
+
updatedAt: number;
|
|
5
|
+
deleted?: boolean | null;
|
|
6
|
+
|
|
7
|
+
constructor(data: BaseModelParams = {}) {
|
|
8
|
+
this.id = data.id || Date.now() + "";
|
|
9
|
+
this.createdAt = data.createdAt || Date.now();
|
|
10
|
+
this.updatedAt = data.updatedAt || Date.now();
|
|
11
|
+
this.deleted = data.deleted || false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum ModelStatus {
|
|
16
|
+
ACTIVE = 1,
|
|
17
|
+
PASSIVE = 2,
|
|
18
|
+
DELETED = 3,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type BaseModelParams = {
|
|
22
|
+
id?: string;
|
|
23
|
+
createdAt?: number;
|
|
24
|
+
updatedAt?: number;
|
|
25
|
+
deleted?: boolean | null;
|
|
26
|
+
};
|