diff --git a/.gitignore b/.gitignore index 6eebaf9..8d9bea2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ node_modules .vscode .shopify .turbo +/test-results/ +/playwright-report/ +/playwright/.cache/ diff --git a/.graphqlrc.yml b/.graphqlrc.yml index bd38d07..eee81ed 100644 --- a/.graphqlrc.yml +++ b/.graphqlrc.yml @@ -1 +1,12 @@ -schema: node_modules/@shopify/hydrogen-react/storefront.schema.json +projects: + default: + schema: 'node_modules/@shopify/hydrogen/storefront.schema.json' + documents: + - '!*.d.ts' + - '*.{ts,tsx,js,jsx}' + - 'app/**/*.{ts,tsx,js,jsx}' + - '!app/graphql/**/*.{ts,tsx,js,jsx}' + customer-account: + schema: 'node_modules/@shopify/hydrogen/customer-account.schema.json' + documents: + - 'app/graphql/customer-account/**/*.{ts,tsx,js,jsx}' diff --git a/CHANGELOG.md b/CHANGELOG.md index 294ef0a..c2c15b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # @weaverse/pilot +## 2.5.1 + +### Patch Changes + +- Updated dependencies + - @weaverse/hydrogen@3.0.1 + ## 2.4.5 ### Patch Changes diff --git a/README.md b/README.md index dac3426..52babe0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

- Version + Version License: MIT @@ -43,13 +43,15 @@ _Pilot is an innovative Shopify theme, powered by Hydrogen, Remix, and Weaverse, ## Deployment - [Deploy to Shopify Oxygen](https://weaverse.io/docs/deployment/oxygen) -- Deploy to Vercel: - [![Deploy with Vercel](https://vercel.com/button)](https://wvse.cc/deploy-pilot-to-vercel) - +- Deploy to Vercel: [![Deploy to Vercel](https://vercel.com/button)](https://wvse.cc/deploy-pilot-to-vercel) ## Getting started -Follow these steps to get started with Pilot and begin crafting your Hydrogen-driven storefront: +**Requirements:** + +- Node.js version 18.0.0 or higher + +**Follow these steps to get started with Pilot and begin crafting your Hydrogen-driven storefront:** 1. Install [Weaverse Hydrogen Customizer](https://apps.shopify.com/weaverse) from Shopify App Store. 2. Create new Hydrogen storefront inside Weaverse. diff --git a/app/components/Cart.tsx b/app/components/Cart.tsx index df4fd38..a5b8f62 100644 --- a/app/components/Cart.tsx +++ b/app/components/Cart.tsx @@ -286,7 +286,7 @@ function CartLineItem({line}: {line: CartLine}) {

