@lana-commerce/core 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +531 -0
- package/cjs/actionLock.js +31 -0
- package/cjs/addEmptyListItem.js +7 -0
- package/cjs/aggregateOptions.js +178 -0
- package/cjs/analytics.js +90 -0
- package/cjs/analyticsProductData.js +33 -0
- package/cjs/arrayToDict.js +12 -0
- package/cjs/asyncModuleWrapper.js +52 -0
- package/cjs/averageReviewScore.js +45 -0
- package/cjs/buildconfig.js +16 -0
- package/cjs/cachedLoader.js +36 -0
- package/cjs/canonicalVariantURL.js +2 -0
- package/cjs/cartOperation.js +132 -0
- package/cjs/categorySEO.js +20 -0
- package/cjs/commonTypes.js +2 -0
- package/cjs/compact.js +8 -0
- package/cjs/configLoader.js +69 -0
- package/cjs/controlledQueue.js +46 -0
- package/cjs/convertImageURL.js +19 -0
- package/cjs/dataLoader.js +185 -0
- package/cjs/defaultVariant.js +30 -0
- package/cjs/effector/clearOnChangeAfterDelay.js +17 -0
- package/cjs/effector/combineEvery.js +8 -0
- package/cjs/effector/combineSome.js +8 -0
- package/cjs/effector/debounced.js +18 -0
- package/cjs/effector/form.js +168 -0
- package/cjs/effector/hideOnChangeAfterDelay.js +17 -0
- package/cjs/effector/requestResponse.js +30 -0
- package/cjs/effector/requestResponseMulti.js +51 -0
- package/cjs/effector/restoreNamed.js +8 -0
- package/cjs/effector/split.js +29 -0
- package/cjs/effector/validator.js +33 -0
- package/cjs/effector/wrapSignInRequired.js +13 -0
- package/cjs/exceptions.js +6 -0
- package/cjs/fetchAllItems.js +56 -0
- package/cjs/file.js +83 -0
- package/cjs/fileWebsocket.js +83 -0
- package/cjs/filterFunc.js +48 -0
- package/cjs/filterFuncBrand.js +12 -0
- package/cjs/filterFuncCategory.js +12 -0
- package/cjs/filterFuncContentBlock.js +19 -0
- package/cjs/filterFuncCustomer.js +161 -0
- package/cjs/filterFuncDataFeed.js +54 -0
- package/cjs/filterFuncOrder.js +334 -0
- package/cjs/filterFuncPreprocess.js +14 -0
- package/cjs/filterFuncProduct.js +70 -0
- package/cjs/filterFuncPurchaseOrder.js +126 -0
- package/cjs/filterFuncSupplier.js +36 -0
- package/cjs/filterFuncTransfer.js +135 -0
- package/cjs/formatAbbrevNumber.js +21 -0
- package/cjs/formatCurrency.js +47 -0
- package/cjs/formatToJSX.js +123 -0
- package/cjs/fulfillmentNumber.js +7 -0
- package/cjs/generateRandomToken.js +12 -0
- package/cjs/generateUUID.js +10 -0
- package/cjs/generated/codes.js +47 -0
- package/cjs/genericFile.js +73 -0
- package/cjs/getSalesChannelID.js +13 -0
- package/cjs/getSessionID.js +13 -0
- package/cjs/getTimezone.js +12 -0
- package/cjs/graphql/fragments/Branding.js +3 -0
- package/cjs/graphql/fragments/BrandingField.js +3 -0
- package/cjs/graphql/fragments/CartCustomItem.js +3 -0
- package/cjs/graphql/fragments/CartOrder.js +3 -0
- package/cjs/graphql/fragments/CartVariant.js +3 -0
- package/cjs/graphql/fragments/CartVariantFull.js +3 -0
- package/cjs/graphql/fragments/Category.js +3 -0
- package/cjs/graphql/fragments/CommonCartVariant.js +3 -0
- package/cjs/graphql/fragments/Currency.js +3 -0
- package/cjs/graphql/fragments/CurrencyPrice.js +3 -0
- package/cjs/graphql/fragments/CustomField.js +3 -0
- package/cjs/graphql/fragments/CustomFieldObjects.js +3 -0
- package/cjs/graphql/fragments/Customer.js +3 -0
- package/cjs/graphql/fragments/CustomerBalance.js +3 -0
- package/cjs/graphql/fragments/CustomerBalanceHistory.js +3 -0
- package/cjs/graphql/fragments/CustomerFavorite.js +3 -0
- package/cjs/graphql/fragments/CustomerFavoriteShort.js +3 -0
- package/cjs/graphql/fragments/CustomerOAuthProvider.js +3 -0
- package/cjs/graphql/fragments/CustomerOrderBrief.js +3 -0
- package/cjs/graphql/fragments/CustomerOrderFulfillment.js +3 -0
- package/cjs/graphql/fragments/CustomerOrderFull.js +3 -0
- package/cjs/graphql/fragments/CustomerPaymentSource.js +3 -0
- package/cjs/graphql/fragments/CustomerReturnBrief.js +3 -0
- package/cjs/graphql/fragments/CustomerReturnFull.js +3 -0
- package/cjs/graphql/fragments/CustomerReturnPolicy.js +3 -0
- package/cjs/graphql/fragments/CustomerSubscriptionBrief.js +3 -0
- package/cjs/graphql/fragments/CustomerSubscriptionFull.js +3 -0
- package/cjs/graphql/fragments/File.js +3 -0
- package/cjs/graphql/fragments/FileForUpload.js +3 -0
- package/cjs/graphql/fragments/FileNoFallback.js +3 -0
- package/cjs/graphql/fragments/FullAddress.js +3 -0
- package/cjs/graphql/fragments/Gateway.js +3 -0
- package/cjs/graphql/fragments/GatewayManual.js +3 -0
- package/cjs/graphql/fragments/GatewayPaypal.js +3 -0
- package/cjs/graphql/fragments/GatewayStripe.js +3 -0
- package/cjs/graphql/fragments/GatewayTest.js +3 -0
- package/cjs/graphql/fragments/IPAndUAInfo.js +3 -0
- package/cjs/graphql/fragments/InfoCountry.js +3 -0
- package/cjs/graphql/fragments/InfoCountryDedupField.js +3 -0
- package/cjs/graphql/fragments/InfoCurrency.js +3 -0
- package/cjs/graphql/fragments/InfoProvince.js +3 -0
- package/cjs/graphql/fragments/KeyValue.js +3 -0
- package/cjs/graphql/fragments/LineItemField.js +3 -0
- package/cjs/graphql/fragments/MediaFile.js +3 -0
- package/cjs/graphql/fragments/MinCurrencyPrice.js +3 -0
- package/cjs/graphql/fragments/ProductField.js +3 -0
- package/cjs/graphql/fragments/ProductFieldSet.js +3 -0
- package/cjs/graphql/fragments/ProductFlat.js +3 -0
- package/cjs/graphql/fragments/ProductQuestion.js +3 -0
- package/cjs/graphql/fragments/ProductQuestionAnswer.js +3 -0
- package/cjs/graphql/fragments/ProductQuestionPage.js +3 -0
- package/cjs/graphql/fragments/ProductReview.js +3 -0
- package/cjs/graphql/fragments/ProductReviewAnswer.js +3 -0
- package/cjs/graphql/fragments/ProductReviewAverageScore.js +3 -0
- package/cjs/graphql/fragments/ProductReviewPage.js +3 -0
- package/cjs/graphql/fragments/ProductReviewScore.js +3 -0
- package/cjs/graphql/fragments/ProductReviewSurveyAnswer.js +3 -0
- package/cjs/graphql/fragments/ProductSearchOptionAgg.js +3 -0
- package/cjs/graphql/fragments/ProductSearchResult.js +3 -0
- package/cjs/graphql/fragments/ReturnReason.js +3 -0
- package/cjs/graphql/fragments/ReviewDimension.js +3 -0
- package/cjs/graphql/fragments/ReviewDimensionSet.js +3 -0
- package/cjs/graphql/fragments/ReviewImagePage.js +3 -0
- package/cjs/graphql/fragments/ReviewQuestionProduct.js +3 -0
- package/cjs/graphql/fragments/ReviewSettings.js +3 -0
- package/cjs/graphql/fragments/SearchProduct.js +3 -0
- package/cjs/graphql/fragments/Shop.js +3 -0
- package/cjs/graphql/fragments/SubscriptionPlan.js +3 -0
- package/cjs/graphql/fragments/SurveyQuestion.js +3 -0
- package/cjs/graphql/fragments/TieredPricing.js +3 -0
- package/cjs/graphql/fragments/TieredPricingTier.js +3 -0
- package/cjs/graphql/fragments/VariantOption.js +3 -0
- package/cjs/graphql/operations/ApplyGiftCardMutation.js +3 -0
- package/cjs/graphql/operations/AuthRequestMutation.js +3 -0
- package/cjs/graphql/operations/CancelOrderMutation.js +3 -0
- package/cjs/graphql/operations/CancelSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/ConnectOAuth2Mutation.js +3 -0
- package/cjs/graphql/operations/CreateCartMutation.js +26 -0
- package/cjs/graphql/operations/CreateFavoriteMutation.js +22 -0
- package/cjs/graphql/operations/CreateFileMutation.js +6 -0
- package/cjs/graphql/operations/CreatePaymentSourceMutation.js +6 -0
- package/cjs/graphql/operations/CreateProductQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/CreateProductQuestionMutation.js +8 -0
- package/cjs/graphql/operations/CreateProductReviewMutation.js +18 -0
- package/cjs/graphql/operations/CreateReturnMutation.js +22 -0
- package/cjs/graphql/operations/DeleteFavoriteMutation.js +3 -0
- package/cjs/graphql/operations/DeletePaymentSourceMutation.js +3 -0
- package/cjs/graphql/operations/DeleteProductQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/DeleteProductQuestionMutation.js +3 -0
- package/cjs/graphql/operations/DeleteProductReviewMutation.js +3 -0
- package/cjs/graphql/operations/DisconnectOAuth2Mutation.js +3 -0
- package/cjs/graphql/operations/EditSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/FileUploadedMutation.js +6 -0
- package/cjs/graphql/operations/FlagQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/FlagQuestionMutation.js +3 -0
- package/cjs/graphql/operations/FlagReviewAnswerMutation.js +3 -0
- package/cjs/graphql/operations/FlagReviewMutation.js +3 -0
- package/cjs/graphql/operations/GetBrandingQuery.js +10 -0
- package/cjs/graphql/operations/GetCartQuery.js +26 -0
- package/cjs/graphql/operations/GetCustomerAddressesPageDataQuery.js +16 -0
- package/cjs/graphql/operations/GetCustomerBalanceHistoryPageQuery.js +6 -0
- package/cjs/graphql/operations/GetCustomerBalanceQuery.js +8 -0
- package/cjs/graphql/operations/GetCustomerInfoQuery.js +10 -0
- package/cjs/graphql/operations/GetCustomerQuery.js +8 -0
- package/cjs/graphql/operations/GetFavoritesQuery.js +22 -0
- package/cjs/graphql/operations/GetFileStatusQuery.js +6 -0
- package/cjs/graphql/operations/GetGatewaysQuery.js +14 -0
- package/cjs/graphql/operations/GetInfoCurrenciesQuery.js +6 -0
- package/cjs/graphql/operations/GetLastCartQuery.js +26 -0
- package/cjs/graphql/operations/GetOrderQuery.js +30 -0
- package/cjs/graphql/operations/GetOrdersPageQuery.js +24 -0
- package/cjs/graphql/operations/GetPaymentMethodsPageDataQuery.js +18 -0
- package/cjs/graphql/operations/GetProductQuestionsPageQuery.js +10 -0
- package/cjs/graphql/operations/GetProductReviewImagesPageQuery.js +8 -0
- package/cjs/graphql/operations/GetProductReviewsPageQuery.js +20 -0
- package/cjs/graphql/operations/GetProvincesQuery.js +6 -0
- package/cjs/graphql/operations/GetQuestionQuery.js +8 -0
- package/cjs/graphql/operations/GetReturnCreationInfoQuery.js +36 -0
- package/cjs/graphql/operations/GetReturnQuery.js +28 -0
- package/cjs/graphql/operations/GetReturnsPageQuery.js +22 -0
- package/cjs/graphql/operations/GetReviewDimensionsQuery.js +6 -0
- package/cjs/graphql/operations/GetReviewQuery.js +18 -0
- package/cjs/graphql/operations/GetReviewSettingsQuery.js +12 -0
- package/cjs/graphql/operations/GetShopCurrenciesQuery.js +6 -0
- package/cjs/graphql/operations/GetShopQuery.js +8 -0
- package/cjs/graphql/operations/GetSubscriptionQuery.js +36 -0
- package/cjs/graphql/operations/GetSubscriptionsPageQuery.js +22 -0
- package/cjs/graphql/operations/GetVariantPageQuery.js +20 -0
- package/cjs/graphql/operations/LoadProductNoCustomerQuery.js +62 -0
- package/cjs/graphql/operations/LoadProductQuery.js +66 -0
- package/cjs/graphql/operations/ModifyCartMutation.js +26 -0
- package/cjs/graphql/operations/ModifyCustomerMutation.js +8 -0
- package/cjs/graphql/operations/ModifyFavoriteMutation.js +22 -0
- package/cjs/graphql/operations/ModifyProductQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/ModifyProductQuestionMutation.js +8 -0
- package/cjs/graphql/operations/ModifyProductReviewMutation.js +18 -0
- package/cjs/graphql/operations/NewPasswordMutation.js +3 -0
- package/cjs/graphql/operations/PauseSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/ResetPasswordMutation.js +3 -0
- package/cjs/graphql/operations/ResumeSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/SearchProductsAdvancedQuery.js +24 -0
- package/cjs/graphql/operations/SearchProductsQuery.js +20 -0
- package/cjs/graphql/operations/SearchQuestionsQuery.js +8 -0
- package/cjs/graphql/operations/SearchReviewsQuery.js +18 -0
- package/cjs/graphql/operations/SignInMutation.js +3 -0
- package/cjs/graphql/operations/SignInViaEmailCompleteMutation.js +3 -0
- package/cjs/graphql/operations/SignInViaEmailInitMutation.js +3 -0
- package/cjs/graphql/operations/SignUpMutation.js +3 -0
- package/cjs/graphql/operations/SkipNextSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/UploadFileMutation.js +3 -0
- package/cjs/graphql/operations/VerifyCodeMutation.js +3 -0
- package/cjs/graphql/operations/VoteQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/VoteQuestionMutation.js +3 -0
- package/cjs/graphql/operations/VoteReviewAnswerMutation.js +3 -0
- package/cjs/graphql/operations/VoteReviewMutation.js +3 -0
- package/cjs/graphql/types.js +2 -0
- package/cjs/hierarchicalSearchOption.js +42 -0
- package/cjs/idgen.js +8 -0
- package/cjs/ignoreQueue.js +50 -0
- package/cjs/imageAltProps.js +13 -0
- package/cjs/invoiceFormat.js +59 -0
- package/cjs/isShippingRequired.js +20 -0
- package/cjs/isoStripTrailingZeros.js +7 -0
- package/cjs/json/commerce.js +10 -0
- package/cjs/json/commerceFileUpload.js +57 -0
- package/cjs/json/commerceTypes.js +2 -0
- package/cjs/json/common.js +320 -0
- package/cjs/json/fetchAllItems.js +61 -0
- package/cjs/json/mutator.js +957 -0
- package/cjs/json/storefront.js +10 -0
- package/cjs/json/storefrontTypes.js +2 -0
- package/cjs/lastValue.js +17 -0
- package/cjs/lineItemPrice.js +111 -0
- package/cjs/loadJWT.js +25 -0
- package/cjs/mapInvalidInput.js +33 -0
- package/cjs/mapResponseData.js +16 -0
- package/cjs/mapResponseMultiData.js +14 -0
- package/cjs/meanBy.js +15 -0
- package/cjs/media.js +16 -0
- package/cjs/modules/advancedSearch.js +127 -0
- package/cjs/modules/cart.js +708 -0
- package/cjs/modules/config/defaultAdvancedSearchGraphQLConfig.js +8 -0
- package/cjs/modules/config/defaultCartGraphQLConfig.js +14 -0
- package/cjs/modules/config/defaultProductGraphQLConfig.js +48 -0
- package/cjs/modules/config/defaultSearchGraphQLConfig.js +8 -0
- package/cjs/modules/customer.js +2174 -0
- package/cjs/modules/helpers/cartInitOption.js +22 -0
- package/cjs/modules/helpers/cookieConsent.js +33 -0
- package/cjs/modules/helpers/customerOauth2.js +64 -0
- package/cjs/modules/helpers/getOAuth2Hook.js +52 -0
- package/cjs/modules/helpers/hookUpAnalytics.js +49 -0
- package/cjs/modules/helpers/loadJWT.js +23 -0
- package/cjs/modules/helpers/misc.js +58 -0
- package/cjs/modules/imageDialog.js +78 -0
- package/cjs/modules/persist.js +55 -0
- package/cjs/modules/popupMessage.js +21 -0
- package/cjs/modules/product.js +1261 -0
- package/cjs/modules/recentlyVisitedProducts.js +72 -0
- package/cjs/modules/search.js +102 -0
- package/cjs/multiResponseToResponse.js +22 -0
- package/cjs/nonNull.js +10 -0
- package/cjs/oauthState.js +40 -0
- package/cjs/orderShippingAddress.js +7 -0
- package/cjs/package.json +3 -0
- package/cjs/pender.js +16 -0
- package/cjs/percentageOff.js +7 -0
- package/cjs/popupConnectQueue.js +62 -0
- package/cjs/preact/components/SixDigitInput.js +167 -0
- package/cjs/preact/effector.js +74 -0
- package/cjs/preact/transition/CSSTransition.js +55 -0
- package/cjs/preact/transition/Transition.js +104 -0
- package/cjs/preact/translateLocalStatic.js +31 -0
- package/cjs/productFiltering.js +173 -0
- package/cjs/productSEO.js +51 -0
- package/cjs/productSorting.js +93 -0
- package/cjs/promiseAll.js +18 -0
- package/cjs/promiseLimit.js +38 -0
- package/cjs/rdsToInitialScores.js +32 -0
- package/cjs/react/components/Portal.js +7 -0
- package/cjs/react/components/RootCloseWrapper.js +41 -0
- package/cjs/react/components/SixDigitInput.js +167 -0
- package/cjs/react/contains.js +14 -0
- package/cjs/react/popperBinder.js +70 -0
- package/cjs/react/rootClose.js +112 -0
- package/cjs/react/translateLocalStatic.js +32 -0
- package/cjs/react/useAsyncCachedValue.js +14 -0
- package/cjs/refreshTimeout.js +25 -0
- package/cjs/remoteAuth.js +59 -0
- package/cjs/request.js +348 -0
- package/cjs/requestDetails.js +76 -0
- package/cjs/rfc3339Normalize.js +10 -0
- package/cjs/script.js +172 -0
- package/cjs/seo.js +2 -0
- package/cjs/shopDomain.js +8 -0
- package/cjs/shopLinks.js +63 -0
- package/cjs/slate.js +376 -0
- package/cjs/sleep.js +10 -0
- package/cjs/splitBy.js +21 -0
- package/cjs/splitName.js +28 -0
- package/cjs/stripZeros.js +13 -0
- package/cjs/stripeError.js +65 -0
- package/cjs/tailSplit.js +12 -0
- package/cjs/tieredPrice.js +32 -0
- package/cjs/timeIt.js +15 -0
- package/cjs/toMajor.js +8 -0
- package/cjs/toMinor.js +8 -0
- package/cjs/trace.js +37 -0
- package/cjs/translateLocale.js +12 -0
- package/cjs/traverse.js +14 -0
- package/cjs/truncate.js +21 -0
- package/cjs/typedLocalStorage.js +30 -0
- package/cjs/variantImage.js +26 -0
- package/cjs/variantImageURL.js +13 -0
- package/cjs/variantImages.js +19 -0
- package/cjs/variantInventory.js +43 -0
- package/cjs/variantOptions.js +21 -0
- package/cjs/variantPrice.js +96 -0
- package/cjs/variantPriceCommerce.js +29 -0
- package/cjs/variantTitle.js +9 -0
- package/cjs/variantTitleFull.js +11 -0
- package/cjs/variantURL.js +9 -0
- package/cjs/vendor/popper/index.d.ts +160 -0
- package/cjs/vendor/popper/index.js +2657 -0
- package/cjs/vendor/popper/index.js.map +1 -0
- package/cjs/vendor/popper/package.json +3 -0
- package/cjs/websocket.js +179 -0
- package/esm/actionLock.js +24 -0
- package/esm/addEmptyListItem.js +3 -0
- package/esm/aggregateOptions.js +169 -0
- package/esm/analytics.js +91 -0
- package/esm/analyticsProductData.js +28 -0
- package/esm/arrayToDict.js +8 -0
- package/esm/asyncModuleWrapper.js +47 -0
- package/esm/averageReviewScore.js +40 -0
- package/esm/buildconfig.js +13 -0
- package/esm/cachedLoader.js +32 -0
- package/esm/canonicalVariantURL.js +1 -0
- package/esm/cartOperation.js +126 -0
- package/esm/categorySEO.js +16 -0
- package/esm/commonTypes.js +1 -0
- package/esm/compact.js +4 -0
- package/esm/configLoader.js +61 -0
- package/esm/controlledQueue.js +38 -0
- package/esm/convertImageURL.js +15 -0
- package/esm/dataLoader.js +192 -0
- package/esm/defaultVariant.js +25 -0
- package/esm/effector/clearOnChangeAfterDelay.js +13 -0
- package/esm/effector/combineEvery.js +4 -0
- package/esm/effector/combineSome.js +4 -0
- package/esm/effector/debounced.js +14 -0
- package/esm/effector/form.js +166 -0
- package/esm/effector/hideOnChangeAfterDelay.js +13 -0
- package/esm/effector/requestResponse.js +24 -0
- package/esm/effector/requestResponseMulti.js +47 -0
- package/esm/effector/restoreNamed.js +4 -0
- package/esm/effector/split.js +25 -0
- package/esm/effector/validator.js +28 -0
- package/esm/effector/wrapSignInRequired.js +9 -0
- package/esm/exceptions.js +2 -0
- package/esm/fetchAllItems.js +44 -0
- package/esm/file.js +67 -0
- package/esm/fileWebsocket.js +75 -0
- package/esm/filterFunc.js +43 -0
- package/esm/filterFuncBrand.js +9 -0
- package/esm/filterFuncCategory.js +9 -0
- package/esm/filterFuncContentBlock.js +16 -0
- package/esm/filterFuncCustomer.js +153 -0
- package/esm/filterFuncDataFeed.js +50 -0
- package/esm/filterFuncOrder.js +325 -0
- package/esm/filterFuncPreprocess.js +9 -0
- package/esm/filterFuncProduct.js +66 -0
- package/esm/filterFuncPurchaseOrder.js +122 -0
- package/esm/filterFuncSupplier.js +31 -0
- package/esm/filterFuncTransfer.js +130 -0
- package/esm/formatAbbrevNumber.js +16 -0
- package/esm/formatCurrency.js +42 -0
- package/esm/formatToJSX.js +118 -0
- package/esm/fulfillmentNumber.js +3 -0
- package/esm/generateRandomToken.js +8 -0
- package/esm/generateUUID.js +6 -0
- package/esm/generated/codes.js +44 -0
- package/esm/genericFile.js +65 -0
- package/esm/getSalesChannelID.js +9 -0
- package/esm/getSessionID.js +9 -0
- package/esm/getTimezone.js +8 -0
- package/esm/graphql/fragments/Branding.js +1 -0
- package/esm/graphql/fragments/BrandingField.js +1 -0
- package/esm/graphql/fragments/CartCustomItem.js +1 -0
- package/esm/graphql/fragments/CartOrder.js +1 -0
- package/esm/graphql/fragments/CartVariant.js +1 -0
- package/esm/graphql/fragments/CartVariantFull.js +1 -0
- package/esm/graphql/fragments/Category.js +1 -0
- package/esm/graphql/fragments/CommonCartVariant.js +1 -0
- package/esm/graphql/fragments/Currency.js +1 -0
- package/esm/graphql/fragments/CurrencyPrice.js +1 -0
- package/esm/graphql/fragments/CustomField.js +1 -0
- package/esm/graphql/fragments/CustomFieldObjects.js +1 -0
- package/esm/graphql/fragments/Customer.js +1 -0
- package/esm/graphql/fragments/CustomerBalance.js +1 -0
- package/esm/graphql/fragments/CustomerBalanceHistory.js +1 -0
- package/esm/graphql/fragments/CustomerFavorite.js +1 -0
- package/esm/graphql/fragments/CustomerFavoriteShort.js +1 -0
- package/esm/graphql/fragments/CustomerOAuthProvider.js +1 -0
- package/esm/graphql/fragments/CustomerOrderBrief.js +1 -0
- package/esm/graphql/fragments/CustomerOrderFulfillment.js +1 -0
- package/esm/graphql/fragments/CustomerOrderFull.js +1 -0
- package/esm/graphql/fragments/CustomerPaymentSource.js +1 -0
- package/esm/graphql/fragments/CustomerReturnBrief.js +1 -0
- package/esm/graphql/fragments/CustomerReturnFull.js +1 -0
- package/esm/graphql/fragments/CustomerReturnPolicy.js +1 -0
- package/esm/graphql/fragments/CustomerSubscriptionBrief.js +1 -0
- package/esm/graphql/fragments/CustomerSubscriptionFull.js +1 -0
- package/esm/graphql/fragments/File.js +1 -0
- package/esm/graphql/fragments/FileForUpload.js +1 -0
- package/esm/graphql/fragments/FileNoFallback.js +1 -0
- package/esm/graphql/fragments/FullAddress.js +1 -0
- package/esm/graphql/fragments/Gateway.js +1 -0
- package/esm/graphql/fragments/GatewayManual.js +1 -0
- package/esm/graphql/fragments/GatewayPaypal.js +1 -0
- package/esm/graphql/fragments/GatewayStripe.js +1 -0
- package/esm/graphql/fragments/GatewayTest.js +1 -0
- package/esm/graphql/fragments/IPAndUAInfo.js +1 -0
- package/esm/graphql/fragments/InfoCountry.js +1 -0
- package/esm/graphql/fragments/InfoCountryDedupField.js +1 -0
- package/esm/graphql/fragments/InfoCurrency.js +1 -0
- package/esm/graphql/fragments/InfoProvince.js +1 -0
- package/esm/graphql/fragments/KeyValue.js +1 -0
- package/esm/graphql/fragments/LineItemField.js +1 -0
- package/esm/graphql/fragments/MediaFile.js +1 -0
- package/esm/graphql/fragments/MinCurrencyPrice.js +1 -0
- package/esm/graphql/fragments/ProductField.js +1 -0
- package/esm/graphql/fragments/ProductFieldSet.js +1 -0
- package/esm/graphql/fragments/ProductFlat.js +1 -0
- package/esm/graphql/fragments/ProductQuestion.js +1 -0
- package/esm/graphql/fragments/ProductQuestionAnswer.js +1 -0
- package/esm/graphql/fragments/ProductQuestionPage.js +1 -0
- package/esm/graphql/fragments/ProductReview.js +1 -0
- package/esm/graphql/fragments/ProductReviewAnswer.js +1 -0
- package/esm/graphql/fragments/ProductReviewAverageScore.js +1 -0
- package/esm/graphql/fragments/ProductReviewPage.js +1 -0
- package/esm/graphql/fragments/ProductReviewScore.js +1 -0
- package/esm/graphql/fragments/ProductReviewSurveyAnswer.js +1 -0
- package/esm/graphql/fragments/ProductSearchOptionAgg.js +1 -0
- package/esm/graphql/fragments/ProductSearchResult.js +1 -0
- package/esm/graphql/fragments/ReturnReason.js +1 -0
- package/esm/graphql/fragments/ReviewDimension.js +1 -0
- package/esm/graphql/fragments/ReviewDimensionSet.js +1 -0
- package/esm/graphql/fragments/ReviewImagePage.js +1 -0
- package/esm/graphql/fragments/ReviewQuestionProduct.js +1 -0
- package/esm/graphql/fragments/ReviewSettings.js +1 -0
- package/esm/graphql/fragments/SearchProduct.js +1 -0
- package/esm/graphql/fragments/Shop.js +1 -0
- package/esm/graphql/fragments/SubscriptionPlan.js +1 -0
- package/esm/graphql/fragments/SurveyQuestion.js +1 -0
- package/esm/graphql/fragments/TieredPricing.js +1 -0
- package/esm/graphql/fragments/TieredPricingTier.js +1 -0
- package/esm/graphql/fragments/VariantOption.js +1 -0
- package/esm/graphql/operations/ApplyGiftCardMutation.js +1 -0
- package/esm/graphql/operations/AuthRequestMutation.js +1 -0
- package/esm/graphql/operations/CancelOrderMutation.js +1 -0
- package/esm/graphql/operations/CancelSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/ConnectOAuth2Mutation.js +1 -0
- package/esm/graphql/operations/CreateCartMutation.js +23 -0
- package/esm/graphql/operations/CreateFavoriteMutation.js +19 -0
- package/esm/graphql/operations/CreateFileMutation.js +3 -0
- package/esm/graphql/operations/CreatePaymentSourceMutation.js +3 -0
- package/esm/graphql/operations/CreateProductQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/CreateProductQuestionMutation.js +5 -0
- package/esm/graphql/operations/CreateProductReviewMutation.js +15 -0
- package/esm/graphql/operations/CreateReturnMutation.js +19 -0
- package/esm/graphql/operations/DeleteFavoriteMutation.js +1 -0
- package/esm/graphql/operations/DeletePaymentSourceMutation.js +1 -0
- package/esm/graphql/operations/DeleteProductQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/DeleteProductQuestionMutation.js +1 -0
- package/esm/graphql/operations/DeleteProductReviewMutation.js +1 -0
- package/esm/graphql/operations/DisconnectOAuth2Mutation.js +1 -0
- package/esm/graphql/operations/EditSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/FileUploadedMutation.js +3 -0
- package/esm/graphql/operations/FlagQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/FlagQuestionMutation.js +1 -0
- package/esm/graphql/operations/FlagReviewAnswerMutation.js +1 -0
- package/esm/graphql/operations/FlagReviewMutation.js +1 -0
- package/esm/graphql/operations/GetBrandingQuery.js +7 -0
- package/esm/graphql/operations/GetCartQuery.js +23 -0
- package/esm/graphql/operations/GetCustomerAddressesPageDataQuery.js +13 -0
- package/esm/graphql/operations/GetCustomerBalanceHistoryPageQuery.js +3 -0
- package/esm/graphql/operations/GetCustomerBalanceQuery.js +5 -0
- package/esm/graphql/operations/GetCustomerInfoQuery.js +7 -0
- package/esm/graphql/operations/GetCustomerQuery.js +5 -0
- package/esm/graphql/operations/GetFavoritesQuery.js +19 -0
- package/esm/graphql/operations/GetFileStatusQuery.js +3 -0
- package/esm/graphql/operations/GetGatewaysQuery.js +11 -0
- package/esm/graphql/operations/GetInfoCurrenciesQuery.js +3 -0
- package/esm/graphql/operations/GetLastCartQuery.js +23 -0
- package/esm/graphql/operations/GetOrderQuery.js +27 -0
- package/esm/graphql/operations/GetOrdersPageQuery.js +21 -0
- package/esm/graphql/operations/GetPaymentMethodsPageDataQuery.js +15 -0
- package/esm/graphql/operations/GetProductQuestionsPageQuery.js +7 -0
- package/esm/graphql/operations/GetProductReviewImagesPageQuery.js +5 -0
- package/esm/graphql/operations/GetProductReviewsPageQuery.js +17 -0
- package/esm/graphql/operations/GetProvincesQuery.js +3 -0
- package/esm/graphql/operations/GetQuestionQuery.js +5 -0
- package/esm/graphql/operations/GetReturnCreationInfoQuery.js +33 -0
- package/esm/graphql/operations/GetReturnQuery.js +25 -0
- package/esm/graphql/operations/GetReturnsPageQuery.js +19 -0
- package/esm/graphql/operations/GetReviewDimensionsQuery.js +3 -0
- package/esm/graphql/operations/GetReviewQuery.js +15 -0
- package/esm/graphql/operations/GetReviewSettingsQuery.js +9 -0
- package/esm/graphql/operations/GetShopCurrenciesQuery.js +3 -0
- package/esm/graphql/operations/GetShopQuery.js +5 -0
- package/esm/graphql/operations/GetSubscriptionQuery.js +33 -0
- package/esm/graphql/operations/GetSubscriptionsPageQuery.js +19 -0
- package/esm/graphql/operations/GetVariantPageQuery.js +17 -0
- package/esm/graphql/operations/LoadProductNoCustomerQuery.js +59 -0
- package/esm/graphql/operations/LoadProductQuery.js +63 -0
- package/esm/graphql/operations/ModifyCartMutation.js +23 -0
- package/esm/graphql/operations/ModifyCustomerMutation.js +5 -0
- package/esm/graphql/operations/ModifyFavoriteMutation.js +19 -0
- package/esm/graphql/operations/ModifyProductQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/ModifyProductQuestionMutation.js +5 -0
- package/esm/graphql/operations/ModifyProductReviewMutation.js +15 -0
- package/esm/graphql/operations/NewPasswordMutation.js +1 -0
- package/esm/graphql/operations/PauseSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/ResetPasswordMutation.js +1 -0
- package/esm/graphql/operations/ResumeSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/SearchProductsAdvancedQuery.js +21 -0
- package/esm/graphql/operations/SearchProductsQuery.js +17 -0
- package/esm/graphql/operations/SearchQuestionsQuery.js +5 -0
- package/esm/graphql/operations/SearchReviewsQuery.js +15 -0
- package/esm/graphql/operations/SignInMutation.js +1 -0
- package/esm/graphql/operations/SignInViaEmailCompleteMutation.js +1 -0
- package/esm/graphql/operations/SignInViaEmailInitMutation.js +1 -0
- package/esm/graphql/operations/SignUpMutation.js +1 -0
- package/esm/graphql/operations/SkipNextSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/UploadFileMutation.js +1 -0
- package/esm/graphql/operations/VerifyCodeMutation.js +1 -0
- package/esm/graphql/operations/VoteQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/VoteQuestionMutation.js +1 -0
- package/esm/graphql/operations/VoteReviewAnswerMutation.js +1 -0
- package/esm/graphql/operations/VoteReviewMutation.js +1 -0
- package/esm/graphql/types.js +1 -0
- package/esm/hierarchicalSearchOption.js +43 -0
- package/esm/idgen.js +4 -0
- package/esm/ignoreQueue.js +45 -0
- package/esm/imageAltProps.js +9 -0
- package/esm/invoiceFormat.js +54 -0
- package/esm/isShippingRequired.js +16 -0
- package/esm/isoStripTrailingZeros.js +3 -0
- package/esm/json/commerce.js +3 -0
- package/esm/json/commerceFileUpload.js +43 -0
- package/esm/json/commerceTypes.js +1 -0
- package/esm/json/common.js +309 -0
- package/esm/json/fetchAllItems.js +51 -0
- package/esm/json/mutator.js +952 -0
- package/esm/json/storefront.js +3 -0
- package/esm/json/storefrontTypes.js +1 -0
- package/esm/lastValue.js +12 -0
- package/esm/lineItemPrice.js +106 -0
- package/esm/loadJWT.js +20 -0
- package/esm/mapInvalidInput.js +27 -0
- package/esm/mapResponseData.js +11 -0
- package/esm/mapResponseMultiData.js +10 -0
- package/esm/meanBy.js +11 -0
- package/esm/media.js +12 -0
- package/esm/modules/advancedSearch.js +132 -0
- package/esm/modules/cart.js +699 -0
- package/esm/modules/config/defaultAdvancedSearchGraphQLConfig.js +4 -0
- package/esm/modules/config/defaultCartGraphQLConfig.js +10 -0
- package/esm/modules/config/defaultProductGraphQLConfig.js +44 -0
- package/esm/modules/config/defaultSearchGraphQLConfig.js +4 -0
- package/esm/modules/customer.js +2198 -0
- package/esm/modules/helpers/cartInitOption.js +18 -0
- package/esm/modules/helpers/cookieConsent.js +29 -0
- package/esm/modules/helpers/customerOauth2.js +53 -0
- package/esm/modules/helpers/getOAuth2Hook.js +48 -0
- package/esm/modules/helpers/hookUpAnalytics.js +44 -0
- package/esm/modules/helpers/loadJWT.js +18 -0
- package/esm/modules/helpers/misc.js +49 -0
- package/esm/modules/imageDialog.js +71 -0
- package/esm/modules/persist.js +49 -0
- package/esm/modules/popupMessage.js +17 -0
- package/esm/modules/product.js +1278 -0
- package/esm/modules/recentlyVisitedProducts.js +70 -0
- package/esm/modules/search.js +103 -0
- package/esm/multiResponseToResponse.js +18 -0
- package/esm/nonNull.js +6 -0
- package/esm/oauthState.js +35 -0
- package/esm/orderShippingAddress.js +3 -0
- package/esm/package.json +3 -0
- package/esm/pender.js +11 -0
- package/esm/percentageOff.js +3 -0
- package/esm/popupConnectQueue.js +55 -0
- package/esm/preact/components/SixDigitInput.js +159 -0
- package/esm/preact/effector.js +69 -0
- package/esm/preact/transition/CSSTransition.js +47 -0
- package/esm/preact/transition/Transition.js +100 -0
- package/esm/preact/translateLocalStatic.js +26 -0
- package/esm/productFiltering.js +164 -0
- package/esm/productSEO.js +46 -0
- package/esm/productSorting.js +89 -0
- package/esm/promiseAll.js +11 -0
- package/esm/promiseLimit.js +32 -0
- package/esm/rdsToInitialScores.js +27 -0
- package/esm/react/components/Portal.js +2 -0
- package/esm/react/components/RootCloseWrapper.js +33 -0
- package/esm/react/components/SixDigitInput.js +158 -0
- package/esm/react/contains.js +10 -0
- package/esm/react/popperBinder.js +71 -0
- package/esm/react/rootClose.js +106 -0
- package/esm/react/translateLocalStatic.js +26 -0
- package/esm/react/useAsyncCachedValue.js +10 -0
- package/esm/refreshTimeout.js +21 -0
- package/esm/remoteAuth.js +52 -0
- package/esm/request.js +323 -0
- package/esm/requestDetails.js +69 -0
- package/esm/rfc3339Normalize.js +6 -0
- package/esm/script.js +157 -0
- package/esm/seo.js +1 -0
- package/esm/shopDomain.js +4 -0
- package/esm/shopLinks.js +47 -0
- package/esm/slate.js +364 -0
- package/esm/sleep.js +3 -0
- package/esm/splitBy.js +17 -0
- package/esm/splitName.js +22 -0
- package/esm/stripZeros.js +9 -0
- package/esm/stripeError.js +53 -0
- package/esm/tailSplit.js +8 -0
- package/esm/tieredPrice.js +28 -0
- package/esm/timeIt.js +8 -0
- package/esm/toMajor.js +4 -0
- package/esm/toMinor.js +4 -0
- package/esm/trace.js +37 -0
- package/esm/translateLocale.js +7 -0
- package/esm/traverse.js +10 -0
- package/esm/truncate.js +17 -0
- package/esm/typedLocalStorage.js +24 -0
- package/esm/variantImage.js +22 -0
- package/esm/variantImageURL.js +9 -0
- package/esm/variantImages.js +15 -0
- package/esm/variantInventory.js +38 -0
- package/esm/variantOptions.js +15 -0
- package/esm/variantPrice.js +92 -0
- package/esm/variantPriceCommerce.js +25 -0
- package/esm/variantTitle.js +5 -0
- package/esm/variantTitleFull.js +7 -0
- package/esm/variantURL.js +5 -0
- package/esm/vendor/popper/index.d.ts +160 -0
- package/esm/vendor/popper/index.js +2657 -0
- package/esm/vendor/popper/index.js.map +1 -0
- package/esm/vendor/popper/package.json +3 -0
- package/esm/websocket.js +169 -0
- package/package.json +92 -0
- package/types/actionLock.d.ts +7 -0
- package/types/addEmptyListItem.d.ts +2 -0
- package/types/aggregateOptions.d.ts +33 -0
- package/types/analytics.d.ts +23 -0
- package/types/analyticsProductData.d.ts +38 -0
- package/types/arrayToDict.d.ts +2 -0
- package/types/asyncModuleWrapper.d.ts +13 -0
- package/types/averageReviewScore.d.ts +28 -0
- package/types/buildconfig.d.ts +13 -0
- package/types/cachedLoader.d.ts +10 -0
- package/types/canonicalVariantURL.d.ts +12 -0
- package/types/cartOperation.d.ts +28 -0
- package/types/categorySEO.d.ts +17 -0
- package/types/commonTypes.d.ts +10 -0
- package/types/compact.d.ts +1 -0
- package/types/configLoader.d.ts +53 -0
- package/types/controlledQueue.d.ts +17 -0
- package/types/convertImageURL.d.ts +9 -0
- package/types/dataLoader.d.ts +301 -0
- package/types/defaultVariant.d.ts +9 -0
- package/types/effector/clearOnChangeAfterDelay.d.ts +2 -0
- package/types/effector/combineEvery.d.ts +2 -0
- package/types/effector/combineSome.d.ts +2 -0
- package/types/effector/debounced.d.ts +2 -0
- package/types/effector/form.d.ts +74 -0
- package/types/effector/hideOnChangeAfterDelay.d.ts +6 -0
- package/types/effector/requestResponse.d.ts +9 -0
- package/types/effector/requestResponseMulti.d.ts +7 -0
- package/types/effector/restoreNamed.d.ts +2 -0
- package/types/effector/split.d.ts +7 -0
- package/types/effector/validator.d.ts +14 -0
- package/types/effector/wrapSignInRequired.d.ts +2 -0
- package/types/exceptions.d.ts +2 -0
- package/types/fetchAllItems.d.ts +25 -0
- package/types/file.d.ts +4 -0
- package/types/fileWebsocket.d.ts +6 -0
- package/types/filterFunc.d.ts +8 -0
- package/types/filterFuncBrand.d.ts +3 -0
- package/types/filterFuncCategory.d.ts +3 -0
- package/types/filterFuncContentBlock.d.ts +3 -0
- package/types/filterFuncCustomer.d.ts +3 -0
- package/types/filterFuncDataFeed.d.ts +8 -0
- package/types/filterFuncOrder.d.ts +3 -0
- package/types/filterFuncPreprocess.d.ts +2 -0
- package/types/filterFuncProduct.d.ts +3 -0
- package/types/filterFuncPurchaseOrder.d.ts +3 -0
- package/types/filterFuncSupplier.d.ts +3 -0
- package/types/filterFuncTransfer.d.ts +3 -0
- package/types/formatAbbrevNumber.d.ts +6 -0
- package/types/formatCurrency.d.ts +44 -0
- package/types/formatToJSX.d.ts +24 -0
- package/types/fulfillmentNumber.d.ts +1 -0
- package/types/generateRandomToken.d.ts +1 -0
- package/types/generateUUID.d.ts +1 -0
- package/types/generated/codes.d.ts +234 -0
- package/types/genericFile.d.ts +57 -0
- package/types/getSalesChannelID.d.ts +1 -0
- package/types/getSessionID.d.ts +1 -0
- package/types/getTimezone.d.ts +1 -0
- package/types/graphql/fragments/Branding.d.ts +2 -0
- package/types/graphql/fragments/BrandingField.d.ts +2 -0
- package/types/graphql/fragments/CartCustomItem.d.ts +2 -0
- package/types/graphql/fragments/CartOrder.d.ts +2 -0
- package/types/graphql/fragments/CartVariant.d.ts +2 -0
- package/types/graphql/fragments/CartVariantFull.d.ts +2 -0
- package/types/graphql/fragments/Category.d.ts +2 -0
- package/types/graphql/fragments/CommonCartVariant.d.ts +2 -0
- package/types/graphql/fragments/Currency.d.ts +2 -0
- package/types/graphql/fragments/CurrencyPrice.d.ts +2 -0
- package/types/graphql/fragments/CustomField.d.ts +2 -0
- package/types/graphql/fragments/CustomFieldObjects.d.ts +2 -0
- package/types/graphql/fragments/Customer.d.ts +2 -0
- package/types/graphql/fragments/CustomerBalance.d.ts +2 -0
- package/types/graphql/fragments/CustomerBalanceHistory.d.ts +2 -0
- package/types/graphql/fragments/CustomerFavorite.d.ts +2 -0
- package/types/graphql/fragments/CustomerFavoriteShort.d.ts +2 -0
- package/types/graphql/fragments/CustomerOAuthProvider.d.ts +2 -0
- package/types/graphql/fragments/CustomerOrderBrief.d.ts +2 -0
- package/types/graphql/fragments/CustomerOrderFulfillment.d.ts +2 -0
- package/types/graphql/fragments/CustomerOrderFull.d.ts +2 -0
- package/types/graphql/fragments/CustomerPaymentSource.d.ts +2 -0
- package/types/graphql/fragments/CustomerReturnBrief.d.ts +2 -0
- package/types/graphql/fragments/CustomerReturnFull.d.ts +2 -0
- package/types/graphql/fragments/CustomerReturnPolicy.d.ts +2 -0
- package/types/graphql/fragments/CustomerSubscriptionBrief.d.ts +2 -0
- package/types/graphql/fragments/CustomerSubscriptionFull.d.ts +2 -0
- package/types/graphql/fragments/File.d.ts +2 -0
- package/types/graphql/fragments/FileForUpload.d.ts +2 -0
- package/types/graphql/fragments/FileNoFallback.d.ts +2 -0
- package/types/graphql/fragments/FullAddress.d.ts +2 -0
- package/types/graphql/fragments/Gateway.d.ts +2 -0
- package/types/graphql/fragments/GatewayManual.d.ts +2 -0
- package/types/graphql/fragments/GatewayPaypal.d.ts +2 -0
- package/types/graphql/fragments/GatewayStripe.d.ts +2 -0
- package/types/graphql/fragments/GatewayTest.d.ts +2 -0
- package/types/graphql/fragments/IPAndUAInfo.d.ts +2 -0
- package/types/graphql/fragments/InfoCountry.d.ts +2 -0
- package/types/graphql/fragments/InfoCountryDedupField.d.ts +2 -0
- package/types/graphql/fragments/InfoCurrency.d.ts +2 -0
- package/types/graphql/fragments/InfoProvince.d.ts +2 -0
- package/types/graphql/fragments/KeyValue.d.ts +2 -0
- package/types/graphql/fragments/LineItemField.d.ts +2 -0
- package/types/graphql/fragments/MediaFile.d.ts +2 -0
- package/types/graphql/fragments/MinCurrencyPrice.d.ts +2 -0
- package/types/graphql/fragments/ProductField.d.ts +2 -0
- package/types/graphql/fragments/ProductFieldSet.d.ts +2 -0
- package/types/graphql/fragments/ProductFlat.d.ts +2 -0
- package/types/graphql/fragments/ProductQuestion.d.ts +2 -0
- package/types/graphql/fragments/ProductQuestionAnswer.d.ts +2 -0
- package/types/graphql/fragments/ProductQuestionPage.d.ts +2 -0
- package/types/graphql/fragments/ProductReview.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewAnswer.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewAverageScore.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewPage.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewScore.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewSurveyAnswer.d.ts +2 -0
- package/types/graphql/fragments/ProductSearchOptionAgg.d.ts +2 -0
- package/types/graphql/fragments/ProductSearchResult.d.ts +2 -0
- package/types/graphql/fragments/ReturnReason.d.ts +2 -0
- package/types/graphql/fragments/ReviewDimension.d.ts +2 -0
- package/types/graphql/fragments/ReviewDimensionSet.d.ts +2 -0
- package/types/graphql/fragments/ReviewImagePage.d.ts +2 -0
- package/types/graphql/fragments/ReviewQuestionProduct.d.ts +2 -0
- package/types/graphql/fragments/ReviewSettings.d.ts +2 -0
- package/types/graphql/fragments/SearchProduct.d.ts +2 -0
- package/types/graphql/fragments/Shop.d.ts +2 -0
- package/types/graphql/fragments/SubscriptionPlan.d.ts +2 -0
- package/types/graphql/fragments/SurveyQuestion.d.ts +2 -0
- package/types/graphql/fragments/TieredPricing.d.ts +2 -0
- package/types/graphql/fragments/TieredPricingTier.d.ts +2 -0
- package/types/graphql/fragments/VariantOption.d.ts +2 -0
- package/types/graphql/operations/ApplyGiftCardMutation.d.ts +3 -0
- package/types/graphql/operations/AuthRequestMutation.d.ts +3 -0
- package/types/graphql/operations/CancelOrderMutation.d.ts +3 -0
- package/types/graphql/operations/CancelSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/ConnectOAuth2Mutation.d.ts +3 -0
- package/types/graphql/operations/CreateCartMutation.d.ts +3 -0
- package/types/graphql/operations/CreateFavoriteMutation.d.ts +3 -0
- package/types/graphql/operations/CreateFileMutation.d.ts +3 -0
- package/types/graphql/operations/CreatePaymentSourceMutation.d.ts +3 -0
- package/types/graphql/operations/CreateProductQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/CreateProductQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/CreateProductReviewMutation.d.ts +3 -0
- package/types/graphql/operations/CreateReturnMutation.d.ts +3 -0
- package/types/graphql/operations/DeleteFavoriteMutation.d.ts +3 -0
- package/types/graphql/operations/DeletePaymentSourceMutation.d.ts +3 -0
- package/types/graphql/operations/DeleteProductQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/DeleteProductQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/DeleteProductReviewMutation.d.ts +3 -0
- package/types/graphql/operations/DisconnectOAuth2Mutation.d.ts +3 -0
- package/types/graphql/operations/EditSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/FileUploadedMutation.d.ts +3 -0
- package/types/graphql/operations/FlagQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/FlagQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/FlagReviewAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/FlagReviewMutation.d.ts +3 -0
- package/types/graphql/operations/GetBrandingQuery.d.ts +3 -0
- package/types/graphql/operations/GetCartQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerAddressesPageDataQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerBalanceHistoryPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerBalanceQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerInfoQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerQuery.d.ts +3 -0
- package/types/graphql/operations/GetFavoritesQuery.d.ts +3 -0
- package/types/graphql/operations/GetFileStatusQuery.d.ts +3 -0
- package/types/graphql/operations/GetGatewaysQuery.d.ts +3 -0
- package/types/graphql/operations/GetInfoCurrenciesQuery.d.ts +3 -0
- package/types/graphql/operations/GetLastCartQuery.d.ts +3 -0
- package/types/graphql/operations/GetOrderQuery.d.ts +3 -0
- package/types/graphql/operations/GetOrdersPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetPaymentMethodsPageDataQuery.d.ts +3 -0
- package/types/graphql/operations/GetProductQuestionsPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetProductReviewImagesPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetProductReviewsPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetProvincesQuery.d.ts +3 -0
- package/types/graphql/operations/GetQuestionQuery.d.ts +3 -0
- package/types/graphql/operations/GetReturnCreationInfoQuery.d.ts +3 -0
- package/types/graphql/operations/GetReturnQuery.d.ts +3 -0
- package/types/graphql/operations/GetReturnsPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetReviewDimensionsQuery.d.ts +3 -0
- package/types/graphql/operations/GetReviewQuery.d.ts +3 -0
- package/types/graphql/operations/GetReviewSettingsQuery.d.ts +3 -0
- package/types/graphql/operations/GetShopCurrenciesQuery.d.ts +3 -0
- package/types/graphql/operations/GetShopQuery.d.ts +3 -0
- package/types/graphql/operations/GetSubscriptionQuery.d.ts +3 -0
- package/types/graphql/operations/GetSubscriptionsPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetVariantPageQuery.d.ts +3 -0
- package/types/graphql/operations/LoadProductNoCustomerQuery.d.ts +3 -0
- package/types/graphql/operations/LoadProductQuery.d.ts +3 -0
- package/types/graphql/operations/ModifyCartMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyCustomerMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyFavoriteMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyProductQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyProductQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyProductReviewMutation.d.ts +3 -0
- package/types/graphql/operations/NewPasswordMutation.d.ts +3 -0
- package/types/graphql/operations/PauseSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/ResetPasswordMutation.d.ts +3 -0
- package/types/graphql/operations/ResumeSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/SearchProductsAdvancedQuery.d.ts +3 -0
- package/types/graphql/operations/SearchProductsQuery.d.ts +3 -0
- package/types/graphql/operations/SearchQuestionsQuery.d.ts +3 -0
- package/types/graphql/operations/SearchReviewsQuery.d.ts +3 -0
- package/types/graphql/operations/SignInMutation.d.ts +3 -0
- package/types/graphql/operations/SignInViaEmailCompleteMutation.d.ts +3 -0
- package/types/graphql/operations/SignInViaEmailInitMutation.d.ts +3 -0
- package/types/graphql/operations/SignUpMutation.d.ts +3 -0
- package/types/graphql/operations/SkipNextSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/UploadFileMutation.d.ts +3 -0
- package/types/graphql/operations/VerifyCodeMutation.d.ts +3 -0
- package/types/graphql/operations/VoteQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/VoteQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/VoteReviewAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/VoteReviewMutation.d.ts +3 -0
- package/types/graphql/types.d.ts +2471 -0
- package/types/hierarchicalSearchOption.d.ts +14 -0
- package/types/idgen.d.ts +1 -0
- package/types/ignoreQueue.d.ts +10 -0
- package/types/imageAltProps.d.ts +11 -0
- package/types/invoiceFormat.d.ts +32 -0
- package/types/isShippingRequired.d.ts +14 -0
- package/types/isoStripTrailingZeros.d.ts +1 -0
- package/types/json/commerce.d.ts +3 -0
- package/types/json/commerceFileUpload.d.ts +20 -0
- package/types/json/commerceTypes.d.ts +15422 -0
- package/types/json/common.d.ts +81 -0
- package/types/json/fetchAllItems.d.ts +15 -0
- package/types/json/mutator.d.ts +238 -0
- package/types/json/storefront.d.ts +3 -0
- package/types/json/storefrontTypes.d.ts +5059 -0
- package/types/lastValue.d.ts +10 -0
- package/types/lineItemPrice.d.ts +18 -0
- package/types/loadJWT.d.ts +1 -0
- package/types/mapInvalidInput.d.ts +15 -0
- package/types/mapResponseData.d.ts +3 -0
- package/types/mapResponseMultiData.d.ts +2 -0
- package/types/meanBy.d.ts +1 -0
- package/types/media.d.ts +3 -0
- package/types/modules/advancedSearch.d.ts +78 -0
- package/types/modules/cart.d.ts +263 -0
- package/types/modules/config/defaultAdvancedSearchGraphQLConfig.d.ts +3 -0
- package/types/modules/config/defaultCartGraphQLConfig.d.ts +6 -0
- package/types/modules/config/defaultProductGraphQLConfig.d.ts +23 -0
- package/types/modules/config/defaultSearchGraphQLConfig.d.ts +3 -0
- package/types/modules/customer.d.ts +624 -0
- package/types/modules/helpers/cartInitOption.d.ts +2 -0
- package/types/modules/helpers/cookieConsent.d.ts +4 -0
- package/types/modules/helpers/customerOauth2.d.ts +19 -0
- package/types/modules/helpers/getOAuth2Hook.d.ts +22 -0
- package/types/modules/helpers/hookUpAnalytics.d.ts +21 -0
- package/types/modules/helpers/loadJWT.d.ts +1 -0
- package/types/modules/helpers/misc.d.ts +14 -0
- package/types/modules/imageDialog.d.ts +31 -0
- package/types/modules/persist.d.ts +13 -0
- package/types/modules/popupMessage.d.ts +9 -0
- package/types/modules/product.d.ts +320 -0
- package/types/modules/recentlyVisitedProducts.d.ts +25 -0
- package/types/modules/search.d.ts +54 -0
- package/types/multiResponseToResponse.d.ts +2 -0
- package/types/nonNull.d.ts +1 -0
- package/types/oauthState.d.ts +3 -0
- package/types/orderShippingAddress.d.ts +6 -0
- package/types/pender.d.ts +5 -0
- package/types/percentageOff.d.ts +1 -0
- package/types/popupConnectQueue.d.ts +41 -0
- package/types/preact/components/SixDigitInput.d.ts +28 -0
- package/types/preact/effector.d.ts +8 -0
- package/types/preact/transition/CSSTransition.d.ts +8 -0
- package/types/preact/transition/Transition.d.ts +30 -0
- package/types/preact/translateLocalStatic.d.ts +4 -0
- package/types/productFiltering.d.ts +58 -0
- package/types/productSEO.d.ts +59 -0
- package/types/productSorting.d.ts +35 -0
- package/types/promiseAll.d.ts +5 -0
- package/types/promiseLimit.d.ts +13 -0
- package/types/rdsToInitialScores.d.ts +26 -0
- package/types/react/components/Portal.d.ts +2 -0
- package/types/react/components/RootCloseWrapper.d.ts +18 -0
- package/types/react/components/SixDigitInput.d.ts +27 -0
- package/types/react/contains.d.ts +1 -0
- package/types/react/popperBinder.d.ts +23 -0
- package/types/react/rootClose.d.ts +18 -0
- package/types/react/translateLocalStatic.d.ts +4 -0
- package/types/react/useAsyncCachedValue.d.ts +2 -0
- package/types/refreshTimeout.d.ts +5 -0
- package/types/remoteAuth.d.ts +14 -0
- package/types/request.d.ts +104 -0
- package/types/requestDetails.d.ts +16 -0
- package/types/rfc3339Normalize.d.ts +1 -0
- package/types/script.d.ts +36 -0
- package/types/seo.d.ts +5 -0
- package/types/shopDomain.d.ts +7 -0
- package/types/shopLinks.d.ts +14 -0
- package/types/slate.d.ts +47 -0
- package/types/sleep.d.ts +1 -0
- package/types/splitBy.d.ts +1 -0
- package/types/splitName.d.ts +2 -0
- package/types/stripZeros.d.ts +1 -0
- package/types/stripeError.d.ts +14 -0
- package/types/tailSplit.d.ts +1 -0
- package/types/tieredPrice.d.ts +2 -0
- package/types/timeIt.d.ts +1 -0
- package/types/toMajor.d.ts +8 -0
- package/types/toMinor.d.ts +8 -0
- package/types/trace.d.ts +17 -0
- package/types/translateLocale.d.ts +2 -0
- package/types/traverse.d.ts +1 -0
- package/types/truncate.d.ts +7 -0
- package/types/typedLocalStorage.d.ts +3 -0
- package/types/variantImage.d.ts +16 -0
- package/types/variantImageURL.d.ts +25 -0
- package/types/variantImages.d.ts +11 -0
- package/types/variantInventory.d.ts +14 -0
- package/types/variantOptions.d.ts +18 -0
- package/types/variantPrice.d.ts +37 -0
- package/types/variantPriceCommerce.d.ts +26 -0
- package/types/variantTitle.d.ts +7 -0
- package/types/variantTitleFull.d.ts +11 -0
- package/types/variantURL.d.ts +7 -0
- package/types/websocket.d.ts +33 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Dict } from "./commonTypes.js";
|
|
2
|
+
export interface VariantLike {
|
|
3
|
+
id: string;
|
|
4
|
+
options: {
|
|
5
|
+
option_id: string;
|
|
6
|
+
option_value_id: string;
|
|
7
|
+
}[];
|
|
8
|
+
}
|
|
9
|
+
export interface Option {
|
|
10
|
+
key: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface OptionSet {
|
|
14
|
+
variantID: string;
|
|
15
|
+
options: Option[];
|
|
16
|
+
}
|
|
17
|
+
export interface AggregatedOptions {
|
|
18
|
+
uniqueOptionIDs: string[];
|
|
19
|
+
sets: OptionSet[];
|
|
20
|
+
perOptionValues: Dict<string[]>;
|
|
21
|
+
enabledValues: Dict<Dict<boolean>>;
|
|
22
|
+
}
|
|
23
|
+
export declare function matchVariant<T extends VariantLike>(variants: T[], selected: Dict<string>): T | undefined;
|
|
24
|
+
export declare function closestVariantIDs(opts: AggregatedOptions, selected: Dict<string>): string[];
|
|
25
|
+
interface State {
|
|
26
|
+
enabledValues: Dict<Dict<boolean>>;
|
|
27
|
+
selected: Dict<string>;
|
|
28
|
+
variantID: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function restrictSelected(opts: AggregatedOptions, selected: Dict<string>, key: string, val: string): State;
|
|
31
|
+
export declare function selectVariantID(opts: AggregatedOptions, variantID: string): State;
|
|
32
|
+
export declare function aggregateOptions(variants: VariantLike[]): AggregatedOptions;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AnalyticsProductData } from "./analyticsProductData.js";
|
|
2
|
+
export declare function identify(id: string): void;
|
|
3
|
+
export interface AnalyticsPromotionData {
|
|
4
|
+
promotion_id: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
creative?: string;
|
|
7
|
+
position?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function promotionClicked(promotion: AnalyticsPromotionData): void;
|
|
10
|
+
export declare function productClicked(product: AnalyticsProductData): void;
|
|
11
|
+
export declare function productsSearched(query: string): void;
|
|
12
|
+
export interface CartLineItem {
|
|
13
|
+
quantity: number;
|
|
14
|
+
product: AnalyticsProductData;
|
|
15
|
+
}
|
|
16
|
+
export declare function cartViewed(orderID: string, products: CartLineItem[]): void;
|
|
17
|
+
export declare function productListViewed(categoryID: string, categoryName: string, products: AnalyticsProductData[]): void;
|
|
18
|
+
export declare function productViewed(product: AnalyticsProductData): void;
|
|
19
|
+
export declare function wishlistAdded(product: AnalyticsProductData): void;
|
|
20
|
+
export declare function wishlistRemoved(product: AnalyticsProductData): void;
|
|
21
|
+
export declare function productAdded(orderID: string, quantity: number, product: AnalyticsProductData): void;
|
|
22
|
+
export declare function productRemoved(orderID: string, quantity: number, product: AnalyticsProductData): void;
|
|
23
|
+
export declare function page(): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CanonicalVariantURLFunc } from "./canonicalVariantURL.js";
|
|
2
|
+
import type { CurrencyFragment } from "./graphql/types.js";
|
|
3
|
+
import type { Dict } from "./commonTypes.js";
|
|
4
|
+
import { VariantPricer } from "./variantPrice.js";
|
|
5
|
+
export interface VariantLike extends VariantPricer {
|
|
6
|
+
id: string;
|
|
7
|
+
sku: string;
|
|
8
|
+
product: {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
handle: string;
|
|
12
|
+
} | null;
|
|
13
|
+
media_files: ({
|
|
14
|
+
file: {
|
|
15
|
+
public_url: string;
|
|
16
|
+
mime: string;
|
|
17
|
+
} | null;
|
|
18
|
+
} | null)[] | null;
|
|
19
|
+
}
|
|
20
|
+
export interface AnalyticsProductData {
|
|
21
|
+
product_id: string;
|
|
22
|
+
sku: string;
|
|
23
|
+
category?: string;
|
|
24
|
+
name: string;
|
|
25
|
+
price?: number;
|
|
26
|
+
currency: string;
|
|
27
|
+
url?: string;
|
|
28
|
+
image_url: string;
|
|
29
|
+
}
|
|
30
|
+
interface Environment {
|
|
31
|
+
cdn: string;
|
|
32
|
+
currency: string;
|
|
33
|
+
shopCurrency: string;
|
|
34
|
+
shopCurrencies: Dict<CurrencyFragment>;
|
|
35
|
+
canonicalVariantURL: CanonicalVariantURLFunc | null;
|
|
36
|
+
}
|
|
37
|
+
export declare function analyticsProductData(env: Environment, variant: VariantLike | null | undefined, variantID?: string): AnalyticsProductData;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface Import<Config, M> {
|
|
2
|
+
load(v: Config): Promise<M> | M;
|
|
3
|
+
}
|
|
4
|
+
export type MethodsOnly<T extends object> = Pick<T, {
|
|
5
|
+
[K in keyof T]-?: T[K] extends (...args: any) => any ? K : never;
|
|
6
|
+
}[keyof T]>;
|
|
7
|
+
export type ModuleWrapper<Config, M extends object> = MethodsOnly<M> & {
|
|
8
|
+
load(v: Config): void;
|
|
9
|
+
loadOnce(v: Config): Promise<M>;
|
|
10
|
+
afterLoad(): Promise<M>;
|
|
11
|
+
};
|
|
12
|
+
export declare function asyncImportWrapper<Config, M extends object>(load: () => Promise<Import<Config, M>>): ModuleWrapper<Config, M>;
|
|
13
|
+
export declare function asyncModuleWrapper<Config, M extends object>(load: (v: Config) => Promise<M>): ModuleWrapper<Config, M>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface ReviewDimension {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
interface ReviewDimensionSet {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
overall_review_dimension: ReviewDimension | null;
|
|
9
|
+
review_dimensions: Array<ReviewDimension | null> | null;
|
|
10
|
+
}
|
|
11
|
+
interface ReviewSettingsLike {
|
|
12
|
+
default_review_dimension_set: ReviewDimensionSet | null;
|
|
13
|
+
}
|
|
14
|
+
interface ProductLike {
|
|
15
|
+
review_dimension_set: ReviewDimensionSet | null;
|
|
16
|
+
average_scores: {
|
|
17
|
+
count: number;
|
|
18
|
+
histogram: Array<{
|
|
19
|
+
key: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}>;
|
|
22
|
+
review_dimension: ReviewDimension | null;
|
|
23
|
+
score: number;
|
|
24
|
+
sum: number;
|
|
25
|
+
}[];
|
|
26
|
+
}
|
|
27
|
+
export declare function averageReviewScore(product: ProductLike, reviewSettings: ReviewSettingsLike): number;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const BUILD_CONFIG: {
|
|
2
|
+
ANALYTICS_INTEGRATION_NAME: string;
|
|
3
|
+
API_URL: string;
|
|
4
|
+
APP_DOMAIN: string;
|
|
5
|
+
BEACON_URL: string;
|
|
6
|
+
CDN_URL: string;
|
|
7
|
+
SLATE_CLASS_PREFIX: string;
|
|
8
|
+
UI_LIB_GLOBAL: string;
|
|
9
|
+
UI_LIB: string;
|
|
10
|
+
WS_URL: string;
|
|
11
|
+
POPUP_CONNECT_QUEUE_KEY: string;
|
|
12
|
+
AUTH_KEY: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class CachedLoader<T, A = void> {
|
|
2
|
+
private _loader;
|
|
3
|
+
private _promise;
|
|
4
|
+
private _value;
|
|
5
|
+
private _initQueue;
|
|
6
|
+
constructor(_loader: (a: A) => Promise<T>);
|
|
7
|
+
get value(): T | undefined;
|
|
8
|
+
load(a: A): Promise<T>;
|
|
9
|
+
onLoad(callback: (v: T) => void): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CanonicalVariantURLInfo {
|
|
2
|
+
variantID: string;
|
|
3
|
+
variantSKU: string;
|
|
4
|
+
productID: string;
|
|
5
|
+
productHandle: string;
|
|
6
|
+
}
|
|
7
|
+
export type CanonicalVariantURLFunc = (info: CanonicalVariantURLInfo) => string;
|
|
8
|
+
export type GoToVariantFunc = (info: CanonicalVariantURLInfo) => void;
|
|
9
|
+
export interface Hooks {
|
|
10
|
+
goToVariant: GoToVariantFunc | null;
|
|
11
|
+
canonicalVariantURL: CanonicalVariantURLFunc | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LineItemFieldCreate } from "./graphql/types.js";
|
|
2
|
+
export interface CartChangeOperation<Variant> {
|
|
3
|
+
kind: "change";
|
|
4
|
+
variantID: string;
|
|
5
|
+
variant: Variant | undefined;
|
|
6
|
+
quantityDelta: number;
|
|
7
|
+
fieldSetID?: string;
|
|
8
|
+
fields?: LineItemFieldCreate[];
|
|
9
|
+
subscriptionPlanIndex?: number;
|
|
10
|
+
customItemIndex?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface CartSetOperation<Variant> {
|
|
13
|
+
kind: "set";
|
|
14
|
+
variantID: string;
|
|
15
|
+
variant: Variant | undefined;
|
|
16
|
+
quantity: number;
|
|
17
|
+
fieldSetID?: string;
|
|
18
|
+
fields?: LineItemFieldCreate[];
|
|
19
|
+
subscriptionPlanIndex?: number;
|
|
20
|
+
customItemIndex?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface CartRemoveOperation {
|
|
23
|
+
kind: "remove";
|
|
24
|
+
variantID: string;
|
|
25
|
+
}
|
|
26
|
+
export type CartOperation<Variant> = CartChangeOperation<Variant> | CartSetOperation<Variant> | CartRemoveOperation;
|
|
27
|
+
export declare function filterOutNonCreateOpertions<Variant>(ops: CartOperation<Variant>[]): CartSetOperation<Variant>[];
|
|
28
|
+
export declare function compactCartOperations<Variant>(operations: CartOperation<Variant>[]): CartOperation<Variant>[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SEOMeta } from "./seo.js";
|
|
2
|
+
interface CategoryLike {
|
|
3
|
+
id: string;
|
|
4
|
+
handle: string;
|
|
5
|
+
image_files: Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
mime: string;
|
|
8
|
+
public_url: string;
|
|
9
|
+
} | null> | null;
|
|
10
|
+
meta_description: string;
|
|
11
|
+
meta_title: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CategorySEO {
|
|
14
|
+
meta: SEOMeta[];
|
|
15
|
+
}
|
|
16
|
+
export declare function categorySEO(category: CategoryLike): CategorySEO | undefined;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function compact<T>(v: (T | null | undefined)[] | null | undefined): T[];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface Boolean {
|
|
2
|
+
kind: "boolean";
|
|
3
|
+
envVars: string[];
|
|
4
|
+
defaultValue?: boolean;
|
|
5
|
+
mandatory?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface String {
|
|
8
|
+
kind: "string";
|
|
9
|
+
envVars: string[];
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
mandatory?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface Any<T> {
|
|
14
|
+
kind: "any";
|
|
15
|
+
mandatory?: boolean;
|
|
16
|
+
__type: T;
|
|
17
|
+
}
|
|
18
|
+
export type BaseVar = Any<any> | String | Boolean;
|
|
19
|
+
export type Mandatory<T extends BaseVar> = {
|
|
20
|
+
kind: "mandatory";
|
|
21
|
+
mandatory: T;
|
|
22
|
+
};
|
|
23
|
+
export type Default<T extends BaseVar> = {
|
|
24
|
+
kind: "default";
|
|
25
|
+
default: T;
|
|
26
|
+
};
|
|
27
|
+
export type Var = Mandatory<any> | Default<any> | BaseVar;
|
|
28
|
+
export declare function anyVar<T>(mandatory?: false): Any<T>;
|
|
29
|
+
export declare function anyVar<T>(mandatory: true): Mandatory<Any<T>>;
|
|
30
|
+
export declare function stringVar(envVars: string[], defaultValue?: undefined, mandatory?: false): String;
|
|
31
|
+
export declare function stringVar(envVars: string[], defaultValue: undefined, mandatory: true): Mandatory<String>;
|
|
32
|
+
export declare function stringVar(envVars: string[], defaultValue: string, mandatory?: boolean): Default<String>;
|
|
33
|
+
export declare function booleanVar(envVars: string[], defaultValue?: undefined, mandatory?: false): Boolean;
|
|
34
|
+
export declare function booleanVar(envVars: string[], defaultValue: undefined, mandatory: true): Mandatory<Boolean>;
|
|
35
|
+
export declare function booleanVar(envVars: string[], defaultValue: boolean, mandatory?: boolean): Default<Boolean>;
|
|
36
|
+
type BaseType<T> = T extends String ? string : T extends Boolean ? boolean : T extends Any<infer U> ? U : never;
|
|
37
|
+
type FieldType<F> = F extends Mandatory<infer T> ? BaseType<T> : F extends Default<infer T> ? BaseType<T> : BaseType<F> | undefined;
|
|
38
|
+
type InpufFieldType<A> = FieldType<A> | undefined;
|
|
39
|
+
type Optionalize<S extends object> = OmitBy<S, undefined> & Partial<PickBy<S, undefined>>;
|
|
40
|
+
type OmitBy<T, V> = Omit<T, {
|
|
41
|
+
[K in keyof T]: V extends Extract<T[K], V> ? K : never;
|
|
42
|
+
}[keyof T]>;
|
|
43
|
+
type PickBy<T, V> = Pick<T, {
|
|
44
|
+
[K in keyof T]: V extends Extract<T[K], V> ? K : never;
|
|
45
|
+
}[keyof T]>;
|
|
46
|
+
export type ConfigType<C> = Optionalize<{
|
|
47
|
+
[K in keyof C]: FieldType<C[K]>;
|
|
48
|
+
}>;
|
|
49
|
+
export type InputConfigType<C> = Optionalize<{
|
|
50
|
+
[K in keyof C]: InpufFieldType<C[K]>;
|
|
51
|
+
}>;
|
|
52
|
+
export declare function loadConfig<CD extends Record<string, Var>>(confDef: CD, input: InputConfigType<CD>): ConfigType<CD>;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type TaskResult<T> = {
|
|
2
|
+
kind: "resolved";
|
|
3
|
+
value: T;
|
|
4
|
+
} | {
|
|
5
|
+
kind: "discarded";
|
|
6
|
+
};
|
|
7
|
+
interface QueueController {
|
|
8
|
+
discard(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare class ControlledQueue {
|
|
11
|
+
private queue;
|
|
12
|
+
private queueLoopPromise;
|
|
13
|
+
private discardQueue;
|
|
14
|
+
private queueLoop;
|
|
15
|
+
exec<T>(pfn: (controller: QueueController) => Promise<T>): Promise<TaskResult<T>>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type ImageCrop = "top" | "right" | "bottom" | "left" | "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | "left_top" | "right_top" | "left_bottom" | "right_bottom";
|
|
2
|
+
export interface ImageParams {
|
|
3
|
+
size?: string;
|
|
4
|
+
crop?: ImageCrop;
|
|
5
|
+
scale?: 2 | 3;
|
|
6
|
+
low?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function convertImageURL(cdnBaseURL: string, url: string | null | undefined, p: ImageParams): string;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { AbstractOp, GraphQLOpts } from "./request.js";
|
|
2
|
+
import { AnalyticsEmbedInfo } from "./script.js";
|
|
3
|
+
import type { BrandingFieldType, CustomerOAuthProviderKind, InventoryPolicy, TieredPricingModel } from "./json/storefrontTypes.js";
|
|
4
|
+
import type { Dict } from "./commonTypes.js";
|
|
5
|
+
interface TieredPricing {
|
|
6
|
+
model: TieredPricingModel;
|
|
7
|
+
tiers: Array<{
|
|
8
|
+
from: number;
|
|
9
|
+
price: number;
|
|
10
|
+
to: number;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
interface File {
|
|
14
|
+
id: string;
|
|
15
|
+
image_alt: string;
|
|
16
|
+
image_color: string;
|
|
17
|
+
image_height: number;
|
|
18
|
+
image_width: number;
|
|
19
|
+
mime: string;
|
|
20
|
+
public_url: string;
|
|
21
|
+
}
|
|
22
|
+
interface Language {
|
|
23
|
+
code: string;
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
name_en: string;
|
|
27
|
+
name_native: string;
|
|
28
|
+
}
|
|
29
|
+
export interface CategoryBrief {
|
|
30
|
+
id: string;
|
|
31
|
+
parentID: string;
|
|
32
|
+
title: string;
|
|
33
|
+
relativeUrl: string;
|
|
34
|
+
featured: boolean;
|
|
35
|
+
quantity: number;
|
|
36
|
+
imageUrl?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface VariantBrief {
|
|
39
|
+
currency_prices: Array<{
|
|
40
|
+
currency: string;
|
|
41
|
+
map_price: number;
|
|
42
|
+
price: number;
|
|
43
|
+
retail_price: number;
|
|
44
|
+
sale_price: number;
|
|
45
|
+
tiered_pricing: TieredPricing | null;
|
|
46
|
+
}>;
|
|
47
|
+
customer_group_price: number;
|
|
48
|
+
id: string;
|
|
49
|
+
inventory: {
|
|
50
|
+
available: number;
|
|
51
|
+
low_stock: boolean;
|
|
52
|
+
locations: {
|
|
53
|
+
available: number;
|
|
54
|
+
low_stock: boolean;
|
|
55
|
+
inventory_location: {
|
|
56
|
+
id: string;
|
|
57
|
+
} | null;
|
|
58
|
+
}[];
|
|
59
|
+
} | null;
|
|
60
|
+
inventory_policy: InventoryPolicy;
|
|
61
|
+
is_default: boolean;
|
|
62
|
+
map_price: number;
|
|
63
|
+
media_files: Array<{
|
|
64
|
+
file: File | null;
|
|
65
|
+
thumbnail_file: File | null;
|
|
66
|
+
}>;
|
|
67
|
+
options: Array<{
|
|
68
|
+
option_id: string;
|
|
69
|
+
option_value_id: string;
|
|
70
|
+
}>;
|
|
71
|
+
price: number;
|
|
72
|
+
retail_price: number;
|
|
73
|
+
sale_price: number;
|
|
74
|
+
sale_price_eligible: boolean;
|
|
75
|
+
sku: string;
|
|
76
|
+
tiered_pricing: TieredPricing | null;
|
|
77
|
+
}
|
|
78
|
+
export interface ProductBrief {
|
|
79
|
+
id: string;
|
|
80
|
+
handle: string;
|
|
81
|
+
title: string;
|
|
82
|
+
variants: Array<VariantBrief | null> | null;
|
|
83
|
+
average_score: number;
|
|
84
|
+
review_count: number;
|
|
85
|
+
}
|
|
86
|
+
interface Page<T> {
|
|
87
|
+
items: T[];
|
|
88
|
+
last_key: string;
|
|
89
|
+
}
|
|
90
|
+
export type Modify<T, R> = Omit<T, keyof R> & R;
|
|
91
|
+
export type CategoryRecursive<T> = Modify<T, {
|
|
92
|
+
children: CategoryRecursive<T>[];
|
|
93
|
+
}>;
|
|
94
|
+
interface CategoryReq {
|
|
95
|
+
id: string;
|
|
96
|
+
title: string;
|
|
97
|
+
featured: boolean;
|
|
98
|
+
handle: string;
|
|
99
|
+
has_children: boolean;
|
|
100
|
+
image_files: ({
|
|
101
|
+
public_url: string;
|
|
102
|
+
} | null)[] | null;
|
|
103
|
+
}
|
|
104
|
+
interface ProductReq {
|
|
105
|
+
id: string;
|
|
106
|
+
title: string;
|
|
107
|
+
handle: string;
|
|
108
|
+
average_score: number;
|
|
109
|
+
review_count: number;
|
|
110
|
+
categories: ({
|
|
111
|
+
id: string;
|
|
112
|
+
} | null)[] | null;
|
|
113
|
+
variants: (VariantReq | null)[] | null;
|
|
114
|
+
}
|
|
115
|
+
interface VariantReq {
|
|
116
|
+
currency_prices: VariantBrief["currency_prices"];
|
|
117
|
+
customer_group_price: VariantBrief["customer_group_price"];
|
|
118
|
+
id: VariantBrief["id"];
|
|
119
|
+
inventory: VariantBrief["inventory"];
|
|
120
|
+
inventory_policy: VariantBrief["inventory_policy"];
|
|
121
|
+
is_default: VariantBrief["is_default"];
|
|
122
|
+
map_price: VariantBrief["map_price"];
|
|
123
|
+
media_files: VariantBrief["media_files"];
|
|
124
|
+
options: VariantBrief["options"];
|
|
125
|
+
price: VariantBrief["price"];
|
|
126
|
+
retail_price: VariantBrief["retail_price"];
|
|
127
|
+
sale_price: VariantBrief["sale_price"];
|
|
128
|
+
sale_price_eligible: VariantBrief["sale_price_eligible"];
|
|
129
|
+
sku: VariantBrief["sku"];
|
|
130
|
+
tiered_pricing: VariantBrief["tiered_pricing"];
|
|
131
|
+
}
|
|
132
|
+
interface BrandingReq {
|
|
133
|
+
fields: Array<{
|
|
134
|
+
boolean: boolean | null;
|
|
135
|
+
color: string | null;
|
|
136
|
+
font: string | null;
|
|
137
|
+
id: string;
|
|
138
|
+
image_file: File | null;
|
|
139
|
+
link: string | null;
|
|
140
|
+
radio: string | null;
|
|
141
|
+
string: string | null;
|
|
142
|
+
text: string | null;
|
|
143
|
+
type: BrandingFieldType;
|
|
144
|
+
}>;
|
|
145
|
+
}
|
|
146
|
+
interface ShopReq {
|
|
147
|
+
app_domain: string;
|
|
148
|
+
created_at: string;
|
|
149
|
+
currency: string;
|
|
150
|
+
customer_oauth_providers: Array<{
|
|
151
|
+
client_id: string;
|
|
152
|
+
kind: CustomerOAuthProviderKind;
|
|
153
|
+
}>;
|
|
154
|
+
customer_service_email: string;
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
primary_domain: {
|
|
158
|
+
domain: string;
|
|
159
|
+
id: string;
|
|
160
|
+
} | null;
|
|
161
|
+
product_review_enabled: boolean;
|
|
162
|
+
tax_label: string;
|
|
163
|
+
timezone: string;
|
|
164
|
+
language: Language | null;
|
|
165
|
+
languages: Array<Language | null> | null;
|
|
166
|
+
tips_enabled: boolean;
|
|
167
|
+
tips_variant: {
|
|
168
|
+
id: string;
|
|
169
|
+
} | null;
|
|
170
|
+
}
|
|
171
|
+
interface CurrencyReq {
|
|
172
|
+
currency: {
|
|
173
|
+
code: string;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
interface ReviewDimensionReq {
|
|
177
|
+
id: string;
|
|
178
|
+
}
|
|
179
|
+
interface OptionReq {
|
|
180
|
+
id: string;
|
|
181
|
+
}
|
|
182
|
+
interface InventoryLocationReq {
|
|
183
|
+
id: string;
|
|
184
|
+
}
|
|
185
|
+
interface AdditionalDataContext<ContentBlock, Menu> {
|
|
186
|
+
menus: Menu[];
|
|
187
|
+
contentBlocks: ContentBlock[];
|
|
188
|
+
}
|
|
189
|
+
interface LoadConfig<Branding extends BrandingReq, Category extends CategoryReq, ContentBlock, Currency extends CurrencyReq, Gateway, InventoryLocation extends InventoryLocationReq, Menu, Option extends OptionReq, Product extends ProductReq, ReviewDimension extends ReviewDimensionReq, ReviewSettings, Shop extends ShopReq, AdditionalLocaleData, AdditionalShopData> {
|
|
190
|
+
graphql: {
|
|
191
|
+
getBrandingQuery: AbstractOp<{
|
|
192
|
+
branding: Branding | null;
|
|
193
|
+
}, {
|
|
194
|
+
shopID: string;
|
|
195
|
+
}>;
|
|
196
|
+
getCategoriesQuery: AbstractOp<{
|
|
197
|
+
categories: Category[] | null;
|
|
198
|
+
}, {
|
|
199
|
+
shopID: string;
|
|
200
|
+
ids?: string[] | null;
|
|
201
|
+
childrenOf?: string | null;
|
|
202
|
+
}>;
|
|
203
|
+
getContentBlocksPageQuery: AbstractOp<{
|
|
204
|
+
page: Page<ContentBlock> | null;
|
|
205
|
+
}, {
|
|
206
|
+
shopID: string;
|
|
207
|
+
limit: number;
|
|
208
|
+
lastKey: string;
|
|
209
|
+
}>;
|
|
210
|
+
getGatewaysQuery: AbstractOp<{
|
|
211
|
+
gateways: Gateway[] | null;
|
|
212
|
+
}, {
|
|
213
|
+
shopID: string;
|
|
214
|
+
}>;
|
|
215
|
+
getInventoryLocationsQuery: AbstractOp<{
|
|
216
|
+
inventoryLocations: InventoryLocation[] | null;
|
|
217
|
+
}, {
|
|
218
|
+
shopID: string;
|
|
219
|
+
}>;
|
|
220
|
+
getMenusPageQuery: AbstractOp<{
|
|
221
|
+
page: Page<Menu> | null;
|
|
222
|
+
}, {
|
|
223
|
+
shopID: string;
|
|
224
|
+
limit: number;
|
|
225
|
+
lastKey: string;
|
|
226
|
+
}>;
|
|
227
|
+
getOptionsQuery: AbstractOp<{
|
|
228
|
+
options: Option[] | null;
|
|
229
|
+
}, {
|
|
230
|
+
shopID: string;
|
|
231
|
+
}>;
|
|
232
|
+
getProductsPageQuery: AbstractOp<{
|
|
233
|
+
page: Page<Product> | null;
|
|
234
|
+
}, {
|
|
235
|
+
shopID: string;
|
|
236
|
+
limit: number;
|
|
237
|
+
lastKey: string;
|
|
238
|
+
}>;
|
|
239
|
+
getReviewDimensionsQuery: AbstractOp<{
|
|
240
|
+
reviewDimensions: ReviewDimension[] | null;
|
|
241
|
+
}, {
|
|
242
|
+
shopID: string;
|
|
243
|
+
}>;
|
|
244
|
+
getReviewSettingsQuery: AbstractOp<{
|
|
245
|
+
reviewSettings: ReviewSettings | null;
|
|
246
|
+
}, {
|
|
247
|
+
shopID: string;
|
|
248
|
+
}>;
|
|
249
|
+
getShopCurrenciesQuery: AbstractOp<{
|
|
250
|
+
currencies: Currency[] | null;
|
|
251
|
+
}, {
|
|
252
|
+
shopID: string;
|
|
253
|
+
}>;
|
|
254
|
+
getShopQuery: AbstractOp<{
|
|
255
|
+
shops: Shop[] | null;
|
|
256
|
+
}, {
|
|
257
|
+
shopID: string;
|
|
258
|
+
}>;
|
|
259
|
+
};
|
|
260
|
+
shopID: string;
|
|
261
|
+
cdn: string;
|
|
262
|
+
beacon: string;
|
|
263
|
+
staticData: boolean;
|
|
264
|
+
resolveAdditionalLocaleData: (ctx: AdditionalDataContext<ContentBlock, Menu>) => AdditionalLocaleData;
|
|
265
|
+
resolveAdditionalShopData: (ctx: AdditionalDataContext<ContentBlock, Menu>) => AdditionalShopData;
|
|
266
|
+
opts?: GraphQLOpts<any>;
|
|
267
|
+
siteUrl?: string;
|
|
268
|
+
}
|
|
269
|
+
export type LocaleData<Branding, Category, ContentBlock, Currency, Gateway, InventoryLocation, Option, Product, ReviewDimension, ReviewSettings, Shop, AdditionalLocaleData, AdditionalShopData> = {
|
|
270
|
+
isDefault: boolean;
|
|
271
|
+
locale: string;
|
|
272
|
+
shopData: ShopData<Gateway, InventoryLocation, Option, ReviewDimension, ReviewSettings, Currency, Shop, AdditionalShopData>;
|
|
273
|
+
products: Product[];
|
|
274
|
+
productsBrief: Dict<ProductBrief>;
|
|
275
|
+
contentBlocks: ContentBlock[];
|
|
276
|
+
categories: CategoryRecursive<Category>[];
|
|
277
|
+
branding: Branding;
|
|
278
|
+
gateways: Gateway[];
|
|
279
|
+
analytics: AnalyticsEmbedInfo;
|
|
280
|
+
} & AdditionalLocaleData;
|
|
281
|
+
export type ShopData<Gateway, InventoryLocation, Option, ReviewDimension, ReviewSettings, Currency, Shop, AdditionalShopData> = {
|
|
282
|
+
singleLocale: boolean;
|
|
283
|
+
locale: string;
|
|
284
|
+
shop: Shop;
|
|
285
|
+
gateways: Gateway[];
|
|
286
|
+
currencies: Dict<Currency>;
|
|
287
|
+
categories: Dict<CategoryBrief>;
|
|
288
|
+
options: Dict<Option>;
|
|
289
|
+
inventoryLocations: Dict<InventoryLocation>;
|
|
290
|
+
reviewSettings: ReviewSettings;
|
|
291
|
+
reviewDimensions: Dict<ReviewDimension>;
|
|
292
|
+
siteUrl: string | undefined;
|
|
293
|
+
cdn: string;
|
|
294
|
+
opts?: GraphQLOpts<any>;
|
|
295
|
+
staticData: boolean;
|
|
296
|
+
} & AdditionalShopData;
|
|
297
|
+
export type AllData<Branding, Category, ContentBlock, Currency, Gateway, InventoryLocation, Option, Product, ReviewDimension, ReviewSettings, Shop, AdditionalLocaleData, AdditionalShopData> = {
|
|
298
|
+
perLocale: LocaleData<Branding, Category, ContentBlock, Currency, Gateway, InventoryLocation, Option, Product, ReviewDimension, ReviewSettings, Shop, AdditionalLocaleData, AdditionalShopData>[];
|
|
299
|
+
};
|
|
300
|
+
export declare function loadData<Branding extends BrandingReq, Category extends CategoryReq, ContentBlock, Currency extends CurrencyReq, Gateway, InventoryLocation extends InventoryLocationReq, Menu, Option extends OptionReq, Product extends ProductReq, ReviewDimension extends ReviewDimensionReq, ReviewSettings, Shop extends ShopReq, AdditionalLocaleData, AdditionalShopData>(config: LoadConfig<Branding, Category, ContentBlock, Currency, Gateway, InventoryLocation, Menu, Option, Product, ReviewDimension, ReviewSettings, Shop, AdditionalLocaleData, AdditionalShopData>): Promise<AllData<Branding, Category, ContentBlock, Currency, Gateway, InventoryLocation, Option, Product, ReviewDimension, ReviewSettings, Shop, AdditionalLocaleData, AdditionalShopData>>;
|
|
301
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface VariantLike {
|
|
2
|
+
is_default?: boolean;
|
|
3
|
+
media_files?: any[] | null;
|
|
4
|
+
}
|
|
5
|
+
interface ProductLike<T> {
|
|
6
|
+
variants?: (T | null)[] | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function defaultVariant<T extends VariantLike>(product: ProductLike<T> | undefined | null): T | undefined;
|
|
9
|
+
export {};
|