@swishapp/sdk 0.102.0 → 0.104.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const PRODUCT_IMAGE_FIELDS = "\n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n";
|
|
2
2
|
export declare const SAVE_INTENT_DATA_FIELDS = "\n fragment saveIntentProductFields on Product {\n id\n availableForSale\n featuredImage {\n ...productImageFields\n }\n handle\n title\n variantsCount {\n count\n }\n selectedOrFirstAvailableVariant {\n ...saveIntentVariantFields\n }\n }\n fragment saveIntentVariantFields on ProductVariant {\n id\n availableForSale\n currentlyNotInStock\n image {\n ...productImageFields\n }\n title\n }\n";
|
|
3
|
-
export declare const PRODUCT_CARD_DATA_FIELDS = "\n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n";
|
|
3
|
+
export declare const PRODUCT_CARD_DATA_FIELDS = "\n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n";
|
|
4
4
|
export declare const PRODUCT_VARIANT_DATA_FIELDS = "\n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n";
|
|
5
5
|
export declare const PRODUCT_OPTIONS_VARIANT_FIELDS = "\n fragment productOptionsVariantFields on ProductVariant {\n id\n selectedOptions {\n name\n value\n }\n }\n";
|
|
6
6
|
export declare const SELECTED_VARIANT_FIELDS = "\n fragment selectedVariantFields on Product {\n id\n availableForSale\n title\n handle\n featuredImage {\n ...productImageFields\n }\n variantBySelectedOptions(selectedOptions: $selectedOptions) {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n title\n selectedOptions {\n name\n value\n }\n }\n }\n";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare const GET_SAVE_INTENT_DATA_BY_ID = "\n query GetSaveIntentData(\n $productId: ID!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...saveIntentProductFields\n }\n }\n \n fragment saveIntentProductFields on Product {\n id\n availableForSale\n featuredImage {\n ...productImageFields\n }\n handle\n title\n variantsCount {\n count\n }\n selectedOrFirstAvailableVariant {\n ...saveIntentVariantFields\n }\n }\n fragment saveIntentVariantFields on ProductVariant {\n id\n availableForSale\n currentlyNotInStock\n image {\n ...productImageFields\n }\n title\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
2
2
|
export declare const GET_SAVE_INTENT_DATA_BY_ID_WITH_VARIANT = "\n query GetSaveIntentDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...saveIntentProductFields\n }\n variant: node(id: $variantId) {\n ...saveIntentVariantFields\n }\n }\n \n fragment saveIntentProductFields on Product {\n id\n availableForSale\n featuredImage {\n ...productImageFields\n }\n handle\n title\n variantsCount {\n count\n }\n selectedOrFirstAvailableVariant {\n ...saveIntentVariantFields\n }\n }\n fragment saveIntentVariantFields on ProductVariant {\n id\n availableForSale\n currentlyNotInStock\n image {\n ...productImageFields\n }\n title\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
3
|
-
export declare const GET_PRODUCT_CARD_DATA_BY_ID = "\n query GetProductCardData(\n $productId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
4
|
-
export declare const GET_PRODUCT_CARD_DATA_BY_ID_WITH_VARIANT = "\n query GetProductCardDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n }\n variant: node(id: $variantId) {\n ...productVariantDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
3
|
+
export declare const GET_PRODUCT_CARD_DATA_BY_ID = "\n query GetProductCardData(\n $productId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
4
|
+
export declare const GET_PRODUCT_CARD_DATA_BY_ID_WITH_VARIANT = "\n query GetProductCardDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n }\n variant: node(id: $variantId) {\n ...productVariantDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
5
5
|
export declare const GET_PRODUCT_OPTIONS_BY_ID = "\n query GetProductOptions(\n $productId: ID!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productOptionsFields\n }\n }\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
6
6
|
export declare const GET_PRODUCT_OPTIONS_BY_HANDLE = "\n query GetProductOptionsByHandle(\n $handle: String!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...productOptionsFields\n }\n }\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
7
7
|
export declare const GET_PRODUCT_OPTIONS_BY_ID_WITH_VARIANT = "\n query GetProductOptionsWithVariant(\n $productId: ID!\n $variantId: ID!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productOptionsFields\n }\n variant: node(id: $variantId) {\n ...productOptionsVariantFields\n }\n }\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productOptionsVariantFields on ProductVariant {\n id\n selectedOptions {\n name\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
8
8
|
export declare const GET_PRODUCT_OPTIONS_BY_HANDLE_WITH_VARIANT = "\n query GetProductOptionsByHandleWithVariant(\n $handle: String!\n $variantId: ID!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...productOptionsFields\n }\n variant: node(id: $variantId) {\n ...productOptionsVariantFields\n }\n }\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productOptionsVariantFields on ProductVariant {\n id\n selectedOptions {\n name\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
9
9
|
export declare const GET_SELECTED_VARIANT = "\n query GetSelectedVariant(\n $productId: ID!\n $selectedOptions: [SelectedOptionInput!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...selectedVariantFields\n }\n }\n \n fragment selectedVariantFields on Product {\n id\n availableForSale\n title\n handle\n featuredImage {\n ...productImageFields\n }\n variantBySelectedOptions(selectedOptions: $selectedOptions) {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n title\n selectedOptions {\n name\n value\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
10
10
|
export declare const GET_SELECTED_VARIANT_BY_HANDLE = "\n query GetSelectedVariantByHandle(\n $handle: String!\n $selectedOptions: [SelectedOptionInput!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...selectedVariantFields\n }\n }\n \n fragment selectedVariantFields on Product {\n id\n availableForSale\n title\n handle\n featuredImage {\n ...productImageFields\n }\n variantBySelectedOptions(selectedOptions: $selectedOptions) {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n title\n selectedOptions {\n name\n value\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
11
|
-
export declare const GET_PRODUCT_DETAIL_DATA_BY_ID = "\n query GetProductDetailData(\n $productId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n ...productOptionsFields\n ...productImagesFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productImagesFields on Product {\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
12
|
-
export declare const GET_PRODUCT_DETAIL_DATA_BY_ID_WITH_VARIANT = "\n query GetProductDetailDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n ...productOptionsFields\n ...productImagesFields\n }\n variant: node(id: $variantId) {\n ...productVariantDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImagesFields on Product {\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
11
|
+
export declare const GET_PRODUCT_DETAIL_DATA_BY_ID = "\n query GetProductDetailData(\n $productId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n ...productOptionsFields\n ...productImagesFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productImagesFields on Product {\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
12
|
+
export declare const GET_PRODUCT_DETAIL_DATA_BY_ID_WITH_VARIANT = "\n query GetProductDetailDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n ...productOptionsFields\n ...productImagesFields\n }\n variant: node(id: $variantId) {\n ...productVariantDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImagesFields on Product {\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
13
13
|
export declare const GET_PRODUCT_IMAGES_BY_ID = "\n query GetProductImagesById(\n $ids: [ID!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n nodes(ids: $ids) {\n ... on Product {\n featuredImage {\n ...productImageFields\n }\n }\n ... on ProductVariant {\n image {\n ...productImageFields\n }\n product {\n featuredImage {\n ...productImageFields\n }\n }\n }\n }\n }\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n";
|
|
14
14
|
export declare const GET_PRODUCT_RECOMMENDATIONS_BY_ID = "\n query GetProductRecommendationsById(\n $productId: ID!\n $intent: ProductRecommendationIntent\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n productRecommendations(productId: $productId, intent: $intent) {\n id\n }\n }\n";
|
|
15
15
|
export declare const GET_PRODUCT_RECOMMENDATIONS_BY_HANDLE = "\n query GetProductRecommendationsByHandle(\n $handle: String!\n $intent: ProductRecommendationIntent\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n productRecommendations(productHandle: $handle, intent: $intent) {\n id\n }\n }\n";
|
|
@@ -58,6 +58,7 @@ export declare class StorefrontApiClient {
|
|
|
58
58
|
minVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
59
59
|
};
|
|
60
60
|
featuredImage?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
61
|
+
options: Array<Pick<import("./types/storefront.types").ProductOption, "id" | "name">>;
|
|
61
62
|
priceRange: {
|
|
62
63
|
maxVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
63
64
|
minVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
@@ -88,12 +89,6 @@ export declare class StorefrontApiClient {
|
|
|
88
89
|
minVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
89
90
|
};
|
|
90
91
|
featuredImage?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
91
|
-
priceRange: {
|
|
92
|
-
maxVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
93
|
-
minVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
94
|
-
};
|
|
95
|
-
variantsCount?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Count, "count" | "precision">>;
|
|
96
|
-
metafields: Array<import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Metafield, "key" | "namespace" | "value">>>;
|
|
97
92
|
options: Array<(Pick<import("./types/storefront.types").ProductOption, "id" | "name"> & {
|
|
98
93
|
optionValues: Array<(Pick<import("./types/storefront.types").ProductOptionValue, "name"> & {
|
|
99
94
|
swatch?: import("./types/storefront.types").Maybe<(Pick<import("./types/storefront.types").ProductOptionValueSwatch, "color"> & {
|
|
@@ -106,6 +101,12 @@ export declare class StorefrontApiClient {
|
|
|
106
101
|
})>;
|
|
107
102
|
})>;
|
|
108
103
|
})>;
|
|
104
|
+
priceRange: {
|
|
105
|
+
maxVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
106
|
+
minVariantPrice: Pick<import("./types/storefront.types").MoneyV2, "amount" | "currencyCode">;
|
|
107
|
+
};
|
|
108
|
+
variantsCount?: import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Count, "count" | "precision">>;
|
|
109
|
+
metafields: Array<import("./types/storefront.types").Maybe<Pick<import("./types/storefront.types").Metafield, "key" | "namespace" | "value">>>;
|
|
109
110
|
images: {
|
|
110
111
|
nodes: Array<Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash">>;
|
|
111
112
|
};
|
|
@@ -17,6 +17,7 @@ export type ProductCardDataFieldsFragment = (Pick<StorefrontTypes.Product, 'id'
|
|
|
17
17
|
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
18
18
|
};
|
|
19
19
|
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
20
|
+
options: Array<Pick<StorefrontTypes.ProductOption, 'id' | 'name'>>;
|
|
20
21
|
priceRange: {
|
|
21
22
|
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
22
23
|
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
@@ -110,6 +111,7 @@ export type GetProductCardDataQuery = {
|
|
|
110
111
|
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
111
112
|
};
|
|
112
113
|
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
114
|
+
options: Array<Pick<StorefrontTypes.ProductOption, 'id' | 'name'>>;
|
|
113
115
|
priceRange: {
|
|
114
116
|
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
115
117
|
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
@@ -134,6 +136,7 @@ export type GetProductCardDataWithVariantQuery = {
|
|
|
134
136
|
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
135
137
|
};
|
|
136
138
|
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
139
|
+
options: Array<Pick<StorefrontTypes.ProductOption, 'id' | 'name'>>;
|
|
137
140
|
priceRange: {
|
|
138
141
|
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
139
142
|
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
@@ -297,12 +300,6 @@ export type GetProductDetailDataQuery = {
|
|
|
297
300
|
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
298
301
|
};
|
|
299
302
|
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
300
|
-
priceRange: {
|
|
301
|
-
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
302
|
-
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
303
|
-
};
|
|
304
|
-
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count, 'count' | 'precision'>>;
|
|
305
|
-
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
306
303
|
options: Array<(Pick<StorefrontTypes.ProductOption, 'id' | 'name'> & {
|
|
307
304
|
optionValues: Array<(Pick<StorefrontTypes.ProductOptionValue, 'name'> & {
|
|
308
305
|
swatch?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductOptionValueSwatch, 'color'> & {
|
|
@@ -315,6 +312,12 @@ export type GetProductDetailDataQuery = {
|
|
|
315
312
|
})>;
|
|
316
313
|
})>;
|
|
317
314
|
})>;
|
|
315
|
+
priceRange: {
|
|
316
|
+
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
317
|
+
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
318
|
+
};
|
|
319
|
+
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count, 'count' | 'precision'>>;
|
|
320
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
318
321
|
images: {
|
|
319
322
|
nodes: Array<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
320
323
|
};
|
|
@@ -336,12 +339,6 @@ export type GetProductDetailDataWithVariantQuery = {
|
|
|
336
339
|
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
337
340
|
};
|
|
338
341
|
featuredImage?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
339
|
-
priceRange: {
|
|
340
|
-
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
341
|
-
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
342
|
-
};
|
|
343
|
-
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count, 'count' | 'precision'>>;
|
|
344
|
-
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
345
342
|
options: Array<(Pick<StorefrontTypes.ProductOption, 'id' | 'name'> & {
|
|
346
343
|
optionValues: Array<(Pick<StorefrontTypes.ProductOptionValue, 'name'> & {
|
|
347
344
|
swatch?: StorefrontTypes.Maybe<(Pick<StorefrontTypes.ProductOptionValueSwatch, 'color'> & {
|
|
@@ -354,6 +351,12 @@ export type GetProductDetailDataWithVariantQuery = {
|
|
|
354
351
|
})>;
|
|
355
352
|
})>;
|
|
356
353
|
})>;
|
|
354
|
+
priceRange: {
|
|
355
|
+
maxVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
356
|
+
minVariantPrice: Pick<StorefrontTypes.MoneyV2, 'amount' | 'currencyCode'>;
|
|
357
|
+
};
|
|
358
|
+
variantsCount?: StorefrontTypes.Maybe<Pick<StorefrontTypes.Count, 'count' | 'precision'>>;
|
|
359
|
+
metafields: Array<StorefrontTypes.Maybe<Pick<StorefrontTypes.Metafield, 'key' | 'namespace' | 'value'>>>;
|
|
357
360
|
images: {
|
|
358
361
|
nodes: Array<Pick<StorefrontTypes.Image, 'id' | 'altText' | 'url' | 'thumbhash'>>;
|
|
359
362
|
};
|
|
@@ -414,11 +417,11 @@ interface GeneratedQueryTypes {
|
|
|
414
417
|
return: GetSaveIntentDataWithVariantQuery;
|
|
415
418
|
variables: GetSaveIntentDataWithVariantQueryVariables;
|
|
416
419
|
};
|
|
417
|
-
"\n query GetProductCardData(\n $productId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
420
|
+
"\n query GetProductCardData(\n $productId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
418
421
|
return: GetProductCardDataQuery;
|
|
419
422
|
variables: GetProductCardDataQueryVariables;
|
|
420
423
|
};
|
|
421
|
-
"\n query GetProductCardDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n }\n variant: node(id: $variantId) {\n ...productVariantDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
424
|
+
"\n query GetProductCardDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n }\n variant: node(id: $variantId) {\n ...productVariantDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
422
425
|
return: GetProductCardDataWithVariantQuery;
|
|
423
426
|
variables: GetProductCardDataWithVariantQueryVariables;
|
|
424
427
|
};
|
|
@@ -446,11 +449,11 @@ interface GeneratedQueryTypes {
|
|
|
446
449
|
return: GetSelectedVariantByHandleQuery;
|
|
447
450
|
variables: GetSelectedVariantByHandleQueryVariables;
|
|
448
451
|
};
|
|
449
|
-
"\n query GetProductDetailData(\n $productId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n ...productOptionsFields\n ...productImagesFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productImagesFields on Product {\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
452
|
+
"\n query GetProductDetailData(\n $productId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n ...productOptionsFields\n ...productImagesFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productImagesFields on Product {\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
450
453
|
return: GetProductDetailDataQuery;
|
|
451
454
|
variables: GetProductDetailDataQueryVariables;
|
|
452
455
|
};
|
|
453
|
-
"\n query GetProductDetailDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n ...productOptionsFields\n ...productImagesFields\n }\n variant: node(id: $variantId) {\n ...productVariantDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImagesFields on Product {\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
456
|
+
"\n query GetProductDetailDataWithVariant(\n $productId: ID!\n $variantId: ID!\n $productMetafields: [HasMetafieldsIdentifier!]!\n $variantMetafields: [HasMetafieldsIdentifier!]!\n $country: CountryCode!\n $language: LanguageCode!\n ) @inContext(country: $country, language: $language) {\n product(id: $productId) {\n ...productCardDataFields\n ...productOptionsFields\n ...productImagesFields\n }\n variant: node(id: $variantId) {\n ...productVariantDataFields\n }\n }\n \n fragment productCardDataFields on Product {\n id\n availableForSale\n category {\n id\n name\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...productImageFields\n }\n isGiftCard\n onlineStoreUrl\n description\n descriptionHtml\n handle\n options {\n id\n name\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n productType\n tags\n title\n variantsCount {\n count\n }\n # totalInventory\n metafields(identifiers: $productMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productOptionsFields on Product {\n id\n availableForSale\n title\n featuredImage {\n ...productImageFields\n }\n encodedVariantAvailability\n encodedVariantExistence\n variantsCount {\n count\n precision\n }\n options {\n id\n name\n optionValues {\n name\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n firstSelectableVariant {\n id\n image {\n ...productImageFields\n }\n }\n }\n }\n }\n\n \n fragment productVariantDataFields on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n currentlyNotInStock\n image {\n ...productImageFields\n }\n price {\n amount\n currencyCode\n }\n # quantityAvailable\n selectedOptions {\n name\n value\n }\n sku\n title\n metafields(identifiers: $variantMetafields) {\n key\n namespace\n value\n }\n }\n\n \n fragment productImagesFields on Product {\n images(first: 20) {\n nodes {\n ...productImageFields\n }\n }\n }\n\n \n fragment productImageFields on Image {\n id\n altText\n url\n thumbhash\n }\n\n": {
|
|
454
457
|
return: GetProductDetailDataWithVariantQuery;
|
|
455
458
|
variables: GetProductDetailDataWithVariantQueryVariables;
|
|
456
459
|
};
|
package/dist/swish.js
CHANGED
|
@@ -63,6 +63,10 @@ Values:
|
|
|
63
63
|
description
|
|
64
64
|
descriptionHtml
|
|
65
65
|
handle
|
|
66
|
+
options {
|
|
67
|
+
id
|
|
68
|
+
name
|
|
69
|
+
}
|
|
66
70
|
priceRange {
|
|
67
71
|
maxVariantPrice {
|
|
68
72
|
amount
|
|
@@ -447,4 +451,4 @@ Values:
|
|
|
447
451
|
left: 0px;
|
|
448
452
|
right: 0px;
|
|
449
453
|
}
|
|
450
|
-
`),document.documentElement.setAttribute("swish-locked",""))}unlockScroll(){this.scrollLockRefCount>0&&this.scrollLockRefCount--,this.scrollLockRefCount===0&&(this.scrollLockStyleSheet&&this.scrollLockStyleSheet.replaceSync(""),window.scrollTo({top:this.scrollPositionBeforeLock,behavior:"instant"}),this.scrollPositionBeforeLock=0,document.documentElement.removeAttribute("swish-locked"))}};var gs=typeof HTMLElement<"u"?HTMLElement:class{},it=class extends gs{constructor(){super();this.getComponentRef=s(()=>this.componentRef,"getComponentRef");this.setComponentRef=s(t=>{this.componentRef=t},"setComponentRef");this.shadowRoot||this.attachShadow({mode:"open"});let t=this.querySelector("template");t&&this.shadowRoot&&(this.shadowRoot.appendChild(t.content),t.remove())}static{s(this,"SwishUiElement")}};var st=class{static{s(this,"ShopifyBadgesUtils")}#e;constructor({getBadges:e}){this.#e=e?.bind(this)}getBadges({product:e,variant:t}){try{let r=this.getDefaultBadges({product:e,variant:t});return this.#e?this.mapBadges(this.#e({product:e,variant:t,defaultBadges:r})??[]):this.mapBadges(r)}catch(r){return console.error("Error getting badges",r),[]}}getDefaultBadges({product:e,variant:t}){let r=[];if(e?.availableForSale===!1||t?.availableForSale===!1)return r.push("Sold out"),r;let i=t?t.price.amount:e?.priceRange?.minVariantPrice.amount,o=t?t.compareAtPrice?.amount:e?.compareAtPriceRange?.minVariantPrice.amount;return o&&parseFloat(o)>parseFloat(i)&&r.push("Sale"),r}mapBadges(e){return e.map(t=>typeof t=="string"?{id:t.toLowerCase().replace(/[^a-z0-9]/g,"_"),label:t}:t)}};var Fe="0.
|
|
454
|
+
`),document.documentElement.setAttribute("swish-locked",""))}unlockScroll(){this.scrollLockRefCount>0&&this.scrollLockRefCount--,this.scrollLockRefCount===0&&(this.scrollLockStyleSheet&&this.scrollLockStyleSheet.replaceSync(""),window.scrollTo({top:this.scrollPositionBeforeLock,behavior:"instant"}),this.scrollPositionBeforeLock=0,document.documentElement.removeAttribute("swish-locked"))}};var gs=typeof HTMLElement<"u"?HTMLElement:class{},it=class extends gs{constructor(){super();this.getComponentRef=s(()=>this.componentRef,"getComponentRef");this.setComponentRef=s(t=>{this.componentRef=t},"setComponentRef");this.shadowRoot||this.attachShadow({mode:"open"});let t=this.querySelector("template");t&&this.shadowRoot&&(this.shadowRoot.appendChild(t.content),t.remove())}static{s(this,"SwishUiElement")}};var st=class{static{s(this,"ShopifyBadgesUtils")}#e;constructor({getBadges:e}){this.#e=e?.bind(this)}getBadges({product:e,variant:t}){try{let r=this.getDefaultBadges({product:e,variant:t});return this.#e?this.mapBadges(this.#e({product:e,variant:t,defaultBadges:r})??[]):this.mapBadges(r)}catch(r){return console.error("Error getting badges",r),[]}}getDefaultBadges({product:e,variant:t}){let r=[];if(e?.availableForSale===!1||t?.availableForSale===!1)return r.push("Sold out"),r;let i=t?t.price.amount:e?.priceRange?.minVariantPrice.amount,o=t?t.compareAtPrice?.amount:e?.compareAtPriceRange?.minVariantPrice.amount;return o&&parseFloat(o)>parseFloat(i)&&r.push("Sale"),r}mapBadges(e){return e.map(t=>typeof t=="string"?{id:t.toLowerCase().replace(/[^a-z0-9]/g,"_"),label:t}:t)}};var Fe="0.104.0",lp=`https://swish.app/cdn/sdk@${Fe}/swish.js`,cp=s(async n=>{if(typeof window>"u")throw new Error("Swish is not supported in this environment");if(window.swish)return window.swish;let e=tn(n),t=new Ht(e);return window.swish=t,document.dispatchEvent(new Event("swish-ready")),t.api.initAuth().then(()=>{typeof window.Shopify?.analytics?.publish=="function"&&window.Shopify.analytics.publish("swish-ready",{market:e.storefrontContext.localization.market,country:e.storefrontContext.localization.country,language:e.storefrontContext.localization.language,rootUrl:e.storefrontContext.routes.rootUrl})}),t},"createSwish"),Ht=class{constructor(e){this.dom={createElementLocator:ce,createQueryParamsObserver:ae};this.state={itemContext:cn(this),itemState:pn(this),itemCount:dn(this),swishQuery:fn(this),effect:H,signal:T,computed:G};this.swishOptions=e,this.events=new ye,this.swishBadges=new st({getBadges:this.swishOptions.badges?.getBadges}),this.swishApiPublisher=new nt(this.events);let t=[Fe,e.swishUi?.version].join("-");this.swishApi=new tt({...this.swishOptions.swishApi,responseInterceptor:this.swishApiPublisher.processFetchResponse},this.swishOptions.storefrontContext,this.events,t),this.ajaxApiPublisher=new me(this.events),this.ajaxApi=new he({storeDomain:this.swishOptions.storefrontApi.storeDomain,responseInterceptor:this.ajaxApiPublisher.processFetchResponse}),this.ajaxApi.patchFetch(),this.storefrontApi=new Ye(this.swishOptions.storefrontApi,this.swishOptions.storefrontContext,this.swishBadges,this.swishOptions.metafields),this.swishUi=new rt(this.swishOptions.swishUi,this.swishOptions.storefrontContext),this.events.subscribe(["cart-add","cart-update","cart-change","cart-clear"],()=>{this.ajaxApi.clearCache()}),customElements.get("swish-ui")||customElements.define("swish-ui",it),this.intents=new Ge(this,this.swishUi)}static{s(this,"SwishApp")}get options(){return this.swishOptions}get storefrontContext(){return this.swishOptions.storefrontContext}get badges(){return this.swishBadges}get api(){return this.swishApi}get storefront(){return this.storefrontApi}get ajax(){return this.ajaxApi}get shopUrl(){return`https://${this.swishOptions.storefrontApi.storeDomain}`}};export{Fe as VERSION,cp as createSwish,lp as swishSdkUrl};
|