- {(merchandise?.selectedOptions || []).map((option) => ( + {(merchandise?.selectedOptions || []).filter(option => option.value !== 'Default Title').map((option) => ( {option.name}: {option.value} diff --git a/app/components/GenericError.tsx b/app/components/GenericError.tsx index c866922..f233309 100644 --- a/app/components/GenericError.tsx +++ b/app/components/GenericError.tsx @@ -1,5 +1,4 @@ import {Button} from './Button'; -import {FeaturedSection} from './FeaturedSection'; import {PageHeader, Text} from './Text'; export function GenericError({ @@ -41,7 +40,6 @@ export function GenericError({ Take me to the home page - ); } diff --git a/app/components/Logo.tsx b/app/components/Logo.tsx index 53120b8..1905c26 100644 --- a/app/components/Logo.tsx +++ b/app/components/Logo.tsx @@ -4,7 +4,7 @@ import {Link} from './Link'; export function Logo() { let settings = useThemeSettings(); - let {logoData} = settings; + let logoData = settings?.logoData; if (!logoData) { return null; } diff --git a/app/components/ProductCard.tsx b/app/components/ProductCard.tsx index 51161d9..87452f9 100644 --- a/app/components/ProductCard.tsx +++ b/app/components/ProductCard.tsx @@ -85,13 +85,14 @@ export function ProductCard({
- {product.title} + {product.title} + {firstVariant.sku && ({firstVariant.sku})} -
- +
+ {isDiscounted(price as MoneyV2, compareAtPrice as MoneyV2) && ( { - - {isRouteError ? ( - <> - {routeError.status === 404 ? ( - - ) : ( - - )} - + {isRouteError ? ( + <> + {routeError.status === 404 ? ( + ) : ( )} - - - - + + ) : ( + + )} + {/**/} + {/* */} + {/**/} + {/**/} + {/**/} + {/**/} ); diff --git a/app/routes/($locale).$.tsx b/app/routes/($locale).$.tsx index 0e4b9f6..566ca0c 100644 --- a/app/routes/($locale).$.tsx +++ b/app/routes/($locale).$.tsx @@ -1,5 +1,6 @@ import {WeaverseContent} from '~/weaverse'; import {type LoaderFunctionArgs} from '@shopify/remix-oxygen'; + export async function loader({context}: LoaderFunctionArgs) { let weaverseData = await context.weaverse.loadPage({ type: 'CUSTOM', diff --git a/app/routes/($locale).account.tsx b/app/routes/($locale).account.tsx index c81d2d8..e2419bf 100644 --- a/app/routes/($locale).account.tsx +++ b/app/routes/($locale).account.tsx @@ -6,35 +6,32 @@ import { useMatches, useOutlet, } from '@remix-run/react'; -import {Suspense} from 'react'; +import { flattenConnection } from '@shopify/hydrogen'; import { defer, - redirect, - type LoaderFunctionArgs, - type AppLoadContext, + type LoaderFunctionArgs } from '@shopify/remix-oxygen'; -import {flattenConnection} from '@shopify/hydrogen'; +import { Suspense } from 'react'; import type { CustomerDetailsFragment, OrderCardFragment, } from 'customer-accountapi.generated'; import { + AccountAddressBook, + AccountDetails, Button, + Modal, OrderCard, PageHeader, - Text, - AccountDetails, - AccountAddressBook, - Modal, ProductSwimlane, + Text, } from '~/components'; -import {FeaturedCollections} from '~/components/FeaturedCollections'; -import {usePrefixPathWithLocale} from '~/lib/utils'; -import {CACHE_NONE, routeHeaders} from '~/data/cache'; -import {CUSTOMER_DETAILS_QUERY} from '~/graphql/customer-account/CustomerDetailsQuery'; - -import {doLogout} from './($locale).account_.logout'; +import { FeaturedCollections } from '~/components/FeaturedCollections'; +import { CACHE_NONE, routeHeaders } from '~/data/cache'; +import { CUSTOMER_DETAILS_QUERY } from '~/graphql/customer-account/CustomerDetailsQuery'; +import { usePrefixPathWithLocale } from '~/lib/utils'; +import { doLogout } from './($locale).account_.logout'; import { getFeaturedData, type FeaturedData, diff --git a/app/routes/($locale).cart.add.$variantId.ts b/app/routes/($locale).cart.add.$variantId.ts new file mode 100644 index 0000000..e6b0616 --- /dev/null +++ b/app/routes/($locale).cart.add.$variantId.ts @@ -0,0 +1,22 @@ +import { json, LoaderFunctionArgs, redirect } from '@shopify/remix-oxygen' + +export async function loader({params, context}: LoaderFunctionArgs) { + const {cart} = context; + + try { + let variantId = params.variantId + + let inputLines = [ + { + merchandiseId: `gid://shopify/ProductVariant/${variantId}`, + quantity: 1 + } + ] + await cart.addLines(inputLines) + + return redirect('/cart') + } catch (e) { + console.error(e) + return json({error: e}) + } +} diff --git a/app/routes/($locale).collections.$collectionHandle.tsx b/app/routes/($locale).collections.$collectionHandle.tsx index 4d63dac..a9e91de 100644 --- a/app/routes/($locale).collections.$collectionHandle.tsx +++ b/app/routes/($locale).collections.$collectionHandle.tsx @@ -7,17 +7,16 @@ import type { ProductCollectionSortKeys, ProductFilter, } from '@shopify/hydrogen/storefront-api-types'; -import {json, type LoaderFunctionArgs} from '@shopify/remix-oxygen'; - +import { json, type LoaderFunctionArgs } from '@shopify/remix-oxygen'; import invariant from 'tiny-invariant'; -import type {SortParam} from '~/components/SortFilter'; -import {FILTER_URL_PREFIX} from '~/components/SortFilter'; -import {routeHeaders} from '~/data/cache'; -import {COLLECTION_QUERY} from '~/data/queries'; -import {seoPayload} from '~/lib/seo.server'; -import {parseAsCurrency} from '~/lib/utils'; -import {WeaverseContent} from '~/weaverse'; -import {getImageLoadingPriority, PAGINATION_SIZE} from '~/lib/const'; +import type { SortParam } from '~/components/SortFilter'; +import { FILTER_URL_PREFIX } from '~/components/SortFilter'; +import { routeHeaders } from '~/data/cache'; +import { COLLECTION_QUERY } from '~/data/queries'; +import { PAGINATION_SIZE } from '~/lib/const'; +import { seoPayload } from '~/lib/seo.server'; +import { parseAsCurrency } from '~/lib/utils'; +import { WeaverseContent } from '~/weaverse'; export const headers = routeHeaders; @@ -137,7 +136,7 @@ export default function Collection() { return ; } -function getSortValuesFromParam(sortParam: SortParam | null): { +export function getSortValuesFromParam(sortParam: SortParam | null): { sortKey: ProductCollectionSortKeys; reverse: boolean; } { diff --git a/app/routes/($locale).products._index.tsx b/app/routes/($locale).products._index.tsx index d31303c..c33c6b7 100644 --- a/app/routes/($locale).products._index.tsx +++ b/app/routes/($locale).products._index.tsx @@ -1,13 +1,12 @@ -import {getPaginationVariables} from '@shopify/hydrogen'; -import {json} from '@shopify/remix-oxygen'; +import { getPaginationVariables } from '@shopify/hydrogen'; +import type { LoaderFunctionArgs } from '@shopify/remix-oxygen'; +import { json } from '@shopify/remix-oxygen'; import invariant from 'tiny-invariant'; -import {routeHeaders} from '~/data/cache'; -import {ALL_PRODUCTS_QUERY} from '~/data/queries'; -import {seoPayload} from '~/lib/seo.server'; -import {WeaverseContent} from '~/weaverse'; -import type {LoaderFunctionArgs} from '@shopify/remix-oxygen'; - -const PAGE_BY = 8; +import { routeHeaders } from '~/data/cache'; +import { ALL_PRODUCTS_QUERY } from '~/data/queries'; +import { PAGINATION_SIZE } from '~/lib/const'; +import { seoPayload } from '~/lib/seo.server'; +import { WeaverseContent } from '~/weaverse'; export const headers = routeHeaders; @@ -15,7 +14,7 @@ export async function loader({ request, context: {storefront, weaverse}, }: LoaderFunctionArgs) { - const variables = getPaginationVariables(request, {pageBy: PAGE_BY}); + const variables = getPaginationVariables(request, {pageBy: PAGINATION_SIZE}); const data = await storefront.query(ALL_PRODUCTS_QUERY, { variables: { diff --git a/app/routes/($locale).search.tsx b/app/routes/($locale).search.tsx index 115294c..f926a36 100644 --- a/app/routes/($locale).search.tsx +++ b/app/routes/($locale).search.tsx @@ -1,8 +1,7 @@ -import {defer, type LoaderFunctionArgs} from '@shopify/remix-oxygen'; -import {Await, Form, useLoaderData} from '@remix-run/react'; -import {Suspense} from 'react'; -import {Pagination, getPaginationVariables} from '@shopify/hydrogen'; - +import { Await, Form, useLoaderData } from '@remix-run/react'; +import { getPaginationVariables, Pagination } from '@shopify/hydrogen'; +import { defer, type LoaderFunctionArgs } from '@shopify/remix-oxygen'; +import { Suspense } from 'react'; import { FeaturedCollections, Grid, @@ -14,10 +13,9 @@ import { Section, Text, } from '~/components'; -import {PRODUCT_CARD_FRAGMENT} from '~/data/fragments'; -import {getImageLoadingPriority, PAGINATION_SIZE} from '~/lib/const'; -import {seoPayload} from '~/lib/seo.server'; - +import { PRODUCT_CARD_FRAGMENT } from '~/data/fragments'; +import { getImageLoadingPriority, PAGINATION_SIZE } from '~/lib/const'; +import { seoPayload } from '~/lib/seo.server'; import { getFeaturedData, type FeaturedData, @@ -29,7 +27,7 @@ export async function loader({ }: LoaderFunctionArgs) { const searchParams = new URL(request.url).searchParams; const searchTerm = searchParams.get('q')!; - const variables = getPaginationVariables(request, {pageBy: 8}); + const variables = getPaginationVariables(request, {pageBy: PAGINATION_SIZE}); const {products} = await storefront.query(SEARCH_QUERY, { variables: { diff --git a/app/sections/product-list.tsx b/app/sections/product-list.tsx new file mode 100644 index 0000000..4b98756 --- /dev/null +++ b/app/sections/product-list.tsx @@ -0,0 +1,105 @@ +import type { + HydrogenComponentProps, + HydrogenComponentSchema, + ComponentLoaderArgs, +} from '@weaverse/hydrogen'; +import { + getPaginationVariables, +} from '@shopify/hydrogen'; +import {forwardRef} from 'react'; +import {ProductSwimlane} from '~/components'; +import { COLLECTION_QUERY } from '~/data/queries' +import type { SortParam } from '~/components/SortFilter' +import { getSortValuesFromParam } from '~/routes/($locale).collections.$collectionHandle' +import { PAGINATION_SIZE } from '~/lib/const' + +interface ProductListProps + extends HydrogenComponentProps>> { + heading: string; + productsCount: number; +} + +let ProductList = forwardRef( + (props, ref) => { + let {loaderData, heading, productsCount, ...rest} = props; + let products = loaderData?.collection?.products + return ( +
+ {products?.nodes?.length ? ( + + ) : null} +
+ ); + }, +); + +export default ProductList; + +export let loader = async ({weaverse, data}: ComponentLoaderArgs) => { + let {language, country} = weaverse.storefront.i18n; + let collectionHandle = data?.collection?.handle + + const searchParams = new URL(weaverse.request.url).searchParams; + + const {sortKey, reverse} = getSortValuesFromParam( + searchParams.get('sort') as SortParam, + ); + const paginationVariables = getPaginationVariables(weaverse.request, { + pageBy: PAGINATION_SIZE, + }); + return await weaverse.storefront.query( + COLLECTION_QUERY, + { + variables: { + ...paginationVariables, + handle: collectionHandle, + country, + language, + sortKey, + reverse, + filters: [], + }, + }, + ); +}; + +export let schema: HydrogenComponentSchema = { + type: 'product-list', + title: 'Product List', + limit: 1, + inspector: [ + { + group: 'Product List', + inputs: [ + { + type: "collection", + name: "collection", + label: "Collection", + }, + { + type: 'text', + name: 'heading', + label: 'Heading', + defaultValue: 'Product List', + placeholder: 'Product List', + }, + { + type: 'range', + name: 'productsCount', + label: 'Number of products', + defaultValue: 4, + configs: { + min: 1, + max: 12, + step: 1, + }, + }, + ], + }, + ], + toolbar: ['general-settings', ['duplicate', 'delete']], +}; diff --git a/app/weaverse/components.ts b/app/weaverse/components.ts index fef2fc0..c3406d2 100644 --- a/app/weaverse/components.ts +++ b/app/weaverse/components.ts @@ -43,6 +43,7 @@ import * as SlideShowItem from '~/sections/SlideShow/SlideItems'; import * as NewsLetter from '~/sections/newsletter'; import * as ImageHotspot from '~/sections/image-hotspots/image-hotspot'; import * as ImageHotspotItem from '~/sections/image-hotspots/items'; +import * as ProductList from '~/sections/product-list' export let components: HydrogenComponent[] = [ ...commonComponents, @@ -91,4 +92,5 @@ export let components: HydrogenComponent[] = [ MetaDemo, SlideShow, SlideShowItem, + ProductList ]; diff --git a/package.json b/package.json index 71ea470..3cd56bb 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "sideEffects": false, "author": "Weaverse", - "version": "2.4.5", + "version": "2.5.1", "scripts": { "dev": "shopify hydrogen dev --codegen --port 3456", "build": "shopify hydrogen build", @@ -14,7 +14,8 @@ "lint:fix": "eslint --fix --ext .js,.ts,.jsx,.tsx .", "format": "prettier --write --ignore-unknown .", "format:check": "prettier --check --ignore-unknown .", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --noEmit", + "hydrogen": "shopify hydrogen" }, "browserslist": [ "defaults" @@ -23,48 +24,48 @@ "dependencies": { "@fontsource/roboto": "^5.0.8", "@headlessui/react": "1.7.18", - "@remix-run/react": "2.7.1", - "@remix-run/server-runtime": "2.7.1", + "@remix-run/react": "2.7.2", + "@remix-run/server-runtime": "2.7.2", "@shopify/cli": "3.53.0", - "@shopify/cli-hydrogen": "^7.0.1", - "@shopify/hydrogen": "~2024.1.1", + "@shopify/cli-hydrogen": "^7.1.0", + "@shopify/hydrogen": "~2024.1.2", "@shopify/remix-oxygen": "^2.0.3", - "@weaverse/hydrogen": "^2.10.3", + "@weaverse/hydrogen": "3.0.1", "clsx": "2.1.0", "cross-env": "7.0.3", "graphql": "16.8.1", "graphql-tag": "2.12.6", - "isbot": "4.3.0", + "isbot": "5.1.1", "keen-slider": "^6.8.6", "react": "18.2.0", "react-dom": "18.2.0", - "react-intersection-observer": "9.5.3", + "react-intersection-observer": "9.8.1", "react-player": "^2.14.1", - "react-use": "17.4.2", + "react-use": "17.5.0", "schema-dts": "1.1.2", - "tiny-invariant": "1.3.1", + "tiny-invariant": "1.3.3", "typographic-base": "1.0.4" }, "devDependencies": { "@playwright/test": "^1.40.1", - "@remix-run/dev": "2.7.1", - "@remix-run/eslint-config": "2.7.1", + "@remix-run/dev": "2.7.2", + "@remix-run/eslint-config": "2.7.2", "@shopify/eslint-plugin": "44.0.0", "@shopify/oxygen-workers-types": "^4.0.0", "@shopify/prettier-config": "1.1.2", "@tailwindcss/forms": "0.5.7", "@tailwindcss/typography": "0.5.10", "@total-typescript/ts-reset": "0.5.1", - "@types/eslint": "8.56.2", - "@types/react": "18.2.47", - "@types/react-dom": "18.2.18", + "@types/eslint": "8.56.4", + "@types/react": "18.2.60", + "@types/react-dom": "18.2.19", "cross-env": "7.0.3", - "eslint": "8.56.0", + "eslint": "8.57.0", "eslint-plugin-hydrogen": "0.12.3", - "postcss": "8.4.33", - "postcss-import": "16.0.0", - "postcss-preset-env": "9.3.0", - "prettier": "3.1.1", + "postcss": "8.4.35", + "postcss-import": "16.0.1", + "postcss-preset-env": "9.4.0", + "prettier": "3.2.5", "rimraf": "5.0.5", "tailwindcss": "3.4.1", "typescript": "5.3.3" @@ -75,4 +76,4 @@ "engines": { "node": ">=18.0.0" } -} +} \ No newline at end of file diff --git a/storefrontapi.generated.d.ts b/storefrontapi.generated.d.ts index c22622b..04b2c21 100644 --- a/storefrontapi.generated.d.ts +++ b/storefrontapi.generated.d.ts @@ -64,7 +64,7 @@ export type ProductCardFragment = Pick< > & { variants: { nodes: Array< - Pick & { + Pick & { image?: StorefrontAPI.Maybe< Pick >; @@ -260,7 +260,10 @@ export type HomepageFeaturedProductsQuery = { > & { variants: { nodes: Array< - Pick & { + Pick< + StorefrontAPI.ProductVariant, + 'id' | 'availableForSale' | 'sku' + > & { image?: StorefrontAPI.Maybe< Pick< StorefrontAPI.Image, @@ -453,7 +456,10 @@ export type ProductRecommendationsQuery = { > & { variants: { nodes: Array< - Pick & { + Pick< + StorefrontAPI.ProductVariant, + 'id' | 'availableForSale' | 'sku' + > & { image?: StorefrontAPI.Maybe< Pick< StorefrontAPI.Image, @@ -482,7 +488,10 @@ export type ProductRecommendationsQuery = { > & { variants: { nodes: Array< - Pick & { + Pick< + StorefrontAPI.ProductVariant, + 'id' | 'availableForSale' | 'sku' + > & { image?: StorefrontAPI.Maybe< Pick< StorefrontAPI.Image, @@ -574,7 +583,7 @@ export type CollectionDetailsQuery = { nodes: Array< Pick< StorefrontAPI.ProductVariant, - 'id' | 'availableForSale' + 'id' | 'availableForSale' | 'sku' > & { image?: StorefrontAPI.Maybe< Pick< @@ -668,7 +677,10 @@ export type PaginatedProductsSearchQuery = { > & { variants: { nodes: Array< - Pick & { + Pick< + StorefrontAPI.ProductVariant, + 'id' | 'availableForSale' | 'sku' + > & { image?: StorefrontAPI.Maybe< Pick< StorefrontAPI.Image, @@ -826,7 +838,10 @@ export type AllProductsQuery = { > & { variants: { nodes: Array< - Pick & { + Pick< + StorefrontAPI.ProductVariant, + 'id' | 'availableForSale' | 'sku' + > & { image?: StorefrontAPI.Maybe< Pick< StorefrontAPI.Image, @@ -999,511 +1014,6 @@ export type GetShopPrimaryDomainQuery = { shop: {primaryDomain: Pick}; }; -export type CustomerActivateMutationVariables = StorefrontAPI.Exact<{ - id: StorefrontAPI.Scalars['ID']['input']; - input: StorefrontAPI.CustomerActivateInput; -}>; - -export type CustomerActivateMutation = { - customerActivate?: StorefrontAPI.Maybe<{ - customerAccessToken?: StorefrontAPI.Maybe< - Pick - >; - customerUserErrors: Array< - Pick - >; - }>; -}; - -export type CustomerAddressUpdateMutationVariables = StorefrontAPI.Exact<{ - address: StorefrontAPI.MailingAddressInput; - customerAccessToken: StorefrontAPI.Scalars['String']['input']; - id: StorefrontAPI.Scalars['ID']['input']; -}>; - -export type CustomerAddressUpdateMutation = { - customerAddressUpdate?: StorefrontAPI.Maybe<{ - customerUserErrors: Array< - Pick - >; - }>; -}; - -export type CustomerAddressDeleteMutationVariables = StorefrontAPI.Exact<{ - customerAccessToken: StorefrontAPI.Scalars['String']['input']; - id: StorefrontAPI.Scalars['ID']['input']; -}>; - -export type CustomerAddressDeleteMutation = { - customerAddressDelete?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.CustomerAddressDeletePayload, - 'deletedCustomerAddressId' - > & { - customerUserErrors: Array< - Pick - >; - } - >; -}; - -export type CustomerDefaultAddressUpdateMutationVariables = - StorefrontAPI.Exact<{ - addressId: StorefrontAPI.Scalars['ID']['input']; - customerAccessToken: StorefrontAPI.Scalars['String']['input']; - }>; - -export type CustomerDefaultAddressUpdateMutation = { - customerDefaultAddressUpdate?: StorefrontAPI.Maybe<{ - customerUserErrors: Array< - Pick - >; - }>; -}; - -export type CustomerAddressCreateMutationVariables = StorefrontAPI.Exact<{ - address: StorefrontAPI.MailingAddressInput; - customerAccessToken: StorefrontAPI.Scalars['String']['input']; -}>; - -export type CustomerAddressCreateMutation = { - customerAddressCreate?: StorefrontAPI.Maybe<{ - customerAddress?: StorefrontAPI.Maybe< - Pick - >; - customerUserErrors: Array< - Pick - >; - }>; -}; - -export type CustomerUpdateMutationVariables = StorefrontAPI.Exact<{ - customerAccessToken: StorefrontAPI.Scalars['String']['input']; - customer: StorefrontAPI.CustomerUpdateInput; -}>; - -export type CustomerUpdateMutation = { - customerUpdate?: StorefrontAPI.Maybe<{ - customerUserErrors: Array< - Pick - >; - }>; -}; - -export type CustomerAccessTokenCreateMutationVariables = StorefrontAPI.Exact<{ - input: StorefrontAPI.CustomerAccessTokenCreateInput; -}>; - -export type CustomerAccessTokenCreateMutation = { - customerAccessTokenCreate?: StorefrontAPI.Maybe<{ - customerUserErrors: Array< - Pick - >; - customerAccessToken?: StorefrontAPI.Maybe< - Pick - >; - }>; -}; - -export type MoneyFragment = Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' ->; - -export type AddressFullFragment = Pick< - StorefrontAPI.MailingAddress, - | 'address1' - | 'address2' - | 'city' - | 'company' - | 'country' - | 'countryCodeV2' - | 'firstName' - | 'formatted' - | 'id' - | 'lastName' - | 'name' - | 'phone' - | 'province' - | 'provinceCode' - | 'zip' ->; - -export type DiscountApplicationFragment = { - value: - | ({__typename: 'MoneyV2'} & Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >) - | ({__typename: 'PricingPercentageValue'} & Pick< - StorefrontAPI.PricingPercentageValue, - 'percentage' - >); -}; - -export type ImageFragment = Pick< - StorefrontAPI.Image, - 'altText' | 'height' | 'id' | 'width' -> & {src: StorefrontAPI.Image['url']}; - -export type ProductVariantFragment = Pick< - StorefrontAPI.ProductVariant, - 'id' | 'sku' | 'title' -> & { - image?: StorefrontAPI.Maybe< - Pick & { - src: StorefrontAPI.Image['url']; - } - >; - price: Pick; - product: Pick; -}; - -export type LineItemFullFragment = Pick< - StorefrontAPI.OrderLineItem, - 'title' | 'quantity' -> & { - discountAllocations: Array<{ - allocatedAmount: Pick; - discountApplication: { - value: - | ({__typename: 'MoneyV2'} & Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >) - | ({__typename: 'PricingPercentageValue'} & Pick< - StorefrontAPI.PricingPercentageValue, - 'percentage' - >); - }; - }>; - originalTotalPrice: Pick; - discountedTotalPrice: Pick; - variant?: StorefrontAPI.Maybe< - Pick & { - image?: StorefrontAPI.Maybe< - Pick & { - src: StorefrontAPI.Image['url']; - } - >; - price: Pick; - product: Pick; - } - >; -}; - -export type CustomerOrderQueryVariables = StorefrontAPI.Exact<{ - country?: StorefrontAPI.InputMaybe; - language?: StorefrontAPI.InputMaybe; - orderId: StorefrontAPI.Scalars['ID']['input']; -}>; - -export type CustomerOrderQuery = { - node?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.Order, - 'id' | 'name' | 'orderNumber' | 'processedAt' | 'fulfillmentStatus' - > & { - totalTaxV2?: StorefrontAPI.Maybe< - Pick - >; - totalPriceV2: Pick; - subtotalPriceV2?: StorefrontAPI.Maybe< - Pick - >; - shippingAddress?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.MailingAddress, - | 'address1' - | 'address2' - | 'city' - | 'company' - | 'country' - | 'countryCodeV2' - | 'firstName' - | 'formatted' - | 'id' - | 'lastName' - | 'name' - | 'phone' - | 'province' - | 'provinceCode' - | 'zip' - > - >; - discountApplications: { - nodes: Array<{ - value: - | ({__typename: 'MoneyV2'} & Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >) - | ({__typename: 'PricingPercentageValue'} & Pick< - StorefrontAPI.PricingPercentageValue, - 'percentage' - >); - }>; - }; - lineItems: { - nodes: Array< - Pick & { - discountAllocations: Array<{ - allocatedAmount: Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >; - discountApplication: { - value: - | ({__typename: 'MoneyV2'} & Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >) - | ({__typename: 'PricingPercentageValue'} & Pick< - StorefrontAPI.PricingPercentageValue, - 'percentage' - >); - }; - }>; - originalTotalPrice: Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >; - discountedTotalPrice: Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >; - variant?: StorefrontAPI.Maybe< - Pick & { - image?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.Image, - 'altText' | 'height' | 'id' | 'width' - > & {src: StorefrontAPI.Image['url']} - >; - price: Pick; - product: Pick; - } - >; - } - >; - }; - } - >; -}; - -export type CustomerRecoverMutationVariables = StorefrontAPI.Exact<{ - email: StorefrontAPI.Scalars['String']['input']; -}>; - -export type CustomerRecoverMutation = { - customerRecover?: StorefrontAPI.Maybe<{ - customerUserErrors: Array< - Pick - >; - }>; -}; - -export type CustomerCreateMutationVariables = StorefrontAPI.Exact<{ - input: StorefrontAPI.CustomerCreateInput; -}>; - -export type CustomerCreateMutation = { - customerCreate?: StorefrontAPI.Maybe<{ - customer?: StorefrontAPI.Maybe>; - customerUserErrors: Array< - Pick - >; - }>; -}; - -export type CustomerResetMutationVariables = StorefrontAPI.Exact<{ - id: StorefrontAPI.Scalars['ID']['input']; - input: StorefrontAPI.CustomerResetInput; -}>; - -export type CustomerResetMutation = { - customerReset?: StorefrontAPI.Maybe<{ - customerAccessToken?: StorefrontAPI.Maybe< - Pick - >; - customerUserErrors: Array< - Pick - >; - }>; -}; - -export type CustomerDetailsQueryVariables = StorefrontAPI.Exact<{ - customerAccessToken: StorefrontAPI.Scalars['String']['input']; - country?: StorefrontAPI.InputMaybe; - language?: StorefrontAPI.InputMaybe; -}>; - -export type CustomerDetailsQuery = { - customer?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.Customer, - 'firstName' | 'lastName' | 'phone' | 'email' - > & { - defaultAddress?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.MailingAddress, - | 'id' - | 'formatted' - | 'firstName' - | 'lastName' - | 'company' - | 'address1' - | 'address2' - | 'country' - | 'province' - | 'city' - | 'zip' - | 'phone' - > - >; - addresses: { - edges: Array<{ - node: Pick< - StorefrontAPI.MailingAddress, - | 'id' - | 'formatted' - | 'firstName' - | 'lastName' - | 'company' - | 'address1' - | 'address2' - | 'country' - | 'province' - | 'city' - | 'zip' - | 'phone' - >; - }>; - }; - orders: { - edges: Array<{ - node: Pick< - StorefrontAPI.Order, - | 'id' - | 'orderNumber' - | 'processedAt' - | 'financialStatus' - | 'fulfillmentStatus' - > & { - currentTotalPrice: Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >; - lineItems: { - edges: Array<{ - node: Pick & { - variant?: StorefrontAPI.Maybe<{ - image?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.Image, - 'url' | 'altText' | 'height' | 'width' - > - >; - }>; - }; - }>; - }; - }; - }>; - }; - } - >; -}; - -export type AddressPartialFragment = Pick< - StorefrontAPI.MailingAddress, - | 'id' - | 'formatted' - | 'firstName' - | 'lastName' - | 'company' - | 'address1' - | 'address2' - | 'country' - | 'province' - | 'city' - | 'zip' - | 'phone' ->; - -export type CustomerDetailsFragment = Pick< - StorefrontAPI.Customer, - 'firstName' | 'lastName' | 'phone' | 'email' -> & { - defaultAddress?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.MailingAddress, - | 'id' - | 'formatted' - | 'firstName' - | 'lastName' - | 'company' - | 'address1' - | 'address2' - | 'country' - | 'province' - | 'city' - | 'zip' - | 'phone' - > - >; - addresses: { - edges: Array<{ - node: Pick< - StorefrontAPI.MailingAddress, - | 'id' - | 'formatted' - | 'firstName' - | 'lastName' - | 'company' - | 'address1' - | 'address2' - | 'country' - | 'province' - | 'city' - | 'zip' - | 'phone' - >; - }>; - }; - orders: { - edges: Array<{ - node: Pick< - StorefrontAPI.Order, - | 'id' - | 'orderNumber' - | 'processedAt' - | 'financialStatus' - | 'fulfillmentStatus' - > & { - currentTotalPrice: Pick< - StorefrontAPI.MoneyV2, - 'amount' | 'currencyCode' - >; - lineItems: { - edges: Array<{ - node: Pick & { - variant?: StorefrontAPI.Maybe<{ - image?: StorefrontAPI.Maybe< - Pick< - StorefrontAPI.Image, - 'url' | 'altText' | 'height' | 'width' - > - >; - }>; - }; - }>; - }; - }; - }>; - }; -}; - export type ApiAllProductsQueryVariables = StorefrontAPI.Exact<{ query?: StorefrontAPI.InputMaybe; count?: StorefrontAPI.InputMaybe; @@ -1522,7 +1032,10 @@ export type ApiAllProductsQuery = { > & { variants: { nodes: Array< - Pick & { + Pick< + StorefrontAPI.ProductVariant, + 'id' | 'availableForSale' | 'sku' + > & { image?: StorefrontAPI.Maybe< Pick< StorefrontAPI.Image, @@ -1569,7 +1082,10 @@ export type FeaturedItemsQuery = { > & { variants: { nodes: Array< - Pick & { + Pick< + StorefrontAPI.ProductVariant, + 'id' | 'availableForSale' | 'sku' + > & { image?: StorefrontAPI.Maybe< Pick< StorefrontAPI.Image, @@ -1733,7 +1249,7 @@ interface GeneratedQueryTypes { return: SeoCollectionContentQuery; variables: SeoCollectionContentQueryVariables; }; - '#graphql\n query homepageFeaturedProducts($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n products(first: 8) {\n nodes {\n ...ProductCard\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n': { + '#graphql\n query homepageFeaturedProducts($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n products(first: 8) {\n nodes {\n ...ProductCard\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n sku\n }\n }\n }\n\n': { return: HomepageFeaturedProductsQuery; variables: HomepageFeaturedProductsQueryVariables; }; @@ -1745,11 +1261,11 @@ interface GeneratedQueryTypes { return: ProductInfoQuery; variables: ProductInfoQueryVariables; }; - '#graphql\n query Product(\n $country: CountryCode\n $language: LanguageCode\n $handle: String!\n $selectedOptions: [SelectedOptionInput!]!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n id\n title\n vendor\n handle\n descriptionHtml\n description\n options {\n name\n values\n }\n selectedVariant: variantBySelectedOptions(selectedOptions: $selectedOptions) {\n ...ProductVariantFragment\n }\n media(first: 7) {\n nodes {\n ...Media\n }\n }\n variants(first: 1) {\n nodes {\n ...ProductVariantFragment\n }\n }\n seo {\n description\n title\n }\n }\n shop {\n name\n primaryDomain {\n url\n }\n shippingPolicy {\n body\n handle\n }\n refundPolicy {\n body\n handle\n }\n }\n }\n #graphql\n fragment Media on Media {\n __typename\n mediaContentType\n alt\n previewImage {\n url\n }\n ... on MediaImage {\n id\n image {\n id\n url\n width\n height\n }\n }\n ... on Video {\n id\n sources {\n mimeType\n url\n }\n }\n ... on Model3d {\n id\n sources {\n mimeType\n url\n }\n }\n ... on ExternalVideo {\n id\n embedUrl\n host\n }\n }\n\n #graphql\n fragment ProductVariantFragment on ProductVariant {\n id\n availableForSale\n quantityAvailable\n selectedOptions {\n name\n value\n }\n image {\n id\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n sku\n title\n unitPrice {\n amount\n currencyCode\n }\n product {\n title\n handle\n }\n }\n\n': { + '#graphql\n query Product(\n $country: CountryCode\n $language: LanguageCode\n $handle: String!\n $selectedOptions: [SelectedOptionInput!]!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n id\n title\n vendor\n handle\n descriptionHtml\n description\n options {\n name\n values\n }\n selectedVariant: variantBySelectedOptions(selectedOptions: $selectedOptions, ignoreUnknownOptions: true, caseInsensitiveMatch: true) {\n ...ProductVariantFragment\n }\n media(first: 7) {\n nodes {\n ...Media\n }\n }\n variants(first: 1) {\n nodes {\n ...ProductVariantFragment\n }\n }\n seo {\n description\n title\n }\n }\n shop {\n name\n primaryDomain {\n url\n }\n shippingPolicy {\n body\n handle\n }\n refundPolicy {\n body\n handle\n }\n }\n }\n #graphql\n fragment Media on Media {\n __typename\n mediaContentType\n alt\n previewImage {\n url\n }\n ... on MediaImage {\n id\n image {\n id\n url\n width\n height\n }\n }\n ... on Video {\n id\n sources {\n mimeType\n url\n }\n }\n ... on Model3d {\n id\n sources {\n mimeType\n url\n }\n }\n ... on ExternalVideo {\n id\n embedUrl\n host\n }\n }\n\n #graphql\n fragment ProductVariantFragment on ProductVariant {\n id\n availableForSale\n quantityAvailable\n selectedOptions {\n name\n value\n }\n image {\n id\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n sku\n title\n unitPrice {\n amount\n currencyCode\n }\n product {\n title\n handle\n }\n }\n\n': { return: ProductQuery; variables: ProductQueryVariables; }; - '#graphql\n query productRecommendations(\n $productId: ID!\n $count: Int\n $country: CountryCode\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n recommended: productRecommendations(productId: $productId) {\n ...ProductCard\n }\n additional: products(first: $count, sortKey: BEST_SELLING) {\n nodes {\n ...ProductCard\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n': { + '#graphql\n query productRecommendations(\n $productId: ID!\n $count: Int\n $country: CountryCode\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n recommended: productRecommendations(productId: $productId) {\n ...ProductCard\n }\n additional: products(first: $count, sortKey: BEST_SELLING) {\n nodes {\n ...ProductCard\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n sku\n }\n }\n }\n\n': { return: ProductRecommendationsQuery; variables: ProductRecommendationsQueryVariables; }; @@ -1757,7 +1273,7 @@ interface GeneratedQueryTypes { return: CollectionInfoQuery; variables: CollectionInfoQueryVariables; }; - '#graphql\n query CollectionDetails(\n $handle: String!\n $country: CountryCode\n $language: LanguageCode\n $filters: [ProductFilter!]\n $sortKey: ProductCollectionSortKeys!\n $reverse: Boolean\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n collection(handle: $handle) {\n id\n handle\n title\n description\n seo {\n description\n title\n }\n image {\n id\n url\n width\n height\n altText\n }\n products(\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor,\n filters: $filters,\n sortKey: $sortKey,\n reverse: $reverse\n ) {\n filters {\n id\n label\n type\n values {\n id\n label\n count\n input\n }\n }\n nodes {\n ...ProductCard\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n endCursor\n startCursor\n }\n }\n }\n collections(first: 100) {\n edges {\n node {\n title\n handle\n }\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n': { + '#graphql\n query CollectionDetails(\n $handle: String!\n $country: CountryCode\n $language: LanguageCode\n $filters: [ProductFilter!]\n $sortKey: ProductCollectionSortKeys!\n $reverse: Boolean\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n collection(handle: $handle) {\n id\n handle\n title\n description\n seo {\n description\n title\n }\n image {\n id\n url\n width\n height\n altText\n }\n products(\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor,\n filters: $filters,\n sortKey: $sortKey,\n reverse: $reverse\n ) {\n filters {\n id\n label\n type\n values {\n id\n label\n count\n input\n }\n }\n nodes {\n ...ProductCard\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n endCursor\n startCursor\n }\n }\n }\n collections(first: 100) {\n edges {\n node {\n title\n handle\n }\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n sku\n }\n }\n }\n\n': { return: CollectionDetailsQuery; variables: CollectionDetailsQueryVariables; }; @@ -1765,7 +1281,7 @@ interface GeneratedQueryTypes { return: CollectionsQuery; variables: CollectionsQueryVariables; }; - '#graphql\n query PaginatedProductsSearch(\n $country: CountryCode\n $endCursor: String\n $first: Int\n $language: LanguageCode\n $last: Int\n $searchTerm: String\n $startCursor: String\n ) @inContext(country: $country, language: $language) {\n products(\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor,\n sortKey: RELEVANCE,\n query: $searchTerm\n ) {\n nodes {\n ...ProductCard\n }\n pageInfo {\n startCursor\n endCursor\n hasNextPage\n hasPreviousPage\n }\n }\n }\n\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n': { + '#graphql\n query PaginatedProductsSearch(\n $country: CountryCode\n $endCursor: String\n $first: Int\n $language: LanguageCode\n $last: Int\n $searchTerm: String\n $startCursor: String\n ) @inContext(country: $country, language: $language) {\n products(\n first: $first,\n last: $last,\n before: $startCursor,\n after: $endCursor,\n sortKey: RELEVANCE,\n query: $searchTerm\n ) {\n nodes {\n ...ProductCard\n }\n pageInfo {\n startCursor\n endCursor\n hasNextPage\n hasPreviousPage\n }\n }\n }\n\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n sku\n }\n }\n }\n\n': { return: PaginatedProductsSearchQuery; variables: PaginatedProductsSearchQueryVariables; }; @@ -1777,7 +1293,7 @@ interface GeneratedQueryTypes { return: ArticleDetailsQuery; variables: ArticleDetailsQueryVariables; }; - '#graphql\n query AllProducts(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...ProductCard\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n': { + '#graphql\n query AllProducts(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...ProductCard\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n sku\n }\n }\n }\n\n': { return: AllProductsQuery; variables: AllProductsQueryVariables; }; @@ -1793,19 +1309,11 @@ interface GeneratedQueryTypes { return: GetShopPrimaryDomainQuery; variables: GetShopPrimaryDomainQueryVariables; }; - '#graphql\n fragment Money on MoneyV2 {\n amount\n currencyCode\n }\n fragment AddressFull on MailingAddress {\n address1\n address2\n city\n company\n country\n countryCodeV2\n firstName\n formatted\n id\n lastName\n name\n phone\n province\n provinceCode\n zip\n }\n fragment DiscountApplication on DiscountApplication {\n value {\n __typename\n ... on MoneyV2 {\n amount\n currencyCode\n }\n ... on PricingPercentageValue {\n percentage\n }\n }\n }\n fragment Image on Image {\n altText\n height\n src: url(transform: {crop: CENTER, maxHeight: 96, maxWidth: 96, scale: 2})\n id\n width\n }\n fragment ProductVariant on ProductVariant {\n id\n image {\n ...Image\n }\n price {\n ...Money\n }\n product {\n handle\n }\n sku\n title\n }\n fragment LineItemFull on OrderLineItem {\n title\n quantity\n discountAllocations {\n allocatedAmount {\n ...Money\n }\n discountApplication {\n ...DiscountApplication\n }\n }\n originalTotalPrice {\n ...Money\n }\n discountedTotalPrice {\n ...Money\n }\n variant {\n ...ProductVariant\n }\n }\n\n query CustomerOrder(\n $country: CountryCode\n $language: LanguageCode\n $orderId: ID!\n ) @inContext(country: $country, language: $language) {\n node(id: $orderId) {\n ... on Order {\n id\n name\n orderNumber\n processedAt\n fulfillmentStatus\n totalTaxV2 {\n ...Money\n }\n totalPriceV2 {\n ...Money\n }\n subtotalPriceV2 {\n ...Money\n }\n shippingAddress {\n ...AddressFull\n }\n discountApplications(first: 100) {\n nodes {\n ...DiscountApplication\n }\n }\n lineItems(first: 100) {\n nodes {\n ...LineItemFull\n }\n }\n }\n }\n }\n': { - return: CustomerOrderQuery; - variables: CustomerOrderQueryVariables; - }; - '#graphql\n query CustomerDetails(\n $customerAccessToken: String!\n $country: CountryCode\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n customer(customerAccessToken: $customerAccessToken) {\n ...CustomerDetails\n }\n }\n\n fragment AddressPartial on MailingAddress {\n id\n formatted\n firstName\n lastName\n company\n address1\n address2\n country\n province\n city\n zip\n phone\n }\n\n fragment CustomerDetails on Customer {\n firstName\n lastName\n phone\n email\n defaultAddress {\n ...AddressPartial\n }\n addresses(first: 6) {\n edges {\n node {\n ...AddressPartial\n }\n }\n }\n orders(first: 250, sortKey: PROCESSED_AT, reverse: true) {\n edges {\n node {\n ...OrderCard\n }\n }\n }\n }\n\n #graphql\n fragment OrderCard on Order {\n id\n orderNumber\n processedAt\n financialStatus\n fulfillmentStatus\n currentTotalPrice {\n amount\n currencyCode\n }\n lineItems(first: 2) {\n edges {\n node {\n variant {\n image {\n url\n altText\n height\n width\n }\n }\n title\n }\n }\n }\n }\n\n': { - return: CustomerDetailsQuery; - variables: CustomerDetailsQueryVariables; - }; - '#graphql\n query ApiAllProducts(\n $query: String\n $count: Int\n $reverse: Boolean\n $country: CountryCode\n $language: LanguageCode\n $sortKey: ProductSortKeys\n ) @inContext(country: $country, language: $language) {\n products(first: $count, sortKey: $sortKey, reverse: $reverse, query: $query) {\n nodes {\n ...ProductCard\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n': { + '#graphql\n query ApiAllProducts(\n $query: String\n $count: Int\n $reverse: Boolean\n $country: CountryCode\n $language: LanguageCode\n $sortKey: ProductSortKeys\n ) @inContext(country: $country, language: $language) {\n products(first: $count, sortKey: $sortKey, reverse: $reverse, query: $query) {\n nodes {\n ...ProductCard\n }\n }\n }\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n sku\n }\n }\n }\n\n': { return: ApiAllProductsQuery; variables: ApiAllProductsQueryVariables; }; - '#graphql\n query FeaturedItems(\n $country: CountryCode\n $language: LanguageCode\n $pageBy: Int = 12\n ) @inContext(country: $country, language: $language) {\n featuredCollections: collections(first: 3, sortKey: UPDATED_AT) {\n nodes {\n ...FeaturedCollectionDetails\n }\n }\n featuredProducts: products(first: $pageBy) {\n nodes {\n ...ProductCard\n }\n }\n }\n\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n #graphql\n fragment FeaturedCollectionDetails on Collection {\n id\n title\n handle\n image {\n altText\n width\n height\n url\n }\n }\n\n': { + '#graphql\n query FeaturedItems(\n $country: CountryCode\n $language: LanguageCode\n $pageBy: Int = 12\n ) @inContext(country: $country, language: $language) {\n featuredCollections: collections(first: 3, sortKey: UPDATED_AT) {\n nodes {\n ...FeaturedCollectionDetails\n }\n }\n featuredProducts: products(first: $pageBy) {\n nodes {\n ...ProductCard\n }\n }\n }\n\n #graphql\n fragment ProductCard on Product {\n id\n title\n publishedAt\n handle\n vendor\n variants(first: 1) {\n nodes {\n id\n availableForSale\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n sku\n }\n }\n }\n\n #graphql\n fragment FeaturedCollectionDetails on Collection {\n id\n title\n handle\n image {\n altText\n width\n height\n url\n }\n }\n\n': { return: FeaturedItemsQuery; variables: FeaturedItemsQueryVariables; }; @@ -1831,48 +1339,7 @@ interface GeneratedQueryTypes { }; } -interface GeneratedMutationTypes { - '#graphql\n mutation customerActivate($id: ID!, $input: CustomerActivateInput!) {\n customerActivate(id: $id, input: $input) {\n customerAccessToken {\n accessToken\n expiresAt\n }\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n': { - return: CustomerActivateMutation; - variables: CustomerActivateMutationVariables; - }; - '#graphql\n mutation customerAddressUpdate(\n $address: MailingAddressInput!\n $customerAccessToken: String!\n $id: ID!\n ) {\n customerAddressUpdate(\n address: $address\n customerAccessToken: $customerAccessToken\n id: $id\n ) {\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n': { - return: CustomerAddressUpdateMutation; - variables: CustomerAddressUpdateMutationVariables; - }; - '#graphql\n mutation customerAddressDelete($customerAccessToken: String!, $id: ID!) {\n customerAddressDelete(customerAccessToken: $customerAccessToken, id: $id) {\n customerUserErrors {\n code\n field\n message\n }\n deletedCustomerAddressId\n }\n }\n': { - return: CustomerAddressDeleteMutation; - variables: CustomerAddressDeleteMutationVariables; - }; - '#graphql\n mutation customerDefaultAddressUpdate(\n $addressId: ID!\n $customerAccessToken: String!\n ) {\n customerDefaultAddressUpdate(\n addressId: $addressId\n customerAccessToken: $customerAccessToken\n ) {\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n': { - return: CustomerDefaultAddressUpdateMutation; - variables: CustomerDefaultAddressUpdateMutationVariables; - }; - '#graphql\n mutation customerAddressCreate(\n $address: MailingAddressInput!\n $customerAccessToken: String!\n ) {\n customerAddressCreate(\n address: $address\n customerAccessToken: $customerAccessToken\n ) {\n customerAddress {\n id\n }\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n': { - return: CustomerAddressCreateMutation; - variables: CustomerAddressCreateMutationVariables; - }; - '#graphql\n mutation customerUpdate($customerAccessToken: String!, $customer: CustomerUpdateInput!) {\n customerUpdate(customerAccessToken: $customerAccessToken, customer: $customer) {\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n ': { - return: CustomerUpdateMutation; - variables: CustomerUpdateMutationVariables; - }; - '#graphql\n mutation customerAccessTokenCreate($input: CustomerAccessTokenCreateInput!) {\n customerAccessTokenCreate(input: $input) {\n customerUserErrors {\n code\n field\n message\n }\n customerAccessToken {\n accessToken\n expiresAt\n }\n }\n }\n': { - return: CustomerAccessTokenCreateMutation; - variables: CustomerAccessTokenCreateMutationVariables; - }; - '#graphql\n mutation customerRecover($email: String!) {\n customerRecover(email: $email) {\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n': { - return: CustomerRecoverMutation; - variables: CustomerRecoverMutationVariables; - }; - '#graphql\n mutation customerCreate($input: CustomerCreateInput!) {\n customerCreate(input: $input) {\n customer {\n id\n }\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n': { - return: CustomerCreateMutation; - variables: CustomerCreateMutationVariables; - }; - '#graphql\n mutation customerReset($id: ID!, $input: CustomerResetInput!) {\n customerReset(id: $id, input: $input) {\n customerAccessToken {\n accessToken\n expiresAt\n }\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n': { - return: CustomerResetMutation; - variables: CustomerResetMutationVariables; - }; -} +interface GeneratedMutationTypes {} declare module '@shopify/hydrogen' { interface StorefrontQueries extends GeneratedQueryTypes {}